]> git.plutz.net Git - confetti/blob - templates/view_prescription.sh
df89cdba5b2db646fc1aeb666ebb5f4fea45cdf0
[confetti] / templates / view_prescription.sh
1 # Copyright 2016 Paul Hänsch
2 #
3 # This file is part of Confetti.
4
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
17
18 check(){ [ "$1" = "$2" ] && printf checked}
19
20 cat <<END_HTML
21 <div class="prescription">
22 <fieldset class="baseinfo">
23 <label for="insurance">$(l10n insurance)</label>
24 <span id="insurance">${mpx[insurance]}</span>
25 <br>
26 <label for="name">$(l10n name)</label>
27 <label for="bday">$(l10n bday)</label>
28 <span id="name">${mpx[name]}</span>
29 <span id="bday">${mpx[bday]}</span>
30
31 <br>
32 <label for="date">$(l10n date)</label>
33 <span id="date">${mpx[date]}</span>
34 </fieldset>
35
36 <fieldset class="misc">
37 <h1 id="${mpx[prescription]}">$(l10n therapy_prescription)</h1>
38 <br>
39 <label for="addcontrib">$(l10n addcontrib)</label>
40 <span id="addcontrib">${mpx[addcontrib]}</span>
41 <label for="contribconfirm">$(l10n contribconfirm)</label>
42 <span id="contribconfirm">${mpx[contribconfirm]}</span>
43 <label class="checkbox ${mpx[contribreceipt]:+checked}" for="contribreceipt">$(l10n contribreceipt)</label>
44 </fieldset>
45
46 <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
47   $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
48                                    || printf %s "$(l10n prescreview)" )
49 </label>
50
51 <fieldset class="catalogue">
52 <h2>$(l10n prescription_by_catalogue)</h2>
53 <label class="radio $(check "$mpx[prescno]" first)" for="prescfirst">$(l10n prescfirst)</label>
54 <br>
55 <label class="radio $(check "$mpx[prescno]" follow1)" for="prescfollow1">$(l10n prescfollow1)</label>
56 <br>
57 <label class="radio $(check "$mpx[prescno]" follow2)" for="prescfollow2">$(l10n prescfollow2)</label>
58 <br>
59 <label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
60 <br>
61 <label class="radio $(check "$mpx[prescno]" continual)" for="presccontinual">$(l10n presccontinual)</label>
62
63 <br>
64 <label class="checkbox ${mpx[grouptherapy]:+checked}" for="grouptherapy">$(l10n grouptherapy)</label>
65 <br>
66 <label class="checkbox ${mpx[housecall]:+checked}" for="housecall">$(l10n housecall)</label>
67 <br>
68 <label class="checkbox ${mpx[report]:+checked}" for="report">$(l10n report)</label>
69 </fieldset>
70
71 <fieldset class="description">
72
73 <label for="quantity">$(l10n quantity)</label>
74 <label for="remidy">$(l10n remidy)</label>
75 <label for="quantity_weekly">$(l10n quantity_weekly)</label>
76 <span id="quantity">${mpx[quantity]}</span>
77 <span id="remidy">${mpx[remidy]}</span>
78 <span id="quantity_weekly">${mpx[quantity_weekly]}</span>
79
80 <label for="quantity1">$(l10n quantity)</label>
81 <label for="remidy1">$(l10n remidy)</label>
82 <label for="quantity_weekly1">$(l10n quantity_weekly)</label>
83 <span id="quantity1">${mpx[quantity1]}</span>
84 <span id="remidy1">${mpx[remidy1]}</span>
85 <span id="quantity_weekly1">${mpx[quantity_weekly1]}</span>
86
87 <br>
88 <p class="indicator_codes">
89 <label for="indicator">$(l10n indicator)</label>
90 <span id="indicator">${mpx[indicator]}</span>
91 <br>
92 <label for="icd10">$(l10n icd10)</label>
93 <span id="icd10">${mpx[icd10]}</span>
94 </p>
95 <br>
96 <p class="indicator_reading">
97 <label for="indicator_reading">$(l10n indicator_reading)</label>
98 <span id="indicator_reading">${mpx[indicator_reading]}</span>
99 </p>
100 </fieldset>
101
102 <fieldset class="controls">
103 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}#${mpx[prescription]}">$(l10n edit)</a>
104 <a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>
105 </fieldset>
106
107 </div>
108 END_HTML