additional prescription fields, improved display of clients and prescriptions
authorpaul <paul@plutz.net>
Fri, 26 Feb 2016 14:31:05 +0000 (14:31 +0000)
committerpaul <paul@plutz.net>
Fri, 26 Feb 2016 14:31:05 +0000 (14:31 +0000)
svn path=/trunk/; revision=87

templates/attendees.css.sh
templates/edit_prescription.sh
templates/prescriptions.css.sh
templates/text_prescriptions.sh
templates/view_client.sh
templates/view_prescription.sh

index 758b1d1..036ad04 100755 (executable)
@@ -142,11 +142,13 @@ cat <<EOF
 
 .card .section.prescriptions ul { margin: 0; padding: 0; }
 .card .section.prescriptions ul li {
 
 .card .section.prescriptions ul { margin: 0; padding: 0; }
 .card .section.prescriptions ul li {
-  display: inline-block;
+  display: block;
   word-wrap: break-word;
   margin: 0 .25ex;
 }
 
   word-wrap: break-word;
   margin: 0 .25ex;
 }
 
+.card .section.prescriptions { width: 40ex;}
+
 form.card .section input[type=text],
 form.card .section input:not([type]),
 form.card .section textarea,
 form.card .section input[type=text],
 form.card .section input:not([type]),
 form.card .section textarea,
index 85eeb20..b916258 100755 (executable)
@@ -41,10 +41,15 @@ cat <<END_HTML
 
 <label for="addcontrib">$(l10n addcontrib)</label>
 <input id="addcontrib" name="addcontrib" value="${mpx[addcontrib]}" placeholder="$(l10n addcontrib)">
 
 <label for="addcontrib">$(l10n addcontrib)</label>
 <input id="addcontrib" name="addcontrib" value="${mpx[addcontrib]}" placeholder="$(l10n addcontrib)">
-<input type="checkbox" id="contribconfirm" name="contribconfirm" value="true" ${mpx[contribconfirm]:+checked}>
 <label for="contribconfirm">$(l10n contribconfirm)</label>
 <label for="contribconfirm">$(l10n contribconfirm)</label>
+<input id="contribconfirm" name="contribconfirm" value="${mpx[contribconfirm]}" placeholder="$(l10n contribconfirm)">
+<input type="checkbox" id="contribreceipt" name="contribreceipt" value="true" ${mpx[contribreceipt]:+checked}>
+<label for="contribreceipt">$(l10n contribreceipt)</label>
 </fieldset>
 
 </fieldset>
 
+<input type="checkbox" id="prescreviewed" name="prescreviewed" value="true" ${mpx[prescreviewed]:+checked}>
+<label for="prescreviewed">$(l10n prescreviewed)</label>
+
 <fieldset class="catalogue">
 <h2>$(l10n prescription_by_catalogue)</h2>
 <input type="radio" id="prescfirst" name="prescno" value="first" $(check "$mpx[prescno]" first)>
 <fieldset class="catalogue">
 <h2>$(l10n prescription_by_catalogue)</h2>
 <input type="radio" id="prescfirst" name="prescno" value="first" $(check "$mpx[prescno]" first)>
@@ -56,11 +61,11 @@ cat <<END_HTML
 <input type="radio" id="prescfollow2" name="prescno" value="follow2" $(check "$mpx[prescno]" follow2)>
 <label for="prescfollow2">$(l10n prescfollow2)</label>
 <br>
 <input type="radio" id="prescfollow2" name="prescno" value="follow2" $(check "$mpx[prescno]" follow2)>
 <label for="prescfollow2">$(l10n prescfollow2)</label>
 <br>
-<input type="radio" id="presccontinual" name="prescno" value="continual" $(check "$mpx[prescno]" continual)>
-<label for="presccontinual">$(l10n presccontinual)</label>
-<br>
 <input type="radio" id="prescother" name="prescno" value="other" $(check "$mpx[prescno]" other)>
 <label for="prescother">$(l10n prescother)</label>
 <input type="radio" id="prescother" name="prescno" value="other" $(check "$mpx[prescno]" other)>
 <label for="prescother">$(l10n prescother)</label>
+<br>
+<input type="radio" id="presccontinual" name="prescno" value="continual" $(check "$mpx[prescno]" continual)>
+<label for="presccontinual">$(l10n presccontinual)</label>
 
 <br>
 <input type="checkbox" id="grouptherapy" name="grouptherapy" value="true" ${mpx[grouptherapy]:+checked}>
 
 <br>
 <input type="checkbox" id="grouptherapy" name="grouptherapy" value="true" ${mpx[grouptherapy]:+checked}>
@@ -96,9 +101,6 @@ cat <<END_HTML
 <input id="icd10" name="icd10" value="${mpx[icd10]}" placeholder="$(l10n icd10)">
 </fieldset>
 
 <input id="icd10" name="icd10" value="${mpx[icd10]}" placeholder="$(l10n icd10)">
 </fieldset>
 
-<input type="checkbox" id="prescreviewed" name="prescreviewed" value="true" ${mpx[prescreviewed]:+checked}>
-<label for="prescreviewed">$(l10n prescreviewed)</label>
-
 <fieldset class="controls">
 <button type="submit" name="action" value="save">$(l10n save)</button>
 <button type="submit" name="action" value="cancel">$(l10n cancel)</button>
 <fieldset class="controls">
 <button type="submit" name="action" value="save">$(l10n save)</button>
 <button type="submit" name="action" value="cancel">$(l10n cancel)</button>
index 91afffa..3374f98 100755 (executable)
@@ -142,10 +142,24 @@ cat <<EOF
     width: 100%;
   }
   .misc label[for=addcontrib],
     width: 100%;
   }
   .misc label[for=addcontrib],
-  .misc #addcontrib {width: 100%;}
-  .misc #addcontrib {text-align: right;}
+  .misc label[for=contribconfirm] {width: 100%;}
+  .misc #addcontrib,
+  .misc #contribconfirm {width: 100%; text-align: right;}
+
+.prescription label[for=prescreviewed] {
+  margin-left: 1ex;
+  font-weight: bold;
+  text-decoration: underline;
+  background-color: #FCC;
+}
+.prescription label[for=prescreviewed].checked,
+.prescription :checked + label[for=prescreviewed] {
+  font-weight: normal;
+  text-decoration: none;
+  background-color: #CFF;
+}
 
 
-.prescription .catalogue { width: 60%; }
+.prescription .catalogue { width: 100%; }
 
   .catalogue h2:nth-of-type(1) {
     font-weight: bold;
 
   .catalogue h2:nth-of-type(1) {
     font-weight: bold;
@@ -154,11 +168,12 @@ cat <<EOF
   }
   .catalogue label {
     display: inline-block;
   }
   .catalogue label {
     display: inline-block;
-    width: 50%;
+    width: 33%;
     margin-right: -.625ex;
     margin-top: .25em;
     vertical-align: top;
   }
     margin-right: -.625ex;
     margin-top: .25em;
     vertical-align: top;
   }
+  .catalogue label[for=presccontinual] { margin-right: 33%;}
 
 .prescription .description { width: 100%; }
   .description * { margin-right: -.625ex; vertical-align: top;}
 
 .prescription .description { width: 100%; }
   .description * { margin-right: -.625ex; vertical-align: top;}
@@ -182,8 +197,6 @@ cat <<EOF
   .description #icd10,
   .description #indicator {width: 20%; text-align: right;}
 
   .description #icd10,
   .description #indicator {width: 20%; text-align: right;}
 
-.prescription label[for=prescreviewed] { margin-left: 1ex; }
-
 .prescription .controls { width: 100%; }
   .controls a.button,
   .controls button[value=save],
 .prescription .controls { width: 100%; }
   .controls a.button,
   .controls button[value=save],
index 77c0421..047dc49 100755 (executable)
@@ -25,14 +25,16 @@ item_name[date]="Datum"
 item_name[name]="Name d. Versicherten"
 item_name[bday]="geb. am"
 item_name[addcontrib]="Zuzahlung"
 item_name[name]="Name d. Versicherten"
 item_name[bday]="geb. am"
 item_name[addcontrib]="Zuzahlung"
-item_name[contribconfirm]="Zuzahlung erfolgt"
+item_name[contribconfirm]="Zuzahlung erfolgt am..."
+item_name[contribreceipt]="Quit&shy;tung heraus&shy;ge&shy;ge&shy;ben"
 item_name[prescreviewed]="Verordnung geprüft"
 item_name[prescreviewed]="Verordnung geprüft"
+item_name[prescreview]="Verordnung prüfen!"
 item_name[quantity]="Ver&shy;ord&shy;nungs&shy;men&shy;ge"
 item_name[remidy]="Heil&shy;mit&shy;tel nach Maß&shy;ga&shy;be des Ka&shy;ta&shy;lo&shy;ges"
 item_name[prescfirst]="Erst&shy;ver&shy;ord&shy;nung"
 item_name[quantity]="Ver&shy;ord&shy;nungs&shy;men&shy;ge"
 item_name[remidy]="Heil&shy;mit&shy;tel nach Maß&shy;ga&shy;be des Ka&shy;ta&shy;lo&shy;ges"
 item_name[prescfirst]="Erst&shy;ver&shy;ord&shy;nung"
-item_name[prescfollow1]="1. Folge&shy;ver&shy;ord&shy;nung"
-item_name[prescfollow2]="2. Folge&shy;ver&shy;ord&shy;nung"
-item_name[prescother]="Ver&shy;ord&shy;nung außer&shy;halb des Re&shy;gel&shy;falls"
+item_name[prescfollow1]="1. Folge-&shy;VO"
+item_name[prescfollow2]="2. Folge-&shy;VO"
+item_name[prescother]="VO außer&shy;halb des Re&shy;gel&shy;falls"
 item_name[presccontinual]="Lang&shy;frist&shy;ver&shy;ord&shy;nung"
 item_name[grouptherapy]="Grup&shy;pen&shy;the&shy;ra&shy;pie"
 item_name[housecall]="Haus&shy;be&shy;such"
 item_name[presccontinual]="Lang&shy;frist&shy;ver&shy;ord&shy;nung"
 item_name[grouptherapy]="Grup&shy;pen&shy;the&shy;ra&shy;pie"
 item_name[housecall]="Haus&shy;be&shy;such"
index c1e3987..4b06268 100755 (executable)
@@ -36,14 +36,10 @@ cat <<END_HTML
     done)
 
     ${values[BDAY]:+<span class="item BDAY"><label>*:</label> ${values[BDAY]}</span>}
     done)
 
     ${values[BDAY]:+<span class="item BDAY"><label>*:</label> ${values[BDAY]}</span>}
-    ${values[X-ZACK-JOINDATE]:+<span class="item X-ZACK-JOINDATE"><label>$(l10n label_join):</label> $values[X-ZACK-JOINDATE]</span>}
-    ${values[X-ZACK-LEAVEDATE]:+<span class="item X-ZACK-LEAVEDATE"><label>$(l10n label_leave):</label> $values[X-ZACK-LEAVEDATE]</span>}
     ${values[SOUND]:+<audio controls="controls" class="item SOUND"><source type="audio/ogg" src="data:audio/ogg;base64,$values[SOUND]" /></audio>}
     ${values[PHOTO]:+<img class="item PHOTO" src="data:image/$tags[PHOTO_TYPE];base64,$values[PHOTO]" />}
     ${values[LOGO]:+<img class="item LOGO" src="data:image/$tags[LOGO_TYPE];base64,$values[LOGO]" />}
     ${values[SOUND]:+<audio controls="controls" class="item SOUND"><source type="audio/ogg" src="data:audio/ogg;base64,$values[SOUND]" /></audio>}
     ${values[PHOTO]:+<img class="item PHOTO" src="data:image/$tags[PHOTO_TYPE];base64,$values[PHOTO]" />}
     ${values[LOGO]:+<img class="item LOGO" src="data:image/$tags[LOGO_TYPE];base64,$values[LOGO]" />}
-  </div><!--
 
 
-  --><div class="section address">
     <h3>$(l10n ADR)</h3>
     $(for n in ADR ADR{0..10}; do
       echo "${values[$n]:+<span class="item ADR">$values[$n]</span>}"
     <h3>$(l10n ADR)</h3>
     $(for n in ADR ADR{0..10}; do
       echo "${values[$n]:+<span class="item ADR">$values[$n]</span>}"
@@ -92,12 +88,15 @@ cat <<END_HTML
     <ul>
     $(find "$_DATA/prescriptions/" -name "${id%.vcf}.*.mpx" \
       | while read pfile; do
     <ul>
     $(find "$_DATA/prescriptions/" -name "${id%.vcf}.*.mpx" \
       | while read pfile; do
-        printf '%s\t%s\t%s\n' "$(grep '^date' "$pfile")" "$(sed -nr 's;^icd10:(.*)$;\1;p' "$pfile")"
-      done \
-      | sort -r | cut -f2 \
-      | while read icd; do
-        printf '<li><a href="?p=prescriptions&amp;client=%s" >%s</a></li>' "${id}" "${icd:-$(l10n no_icd)}"
-      done)
+        printf '%s\t%s\t%s\n'  
+        printf '<li><a href="?p=prescriptions&amp;client=%s" >%s: %s - %s%s</a></li>' \
+          "${id}" \
+          "$(sed -nr 's;^date:(.+)$;\1;p' "$pfile")" \
+          "$(sed -nr 's;^indicator:(.+)$;\1;p' "$pfile")" \
+          "$(sed -nr 's;^quantity:(.+) ?$;\1x ;p' "$pfile")$(sed -nr 's;^remidy:(.+)$;\1;p' "$pfile")" \
+          "$(sed -nr 's;^quantity1:(.+) ?$;,\1x ;p' "$pfile")$(sed -nr 's;^remidy1:(.+)$;\1;p' "$pfile")"
+      done |sort -r
+    )
     </ul>
   </div>
 END_HTML
     </ul>
   </div>
 END_HTML
index c11bd9d..57ff0b6 100755 (executable)
@@ -38,9 +38,16 @@ cat <<END_HTML
 <br>
 <label for="addcontrib">$(l10n addcontrib)</label>
 <span id="addcontrib">${mpx[addcontrib]}</span>
 <br>
 <label for="addcontrib">$(l10n addcontrib)</label>
 <span id="addcontrib">${mpx[addcontrib]}</span>
-<label class="checkbox ${mpx[contribconfirm]:+checked}" for="contribconfirm">$(l10n contribconfirm)</label>
+<label for="contribconfirm">$(l10n contribconfirm)</label>
+<span id="contribconfirm">${mpx[contribconfirm]}</span>
+<label class="checkbox ${mpx[contribreceipt]:+checked}" for="contribreceipt">$(l10n contribreceipt)</label>
 </fieldset>
 
 </fieldset>
 
+<label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
+  $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
+                                   || printf %s "$(l10n prescreview)" )
+</label>
+
 <fieldset class="catalogue">
 <h2>$(l10n prescription_by_catalogue)</h2>
 <label class="radio $(check "$mpx[prescno]" first)" for="prescfirst">$(l10n prescfirst)</label>
 <fieldset class="catalogue">
 <h2>$(l10n prescription_by_catalogue)</h2>
 <label class="radio $(check "$mpx[prescno]" first)" for="prescfirst">$(l10n prescfirst)</label>
@@ -49,9 +56,9 @@ cat <<END_HTML
 <br>
 <label class="radio $(check "$mpx[prescno]" follow2)" for="prescfollow2">$(l10n prescfollow2)</label>
 <br>
 <br>
 <label class="radio $(check "$mpx[prescno]" follow2)" for="prescfollow2">$(l10n prescfollow2)</label>
 <br>
-<label class="radio $(check "$mpx[prescno]" continual)" for="presccontinual">$(l10n presccontinual)</label>
-<br>
 <label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
 <label class="radio $(check "$mpx[prescno]" other)" for="prescother">$(l10n prescother)</label>
+<br>
+<label class="radio $(check "$mpx[prescno]" continual)" for="presccontinual">$(l10n presccontinual)</label>
 
 <br>
 <label class="checkbox ${mpx[grouptherapy]:+checked}" for="grouptherapy">$(l10n grouptherapy)</label>
 
 <br>
 <label class="checkbox ${mpx[grouptherapy]:+checked}" for="grouptherapy">$(l10n grouptherapy)</label>
@@ -85,8 +92,6 @@ cat <<END_HTML
 <span id="icd10">${mpx[icd10]}</span>
 </fieldset>
 
 <span id="icd10">${mpx[icd10]}</span>
 </fieldset>
 
-<label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">$(l10n prescreviewed)</label>
-
 <fieldset class="controls">
 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}">$(l10n edit)</a>
 <a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>
 <fieldset class="controls">
 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}">$(l10n edit)</a>
 <a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>