@dotbase/hl7-v2-message
Version:
Parses HL7 v2.x messages into typed javascript objects and makes them easily accessable.
301 lines (300 loc) • 12.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Hl7Message_1 = tslib_1.__importDefault(require("../../../model/Hl7Message"));
/**
* 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_PATIENT_PATIENT_OBSERVATION: {
name: "PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION",
isOptional: true,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_PATIENT",
},
PATIENT_RESULT_PATIENT_VISIT: {
name: "PATIENT_RESULT_PATIENT_VISIT",
isOptional: true,
isRepeatable: false,
parentCompound: "PATIENT_RESULT_PATIENT",
},
PATIENT_RESULT_ORDER_OBSERVATION: {
name: "PATIENT_RESULT_ORDER_OBSERVATION",
isOptional: false,
isRepeatable: true,
parentCompound: "PATIENT_RESULT",
},
PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY",
isOptional: true,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_ORDER_OBSERVATION",
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION",
isOptional: true,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_ORDER_OBSERVATION",
},
PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN",
isOptional: true,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_ORDER_OBSERVATION",
},
PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION",
isOptional: true,
isRepeatable: true,
parentCompound: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN",
},
};
this.segments = {
MSH: {
name: "MSH",
type: "MSH",
isOptional: false,
isRepeatable: false,
value: []
},
SFT: {
name: "SFT",
type: "SFT",
isOptional: true,
isRepeatable: true,
value: []
},
UAC: {
name: "UAC",
type: "UAC",
isOptional: true,
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_PD1: {
name: "PATIENT_RESULT_PATIENT_PD1",
type: "PD1",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT,
value: []
},
PATIENT_RESULT_PATIENT_PRT: {
name: "PATIENT_RESULT_PATIENT_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
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_NK1: {
name: "PATIENT_RESULT_PATIENT_NK1",
type: "NK1",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT,
value: []
},
PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION_OBX: {
name: "PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION_OBX",
type: "OBX",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION,
value: []
},
PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION_PRT: {
name: "PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT_PATIENT_OBSERVATION,
value: []
},
PATIENT_RESULT_PATIENT_VISIT_PV1: {
name: "PATIENT_RESULT_PATIENT_VISIT_PV1",
type: "PV1",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT_VISIT,
value: []
},
PATIENT_RESULT_PATIENT_VISIT_PV2: {
name: "PATIENT_RESULT_PATIENT_VISIT_PV2",
type: "PV2",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT_VISIT,
value: []
},
PATIENT_RESULT_PATIENT_VISIT_PRT: {
name: "PATIENT_RESULT_PATIENT_VISIT_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_PATIENT_VISIT,
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_PRT: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY_TQ1: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY_TQ1",
type: "TQ1",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY_TQ2: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY_TQ2",
type: "TQ2",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_TIMING_QTY,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_CTD: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_CTD",
type: "CTD",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_OBX: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_OBX",
type: "OBX",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_PRT: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_OBSERVATION_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
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: []
},
PATIENT_RESULT_ORDER_OBSERVATION_FT1: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_FT1",
type: "FT1",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_CTI: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_CTI",
type: "CTI",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPM: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPM",
type: "SPM",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION_OBX: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION_OBX",
type: "OBX",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION,
value: []
},
PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION_PRT: {
name: "PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION_PRT",
type: "PRT",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT_RESULT_ORDER_OBSERVATION_SPECIMEN_SPECIMEN_OBSERVATION,
value: []
},
DSC: {
name: "DSC",
type: "DSC",
isOptional: true,
isRepeatable: false,
value: []
},
};
}
get name() { return 'ORU_R01'; }
get description() { return 'Observation Message'; }
}
exports.default = ORU_R01_Message;