# Copyright 2016 Paul Hänsch # # This file is part of Confetti. # # Confetti is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Confetti is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # 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 \#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 } t_session(){ session_n="$1" sid=session${session_n} if [ "$tpy[${sid}_sigset]" = pos ]; then sigcheck=checked else unset sigcheck fi cat <
$( for n in {1..50}; 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 } 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 <$(l10n therapy)

$(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]:+ }
EOF therapy_sessions cat < WARNING: Background Image not available! EOF # vi:set filetype=html: