Skip to main content
Version: v0.0.4

Interface: ResultRecord

The R (result) record - the value itself.

The raw safety-critical fields (value, units, referenceRange, abnormalFlags, resultStatus) are always surfaced exactly as received. The modeled, fail-safe semantics sit alongside them: flag (Table 0078, undefined never coerced to normal), status (a C/X never reads as active-final; an absent status is unspecified, never final), and range (open/closed bounds surfaced verbatim, never fabricated). The raw strings and the modeled views coexist - nothing is collapsed or reconciled.

Extends

  • RecordBase

Properties

abnormalFlags?

readonly optional abnormalFlags?: string

Field 7 - abnormal flags, surfaced raw (HL7 Table 0078 values).


completedAt?

readonly optional completedAt?: AstmDate

Field 13 - test completed timestamp.


fields

readonly fields: readonly AstmField[]

The record's fields. fields[0] is the type-letter field; data fields are 1-indexed after it.

Inherited from

RecordBase.fields


flag?

readonly optional flag?: AbnormalFlag

Field 7 - the abnormal flag interpreted against HL7 Table 0078, present only when the field carried a value. An unrecognized flag is { recognized: false, meaning: "undefined" } - surfaced, never dropped, and never coerced to normal.


instrument?

readonly optional instrument?: string

Field 14 - instrument identifier.


operator?

readonly optional operator?: string

Field 11 - operator.


range?

readonly optional range?: ReferenceRange

Field 6 - the reference range parsed into low/high (or open-ended) bounds, present only when the field carried a value. An unparseable range is kind: "unparsed" with the raw text preserved and no bound fabricated. Bounds are verbatim numeric text, never coerced to floats.


recordIndex

readonly recordIndex: number

0-based ordinal of the record within the message.

Inherited from

RecordBase.recordIndex


referenceRange?

readonly optional referenceRange?: string

Field 6 - reference range, surfaced raw.


resultStatus?

readonly optional resultStatus?: string

Field 9 - result status, surfaced raw (F/C/X/…).


seq?

readonly optional seq?: string

Field 2 - sequence number.


startedAt?

readonly optional startedAt?: AstmDate

Field 12 - test started timestamp.


status

readonly status: ResultStatus

Field 9 - the modeled result status. Always present (an absent field yields a typed unspecified, never assumed final), so status.isActiveFinal is always a reliable boolean: it is true only for a plain F, and false for a correction (C), a cancellation (X), a partial/preliminary/pending, an absent, or an unrecognized status.


type

readonly type: "R"

The record's raw type letter.

Overrides

RecordBase.type


units?

readonly optional units?: string

Field 5 - units (vendor free text; a missing unit is not defaulted).


universalTestId?

readonly optional universalTestId?: UniversalTestId

Field 3 - Universal Test ID (local code in component 4 is the primary identifier).


value?

readonly optional value?: string

Field 4 - the measured value. In the ordinary single-component case this is the decoded scalar. When the value field carried an unescaped component delimiter (an ambiguity), this is the full raw field text - never a truncated component - and ResultRecord.valueComponents plus an ASTM_RECORD_AMBIGUOUS_VALUE_SPLIT warning are also present.


valueComponents?

readonly optional valueComponents?: readonly string[]

Field 4 split into components, present only when the value field carried an unescaped component delimiter - i.e. it read as more than one component. Surfaced alongside the full raw value (and a warning) so an ambiguous split is visible, never resolved silently.