c11bd9de731cd03bcb9d24fe0c1a9d673df7aca1
[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>$(l10n therapy_prescription)</h1>
38 <br>
39 <label for="addcontrib">$(l10n addcontrib)</label>
40 <span id="addcontrib">${mpx[addcontrib]}</span>
41 <label class="checkbox ${mpx[contribconfirm]:+checked}" for="contribconfirm">$(l10n contribconfirm)</label>
42 </fieldset>
43
44 <fieldset class="catalogue">
45 <h2>$(l10n prescription_by_catalogue)</h2>
46 <label class="radio $(check "$mpx[prescno]" first)" for="prescfirst">$(l10n prescfirst)</label>
47 <br>
48 <label class="radio $(check "$mpx[prescno]" follow1)" for="prescfollow1">$(l10n prescfollow1)</label>
49 <br>
50 <label class="radio $(check "$mpx[prescno]" follow2)" for="prescfollow2">$(l10n prescfollow2)</label>
51 <br>
52 <label class="radio $(check "$mpx[prescno]" continual)" for="presccontinual">$(l10n presccontinual)</label>
53 <br>
54 <label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
55
56 <br>
57 <label class="checkbox ${mpx[grouptherapy]:+checked}" for="grouptherapy">$(l10n grouptherapy)</label>
58 <br>
59 <label class="checkbox ${mpx[housecall]:+checked}" for="housecall">$(l10n housecall)</label>
60 <br>
61 <label class="checkbox ${mpx[report]:+checked}" for="report">$(l10n report)</label>
62 </fieldset>
63
64 <fieldset class="description">
65
66 <label for="quantity">$(l10n quantity)</label>
67 <label for="remidy">$(l10n remidy)</label>
68 <label for="quantity_weekly">$(l10n quantity_weekly)</label>
69 <span id="quantity">${mpx[quantity]}</span>
70 <span id="remidy">${mpx[remidy]}</span>
71 <span id="quantity_weekly">${mpx[quantity_weekly]}</span>
72
73 <label for="quantity1">$(l10n quantity)</label>
74 <label for="remidy1">$(l10n remidy)</label>
75 <label for="quantity_weekly1">$(l10n quantity_weekly)</label>
76 <span id="quantity1">${mpx[quantity1]}</span>
77 <span id="remidy1">${mpx[remidy1]}</span>
78 <span id="quantity_weekly1">${mpx[quantity_weekly1]}</span>
79
80 <br>
81 <label for="indicator">$(l10n indicator)</label>
82 <span id="indicator">${mpx[indicator]}</span>
83 <br>
84 <label for="icd10">$(l10n icd10)</label>
85 <span id="icd10">${mpx[icd10]}</span>
86 </fieldset>
87
88 <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">$(l10n prescreviewed)</label>
89
90 <fieldset class="controls">
91 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}">$(l10n edit)</a>
92 <a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>
93 </fieldset>
94
95 </div>
96 END_HTML