UNPKG

@dotbase/hl7-v2-message

Version:

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

100 lines (99 loc) 3.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const Hl7Message_1 = tslib_1.__importDefault(require("../../../model/Hl7Message")); /** * Register a patient on a clinical trial */ class CRM_C01_Message extends Hl7Message_1.default { constructor() { super(...arguments); this.compounds = { PATIENT: { name: "PATIENT", isOptional: false, isRepeatable: true, }, PATIENT_PATIENT_VISIT: { name: "PATIENT_PATIENT_VISIT", isOptional: true, isRepeatable: false, parentCompound: "PATIENT", }, }; 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_PID: { name: "PATIENT_PID", type: "PID", isOptional: false, isRepeatable: false, parentCompound: this.compounds.PATIENT, value: [] }, PATIENT_PRT: { name: "PATIENT_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.PATIENT, value: [] }, PATIENT_PATIENT_VISIT_PV1: { name: "PATIENT_PATIENT_VISIT_PV1", type: "PV1", isOptional: false, isRepeatable: false, parentCompound: this.compounds.PATIENT_PATIENT_VISIT, value: [] }, PATIENT_PATIENT_VISIT_PRT: { name: "PATIENT_PATIENT_VISIT_PRT", type: "PRT", isOptional: true, isRepeatable: true, parentCompound: this.compounds.PATIENT_PATIENT_VISIT, value: [] }, PATIENT_CSR: { name: "PATIENT_CSR", type: "CSR", isOptional: false, isRepeatable: false, parentCompound: this.compounds.PATIENT, value: [] }, PATIENT_CSP: { name: "PATIENT_CSP", type: "CSP", isOptional: true, isRepeatable: true, parentCompound: this.compounds.PATIENT, value: [] }, }; } get name() { return 'CRM_C01'; } get description() { return 'Register a patient on a clinical trial'; } } exports.default = CRM_C01_Message;