#!/bin/sh # Copyright 2016, 2020 Paul Hänsch # # This file is part of Lobster. # # Lobster 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. # # Lobster 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 Lobster. If not, see . case "$_PATH" in /therapies/therapy.css) . $_EXEC/cgilite/file.sh FILE $_EXEC/therapies/therapy.css return 0 ;; /therapies/*.*_session*.png) if [ -r "$_DATA/$_PATH" ]; then . $_EXEC/cgilite/file.sh FILE "$_DATA/$_PATH" fi return 0 ;; esac . $_EXEC/pdiread.sh . $_EXEC/therapies/l10n.sh # . $_EXEC/cards/widgets.sh # . $_EXEC/cards/list.sh # unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; } # upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; ' BR=' ' id="${_PATH#/therapies/}" id="${id%/*}.${id#*/}" read junkx junky bg_dim junkz <<-E_READ $(identify "$_EXEC/therapies/therapy_background.png") E_READ vcffile="${_DATA}/vcard/${id%.*}.vcf" mpxfile="${_DATA}/prescriptions/${id}.mpx" tpyfile="${_DATA}/therapies/${id}.tpy" vcf="$(pdi_load "$vcffile")" mpx="$(sed '1s;^;\n;; s/:/;:/' "$mpxfile")" tpy="$(sed '1s;^;\n;; s/:/;:/' "$tpyfile")" VCF(){ pdi_value "$vcf" "$@"; } MPX(){ pdi_value "$mpx" "$@"; } TPY(){ pdi_value "$tpy" "$@"; } . $_EXEC/therapies/page.sh \ | yield_page therapy /therapies/therapy.css