> ## 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 Domain Statistics

> Get statistical overview for an OMOP domain including concept counts, standard concept coverage, and vocabulary distribution for capacity planning.

This endpoint provides statistical information about a domain, including concept counts, vocabulary distribution, and concept class breakdown.

## Path Parameters

**domain\_id** `string` *required*

The domain identifier to get statistics for.

**Example:** `Condition`, `Drug`, `Procedure`

## Query Parameters

**vocab\_release** `string`

Specific vocabulary release version to query

**Example:** `2025.1`

## Response

**success** `boolean`

Whether statistics retrieval completed.

**data** `object`

Domain statistics and breakdowns.

**data.domain\_id** `string`

Domain identifier.

**data.statistics** `object`

Statistical overview of the domain.

**Statistics Object**

**domain\_id** `string`

Domain identifier.

**domain\_name** `string`

Human-readable domain name.

**total\_concepts** `integer`

Total number of concepts in the domain.

**standard\_concepts** `integer`

Number of standard concepts (standard\_concept = 'S').

**non\_standard\_concepts** `integer`

Number of non-standard concepts.

**invalid\_concepts** `integer`

Number of invalid/deprecated concepts.

**vocabulary\_breakdown** `array`

Distribution of concepts by vocabulary.

**Vocabulary Item**

**vocabulary\_id** `string`

Vocabulary identifier.

**vocabulary\_name** `string`

Human-readable vocabulary name.

**concept\_count** `integer`

Number of concepts from this vocabulary.

**concept\_class\_breakdown** `array`

Distribution of concepts by concept class.

**Concept Class Item**

**concept\_class\_id** `string`

Concept class identifier.

**concept\_class\_name** `string`

Human-readable concept class name.

**concept\_count** `integer`

Number of concepts in this class.

**creation\_date\_range** `object`

Date range of concept validity dates.

**Date Range Object**

**earliest** `string`

Earliest valid\_start\_date (ISO format).

**latest** `string`

Latest valid\_start\_date (ISO format).

**meta** `object`

Response metadata.

**Metadata Object**

**request\_id** `string`

Unique identifier for this request.

**vocab\_release** `string`

Vocabulary release version used.

**timestamp** `string`

Response timestamp (ISO format).

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

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

// Not yet exposed as a dedicated SDK method - use the typed low-level helper.
const client = new OMOPHub();

interface DomainStats {
  statistics: {
    total_concepts: number;
    standard_concepts: number;
    vocabulary_breakdown: Array<{
      vocabulary_id: string;
      concept_count: number;
    }>;
  };
}

const { data } = await client.get<DomainStats>('/domains/Condition/statistics');

console.log(`Total concepts: ${data?.statistics.total_concepts}`);
console.log(`Standard: ${data?.statistics.standard_concepts}`);
data?.statistics.vocabulary_breakdown.forEach(v => {
  console.log(`${v.vocabulary_id}: ${v.concept_count} concepts`);
});
```

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

response = requests.get(
    "https://api.omophub.com/v1/domains/Drug/statistics",
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)

data = response.json()
stats = data["data"]["statistics"]

print(f"Total: {stats['total_concepts']}")
print(f"Standard: {stats['standard_concepts']}")
print(f"Non-standard: {stats['non_standard_concepts']}")

# Vocabulary breakdown
for v in stats["vocabulary_breakdown"]:
    print(f"  {v['vocabulary_id']}: {v['concept_count']}")
```

```json theme={null}
{
  "success": true,
  "data": {
    "domain_id": "Condition",
    "statistics": {
      "domain_id": "Condition",
      "domain_name": "Condition",
      "total_concepts": 845672,
      "standard_concepts": 423891,
      "non_standard_concepts": 421781,
      "invalid_concepts": 12453,
      "vocabulary_breakdown": [
        {
          "vocabulary_id": "SNOMED",
          "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
          "concept_count": 387421
        },
        {
          "vocabulary_id": "ICD10CM",
          "vocabulary_name": "International Classification of Diseases, Tenth Revision, Clinical Modification",
          "concept_count": 98234
        },
        {
          "vocabulary_id": "ICD10",
          "vocabulary_name": "International Classification of Diseases, Tenth Revision",
          "concept_count": 87456
        }
      ],
      "concept_class_breakdown": [
        {
          "concept_class_id": "Clinical Finding",
          "concept_class_name": "Clinical Finding",
          "concept_count": 312456
        },
        {
          "concept_class_id": "Disorder",
          "concept_class_name": "Disorder",
          "concept_count": 156789
        }
      ],
      "creation_date_range": {
        "earliest": "1970-01-01",
        "latest": "2024-12-01"
      }
    }
  },
  "meta": {
    "request_id": "req_abc123",
    "vocab_release": "2025.1",
    "timestamp": "2025-01-05T10:00:00Z"
  }
}
```

## Usage Examples

### Get Condition Domain Statistics

```bash theme={null}
GET /v1/domains/Condition/statistics
```

### Get Drug Domain Statistics

```bash theme={null}
GET /v1/domains/Drug/statistics
```

### Get Procedure Domain Statistics

```bash theme={null}
GET /v1/domains/Procedure/statistics
```

## Related Endpoints

* [Get Domains](https://docs.omophub.com/api-reference/domains/get-domains.md) - List all available domains
* [Get Domain Concepts](https://docs.omophub.com/api-reference/domains/get-domain-concepts.md) - Get concepts within a domain

## Notes

* Statistics are calculated from the current vocabulary release
* The vocabulary\_breakdown shows which source vocabularies contribute concepts to the domain
* The concept\_class\_breakdown shows the distribution of concept types within the domain
* Standard concepts are preferred for clinical applications


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