UNPKG

@dotbase/hl7-v2-message

Version:

Parses HL7 v2.x messages into typed javascript objects and makes them easily accessable.

380 lines (379 loc) 13.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const Hl7Message_1 = tslib_1.__importDefault(require("../../../model/Hl7Message")); /** * Pharmacy Dispense Message (Response) */ class RSP_K31_Message extends Hl7Message_1.default { constructor() { super(...arguments); this.compounds = { RESPONSE: { name: "RESPONSE", isOptional: false, isRepeatable: true, }, RESPONSE_PATIENT: { name: "RESPONSE_PATIENT", isOptional: true, isRepeatable: false, parentCompound: "RESPONSE", }, RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS: { name: "RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS", isOptional: true, isRepeatable: false, parentCompound: "RESPONSE_PATIENT", }, RESPONSE_PATIENT_PATIENT_VISIT: { name: "RESPONSE_PATIENT_PATIENT_VISIT", isOptional: true, isRepeatable: false, parentCompound: "RESPONSE_PATIENT", }, RESPONSE_ORDER: { name: "RESPONSE_ORDER", isOptional: false, isRepeatable: true, parentCompound: "RESPONSE", }, RESPONSE_ORDER_TIMING: { name: "RESPONSE_ORDER_TIMING", isOptional: true, isRepeatable: true, parentCompound: "RESPONSE_ORDER", }, RESPONSE_ORDER_ORDER_DETAIL: { name: "RESPONSE_ORDER_ORDER_DETAIL", isOptional: true, isRepeatable: false, parentCompound: "RESPONSE_ORDER", }, RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS: { name: "RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS", isOptional: true, isRepeatable: true, parentCompound: "RESPONSE_ORDER_ORDER_DETAIL", }, RESPONSE_ORDER_ENCODING: { name: "RESPONSE_ORDER_ENCODING", isOptional: true, isRepeatable: false, parentCompound: "RESPONSE_ORDER", }, RESPONSE_ORDER_ENCODING_TIMING_ENCODED: { name: "RESPONSE_ORDER_ENCODING_TIMING_ENCODED", isOptional: false, isRepeatable: true, parentCompound: "RESPONSE_ORDER_ENCODING", }, RESPONSE_ORDER_OBSERVATION: { name: "RESPONSE_ORDER_OBSERVATION", isOptional: true, isRepeatable: true, parentCompound: "RESPONSE_ORDER", }, }; this.segments = { MSH: { name: "MSH", type: "MSH", isOptional: false, isRepeatable: false, value: [] }, MSA: { name: "MSA", type: "MSA", isOptional: false, isRepeatable: false, value: [] }, ERR: { name: "ERR", type: "ERR", isOptional: true, isRepeatable: true, value: [] }, SFT: { name: "SFT", type: "SFT", isOptional: true, isRepeatable: true, value: [] }, UAC: { name: "UAC", type: "UAC", isOptional: true, isRepeatable: false, value: [] }, QAK: { name: "QAK", type: "QAK", isOptional: false, isRepeatable: false, value: [] }, QPD: { name: "QPD", type: "QPD", isOptional: false, isRepeatable: false, value: [] }, RCP: { name: "RCP", type: "RCP", isOptional: false, isRepeatable: false, value: [] }, RESPONSE_PATIENT_PID: { name: "RESPONSE_PATIENT_PID", type: "PID", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_PATIENT, value: [] }, RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS_PD1: { name: "RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS_PD1", type: "PD1", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS, value: [] }, RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS_PRT: { name: "RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_PATIENT_ADDITIONAL_DEMOGRAPHICS, value: [] }, RESPONSE_PATIENT_NTE: { name: "RESPONSE_PATIENT_NTE", type: "NTE", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_PATIENT, value: [] }, RESPONSE_PATIENT_AL1: { name: "RESPONSE_PATIENT_AL1", type: "AL1", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_PATIENT, value: [] }, RESPONSE_PATIENT_PATIENT_VISIT_PV1: { name: "RESPONSE_PATIENT_PATIENT_VISIT_PV1", type: "PV1", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_PATIENT_PATIENT_VISIT, value: [] }, RESPONSE_PATIENT_PATIENT_VISIT_PV2: { name: "RESPONSE_PATIENT_PATIENT_VISIT_PV2", type: "PV2", isOptional: true, isRepeatable: false, parentCompound: this.compounds.RESPONSE_PATIENT_PATIENT_VISIT, value: [] }, RESPONSE_PATIENT_PATIENT_VISIT_PRT: { name: "RESPONSE_PATIENT_PATIENT_VISIT_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_PATIENT_PATIENT_VISIT, value: [] }, RESPONSE_ORDER_ORC: { name: "RESPONSE_ORDER_ORC", type: "ORC", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER, value: [] }, RESPONSE_ORDER_TIMING_TQ1: { name: "RESPONSE_ORDER_TIMING_TQ1", type: "TQ1", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_TIMING, value: [] }, RESPONSE_ORDER_TIMING_TQ2: { name: "RESPONSE_ORDER_TIMING_TQ2", type: "TQ2", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_TIMING, value: [] }, RESPONSE_ORDER_ORDER_DETAIL_RXO: { name: "RESPONSE_ORDER_ORDER_DETAIL_RXO", type: "RXO", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_ORDER_DETAIL, value: [] }, RESPONSE_ORDER_ORDER_DETAIL_NTE: { name: "RESPONSE_ORDER_ORDER_DETAIL_NTE", type: "NTE", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ORDER_DETAIL, value: [] }, RESPONSE_ORDER_ORDER_DETAIL_RXR: { name: "RESPONSE_ORDER_ORDER_DETAIL_RXR", type: "RXR", isOptional: false, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ORDER_DETAIL, value: [] }, RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS_RXC: { name: "RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS_RXC", type: "RXC", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS, value: [] }, RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS_NTE: { name: "RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS_NTE", type: "NTE", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ORDER_DETAIL_COMPONENTS, value: [] }, RESPONSE_ORDER_ENCODING_RXE: { name: "RESPONSE_ORDER_ENCODING_RXE", type: "RXE", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING, value: [] }, RESPONSE_ORDER_ENCODING_NTE: { name: "RESPONSE_ORDER_ENCODING_NTE", type: "NTE", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING, value: [] }, RESPONSE_ORDER_ENCODING_TIMING_ENCODED_TQ1: { name: "RESPONSE_ORDER_ENCODING_TIMING_ENCODED_TQ1", type: "TQ1", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING_TIMING_ENCODED, value: [] }, RESPONSE_ORDER_ENCODING_TIMING_ENCODED_TQ2: { name: "RESPONSE_ORDER_ENCODING_TIMING_ENCODED_TQ2", type: "TQ2", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING_TIMING_ENCODED, value: [] }, RESPONSE_ORDER_ENCODING_RXR: { name: "RESPONSE_ORDER_ENCODING_RXR", type: "RXR", isOptional: false, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING, value: [] }, RESPONSE_ORDER_ENCODING_RXC: { name: "RESPONSE_ORDER_ENCODING_RXC", type: "RXC", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_ENCODING, value: [] }, RESPONSE_ORDER_RXD: { name: "RESPONSE_ORDER_RXD", type: "RXD", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER, value: [] }, RESPONSE_ORDER_PRT: { name: "RESPONSE_ORDER_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER, value: [] }, RESPONSE_ORDER_RXR: { name: "RESPONSE_ORDER_RXR", type: "RXR", isOptional: false, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER, value: [] }, RESPONSE_ORDER_RXC: { name: "RESPONSE_ORDER_RXC", type: "RXC", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER, value: [] }, RESPONSE_ORDER_OBSERVATION_OBX: { name: "RESPONSE_ORDER_OBSERVATION_OBX", type: "OBX", isOptional: false, isRepeatable: false, parentCompound: this.compounds.RESPONSE_ORDER_OBSERVATION, value: [] }, RESPONSE_ORDER_OBSERVATION_PRT: { name: "RESPONSE_ORDER_OBSERVATION_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_OBSERVATION, value: [] }, RESPONSE_ORDER_OBSERVATION_NTE: { name: "RESPONSE_ORDER_OBSERVATION_NTE", type: "NTE", isOptional: true, isRepeatable: true, parentCompound: this.compounds.RESPONSE_ORDER_OBSERVATION, value: [] }, DSC: { name: "DSC", type: "DSC", isOptional: true, isRepeatable: false, value: [] }, }; } get name() { return 'RSP_K31'; } get description() { return 'Pharmacy Dispense Message (Response)'; } } exports.default = RSP_K31_Message;