Get a Concept
Retrieve a concept by its OMOP concept ID:
The SDK accepts conceptId === 0 - the OMOP “unmapped” sentinel - and forwards it to the server without client-side validation.
Get by Vocabulary Code
Look up a concept using a vocabulary-specific code:
Batch Get Concepts
Retrieve up to 100 concepts in a single request:
With optional flags:
The SDK validates conceptIds.length is between 1 and 100 and returns a validation_error synthetically (no network call) if outside that range.
Autocomplete Suggestions
Get concept suggestions for autocomplete UI:
client.concepts.suggest() returns data as either ConceptSuggestion[] (bare array) or { data: ConceptSuggestion[] } (envelope), depending on the API version answering the request. Both shapes are valid per the SDK type (ConceptSuggestion[] | PaginatedData<ConceptSuggestion>); the Array.isArray(data) ? data : data?.data ?? [] pattern above handles both. Pagination always lives on the outer meta.pagination, never on the inner shape.
Filter by vocabulary and domain:
Get Relationships
Get relationships for a concept. Both client.concepts.relationships(...) and client.relationships.get(...) hit the same wire endpoint - pick whichever reads more naturally at the call site:
Filter by relationship type, vocabulary, and direction:
Find concepts related to a given concept (Phoebe-style relatedness):
Filter by relationship type and minimum score:
Get Recommended Concepts
Get curated concept recommendations using the OHDSI Phoebe algorithm:
With filters and pagination:
Server-side caps enforced client-side: conceptIds ≤ 100, relationshipTypes ≤ 20, vocabularyIds/domainIds ≤ 50. Violations return validation_error without hitting the network.
Navigate Hierarchy
Get Complete Hierarchy
Fetch ancestors and descendants in one request, in either flat or graph format:
Hierarchy Get Parameters
| Parameter | Type | Default | Description |
|---|
conceptId (positional) | number | required | The concept ID |
format | 'flat' | 'graph' | 'flat' | Response format |
vocabularyIds | string[] | - | Filter to specific vocabularies |
domainIds | string[] | - | Filter to specific domains |
maxLevels | number | 10 | Max hierarchy levels (server caps at 20) |
maxResults | number | - | Max results per direction |
relationshipTypes | string[] | - | Relationship types to follow |
includeInvalid | boolean | true | Include deprecated/invalid concepts |
Get Ancestors
Find parent concepts in the hierarchy:
Get Descendants
Find child concepts in the hierarchy:
Get Relationship Types
Get the catalog of OMOP CDM relationship types:
Concept Get Options
Include synonyms, relationships, hierarchy, and pin a vocabulary release:
Parameters
| Parameter | Type | Default | Description |
|---|
conceptId (positional) | number | required | OMOP concept ID - 0 is accepted as the “unmapped” sentinel |
includeRelationships | boolean | false | Include related concepts |
includeSynonyms | boolean | false | Include concept synonyms |
includeHierarchy | boolean | false | Include hierarchy summary |
vocabRelease | string | - | Pin to a specific vocabulary release (e.g. "2025.2") |