summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/xml/macros/B.2.2.1.xml135
1 files changed, 125 insertions, 10 deletions
diff --git a/server/xml/macros/B.2.2.1.xml b/server/xml/macros/B.2.2.1.xml
index 26b2d42..2382be9 100644
--- a/server/xml/macros/B.2.2.1.xml
+++ b/server/xml/macros/B.2.2.1.xml
@@ -2,14 +2,15 @@
<!--
20081203: Bent Bisballe Nyeng
Feltnavnene ændret så de giver mening.
- -->
-<!--
+
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
- -->
-<!--
+
20090202: Bent Bisballe Nyeng
'missing eye' tilføjet.
+
+ 20090427: Bent Bisballe Nyeng
+ Refraktions korrektion tilføjet.
-->
<macro name="B.2.2.1" version="1.0">
<resume language="lua">
@@ -20,14 +21,22 @@
if ( getValue('snellen.right.missing') == '' )
then
- out = out .. 'VISUS O.DXT. ' .. getValue('snellen.right') .. '\n'
- out = out .. 'ETDRS O.DXT. ' .. getValue('etdrs.right') .. '\n'
+ out = out .. 'Visus o.dxt. ' .. getValue('snellen.right') .. '\n'
+ out = out .. 'ETDRS o.dxt. ' .. getValue('etdrs.right') .. '\n'
+ out = out .. 'Korr.: ' .. getValue('snellen.right.corr.basis') .. ' add '
+ .. getValue('snellen.right.corr.sph') .. ' sf, '
+ .. getValue('snellen.right.corr.cyl') .. ' sph '
+ .. getValue('snellen.right.corr.axis') .. ' grader.\n'
end
if ( getValue('snellen.left.missing') == '' )
then
- out = out .. 'VISUS O.SIN. ' .. getValue('snellen.left') .. '\n'
- out = out .. 'ETDRS O.SIN. ' .. getValue('etdrs.left') .. '\n'
+ out = out .. 'Visus o.sin. ' .. getValue('snellen.left') .. '\n'
+ out = out .. 'ETDRS o.sin. ' .. getValue('etdrs.left') .. '\n'
+ out = out .. 'Korr.: ' .. getValue('snellen.left.corr.basis') .. ' add '
+ .. getValue('snellen.left.corr.sph') .. ' sf, '
+ .. getValue('snellen.left.corr.cyl') .. ' sph '
+ .. getValue('snellen.left.corr.axis') .. ' grader.\n'
end
end
return out
@@ -75,6 +84,48 @@
</map>
</maps>
<scripts>
+ <script language="lua" name="lt20gt-25">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= -25 and tonumber(value) &lt;= 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) &gt;= -15 and tonumber(value) &lt;= 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) &gt;= 0 and tonumber(value) &lt;= 359)
+ then
+ return true
+ else
+ return false
+ end
+ </script>
<script language="lua" name="not0">
if(value == 'Ikke udfyldt')
then
@@ -112,7 +163,8 @@
name="snellen.right.missing" script="right_eye"
map="missing_eye_right_map"
truevalue="mangler" falsevalue="" value=""/>
- <frame name="right_eye_frame" caption="Højre øje" layout="hbox">
+ <frame name="right_eye_frame" caption="Højre øje" layout="vbox">
+ <frame layout="hbox">
<frame layout="vbox">
<label caption="Snellen:"/>
@@ -258,6 +310,37 @@
</combobox>
<spacer/>
</frame>
+ </frame>
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Basis:"/>
+ <combobox name="snellen.right.corr.basis" value="">
+ <item caption="Autoref." value="autoref"/>
+ <item caption="Egen brille" value="brille"/>
+ <item caption="Ingen" value="ingen"/>
+ </combobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="add"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="snellen.right.corr.sph" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="snellen.right.corr.cyl" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="snellen.right.corr.axis" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
</frame>
</frame>
@@ -267,7 +350,8 @@
name="snellen.left.missing" script="left_eye"
map="missing_eye_left_map"
truevalue="mangler" falsevalue="" value=""/>
- <frame name="left_eye_frame" caption="Venstre øje" layout="hbox">
+ <frame name="left_eye_frame" caption="Venstre øje" layout="vbox">
+ <frame layout="hbox">
<frame layout="vbox">
<label caption="Snellen:"/>
@@ -414,6 +498,37 @@
<spacer/>
</frame>
</frame>
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Basis:"/>
+ <combobox name="snellen.left.corr.basis" value="">
+ <item caption="Autoref." value="autoref"/>
+ <item caption="Egen brille" value="brille"/>
+ <item caption="Ingen" value="ingen"/>
+ </combobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="add"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="snellen.left.corr.sph" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="snellen.left.corr.cyl" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="snellen.left.corr.axis" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
</frame>
</frame>