Skip to main content
curl -X GET "https://api.omophub.com/v1/vocabularies/SNOMED/stats/domains/Condition?include_concept_classes=true&include_mapping_coverage=true" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "success": true,
  "data": {
    "vocabulary": {
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
      "vocabulary_version": "2024.1",
      "vocabulary_reference": "http://www.snomed.org/"
    },
    "domain": {
      "domain_id": "Condition",
      "domain_name": "Condition",
      "description": "Medical conditions, diseases, and disorders"
    },
    "statistics": {
      "total_concepts": 125847,
      "standard_concepts": 118943,
      "classification_concepts": 4521,
      "non_standard_concepts": 2383,
      "valid_concepts": 123456,
      "invalid_concepts": 2391,
      "coverage_percentage": 85.7,
      "concept_density": 2847.3,
      "data_quality_score": 0.924
    },
    "concept_class_breakdown": [
      {
        "concept_class_id": "Clinical Finding",
        "concept_class_name": "Clinical Finding",
        "total_concepts": 87234,
        "standard_concepts": 85123,
        "percentage_of_domain": 69.3,
        "avg_relationships_per_concept": 4.7
      },
      {
        "concept_class_id": "Disorder",
        "concept_class_name": "Disorder",
        "total_concepts": 23456,
        "standard_concepts": 22891,
        "percentage_of_domain": 18.6,
        "avg_relationships_per_concept": 5.2
      },
      {
        "concept_class_id": "Finding",
        "concept_class_name": "Finding",
        "total_concepts": 15157,
        "standard_concepts": 14929,
        "percentage_of_domain": 12.1,
        "avg_relationships_per_concept": 3.8
      }
    ],
    "temporal_analysis": {
      "earliest_valid_start": "2002-01-31",
      "latest_valid_start": "2024-03-01",
      "concepts_by_decade": {
        "2000": 89234,
        "2010": 23456,
        "2020": 13157
      },
      "recently_added_concepts": 5678,
      "recently_deprecated_concepts": 891,
      "stability_score": 0.887
    },
    "relationship_statistics": {
      "total_relationships": 589234,
      "intra_domain_relationships": 456789,
      "cross_domain_relationships": 132445,
      "hierarchical_relationships": 234567,
      "mapping_relationships": 89123,
      "avg_relationships_per_concept": 4.7,
      "relationship_types": [
        {"type": "Is a", "count": 234567},
        {"type": "Maps to", "count": 89123},
        {"type": "Subsumes", "count": 67890},
        {"type": "Has finding site", "count": 45678},
        {"type": "Associated with", "count": 34567}
      ]
    },
    "mapping_coverage": {
      "mapped_to_other_vocabularies": 98765,
      "unmapped_concepts": 27082,
      "mapping_coverage_percentage": 78.5,
      "target_vocabularies": [
        {"vocabulary_id": "ICD10CM", "mapped_concepts": 45678, "coverage_percentage": 36.3},
        {"vocabulary_id": "ICD9CM", "mapped_concepts": 23456, "coverage_percentage": 18.6},
        {"vocabulary_id": "MedDRA", "mapped_concepts": 17890, "coverage_percentage": 14.2}
      ],
      "best_mapped_vocabulary": {
        "vocabulary_id": "ICD10CM",
        "coverage_percentage": 36.3,
        "mapping_quality": "high"
      },
      "mapping_quality_distribution": {
        "excellent": 34567,
        "good": 45678,
        "fair": 12345,
        "poor": 6175
      }
    }
  },
  "meta": {
    "request_id": "req_vocab_domain_stats_ghi789",
    "timestamp": "2024-12-22T10:32:00Z",
    "vocab_release": "2025.2"
  }
}

Overview

This endpoint provides comprehensive statistics about concepts within a specific domain of a particular vocabulary. It’s essential for understanding domain coverage, concept distribution, and data quality metrics for targeted analysis.

Path Parameters

vocabularyId
string
required
The vocabulary identifier (e.g., “SNOMED”, “ICD10CM”, “LOINC”)
domainId
string
required
The domain identifier (e.g., “Condition”, “Drug”, “Procedure”, “Measurement”)

Query Parameters

include_concept_classes
boolean
default:"false"
Include statistics broken down by concept class
include_temporal_analysis
boolean
default:"false"
Include temporal analysis of concept validity periods
include_relationship_stats
boolean
default:"false"
Include statistics about relationships within this domain
include_mapping_coverage
boolean
default:"false"
Include cross-vocabulary mapping coverage statistics
standard_concepts_only
boolean
default:"false"
Calculate statistics only for standard concepts
vocab_release
string
Specific vocabulary release version (e.g., “2024.1”)

Response

vocabulary
object
required
Information about the vocabulary
domain
object
required
Information about the domain
statistics
object
required
Comprehensive domain statistics
concept_class_breakdown
array
Statistics by concept class (when include_concept_classes=true)
temporal_analysis
object
Temporal analysis of concepts (when include_temporal_analysis=true)
relationship_statistics
object
Relationship statistics (when include_relationship_stats=true)
mapping_coverage
object
Cross-vocabulary mapping coverage (when include_mapping_coverage=true)
curl -X GET "https://api.omophub.com/v1/vocabularies/SNOMED/stats/domains/Condition?include_concept_classes=true&include_mapping_coverage=true" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"
{
  "success": true,
  "data": {
    "vocabulary": {
      "vocabulary_id": "SNOMED",
      "vocabulary_name": "Systematized Nomenclature of Medicine Clinical Terms",
      "vocabulary_version": "2024.1",
      "vocabulary_reference": "http://www.snomed.org/"
    },
    "domain": {
      "domain_id": "Condition",
      "domain_name": "Condition",
      "description": "Medical conditions, diseases, and disorders"
    },
    "statistics": {
      "total_concepts": 125847,
      "standard_concepts": 118943,
      "classification_concepts": 4521,
      "non_standard_concepts": 2383,
      "valid_concepts": 123456,
      "invalid_concepts": 2391,
      "coverage_percentage": 85.7,
      "concept_density": 2847.3,
      "data_quality_score": 0.924
    },
    "concept_class_breakdown": [
      {
        "concept_class_id": "Clinical Finding",
        "concept_class_name": "Clinical Finding",
        "total_concepts": 87234,
        "standard_concepts": 85123,
        "percentage_of_domain": 69.3,
        "avg_relationships_per_concept": 4.7
      },
      {
        "concept_class_id": "Disorder",
        "concept_class_name": "Disorder",
        "total_concepts": 23456,
        "standard_concepts": 22891,
        "percentage_of_domain": 18.6,
        "avg_relationships_per_concept": 5.2
      },
      {
        "concept_class_id": "Finding",
        "concept_class_name": "Finding",
        "total_concepts": 15157,
        "standard_concepts": 14929,
        "percentage_of_domain": 12.1,
        "avg_relationships_per_concept": 3.8
      }
    ],
    "temporal_analysis": {
      "earliest_valid_start": "2002-01-31",
      "latest_valid_start": "2024-03-01",
      "concepts_by_decade": {
        "2000": 89234,
        "2010": 23456,
        "2020": 13157
      },
      "recently_added_concepts": 5678,
      "recently_deprecated_concepts": 891,
      "stability_score": 0.887
    },
    "relationship_statistics": {
      "total_relationships": 589234,
      "intra_domain_relationships": 456789,
      "cross_domain_relationships": 132445,
      "hierarchical_relationships": 234567,
      "mapping_relationships": 89123,
      "avg_relationships_per_concept": 4.7,
      "relationship_types": [
        {"type": "Is a", "count": 234567},
        {"type": "Maps to", "count": 89123},
        {"type": "Subsumes", "count": 67890},
        {"type": "Has finding site", "count": 45678},
        {"type": "Associated with", "count": 34567}
      ]
    },
    "mapping_coverage": {
      "mapped_to_other_vocabularies": 98765,
      "unmapped_concepts": 27082,
      "mapping_coverage_percentage": 78.5,
      "target_vocabularies": [
        {"vocabulary_id": "ICD10CM", "mapped_concepts": 45678, "coverage_percentage": 36.3},
        {"vocabulary_id": "ICD9CM", "mapped_concepts": 23456, "coverage_percentage": 18.6},
        {"vocabulary_id": "MedDRA", "mapped_concepts": 17890, "coverage_percentage": 14.2}
      ],
      "best_mapped_vocabulary": {
        "vocabulary_id": "ICD10CM",
        "coverage_percentage": 36.3,
        "mapping_quality": "high"
      },
      "mapping_quality_distribution": {
        "excellent": 34567,
        "good": 45678,
        "fair": 12345,
        "poor": 6175
      }
    }
  },
  "meta": {
    "request_id": "req_vocab_domain_stats_ghi789",
    "timestamp": "2024-12-22T10:32:00Z",
    "vocab_release": "2025.2"
  }
}

Usage Examples

Basic Domain Statistics

Get essential statistics for a vocabulary-domain combination:
curl -X GET "https://api.omophub.com/v1/vocabularies/SNOMED/stats/domains/Condition" \
  -H "Authorization: Bearer YOUR_API_KEY"

Detailed Analysis

Get comprehensive analysis with all optional data:
curl -X GET "https://api.omophub.com/v1/vocabularies/ICD10CM/stats/domains/Procedure?include_concept_classes=true&include_temporal_analysis=true&include_relationship_stats=true&include_mapping_coverage=true" \
  -H "Authorization: Bearer YOUR_API_KEY"

Quality Assessment

Focus on data quality and mapping coverage:
curl -X GET "https://api.omophub.com/v1/vocabularies/LOINC/stats/domains/Measurement?include_mapping_coverage=true&standard_concepts_only=true" \
  -H "Authorization: Bearer YOUR_API_KEY"

Comparative Analysis

Compare domain statistics across vocabularies:
async function compareDomainAcrossVocabularies(domain, vocabularies) {
  const comparisons = await Promise.all(
    vocabularies.map(async (vocab) => {
      const response = await fetch(`/v1/vocabularies/${vocab}/stats/domains/${domain}?include_concept_classes=true`);
      const data = await response.json();
      return {
        vocabulary: vocab,
        totalConcepts: data.statistics.total_concepts,
        standardConcepts: data.statistics.standard_concepts,
        coverage: data.statistics.coverage_percentage,
        dataQuality: data.statistics.data_quality_score,
        topClass: data.concept_class_breakdown?.[0]?.concept_class_name
      };
    })
  );
  
  return comparisons.sort((a, b) => b.totalConcepts - a.totalConcepts);
}

// Compare Condition domain across vocabularies
const comparison = await compareDomainAcrossVocabularies('Condition', ['SNOMED', 'ICD10CM', 'ICD9CM']);

Important Notes

  • Performance - Comprehensive statistics with all options may take longer to compute
  • Data freshness - Statistics are computed in real-time but may be cached for performance
  • Domain coverage - Coverage percentage is relative to the total concepts in that domain across all vocabularies
  • Quality scores - Data quality scores consider completeness, validity, and relationship density
  • Temporal analysis - Requires historical data and may not be available for all vocabularies
I