summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsenator <senator>2009-08-13 13:21:55 +0000
committersenator <senator>2009-08-13 13:21:55 +0000
commitb326f168c5322429f8ead9a779ceaa8c733a2ed6 (patch)
treed96ded2a7ab37c0a87e68c86443eedce724b7c8e
parent88e6ece973804ac0ed2aae860d9aff30491efe28 (diff)
Initial ref_forunders macro configurtaion. Some lua scripts might not work and resumees need to be corrected.
-rw-r--r--server/xml/macros/akselaengde-1.0.xml155
-rw-r--r--server/xml/macros/boelgefront-1.0.xml28
-rw-r--r--server/xml/macros/central_corneatykkelse-1.0.xml145
-rw-r--r--server/xml/macros/cycloplegisk_refraktion-1.0.xml204
-rw-r--r--server/xml/macros/keratometri-1.0.xml185
-rw-r--r--server/xml/macros/manifest_refraktion-1.0.xml204
-rw-r--r--server/xml/macros/pupilstoerrelse-1.0.xml145
-rw-r--r--server/xml/macros/tonometri-1.0.xml185
-rw-r--r--server/xml/macros/topografi-1.0.xml141
9 files changed, 1392 insertions, 0 deletions
diff --git a/server/xml/macros/akselaengde-1.0.xml b/server/xml/macros/akselaengde-1.0.xml
new file mode 100644
index 0000000..b52ab7c
--- /dev/null
+++ b/server/xml/macros/akselaengde-1.0.xml
@@ -0,0 +1,155 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="akselaengde" version="1.0">
+ <resume language="lua">
+ out = ''
+ out = out .. 'Akselængde:\n'
+ if ( getValue('akselaengde.right.missing') == '' )
+ out = out .. 'Højre øje: ' .. getValue('akselaengde.right.length') .. ' mm'
+ then
+ end
+ if ( getValue('akselaengde.right.missing') == '' )
+ out = out .. 'Venstre øje: ' .. getValue('akselaengde.left.length') .. ' mm'
+ then
+ end
+
+ return out
+</resume>
+ <queries>
+ </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="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>
+ <script language="lua" name="lt40gt10">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= 10 and tonumber(value) &lt;= 40)
+ then
+ return true
+ else
+ return false
+ end
+ </script>
+ </scripts>
+ <widgets caption="Akselængde"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="akselaengde.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 layout="vbox">
+ <label caption="Akselængde:"/>
+ <frame layout="hbox">
+ <lineedit name="akselaengde.right.length" script="lt40gt10"
+ regexp="\d{1,2},\d{2}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="akselaengde.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 layout="vbox">
+ <label caption="Akselængde:"/>
+ <frame layout="hbox">
+ <lineedit name="akselaengde.left.length" script="lt40gt10"
+ regexp="\d{1,2},\d{2}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/boelgefront-1.0.xml b/server/xml/macros/boelgefront-1.0.xml
new file mode 100644
index 0000000..80570de
--- /dev/null
+++ b/server/xml/macros/boelgefront-1.0.xml
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<macro name="boelgefront" version="1.0">
+ <resume language="pracro"></resume>
+ <queries>
+ </queries>
+ <maps>
+ </maps>
+ <scripts>
+ </scripts>
+ <widgets caption="Bølgefront" layout="vbox">
+
+ <altcombobox name="boelgefront" value="Ikke udført" layout="vbox">
+ <item caption="Udført" value="Udført"/>
+ <item caption="Ikke udført" value="Ikke udført"/>
+ <altitem caption="Andet" value="andet" innerwidget="boelgefront_andet">
+ <frame layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="boelgefront_andet"/>
+ </frame>
+ </altitem>
+ </altcombobox>
+
+ <frame layout="hbox">
+ <spacer/>
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/central_corneatykkelse-1.0.xml b/server/xml/macros/central_corneatykkelse-1.0.xml
new file mode 100644
index 0000000..f5ad9ce
--- /dev/null
+++ b/server/xml/macros/central_corneatykkelse-1.0.xml
@@ -0,0 +1,145 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="central_corneatykkelse" version="1.0">
+ <resume language="pracro">Central corneatykkelse:
+Højre øje: ${central_corneatykkelse.right.thickness} mm
+Venstre øje: ${central_corneatykkelse.left.thickness} mm
+</resume>
+ <queries>
+ </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="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>
+ <script language="lua" name="lt1gt0">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= 0 and tonumber(value) &lt;= 1)
+ then
+ return true
+ else
+ return false
+ end
+ </script>
+ </scripts>
+ <widgets caption="Central corneatykkelse"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="central_corneatykkelse.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 layout="vbox">
+ <label caption="Tykkelse:"/>
+ <frame layout="hbox">
+ <lineedit name="central_corneatykkelse.right.thickness" script="lt1gt0"
+ regexp="\d{1},\d{3}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="central_corneatykkelse.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 layout="vbox">
+ <label caption="Tykkelse:"/>
+ <frame layout="hbox">
+ <lineedit name="central_corneatykkelse.left.thickness" script="lt1gt0"
+ regexp="\d{1},\d{3}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/cycloplegisk_refraktion-1.0.xml b/server/xml/macros/cycloplegisk_refraktion-1.0.xml
new file mode 100644
index 0000000..eaa333a
--- /dev/null
+++ b/server/xml/macros/cycloplegisk_refraktion-1.0.xml
@@ -0,0 +1,204 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="cycloplegisk_refraktion" version="1.0">
+ <resume language="lua">
+ out = ''
+ out = out .. 'Cycloplegisk refraktion:\n'
+ if ( getValue('cycloplegisk_refraktion.right.missing') == '' )
+ then
+ out = out .. 'Højre øje: ' .. getValue('cycloplegisk_refraktion.right.sf')
+ .. ' sf, ' .. getValue('cycloplegisk_refraktion.right.cyl') .. ' x '
+ .. getValue('cycloplegisk_refraktion.right.grader') .. '\n'
+ end
+
+ if ( getValue('cycloplegisk_refraktion.left.missing') == '' )
+ then
+ out = out .. 'Venstre øje: ' .. getValue('cycloplegisk_refraktion.left.sf')
+ .. ' sf, ' .. getValue('cycloplegisk_refraktion.left.cyl') .. ' x '
+ .. getValue('cycloplegisk_refraktion.left.grader') .. '\n'
+ end
+
+ return out
+ </resume>
+ <queries>
+ <query class="cycloplegisk_refraktion" ttl="100000"/>
+ <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 = 'pracro'
+
+ if( missing_eye_right )
+ then
+ if( missing_eye_right.value and missing_eye_right.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_right.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = 'pracro'
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ 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="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="Cycloplegisk refraktion"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="cycloplegisk_refraktion.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 layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="cycloplegisk_refraktion.right.sf" map="cycloplegisk_refraktion.right.sphere"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="cycloplegisk_refraktion.right.cyl" map="cycloplegisk_refraktion.right.cyl"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="cycloplegisk_refraktion.right.grader" map="cycloplegisk_refraktion.right.axis"
+ regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="cycloplegisk_refraktion.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 layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="cycloplegisk_refraktion.left.sf" map="cycloplegisk_refraktion.left.sphere"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="cycloplegisk_refraktion.left.cyl" map="cycloplegisk_refraktion.left.cyl"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="cycloplegisk_refraktion.left.grader" map="cycloplegisk_refraktion.left.axis"
+ regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/keratometri-1.0.xml b/server/xml/macros/keratometri-1.0.xml
new file mode 100644
index 0000000..2b54164
--- /dev/null
+++ b/server/xml/macros/keratometri-1.0.xml
@@ -0,0 +1,185 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="keratometri" version="1.0">
+ <resume language="lua">
+ out = ''
+ if ( getValue('keratometri.right.missing') == '' )
+ then
+ out = out .. 'Keratometri, højre øje:\n' ..
+ 'Radius 1: ' .. getValue('keratometri.right.r1') ..
+ 'Radius 2: ' .. getValue('keratometri.right.r2') ..
+ 'Cylinder: ' .. getValue('keratometri.right.x1')
+ end
+
+ if ( getValue('keratometri.left.missing') == '' )
+ then
+ out = out .. 'Keratometri, venstre øje:\n' ..
+ 'Radius 1: ' .. getValue('keratometri.left.r1') ..
+ 'Radius 2: ' .. getValue('keratometri.left.r2') ..
+ 'Cylinder: ' .. getValue('keratometri.left.x1')
+ end
+
+ return out
+ </resume>
+ <queries>
+ <query class="keratometri" ttl="100000"/>
+ <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 = 'pracro'
+
+ if( missing_eye_right )
+ then
+ if( missing_eye_right.value and missing_eye_right.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_right.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = 'pracro'
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ end
+ end
+ return value, timestamp, source
+ </map>
+ </maps>
+ <scripts>
+ <script language="lua" name="lt20gt0">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= 0 and tonumber(value) &lt;= 20)
+ then
+ return true
+ else
+ return false
+ end
+ </script>
+ <script language="lua" name="lt179gt0">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= 0 and tonumber(value) &lt;= 179)
+ then
+ return true
+ else
+ return false
+ end
+ </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="Keratometri"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="keratometri.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 layout="vbox">
+ <label caption="R1:"/>
+ <lineedit name="keratometri.right.r1" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt0" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="R2:"/>
+ <lineedit name="keratometri.right.r2" regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt0" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="X1:"/>
+ <lineedit name="keratometri.right.x1" regexp="[\d]+" script="lt179gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="keratometri.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 layout="vbox">
+ <label caption="R1:"/>
+ <lineedit name="keratometri.left.r1" regexp="\d{1,2},\d{2}" script="lt20gt0" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="R2:"/>
+ <lineedit name="keratometri.left.r2" regexp="\d{1,2},\d{2}" script="lt20gt0" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="X1:"/>
+ <lineedit name="keratometri.left.x1" regexp="[\d]+" script="lt179gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/manifest_refraktion-1.0.xml b/server/xml/macros/manifest_refraktion-1.0.xml
new file mode 100644
index 0000000..b4cb474
--- /dev/null
+++ b/server/xml/macros/manifest_refraktion-1.0.xml
@@ -0,0 +1,204 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="manifest_refraktion" version="1.0">
+ <resume language="lua">
+ out = ''
+ out = out .. 'Manifest refraktion:\n'
+ if ( getValue('manifest_refraktion.right.missing') == '' )
+ then
+ out = out .. 'Højre øje: ' .. getValue('manifest_refraktion.right.sf')
+ .. ' sf, ' .. getValue('manifest_refraktion.right.cyl') .. ' x '
+ .. getValue('manifest_refraktion.right.grader') .. '\n'
+ end
+
+ if ( getValue('manifest_refraktion.left.missing') == '' )
+ then
+ out = out .. 'Venstre øje: ' .. getValue('manifest_refraktion.left.sf')
+ .. ' sf, ' .. getValue('manifest_refraktion.left.cyl') .. ' x '
+ .. getValue('manifest_refraktion.left.grader') .. '\n'
+ end
+
+ return out
+ </resume>
+ <queries>
+ <query class="manifest_refraktion" ttl="100000"/>
+ <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
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = 'pracro'
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ 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="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="Manifest refraktion"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="manifest_refraktion.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 layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="manifest_refraktion.right.sf" map="manifest_refraktion.right.sphere"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="manifest_refraktion.right.cyl" map="manifest_refraktion.right.cyl"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="manifest_refraktion.right.grader" map="manifest_refraktion.right.axis"
+ regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="manifest_refraktion.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 layout="vbox">
+ <label caption="Sf:"/>
+ <lineedit name="manifest_refraktion.left.sf" map="manifest_refraktion.left.sphere"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt20gt-25" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Cyl:"/>
+ <lineedit name="manifest_refraktion.left.cyl" map="manifest_refraktion.left.cyl"
+ regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ </frame>
+ <frame layout="vbox">
+ <label caption="Grader:"/>
+ <lineedit name="manifest_refraktion.left.grader" map="manifest_refraktion.left.axis"
+ regexp="[\d]+" script="lt359gt0" value=""/>
+ </frame>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/pupilstoerrelse-1.0.xml b/server/xml/macros/pupilstoerrelse-1.0.xml
new file mode 100644
index 0000000..7ec4c03
--- /dev/null
+++ b/server/xml/macros/pupilstoerrelse-1.0.xml
@@ -0,0 +1,145 @@
+<?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.
+ -->
+<!--
+ 20090202: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="pupilstoerrelse" version="1.0">
+ <resume language="pracro">Pupilstørrelse:
+Højre øje: ${pupilstoerrelse.right.diameter} mm
+Venstre øje: ${pupilstoerrelse.left.diameter} mm
+</resume>
+ <queries>
+ </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="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>
+ <script language="lua" name="lt12gt0">
+ if(value == '')
+ then
+ return false
+ end
+
+ value = string.gsub(value, ',', '.')
+ if(tonumber(value) &gt;= 0 and tonumber(value) &lt;= 12)
+ then
+ return true
+ else
+ return false
+ end
+ </script>
+ </scripts>
+ <widgets caption="Pupilstørrelse"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="pupilstoerrelse.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 layout="vbox">
+ <label caption="Diameter:"/>
+ <frame layout="hbox">
+ <lineedit name="pupilstoerrelse.right.diameter" script="lt12gt0"
+ regexp="\d{1,2},\d{1}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="pupilstoerrelse.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 layout="vbox">
+ <label caption="Diameter:"/>
+ <frame layout="hbox">
+ <lineedit name="pupilstoerrelse.left.diameter" script="lt12gt0"
+ regexp="\d{1,2},\d{1}" value=""/>
+ <label caption="mm"/>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/tonometri-1.0.xml b/server/xml/macros/tonometri-1.0.xml
new file mode 100644
index 0000000..33171e8
--- /dev/null
+++ b/server/xml/macros/tonometri-1.0.xml
@@ -0,0 +1,185 @@
+<?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.
+ -->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
+<macro name="tonometri" version="1.0">
+ <resume language="lua">
+ out = ''
+
+ if ( getValue('tonometri.right.missing') == '' or getValue('tonometri.left.missing') == '' )
+ then
+ out = out .. getValue('tonometri.device') .. ':\n'
+ end
+
+ if ( getValue('tonometri.right.missing') == '' )
+ then
+ out = out .. 'Højre øje: ' .. getValue('tonometri.pressure.right') .. ' mmHg\n'
+ end
+
+ if ( getValue('tonometri.left.missing') == '' )
+ then
+ out = out .. 'Venstre øje: ' .. getValue('tonometri.pressure.left') .. ' mmHg\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="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>
+ <script language="lua" name="right_eye">
+ if ( value == 'mangler' )
+ then
+ disable('right_eye_frame')
+ else
+ enable('right_eye_frame')
+ end
+
+ if( getValue('tonometri.right.missing') == 'mangler' and getValue('tonometri.left.missing') == 'mangler' )
+ then
+ disable('device_frame')
+ else
+ enable('device_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
+
+ if( getValue('tonometri.right.missing') == 'mangler' and getValue('tonometri.left.missing') == 'mangler' )
+ then
+ disable('device_frame')
+ else
+ enable('device_frame')
+ end
+
+ return true
+ </script>
+ </scripts>
+ <widgets caption="Tonometri"
+ layout="vbox">
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="tonometri.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">
+ <label caption="Tryk:"/>
+ <spacer/>
+ <lineedit name="tonometri.pressure.right" regexp="\d{1,2}" script="lt80gt0" value=""/>
+ <label caption="mmHg"/>
+ <spacer/>
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="tonometri.left.missing" script="left_eye"
+ map="missing_eye_left_map"
+ truevalue="mangler" falsevalue="" value=""/>
+ <frame name="left_eye_frame" caption="Venstre øje" layout="hbox">
+ <label caption="Tryk:"/>
+ <spacer/>
+ <lineedit name="tonometri.pressure.left" regexp="\d{1,2}" script="lt80gt0" value=""/>
+ <label caption="mmHg"/>
+ <spacer/>
+ </frame>
+ </frame>
+
+ </frame>
+
+ <frame name="device_frame" layout="vbox">
+ <label caption="Tonometer måling foretaget med:"/>
+ <combobox name="tonometri.device" value="">
+ <item caption="Lufttonometer" value="Lufttonometri"/>
+ <item caption="Applanationstonometer" value="Applanationstonometri"/>
+ <item caption="Eye Care" value="Eye Care tonometri"/>
+ <item caption="Autonometri" value="Autonometri"/>
+ <item caption="Palpatorisk tonometri" value="Palpatorisk tonometri"/>
+ </combobox>
+ </frame>
+
+ <!-- Knapper -->
+ <frame layout="hbox">
+ <spacer />
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>
diff --git a/server/xml/macros/topografi-1.0.xml b/server/xml/macros/topografi-1.0.xml
new file mode 100644
index 0000000..5c1ac5d
--- /dev/null
+++ b/server/xml/macros/topografi-1.0.xml
@@ -0,0 +1,141 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<macro name="topografi" version="1.0">
+ <resume language="pracro"></resume>
+ <queries>
+ </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
+ else
+ value = 'mangler'
+ timestamp = missing_eye_right.timestamp
+ end
+ end
+ return value, timestamp, source
+ </map>
+ <map name="missing_eye_left_map">
+ value = 0
+ timestamp = 0
+ source = 'pracro'
+
+ if( missing_eye_left )
+ then
+ if( missing_eye_left.value and missing_eye_left.value == '' )
+ then
+ value = ''
+ timestamp = missing_eye_left.timestamp
+ else
+ value = 'mangler'
+ timestamp = missing_eye_left.timestamp
+ 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="Topografi"
+ layout="vbox">
+
+ <altcombobox name="topografi" value="Atlas" layout="vbox">
+ <item caption="Atlas" value="Atlas"/>
+ <item caption="Pentacam" value="Pentacam"/>
+ <item caption="Atlas og Pentacam" value="Atlas og Pentacam"/>
+ <altitem caption="Andet" value="andet" innerwidget="topografi_andet">
+ <frame layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="topografi_andet"/>
+ </frame>
+ </altitem>
+ </altcombobox>
+
+ <frame layout="hbox">
+
+ <!-- Højre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på højre øje"
+ name="topografi.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 layout="vbox">
+ <altcombobox name="topografi.right.judgement" layout="vbox">
+ <item caption="Symmetrisk cornea" value="Symmetrisk cornea"/>
+ <item caption="Regelmæssig astigmatisme" value="Regelmæssig astigmatisme"/>
+ <item caption="Uregelmæssig astigmatisme" value="Uregelmæssig astigmatisme"/>
+ <item caption="Keratoconus" value="Keratoconus"/>
+ <altitem caption="Andet" value="andet" innerwidget="topografi_right_andet">
+ <frame layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="topografi_right_andet"/>
+ </frame>
+ </altitem>
+ </altcombobox>
+ </frame>
+
+ </frame>
+ </frame>
+
+ <!-- Venstre øje -->
+ <frame layout="vbox">
+ <checkbox caption="Der er ikke målt på venstre øje"
+ name="topografi.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 layout="vbox">
+ <altcombobox name="topografi.left.judgement" layout="vbox">
+ <item caption="Symmetrisk cornea" value="Symmetrisk cornea"/>
+ <item caption="Regelmæssig astigmatisme" value="Regelmæssig astigmatisme"/>
+ <item caption="Uregelmæssig astigmatisme" value="Uregelmæssig astigmatisme"/>
+ <item caption="Keratoconus" value="Keratoconus"/>
+ <altitem caption="Andet" value="andet" innerwidget="topografi_left_andet">
+ <frame layout="hbox">
+ <label caption="Andet:"/>
+ <lineedit name="topografi_left_andet"/>
+ </frame>
+ </altitem>
+ </altcombobox>
+ </frame>
+
+ </frame>
+ </frame>
+
+ </frame>
+
+ <frame layout="hbox">
+ <spacer/>
+ <button caption="Gem" action="commit"/>
+ </frame>
+ </widgets>
+</macro>