X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=1821c24530c97b980d31fbad9ba50c87a116ac45;hp=78122fb48b42a692db0be528c38b09f75e8f983c;hb=069a829a781c2799836843fe037dc44d1af5c9db;hpb=33a8e0e8967077bb2aa63b4bea706dc61d3e42d8 diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index 78122fb..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. # @@ -22,30 +22,26 @@ t_session_note(){ color=session${session_n}_note${note_n}_color unset c0 c1 c2 c3 c4 c5 c6 c7 - case "$tpy[$color]" in - \#888) c0=checked;; - \#00A) c1=checked;; - \#0A0) c2=checked;; - \#0AA) c3=checked;; - \#A00) c4=checked;; - \#A0A) c5=checked;; - \#AA0) c6=checked;; - *) c7=checked;; - esac + if [ "$note_n" -eq 1 -o -n "${tpy[session${session_n}_note${note_n}]}" ]; then + printf '' + else + printf '' + fi -cat < - - - - - - - - - - -EOF + _checked="$(validate "$tpy[$color]" '#(888|00A|0A0|0AA|A00|A0A|AA0)' '#FFF')" + cat <<-EOF +
+ + + + + + + + + +
+ EOF } t_session(){ @@ -54,43 +50,37 @@ t_session(){ 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 < - - -
- - $(n=1; while [ -n "${tpy[${sid}_note${n}]+x}" ]; do - t_session_note $session_n $n - n=$(($n+1)) - done - printf '' "$sid" "$n" - ) - - - -
-EOF + 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(){ @@ -101,146 +91,137 @@ therapy_sessions(){ sid=session$n -cat < - - - -EOF + cat <<-EOF +
+ + +
+ EOF } -unset c0 c1 c2 c3 c4 c5 c6 c7 -case "$tpy[color]" in - \#00A) c1="checked";; - \#0A0) c2="checked";; - \#0AA) c3="checked";; - \#A00) c4="checked";; - \#A0A) c5="checked";; - \#AA0) c6="checked";; - \#FFF) c7="checked";; - *) c0="checked";; -esac - cat <Behandlungen - -
-

$client_name

- < $(l10n prescriptionlist) -
- -
-

$(l10n therapy_prescription)

- ${mpx[insurance]} - ${mpx[date]} - -
    - ${mpx[remidy]:+
  • ${mpx[quantity]} ${mpx[remidy]}
  • } - ${mpx[remidy1]:+
  • ${mpx[quantity1]} ${mpx[remidy1]}
  • } -
- - ${mpx[addcontrib]:+ - - } -
- -
+

$(l10n therapy)

+ +
+

$client_name

+ < $(l10n prescriptionlist) +
+ +
+

$(l10n therapy_prescription)

+ ${mpx[insurance]} + ${mpx[date]} + + + + ${mpx[prescno]:+$(l10n presc${mpx[prescno]})} + ${mpx[grouptherapy]:+$(l10n grouptherapy)} + ${mpx[housecall]:+$(l10n housecall)} + ${mpx[report]:+$(l10n report)} + +
    $(for n in '' {0..10}; do + [ -n "${mpx[remidy$n]}" ] && \ + printf '
  • %s %s %s
  • ' "${mpx[quantity$n]}" \ + "${mpx[remidy$n]}" \ + "${mpx[quantity_weekly$n]:+($mpx[quantity_weekly$n] $(l10n weekly))}" + done)
+ + ${mpx[indicator]:+${mpx[indicator]}} + ${mpx[icd10]:+ ${mpx[icd10]}} + + ${mpx[addcontrib]:+ + + } + + + +
${mpx[indicator_reading]}
+
+ + + +
+ +

$(l10n notes)

+ + +
+ + +
+ +

$(l10n timesheet)

+ + + + $(for n in '' {0..10}; do + printf ' + + + \n' \ + "$mpx[tsgoal${n}]" "$mpx[tsactual${n}]" "$((${mpx[tsgoal${n}]:-0} - ${mpx[tsactual${n}]:-0}))" + done) +
$(l10n time_goal)$(l10n time_actual)$(l10n time_difference)
%s
+ +
+ + + +EOF + +therapy_sessions - $(therapy_sessions) - -
- - - - - - - - +_checked="$(validate "$tpy[penwidth]" '(4|12|36)' '4')" +cat < + + + +
+EOF + +_checked="$(validate "$tpy[color]" '#(0[0A]{2}|A00|A0A|AA0|FFF)' '#000')" +cat < + + + + + + + + - + WARNING: Background Image not available! - - - + + + + EOF + # vi:set filetype=html: