# Copyright 2016, 2017 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 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 <$(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]:+ }
${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 _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: