save) printf '%s\n' "Speichern";;
cancel) printf '%s\n' "Abbrechen";;
delete) printf '%s\n' "Löschen";;
- therapy) printf '%s\n' "Zur Therapie";;
+
+ therapy) printf '%s\n' "Therapie";;
+ therapies) printf '%s\n' "Therapien";;
prescriptionlist) printf '%s\n' "Zur Verordnungsliste";;
delete_session) printf '%s\n' "Therapiesitzung entfernen";;
[h1 $(l10n therapy)]
[div .patient
- [h2 . $(VCF FN |HTML)]
- [a href="/cards/#${id%.*}.vcf" \< $(l10n client)]
+ [h2 . [a "/cards/#{id%.*}.vcf" ⬅ $(VCF FN |HTML)]]
]
-[div .prescription
- [h2 $(l10n therapy_prescription)]
- [span .insurance . $(MPX insurance |HTML)]
- [span .date [label $(l10n date):] $(MPX date |HTML)]
+[div .therapies
+ [h2 $(l10n therapies)]
+ $(
+ (cd "$_DATA/therapies/"; printf '%s\n' "${id%%.*}".*.tpy) \
+ | while read tpyfile; do
+ [ "$tpyfile" = "${id%%.*}.*.tpy" ] && break
+ tpy="${tpyfile%.tpy}";
+ tpydates="$(sed -En 's;^session[0-9]+_date:;;p;' "$_DATA/therapies/$tpyfile" \
+ | sort \
+ | sed -E ':X;N;$!bX; s;^[\n ]+;;; s;[\n ]+$;;; s;(\n.*\n|\n); - ;;'
+ )"
+ if [ "${tpy%.*}.${tpy#*.}" = "${id}" ]; then
+ printf '[a .item .therapy .current href="/therapies/%s" . %s]' \
+ "${tpy%.*}/${tpy#*.}" "$(HTML "${tpydates:--}")"
+ else
+ printf '[a .item .therapy href="/therapies/%s" . %s]' \
+ "${tpy%.*}/${tpy#*.}" "$(HTML "${tpydates:--}")"
+ fi
+ done |sort -r
+ )
+]
EOF
- if [ "$(MPX prescreviewed)" ]; then
- printf '[label .checkbox .checked for=prescreviewed . %s]' "$(l10n prescreviewed)"
- else
- printf '[label .checkbox for=prescreviewed . %s]' "$(l10n prescreview)"
- fi
-
- field="$(MPX prescno)"
- [ "$field" ] && printf '[span .prescno . %s]' "$(l10n "presc$field")"
- for field in grouptherapy housecall report; do
- [ "$(MPX "$field")" ] && printf '[span .catalogue . %s]' "$(l10n "$field")"
- done
-
+if [ "$mpx" ]; then
+ printf '[div .prescription [h2 %s]' "$(l10n therapy_prescription)"
+
printf '[ul'
for n in '' 0 1 2 3 4 5 6 7 8 9 10; do
remidy="$(MPX remidy$n)"
quantity="$(MPX quantity$n)"
quantity_weekly="$(MPX quantity_weekly$n)"
-
+
if [ "$remidy" -a "$quantity_weekly" ]; then
printf '[li %s %s %s]' "$(HTML "$quantity")" "$(HTML "$remidy")" "$(HTML "$quantity_weekly") $(l10n weekly)"
elif [ "$remidy" ]; then
fi
done
printf ']'
-
+
for field in indicator icd10; do
val="$(MPX "$field")"
[ "$val" ] && printf '[span .%s [label . %s:]%s]' "$field" "$(l10n "$field")" "$(HTML "$val")"
done
-
- addcontrib="$(MPX addcontrib)"
- contribconfirm="$(MPX contribconfirm)"
-
- if [ "$addcontrib" -a "$contribconfirm" ]; then
- printf '[label .checkbox .checked for=addcontrib . %s %s]' "$(l10n contribconfirm)" "$(HTML $contribconfirm)"
- elif [ "$addcontrib" ]; then
- printf '[label .checkbox for=addcontrib . %s]' "$(l10n addcontrib)"
+
+ if [ "$(MPX indicator_reading)" ]; then
+ printf '[h3 %s][p . %s]' \
+ "$(l10n indicator_reading)" "$(MPX indicator_reading |HTML)"
fi
-cat <<EOF
- [input .tab type="checkbox" #indicator_reading][label .tab for=indicator_reading $(l10n indicator_reading)]
- [div .tab . $(MPX indicator_reading |HTML)]
-]
+ printf ']'
+fi
+cat <<EOF
[form #report method=POST action="/therapies/update_therapy.sh"
[hidden "id" "$id"]
input.color[value="#FFF"] + label { background-color: #FFF;}
h1, label.tab, div.tab, fieldset.tab,
-div.patient, div.prescription {
+div.patient, div.prescription, div.therapies {
display: block;
width: 96%;
margin: 0 2%;
}
+div.patient a {
+ text-decoration: none; color: #000;
+}
+
+div.therapies > a {
+ display: inline-block;
+ border: 1px solid black;
+ margin: .5em .5em 0 0; padding: .25em .5em;
+ background-color: #DDF;
+ color: #000;
+}
+div.therapies > a.current {
+ background-color: #CCF;
+}
+
+div.prescription {
+ background-color: #CFF;
+}
+div.prescription h3 {
+ margin-top: .5em;
+}
+
div.prescription span {
display: inline-block;
width: 50%;
padding: .5ex 1ex;
}
-div.prescription ul {margin-top: 0;}
+div.prescription ul {
+ margin-top: .5em;
+ margin-left: 1.5em;
+}
div.prescription label.checkbox,
div.prescription label.radio {
@media(min-width: 800px){
h1, label.tab, div.tab, fieldset.tab,
- div.patient, div.prescription {
+ div.patient, div.prescription, div.therapies {
width: 38%;
margin-right: 0;
}
h1 {display: none;}
-div.patient, div.prescription { margin-top: 1em; }
-div.prescription {
+div.patient, div.prescription, div.therapies { margin-top: .5em; }
+div.prescription, div.therapies {
border: 1px solid black;
- background-color: #EEE;
padding: .125em 1.25ex .5em 1.25ex;
}
div > h2 { margin: 0; border-bottom: 1px solid black; }
+/*
div:nth-child(n+2) > a:first-of-type {
display: block;
margin: .125em 0 .5em 0;
text-decoration: none;
}
+*/
#report fieldset.tab,
#report label.tab {