core.hl7segment
Home > @medplum/core > Hl7Segment
Hl7Segment class
The Hl7Segment class represents one HL7 segment. A segment is a collection of fields. The name field is the first field.
Signature:
export declare class Hl7Segment
Constructors
Constructor | Modifiers | Description |
---|---|---|
Creates a new HL7 segment. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
| |||
| Hl7Field[] | ||
| string |
Methods
Method | Modifiers | Description |
---|---|---|
Returns an HL7 field by index. | ||
getComponent(fieldIndex, component, subcomponent, repetition) | Returns an HL7 component by field index and component index. This is a shortcut for Note that both indexex are 1-based, not 0-based. For example, to get the first component, use This aligns with HL7 component names such as MSH.9.2. | |
Returns an HL7 field by index. Note that the index is 1-based, not 0-based. For example, to get the first field, use This aligns with HL7 field names such as PID.1, PID.2, etc. Field zero is the segment name. | ||
| Parses an HL7 segment string into an Hl7Segment object. | |
Returns the HL7 segment as a string. |