curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847],
"include_relationships": true,
"include_synonyms": true
}'
import requests
payload = {
"concept_ids": [320128, 201826, 4329847],
"include_relationships": True,
"include_synonyms": True,
"include_mappings": False
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
concepts = response.json()
for concept in concepts['data']['concepts']:
print(f"{concept['concept_name']} ({concept['vocabulary_id']})")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.concepts.batch({
conceptIds: [320128, 201826, 4329847],
includeRelationships: true,
includeSynonyms: true,
});
console.log(`Retrieved ${data?.concepts.length} concepts`);
curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847, 313217],
"vocabulary_filter": ["SNOMED", "ICD10CM"],
"include_mappings": true,
"standard_only": true
}'
import requests
# Large batch request with comprehensive data
concept_ids = [320128, 201826, 4329847, 313217, 435216]
payload = {
"concept_ids": concept_ids,
"include_relationships": True,
"include_synonyms": True,
"include_mappings": True,
"standard_only": True
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
data = response.json()
print(f"Successfully retrieved {len(data['data']['concepts'])} concepts")
print(f"Failed to retrieve {len(data['data']['failed_concepts'])} concepts")
# Process successful concepts
for concept in data['data']['concepts']:
print(f"\n{concept['concept_name']}")
print(f" ID: {concept['concept_id']}")
print(f" Vocabulary: {concept['vocabulary_id']}")
print(f" Domain: {concept['domain_id']}")
if concept.get('synonyms'):
print(f" Synonyms: {len(concept['synonyms'])} found")
if concept.get('relationships'):
print(f" Relationships: {len(concept['relationships'])} found")
{
"success": true,
"data": {
"concepts": [
{
"concept_id": 320128,
"concept_name": "Essential hypertension",
"concept_code": "59621000",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": ["High blood pressure"],
"relationships": {
"parents": [
{
"relationship_id": "Is a",
"concept_id": 4182210,
"concept_name": "Hypertensive disorder"
}
],
"children": []
}
},
{
"concept_id": 201826,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "44054006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Type II diabetes mellitus",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "Adult-onset diabetes",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 73211009,
"target_concept_name": "Diabetes mellitus",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "outbound"
}
]
},
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"concept_code": "22298006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Heart attack",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "MI - Myocardial infarction",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 134057,
"target_concept_name": "Acute myocardial infarction",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "inbound"
}
]
}
],
"failed_concepts": [],
"summary": {
"total_requested": 3,
"successful_retrievals": 3,
"failed_retrievals": 0,
"vocabularies_represented": ["SNOMED"],
"domains_represented": ["Condition"]
}
},
"meta": {
"request_id": "req_batch_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2",
"query_time_ms": 45.2
}
}
Batch Concepts
curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847],
"include_relationships": true,
"include_synonyms": true
}'
import requests
payload = {
"concept_ids": [320128, 201826, 4329847],
"include_relationships": True,
"include_synonyms": True,
"include_mappings": False
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
concepts = response.json()
for concept in concepts['data']['concepts']:
print(f"{concept['concept_name']} ({concept['vocabulary_id']})")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.concepts.batch({
conceptIds: [320128, 201826, 4329847],
includeRelationships: true,
includeSynonyms: true,
});
console.log(`Retrieved ${data?.concepts.length} concepts`);
curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847, 313217],
"vocabulary_filter": ["SNOMED", "ICD10CM"],
"include_mappings": true,
"standard_only": true
}'
import requests
# Large batch request with comprehensive data
concept_ids = [320128, 201826, 4329847, 313217, 435216]
payload = {
"concept_ids": concept_ids,
"include_relationships": True,
"include_synonyms": True,
"include_mappings": True,
"standard_only": True
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
data = response.json()
print(f"Successfully retrieved {len(data['data']['concepts'])} concepts")
print(f"Failed to retrieve {len(data['data']['failed_concepts'])} concepts")
# Process successful concepts
for concept in data['data']['concepts']:
print(f"\n{concept['concept_name']}")
print(f" ID: {concept['concept_id']}")
print(f" Vocabulary: {concept['vocabulary_id']}")
print(f" Domain: {concept['domain_id']}")
if concept.get('synonyms'):
print(f" Synonyms: {len(concept['synonyms'])} found")
if concept.get('relationships'):
print(f" Relationships: {len(concept['relationships'])} found")
{
"success": true,
"data": {
"concepts": [
{
"concept_id": 320128,
"concept_name": "Essential hypertension",
"concept_code": "59621000",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": ["High blood pressure"],
"relationships": {
"parents": [
{
"relationship_id": "Is a",
"concept_id": 4182210,
"concept_name": "Hypertensive disorder"
}
],
"children": []
}
},
{
"concept_id": 201826,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "44054006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Type II diabetes mellitus",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "Adult-onset diabetes",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 73211009,
"target_concept_name": "Diabetes mellitus",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "outbound"
}
]
},
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"concept_code": "22298006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Heart attack",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "MI - Myocardial infarction",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 134057,
"target_concept_name": "Acute myocardial infarction",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "inbound"
}
]
}
],
"failed_concepts": [],
"summary": {
"total_requested": 3,
"successful_retrievals": 3,
"failed_retrievals": 0,
"vocabularies_represented": ["SNOMED"],
"domains_represented": ["Condition"]
}
},
"meta": {
"request_id": "req_batch_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2",
"query_time_ms": 45.2
}
}
Overview
Efficiently retrieve information for multiple concepts at once. This endpoint is optimized for bulk operations and reduces the number of API calls needed.Request Body
integer[]
required
Array of concept IDs to retrieve (max: 100)
boolean
default:"false"
Include relationships for all concepts
boolean
default:"false"
Include synonyms for all concepts
boolean
default:"false"
Include cross-vocabulary mappings for all concepts
string[]
Filter results to specific vocabularies
boolean
default:"false"
Only return standard concepts
curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847],
"include_relationships": true,
"include_synonyms": true
}'
import requests
payload = {
"concept_ids": [320128, 201826, 4329847],
"include_relationships": True,
"include_synonyms": True,
"include_mappings": False
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
concepts = response.json()
for concept in concepts['data']['concepts']:
print(f"{concept['concept_name']} ({concept['vocabulary_id']})")
import { OMOPHub } from '@omophub/omophub-node';
const client = new OMOPHub();
const { data } = await client.concepts.batch({
conceptIds: [320128, 201826, 4329847],
includeRelationships: true,
includeSynonyms: true,
});
console.log(`Retrieved ${data?.concepts.length} concepts`);
curl -X POST "https://api.omophub.com/v1/concepts/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"concept_ids": [320128, 201826, 4329847, 313217],
"vocabulary_filter": ["SNOMED", "ICD10CM"],
"include_mappings": true,
"standard_only": true
}'
import requests
# Large batch request with comprehensive data
concept_ids = [320128, 201826, 4329847, 313217, 435216]
payload = {
"concept_ids": concept_ids,
"include_relationships": True,
"include_synonyms": True,
"include_mappings": True,
"standard_only": True
}
response = requests.post(
"https://api.omophub.com/v1/concepts/batch",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
data = response.json()
print(f"Successfully retrieved {len(data['data']['concepts'])} concepts")
print(f"Failed to retrieve {len(data['data']['failed_concepts'])} concepts")
# Process successful concepts
for concept in data['data']['concepts']:
print(f"\n{concept['concept_name']}")
print(f" ID: {concept['concept_id']}")
print(f" Vocabulary: {concept['vocabulary_id']}")
print(f" Domain: {concept['domain_id']}")
if concept.get('synonyms'):
print(f" Synonyms: {len(concept['synonyms'])} found")
if concept.get('relationships'):
print(f" Relationships: {len(concept['relationships'])} found")
Response Fields
boolean
Whether the batch request completed.
object
Batch result.
array
Successfully retrieved concepts.
integer
OMOP concept identifier.
string
Primary concept name.
string
Vocabulary code.
string
Vocabulary identifier.
string
OMOP domain.
string
Concept class.
string | null
S, C, or null.string
Validity start date.
string
Validity end date.
string | null
Invalidity marker, or null.
array
Synonym strings when requested.
object
Parent and child hierarchy relationships when requested.
array
Requested IDs that could not be returned.
object
Requested/success/failed counts and represented vocabularies/domains.
object
Request metadata.
string
Request correlation ID.
string
Response timestamp.
string
Vocabulary release used.
number
Server query duration.
{
"success": true,
"data": {
"concepts": [
{
"concept_id": 320128,
"concept_name": "Essential hypertension",
"concept_code": "59621000",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": ["High blood pressure"],
"relationships": {
"parents": [
{
"relationship_id": "Is a",
"concept_id": 4182210,
"concept_name": "Hypertensive disorder"
}
],
"children": []
}
},
{
"concept_id": 201826,
"concept_name": "Type 2 diabetes mellitus",
"concept_code": "44054006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Type II diabetes mellitus",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "Adult-onset diabetes",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 73211009,
"target_concept_name": "Diabetes mellitus",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "outbound"
}
]
},
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"concept_code": "22298006",
"vocabulary_id": "SNOMED",
"domain_id": "Condition",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"valid_start_date": "1970-01-01",
"valid_end_date": "2099-12-31",
"invalid_reason": null,
"synonyms": [
{
"concept_synonym_name": "Heart attack",
"language_concept_id": 4180186,
"language_concept_name": "English"
},
{
"concept_synonym_name": "MI - Myocardial infarction",
"language_concept_id": 4180186,
"language_concept_name": "English"
}
],
"relationships": [
{
"relationship_id": "Is a",
"target_concept_id": 134057,
"target_concept_name": "Acute myocardial infarction",
"target_vocabulary_id": "SNOMED",
"relationship_direction": "inbound"
}
]
}
],
"failed_concepts": [],
"summary": {
"total_requested": 3,
"successful_retrievals": 3,
"failed_retrievals": 0,
"vocabularies_represented": ["SNOMED"],
"domains_represented": ["Condition"]
}
},
"meta": {
"request_id": "req_batch_123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2",
"query_time_ms": 45.2
}
}
Was this page helpful?