This lightweight endpoint quickly determines whether a concept has any relationships to other concepts. This is useful for UI components, validation logic, or filtering concepts that are isolated vs. connected in the terminology network.
Path Parameters
integer
required
The unique OMOP concept ID to check for relationships
Query Parameters
string
Comma-separated list of relationship types to check (e.g., “Maps to”, “Is a”)
string
Comma-separated list of vocabulary IDs to limit relationship check
boolean
default:"true"
Include reverse relationships (concepts that relate to this concept)
boolean
default:"true"
Include relationships to invalid/deprecated concepts
string
Specific vocabulary release version (e.g., “2024.1”)
Response
boolean
required
Indicates whether the request was successful
object
required
Response data containing relationship check results
Show data
integer
The concept ID that was checked
boolean
Whether this concept has any relationships matching the specified criteria
object
Summary information about relationships (when has_relations is true)
Show relation_summary
integer
Total number of relationships found
integer
Number of outbound relationships (from this concept)
integer
Number of inbound relationships (to this concept)
array
Array of relationship types found (up to 10 most common)
array
Array of vocabularies that have related concepts (up to 10)
boolean
Whether concept has mappings to standard concepts
object
Details about what was checked
Show checks_performed
array
Relationship types included in the check
array
Vocabularies included in the check
boolean
Whether reverse relationships were checked
boolean
Whether invalid relationships were checked
object
required
Response metadata and API information
Show meta
string
Unique request identifier for debugging
string
ISO 8601 timestamp of the response
string
Vocabulary release version used
curl -X GET "https://api.omophub.com/v1/concepts/201826/relations/any" \ -H "Authorization: Bearer YOUR_API_KEY"
import requestsconcept_id = 201826 # Type 2 diabetesurl = f"https://api.omophub.com/v1/concepts/{concept_id}/relations/any"params = { "relationship_types": "Maps to,Is a", "include_reverse": True}headers = { "Authorization": "Bearer YOUR_API_KEY"}response = requests.get(url, params=params, headers=headers)data = response.json()if data['data']['has_relations']: print(f"✓ Concept {concept_id} has relationships") summary = data['data']['relation_summary'] print(f" - Total: {summary['total_count']}") print(f" - Standard mappings: {'Yes' if summary['has_standard_mappings'] else 'No'}")else: print(f"✗ Concept {concept_id} has no relationships")
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 RelationCheck { has_relations: boolean; relation_summary: { total_count: number; relationship_types: string[] };}const conceptId = 201826; // Type 2 diabetesconst { data } = await client.get<RelationCheck>( `/concepts/${conceptId}/relations/any`);if (data?.has_relations) { console.log( `Concept ${conceptId} has ${data.relation_summary.total_count} relationships` ); console.log('Relationship types:', data.relation_summary.relationship_types);} else { console.log(`Concept ${conceptId} has no relationships`);}
curl -X GET "https://api.omophub.com/v1/concepts/201826/relations/any?relationship_types=Maps%20to&vocabulary_ids=ICD10CM,ICD9CM" \ -H "Authorization: Bearer YOUR_API_KEY"
import requestsdef validate_concept_connectivity(concept_ids): """ Check which concepts have standard mappings for data quality validation """ connected_concepts = [] isolated_concepts = [] for concept_id in concept_ids: url = f"https://api.omophub.com/v1/concepts/{concept_id}/relations/any" params = { "relationship_types": "Maps to", "vocabulary_ids": "SNOMED,ICD10CM,ICD9CM" } response = requests.get(url, params=params, headers={ "Authorization": "Bearer YOUR_API_KEY" }) data = response.json() concept_data = data['data'] if concept_data['has_relations'] and concept_data['relation_summary']['has_standard_mappings']: connected_concepts.append({ 'concept_id': concept_id, 'total_mappings': concept_data['relation_summary']['total_count'], 'vocabularies': concept_data['relation_summary']['connected_vocabularies'] }) else: isolated_concepts.append(concept_id) print(f"Connected concepts: {len(connected_concepts)}") print(f"Isolated concepts: {len(isolated_concepts)}") return connected_concepts, isolated_concepts# Validate a set of cardiovascular conceptscardiovascular_concepts = [201826, 4182210, 313217, 320128, 434557]connected, isolated = validate_concept_connectivity(cardiovascular_concepts)for concept in connected[:3]: # Show top 3 print(f"Concept {concept['concept_id']}: {concept['total_mappings']} mappings across {len(concept['vocabularies'])} vocabularies")