This feature is in closed beta.Interested in this feature? Get in touch with your Customer Success Manager.
POST /v3/compendium/search searches the compendium in two modes:
canonical: find and rank canonical tests only.crosswalk: select one canonical test, then map it into per-lab candidates.
Request body
Validation rules
Canonical mode
queryis required and must be non-empty.loinc_set_hashis not allowed.limitmust be1..10.
Crosswalk mode
- Exactly one of
queryorloinc_set_hashis required. limitmust be1..20.include_relatedcontrols whether related canonical candidates are returned.
422.
Search modes
1) canonical
Purpose: return ranked canonical tests only.
Behavior:
- Returns:
selected_canonical: top candidate (ornull).canonical_candidates: ranked list (up tolimit).
per_labandrelatedare empty in this mode.
2) crosswalk
Purpose: choose one canonical test and expand it across labs.
Entry points:
- By text query: pick best canonical from query.
- By
loinc_set_hash: load canonical directly by hash.
- If no canonical is found, response has:
selected_canonical = nullcanonical_candidates = []- no per-lab candidates.
- If canonical is found, returns:
- one
selected_canonicaland same item incanonical_candidates per_lab: candidates grouped by lab slugrelated: related canonical tests (ifinclude_related=true)
- one
Canonical tests
“Canonical tests” are normalized, cross-lab test concepts. They are used to:- normalize query intent (
display_name,aliases,loinc_codes, etc.) - create one canonical anchor (
selected_canonical) - crosswalk into concrete provider/lab tests (
per_lab)
Output schema
confidenceis model/service-generated and relative to result quality.- Omitting
labsdefaults to all supported labs (labcorp,quest,bioreference,sonora_quest).