Skip to main content
Version: v0.0.3

Function: alternateCodingSystemOf()

alternateCodingSystemOf(coded): CodingSystemInfo | undefined

Provenance of a coded element's alternate coding system (CWE.6 / CE.6). Returns undefined when the element claims no alternate system. Useful for dual-coded fields (e.g. a problem carrying both SNOMED CT and ICD-10), where assuming a single coding system would be unsafe.

Parameters

coded

CodedSystemFields

Returns

CodingSystemInfo | undefined

Example

import { alternateCodingSystemOf } from "@cosyte/hl7";
const alt = alternateCodingSystemOf(dg.code);
if (alt) console.log("also coded in", alt.name ?? alt.claimed);