summaryrefslogtreecommitdiff
path: root/server/xml/macros/header-1.0.xml
blob: 93af95f44f7975cd6635e53f1e6c997e3311e513 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version='1.0' encoding='UTF-8'?>
<!--
    20090420: Bent Bisballe Nyeng
    Tilføjede '-' til cpr nummeret.

    20090526: Bent Bisballe Nyeng
    Nye min størrelser på lineedits, så navnet altid kan ses.
  -->
<macro name="header" version="1.0">
  <resume/>
  <queries>
    <query service="pentominos" class="cpr" ttl="1000000"/>
    <query service="pentominos" class="referral" ttl="1000000"/>
  </queries>
  <maps>
    <map name="cpr_bindestreg">
      value = 0
      timestamp = 0
      source = 'pentominos'

      if(cpr and cpr.cpr and cpr.cpr.value and cpr.cpr.timestamp and cpr.cpr.source)
      then
        value = string.sub(cpr.cpr.value,1,6) .. '-' .. string.sub(cpr.cpr.value,7,11)
        timestamp = cpr.cpr.timestamp
        source = cpr.cpr.source
      end

      return value, timestamp, source
    </map>
  </maps>
  <scripts>
  </scripts>
  <widgets caption="Patient informationer (B.0)"
          layout="hbox">

    <!-- Patient info -->
    <frame layout="vbox">
      <frame layout="hbox">
        <label caption="Navn:" width="50"/>
        <lineedit name="name" map="cpr.name" readonly="true"
		  value="Patienten kunne ikke findes" width="150"/>
      </frame>
      <frame layout="hbox">
        <label caption="Cpr-nr:" width="50"/>
        <lineedit name="cpr" map="cpr_bindestreg" value="-" readonly="true" width="150"/>
      </frame>
    </frame>

    <!-- Henvisnings info -->
    <frame layout="vbox">
      <frame layout="hbox">
        <label width="100" caption="Henvisende læge:"/>
        <lineedit name="referral.doctor" map="henvisning.doctor" readonly="true"
		  value="Henvisnings informationer kunne ikke findes"/>
      </frame>
      <frame layout="hbox">
        <label width="100" caption="Henvisningskode:"/>
        <lineedit name="referral.diagnosecode" map="henvisning.code" value="-" readonly="true"/>
        <label width="60" caption="Diagnose:"/>
        <lineedit width="100" name="referral.diagnose" map="henvisning.diagnose" value="-" readonly="true"/>
      </frame>
    </frame>

  </widgets>
</macro>