From: paul
Date: Fri, 8 Jul 2016 10:42:30 +0000 (+0000)
Subject: therapy dates in prescription view
X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=92ac3d283a8ad9e441ad14bc5769f3141dd9738e;p=lobster
therapy dates in prescription view
svn path=/trunk/; revision=121
---
diff --git a/pages/prescriptions.sh b/pages/prescriptions.sh
index 73c5c2c..fcef09a 100755
--- a/pages/prescriptions.sh
+++ b/pages/prescriptions.sh
@@ -39,7 +39,6 @@ list_prescription_issuers(){
| sort -u
}
-
edit_prescription(){
id="$1"
prescfile="$_DATA/prescriptions/$id"
@@ -67,3 +66,8 @@ view_prescription(){
. "$_EXEC/templates/view_prescription.sh"
}
+
+therapy_dates(){
+ tpyfile="$_DATA/therapies/${1%.mpx}.tpy"
+ sed -rn 's;^session[0-9]+_date:(.+)$;\1;p' "$tpyfile"
+}
diff --git a/static/prescriptions.css b/static/prescriptions.css
index 0048655..6eebe24 100644
--- a/static/prescriptions.css
+++ b/static/prescriptions.css
@@ -250,43 +250,45 @@ input[name=presctype][value^=altpractition]:checked ~ fieldset,
.description #indicator_reading { width: 100%; display: block;}
.description #indicator_reading { height: 4em;}
- .description .issuer { display: inline-block; width: 50%; padding: 0; padding-top: 0; margin-left: 50%;}
- .description .issuer label:first-of-type {
- display: block;
- position: relative;
- width: 50%; left: -50%; top: 2.25em;
- font-size: 1em;
- text-align: right;
- padding-right: 1ex;
- }
- .description .issuer input[type=radio] + label:before { content: none; }
- .description .issuer input[type=radio] { display: none; }
- .description .issuer input[type=radio] + label {
- display: inline-block;
- width: 50%;
- padding: .25ex 0; margin: 0;
- text-align: center;
- border: 1px solid black;
- }
- .description .issuer input[type=radio]:checked + label {
- font-weight: bold;
- background-color: #FFF;
- border-width: 1px;
- border-bottom: 1px solid #FFF;
- }
- .description .issuer input[type=radio] + label + input + label + select,
- .description .issuer input[type=radio] + label + select + input { display: none; }
- .description .issuer input[type=radio]:checked + label + input + label + select,
- .description .issuer input[type=radio]:checked + label + select + input {
- display: block; width: 100%;
- border: 1px solid black;
- background-color: #FFF;
- border-width: 0 1px 1px 1px;
- padding: .25ex .5ex;
- margin-top: -1px;
- }
- .description .issuer input[type=radio]:checked + label + input + label + select option { display: block;}
- .description span#issuer { width: 100%; height: 3em; padding: 1ex 2ex;}
+.prescription .therapy_dates span { min-width: 8em; margin: 0 .5ex;}
+
+.prescription .issuer { display: inline-block; width: 50%; padding: 0; padding-top: 0; margin-left: 50%;}
+.prescription .issuer label:first-of-type {
+ display: block;
+ position: relative;
+ width: 50%; left: -50%; top: 2.25em;
+ font-size: 1em;
+ text-align: right;
+ padding-right: 1ex;
+ }
+.prescription .issuer input[type=radio] + label:before { content: none; }
+.prescription .issuer input[type=radio] { display: none; }
+.prescription .issuer input[type=radio] + label {
+ display: inline-block;
+ width: 50%;
+ padding: .25ex 0; margin: 0;
+ text-align: center;
+ border: 1px solid black;
+}
+.prescription .issuer input[type=radio]:checked + label {
+ font-weight: bold;
+ background-color: #FFF;
+ border-width: 1px;
+ border-bottom: 1px solid #FFF;
+}
+.prescription .issuer input[type=radio] + label + input + label + select,
+.prescription .issuer input[type=radio] + label + select + input { display: none; }
+.prescription .issuer input[type=radio]:checked + label + input + label + select,
+.prescription .issuer input[type=radio]:checked + label + select + input {
+ display: block; width: 100%;
+ border: 1px solid black;
+ background-color: #FFF;
+ border-width: 0 1px 1px 1px;
+ padding: .25ex .5ex;
+ margin-top: -1px;
+}
+.prescription .issuer input[type=radio]:checked + label + input + label + select option { display: block;}
+.prescription span#issuer { width: 100%; height: 3em; padding: 1ex 2ex;}
.prescription .controls { width: 100%; }
.controls a.button,
diff --git a/templates/text_prescriptions.sh b/templates/text_prescriptions.sh
index 56a81a0..8934bc7 100755
--- a/templates/text_prescriptions.sh
+++ b/templates/text_prescriptions.sh
@@ -59,6 +59,8 @@ item_name[selfpaid]="Selbstzahlend"
item_name[private]="Privat"
item_name[compulsory]="Gesetzlich"
+item_name[therapy_dates]="Behandlungstermine"
+
item_name[issuer]="Ausgestellt durch"
item_name[issuer_from_list]="Aus Liste"
item_name[issuer_other]="Andere"
diff --git a/templates/view_prescription.sh b/templates/view_prescription.sh
index 0fdd871..ced7241 100755
--- a/templates/view_prescription.sh
+++ b/templates/view_prescription.sh
@@ -96,13 +96,22 @@ done )
${mpx[indicator_reading]}
+
+
+
+
+ $(therapy_dates "$id" \
+ | while read date; do
+ printf '%s' "$date"
+ done
+ )
+
+
$mpx[issuer]
-
-