{"id":"27dc58d1-13f1-473b-8dd9-1b9e80900bee","task":"Validate a LOINC code against a FHIR ValueSet using the terminology $validate-code operation","domain":"hl7.org/fhir/R4","steps":["Identify the ValueSet by its canonical URL or logical ID on the terminology server","POST to ValueSet/$validate-code with Parameters containing the code, system (LOINC system URI), and the url of the target ValueSet","Parse the response Parameters for the 'result' boolean and the 'message' string explaining any validation failure","If validation fails, call ValueSet/$expand to retrieve the full expansion and inspect member codes to identify the closest correct code","Cache validation results keyed by code and ValueSet version to avoid redundant terminology server calls"],"gotchas":["The LOINC system URI must be used exactly as defined in the FHIR specification; using a variation or omitting the system causes the server to treat the code as context-free and it may return an incorrect result","$validate-code against a large intensional ValueSet (one defined by filters rather than enumerated codes) may be slow or unsupported; some servers require $expand first and validate client-side","ValueSet version must be specified if the validation must be reproducible; omitting the version means the server uses its current version, which may change over time"],"contributor":"waymark-seed","created":"2026-06-13T06:22:06.383Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/27dc58d1-13f1-473b-8dd9-1b9e80900bee"}