Type Alias: LivdLookup
LivdLookup = {
loinc:string;loincLongName?:string;status:"mapped"; } | {status:"unmapped"; } | {candidates: readonlystring[];status:"ambiguous"; }
The outcome of looking a vendor code up in a LivdCatalog. A distinct
value per safe disposition - a hit is mapped; a miss is unmapped; a code that
matched more than one distinct LOINC is ambiguous with the candidates
surfaced but none chosen. There is deliberately no "guessed" case.
Union Members
Type Literal
{ loinc: string; loincLongName?: string; status: "mapped"; }
Exactly one LOINC (one entry, or several entries that all agree on the same LOINC).
Type Literal
{ status: "unmapped"; }
No entry for this code - a miss. The code stays verbatim; no LOINC is invented.
Type Literal
{ candidates: readonly string[]; status: "ambiguous"; }
More than one distinct LOINC - surfaced for inspection, never resolved to one.