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 Domains

Get the OMOP domain catalog. The result is wrapped under domains and the endpoint is not paginated server-side - the full ~20-row catalog comes back in a single call:
const { data, error } = await client.domains.list();
if (error) throw new Error(error.message);

for (const domain of data.domains) {
  console.log(domain.domain_id);
}
Include concept counts and stats:
const { data } = await client.domains.list({ includeStats: true });
for (const domain of data?.domains ?? []) {
  console.log(`${domain.domain_id}: ${domain.stats?.total_concepts ?? 'N/A'} concepts`);
}

Get Domain Concepts

Retrieve concepts within a specific domain. Wrapped under concepts; pagination on outer meta:
const { data, error, meta } = await client.domains.concepts('Condition', {
  pageSize: 100,
});
if (error) throw new Error(error.message);

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`);
Filter by vocabulary:
await client.domains.concepts('Condition', {
  vocabularyIds: ['SNOMED', 'ICD10CM'],
  pageSize: 50,
});
Standard concepts only:
await client.domains.concepts('Drug', {
  vocabularyIds: ['RxNorm'],
  standardOnly: true,
  pageSize: 100,
});
Include invalid / deprecated concepts:
await client.domains.concepts('Procedure', {
  includeInvalid: true,
  page: 1,
  pageSize: 50,
});

Parameters

ParameterTypeDefaultDescription
domainId (positional)stringrequiredDomain identifier (e.g. 'Condition', 'Drug')
vocabularyIdsstring[]-Filter to specific vocabularies
standardOnlybooleanfalseOnly return standard concepts
includeInvalidbooleanfalseInclude deprecated concepts
pagenumber1Page number
pageSizenumber50Results per page (max 1000)
client.domains.list() returns the canonical OMOP domain catalog from GET /domains. The vocabulary-scoped version client.vocabularies.domains() queries GET /vocabularies/domains - different endpoint, different shape.