Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omophub.com/llms.txt

Use this file to discover all available pages before exploring further.

List All Vocabularies

Get a paginated list of all available medical vocabularies. The result is wrapped under vocabularies; pagination metadata sits on the outer meta:
const { data, error, meta } = await client.vocabularies.list();
if (error) throw new Error(error.message);

for (const vocab of data.vocabularies) {
  console.log(`${vocab.vocabulary_id}: ${vocab.vocabulary_name}`);
}

console.log(`Total: ${meta?.pagination?.total_items}`);
Include statistics:
const { data } = await client.vocabularies.list({ includeStats: true });
for (const vocab of data?.vocabularies ?? []) {
  console.log(`${vocab.vocabulary_id}: ${vocab.stats?.total_concepts ?? 'N/A'} concepts`);
}
Custom sorting and pagination:
const sorted = await client.vocabularies.list({
  sortBy: 'name',
  sortOrder: 'asc',
  page: 1,
  pageSize: 50,
});

Parameters

ParameterTypeDefaultDescription
includeStatsbooleanfalseInclude vocabulary statistics
includeInactivebooleanfalseInclude inactive vocabularies
sortBy'name' | 'priority' | 'updated''name'Sort field
sortOrder'asc' | 'desc''asc'Sort order
pagenumber1Page number
pageSizenumber20Results per page (max 1000)

Get Vocabulary Details

Get metadata for a single vocabulary:
const { data } = await client.vocabularies.get('SNOMED');
console.log(`Name: ${data?.vocabulary_name}`);
console.log(`Version: ${data?.vocabulary_version}`);
console.log(`Reference: ${data?.vocabulary_reference}`);
Returns vocabulary_id, vocabulary_name, vocabulary_reference, vocabulary_version, vocabulary_concept_id. For detailed stats, use client.vocabularies.stats(vocabularyId).

Get Vocabulary Statistics

const { data } = await client.vocabularies.stats('SNOMED');
console.log(`Total concepts: ${data?.total_concepts}`);
console.log(`Standard concepts: ${data?.standard_concepts}`);

Get Domain Statistics

Per-domain breakdown for a vocabulary/domain pair:
const { data } = await client.vocabularies.domainStats('SNOMED', 'Condition');
console.log(data);
ParameterTypeDescription
vocabularyId (positional)stringVocabulary identifier (e.g. 'SNOMED')
domainId (positional)stringDomain identifier (e.g. 'Condition')

Get Vocabulary Domains

Vocabulary-scoped domain catalog (distinct from client.domains.list() which hits /domains):
const { data } = await client.vocabularies.domains();
for (const domain of data?.domains ?? []) {
  console.log(`${domain.domain_id}: ${domain.domain_name}`);
}

Get Concept Classes

const { data } = await client.vocabularies.conceptClasses();
for (const cls of data?.concept_classes ?? []) {
  console.log(`${cls.concept_class_id}: ${cls.concept_class_name}`);
}

Get Vocabulary Concepts

Retrieve concepts within a specific vocabulary, wrapped under concepts; pagination on outer meta:
// Basic
const { data, meta } = await client.vocabularies.concepts('SNOMED', { pageSize: 100 });
for (const concept of data?.concepts ?? []) {
  console.log(`${concept.concept_name} (${concept.concept_id})`);
}

console.log(`Page ${meta?.pagination?.page} of ${meta?.pagination?.total_pages}`);
console.log(`Total: ${meta?.pagination?.total_items} concepts`);
Search within a vocabulary:
await client.vocabularies.concepts('SNOMED', {
  search: 'diabetes',
  standardConcept: 'S',
  pageSize: 50,
});

await client.vocabularies.concepts('SNOMED', {
  search: 'hypertension',
  includeRelationships: true,
  includeSynonyms: true,
});

await client.vocabularies.concepts('RxNorm', {
  sortBy: 'name',
  sortOrder: 'desc',
  pageSize: 100,
});

await client.vocabularies.concepts('ICD10CM', {
  includeInvalid: true,
  page: 1,
  pageSize: 50,
});

Parameters

ParameterTypeDefaultDescription
vocabularyId (positional)stringrequiredVocabulary identifier
searchstring-Filter concepts by name or code
standardConcept'S' | 'C' | 'N' | 'all''all'Filter by standard concept flag
includeInvalidbooleanfalseInclude invalid / deprecated concepts
includeRelationshipsbooleanfalseInclude relationships in each row
includeSynonymsbooleanfalseInclude synonyms in each row
sortBy'name' | 'concept_id' | 'concept_code''name'Sort field
sortOrder'asc' | 'desc''asc'Sort order
pagenumber1Page number
pageSizenumber20Results per page (max 1000)