summaryrefslogtreecommitdiff
path: root/server/xml/macros/externa-1.0.xml
blob: 695f36e446010cdf22045b1364c1c4053af08cd6 (plain)
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
<?xml version='1.0' encoding='UTF-8'?>
<macro name="externa" version="1.0">
  <resume language="lua">
    out = ''

    if ( getValue('externa.odxt.mangler') == '' )
    then
      out = out .. 'Externa o.dxt:\n'
      out = out .. 'Placering af øvre øjenlågsrand i forhold til den øvre corneosklerale limbus ' .. getValue('externa.odxt.placering') .. '.\n'
      out = out .. 'Øjenlågsretraktion: ' .. getValue('externa.odxt.oejenslaagsretraktion') .. '\n'
      out = out .. 'Øjenspaltens højde: ' .. getValue('externa.odxt.hoejde') .. '\n'
      out = out .. 'Bløddelshævelse: ' .. getValue('externa.odxt.bloeddelshaevelse') .. '\n'
    end

    if ( getValue('externa.osin.mangler') == '' )
    then
    if ( getValue('externa.odxt.mangler') == '' )
    then
      out = out .. '\n'
    end
      out = out .. 'Externa o.sin:\n'
      out = out .. 'Placering af øvre øjenlågsrand i forhold til den øvre corneosklerale limbus ' .. getValue('externa.osin.placering') .. '.\n'
      out = out .. 'Øjenlågsretraktion: ' .. getValue('externa.osin.oejenlaagsretraktion') .. '\n'
      out = out .. 'Øjenspaltens højde: ' .. getValue('externa.osin.hoejde') .. '\n'
      out = out .. 'Bløddelshævelse: ' .. getValue('externa.osin.bloeddelshaevelse') .. '\n'
    end

    return out
  </resume>
  <queries>
    <query service="pracro" class="missing_eye_odxt" ttl="1000000"/>
    <query service="pracro" class="missing_eye_osin" ttl="1000000"/>
  </queries>
  <maps>
    <map name="missing_eye_odxt_map">
      value = 0
      timestamp = 0
      source = ''

      if( missing_eye_odxt )
      then
        if( missing_eye_odxt.value and missing_eye_odxt.value == '' )
        then
          value = ''
          timestamp = missing_eye_odxt.timestamp
          source = missing_eye_odxt.source
        else
          value = 'mangler'
          timestamp = missing_eye_odxt.timestamp
          source = missing_eye_odxt.source
        end
      end
      return value, timestamp, source
    </map>
    <map name="missing_eye_osin_map">
      value = 0
      timestamp = 0
      source = ''
      
      if( missing_eye_osin )
      then
        if( missing_eye_osin.value and missing_eye_osin.value == '' )
        then
          value = ''
          timestamp = missing_eye_osin.timestamp
          source = missing_eye_osin.source
        else
          value = 'mangler'
          timestamp = missing_eye_osin.timestamp
          source = missing_eye_osin.source
        end
      end
      return value, timestamp, source
    </map>
  </maps>
  <scripts>
    <script language="lua" name="right_eye">
      if ( value == 'mangler' )
      then
        disable('right_eye_frame')
      else
        enable('right_eye_frame')
      end

      return true
    </script>
    <script language="lua" name="left_eye">
      if ( value == 'mangler' )
      then
        disable('left_eye_frame')
      else
        enable('left_eye_frame')
      end

      return true
    </script>
  </scripts>
  <widgets caption="Externa" layout="vbox">

    <frame layout="hbox">
    
      <!-- o.dxt -->
      <frame layout="vbox">
	<checkbox caption="Der er ikke målt på o.dxt"
		  name="externa.odxt.mangler" script="right_eye"
		  map="missing_eye_odxt_map"
		  truevalue="mangler" falsevalue="" value=""/>
	<frame name="right_eye_frame" caption="o.dxt" layout="vbox">
	  <frame layout="vbox">
	    <label caption="Placering af øvre øjenlågsrand i forhold til den øvre corneosklerale limbus:"/>
	    <combobox name="externa.odxt.placering" value="">
	      <item caption="Går lige til limbus" value="går lige til limbus"/>
	      <item caption="Ligger lidt over limbus" value="ligger lidt over limbus"/>
	      <item caption="Ligger meget over limbus" value="ligger meget over limbus"/>
	      <item caption="Er ikke beskrevet" value="er ikke beskrevet"/>
	    </combobox>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Øjenlågsretraktion:"/>
	    <combobox name="externa.odxt.oejenslaagsretraktion" value="">
	      <item caption="Ingen" value="ingen"/>
	      <item caption="Let" value="let"/>
	      <item caption="Moderat" value="moderat"/>
	      <item caption="Kraftig" value="kraftig"/>
	    </combobox>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Øjenspaltens højde:"/>
	    <frame layout="hbox">
	      <combobox name="externa.odxt.hoejde" value="">
		<item caption="0" value="0"/>
		<item caption="1" value="1"/>
		<item caption="2" value="2"/>
		<item caption="3" value="3"/>
		<item caption="4" value="4"/>
		<item caption="5" value="5"/>
		<item caption="6" value="6"/>
		<item caption="7" value="7"/>
		<item caption="8" value="8"/>
		<item caption="9" value="9"/>
		<item caption="10" value="10"/>
		<item caption="11" value="11"/>
		<item caption="12" value="12"/>
		<item caption="13" value="13"/>
		<item caption="14" value="14"/>
		<item caption="15" value="15"/>
	      </combobox>
	      <label caption="mm"/>
	    </frame>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Bløddelshævelse:"/>
	    <combobox name="externa.odxt.bloeddelshaevelse" value="">
	      <item caption="Ingen" value="ingen"/>
	      <item caption="Let" value="let"/>
	      <item caption="Moderat" value="moderat"/>
	      <item caption="Kraftig" value="kraftig"/>
	    </combobox>
	  </frame>
	</frame>
      </frame>

      <!-- o.sin -->
      <frame layout="vbox">
	<checkbox caption="Der er ikke målt på o.sin"
		  name="externa.osin.mangler" script="left_eye"
		  map="missing_eye_osin_map"
		  truevalue="mangler" falsevalue="" value=""/>
	<frame name="left_eye_frame" caption="o.sin" layout="vbox">
	  <frame layout="vbox">
	    <label caption="Placering af øvre øjenlågsrand i forhold til den øvre corneosklerale limbus:"/>
	    <combobox name="externa.osin.placering" value="">
	      <item caption="Går lige til limbus" value="går lige til limbus"/>
	      <item caption="Ligger lidt over limbus" value="ligger lidt over limbus"/>
	      <item caption="Ligger meget over limbus" value="ligger meget over limbus"/>
	      <item caption="Er ikke beskrevet" value="er ikke beskrevet"/>
	    </combobox>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Øjenlågsretraktion:"/>
	    <combobox name="externa.osin.oejenlaagsretraktion" value="">
	      <item caption="Ingen" value="ingen"/>
	      <item caption="Let" value="let"/>
	      <item caption="Moderat" value="moderat"/>
	      <item caption="Kraftig" value="kraftig"/>
	    </combobox>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Øjenspaltens højde:"/>
	    <frame layout="hbox">
	      <combobox name="externa.osin.hoejde" value="">
		<item caption="0" value="0"/>
		<item caption="1" value="1"/>
		<item caption="2" value="2"/>
		<item caption="3" value="3"/>
		<item caption="4" value="4"/>
		<item caption="5" value="5"/>
		<item caption="6" value="6"/>
		<item caption="7" value="7"/>
		<item caption="8" value="8"/>
		<item caption="9" value="9"/>
		<item caption="10" value="10"/>
		<item caption="11" value="11"/>
		<item caption="12" value="12"/>
		<item caption="13" value="13"/>
		<item caption="14" value="14"/>
		<item caption="15" value="15"/>
	      </combobox>
	      <label caption="mm"/>
	    </frame>
	  </frame>
	  <frame layout="vbox">
	    <label caption="Bløddelshævelse:"/>
	    <combobox name="externa.osin.bloeddelshaevelse" value="">
	      <item caption="Ingen" value="ingen"/>
	      <item caption="Let" value="let"/>
	      <item caption="Moderat" value="moderat"/>
	      <item caption="Kraftig" value="kraftig"/>
	    </combobox>
	  </frame>
	</frame>
      </frame>
      
    </frame>
    
    <!-- Knapper -->
    <frame layout="hbox">
      <spacer />
      <button caption="Gem" action="commit"/>
    </frame>
  </widgets>
</macro>