1 # Copyright 2016 Paul Hänsch
3 # This file is part of Confetti.
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.
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.
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/>.
22 color=session${session_n}_note${note_n}_color
23 unset c0 c1 c2 c3 c4 c5 c6 c7
25 case "$tpy[$color]" in
38 <input class=color type=radio name="$color" value="c000" id=${color}_000 $c0><label for=${color}_000></label>
39 <input class=color type=radio name="$color" value="c001" id=${color}_001 $c1><label for=${color}_001></label>
40 <input class=color type=radio name="$color" value="c010" id=${color}_010 $c2><label for=${color}_010></label>
41 <input class=color type=radio name="$color" value="c011" id=${color}_011 $c3><label for=${color}_011></label>
42 <input class=color type=radio name="$color" value="c100" id=${color}_100 $c4><label for=${color}_100></label>
43 <input class=color type=radio name="$color" value="c101" id=${color}_101 $c5><label for=${color}_101></label>
44 <input class=color type=radio name="$color" value="c110" id=${color}_110 $c6><label for=${color}_110></label>
45 <input class=color type=radio name="$color" value="c111" id=${color}_111 $c7><label for=${color}_111></label>
46 <textarea name="session${session_n}_note${note_n}">${tpy[session${session_n}_note${note_n}]}</textarea>
54 sid=session${session_n}
56 if [ "$tpy[${sid}_sigset]" = pos ]; then
59 elif [ "$tpy[${sid}_sigset]" = neg ]; then
62 elif [ "$tpy[${sid}_signature]" = pos ]; then
71 <input type=hidden name=$sid value=exists>
72 <input class="tab" type="checkbox" id=${sid}_open name="${sid}_open" value="checked" ${tpy[${sid}_open]}>
73 <label class="tab" for="${sid}_open">
74 <span class=no>${session_n}.</span><!--
75 --><span class=date>${tpy[${sid}_date]}</span><!--
76 --><input class="date" name="${sid}_date" value="${tpy[${sid}_date]}" placeholder="$(l10n date)"><!--
77 --><span class=therapist>${tpy[${sid}_therapist]}</span><!--
78 --><input class="therapist" name="${sid}_therapist" value="${tpy[${sid}_therapist]}" placeholder="$(l10n therapist)"><!--
79 --><span class=signature><input type=checkbox name="${sid}_signature" value=pos $sigcheck><button type=submit name=${sid}_sigset value=$sig></button></span>
82 <input class="dotmark ov" type="image" name=dotmark value="$sid" src="/therapies/${id%.tpy}_${sid}.png" alt="">
83 $(n=1; while [ -n "${tpy[${sid}_note${n}]+x}" ]; do
84 t_session_note $session_n $n
87 printf '<button type=submit name=%s_note%s value="">+</button>' "$sid" "$n"
90 <button class=delete type=submit name=delete_session value=${session_n}>$(l10n delete_session)</button>
91 <button type=submit>$(l10n save)</button>
97 n=1; while [ -n "${tpy[session${n}]}" ]; do
105 <fieldset class="tab">
106 <span class=no>…</span><!--
107 --><input class=date name=${sid}_date value="" placeholder="$(l10n date)" /><!--
108 --><input class=therapist name=${sid}_therapist value="" placeholder="$(l10n therapist)" /><!--
109 --><button type=submit name=new_session value=$sid>+</button></span>
110 <input type=hidden name="${sid}_note1" value="">
115 unset c0 c1 c2 c3 c4 c5 c6 c7
116 case "$tpy[color]" in
128 <h1>Behandlungen</h1>
130 <div class="patient">
131 <h2>$client_name</h2>
132 <a href="?p=prescriptions&client=${id%%.*}.vcf">< $(l10n prescriptionlist)</a>
135 <div class="prescription">
136 <h2>$(l10n therapy_prescription)</h2>
137 <span class="insurance">${mpx[insurance]}</span>
138 <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
139 $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
140 || printf %s "$(l10n prescreview)" )
143 ${mpx[remidy]:+ <li>${mpx[quantity]} ${mpx[remidy]}</li>}
144 ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]}</li>}
148 <label class='checkbox ${mpx[contribconfirm]:+checked}' for="addcontrib">
149 $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \
150 || printf %s "$(l10n addcontrib)" )
155 <form method="POST" action="?action=update_therapy">
156 <input type="hidden" name="id" value="${id}">
158 <label class="tab heading">
159 <span class=no>Nr.</span><!--
160 --><span class=date>Datum</span><!--
161 --><span class=therapist>Therapeut</span><!--
162 --><span class=signature>Sig.</span>
167 <fieldset class=color>
168 <input class=color type=radio name=color value="c000" id=c000 $c0><label for=c000></label>
169 <input class=color type=radio name=color value="c001" id=c001 $c1><label for=c001></label>
170 <input class=color type=radio name=color value="c010" id=c010 $c2><label for=c010></label>
171 <input class=color type=radio name=color value="c011" id=c011 $c3><label for=c011></label>
172 <input class=color type=radio name=color value="c100" id=c100 $c4><label for=c100></label>
173 <input class=color type=radio name=color value="c101" id=c101 $c5><label for=c101></label>
174 <input class=color type=radio name=color value="c110" id=c110 $c6><label for=c110></label>
175 <input class=color type=radio name=color value="c111" id=c111 $c7><label for=c111></label>
177 <img class="dotmark bg" src="?action=static_file&name=therapy_background.png" alt="">
182 # vi:set filetype=html: