Skip to main content
Version: v0.0.6

Interface: AstmStreamMessage

One HL message inside a parsed stream, with its own records and nothing else.

This is the unit the flat extractors were always assumed to be reading. AstmMessage models the whole stream; this models a message within it.

Properties

comments

readonly comments: readonly CommentRecord[]

Every C (comment) record in this message, in wire order.


delimiters

readonly delimiters: Delimiters

The delimiter set in force for this message: the header's own resolved set, which is the set its records were actually read with. When a later header's declaration was unusable, this is the set that stayed in force, never a guessed one.


readonly header: HeaderRecord

This message's header record.


index

readonly index: number

0-based ordinal of this message within the stream.


orders

readonly orders: readonly OrderRecord[]

Every O (order) record in this message, in wire order.


patient

readonly patient: PatientRecord | undefined

This message's patient, but only when the message determines one: the single P when it carries exactly one, and undefined when it carries none or several. patients.length distinguishes those two cases; there is no third meaning.

A message carrying several patients is not answered with the first one, because "the first P" is precisely the guess that files a result against the wrong person.


patients

readonly patients: readonly PatientRecord[]

Every P record in this message, in wire order (usually zero or one).


queries

readonly queries: readonly QueryRecord[]

Every Q (request-information) record in this message, in wire order.

For this message's host-query classification, call classifyMessage(m.records). The classification on the parsed model is folded over the whole stream, so it is not per-message and is not mirrored here; deriving it from a message's own records is.


records

readonly records: readonly AstmRecord[]

Every record of this message in wire order, the header first.


results

readonly results: readonly ResultRecord[]

Every R (result) record in this message, in wire order.