@dotbase/hl7-v2-message
Version:
Parses HL7 v2.x messages into typed javascript objects and makes them easily accessable.
121 lines (120 loc) • 4.55 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Hl7Message_1 = tslib_1.__importDefault(require("../../../model/Hl7Message"));
/**
* Unsolicited transmission of an observation message
*/
class ORU_R01_Message extends Hl7Message_1.default {
constructor() {
super(...arguments);
this.compounds = {
PATIENT_RESULT: {
name: "PATIENT_RESULT",
isOptional: false,
isRepeatable: true,
},
PATIENT_RESULT_PATIENT: {
name: "PATIENT_RESULT_PATIENT",
isOptional: true,
isRepeatable: false,
parentCompound: "PATIENT_RESULT",
},
PATIENT_RESULT_ORDER_OBSERVATION: {
name: "PATIENT_RESULT_ORDER_OBSERVATION",
isOptional: false,
isRepeatable: true,
parentCompound: "PATIENT_RESULT",
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION",
isOptional: false,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_ORDER_OBSERVATION",
},
};
this.segments = {
MSH: {
name: "MSH",
type: "MSH",
isOptional: false,
isRepeatable: false,
value: []
},
PATIENT_RESULT_PATIENT_PID: {
name: "PATIENT_RESULT_PATIENT_PID",
type: "PID",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT,
value: []
},
PATIENT_RESULT_PATIENT_NTE: {
name: "PATIENT_RESULT_PATIENT_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT,
value: []
},
PATIENT_RESULT_PATIENT_PV1: {
name: "PATIENT_RESULT_PATIENT_PV1",
type: "PV1",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_ORC: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_ORC",
type: "ORC",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_OBR: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBR",
type: "OBR",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_NTE: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_OBX: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_OBX",
type: "OBX",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_NTE: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION,
value: []
},
DSC: {
name: "DSC",
type: "DSC",
isOptional: true,
isRepeatable: false,
value: []
},
};
}
get name() { return 'ORU_R01'; }
get description() { return 'Unsolicited transmission of an observation message'; }
}
exports.default = ORU_R01_Message;