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

# Get Domains

> Retrieve all OMOP domains - Condition, Drug, Measurement, Observation, Procedure - that group medical concepts into high-level semantic categories.

This endpoint provides information about all domains available in the OMOP vocabulary system. Domains represent high-level categorizations that group medical concepts by their semantic meaning, such as Condition, Drug, Procedure, and others.

## Query Parameters

**include\_stats** `boolean` (default: false)

Include concept counts and vocabulary coverage for each domain

**vocab\_release** `string`

Specific vocabulary release version to query

**Example:** `2025.1`

## Response

**success** `boolean`

Whether domain retrieval completed.

**data** `object`

Domain records and summary.

**data.domains** `array`

Array of domain objects with their properties

**Domain Object**

**domain\_id** `string`

Unique identifier for the domain (e.g., "Condition", "Drug", "Procedure")

**domain\_name** `string`

Human-readable name of the domain

**domain\_concept\_id** `integer`

OMOP concept ID representing this domain

**concept\_count** `integer`

Total number of concepts in this domain (when `include_stats=true`)

**standard\_concept\_count** `integer`

Number of standard concepts in this domain (when `include_stats=true`)

**vocabulary\_coverage** `array`

List of vocabularies that contribute concepts to this domain (when `include_stats=true`)

**meta** `object`

Response metadata

**Metadata Object**

**request\_id** `string`

Unique identifier for this request

**vocab\_release** `string`

Vocabulary release version used for this response

```bash cURL theme={null}
curl -X GET "https://api.omophub.com/v1/domains?include_stats=true" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```ts TypeScript theme={null}
import { OMOPHub } from '@omophub/omophub-node';

const client = new OMOPHub();
const { data } = await client.domains.list({ includeStats: true });

console.log(`Found ${data?.domains.length} domains`);
data?.domains.forEach(domain => {
  const count = domain.concept_count ?? 'N/A';
  console.log(`${domain.domain_name}: ${count} concepts`);
});
```

```python Python theme={null}
import requests

url = "https://api.omophub.com/v1/domains"
params = {"include_stats": "true"}
headers = {"Authorization": "Bearer YOUR_API_KEY"}

response = requests.get(url, params=params, headers=headers)
data = response.json()

print(f"Found {len(data['data']['domains'])} domains")

# Display domains sorted by concept count
domains = data['data']['domains']
for domain in sorted(domains, key=lambda d: d.get('concept_count', 0), reverse=True):
    count = domain.get('concept_count', 0)
    standard = domain.get('standard_concept_count', 0)
    print(f"{domain['domain_name']}: {count:,} total, {standard:,} standard")
```

```r R theme={null}
library(omophub)

client <- omophub_client()
domains <- client$domains$list(include_stats = TRUE)

# Display domains
for (domain in domains$domains) {
  cat(sprintf("%s: %d concepts\n",
      domain$domain_name,
      domain$concept_count %||% 0))
}
```

```json Basic Response theme={null}
{
  "success": true,
  "data": {
    "domains": [
      {
        "domain_id": "Condition",
        "domain_name": "Condition",
        "domain_concept_id": 19
      },
      {
        "domain_id": "Drug",
        "domain_name": "Drug",
        "domain_concept_id": 13
      },
      {
        "domain_id": "Procedure",
        "domain_name": "Procedure",
        "domain_concept_id": 10
      },
      {
        "domain_id": "Measurement",
        "domain_name": "Measurement",
        "domain_concept_id": 21
      },
      {
        "domain_id": "Observation",
        "domain_name": "Observation",
        "domain_concept_id": 27
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123",
    "vocab_release": "2025.1"
  }
}
```

```json With Statistics (include_stats=true) theme={null}
{
  "success": true,
  "data": {
    "domains": [
      {
        "domain_id": "Condition",
        "domain_name": "Condition",
        "domain_concept_id": 19,
        "concept_count": 845672,
        "standard_concept_count": 423891,
        "vocabulary_coverage": ["SNOMED", "ICD10CM", "ICD10", "ICD9CM", "Read"]
      },
      {
        "domain_id": "Drug",
        "domain_name": "Drug",
        "domain_concept_id": 13,
        "concept_count": 652341,
        "standard_concept_count": 198765,
        "vocabulary_coverage": ["RxNorm", "RxNorm Extension", "NDC", "SNOMED"]
      },
      {
        "domain_id": "Procedure",
        "domain_name": "Procedure",
        "domain_concept_id": 10,
        "concept_count": 456789,
        "standard_concept_count": 234561,
        "vocabulary_coverage": ["SNOMED", "ICD10PCS", "HCPCS"]
      },
      {
        "domain_id": "Measurement",
        "domain_name": "Measurement",
        "domain_concept_id": 21,
        "concept_count": 234567,
        "standard_concept_count": 156789,
        "vocabulary_coverage": ["LOINC", "SNOMED"]
      },
      {
        "domain_id": "Observation",
        "domain_name": "Observation",
        "domain_concept_id": 27,
        "concept_count": 123456,
        "standard_concept_count": 87654,
        "vocabulary_coverage": ["SNOMED", "LOINC"]
      }
    ]
  },
  "meta": {
    "request_id": "req_xyz789",
    "vocab_release": "2025.1"
  }
}
```

## Usage Examples

### Basic Domain List

Get all available domains:

```ts TypeScript theme={null}
const { data } = await client.domains.list();
console.log(data?.domains);
```

### Domains with Statistics

Get domains with concept counts and vocabulary coverage:

```ts TypeScript theme={null}
const { data } = await client.domains.list({ includeStats: true });

// Find the domain with the most concepts
const largestDomain = data?.domains.reduce<{
  domain_name?: string;
  concept_count?: number;
}>(
  (max, domain) =>
    (domain.concept_count ?? 0) > (max.concept_count ?? 0) ? domain : max,
  {}
);

console.log(
  `Largest domain: ${largestDomain?.domain_name} with ${largestDomain?.concept_count} concepts`
);
```

### Filter by Vocabulary Coverage

Find domains that include concepts from a specific vocabulary:

```ts TypeScript theme={null}
const { data } = await client.domains.list({ includeStats: true });

// Find domains with SNOMED concepts
const snomedDomains = data?.domains.filter(domain =>
  domain.vocabulary_coverage?.includes('SNOMED')
);

console.log(
  'Domains with SNOMED concepts:',
  snomedDomains?.map(d => d.domain_name)
);
```

## Related Endpoints

* [Get Domain Concepts](https://docs.omophub.com/api-reference/domains/get-domain-concepts.md) - Concepts within a specific domain
* [Get Concept Classes](https://docs.omophub.com/api-reference/domains/get-concept-classes.md) - Concept class classifications
* [Search Concepts](https://docs.omophub.com/api-reference/search/basic-search.md) - Search within specific domains
* [Get Vocabularies](https://docs.omophub.com/api-reference/vocabulary/get-vocabularies) - Available vocabularies

## Notes

* Domains provide the highest level of semantic categorization in OMOP
* The most commonly used clinical domains are Condition, Drug, Procedure, and Measurement
* Use `include_stats=true` to get concept counts for capacity planning and analysis
* The `vocabulary_coverage` field shows which vocabularies contribute concepts to each domain


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.