3 var fieldLevel = require('../fieldLevel');
4 var leafLevel = require('../leafLevel');
5 var condition = require("../condition");
6 var contentModifier = require("../contentModifier");
8 var sharedEntryLevel = require("./sharedEntryLevel");
10 var key = contentModifier.key;
11 var required = contentModifier.required;
12 var dataKey = contentModifier.dataKey;
14 exports.procedureActivityAct = {
18 moodCode: "INT" // not constant in the specification
21 fieldLevel.templateId("2.16.840.1.113883.10.20.22.4.12"),
25 attributes: leafLevel.code,
31 "value": leafLevel.nextReference("procedure")
40 code: leafLevel.inputProperty("status")
44 fieldLevel.effectiveTime, {
46 attributes: leafLevel.code,
49 key: "targetSiteCode",
50 attributes: leafLevel.code,
53 [fieldLevel.performer, dataKey("performer")], {
59 [sharedEntryLevel.serviceDeliveryLocation, required]
64 existsWhen: condition.propertyEquals("procedure_type", "act"),
65 toDo: ["moodCode should be variable"],
67 "entryRelationship:encounter",
68 "entryRelationship:indication",
69 "entryRelationship:medicationActivity"
73 exports.procedureActivityProcedure = {
80 fieldLevel.templateId("2.16.840.1.113883.10.20.22.4.14"),
84 attributes: leafLevel.code,
90 "value": leafLevel.nextReference("procedure")
99 code: leafLevel.inputProperty("status")
103 fieldLevel.effectiveTime, {
105 attributes: leafLevel.code,
108 key: "targetSiteCode",
109 attributes: leafLevel.code,
110 dataKey: "body_sites"
123 key: "specimenPlayingEntity",
126 attributes: leafLevel.code,
129 existsWhen: condition.keyExists("code")
136 [fieldLevel.performer, dataKey("performer")]
144 [sharedEntryLevel.serviceDeliveryLocation, required]
149 existsWhen: condition.propertyEquals("procedure_type", "procedure"),
150 toDo: ["moodCode should be variable"],
153 "participant:productInstance",
154 "entryRelationship:encounter",
155 "entryRelationship:instructions",
156 "entryRelationship:indication",
157 "entryRelationship:medicationActivity"
161 exports.procedureActivityObservation = {
165 moodCode: "EVN" // not constant in the specification
168 fieldLevel.templateId("2.16.840.1.113883.10.20.22.4.13"),
172 attributes: leafLevel.code,
178 "value": leafLevel.nextReference("procedure")
182 dataKey: "procedure",
187 code: leafLevel.inputProperty("status")
191 fieldLevel.effectiveTime, {
193 attributes: leafLevel.code,
201 key: "targetSiteCode",
202 attributes: leafLevel.code,
203 dataKey: "body_sites"
205 [fieldLevel.performer, dataKey("performers")], {
211 [sharedEntryLevel.serviceDeliveryLocation, required]
216 existsWhen: condition.propertyEquals("procedure_type", "observation"),
217 toDo: ["moodCode should be variable"],
219 "entryRelationship:encounter",
220 "entryRelationship:instructions",
221 "entryRelationship:indication",
222 "entryRelationship:medicationActivity"