summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-02-10 13:18:01 +0000
committerdeva <deva>2009-02-10 13:18:01 +0000
commit3f1b036458bf9b348b65c36fa30ecb177800d703 (patch)
treecf9b85167b58718a9e513bf0a2e7cb50c4dfc784
parenta63d7e529482732d147ff41cf2be2a85fa911d08 (diff)
New macros
-rw-r--r--server/xml/macros/B.2.1.3.xml8
-rw-r--r--server/xml/macros/B.2.10.3.xml20
-rw-r--r--server/xml/macros/B.2.2.2.xml2
-rw-r--r--server/xml/macros/B.2.2.3.xml158
-rw-r--r--server/xml/macros/B.2.2.4.1.xml112
-rw-r--r--server/xml/macros/B.2.2.4.2.xml146
-rw-r--r--server/xml/macros/B.2.2.5.xml153
-rw-r--r--server/xml/macros/B.2.2.6.xml184
-rw-r--r--server/xml/macros/B.2.7.3.xml2
-rw-r--r--server/xml/macros/test_lineedit.xml5
10 files changed, 645 insertions, 145 deletions
diff --git a/server/xml/macros/B.2.1.3.xml b/server/xml/macros/B.2.1.3.xml
index 58dab94..caf5213 100644
--- a/server/xml/macros/B.2.1.3.xml
+++ b/server/xml/macros/B.2.1.3.xml
@@ -24,7 +24,13 @@ ${current_eye_disease}</resume>
innerwidget="aktuelle_entry">
<metawidget name="aktuelle_entry" layout="hbox"
- format="På ${eye} øje er der observeret ${observeret}. Symptomerne er opstået ${when} og er efterfølgende ${then}">
+ format="${date} - På ${eye} øje er der observeret ${observeret}. Symptomerne er opstået ${when} og er efterfølgende ${then}">
+
+ <frame layout="vbox">
+ <label caption="Dato:"/>
+ <datetime name="date" fuzziness="2"/>
+ <label caption=""/>
+ </frame>
<frame layout="vbox">
<label caption="Aktuelt øje:"/>
diff --git a/server/xml/macros/B.2.10.3.xml b/server/xml/macros/B.2.10.3.xml
index e82f2c0..d2db0a4 100644
--- a/server/xml/macros/B.2.10.3.xml
+++ b/server/xml/macros/B.2.10.3.xml
@@ -3,10 +3,23 @@
20081202: Lars Bisballe Jensen
Ændret til nyt format i resume og naming scheme.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ Tilføjet felt til yderligere aftaler med patient.
+ -->
<macro name="B.2.10.3" version="1.0">
- <resume>Der informeres om, at behandlingen har til formål at hæmme væksten af de nye blodkar under nethinden. Behandlingen foregår ved en injektion i øjet i lokalbedøvelse, og der kræves månedlig kontrol for at vurdere om behandlingen skal gentages. Der informeres endvidere om at der er en lille risiko for infektion og trykstigning i øjet, mens andre komplikationer er yderst sjældne. På baggrund af informationen giver patienten sit samtykke til behandlingen.
+ <resume language="lua">
+ out = 'Der informeres om, at behandlingen har til formål at hæmme væksten af de nye blodkar under nethinden. Behandlingen foregår ved en injektion i øjet i lokalbedøvelse, og der kræves månedlig kontrol for at vurdere om behandlingen skal gentages. Der informeres endvidere om at der er en lille risiko for infektion og trykstigning i øjet, mens andre komplikationer er yderst sjældne. På baggrund af informationen giver patienten sit samtykke til behandlingen.\n\n'
+
+ out = out .. 'Der er givet informeret samtykke, ' .. getValue('amd.consent') .. '.\n'
-Der er givet informeret samtykke, ${amd.consent}.</resume>
+ if( getValue('amd.agreements') ~= '' )
+ then
+ out = out .. 'Yderligere aftaler med patienten: ' .. getValue('amd.agreements')
+ end
+
+ return out
+ </resume>
<queries>
</queries>
<maps>
@@ -28,6 +41,9 @@ Der er givet informeret samtykke, ${amd.consent}.</resume>
name="amd.consent" value="" truevalue="JA"
falsevalue="" script="check"/>
+ <label caption="Yderligere aftaler med patienten:"/>
+ <lineedit name="amd.agreements" value=""/>
+
<!-- Knapper -->
<frame layout="hbox">
<spacer/>
diff --git a/server/xml/macros/B.2.2.2.xml b/server/xml/macros/B.2.2.2.xml
index 70304dd..0f17643 100644
--- a/server/xml/macros/B.2.2.2.xml
+++ b/server/xml/macros/B.2.2.2.xml
@@ -24,7 +24,7 @@
if ( getValue('lensmeter.left.missing') == '' )
then
out = out .. 'Egen brille venstre øje: ' .. getValue('lensmeter.left.sphere')
- .. ' sf, ' .. gteValue('lensmeter.left.cyl') .. ' cyl '
+ .. ' sf, ' .. getValue('lensmeter.left.cyl') .. ' cyl '
.. getValue('lensmeter.left.axis') .. ' grader.'
end
diff --git a/server/xml/macros/B.2.2.3.xml b/server/xml/macros/B.2.2.3.xml
index 849d80f..363a33d 100644
--- a/server/xml/macros/B.2.2.3.xml
+++ b/server/xml/macros/B.2.2.3.xml
@@ -7,12 +7,70 @@
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
<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>
+ <resume language="lua">
+ out = ''
+ if ( getValue('autorefractor.right.missing') == '' )
+ then
+ out = out .. 'Autorefraktion højre øje: ' .. getValue('autorefractor.right.sphere')
+ .. ' sf, ' .. getValue('autorefractor.right.cyl')
+ .. ' cyl ' .. getValue('autorefractor.right.axis') .. ' grader.\n'
+ end
+
+ if ( getValue('autorefractor.left.missing') == '' )
+ then
+ out = out .. 'Autorefraktion venstre øje: ' .. getValue('autorefractor.left.sphere')
+ .. ' sf, ' .. getValue('autorefractor.left.cyl')
+ .. ' cyl ' .. getValue('autorefractor.left.axis') .. ' 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 = '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">
@@ -57,6 +115,24 @@ Autorefraktion venstre øje: ${autorefractor.left.sphere} sf, ${autorefractor.le
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>
<window caption="Autorefraktion (B.2.2.3)"
layout="vbox">
@@ -64,43 +140,55 @@ Autorefraktion venstre øje: ${autorefractor.left.sphere} sf, ${autorefractor.le
<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 layout="vbox">
+ <checkbox caption="Der kan ikke måles på højre øje"
+ name="autorefractor.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="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>
-
</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 layout="vbox">
+ <checkbox caption="Der kan ikke måles på venstre øje"
+ name="autorefractor.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="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>
diff --git a/server/xml/macros/B.2.2.4.1.xml b/server/xml/macros/B.2.2.4.1.xml
index a92cd50..40c8e85 100644
--- a/server/xml/macros/B.2.2.4.1.xml
+++ b/server/xml/macros/B.2.2.4.1.xml
@@ -7,11 +7,73 @@
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
<macro name="B.2.2.4.1" version="1.0">
- <resume></resume>
+ <resume language="lua">
+ out = ''
+ if ( getValue('oct.right.missing') == '' )
+ then
+ out = out .. 'Central nethindetykkelse, højre: ' .. getValue('oct.right.thickness')
+ .. ' µm\n'
+ end
+
+ if ( getValue('oct.left.missing') == '' )
+ then
+ out = out .. 'Central nethindetykkelse, venstre: ' .. getValue('oct.left.thickness')
+ .. ' µm\n'
+ end
+
+ if ( getValue('oct.comments') ~= '' )
+ then
+ out = out .. getValue('oct.comments') .. '\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 = '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="lt10000gt0">
@@ -23,6 +85,24 @@
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>
<window caption="OCT, u. konklusion (B.2.2.4.1)"
layout="vbox">
@@ -30,19 +110,31 @@
<frame layout="hbox">
<!-- Højre øje -->
- <frame caption="Højre øje" layout="hbox">
- <label caption="Tykkelse:"/>
- <lineedit name="oct.right.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
- <label caption="µm"/>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på højre øje"
+ name="oct.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="Tykkelse:"/>
+ <lineedit name="oct.right.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
+ <label caption="µm"/>
+ </frame>
</frame>
<!-- Venstre øje -->
- <frame caption="Venstre øje" layout="hbox">
- <label caption="Tykkelse:"/>
- <lineedit name="oct.left.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
- <label caption="µm"/>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på venstre øje"
+ name="oct.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="Tykkelse:"/>
+ <lineedit name="oct.left.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
+ <label caption="µm"/>
+ </frame>
+
</frame>
-
</frame>
<!-- Knapper -->
diff --git a/server/xml/macros/B.2.2.4.2.xml b/server/xml/macros/B.2.2.4.2.xml
index 1de45ea..3980234 100644
--- a/server/xml/macros/B.2.2.4.2.xml
+++ b/server/xml/macros/B.2.2.4.2.xml
@@ -7,12 +7,73 @@
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
<macro name="B.2.2.4.2" version="1.0">
- <resume>Central nethindetykkelse, højre: ${oct.right.thickness} µm, ${oct.right.description}.
-Central nethindetykkelse, venstre: ${oct.left.thickness} µm, ${oct.left.description}.</resume>
+ <resume language="lua">
+ out = ''
+ if ( getValue('oct.right.missing') == '' )
+ then
+ out = out .. 'Central nethindetykkelse, højre: ' .. getValue('oct.right.thickness')
+ .. ' µm, ' .. getValue('oct.right.description') .. '.\n'
+ end
+
+ if ( getValue('oct.left.missing') == '' )
+ then
+ out = out .. 'Central nethindetykkelse, venstre: ' .. getValue('oct.left.thickness')
+ .. ' µm, ' .. getValue('oct.left.description') .. '.\n'
+ end
+
+ if ( getValue('oct.comments') ~= '' )
+ then
+ out = out .. getValue('oct.comments') .. '\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 = '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="lt10000gt0">
@@ -24,6 +85,24 @@ Central nethindetykkelse, venstre: ${oct.left.thickness} µm, ${oct.left.descrip
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>
<window caption="OCT, m. konklusion (B.2.2.4.2)"
layout="vbox">
@@ -31,35 +110,48 @@ Central nethindetykkelse, venstre: ${oct.left.thickness} µm, ${oct.left.descrip
<frame layout="hbox">
<!-- Højre øje -->
- <frame caption="Højre øje" layout="hbox">
- <label caption="Tykkelse:"/>
- <lineedit name="oct.right.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
- <label caption="µm"/>
- <combobox name="oct.right.description" type="select" value="">
- <item caption="Pigmentepitelløsning" value="pigmentepitelløsning"/>
- <item caption="Serøs amotio" value="serøs amotio"/>
- <item caption="Cystoidt makulært ødem" value="cystoidt makulært ødem"/>
- <item caption="Subretinal udfyldning" value="subretinal udfyldning"/>
- <item caption="Retinal traktion" value="retinal traktion"/>
- <item caption="Normal" value="normal"/>
- </combobox>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på højre øje"
+ name="oct.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="Tykkelse:"/>
+ <lineedit name="oct.right.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
+ <label caption="µm"/>
+ <combobox name="oct.right.description" type="select" value="">
+ <item caption="Pigmentepitelløsning" value="pigmentepitelløsning"/>
+ <item caption="Serøs amotio" value="serøs amotio"/>
+ <item caption="Cystoidt makulært ødem" value="cystoidt makulært ødem"/>
+ <item caption="Subretinal udfyldning" value="subretinal udfyldning"/>
+ <item caption="Retinal traktion" value="retinal traktion"/>
+ <item caption="Normal" value="normal"/>
+ </combobox>
+ </frame>
</frame>
<!-- Venstre øje -->
- <frame caption="Venstre øje" layout="hbox">
- <label caption="Tykkelse:"/>
- <lineedit name="oct.left.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
- <label caption="µm"/>
- <combobox name="oct.left.description" type="select" value="">
- <item caption="Pigmentepitelløsning" value="pigmentepitelløsning"/>
- <item caption="Serøs amotio" value="serøs amotio"/>
- <item caption="Cystoidt makulært ødem" value="cystoidt makulært ødem"/>
- <item caption="Subretinal udfyldning" value="subretinal udfyldning"/>
- <item caption="Retinal traktion" value="retinal traktion"/>
- <item caption="Normal" value="normal"/>
- </combobox>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på venstre øje"
+ name="oct.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="Tykkelse:"/>
+ <lineedit name="oct.left.thickness" regexp="\d{1,5}" script="lt10000gt0" value=""/>
+ <label caption="µm"/>
+ <combobox name="oct.left.description" type="select" value="">
+ <item caption="Pigmentepitelløsning" value="pigmentepitelløsning"/>
+ <item caption="Serøs amotio" value="serøs amotio"/>
+ <item caption="Cystoidt makulært ødem" value="cystoidt makulært ødem"/>
+ <item caption="Subretinal udfyldning" value="subretinal udfyldning"/>
+ <item caption="Retinal traktion" value="retinal traktion"/>
+ <item caption="Normal" value="normal"/>
+ </combobox>
+ </frame>
+
</frame>
-
</frame>
<frame layout="vbox">
diff --git a/server/xml/macros/B.2.2.5.xml b/server/xml/macros/B.2.2.5.xml
index 9199a1c..feafd6d 100644
--- a/server/xml/macros/B.2.2.5.xml
+++ b/server/xml/macros/B.2.2.5.xml
@@ -7,14 +7,77 @@
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
<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>
+ <resume language="lua">
+ out = ''
+
+ if ( getValue('tonometer.right.missing') == '' or getValue('tonometer.left.missing') == '' )
+ then
+ out = out .. 'Øjentryk:\n'
+ end
+
+ if ( getValue('tonometer.right.missing') == '' )
+ then
+ out = out .. 'Højre øje: ' .. getValue('tonometer.pressure.right') .. ' mmHg\n'
+ end
+
+ if ( getValue('tonometer.left.missing') == '' )
+ then
+ out = out .. 'Venstre øje: ' .. getValue('tonometer.pressure.right') .. ' mmHg\n'
+ end
+
+ if ( getValue('tonometer.right.missing') == '' or getValue('tonometer.left.missing') == '' )
+ then
+ out = out .. getValue('tonometer.device') .. '.\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 = '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="lt80gt0">
@@ -31,6 +94,40 @@ ${tonometer.device}.</resume>
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('tonometer.right.missing') == 'mangler' and getValue('tonometer.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('tonometer.right.missing') == 'mangler' and getValue('tonometer.left.missing') == 'mangler' )
+ then
+ disable('device_frame')
+ else
+ enable('device_frame')
+ end
+
+ return true
+ </script>
</scripts>
<window caption="Øjentryk (B.2.2.5)"
layout="vbox">
@@ -38,30 +135,44 @@ ${tonometer.device}.</resume>
<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 layout="vbox">
+ <checkbox caption="Der kan ikke måles på højre øje"
+ name="tonometer.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="tonometer.pressure.right" regexp="\d{1,2}" script="lt80gt0" value=""/>
+ <label caption="mmHg"/>
+ <spacer/>
+ </frame>
</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 layout="vbox">
+ <checkbox caption="Der kan ikke måles på venstre øje"
+ name="tonometer.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="tonometer.pressure.left" regexp="\d{1,2}" script="lt80gt0" value=""/>
+ <label caption="mmHg"/>
+ <spacer/>
+ </frame>
</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>
+ <frame name="device_frame" layout="vbox">
+ <label caption="Tonometer måling foretaget med:"/>
+ <combobox name="tonometer.device" value="">
+ <item caption="Applanationstonometer" value="Appl"/>
+ <item caption="Lufttonometer" value="Luft"/>
+ </combobox>
+ </frame>
<!-- Knapper -->
<frame layout="hbox">
diff --git a/server/xml/macros/B.2.2.6.xml b/server/xml/macros/B.2.2.6.xml
index 78c862f..37c04e8 100644
--- a/server/xml/macros/B.2.2.6.xml
+++ b/server/xml/macros/B.2.2.6.xml
@@ -7,17 +7,99 @@
20090108: Bent Bisballe Nyeng
Højre/venstre byttet om.
-->
+<!--
+ 20090402: Bent Bisballe Nyeng
+ 'missing eye' tilføjet.
+ -->
<macro name="B.2.2.6" version="1.0">
- <resume store_in_journal="true">Spaltelampe:
-Linsen, højre side: ${slit_lamp.right.observation}
-${slit_lamp.right.additional}
-Linsen, venstre side: ${slit_lamp.left.observation}
-${slit_lamp.left.additional}</resume>
+ <resume language="lua">
+ out = ''
+ if ( getValue('slit_lamp.right.missing') == '' or getValue('slit_lamp.left.missing') == '' )
+ then
+ out = out .. 'Spaltelampe:\n'
+ end
+
+ if ( getValue('slit_lamp.right.missing') == '' )
+ then
+ out = out .. 'Linsen, højre side: ' .. getValue('slit_lamp.right.observation') .. '\n'
+ if ( getValue('slit_lamp.right.additional') ~= '' )
+ then
+ out = out .. 'Supplerende:\n' .. getValue('slit_lamp.right.additional') .. '\n'
+ end
+ end
+
+ if ( getValue('slit_lamp.left.missing') == '' )
+ then
+ out = out .. 'Linsen, venstre side: ' .. getValue('slit_lamp.left.observation') .. '\n'
+ if ( getValue('slit_lamp.left.additional') ~= '' )
+ then
+ out = out .. 'Supplerende:\n' .. getValue('slit_lamp.left.additional') .. '\n'
+ end
+ 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 = '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="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>
<window caption="Spaltelampe (B.2.2.6)"
layout="vbox">
@@ -25,53 +107,65 @@ ${slit_lamp.left.additional}</resume>
<frame layout="hbox">
<!-- Højre øje -->
- <frame caption="Højre øje" layout="vbox">
- <frame layout="hbox">
- <frame layout="vbox">
- <label caption="Linsen:"/>
- <label/>
- </frame>
- <frame layout="vbox">
- <altcombobox name="slit_lamp.right.observation" layout="vbox" value="Ingen katarakt">
- <item caption="Ingen katarakt" value="Ingen katarakt"/>
- <item caption="Katarakt grad 1" value="Katarakt grad 1"/>
- <item caption="Katarakt grad 2" value="Katarakt grad 2"/>
- <item caption="Katarakt grad 3" value="Katarakt grad 3"/>
- <item caption="Pseudofaki" value="Pseudofaki"/>
- <altitem caption="Andet" value="andet" layout="hbox" innerwidget="spaltelampe_hoejre_andet">
- <label caption="Andet:"/>
- <lineedit name="spaltelampe_hoejre_andet"/>
- </altitem>
- </altcombobox>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på højre øje"
+ name="slit_lamp.right.missing" 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="Linsen:"/>
+ <label/>
+ </frame>
+ <frame layout="vbox">
+ <altcombobox name="slit_lamp.right.observation" layout="vbox" value="Ingen katarakt">
+ <item caption="Ingen katarakt" value="Ingen katarakt"/>
+ <item caption="Katarakt grad 1" value="Katarakt grad 1"/>
+ <item caption="Katarakt grad 2" value="Katarakt grad 2"/>
+ <item caption="Katarakt grad 3" value="Katarakt grad 3"/>
+ <item caption="Pseudofaki" value="Pseudofaki"/>
+ <altitem caption="Andet" value="andet" layout="hbox" innerwidget="spaltelampe_hoejre_andet">
+ <label caption="Andet:"/>
+ <lineedit name="spaltelampe_hoejre_andet"/>
+ </altitem>
+ </altcombobox>
+ </frame>
</frame>
+ <label caption="Supplerende:"/>
+ <textedit name="slit_lamp.right.additional" value=""/>
</frame>
- <label caption="Supplerende:"/>
- <textedit name="slit_lamp.right.additional" value=""/>
</frame>
<!-- Venstre øje -->
- <frame caption="Venstre øje" layout="vbox">
- <frame layout="hbox">
- <frame layout="vbox">
- <label caption="Linsen:"/>
- <label/>
- </frame>
- <frame layout="vbox">
- <altcombobox name="slit_lamp.left.observation" layout="vbox" value="Ingen katarakt">
- <item caption="Ingen katarakt" value="Ingen katarakt"/>
- <item caption="Katarakt grad 1" value="Katarakt grad 1"/>
- <item caption="Katarakt grad 2" value="Katarakt grad 2"/>
- <item caption="Katarakt grad 3" value="Katarakt grad 3"/>
- <item caption="Pseudofaki" value="Pseudofaki"/>
- <altitem caption="Andet" value="andet" layout="hbox" innerwidget="spaltelampe_venstre_andet">
- <label caption="Andet:"/>
- <lineedit name="spaltelampe_venstre_andet"/>
- </altitem>
- </altcombobox>
+ <frame layout="vbox">
+ <checkbox caption="Der kan ikke måles på venstre øje"
+ name="slit_lamp.left.missing" 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="Linsen:"/>
+ <label/>
+ </frame>
+ <frame layout="vbox">
+ <altcombobox name="slit_lamp.left.observation" layout="vbox" value="Ingen katarakt">
+ <item caption="Ingen katarakt" value="Ingen katarakt"/>
+ <item caption="Katarakt grad 1" value="Katarakt grad 1"/>
+ <item caption="Katarakt grad 2" value="Katarakt grad 2"/>
+ <item caption="Katarakt grad 3" value="Katarakt grad 3"/>
+ <item caption="Pseudofaki" value="Pseudofaki"/>
+ <altitem caption="Andet" value="andet" layout="hbox" innerwidget="spaltelampe_venstre_andet">
+ <label caption="Andet:"/>
+ <lineedit name="spaltelampe_venstre_andet"/>
+ </altitem>
+ </altcombobox>
+ </frame>
</frame>
+ <label caption="Supplerende:"/>
+ <textedit name="slit_lamp.left.additional" value=""/>
</frame>
- <label caption="Supplerende:"/>
- <textedit name="slit_lamp.left.additional" value=""/>
</frame>
</frame>
diff --git a/server/xml/macros/B.2.7.3.xml b/server/xml/macros/B.2.7.3.xml
index d632330..cbdbb86 100644
--- a/server/xml/macros/B.2.7.3.xml
+++ b/server/xml/macros/B.2.7.3.xml
@@ -35,7 +35,7 @@ ${fluorescens.additional_info}</resume>
<window caption="Konklusion (B.2.7.3)"
layout="vbox">
- <combobox name="fluorescens.conclusion" value="test" script="angiografi_konklusion">
+ <combobox name="fluorescens.conclusion" value="" script="angiografi_konklusion">
<item caption="Atrofiske foranderinger. Der findes ingen behandlingsindikation"
value="Atrofiske foranderinger. Der findes ingen behandlingsindikation." />
<item caption="Pigmentepitelløsning. Der findes ingen behandlingsindikation"
diff --git a/server/xml/macros/test_lineedit.xml b/server/xml/macros/test_lineedit.xml
index 6c79d83..92f33e3 100644
--- a/server/xml/macros/test_lineedit.xml
+++ b/server/xml/macros/test_lineedit.xml
@@ -2,6 +2,7 @@
<macro name="test_lineedit" version="1.0">
<resume></resume>
<queries>
+ <query service="pentominos" class="test" ttl="1000000"/>
</queries>
<maps>
</maps>
@@ -17,8 +18,8 @@
<window caption="Test LineEdit"
layout="vbox">
- <lineedit name="dims" value="tester" script="A" regexp="[0-9]"/>
-
+ <lineedit name="dims" value="tester" script="A" map="test.data" regexp="[0-9]"/>
+
<frame layout="hbox">
<spacer />
<button caption="Reset" action="reset"/>