Skip to main content

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 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.

Get Complete Hierarchy

Fetch ancestors and descendants in one request, in either flat or graph format:

Hierarchy Get Parameters

ParameterTypeDefaultDescription
conceptId (positional)numberrequiredThe concept ID
format'flat' | 'graph''flat'Response format
vocabularyIdsstring[]-Filter to specific vocabularies
domainIdsstring[]-Filter to specific domains
maxLevelsnumber10Max hierarchy levels (server caps at 20)
maxResultsnumber-Max results per direction
relationshipTypesstring[]-Relationship types to follow
includeInvalidbooleantrueInclude 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

ParameterTypeDefaultDescription
conceptId (positional)numberrequiredOMOP concept ID - 0 is accepted as the “unmapped” sentinel
includeRelationshipsbooleanfalseInclude related concepts
includeSynonymsbooleanfalseInclude concept synonyms
includeHierarchybooleanfalseInclude hierarchy summary
vocabReleasestring-Pin to a specific vocabulary release (e.g. "2025.2")