Interface: CodeValidationResult
The outcome of TerminologyAdapter.validateCode, modeled on the FHIR
$validate-code operation's out-parameters. result is the verdict: true
when the adapter confirms the code is a valid, active member of its system;
false when it confirms the code is not (unknown / retired / not a
member). display and message are advisory only, the parser never
applies display back onto the document (that would be a silent coercion);
both are surfaced to the consumer, never woven into a PHI-free warning message.
Example
import type { CodeValidationResult } from "@cosyte/ccda";
const invalid: CodeValidationResult = { result: false, message: "not in SNOMED CT US Edition" };
Properties
display?
readonlyoptionaldisplay?:string
The authoritative display the adapter knows for the code, when it has one. Advisory, never applied.
message?
readonlyoptionalmessage?:string
A human-readable reason (e.g. why a code is invalid). Advisory, never placed in a warning.
result
readonlyresult:boolean
true when the code is a valid member of its system; false when it is not.