summaryrefslogtreecommitdiff
path: root/server/xml/macros/B.2.2.5.xml
blob: 9199a1c3494fad71cc0541a1eb8d095bcd888d7d (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
<?xml version='1.0' encoding='UTF-8'?>
<!--
    20081203: Bent Bisballe Nyeng
    Feltnavnene ændret så de giver mening.
  -->
<!--
    20090108: Bent Bisballe Nyeng
    Højre/venstre byttet om.
  -->
<macro name="B.2.2.5" version="1.0">
  <resume>Øjentryk:
Højre øje: ${tonometer.pressure.right} mmHg
Venstre øje: ${tonometer.pressure.right} mmHg
${tonometer.device}.</resume>
  <queries>
  </queries>
  <maps>
  </maps>
  <scripts>
    <script language="lua" name="lt80gt0">
      if(value == '')
      then
        return false
      end

      value = string.gsub(value, ',', '.')
      if(tonumber(value) &gt;= 0 and tonumber(value) &lt;= 80)
      then
        return true
      else
        return false
      end
    </script>
  </scripts>
  <window caption="Øjentryk (B.2.2.5)"
          layout="vbox">

    <frame layout="hbox">
    
      <!-- Højre øje -->
      <frame caption="Højre øje" layout="hbox">
	<label caption="Tryk:"/>
	<spacer/>
	<lineedit name="tonometer.pressure.right" regexp="\d{1,2}" script="lt80gt0" value=""/>
	<label caption="mmHg"/>
	<spacer/>
      </frame>

      <!-- Venstre øje -->
      <frame caption="Venstre øje" layout="hbox">
	<label caption="Tryk:"/>
	<spacer/>
	<lineedit name="tonometer.pressure.left" regexp="\d{1,2}" script="lt80gt0" value=""/>
	<label caption="mmHg"/>
	<spacer/>
      </frame>

    </frame>

    <label caption="Tonometer måling foretaget med:"/>
    <combobox name="tonometer.device" value="">
      <item caption="Applanationstonometer" value="Appl"/>
      <item caption="Lufttonometer" value="Luft"/>
    </combobox>
    
    <!-- Knapper -->
    <frame layout="hbox">
      <spacer />
      <button caption="Gem" action="commit"/>
    </frame>
  </window>
</macro>