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
|
<?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.3" version="1.0">
<resume>Autorefraktion højre øje: ${autorefractor.right.sphere} sf, ${autorefractor.right.cyl} cyl ${autorefractor.right.axis} grader.
Autorefraktion venstre øje: ${autorefractor.left.sphere} sf, ${autorefractor.left.cyl} cyl ${autorefractor.left.axis} grader.</resume>
<queries>
</queries>
<maps>
</maps>
<scripts>
<script language="lua" name="lt20gt-25">
if(value == '')
then
return false
end
value = string.gsub(value, ',', '.')
if(tonumber(value) >= -25 and tonumber(value) <= 20)
then
return true
else
return false
end
</script>
<script language="lua" name="lt10gt-15">
if(value == '')
then
return false
end
value = string.gsub(value, ',', '.')
if(tonumber(value) >= -15 and tonumber(value) <= 10)
then
return true
else
return false
end
</script>
<script language="lua" name="lt359gt0">
if(value == '')
then
return false
end
value = string.gsub(value, ',', '.')
if(tonumber(value) >= 0 and tonumber(value) <= 359)
then
return true
else
return false
end
</script>
</scripts>
<window caption="Autorefraktion (B.2.2.3)"
layout="vbox">
<frame layout="hbox">
<!-- Højre øje -->
<frame caption="Højre øje" layout="hbox">
<frame layout="vbox">
<label caption="Sf:"/>
<lineedit name="autorefractor.right.sphere"
regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
</frame>
<frame layout="vbox">
<label caption="Cyl:"/>
<lineedit name="autorefractor.right.cyl"
regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
</frame>
<frame layout="vbox">
<label caption="Grader:"/>
<lineedit name="autorefractor.right.axis"
regexp="[\d]+" script="lt359gt0" value=""/>
</frame>
</frame>
<!-- Venstre øje -->
<frame caption="Venstre øje" layout="hbox">
<frame layout="vbox">
<label caption="Sf:"/>
<lineedit name="autorefractor.left.sphere"
regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
</frame>
<frame layout="vbox">
<label caption="Cyl:"/>
<lineedit name="autorefractor.left.cyl"
regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
</frame>
<frame layout="vbox">
<label caption="Grader:"/>
<lineedit name="autorefractor.left.axis"
regexp="[\d]+" script="lt359gt0" value=""/>
</frame>
</frame>
</frame>
<!-- Knapper -->
<frame layout="hbox">
<spacer />
<button caption="Gem" action="commit"/>
</frame>
</window>
</macro>
|