Interface: ResultStatus
A modeled result status. The three booleans are the safety surface a consumer reads instead of string-matching the code:
isActiveFinalistrueonly for a plainF(final). It isfalsefor a correction (C), a cancellation (X), a preliminary/partial/pending result, an absent status, and an unrecognized one - so a superseded or cancelled result can never read as current/final.supersedesistrueforC- this value replaces a previously transmitted one.cancelledistrueforX- the result cannot be done / was cancelled.
Example
import { interpretResultStatus } from "@cosyte/astm";
interpretResultStatus("C").isActiveFinal; // false (a correction is not active-final)
interpretResultStatus("X").cancelled; // true
interpretResultStatus(undefined).meaning; // "unspecified" (never "final")
Properties
cancelled
readonlycancelled:boolean
true for X - the result cannot be done / was cancelled.
code?
readonlyoptionalcode?:ResultStatusCode
The recognized status code, present only when the raw text is a known status.
isActiveFinal
readonlyisActiveFinal:boolean
true only for a plain F (final) - never for C, X, absent, or unrecognized.
meaning
readonlymeaning:ResultStatusMeaning
The modeled meaning; "unspecified" when absent, "undefined" when unrecognized.
raw?
readonlyoptionalraw?:string
The verbatim field text, present only when field 9 carried a value.
recognized
readonlyrecognized:boolean
Whether the raw text matched a recognized status letter.
supersedes
readonlysupersedes:boolean
true for C - this value supersedes a previously transmitted result.