forked from banda-health/htmlforms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Patient Plan Form.html
456 lines (393 loc) · 14.7 KB
/
Patient Plan Form.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
<htmlform>
<script type="text/javascript">
if(jQuery) {
$j(function(){
$j('.pharma').hide();
});
$j(function(){
$j('.type').hide();
});
}
if(jQuery){
$j(function(){
$j('#1-removeEntry').remove();
$j('#20-addEntry').remove();
$j('#1-toggleContainer').show();
$j('#21-removeEntry').remove();
$j('#40-addEntry').remove();
$j('#21-toggleContainer').show();
$j('#41-removeEntry').remove();
$j('#60-addEntry').remove();
$j('#41-toggleContainer').show();
});
$j(function(){
$j('button.addEntry').live("click", function(){
var correctedAddButtonId = parseFloat(this.id) + 1;
var contentAddId = "#" + correctedAddButtonId + "-toggleContainer";
$j(contentAddId).toggle(true);
$j('#' + this.id).toggle(false); $j('#' + parseFloat(this.id) + '-removeEntry').toggle(false);
return false;});
});
$j(function(){
$j('button.removeEntry').live("click", function(){
var correctedRemoveButtonId = parseFloat(this.id) - 1;
var contentAddId = "#" + parseFloat(this.id) + "-toggleContainer";
$j(contentAddId).toggle(false);
$j( ':input:not(:button)', contentAddId).val([]);
$j('#' + correctedRemoveButtonId + '-addEntry').toggle(true); $j('#' + correctedRemoveButtonId + '-removeEntry').toggle(true);
return false;});
});
$j(function() {
$j('#surgical_c').hide();
$j('#ophthalmology_c').hide();
$j('#dental_c').hide();
});
$j('#surgical').live('change', function(e) { var surgical = $j('[value=' + $j(this).val() + ']', this).text(); setValue('surgical_c.value', surgical); });
$j('#ophthalmology').live('change', function(e) { var ophthalmology = $j('[value=' + $j(this).val() + ']', this).text();
setValue('ophthalmology_c.value', ophthalmology); });
$j('#dental').live('change', function(e) { var dental = $j('[value=' + $j(this).val() + ']', this).text(); setValue('dental_c.value', dental); });
}
</script>
<!--<macros>
paperFormId = (Fill this in)
headerColor =#009d8e
fontOnHeaderColor = white
</macros>-->
<style>
.section {
border: 1px solid #009d8e;
padding: 2px;
text-align: left;
margin-bottom: 1em;
}
.sectionHeader {
background-color: #009d8e;
color: white;
display: block;
padding: 2px;
font-weight: bold;
}
table.baseline-aligned td {
vertical-align: baseline;
}
td.ref {
padding-left:2.8cm;
}
td.comment {
padding-left:2.9cm;
}
td.point {
padding-left:1.0cm;
}
.lookup {
padding-left: 2cm;
}
</style>
<span style="float:right">Paper Form ID: $paperFormId</span>
<h2>PATIENT PLAN FORM (v1)</h2>
<section headerLabel="1. Encounter Details">
<table class="baseline-aligned">
<tr>
<td>Date:</td>
<td><encounterDate default="today"/></td>
<td><pre> </pre></td>
<td>Location:</td>
<td><encounterLocation default="Unknown Location" /></td>
<td><pre> </pre></td>
<td>Provider:</td>
<td><encounterProvider default="currentUser" role="Provider" /></td>
<td><pre> </pre></td>
<td class="type">Type:</td>
<td class="type"><encounterType default="PATPLAN" /></td>
</tr>
</table>
</section>
<section headerLabel="2. Patient Information">
<table class="baseline-aligned">
<tr>
<td>Name:</td>
<td><lookup class="value" expression="patient.personName"/></td>
<td><pre> </pre></td>
<td>Manual ID:</td>
<td><lookup class="value" complexExpression="#foreach( $patId in $patientIdentifiers.get('Old Identification Number') ) $patId #end "/></td>
<td><pre> </pre></td>
<td>Auto ID:</td>
<td><lookup class="value" complexExpression="#foreach( $patId in $patientIdentifiers.get('OpenMRS Identification Number') ) $patId #end"/></td>
<td><pre> </pre></td>
<td>Gender:</td>
<td><lookup class="value" expression="patient.gender"/></td>
</tr>
</table>
</section>
<section headerLabel="3. Counseling Information">
<table class="baseline-aligned">
<tr>
<td>Nutrition Counseling:</td>
<td class="point"><obs conceptId="1380" answerConceptIds="1065,1066" answerLabels="Counseling,Not Counseling" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(1380).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(1380).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>Exercise Counseling:</td>
<td class="point"><obs conceptId="161587" answerConceptIds="1065,1066" answerLabels="Counseling,Not Counseling" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(161587).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(161587).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>Foot care teaching:</td>
<td class="point"></td>
</tr>
<tr>
<td>Smoking counseling:</td>
<td class="point"><obs conceptId="1455" answerConceptIds="1065,1066" answerLabels="Counseling,Not Counseling" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(1455).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(1455).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>DKA Signs:</td>
<td class="point"><obs conceptId="161590" answerConceptIds="1065,1066" answerLabels="Yes,No" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(161590).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(161590).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>Hypoglycemia Signs:</td>
<td class="point"><obs conceptId="161603" answerConceptIds="1065,1066" answerLabels="Yes,No" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(161603).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(161603).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<obsgroup groupingConceptId="161593">
<tr>
<td>Other Counseling Orders:</td>
<td>
<repeat>
<template>
<div id="{n}-toggleContainer" style="display:none;">
<table>
<tr>
<td class="point">
<obs conceptId="161588" answerClasses="{concept}" style="autocomplete" />
</td>
<td><button id="{n}-addEntry" class="addEntry">Add</button><button id="{n}-removeEntry" class="removeEntry">Remove</button></td>
</tr>
</table>
</div>
</template>
<render n="1" concept="Misc Order"/>
<render n="2" concept="Misc Order"/>
<render n="3" concept="Misc Order"/>
<render n="4" concept="Misc Order"/>
<render n="5" concept="Misc Order"/>
<render n="6" concept="Misc Order"/>
<render n="7" concept="Misc Order"/>
<render n="8" concept="Misc Order"/>
<render n="9" concept="Misc Order"/>
<render n="10" concept="Misc Order"/>
<render n="11" concept="Misc Order"/>
<render n="12" concept="Misc Order"/>
<render n="13" concept="Misc Order"/>
<render n="14" concept="Misc Order"/>
<render n="15" concept="Misc Order"/>
<render n="16" concept="Misc Order"/>
<render n="17" concept="Misc Order"/>
<render n="18" concept="Misc Order"/>
<render n="19" concept="Misc Order"/>
<render n="20" concept="Misc Order"/>
</repeat>
</td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup complexExpression="#foreach($enc in $fn.allEncounters(null))
#if($form == $enc.form.formId)
#set($latestEnc = $fn.latestEncounter($enc.encounterType))
#foreach($obs in $latestEnc.obs)
#if($obs.concept.conceptId == 161588)
$obs.valueCoded.name - #Date $obs.obsDatetime
<br >
#end
#end
#break
#end
#end" class="value" />
</td>
</ifMode>
</tr>
</obsgroup>
</table>
</section>
<section headerLabel="4. Specialty Referrals">
<table class="baseline-aligned">
<tr>
<td>Surgical:</td>
<td class="comment">
<select id="surgical">
<option value="None">None</option>
<option value="General surgery">General surgery</option>
<option value="Plastic surgery">Plastic surgery</option>
<option value="Orthopaedic">Orthopaedic surgery</option>
</select>
<obs conceptId="1673" id="surgical_c" />
</td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(1673).valueText" class="value"/>
<lookup expression="fn.latestObs(1673).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>Ophthalmology:</td>
<td class="comment">
<select id="ophthalmology">
<option value="None">None</option>
<option value="KH Eye Clinic">KH Eye Clinic</option>
<option value="Outside Ophthalmology">Outside Ophthalmology</option>
</select>
<obs conceptId="1763" id="ophthalmology_c" />
</td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(1763).valueText" class="value"/>
<lookup expression="fn.latestObs(1763).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<tr>
<td>Dental:</td>
<td class="comment">
<select id="dental">
<option value="None">None</option>
<option value="Kijabe hospital dental">Kijabe hospital dental</option>
<option value="Outside dental">Outside dental</option>
</select>
<obs conceptId="1772" id="dental_c" />
</td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(1772).valueText" class="value"/>
<lookup expression="fn.latestObs(1772).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
<obsgroup groupingConceptId="161592">
<tr>
<td>Other Referrals:</td>
<td class="ref">
<obs conceptId="160632" cols="30" rows="2" />
</td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(160632).valueText" class="value"/>
<lookup expression="fn.latestObs(160632).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
</obsgroup>
</table>
</section>
<section headerLabel="5. Plan Information">
<table>
<tr><td>
<table>
<tr>
<th style="background-color: #696969; color: #ffffff;">Drug Prescribed</th>
<th style="background-color: #696969; color: #ffffff;">Dose Prescribed</th>
<th style="background-color: #696969; color: #ffffff;" class="pharma">Dispensed Units</th>
<th style="background-color: #696969; color: #ffffff;">Frequency Prescribed</th>
</tr>
<repeat>
<template>
<obsgroup groupingConceptId="1442">
<tr>
<td><obs conceptId="1282" style="autocomplete" answerClasses="Drug"/></td>
<td><obs conceptId="1443" labetText=""/></td>
<td class="pharma"><obs conceptId="1444" size="5" /></td>
<td><obs conceptId="160855" answerConceptIds="160862,160863,160864,160865,160861,160860,160859,160858,160866,160867,160868,160869,160870,160871,160872,160857" /></td>
</tr>
</obsgroup>
</template>
<render />
<render />
<render />
<render />
<render />
<render />
<render />
<render />
</repeat>
</table>
</td>
<td class="lookup">
<ifMode mode="ENTER">
<table border="1" style="position:relative; ">
<tr>
<th style="background-color: #696969; color: #ffffff; text-align: center;">Previous medications</th>
</tr>
<tr>
<td colspan="3">
<lookup complexExpression="#foreach($enc in $fn.allEncounters(null))
#if($form == $enc.form.formId)
#set($latestEnc = $fn.latestEncounter($enc.encounterType))
#foreach($obs in $latestEnc.obs)
#if($obs.concept.conceptId == 1282)
#foreach($obs2 in $obs.getRelatedObservations())
#if($obs2.concept.conceptId == 1282)
- $obs2.valueCoded.name -
#end
#if($obs2.concept.conceptId == 1443)
- $obs2.valueNumeric -
#end
#if($obs2.concept.conceptId == 160855)
- $obs2.valueCoded.name -
#end
#end
$obs.obsDatetime
<br >
<br >
#end
#end
#break
#end
#end" class="value" />
</td>
</tr>
</table>
</ifMode>
</td>
</tr>
</table>
<table class="baseline-aligned">
<tr>
<td>Disposition:</td>
<td><p></p></td>
<td class="ref"><obs conceptId="159488" answerConceptIds="161589,1654,1536" answerLabels="Referred,Admitted,Home" style="radio" /></td>
<ifMode mode="ENTER">
<td class="lookup">
<lookup expression="fn.latestObs(159488).valueCoded.name" class="value"/>
<lookup expression="fn.latestObs(159488).obsDatetime" class="value"/>
</td>
</ifMode>
</tr>
</table>
</section>
<submit/>
</htmlform>