Interface HL7_2_1_MSH

HL7 2.1 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_1_MSH = {
msh_9: "ADT",
msh_11_1: "D",
}

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.

interface HL7_2_1_MSH {
    msh_10?: string;
    msh_11: "D" | "P" | "T";
    msh_9: string;
}

Properties

Properties

msh_10?: string

Message Control ID

This ID is unique to the message being sent so the client can track to see if they get a response back from the server that this particular message was successful. Max 20 characters.

1.0.0

Random 20 Character String randomString if this is set to nothing or not included.

msh_11: "D" | "P" | "T"

Processing ID

1.0.0

msh_9: string

Message Code

1.0.0