curl -X GET "https://api.omophub.com/v1/search/semantic?query=heart%20attack&page_size=5" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"query": "heart attack",
"results": [
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"domain_id": "Condition",
"vocabulary_id": "SNOMED",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"concept_code": "22298006",
"similarity_score": 0.92,
"matched_text": "Myocardial infarction"
}
],
"total_results": 45,
"retrieval_truncated": false,
"totals_are_lower_bound": false,
"latency_ms": 28
},
"meta": {
"pagination": {
"page": 1,
"page_size": 20,
"total_items": 45,
"total_pages": 3,
"has_next": true,
"has_previous": false
},
"request_id": "req_sem_abc123"
}
}
Semantic Search
curl -X GET "https://api.omophub.com/v1/search/semantic?query=heart%20attack&page_size=5" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"query": "heart attack",
"results": [
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"domain_id": "Condition",
"vocabulary_id": "SNOMED",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"concept_code": "22298006",
"similarity_score": 0.92,
"matched_text": "Myocardial infarction"
}
],
"total_results": 45,
"retrieval_truncated": false,
"totals_are_lower_bound": false,
"latency_ms": 28
},
"meta": {
"pagination": {
"page": 1,
"page_size": 20,
"total_items": 45,
"total_pages": 3,
"has_next": true,
"has_previous": false
},
"request_id": "req_sem_abc123"
}
}
Overview
Find OMOP concepts related in meaning to an English-language query, even when the wording differs from the concept name. Results are suggestions for review, not automatic clinical coding decisions. Example queries:- “heart attack” finds “Myocardial infarction”
- “sugar diabetes” finds “Type 2 diabetes mellitus”
- “high blood pressure” finds “Essential hypertension”
- “belly pain” finds “Abdominal pain”
When to Use Semantic Search
| Need | Recommended endpoint |
|---|---|
| Related concepts from an English phrase | Semantic search |
| Exact name, synonym, or code lookup | Basic search |
| Convert a source concept to OMOP Standard | Concept mappings |
Query Parameters
English natural-language search query. After trimming, queries must contain
3-500 characters.
MI is also accepted as a case-insensitive abbreviation.
Other 1-2 character queries are rejected.Minimum similarity score (0.0-1.0). Higher values return fewer, closer
matches. This score is not a probability or clinical confidence value.
Filter to specific vocabularies (comma-separated). Vocabularies the API key
cannot access are omitted when at least one requested vocabulary is
accessible. A request containing only inaccessible vocabularies returns 403.
Examples:
Examples:
SNOMED, SNOMED,ICD10CM, SNOMED,ICD10CM,RxNormFilter to specific domains (comma-separated)
Examples:
Examples:
Condition, Drug, Condition,Drug,ProcedureFilter by standard concept status
Values:
Values:
S (Standard), C (Classification), N (Non-standard; stored as
null in OMOP)Filters can exclude relevant concepts. Apply them only when the expected
vocabulary, domain, or concept type is known.
curl -X GET "https://api.omophub.com/v1/search/semantic?query=heart%20attack&page_size=5" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"success": true,
"data": {
"query": "heart attack",
"results": [
{
"concept_id": 4329847,
"concept_name": "Myocardial infarction",
"domain_id": "Condition",
"vocabulary_id": "SNOMED",
"concept_class_id": "Clinical Finding",
"standard_concept": "S",
"concept_code": "22298006",
"similarity_score": 0.92,
"matched_text": "Myocardial infarction"
}
],
"total_results": 45,
"retrieval_truncated": false,
"totals_are_lower_bound": false,
"latency_ms": 28
},
"meta": {
"pagination": {
"page": 1,
"page_size": 20,
"total_items": 45,
"total_pages": 3,
"has_next": true,
"has_previous": false
},
"request_id": "req_sem_abc123"
}
}
Response Fields
Data Object
Number of matching concepts found. Check
totals_are_lower_bound to determine
whether the value is exact.Result Object
Primary name of the returned OMOP concept. The concept may be Standard,
Classification, or non-Standard; inspect
standard_concept.Relative match score from 0.0 to 1.0. Relevance remains primary, but within an
anchored score band of at most
0.0025 the API may prefer more clinically
useful concepts and demote non-clinical concept classes. Scores are therefore
not guaranteed to be strictly descending. The score is not a probability or
clinical confidence value.Pagination Object (in meta)
Approximate total number of matching items (lower bound). Use
has_next for
reliable pagination.When
totals_are_lower_bound is true, use has_next for pagination rather
than comparing page with total_pages.Usage Notes
- Review the returned concept, domain, vocabulary, and Standard status before using a result in a clinical workflow.
- Use
thresholdto narrow results, but do not interpret the score as clinical confidence. - Use concept mappings when you need to convert a selected source concept to an OMOP Standard concept.
Related Endpoints
- Basic Concept Search - Keyword-based search
- Similar Concepts - Find concepts similar to a given concept
- Autocomplete - Type-ahead suggestions
Use
/search/similar when you want to start from an existing concept_id.Was this page helpful?