Skip to main content
Version: v0.0.6

Function: interpretAbnormalFlag()

interpretAbnormalFlag(raw): AbnormalFlag

Interpret an R-record abnormal-flag field (field 7) against HL7 Table 0078.

Leading/trailing whitespace is ignored for the lookup but the raw text is preserved verbatim. An unrecognized flag yields { recognized: false, meaning: "undefined" }, surfaced, never dropped, and never "normal".

Parameters

raw

string

The verbatim field-7 text.

Returns

AbnormalFlag

The interpreted flag.

Example

import { interpretAbnormalFlag } from "@cosyte/astm";
interpretAbnormalFlag("U").meaning; // "significant-change-up"
interpretAbnormalFlag("ZZ").meaning; // "undefined" (never "normal")