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

> Get statistics for a specific domain within an OMOP vocabulary - concept counts and standard coverage per Condition, Drug, Measurement, and more.

## Overview

This endpoint provides statistics about concepts within a specific domain of a particular vocabulary, including concept counts and class distribution.

## Path Parameters

<ParamField path="vocabularyId" type="string" required>
  The vocabulary identifier (e.g., "SNOMED", "ICD10CM", "LOINC")
</ParamField>

<ParamField path="domainId" type="string" required>
  The domain identifier (e.g., "Condition", "Drug", "Procedure", "Measurement")
</ParamField>

## Query Parameters

<ParamField query="vocab_release" type="string">
  Specific vocabulary release version (e.g., "2025.1")
</ParamField>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates whether the request was successful
</ResponseField>

<ResponseField name="data" type="object" required>
  Domain statistics data

  <Expandable title="data">
    <ResponseField name="vocabulary_id" type="string">
      Vocabulary identifier
    </ResponseField>

    <ResponseField name="vocabulary_name" type="string">
      Human-readable vocabulary name
    </ResponseField>

    <ResponseField name="domain_id" type="string">
      Domain identifier
    </ResponseField>

    <ResponseField name="domain_name" type="string">
      Human-readable domain name
    </ResponseField>

    <ResponseField name="total_concepts" type="integer">
      Total number of concepts in this vocabulary-domain combination
    </ResponseField>

    <ResponseField name="standard_concepts" type="integer">
      Number of standard concepts (standard\_concept = 'S')
    </ResponseField>

    <ResponseField name="classification_concepts" type="integer">
      Number of classification concepts (standard\_concept = 'C')
    </ResponseField>

    <ResponseField name="invalid_concepts" type="integer">
      Number of invalid/deprecated concepts
    </ResponseField>

    <ResponseField name="active_concepts" type="integer">
      Number of currently active concepts
    </ResponseField>

    <ResponseField name="concept_classes" type="array">
      Top concept classes in this domain (up to 10)

      <Expandable title="concept class object">
        <ResponseField name="concept_class_id" type="string">
          Concept class identifier
        </ResponseField>

        <ResponseField name="concept_class_name" type="string">
          Concept class name
        </ResponseField>

        <ResponseField name="concept_count" type="integer">
          Number of concepts in this class
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="last_updated" type="string">
      ISO 8601 timestamp of when statistics were calculated
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object" required>
  Response metadata

  <Expandable title="meta">
    <ResponseField name="request_id" type="string">
      Unique identifier for request tracing
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp
    </ResponseField>

    <ResponseField name="vocab_release" type="string">
      Vocabulary release version used
    </ResponseField>
  </Expandable>
</ResponseField>

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

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

  response = requests.get(
      "https://api.omophub.com/v1/vocabularies/SNOMED/stats/domains/Condition",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  data = response.json()

  print(f"Total concepts: {data['data']['total_concepts']}")
  print(f"Standard concepts: {data['data']['standard_concepts']}")
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
      "domain_id": "Condition",
      "domain_name": "Condition",
      "total_concepts": 125847,
      "standard_concepts": 118943,
      "classification_concepts": 4521,
      "invalid_concepts": 2391,
      "active_concepts": 123456,
      "concept_classes": [
        {
          "concept_class_id": "Clinical Finding",
          "concept_class_name": "Clinical Finding",
          "concept_count": 87234
        },
        {
          "concept_class_id": "Disorder",
          "concept_class_name": "Disorder",
          "concept_count": 23456
        },
        {
          "concept_class_id": "Finding",
          "concept_class_name": "Finding",
          "concept_count": 15157
        }
      ],
      "last_updated": "2024-12-22T10:32:00Z"
    },
    "meta": {
      "request_id": "req_abc123",
      "timestamp": "2024-12-22T10:32:00Z",
      "vocab_release": "2025.1"
    }
  }
  ```
</ResponseExample>

## Notes

* Returns statistics for a specific vocabulary-domain combination
* The `concept_classes` array shows the top 10 concept classes by count
* Use this endpoint to understand concept distribution within a domain
