curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.4&page_size=20" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
concept_id = 201826 # Type 2 diabetes
url = f"https://api.omophub.com/v1/concepts/{concept_id}/related"
params = {
"min_score": 0.4,
"page_size": 30,
"relationship_types": "Is a,Maps to"
}
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, params=params, headers=headers)
data = response.json()
print(f"Found {len(data['data'])} related concepts")
for related in data['data'][:5]:
print(f" - {related['concept_name']} ({related['vocabulary_id']})")
print(f" Relationship: {related['relationship_name']}")
print(f" Score: {related['relationship_score']:.2f}")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const conceptId = 201826; // Type 2 diabetes
const { data } = await client.concepts.related(conceptId, {
minScore: 0.3,
pageSize: 20,
});
console.log(`Found ${data?.length ?? 0} related concepts`);
data?.slice(0, 5).forEach((concept, index) => {
console.log(
`${index + 1}. ${concept.concept_name} (${concept.vocabulary_id})`
);
console.log(` Relationship: ${concept.relationship_name}`);
console.log(` Score: ${concept.relationship_score.toFixed(2)}`);
});
{
"success": true,
"data": [
{
"concept_id": 73211009,
"concept_name": "Diabetes mellitus",
"concept_code": "73211009",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Is a",
"relationship_name": "Is a",
"relationship_score": 0.95,
"relationship_distance": 1
},
{
"concept_id": 443735,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "443735",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Subsumes",
"relationship_name": "Subsumes",
"relationship_score": 0.87,
"relationship_distance": 1
},
{
"concept_id": 435216,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "E11",
"vocabulary_id": "ICD10CM",
"vocabulary_name": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "ICD10 code",
"standard_concept": null,
"relationship_id": "Maps to",
"relationship_name": "Maps to",
"relationship_score": 0.92,
"relationship_distance": 1
}
],
"meta": {
"request_id": "req_related_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.1"
}
}
Get Related Concepts
Find OMOP concepts related through relationship analysis - ingredients, routes, brand names, and hierarchical links - for concept set expansion.
curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.4&page_size=20" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
concept_id = 201826 # Type 2 diabetes
url = f"https://api.omophub.com/v1/concepts/{concept_id}/related"
params = {
"min_score": 0.4,
"page_size": 30,
"relationship_types": "Is a,Maps to"
}
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, params=params, headers=headers)
data = response.json()
print(f"Found {len(data['data'])} related concepts")
for related in data['data'][:5]:
print(f" - {related['concept_name']} ({related['vocabulary_id']})")
print(f" Relationship: {related['relationship_name']}")
print(f" Score: {related['relationship_score']:.2f}")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const conceptId = 201826; // Type 2 diabetes
const { data } = await client.concepts.related(conceptId, {
minScore: 0.3,
pageSize: 20,
});
console.log(`Found ${data?.length ?? 0} related concepts`);
data?.slice(0, 5).forEach((concept, index) => {
console.log(
`${index + 1}. ${concept.concept_name} (${concept.vocabulary_id})`
);
console.log(` Relationship: ${concept.relationship_name}`);
console.log(` Score: ${concept.relationship_score.toFixed(2)}`);
});
{
"success": true,
"data": [
{
"concept_id": 73211009,
"concept_name": "Diabetes mellitus",
"concept_code": "73211009",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Is a",
"relationship_name": "Is a",
"relationship_score": 0.95,
"relationship_distance": 1
},
{
"concept_id": 443735,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "443735",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Subsumes",
"relationship_name": "Subsumes",
"relationship_score": 0.87,
"relationship_distance": 1
},
{
"concept_id": 435216,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "E11",
"vocabulary_id": "ICD10CM",
"vocabulary_name": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "ICD10 code",
"standard_concept": null,
"relationship_id": "Maps to",
"relationship_name": "Maps to",
"relationship_score": 0.92,
"relationship_distance": 1
}
],
"meta": {
"request_id": "req_related_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.1"
}
}
Overview
This endpoint finds concepts that are related to a given concept through various relationship types. Results are scored and ordered by relationship strength.Path Parameters
Query Parameters
Response
Array of related concepts ordered by relationship score
Show data
Show data
curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.4&page_size=20" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
concept_id = 201826 # Type 2 diabetes
url = f"https://api.omophub.com/v1/concepts/{concept_id}/related"
params = {
"min_score": 0.4,
"page_size": 30,
"relationship_types": "Is a,Maps to"
}
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, params=params, headers=headers)
data = response.json()
print(f"Found {len(data['data'])} related concepts")
for related in data['data'][:5]:
print(f" - {related['concept_name']} ({related['vocabulary_id']})")
print(f" Relationship: {related['relationship_name']}")
print(f" Score: {related['relationship_score']:.2f}")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const conceptId = 201826; // Type 2 diabetes
const { data } = await client.concepts.related(conceptId, {
minScore: 0.3,
pageSize: 20,
});
console.log(`Found ${data?.length ?? 0} related concepts`);
data?.slice(0, 5).forEach((concept, index) => {
console.log(
`${index + 1}. ${concept.concept_name} (${concept.vocabulary_id})`
);
console.log(` Relationship: ${concept.relationship_name}`);
console.log(` Score: ${concept.relationship_score.toFixed(2)}`);
});
{
"success": true,
"data": [
{
"concept_id": 73211009,
"concept_name": "Diabetes mellitus",
"concept_code": "73211009",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Is a",
"relationship_name": "Is a",
"relationship_score": 0.95,
"relationship_distance": 1
},
{
"concept_id": 443735,
"concept_name": "Type 2 diabetes mellitus without complications",
"concept_code": "443735",
"vocabulary_id": "SNOMED",
"vocabulary_name": "SNOMED CT",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"relationship_id": "Subsumes",
"relationship_name": "Subsumes",
"relationship_score": 0.87,
"relationship_distance": 1
},
{
"concept_id": 435216,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "E11",
"vocabulary_id": "ICD10CM",
"vocabulary_name": "ICD10CM",
"domain_id": "Condition",
"concept_class_id": "ICD10 code",
"standard_concept": null,
"relationship_id": "Maps to",
"relationship_name": "Maps to",
"relationship_score": 0.92,
"relationship_distance": 1
}
],
"meta": {
"request_id": "req_related_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.1"
}
}
Usage Examples
Basic Related Concepts
Find general related concepts:curl -X GET "https://api.omophub.com/v1/concepts/201826/related" \
-H "Authorization: Bearer YOUR_API_KEY"
High-Score Relationships
Get only strongly related concepts:curl -X GET "https://api.omophub.com/v1/concepts/201826/related?min_score=0.7&page_size=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Filtered by Relationship Type
Find specific relationship types:curl -X GET "https://api.omophub.com/v1/concepts/201826/related?relationship_types=Is%20a,Maps%20to" \
-H "Authorization: Bearer YOUR_API_KEY"
Important Notes
- Score interpretation - Scores above 0.7 indicate strong relationships, 0.4-0.7 moderate, below 0.4 weak
- Distance interpretation - Distance of 1 means direct relationship, higher values indicate indirect connections
- Performance - Results are cached for improved response times on repeated queries
Related Endpoints
- Get Concept Relationships - Get all direct relationships
- Traverse Relationships - Complex relationship traversals
Was this page helpful?