Skip to main content
Version: v0.0.6

Interface: CommentRecord

The C (comment) record: free-text context attached to a parent record.

A comment is attached by position to the immediately-preceding H/P/O/R record (CommentRecord.parentIndex); consecutive comments share that parent. Fail-safe: a comment with no valid preceding parent is an orphan: it is attached to the message root (CommentRecord.attachedToRoot true) and a value-free ASTM_RECORD_ORPHAN_COMMENT warning fires, never silently dropped, so a comment carrying (e.g.) "QC / non-compliant" context can never float away unnoticed.

Extends

  • RecordBase

Properties

attachedToRoot

readonly attachedToRoot: boolean

true when no valid parent preceded: the comment is attached to the message root (and warned).


commentType?

readonly optional commentType?: string

Field 5: comment type code, surfaced verbatim. [OSS-derived]: I (instrument) is the only value seen in the permissively-licensed real transcripts; other values (e.g. G/T/P) are defined only in the paywalled CLSI LIS02-A2 and are not interpreted here: the raw code is surfaced, never mapped to a guessed meaning.


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


parentIndex?

readonly optional parentIndex?: number

The recordIndex of the H/P/O/R record this comment is attached to, or undefined when the comment is an orphan attached to the message root (see CommentRecord.attachedToRoot).


recordIndex

readonly recordIndex: number

0-based ordinal of the record within the message.

Inherited from

RecordBase.recordIndex


seq?

readonly optional seq?: string

Field 2: sequence number.


source?

readonly optional source?: string

Field 3: comment source (who/what produced it), surfaced verbatim.


text?

readonly optional text?: string

Field 4: the comment text, surfaced as the full field text (all components), never truncated to the first component. The component structure is in CommentRecord.textComponents.


textComponents?

readonly optional textComponents?: readonly string[]

Field 4: the comment text split into its decoded components (comment text is component-capable; multiple components are a normal structured comment, not an ambiguity). Present only when the field carried more than one component.


type

readonly type: "C"

The record's raw type letter.

Overrides

RecordBase.type