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