X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=f6533f74d3dc0ca9a111ce145f7b7615e65321a6;hb=c8980226006bdd5a9d518e7d3221dc3d527be321;hp=cb3cf26850a0183e2360ce79f7d25f834eb3769e;hpb=fdfc261b61998249782240ecb0d40a10d44936a9;p=lobster diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index cb3cf26..f6533f7 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -15,27 +15,147 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . +t_session_note(){ + session_n="$1" + note_n="$2" + + color=session${session_n}_note${note_n}_color + unset c0 c1 c2 c3 c4 c5 c6 c7 + + case "$tpy[$color]" in + c000) c0=checked;; + c001) c1=checked;; + c010) c2=checked;; + c011) c3=checked;; + c100) c4=checked;; + c101) c5=checked;; + c110) c6=checked;; + *) c7=checked;; + esac + +cat < + + + + + + + + + ${tpy[session${session_n}_note${note_n}]} + +EOF +} + +t_session(){ + session_n="$1" + + sid=session${session_n} + + if [ "$tpy[${sid}_sigset]" = pos ]; then + sig=neg + sigcheck=checked + elif [ "$tpy[${sid}_sigset]" = neg ]; then + sig=pos + unset sigcheck + elif [ "$tpy[${sid}_signature]" = pos ]; then + sig=neg + sigcheck=checked + else + sig=pos + unset sigcheck + fi + +cat < + + + ${session_n}.${tpy[${sid}_date]}${tpy[${sid}_therapist]} + + + + $(n=1; while [ -n "${tpy[${sid}_note${n}]+x}" ]; do + t_session_note $session_n $n + n=$(($n+1)) + done + printf '+' "$sid" "$n" + ) + + $(l10n delete_session) + $(l10n save) + +EOF +} + +therapy_sessions(){ + n=1; while [ -n "${tpy[session${n}]}" ]; do + t_session $n + n=$(($n+1)) + done + + sid=session$n + +cat < + â¦+ + + + +EOF +} + +unset c0 c1 c2 c3 c4 c5 c6 c7 +case "$tpy[color]" in + c001) c1=checked;; + c010) c2=checked;; + c011) c3=checked;; + c100) c4=checked;; + c101) c5=checked;; + c110) c6=checked;; + c111) c7=checked;; + *) c0=checked;; +esac + cat < Behandlungen - Flrbrlprrf Zoidberg - < zur Patientenliste - Gemeinsame Betriebskrankenkasse der Gesellschaften der Textilgruppe Hof + $client_name + < $(l10n prescriptionlist) - Verordnung - Verordnung geprüft + $(l10n therapy_prescription) + ${mpx[insurance]} + + $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \ + || printf %s "$(l10n prescreview)" ) + - 6x MT - 6x Fango + ${mpx[remidy]:+ ${mpx[quantity]} ${mpx[remidy]}} + ${mpx[remidy1]:+${mpx[quantity1]} ${mpx[remidy1]}} - ??? - Zuzahlung + + ${mpx[addcontrib]:+ + + $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \ + || printf %s "$(l10n addcontrib)" ) + + } + + + Nr.DatumSig. - - - 1.15.10.2015Josh - - - - - - - - - - - - - - -Unfall 3.9.2015 -Bruch Oberarm rechts - - - - - - - - - - - - - -Medikamentenallergie -Komplikationen -6. Rippe instabil - - - - - - - - - - - - - - - - Speichern - - - - - - 2.22.10.2015Josh - - - - - - - - - - - - - - - - - Speichern - + $(therapy_sessions) - - - - - - - - + + + + + + + + - + + EOF