@dotbase/hl7-v2-message
Version:
Parses HL7 v2.x messages into typed javascript objects and makes them easily accessable.
187 lines (186 loc) • 6.4 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Hl7Message_1 = tslib_1.__importDefault(require("../../../model/Hl7Message"));
/**
* Notification of appointment cancellation
*/
class SIU_S15_Message extends Hl7Message_1.default {
constructor() {
super(...arguments);
this.compounds = {
PATIENT: {
name: "PATIENT",
isOptional: true,
isRepeatable: true,
},
RESOURCES: {
name: "RESOURCES",
isOptional: false,
isRepeatable: true,
},
RESOURCES_SERVICE: {
name: "RESOURCES_SERVICE",
isOptional: true,
isRepeatable: true,
parentCompound: "RESOURCES",
},
RESOURCES_GENERAL_RESOURCE: {
name: "RESOURCES_GENERAL_RESOURCE",
isOptional: true,
isRepeatable: true,
parentCompound: "RESOURCES",
},
RESOURCES_LOCATION_RESOURCE: {
name: "RESOURCES_LOCATION_RESOURCE",
isOptional: true,
isRepeatable: true,
parentCompound: "RESOURCES",
},
RESOURCES_PERSONNEL_RESOURCE: {
name: "RESOURCES_PERSONNEL_RESOURCE",
isOptional: true,
isRepeatable: true,
parentCompound: "RESOURCES",
},
};
this.segments = {
MSH: {
name: "MSH",
type: "MSH",
isOptional: false,
isRepeatable: false,
value: []
},
SCH: {
name: "SCH",
type: "SCH",
isOptional: false,
isRepeatable: false,
value: []
},
NTE: {
name: "NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
value: []
},
PATIENT_PID: {
name: "PATIENT_PID",
type: "PID",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.PATIENT,
value: []
},
PATIENT_PV1: {
name: "PATIENT_PV1",
type: "PV1",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT,
value: []
},
PATIENT_PV2: {
name: "PATIENT_PV2",
type: "PV2",
isOptional: true,
isRepeatable: false,
parentCompound: this.compounds.PATIENT,
value: []
},
PATIENT_OBX: {
name: "PATIENT_OBX",
type: "OBX",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT,
value: []
},
PATIENT_DG1: {
name: "PATIENT_DG1",
type: "DG1",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.PATIENT,
value: []
},
RESOURCES_RGS: {
name: "RESOURCES_RGS",
type: "RGS",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.RESOURCES,
value: []
},
RESOURCES_SERVICE_AIS: {
name: "RESOURCES_SERVICE_AIS",
type: "AIS",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.RESOURCES_SERVICE,
value: []
},
RESOURCES_SERVICE_NTE: {
name: "RESOURCES_SERVICE_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.RESOURCES_SERVICE,
value: []
},
RESOURCES_GENERAL_RESOURCE_AIG: {
name: "RESOURCES_GENERAL_RESOURCE_AIG",
type: "AIG",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.RESOURCES_GENERAL_RESOURCE,
value: []
},
RESOURCES_GENERAL_RESOURCE_NTE: {
name: "RESOURCES_GENERAL_RESOURCE_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.RESOURCES_GENERAL_RESOURCE,
value: []
},
RESOURCES_LOCATION_RESOURCE_AIL: {
name: "RESOURCES_LOCATION_RESOURCE_AIL",
type: "AIL",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.RESOURCES_LOCATION_RESOURCE,
value: []
},
RESOURCES_LOCATION_RESOURCE_NTE: {
name: "RESOURCES_LOCATION_RESOURCE_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.RESOURCES_LOCATION_RESOURCE,
value: []
},
RESOURCES_PERSONNEL_RESOURCE_AIP: {
name: "RESOURCES_PERSONNEL_RESOURCE_AIP",
type: "AIP",
isOptional: false,
isRepeatable: false,
parentCompound: this.compounds.RESOURCES_PERSONNEL_RESOURCE,
value: []
},
RESOURCES_PERSONNEL_RESOURCE_NTE: {
name: "RESOURCES_PERSONNEL_RESOURCE_NTE",
type: "NTE",
isOptional: true,
isRepeatable: true,
parentCompound: this.compounds.RESOURCES_PERSONNEL_RESOURCE,
value: []
},
};
}
get name() { return 'SIU_S15'; }
get description() { return 'Notification of appointment cancellation'; }
}
exports.default = SIU_S15_Message;