Variable: AMBIGUOUS_CODES
constAMBIGUOUS_CODES:object
Stable codes for the two ways a flat, stream-scoped accessor can fail to name a single answer. Renaming a code is a breaking change.
Type Declaration
ASTM_AMBIGUOUS_MULTI_MESSAGE
readonlyASTM_AMBIGUOUS_MULTI_MESSAGE:"ASTM_AMBIGUOUS_MULTI_MESSAGE"="ASTM_AMBIGUOUS_MULTI_MESSAGE"
The stream carries more than one H … L message, so a stream-wide answer spans patients.
ASTM_AMBIGUOUS_MULTI_PATIENT
readonlyASTM_AMBIGUOUS_MULTI_PATIENT:"ASTM_AMBIGUOUS_MULTI_PATIENT"="ASTM_AMBIGUOUS_MULTI_PATIENT"
The one message in the stream carries more than one P, so "the patient" is not determined.
Example
import { parseAstmRecords, patient, AMBIGUOUS_CODES, AstmAmbiguousStreamError } from "@cosyte/astm";
try {
patient(parseAstmRecords(raw));
} catch (err) {
if (err instanceof AstmAmbiguousStreamError) {
err.code === AMBIGUOUS_CODES.ASTM_AMBIGUOUS_MULTI_MESSAGE;
}
}