]> git.plutz.net Git - lobster/commitdiff
stubs for prescription
authorpaul <paul@plutz.net>
Tue, 23 Feb 2016 02:48:32 +0000 (02:48 +0000)
committerpaul <paul@plutz.net>
Tue, 23 Feb 2016 02:48:32 +0000 (02:48 +0000)
svn path=/trunk/; revision=80

actions/new_prescription.sh [new file with mode: 0755]
globals.sh
pages/prescriptions.sh [new file with mode: 0755]
templates/edit_prescription.sh [new file with mode: 0755]
templates/prescriptions.css.sh [new file with mode: 0755]
templates/prescriptions.html.sh [new file with mode: 0755]
templates/text_frame.sh
templates/text_prescriptions.sh [new file with mode: 0755]

diff --git a/actions/new_prescription.sh b/actions/new_prescription.sh
new file mode 100755 (executable)
index 0000000..af99cd0
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>. 
+
+cgi_post
+cgi_refdata
+
+client="${_POST[client]}"
+
+uid=$(uuidgenerator)
+prescription="${client%.vcf}.${uid}.mpx"
+
+tempfile="$_DATA/temp/$prescription"
+
+cat >"$tempfile" <<EOF
+EOF
+
+echo -n "Location: ?p=prescriptions&edit=$prescription\n\n"
index 114dde6bed278cc0f182858efdf0e49192df2a23..3f539ccd5711bd7a1a8fb2d532fcee9fb4708c40 100755 (executable)
@@ -30,7 +30,7 @@ VCF_FIELDS=(PHOTO LOGO FN NICKNAME SOUND GENDER KIND TITLE ROLE ORG MEMBER CATEG
 
 case "${PROFILE}" in
 medical)
-  data_dirs vcard cache temp mappings
+  data_dirs vcard cache temp mappings prescriptions
   [ -z "$NAVIGATION" ] && NAVIGATION=(cards)
 ;;
 circus)
diff --git a/pages/prescriptions.sh b/pages/prescriptions.sh
new file mode 100755 (executable)
index 0000000..b550d78
--- /dev/null
@@ -0,0 +1,31 @@
+#!/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 <http://www.gnu.org/licenses/>. 
+
+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 (executable)
index 0000000..d4dce32
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>. 
+
+cat <<END_HTML
+<form class="prescription" action="?action=update_prescription" method="POST">
+
+<label for="insurance">$(l10n insurance)</label>
+<input id="insurance" name="insurance" value="" placeholder="$(l10n insurance)">
+<label for="name">$(l10n name)</label>
+<textarea id="name" name="name" placeholder="$(l10n name)"></textarea>
+<label for="bday">$(l10n bday)</label>
+<input id="bday" name="bday" value="" placeholder="$(l10n bday)">
+
+<label for="date">$(l10n date)</label>
+<input id="date" name="date" value="" placeholder="$(l10n date)">
+
+<label for="addcontrib">$(l10n addcontrib)</label>
+<input id="addcontrib" name="addcontrib" value="" placeholder="$(l10n addcontrib)">
+<input type="checkbox" id="contribconfirm" name="contribconfirm" value="true">
+<label for="contribconfirm">$(l10n contribconfirm)</label>
+
+<h2>$(l10n prescription_by_catalogue)</h2>
+<input type="radio" id="prescfirst" name="prescno" value="first">
+<label for="prescfirst">$(l10n prescfirst)</label>
+<input type="radio" id="prescfollow1" name="prescno" value="follow1">
+<label for="prescfollow1">$(l10n prescfollow1)</label>
+<input type="radio" id="prescfollow2" name="prescno" value="follow2">
+<label for="prescfollow2">$(l10n prescfollow2)</label>
+<input type="radio" id="prescother" name="prescno" value="other">
+<label for="prescother">$(l10n prescother)</label>
+<input type="radio" id="presccontinual" name="prescno" value="continual">
+<label for="presccontinual">$(l10n presccontinual)</label>
+
+<input type="checkbox" id="grouptherapy" name="grouptherapy" value="true">
+<label for="grouptherapy">$(l10n grouptherapy)</label>
+<input type="checkbox" id="housecall" name="housecall" value="true">
+<label for="housecall">$(l10n housecall)</label>
+<input type="checkbox" id="report" name="report" value="true">
+<label for="report">$(l10n report)</label>
+
+<label for="quantity">$(l10n quantity)</label>
+<input id="quantity" name="quantity" value="" placeholder="$(l10n quantity)">
+<label for="remidy">$(l10n remidy)</label>
+<textarea id="remidy" name="remidy" placeholder="$(l10n remidy)"></textarea>
+<label for="quantity_weekly">$(l10n quantity_weekly)</label>
+<input id="quantity_weekly" name="quantity_weekly" value="" placeholder="$(l10n quantity_weekly)">
+
+<label for="indicator">$(l10n indicator)</label>
+<input id="indicator" name="indicator" value="" placeholder="$(l10n indicator)">
+<label for="icd10">$(l10n icd10)</label>
+<input id="icd10" name="icd10" value="" placeholder="$(l10n icd10)">
+
+<input type="checkbox" id="prescreviewed" name="prescreviewed" value="true">
+<label for="prescreviewed">$(l10n prescreviewed)</label>
+
+
+</form>
+END_HTML
diff --git a/templates/prescriptions.css.sh b/templates/prescriptions.css.sh
new file mode 100755 (executable)
index 0000000..80e61ea
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>. 
+
+. ${0%/*}/attendees.css.sh
+
+cat <<EOF
+/**/
+form.prescription {
+  display: inline-block;
+  position: relative;
+  width: 30%; height: 30em;
+  min-width: 480px;
+  border: 1px solid #000;
+  background-color: #DEF;
+  color: #800;
+  margin: 1em 1ex;
+  padding: 0;
+}
+
+form.prescription * {
+  position: absolute;
+  display: inline-block;
+  left: -50em;
+  font-size: 1em;
+  line-height: 1em;
+  margin: 0; padding: 0;
+}
+form.prescription label {padding-left: .5ex;}
+
+form.prescription input,
+form.prescription textarea {
+  height: 1em;
+  border: 1px solid #800;
+}
+
+label[for=insurance], #insurance {
+  width: 58%;
+  left: 2%;
+  top: .5em;
+}
+#insurance {top: 1.5em;}
+
+label[for=name], #name {
+  width: 38%;
+  left: 2%;
+  top: 3.25em;
+}
+#name {top: 4.25em; height: 4em;}
+
+label[for=bday], #bday {
+  width: 20%;
+  left: 40%;
+  top: 3.25em;
+}
+#bday {top: 4.25em; height: 4em;}
+
+label[for=date], #date {
+  width: 20%;
+  left: 40%;
+  top: 8.5em;
+}
+#date {top: 9.5em;}
+
+label[for=addcontrib], #addcontrib {
+  width: 18%;
+  left: 62%;
+  top: 6.25em;
+}
+#addcontrib {top: 7.25em;}
+
+form.prescription h2 {
+  font-weight: normal;
+  width: 50%;
+  left: 2%;
+  top: 11em;
+}
+
+EOF
+
+# vi:set filetype=css:
diff --git a/templates/prescriptions.html.sh b/templates/prescriptions.html.sh
new file mode 100755 (executable)
index 0000000..9a0dd48
--- /dev/null
@@ -0,0 +1,47 @@
+# 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 <http://www.gnu.org/licenses/>. 
+
+edit="${_GET[edit]}"
+client="${_GET[client]}"
+[ -z "$client" ] && client="${edit%.*.mpx}.vcf"
+
+cat <<EOF
+
+<div id="${card}" class="card">$(view_card "$client")</div>
+
+<h1>$(l10n prescriptions_current)</h1>
+
+${edit:+$(edit_prescription "$edit")}
+
+<div class="newprescription">
+  <form action="?action=new_prescription" method="POST">
+    <input type="hidden" name="client" value="$client">
+    <button type="submit">$(l10n newprescription)</button>
+  </form>
+</div>
+
+$(list_prescriptions "$client" \
+  |while read pre; do 
+    view_prescription "$pre"
+  done
+)
+
+<h1>$(l10n prescriptions_past)</h1>
+
+EOF
+
+# vi:set filetype=html:
index aa5858e5ec8252412954ebe712531b78480f7516..813410ca24f1d9fd5c124081becd6e422284e101 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
-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 (executable)
index 0000000..bdcdef3
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>. 
+
+. $_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"