Skip to main content
GET
/
v1
/
concepts
/
search
/
autocomplete
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=diab&page_size=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "suggestions": [
    {
      "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",
      "score": 0.95
    },
    {
      "concept_id": 201254,
      "concept_name": "Type 1 diabetes mellitus",
      "concept_code": "46635009",
      "vocabulary_id": "SNOMED",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "score": 0.92
    },
    {
      "concept_id": 443238,
      "concept_name": "Diabetic retinopathy",
      "concept_code": "4855003",
      "vocabulary_id": "SNOMED",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "score": 0.88
    }
  ],
  "meta": {
    "query": "diab",
    "algorithm": "default",
    "total_suggestions": 3,
    "vocab_release": "2025.2"
  }
}

Overview

This endpoint provides autocomplete functionality for medical terminology searches. It offers real-time suggestions as users type, helping them find the correct medical terms quickly. The endpoint supports both standard prefix matching and phonetic (Soundex) matching for handling common misspellings.

Query Parameters

query
string
required
Search query for autocompletion (minimum 2 characters, maximum 100)
vocabularies
string
Filter suggestions to specific vocabularies (comma-separated)
Examples: SNOMED, ICD10CM,LOINC, RXNORM
domains
string
Filter suggestions to specific domains (comma-separated)
Examples: Condition, Drug,Procedure
page_size
integer
default:"10"
Number of suggestions to return (1-20)
algorithm
string
default:"default"
Matching algorithm to use
Options: default, soundex
Use soundex for phonetic matching to handle misspellings
vocab_release
string
Specific vocabulary release version (defaults to latest)

Response

suggestions
array
Array of autocomplete suggestions with concept details
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=diab&page_size=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "suggestions": [
    {
      "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",
      "score": 0.95
    },
    {
      "concept_id": 201254,
      "concept_name": "Type 1 diabetes mellitus",
      "concept_code": "46635009",
      "vocabulary_id": "SNOMED",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "score": 0.92
    },
    {
      "concept_id": 443238,
      "concept_name": "Diabetic retinopathy",
      "concept_code": "4855003",
      "vocabulary_id": "SNOMED",
      "domain_id": "Condition",
      "concept_class_id": "Clinical Finding",
      "standard_concept": "S",
      "score": 0.88
    }
  ],
  "meta": {
    "query": "diab",
    "algorithm": "default",
    "total_suggestions": 3,
    "vocab_release": "2025.2"
  }
}

Usage Examples

Basic Autocomplete

Get suggestions for a partial query:
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=asth&page_size=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Vocabulary-Filtered Autocomplete

Focus suggestions on specific vocabularies:
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=hyper&vocabularies=SNOMED,ICD10CM&page_size=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Domain-Filtered Autocomplete

Get suggestions only for specific domains:
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=aspir&domains=Drug&page_size=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Phonetic Matching (Soundex)

Use phonetic matching to handle misspellings:
curl -X GET "https://api.omophub.com/v1/concepts/search/autocomplete?query=diabetis&algorithm=soundex&page_size=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
This will find “diabetes” even when spelled incorrectly as “diabetis”.

Algorithms

Default Algorithm

  • Standard prefix matching
  • Fast and accurate for correctly spelled queries
  • Best for real-time autocomplete UX

Soundex Algorithm

  • Phonetic matching based on pronunciation
  • Handles common misspellings and typos
  • Useful for voice-to-text input or uncertain spellings
  • Example: “noomonia” matches “pneumonia”

Performance Notes

  • Minimum query length: 2 characters required
  • Response time: Optimized for real-time use (<100ms typical)
  • Caching: Results are cached for 24 hours per vocabulary release
  • Rate limiting: Standard rate limits apply