Skip to main content

core.hl7context

Home > @medplum/core > Hl7Context

Hl7Context class

The Hl7Context class represents the parsing context for an HL7 message.

MSH-1: https://hl7-definition.caristix.com/v2/HL7v2.6/Fields/MSH.1

MSH-2: https://hl7-definition.caristix.com/v2/HL7v2.6/Fields/MSH.2

See this tutorial on MSH, and why it's a bad idea to use anything other than the default values: https://www.hl7soup.com/HL7TutorialMSH.html

Signature:

export declare class Hl7Context 

Constructors

ConstructorModifiersDescription
(constructor)(segmentSeparator, fieldSeparator, componentSeparator, repetitionSeparator, escapeCharacter, subcomponentSeparator)Constructs a new instance of the Hl7Context class

Properties

PropertyModifiersTypeDescription
componentSeparatorreadonlystring
escapeCharacterreadonlystring
fieldSeparatorreadonlystring
repetitionSeparatorreadonlystring
segmentSeparatorreadonlystring
subcomponentSeparatorreadonlystring

Methods

MethodModifiersDescription
getMsh1()Returns the MSH-1 field value based on the configured separators.
getMsh2()Returns the MSH-2 field value based on the configured separators.