X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=84f9cbe81595654dbee001f38898a5649841b737;hp=eb93553fae7d3ca3163d4165b913f47aefdbc017;hb=bafaa4cafbc86cc32e11e24b3f34033ffd84905b;hpb=77b4d29e65e18d7e8abfad0c692574dc4556bc9f diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index eb93553..84f9cbe 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -33,8 +33,13 @@ t_session_note(){ *) c7=checked;; esac +if [ "$note_n" -eq 1 -o -n "${tpy[session${session_n}_note${note_n}]}" ]; then + printf '' +else + printf '' +fi cat < +
@@ -54,43 +59,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,15 +100,15 @@ therapy_sessions(){ sid=session$n -cat < - - -
-EOF + cat <<-EOF +
+ + +
+ EOF } unset c0 c1 c2 c3 c4 c5 c6 c7 @@ -125,46 +124,63 @@ case "$tpy[color]" in esac cat <$(l10n therapy) +

$(l10n therapy)

-
-

$client_name

- < $(l10n prescriptionlist) -
+
+

$client_name

+ < $(l10n prescriptionlist) +
-
-

$(l10n therapy_prescription)

- ${mpx[insurance]} - ${mpx[date]} +
+

$(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)} + ${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[remidy]:+
  • ${mpx[quantity]} ${mpx[remidy]} ${mpx[quantity_weekly]:+($mpx[quantity_weekly] $(l10n weekly))}
  • } - ${mpx[remidy1]:+
  • ${mpx[quantity1]} ${mpx[remidy1]} ${mpx[quantity_weekly1]:+($mpx[quantity_weekly1] $(l10n weekly))}
  • } -
+ + +
${mpx[indicator_reading]}
+
- ${mpx[indicator]:+${mpx[indicator]}} - ${mpx[icd10]:+ ${mpx[icd10]}} +
+ - ${mpx[addcontrib]:+ - - } -
+ +
+ + + +
- - + +EOF - $(therapy_sessions) +therapy_sessions +cat < - - - - - - - - + + + + + + + + WARNING: Background Image not available! - - - + + + + EOF # vi:set filetype=html: