Type Alias HL7_2_6_MSH

HL7_2_6_MSH: HL7_2_5_1_MSH

HL7 2.6 MSH Specification

Only the required ones are listed below for typescript validation to pass.

1.0.0

To make it easier on having to fill this out each time, you may do this in your code:

// Make this a constant in your application.
const MSH_HEADER: HL7_2_6_MSH = {
msh_9_1: "ADT",
msh_9_2: "A01",
msh_11_1: "D",
msh_11_2: "A",
}

MSH.7 (Date Time) and MSH.12 (HL7 Spec) are filled in automatically at the time of creation. and when you create your Message class:

const message = new Message({ ...MSH_HEADER, msh_10: 'unique id' })

so this way your code is much neater.