Use FHIR terminology services to expand a ValueSet using the $expand operation against LOINC and validate a code using $validate-code against a SNOMED CT value set

domain: hl7.org/fhir · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send GET [base]/ValueSet/[id]/$expand or POST with a ValueSet resource body to expand the value set; use the filter parameter to search for specific display terms and the count parameter to page results
  2. Parse the returned expansion.contains array to extract system, code, display, and any designation extensions for each concept in the expanded set
  3. Perform code validation with GET [base]/ValueSet/[id]/$validate-code?system=[uri]&code=[value]&display=[text] or POST with Parameters resource to verify a specific code is in the value set
  4. Interpret the result Parameters resource: the result parameter (boolean) indicates validity, and the message parameter provides human-readable validation feedback
  5. Use the $lookup operation on a CodeSystem (e.g., LOINC or RxNorm) to retrieve full concept details including properties, designations, and relationships for a given code

Known gotchas

Related routes

Expand a FHIR ValueSet using the $expand operation and validate a code using $validate-code
hl7.org/fhir · 5 steps · unrated
Expand a FHIR ValueSet using the terminology $expand operation to obtain a flat list of codes
hl7.org · 6 steps · unrated
Validate a LOINC code against a FHIR ValueSet using the terminology $validate-code operation
hl7.org/fhir/R4 · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans