X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=1821c24530c97b980d31fbad9ba50c87a116ac45;hp=cb3cf26850a0183e2360ce79f7d25f834eb3769e;hb=069a829a781c2799836843fe037dc44d1af5c9db;hpb=fdfc261b61998249782240ecb0d40a10d44936a9 diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index cb3cf26..1821c24 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -1,4 +1,4 @@ -# Copyright 2016 Paul Hänsch +# Copyright 2016, 2017 Paul Hänsch # # This file is part of Confetti. # @@ -15,128 +15,213 @@ # 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 + + if [ "$note_n" -eq 1 -o -n "${tpy[session${session_n}_note${note_n}]}" ]; then + printf '' + else + printf '' + fi + + _checked="$(validate "$tpy[$color]" '#(888|00A|0A0|0AA|A00|A0A|AA0)' '#FFF')" + cat <<-EOF +
+ + + + + + + + + +
+ EOF +} + +t_session(){ + session_n="$1" + + sid=session${session_n} + + if [ "$tpy[${sid}_sigset]" = pos ]; then + sigcheck=checked + else + unset sigcheck + fi + + cat <<-EOF + + + +
+ + $(n=1; + while [ -n "${tpy[session${session_n}_note${n}]+x}" ]; do + if [ -n "${tpy[session${session_n}_note${n}]}" ]; then + x=$n + fi + n=$(($n + 1)) + done + for n in $(seq 1 $((${x:-0} + 3)) ); do t_session_note $session_n $n; done + ) + + +
+ EOF +} + +therapy_sessions(){ + n=1; while [ -n "${tpy[session${n}]}" ]; do + t_session $n + n=$(($n+1)) + done + + sid=session$n + + cat <<-EOF +
+ + +
+ EOF +} + cat < -

Behandlungen

- -
-

Flrbrlprrf Zoidberg

- < zur Patientenliste - Gemeinsame Betriebskrankenkasse der Gesellschaften der Textilgruppe Hof -
- -
-

Verordnung

- -
    -
  • 6x MT
  • -
  • 6x Fango
  • -
- ??? - -
+

$(l10n therapy)

-