From 18ecf2c0b034e25c418a83ecb1adefb9f3f04cd8 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 23 Feb 2016 02:48:32 +0000 Subject: [PATCH] stubs for prescription svn path=/trunk/; revision=80 --- actions/new_prescription.sh | 33 ++++++++++++ globals.sh | 2 +- pages/prescriptions.sh | 31 +++++++++++ templates/edit_prescription.sh | 72 +++++++++++++++++++++++++ templates/prescriptions.css.sh | 95 +++++++++++++++++++++++++++++++++ templates/prescriptions.html.sh | 47 ++++++++++++++++ templates/text_frame.sh | 10 +++- templates/text_prescriptions.sh | 44 +++++++++++++++ 8 files changed, 332 insertions(+), 2 deletions(-) create mode 100755 actions/new_prescription.sh create mode 100755 pages/prescriptions.sh create mode 100755 templates/edit_prescription.sh create mode 100755 templates/prescriptions.css.sh create mode 100755 templates/prescriptions.html.sh create mode 100755 templates/text_prescriptions.sh diff --git a/actions/new_prescription.sh b/actions/new_prescription.sh new file mode 100755 index 0000000..af99cd0 --- /dev/null +++ b/actions/new_prescription.sh @@ -0,0 +1,33 @@ +#!/bin/zsh + +# 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 . + +cgi_post +cgi_refdata + +client="${_POST[client]}" + +uid=$(uuidgenerator) +prescription="${client%.vcf}.${uid}.mpx" + +tempfile="$_DATA/temp/$prescription" + +cat >"$tempfile" <. + +source "$_EXEC/pages/cards.sh" + +list_prescriptions(){} + +edit_prescription(){ + id="$1" + prescfile="$_DATA/prescriptions/$id" + tempfile="$_DATA/temp/$id" + [ -f "$tempfile" ] && prescfile="$tempfile" + + . "$_EXEC/templates/edit_prescription.sh" +} diff --git a/templates/edit_prescription.sh b/templates/edit_prescription.sh new file mode 100755 index 0000000..d4dce32 --- /dev/null +++ b/templates/edit_prescription.sh @@ -0,0 +1,72 @@ +# 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 . + +cat < + + + + + + + + + + + + + + + + +

$(l10n prescription_by_catalogue)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +END_HTML diff --git a/templates/prescriptions.css.sh b/templates/prescriptions.css.sh new file mode 100755 index 0000000..80e61ea --- /dev/null +++ b/templates/prescriptions.css.sh @@ -0,0 +1,95 @@ +# /* +# 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 . + +. ${0%/*}/attendees.css.sh + +cat <. + +edit="${_GET[edit]}" +client="${_GET[client]}" +[ -z "$client" ] && client="${edit%.*.mpx}.vcf" + +cat <$(view_card "$client") + +

$(l10n prescriptions_current)

+ +${edit:+$(edit_prescription "$edit")} + +
+
+ + +
+
+ +$(list_prescriptions "$client" \ + |while read pre; do + view_prescription "$pre" + done +) + +

$(l10n prescriptions_past)

+ +EOF + +# vi:set filetype=html: diff --git a/templates/text_frame.sh b/templates/text_frame.sh index aa5858e..813410c 100755 --- a/templates/text_frame.sh +++ b/templates/text_frame.sh @@ -15,7 +15,15 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -item_name[p_cards]="Teilnehmende" item_name[p_courses]="Kurse" item_name[p_email]="Email" item_name[p_error]="Fehler" + +case $PROFILE in +medical) +item_name[p_cards]="Klienten" +;; +circus) +item_name[p_cards]="Teilnehmende" +;; +esac diff --git a/templates/text_prescriptions.sh b/templates/text_prescriptions.sh new file mode 100755 index 0000000..bdcdef3 --- /dev/null +++ b/templates/text_prescriptions.sh @@ -0,0 +1,44 @@ +# 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 . + +. $_EXEC/templates/text_cards.sh + +item_name[prescriptions_current]="Aktuelle Verschreibungen" +item_name[prescriptions_past]="Vergangene Verschreibungen" +item_name[newprescription]="Neue Verschreibung" +item_name[date]="Datum" +item_name[name]="Name d. Versicherten" +item_name[bday]="geb. am" +item_name[addcontrib]="Zuzahlung" +item_name[contribconfirm]="Zuzahlung erfolgt" +item_name[prescreviewed]="Verordnung geprüft" +item_name[quantity]="Verordnungmenge" +item_name[remidy]="Heilmittel nach Maßgabe des Kataloges" +item_name[prescfirst]="Erstverordnung" +item_name[prescfollow1]="1. Folgeverordnung" +item_name[prescfollow2]="2. Folgeverordnung" +item_name[prescother]="Verordnung außerhalb des Regelfalls" +item_name[presccontinual]="Langfristverordnung" +item_name[grouptherapy]="Gruppentherapie" +item_name[housecall]="Hausbesuch" +item_name[report]="Therapiebericht" +item_name[indicator]="Indikationsschlüssel" +item_name[icd10]="ICD-10-Code" +item_name[insurance]="Krankenkasse bzw. Kostenträger" +item_name[prescription_by_catalogue]="Verordnung nach Maßgabe des Kataloges (Regelfall)" +item_name[therapy_start]="Behandlungsbeginn spätest. am" +item_name[quantity_weekly]="Anzahl pro Woche" -- 2.39.2