summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsenator <senator>2009-09-23 07:25:49 +0000
committersenator <senator>2009-09-23 07:25:49 +0000
commitc06587f2a905cbb23388fca5a6c1e6a3540ea057 (patch)
tree994c46d3d879daf49b4fb3a271dfed2652a7164b
parent1c6467c87152b87426bd40ac80fe4800e349a124 (diff)
split visus macros out into 4 different macros
-rw-r--r--server/xml/macros/visus-autoref-1.0.xml513
-rw-r--r--server/xml/macros/visus-egen_korr-1.0.xml513
-rw-r--r--server/xml/macros/visus-optimal_korr-1.0.xml192
-rw-r--r--server/xml/macros/visus-uden_korr-1.0.xml40
4 files changed, 1152 insertions, 106 deletions
diff --git a/server/xml/macros/visus-autoref-1.0.xml b/server/xml/macros/visus-autoref-1.0.xml
new file mode 100644
index 0000000..7949497
--- /dev/null
+++ b/server/xml/macros/visus-autoref-1.0.xml
@@ -0,0 +1,513 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<macro name="visus-autoref" version="1.0">
+ <resume language="lua">
+ out = ''
+ if ( getValue('visus.autoref.missing.right') == '' )
+ then
+ out = out .. 'Visus, højre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.autoref.snellen.right') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.autoref.etdrs.right') .. '\n'
+ out = out .. 'Korr.: '
+ .. getValue('visus.autoref.korr.sf.right') .. ' sf, '
+ .. getValue('visus.autoref.korr.cyl.right') .. ' sph '
+ .. getValue('visus.autoref.korr.grader.right') .. ' grader.\n'
+ end
+
+ if ( getValue('visus.autoref.missing.left') == '' )
+ then
+ out = out .. 'Visus, venstre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.autoref.snellen.left') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.autoref.etdrs.left') .. '\n'
+ out = out .. 'Korr.: '
+ .. getValue('visus.autoref.korr.sf.left') .. ' sf, '
+ .. getValue('visus.autoref.korr.cyl.left') .. ' sph '
+ .. getValue('visus.autoref.korr.grader.left') .. ' grader.\n'
+ end
+
+ return out
+ </resume>
+ <queries>
+ <query service="pracro" class="missing_eye_right" ttl="1000000"/>
+ <query service="pracro" class="missing_eye_left" ttl="1000000"/>
+ </queries>
+ <maps>
+ <map name="missing_eye_right_map">
+ value = 0
+ timestamp = 0
+ source = ''
+
+ if( missing_eye_right )
+ then
+ if( missing_eye_right.value and missing_eye_right.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_right.timestamp
+ source = missing_eye_right.source
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ source = missing_eye_right.source
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = ''
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ source = missing_eye_left.source
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ source = missing_eye_left.source
+ end
+ end
+ return value, timestamp, source
+ </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
+ return false
+ end
+ return true
+ </script>
+ <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="Visus - autoref korrektion"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="visus.autoref.missing.right" script="right_eye"
+ map="missing_eye_right_map"
+ truevalue="mangler" falsevalue="" value=""/>
+ <frame name="right_eye_frame" caption="Højre øje" layout="vbox">
+ <frame layout="hbox">
+
+ <frame layout="vbox">
+ <label caption="Snellen:"/>
+ <altcombobox name="visus.autoref.snellen.right" layout="vbox" type="search" value="Ikke udfyldt" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <item caption="2,0" value="2,0"/>
+ <item caption="1,6" value="1,6"/>
+ <item caption="1,33" value="1,33"/>
+ <item caption="1,0" value="1,0"/>
+ <item caption="0,8" value="0,8"/>
+ <item caption="0,67" value="0,67"/>
+ <item caption="0,5" value="0,5"/>
+ <item caption="0,4" value="0,4"/>
+ <item caption="0,32" value="0,32"/>
+ <item caption="0,25" value="0,25"/>
+ <item caption="0,2" value="0,2"/>
+ <item caption="0,16" value="0,16"/>
+ <item caption="0,125" value="0,125"/>
+ <item caption="0,1" value="0,1"/>
+ <item caption="0,08" value="0,08"/>
+ <item caption="0,05" value="0,05"/>
+ <item caption="6/60" value="6/60"/>
+ <item caption="3/60" value="3/60"/>
+ <item caption="1/18" value="1/18"/>
+ <item caption="1/24" value="1/24"/>
+ <item caption="1/36" value="1/36"/>
+ <item caption="1/60" value="1/60"/>
+ <item caption="FGT" value="FGT"/>
+ <item caption="HBV" value="HBV"/>
+ <item caption="+L+P" value="+L+P"/>
+ <item caption="+L-P" value="+L-P"/>
+ <item caption="-L" value="-L"/>
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ </altitem>
+ </altcombobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption="ETDRS:"/>
+ <combobox name="visus.autoref.etdrs.right" value="Ikke udfyldt" type="search" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <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"/>
+ <item caption="16" value="16"/>
+ <item caption="17" value="17"/>
+ <item caption="18" value="18"/>
+ <item caption="19" value="19"/>
+ <item caption="20" value="20"/>
+ <item caption="21" value="21"/>
+ <item caption="22" value="22"/>
+ <item caption="23" value="23"/>
+ <item caption="24" value="24"/>
+ <item caption="25" value="25"/>
+ <item caption="26" value="26"/>
+ <item caption="27" value="27"/>
+ <item caption="28" value="28"/>
+ <item caption="29" value="29"/>
+ <item caption="30" value="30"/>
+ <item caption="31" value="31"/>
+ <item caption="32" value="32"/>
+ <item caption="33" value="33"/>
+ <item caption="34" value="34"/>
+ <item caption="35" value="35"/>
+ <item caption="36" value="36"/>
+ <item caption="37" value="37"/>
+ <item caption="38" value="38"/>
+ <item caption="39" value="39"/>
+ <item caption="40" value="40"/>
+ <item caption="41" value="41"/>
+ <item caption="42" value="42"/>
+ <item caption="43" value="43"/>
+ <item caption="44" value="44"/>
+ <item caption="45" value="45"/>
+ <item caption="46" value="46"/>
+ <item caption="47" value="47"/>
+ <item caption="48" value="48"/>
+ <item caption="49" value="49"/>
+ <item caption="50" value="50"/>
+ <item caption="51" value="51"/>
+ <item caption="52" value="52"/>
+ <item caption="53" value="53"/>
+ <item caption="54" value="54"/>
+ <item caption="55" value="55"/>
+ <item caption="56" value="56"/>
+ <item caption="57" value="57"/>
+ <item caption="58" value="58"/>
+ <item caption="59" value="59"/>
+ <item caption="60" value="60"/>
+ <item caption="61" value="61"/>
+ <item caption="62" value="62"/>
+ <item caption="63" value="63"/>
+ <item caption="64" value="64"/>
+ <item caption="65" value="65"/>
+ <item caption="66" value="66"/>
+ <item caption="67" value="67"/>
+ <item caption="68" value="68"/>
+ <item caption="69" value="69"/>
+ <item caption="70" value="70"/>
+ <item caption="71" value="71"/>
+ <item caption="72" value="72"/>
+ <item caption="73" value="73"/>
+ <item caption="74" value="74"/>
+ <item caption="75" value="75"/>
+ <item caption="76" value="76"/>
+ <item caption="77" value="77"/>
+ <item caption="78" value="78"/>
+ <item caption="79" value="79"/>
+ <item caption="80" value="80"/>
+ <item caption="81" value="81"/>
+ <item caption="82" value="82"/>
+ <item caption="83" value="83"/>
+ <item caption="84" value="84"/>
+ <item caption="85" value="85"/>
+ <item caption="86" value="86"/>
+ <item caption="87" value="87"/>
+ <item caption="88" value="88"/>
+ <item caption="89" value="89"/>
+ <item caption="90" value="90"/>
+ <item caption="91" value="91"/>
+ <item caption="92" value="92"/>
+ <item caption="93" value="93"/>
+ <item caption="94" value="94"/>
+ <item caption="95" value="95"/>
+ <item caption="96" value="96"/>
+ <item caption="97" value="97"/>
+ <item caption="98" value="98"/>
+ <item caption="99" value="99"/>
+ <item caption="100" value="100"/>
+ </combobox>
+ <spacer/>
+ </frame>
+ </frame>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.autoref.korr.sf.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.autoref.korr.cyl.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.autoref.korr.grader.right" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="visus.autoref.missing.left" script="left_eye"
+ map="missing_eye_left_map"
+ truevalue="mangler" falsevalue="" value=""/>
+ <frame name="left_eye_frame" caption="Venstre øje" layout="vbox">
+ <frame layout="hbox">
+
+ <frame layout="vbox">
+ <label caption="Snellen:"/>
+ <altcombobox name="visus.autoref.snellen.left" layout="vbox" type="search" value="Ikke udfyldt" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <item caption="2,0" value="2,0"/>
+ <item caption="1,6" value="1,6"/>
+ <item caption="1,33" value="1,33"/>
+ <item caption="1,0" value="1,0"/>
+ <item caption="0,8" value="0,8"/>
+ <item caption="0,67" value="0,67"/>
+ <item caption="0,5" value="0,5"/>
+ <item caption="0,4" value="0,4"/>
+ <item caption="0,32" value="0,32"/>
+ <item caption="0,25" value="0,25"/>
+ <item caption="0,2" value="0,2"/>
+ <item caption="0,16" value="0,16"/>
+ <item caption="0,125" value="0,125"/>
+ <item caption="0,1" value="0,1"/>
+ <item caption="0,08" value="0,08"/>
+ <item caption="0,05" value="0,05"/>
+ <item caption="6/60" value="6/60"/>
+ <item caption="3/60" value="3/60"/>
+ <item caption="1/18" value="1/18"/>
+ <item caption="1/24" value="1/24"/>
+ <item caption="1/36" value="1/36"/>
+ <item caption="1/60" value="1/60"/>
+ <item caption="FGT" value="FGT"/>
+ <item caption="HBV" value="HBV"/>
+ <item caption="+L+P" value="+L+P"/>
+ <item caption="+L-P" value="+L-P"/>
+ <item caption="-L" value="-L"/>
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ </altitem>
+ </altcombobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption="ETDRS:"/>
+ <combobox name="visus.autoref.etdrs.left" value="Ikke udfyldt" type="search" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <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"/>
+ <item caption="16" value="16"/>
+ <item caption="17" value="17"/>
+ <item caption="18" value="18"/>
+ <item caption="19" value="19"/>
+ <item caption="20" value="20"/>
+ <item caption="21" value="21"/>
+ <item caption="22" value="22"/>
+ <item caption="23" value="23"/>
+ <item caption="24" value="24"/>
+ <item caption="25" value="25"/>
+ <item caption="26" value="26"/>
+ <item caption="27" value="27"/>
+ <item caption="28" value="28"/>
+ <item caption="29" value="29"/>
+ <item caption="30" value="30"/>
+ <item caption="31" value="31"/>
+ <item caption="32" value="32"/>
+ <item caption="33" value="33"/>
+ <item caption="34" value="34"/>
+ <item caption="35" value="35"/>
+ <item caption="36" value="36"/>
+ <item caption="37" value="37"/>
+ <item caption="38" value="38"/>
+ <item caption="39" value="39"/>
+ <item caption="40" value="40"/>
+ <item caption="41" value="41"/>
+ <item caption="42" value="42"/>
+ <item caption="43" value="43"/>
+ <item caption="44" value="44"/>
+ <item caption="45" value="45"/>
+ <item caption="46" value="46"/>
+ <item caption="47" value="47"/>
+ <item caption="48" value="48"/>
+ <item caption="49" value="49"/>
+ <item caption="50" value="50"/>
+ <item caption="51" value="51"/>
+ <item caption="52" value="52"/>
+ <item caption="53" value="53"/>
+ <item caption="54" value="54"/>
+ <item caption="55" value="55"/>
+ <item caption="56" value="56"/>
+ <item caption="57" value="57"/>
+ <item caption="58" value="58"/>
+ <item caption="59" value="59"/>
+ <item caption="60" value="60"/>
+ <item caption="61" value="61"/>
+ <item caption="62" value="62"/>
+ <item caption="63" value="63"/>
+ <item caption="64" value="64"/>
+ <item caption="65" value="65"/>
+ <item caption="66" value="66"/>
+ <item caption="67" value="67"/>
+ <item caption="68" value="68"/>
+ <item caption="69" value="69"/>
+ <item caption="70" value="70"/>
+ <item caption="71" value="71"/>
+ <item caption="72" value="72"/>
+ <item caption="73" value="73"/>
+ <item caption="74" value="74"/>
+ <item caption="75" value="75"/>
+ <item caption="76" value="76"/>
+ <item caption="77" value="77"/>
+ <item caption="78" value="78"/>
+ <item caption="79" value="79"/>
+ <item caption="80" value="80"/>
+ <item caption="81" value="81"/>
+ <item caption="82" value="82"/>
+ <item caption="83" value="83"/>
+ <item caption="84" value="84"/>
+ <item caption="85" value="85"/>
+ <item caption="86" value="86"/>
+ <item caption="87" value="87"/>
+ <item caption="88" value="88"/>
+ <item caption="89" value="89"/>
+ <item caption="90" value="90"/>
+ <item caption="91" value="91"/>
+ <item caption="92" value="92"/>
+ <item caption="93" value="93"/>
+ <item caption="94" value="94"/>
+ <item caption="95" value="95"/>
+ <item caption="96" value="96"/>
+ <item caption="97" value="97"/>
+ <item caption="98" value="98"/>
+ <item caption="99" value="99"/>
+ <item caption="100" value="100"/>
+ </combobox>
+ <spacer/>
+ </frame>
+ </frame>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.autoref.korr.sf.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.autoref.korr.cyl.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.autoref.korr.grader.left" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/visus-egen_korr-1.0.xml b/server/xml/macros/visus-egen_korr-1.0.xml
new file mode 100644
index 0000000..ad346f5
--- /dev/null
+++ b/server/xml/macros/visus-egen_korr-1.0.xml
@@ -0,0 +1,513 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<macro name="visus-egen_korr" version="1.0">
+ <resume language="lua">
+ out = ''
+ if ( getValue('visus.egen_korr.missing.right') == '' )
+ then
+ out = out .. 'Visus, højre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.egen_korr.snellen.right') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.egen_korr.etdrs.right') .. '\n'
+ out = out .. 'Basis: '
+ .. getValue('visus.egen_korr.basis.sf.right') .. ' sf, '
+ .. getValue('visus.egen_korr.basis.cyl.right') .. ' sph '
+ .. getValue('visus.egen_korr.basis.grader.right') .. ' grader.\n'
+ end
+
+ if ( getValue('visus.egen_korr.missing.left') == '' )
+ then
+ out = out .. 'Visus, venstre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.egen_korr.snellen.left') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.egen_korr.etdrs.left') .. '\n'
+ out = out .. 'Basis: '
+ .. getValue('visus.egen_korr.basis.sf.left') .. ' sf, '
+ .. getValue('visus.egen_korr.basis.cyl.left') .. ' sph '
+ .. getValue('visus.egen_korr.basis.grader.left') .. ' grader.\n'
+ end
+
+ return out
+ </resume>
+ <queries>
+ <query service="pracro" class="missing_eye_right" ttl="1000000"/>
+ <query service="pracro" class="missing_eye_left" ttl="1000000"/>
+ </queries>
+ <maps>
+ <map name="missing_eye_right_map">
+ value = 0
+ timestamp = 0
+ source = ''
+
+ if( missing_eye_right )
+ then
+ if( missing_eye_right.value and missing_eye_right.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_right.timestamp
+ source = missing_eye_right.source
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ source = missing_eye_right.source
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = ''
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ source = missing_eye_left.source
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ source = missing_eye_left.source
+ end
+ end
+ return value, timestamp, source
+ </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
+ return false
+ end
+ return true
+ </script>
+ <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="Visus - egen korrektion"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="visus.egen_korr.missing.right" script="right_eye"
+ map="missing_eye_right_map"
+ truevalue="mangler" falsevalue="" value=""/>
+ <frame name="right_eye_frame" caption="Højre øje" layout="vbox">
+ <frame layout="hbox">
+
+ <frame layout="vbox">
+ <label caption="Snellen:"/>
+ <altcombobox name="visus.egen_korr.snellen.right" layout="vbox" type="search" value="Ikke udfyldt" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <item caption="2,0" value="2,0"/>
+ <item caption="1,6" value="1,6"/>
+ <item caption="1,33" value="1,33"/>
+ <item caption="1,0" value="1,0"/>
+ <item caption="0,8" value="0,8"/>
+ <item caption="0,67" value="0,67"/>
+ <item caption="0,5" value="0,5"/>
+ <item caption="0,4" value="0,4"/>
+ <item caption="0,32" value="0,32"/>
+ <item caption="0,25" value="0,25"/>
+ <item caption="0,2" value="0,2"/>
+ <item caption="0,16" value="0,16"/>
+ <item caption="0,125" value="0,125"/>
+ <item caption="0,1" value="0,1"/>
+ <item caption="0,08" value="0,08"/>
+ <item caption="0,05" value="0,05"/>
+ <item caption="6/60" value="6/60"/>
+ <item caption="3/60" value="3/60"/>
+ <item caption="1/18" value="1/18"/>
+ <item caption="1/24" value="1/24"/>
+ <item caption="1/36" value="1/36"/>
+ <item caption="1/60" value="1/60"/>
+ <item caption="FGT" value="FGT"/>
+ <item caption="HBV" value="HBV"/>
+ <item caption="+L+P" value="+L+P"/>
+ <item caption="+L-P" value="+L-P"/>
+ <item caption="-L" value="-L"/>
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ </altitem>
+ </altcombobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption="ETDRS:"/>
+ <combobox name="visus.egen_korr.etdrs.right" value="Ikke udfyldt" type="search" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <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"/>
+ <item caption="16" value="16"/>
+ <item caption="17" value="17"/>
+ <item caption="18" value="18"/>
+ <item caption="19" value="19"/>
+ <item caption="20" value="20"/>
+ <item caption="21" value="21"/>
+ <item caption="22" value="22"/>
+ <item caption="23" value="23"/>
+ <item caption="24" value="24"/>
+ <item caption="25" value="25"/>
+ <item caption="26" value="26"/>
+ <item caption="27" value="27"/>
+ <item caption="28" value="28"/>
+ <item caption="29" value="29"/>
+ <item caption="30" value="30"/>
+ <item caption="31" value="31"/>
+ <item caption="32" value="32"/>
+ <item caption="33" value="33"/>
+ <item caption="34" value="34"/>
+ <item caption="35" value="35"/>
+ <item caption="36" value="36"/>
+ <item caption="37" value="37"/>
+ <item caption="38" value="38"/>
+ <item caption="39" value="39"/>
+ <item caption="40" value="40"/>
+ <item caption="41" value="41"/>
+ <item caption="42" value="42"/>
+ <item caption="43" value="43"/>
+ <item caption="44" value="44"/>
+ <item caption="45" value="45"/>
+ <item caption="46" value="46"/>
+ <item caption="47" value="47"/>
+ <item caption="48" value="48"/>
+ <item caption="49" value="49"/>
+ <item caption="50" value="50"/>
+ <item caption="51" value="51"/>
+ <item caption="52" value="52"/>
+ <item caption="53" value="53"/>
+ <item caption="54" value="54"/>
+ <item caption="55" value="55"/>
+ <item caption="56" value="56"/>
+ <item caption="57" value="57"/>
+ <item caption="58" value="58"/>
+ <item caption="59" value="59"/>
+ <item caption="60" value="60"/>
+ <item caption="61" value="61"/>
+ <item caption="62" value="62"/>
+ <item caption="63" value="63"/>
+ <item caption="64" value="64"/>
+ <item caption="65" value="65"/>
+ <item caption="66" value="66"/>
+ <item caption="67" value="67"/>
+ <item caption="68" value="68"/>
+ <item caption="69" value="69"/>
+ <item caption="70" value="70"/>
+ <item caption="71" value="71"/>
+ <item caption="72" value="72"/>
+ <item caption="73" value="73"/>
+ <item caption="74" value="74"/>
+ <item caption="75" value="75"/>
+ <item caption="76" value="76"/>
+ <item caption="77" value="77"/>
+ <item caption="78" value="78"/>
+ <item caption="79" value="79"/>
+ <item caption="80" value="80"/>
+ <item caption="81" value="81"/>
+ <item caption="82" value="82"/>
+ <item caption="83" value="83"/>
+ <item caption="84" value="84"/>
+ <item caption="85" value="85"/>
+ <item caption="86" value="86"/>
+ <item caption="87" value="87"/>
+ <item caption="88" value="88"/>
+ <item caption="89" value="89"/>
+ <item caption="90" value="90"/>
+ <item caption="91" value="91"/>
+ <item caption="92" value="92"/>
+ <item caption="93" value="93"/>
+ <item caption="94" value="94"/>
+ <item caption="95" value="95"/>
+ <item caption="96" value="96"/>
+ <item caption="97" value="97"/>
+ <item caption="98" value="98"/>
+ <item caption="99" value="99"/>
+ <item caption="100" value="100"/>
+ </combobox>
+ <spacer/>
+ </frame>
+ </frame>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label/>
+ <label caption="Basis:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.egen_korr.basis.sf.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.egen_korr.basis.cyl.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.egen_korr.basis.grader.right" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="visus.egen_korr.missing.left" script="left_eye"
+ map="missing_eye_left_map"
+ truevalue="mangler" falsevalue="" value=""/>
+ <frame name="left_eye_frame" caption="Venstre øje" layout="vbox">
+ <frame layout="hbox">
+
+ <frame layout="vbox">
+ <label caption="Snellen:"/>
+ <altcombobox name="visus.egen_korr.snellen.left" layout="vbox" type="search" value="Ikke udfyldt" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <item caption="2,0" value="2,0"/>
+ <item caption="1,6" value="1,6"/>
+ <item caption="1,33" value="1,33"/>
+ <item caption="1,0" value="1,0"/>
+ <item caption="0,8" value="0,8"/>
+ <item caption="0,67" value="0,67"/>
+ <item caption="0,5" value="0,5"/>
+ <item caption="0,4" value="0,4"/>
+ <item caption="0,32" value="0,32"/>
+ <item caption="0,25" value="0,25"/>
+ <item caption="0,2" value="0,2"/>
+ <item caption="0,16" value="0,16"/>
+ <item caption="0,125" value="0,125"/>
+ <item caption="0,1" value="0,1"/>
+ <item caption="0,08" value="0,08"/>
+ <item caption="0,05" value="0,05"/>
+ <item caption="6/60" value="6/60"/>
+ <item caption="3/60" value="3/60"/>
+ <item caption="1/18" value="1/18"/>
+ <item caption="1/24" value="1/24"/>
+ <item caption="1/36" value="1/36"/>
+ <item caption="1/60" value="1/60"/>
+ <item caption="FGT" value="FGT"/>
+ <item caption="HBV" value="HBV"/>
+ <item caption="+L+P" value="+L+P"/>
+ <item caption="+L-P" value="+L-P"/>
+ <item caption="-L" value="-L"/>
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ </altitem>
+ </altcombobox>
+ </frame>
+ <frame layout="vbox">
+ <label caption="ETDRS:"/>
+ <combobox name="visus.egen_korr.etdrs.left" value="Ikke udfyldt" type="search" script="not0">
+ <item caption="Ikke udfyldt" value="Ikke udfyldt"/>
+ <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"/>
+ <item caption="16" value="16"/>
+ <item caption="17" value="17"/>
+ <item caption="18" value="18"/>
+ <item caption="19" value="19"/>
+ <item caption="20" value="20"/>
+ <item caption="21" value="21"/>
+ <item caption="22" value="22"/>
+ <item caption="23" value="23"/>
+ <item caption="24" value="24"/>
+ <item caption="25" value="25"/>
+ <item caption="26" value="26"/>
+ <item caption="27" value="27"/>
+ <item caption="28" value="28"/>
+ <item caption="29" value="29"/>
+ <item caption="30" value="30"/>
+ <item caption="31" value="31"/>
+ <item caption="32" value="32"/>
+ <item caption="33" value="33"/>
+ <item caption="34" value="34"/>
+ <item caption="35" value="35"/>
+ <item caption="36" value="36"/>
+ <item caption="37" value="37"/>
+ <item caption="38" value="38"/>
+ <item caption="39" value="39"/>
+ <item caption="40" value="40"/>
+ <item caption="41" value="41"/>
+ <item caption="42" value="42"/>
+ <item caption="43" value="43"/>
+ <item caption="44" value="44"/>
+ <item caption="45" value="45"/>
+ <item caption="46" value="46"/>
+ <item caption="47" value="47"/>
+ <item caption="48" value="48"/>
+ <item caption="49" value="49"/>
+ <item caption="50" value="50"/>
+ <item caption="51" value="51"/>
+ <item caption="52" value="52"/>
+ <item caption="53" value="53"/>
+ <item caption="54" value="54"/>
+ <item caption="55" value="55"/>
+ <item caption="56" value="56"/>
+ <item caption="57" value="57"/>
+ <item caption="58" value="58"/>
+ <item caption="59" value="59"/>
+ <item caption="60" value="60"/>
+ <item caption="61" value="61"/>
+ <item caption="62" value="62"/>
+ <item caption="63" value="63"/>
+ <item caption="64" value="64"/>
+ <item caption="65" value="65"/>
+ <item caption="66" value="66"/>
+ <item caption="67" value="67"/>
+ <item caption="68" value="68"/>
+ <item caption="69" value="69"/>
+ <item caption="70" value="70"/>
+ <item caption="71" value="71"/>
+ <item caption="72" value="72"/>
+ <item caption="73" value="73"/>
+ <item caption="74" value="74"/>
+ <item caption="75" value="75"/>
+ <item caption="76" value="76"/>
+ <item caption="77" value="77"/>
+ <item caption="78" value="78"/>
+ <item caption="79" value="79"/>
+ <item caption="80" value="80"/>
+ <item caption="81" value="81"/>
+ <item caption="82" value="82"/>
+ <item caption="83" value="83"/>
+ <item caption="84" value="84"/>
+ <item caption="85" value="85"/>
+ <item caption="86" value="86"/>
+ <item caption="87" value="87"/>
+ <item caption="88" value="88"/>
+ <item caption="89" value="89"/>
+ <item caption="90" value="90"/>
+ <item caption="91" value="91"/>
+ <item caption="92" value="92"/>
+ <item caption="93" value="93"/>
+ <item caption="94" value="94"/>
+ <item caption="95" value="95"/>
+ <item caption="96" value="96"/>
+ <item caption="97" value="97"/>
+ <item caption="98" value="98"/>
+ <item caption="99" value="99"/>
+ <item caption="100" value="100"/>
+ </combobox>
+ <spacer/>
+ </frame>
+ </frame>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label/>
+ <label caption="Basis:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.egen_korr.basis.sf.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.egen_korr.basis.cyl.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.egen_korr.basis.grader.left" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/visus-optimal_korr-1.0.xml b/server/xml/macros/visus-optimal_korr-1.0.xml
index dcf25fa..75f79c3 100644
--- a/server/xml/macros/visus-optimal_korr-1.0.xml
+++ b/server/xml/macros/visus-optimal_korr-1.0.xml
@@ -1,31 +1,37 @@
<?xml version='1.0' encoding='UTF-8'?>
-<macro name="visus" version="1.0">
+<macro name="visus-optimal_korr" version="1.0">
<resume language="lua">
out = ''
- if ( getValue('visus.optimal_korr.snellen.right.missing') == '' or getValue('visus.optimal_korr.snellen.left.missing') == '' )
+ if ( getValue('visus.optimal_korr.missing.right') == '' )
then
- out = out .. 'Objektivt:\n'
+ out = out .. 'Visus, højre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.optimal_korr.snellen.right') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.optimal_korr.etdrs.right') .. '\n'
+ out = out .. 'Basis: '
+ .. getValue('visus.optimal_korr.basis.sf.right') .. ' sf, '
+ .. getValue('visus.optimal_korr.basis.cyl.right') .. ' sph '
+ .. getValue('visus.optimal_korr.basis.grader.right') .. ' grader.\n'
+ out = out .. 'Korr.: '
+ .. getValue('visus.optimal_korr.korr.sf.right') .. ' sf, '
+ .. getValue('visus.optimal_korr.korr.cyl.right') .. ' sph '
+ .. getValue('visus.optimal_korr.korr.grader.right') .. ' grader.\n'
+ end
- if ( getValue('visus.optimal_korr.snellen.right.missing') == '' )
- then
- out = out .. 'Visus o.dxt. ' .. getValue('visus.optimal_korr.snellen.right') .. '\n'
- out = out .. 'ETDRS o.dxt. ' .. getValue('visus.optimal_korre.etdrs.right') .. '\n'
- out = out .. 'Korr.: ' .. getValue('visus.optimal_korr.snellen.right.korr.basis') .. ' add '
- .. getValue('visus.optimal_korr.snellen.right.korr.sf') .. ' sf, '
- .. getValue('visus.optimal_korr.snellen.right.korr.cyl') .. ' sph '
- .. getValue('visus.optimal_korr.snellen.right.korr.grader') .. ' grader.\n'
- end
-
- if ( getValue('visus.optimal_korr.snellen.left.missing') == '' )
- then
- out = out .. 'Visus o.sin. ' .. getValue('visus.optimal_korr.snellen.left') .. '\n'
- out = out .. 'ETDRS o.sin. ' .. getValue('visus.optimal_korre.etdrs.left') .. '\n'
- out = out .. 'Korr.: ' .. getValue('visus.optimal_korr.snellen.left.korr.basis') .. ' add '
- .. getValue('visus.optimal_korr.snellen.left.korr.sf') .. ' sf, '
- .. getValue('visus.optimal_korr.snellen.left.korr.cyl') .. ' sph '
- .. getValue('visus.optimal_korr.snellen.left.korr.grader') .. ' grader.\n'
- end
+ if ( getValue('visus.optimal_korr.missing.left') == '' )
+ then
+ out = out .. 'Visus, venstre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.optimal_korr.snellen.left') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.optimal_korr.etdrs.left') .. '\n'
+ out = out .. 'Basis: '
+ .. getValue('visus.optimal_korr.basis.sf.left') .. ' sf, '
+ .. getValue('visus.optimal_korr.basis.cyl.left') .. ' sph '
+ .. getValue('visus.optimal_korr.basis.grader.left') .. ' grader.\n'
+ out = out .. 'Korr.: '
+ .. getValue('visus.optimal_korr.korr.sf.left') .. ' sf, '
+ .. getValue('visus.optimal_korr.korr.cyl.left') .. ' sph '
+ .. getValue('visus.optimal_korr.korr.grader.left') .. ' grader.\n'
end
+
return out
</resume>
<queries>
@@ -143,7 +149,7 @@
return true
</script>
</scripts>
- <widgets caption="Visus (B.2.2.1)"
+ <widgets caption="Visus - optimal korrektion"
layout="vbox">
<frame layout="hbox">
@@ -151,7 +157,7 @@
<!-- Højre øje -->
<frame layout="vbox">
<checkbox caption="Der er ikke målt på højre øje"
- name="visus.optimal_korr.snellen.right.missing" script="right_eye"
+ name="visus.optimal_korr.missing.right" script="right_eye"
map="missing_eye_right_map"
truevalue="mangler" falsevalue="" value=""/>
<frame name="right_eye_frame" caption="Højre øje" layout="vbox">
@@ -196,7 +202,7 @@
</frame>
<frame layout="vbox">
<label caption="ETDRS:"/>
- <combobox name="visus.optimal_korre.etdrs.right" value="Ikke udfyldt" type="search" script="not0">
+ <combobox name="visus.optimal_korr.etdrs.right" value="Ikke udfyldt" type="search" script="not0">
<item caption="Ikke udfyldt" value="Ikke udfyldt"/>
<item caption="0" value="0"/>
<item caption="1" value="1"/>
@@ -303,43 +309,51 @@
<spacer/>
</frame>
</frame>
- <frame layout="hbox">
- <frame layout="vbox">
- <label caption=""/>
- <label caption="Korr.:"/>
- </frame>
- <frame layout="vbox">
- <label caption="Basis:"/>
- <combobox name="visus.optimal_korr.snellen.right.korr.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="visus.optimal_korr.snellen.right.korr.sf" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
- </frame>
- <frame layout="vbox">
- <label caption="Cyl:"/>
- <lineedit name="visus.optimal_korr.snellen.right.korr.cyl" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label/>
+ <label caption="Basis:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.optimal_korr.basis.sf.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.optimal_korr.basis.cyl.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.optimal_korr.basis.grader.right" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
</frame>
- <frame layout="vbox">
- <label caption="Grader:"/>
- <lineedit name="visus.optimal_korr.snellen.right.korr.grader" regexp="[\d]+" script="lt359gt0" value=""/>
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.optimal_korr.korr.sf.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.optimal_korr.korr.cyl.right" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.optimal_korr.korr.grader.right" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
</frame>
</frame>
</frame>
</frame>
-
+
<!-- Venstre øje -->
<frame layout="vbox">
<checkbox caption="Der er ikke målt på venstre øje"
- name="visus.optimal_korr.snellen.left.missing" script="left_eye"
+ name="visus.optimal_korr.missing.left" script="left_eye"
map="missing_eye_left_map"
truevalue="mangler" falsevalue="" value=""/>
<frame name="left_eye_frame" caption="Venstre øje" layout="vbox">
@@ -376,15 +390,15 @@
<item caption="+L+P" value="+L+P"/>
<item caption="+L-P" value="+L-P"/>
<item caption="-L" value="-L"/>
- <altitem caption="Andet" value="andet" innerwidget="venstre_snellen_andet" layout="hbox">
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
<label caption="Andet:"/>
- <lineedit name="venstre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
</altitem>
</altcombobox>
</frame>
<frame layout="vbox">
<label caption="ETDRS:"/>
- <combobox name="visus.optimal_korre.etdrs.left" value="Ikke udfyldt" type="search" script="not0">
+ <combobox name="visus.optimal_korr.etdrs.left" value="Ikke udfyldt" type="search" script="not0">
<item caption="Ikke udfyldt" value="Ikke udfyldt"/>
<item caption="0" value="0"/>
<item caption="1" value="1"/>
@@ -490,35 +504,43 @@
</combobox>
<spacer/>
</frame>
- </frame>
- <frame layout="hbox">
- <frame layout="vbox">
- <label caption=""/>
- <label caption="Korr.:"/>
- </frame>
- <frame layout="vbox">
- <label caption="Basis:"/>
- <combobox name="visus.optimal_korr.snellen.left.korr.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="visus.optimal_korr.snellen.left.korr.sf" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
- </frame>
- <frame layout="vbox">
- <label caption="Cyl:"/>
- <lineedit name="visus.optimal_korr.snellen.left.korr.cyl" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label/>
+ <label caption="Basis:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.optimal_korr.basis.sf.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.optimal_korr.basis.cyl.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.optimal_korr.basis.grader.left" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
</frame>
- <frame layout="vbox">
- <label caption="Grader:"/>
- <lineedit name="visus.optimal_korr.snellen.left.korr.grader" regexp="[\d]+" script="lt359gt0" value=""/>
+ <frame layout="hbox">
+ <frame layout="vbox">
+ <label caption=""/>
+ <label caption="Korr.:"/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="visus.optimal_korr.korr.sf.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="visus.optimal_korr.korr.cyl.left" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="visus.optimal_korr.korr.grader.left" regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
</frame>
</frame>
</frame>
diff --git a/server/xml/macros/visus-uden_korr-1.0.xml b/server/xml/macros/visus-uden_korr-1.0.xml
index bcc812b..198b13d 100644
--- a/server/xml/macros/visus-uden_korr-1.0.xml
+++ b/server/xml/macros/visus-uden_korr-1.0.xml
@@ -1,23 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
-<macro name="visus_uden_korr" version="1.0">
+<macro name="visus-uden_korr" version="1.0">
<resume language="lua">
out = ''
- if ( getValue('visus.uden_korr.snellen.right.missing') == '' or getValue('visus.uden_korr.snellen.left.missing') == '' )
+ if ( getValue('visus.uden_korr.missing.right') == '' )
then
- out = out .. 'Synsstyrke uden korrektion:\n'
+ out = out .. 'Visus, højre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.uden_korr.snellen.right') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.uden_korr.etdrs.right') .. '\n'
+ end
- if ( getValue('visus.uden_korr.snellen.right.missing') == '' )
- then
- out = out .. 'Snellen højre øje: ' .. getValue('visus.uden_korr.snellen.right') .. '\n'
- out = out .. 'ETDRS højre øje: ' .. getValue('visus.uden_korr.etdrs.right') .. '\n'
- end
-
- if ( getValue('visus.uden_korr.snellen.left.missing') == '' )
- then
- out = out .. 'Snellen venstre øje: ' .. getValue('visus.uden_korr.snellen.left') .. '\n'
- out = out .. 'ETDRS venstre øje: ' .. getValue('visus.uden_korr.etdrs.left') .. '\n'
- end
+ if ( getValue('visus.uden_korr.missing.left') == '' )
+ then
+ out = out .. 'Visus, venstre øje:\n'
+ out = out .. 'Snellen: ' .. getValue('visus.uden_korr.snellen.left') .. '\n'
+ out = out .. 'ETDRS: ' .. getValue('visus.uden_korr.etdrs.left') .. '\n'
end
+
return out
</resume>
<queries>
@@ -135,7 +133,7 @@
return true
</script>
</scripts>
- <widgets caption="Visus uden korrektion"
+ <widgets caption="Visus - uden korrektion"
layout="vbox">
<frame layout="hbox">
@@ -143,7 +141,7 @@
<!-- Højre øje -->
<frame layout="vbox">
<checkbox caption="Der er ikke målt på højre øje"
- name="visus.uden_korr.snellen.right.missing" script="right_eye"
+ name="visus.uden_korr.missing.right" script="right_eye"
map="missing_eye_right_map"
truevalue="mangler" falsevalue="" value=""/>
<frame name="right_eye_frame" caption="Højre øje" layout="vbox">
@@ -297,11 +295,11 @@
</frame>
</frame>
</frame>
-
+
<!-- Venstre øje -->
<frame layout="vbox">
<checkbox caption="Der er ikke målt på venstre øje"
- name="visus.uden_korr.snellen.left.missing" script="left_eye"
+ name="visus.uden_korr.missing.left" script="left_eye"
map="missing_eye_left_map"
truevalue="mangler" falsevalue="" value=""/>
<frame name="left_eye_frame" caption="Venstre øje" layout="vbox">
@@ -338,9 +336,9 @@
<item caption="+L+P" value="+L+P"/>
<item caption="+L-P" value="+L-P"/>
<item caption="-L" value="-L"/>
- <altitem caption="Andet" value="andet" innerwidget="venstre_snellen_andet" layout="hbox">
+ <altitem caption="Andet" value="andet" innerwidget="hoejre_snellen_andet" layout="hbox">
<label caption="Andet:"/>
- <lineedit name="venstre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
+ <lineedit name="hoejre_snellen_andet" regexp="[0-9]+(,\d+|\d*)"/>
</altitem>
</altcombobox>
</frame>
@@ -452,7 +450,7 @@
</combobox>
<spacer/>
</frame>
- </frame>
+ </frame>
</frame>
</frame>