-
Notifications
You must be signed in to change notification settings - Fork 139
/
vitals.xml
259 lines (200 loc) · 9.45 KB
/
vitals.xml
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
<!--
~ The contents of this file are subject to the OpenMRS Public License
~ Version 1.0 (the "License"); you may not use this file except in
~ compliance with the License. You may obtain a copy of the License at
~ http://license.openmrs.org
~
~ Software distributed under the License is distributed on an "AS IS"
~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
~ License for the specific language governing rights and limitations
~ under the License.
~
~ Copyright (C) OpenMRS, LLC. All Rights Reserved.
-->
<htmlform formUuid="a000cb34-9ec1-4344-a1c8-f692232f6edd" formName="Vitals" formEncounterType="67a71486-1a54-468f-ac3e-7091a9a79584" formVersion="1.0">
<style>
#calculated-bmi {
font-weight: bold;
font-size: 1.4em;
}
.encounter-summary-container #calculated-bmi {
font-size: 1em;
font-weight: normal;
}
</style>
<!-- only show BMI if patient is more than 5 years old (on the encounterDate) -->
<includeIf velocityTest="$patient.getAge($encounter.getEncounterDatetime()) > 5">
<script type="text/javascript">
var calculateBmi = function(wt, ht) {
var bmi = null
if (wt && ht) {
bmi = wt / ((ht/100) * (ht/100));
}
return bmi ;
}
</script>
<ifMode mode="ENTER">
<script type="text/javascript">
// functions to handle updating the bmi when in ENTER mode
var updateBmi = function() {
var wt = htmlForm.getValueIfLegal('weight.value');
var ht = htmlForm.getValueIfLegal('height.value');
var bmi = calculateBmi(wt, ht);
if (bmi == null || isNaN(bmi)) {
jq('#calculated-bmi-wrapper').hide();
} else {
jq('#no-calculated-bmi').hide();
jq('#calculated-bmi-wrapper').show();
jq('#calculated-bmi').html(bmi.toFixed(1));
jq('#hidden-calculated-bmi').val(bmi.toFixed(1));
}
};
jq(function() {
jq('#calculated-bmi-wrapper').hide();
getField('weight.value').change(updateBmi)
getField('height.value').change(updateBmi);
updateBmi();
});
jq(function() {
jq('#bp_systolic input[type=text]').attr('min', '50');
});
jq(function() {
jq('#bp_diastolic input[type=text]').attr('min', '30');
});
</script>
</ifMode>
<script>
// set the blood pressure fields as "expected"
jq(function() {
jq('#bp_systolic > input').addClass('expected');
jq('#bp_diastolic > input').addClass('expected');
});
</script>
<ifMode mode="VIEW">
<script type="text/javascript">
// handle displaying the bmi when in VIEW mode
jq(function() {
// we have to iterate through in case there are multiple vitals forms
// displayed on a single page
jq('htmlform').each(function(index, form) {
jq(form).find('#calculated-bmi-continue').hide();
jq(form).find('#no-calculated-bmi').hide();
var wt = jq(form).find('#weight').find('.value').text();
var ht = jq(form).find('#height').find('.value').text();
var bmi = calculateBmi(wt, ht);
if (bmi != null && !isNaN(bmi)) {
jq(form).find('#calculated-bmi-wrapper').show();
jq(form).find('#calculated-bmi').html(bmi.toFixed(1));
jq(form).find('#hidden-calculated-bmi').val(bmi.toFixed(1));
}
});
});
</script>
</ifMode>
</includeIf>
<div class="hidden" id="encounter-details" sectionTag="section" headerStyle="title" headerLabel="Encounter Details">
<fieldset>
<legend>When?</legend>
<label>When?</label>
<encounterDate default="now" showTime="false"/>
</fieldset>
<fieldset>
<legend>Who?</legend>
<label>Who?</label>
<encounterProviderAndRole default="currentUser" encounterRole="240b26f9-dd88-4172-823d-4a8bfeb7841f" required="true"/>
</fieldset>
<fieldset>
<legend>Where?</legend>
<label>Where?</label>
<encounterLocation default="SessionAttribute:emrContext.sessionLocationId"/>
</fieldset>
</div>
<section id="vitals" sectionTag="section" headerStyle="title" headerCode="referenceapplication.vitals.title">
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5090').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5090').name"/></h3>
<p class="left">
<obs conceptId="CIEL:5090" id="height" showUnits="uicommons.units.centimeters" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5089').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5089').name"/></h3>
<p class="left">
<obs conceptId="CIEL:5089" id="weight" showUnits="uicommons.units.kilograms" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<!-- only show BMI if patient is more than 5 years old (on the encounterDate) -->
<includeIf velocityTest="$patient.getAge($encounter.getEncounterDatetime()) > 5">
<fieldset>
<legend><uimessage code="referenceapplication.vitals.bmi.title"/></legend>
<h3><uimessage code="referenceapplication.vitals.bmi.title"/></h3>
<span id="no-calculated-bmi">
<uimessage code="referenceapplication.vitals.bmi.instructions"/>
</span>
<span id="calculated-bmi-wrapper">
<ifMode mode="VIEW" include="false">
<uimessage code="referenceapplication.vitals.bmi.display"/>
</ifMode>
<span id='calculated-bmi'></span>
</span>
<p id="calculated-bmi-continue">
<input type="hidden" name="focus-in-bmi-question" id="hidden-calculated-bmi" />
<uimessage code="referenceapplication.vitals.calculatedField.continue"/>
</p>
</fieldset>
</includeIf>
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5088').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5088').name"/></h3>
<p class="left">
<obs conceptId="CIEL:5088" id="temperature" showUnits="uicommons.units.degreesCelsius" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5087').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5087').name"/></h3>
<p>
<obs conceptId="CIEL:5087" id="heart_rate" showUnits="uicommons.units.perMinute" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5242').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5242').name"/></h3>
<p>
<obs conceptId="CIEL:5242" id="respiratory_rate" showUnits="uicommons.units.perMinute" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<fieldset field-separator=" / ">
<legend><uimessage code="referenceapplication.vitals.bloodPressure.title"/></legend>
<h3><uimessage code="referenceapplication.vitals.bloodPressure.title"/></h3>
<p class="left">
<obs conceptId="CIEL:5085" id="bp_systolic"/>
</p>
<p class="left">
/
</p>
<p class="left">
<obs conceptId="CIEL:5086" id="bp_diastolic"/>
</p>
</fieldset>
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:5092').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:5092').name"/></h3>
<p>
<obs conceptId="CIEL:5092" id="o2_sat" showUnits="uicommons.units.percent" unitsCssClass="append-to-value"/>
</p>
</fieldset>
<!-- only show BMI if patient is less than 13 years old (on the encounterDate) -->
<includeIf velocityTest="13 > $patient.getAge($encounter.getEncounterDatetime())">
<fieldset>
<legend><lookup expression="fn.getConcept('CIEL:1343').name"/></legend>
<h3><lookup expression="fn.getConcept('CIEL:1343').name"/></h3>
<p>
<obs conceptId="CIEL:1343" id="muac" showUnits="uicommons.units.millimeters" unitsCssClass="append-to-value"/>
</p>
</fieldset>
</includeIf>
</section>
<submit/>
</htmlform>