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

# Working with OMOP domains

> Work with OMOP domains in the OMOPHub Python SDK - list Condition, Drug, Measurement, and Procedure domains and query their concepts from Python code.

## List All Domains

Get a list of all available OMOP domains:

```python theme={null}
# Basic list
result = client.domains.list()
for domain in result["data"]["domains"]:
    print(domain["domain_id"])

# Include concept counts and statistics
result = client.domains.list(include_stats=True)
for domain in result["data"]["domains"]:
    print(f"{domain['domain_id']}: {domain['concept_count']} concepts")
```

## Get Domain Concepts

Retrieve all concepts within a specific domain:

```python theme={null}
# Basic usage
result = client.domains.concepts("Condition", page_size=100)
for concept in result["data"]["concepts"]:
    print(f"{concept['concept_name']} ({concept['concept_id']})")

# Filter by vocabulary
result = client.domains.concepts(
    "Condition",
    vocabulary_ids=["SNOMED", "ICD10CM"],
    page_size=50
)

# Standard concepts only
result = client.domains.concepts(
    "Drug",
    vocabulary_ids=["RxNorm"],
    standard_only=True,
    page_size=100
)

# Include invalid/deprecated concepts
result = client.domains.concepts(
    "Procedure",
    include_invalid=True,
    page=1,
    page_size=50
)

# Pagination
print(f"Page {result['meta']['pagination']['page']} of {result['meta']['pagination']['total_pages']}")
print(f"Total: {result['meta']['pagination']['total_items']} concepts")
```

### Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `domain_id` | str | required | Domain identifier (e.g., "Condition", "Drug") |
| `vocabulary_ids` | list\[str] | None | Filter to specific vocabularies |
| `standard_only` | bool | False | Return only standard concepts |
| `include_invalid` | bool | True | Include deprecated concepts |
| `page` | int | 1 | Page number |
| `page_size` | int | 50 | Results per page (max 1000) |


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