X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Ftherapy.html.sh;h=6addbed8e60ea1a57e2cd9e108b7ca10b2995764;hp=0c91487cee322764b670f06608a124cf98d7f1fe;hb=1c7bba82f5b6bc81fdedb9e4907019462982a749;hpb=be911da6c63f2129a62dc50f92b749e0f2bb67ee diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index 0c91487..6addbed 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,16 +59,8 @@ 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 @@ -76,19 +73,13 @@ cat <${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" - ) + $( for n in {1..10}; do t_session_note $session_n $n; done ) -
EOF } @@ -147,10 +138,12 @@ cat <$(l10n housecall)} ${mpx[report]:+$(l10n report)} -
    - ${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))}
  • } -
+
    $(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]}} @@ -161,9 +154,13 @@ cat < } + + + +
${mpx[indicator_reading]}
-
+ @@ -173,6 +170,10 @@ cat <$(l10n save)
+ +