]> git.plutz.net Git - confetti/commitdiff
therapy dates in prescription view
authorpaul <paul@plutz.net>
Fri, 8 Jul 2016 10:42:30 +0000 (10:42 +0000)
committerpaul <paul@plutz.net>
Fri, 8 Jul 2016 10:42:30 +0000 (10:42 +0000)
svn path=/trunk/; revision=121

pages/prescriptions.sh
static/prescriptions.css
templates/text_prescriptions.sh
templates/view_prescription.sh

index 73c5c2ce59512dc1f0c98cab2a7176309dad3962..fcef09a1d3d636b18d487254e716b38a98869b33 100755 (executable)
@@ -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"
+}
index 0048655321c5563b018cbc7009ab3ffe097f9935..6eebe240a609ee980c84a7a5a0620d9dae62d170 100644 (file)
@@ -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,
index 56a81a0ac4020020cf1afdedce0facc5b44f3193..8934bc7b5d9231725ed23738f9e93144d6e28849 100755 (executable)
@@ -59,6 +59,8 @@ item_name[selfpaid]="Selbst&shy;zah&shy;lend"
 item_name[private]="Pri&shy;vat"
 item_name[compulsory]="Ge&shy;setz&shy;lich"
 
+item_name[therapy_dates]="Be&shy;hand&shy;lungs&shy;ter&shy;mi&shy;ne"
+
 item_name[issuer]="Ausgestellt durch"
 item_name[issuer_from_list]="Aus Liste"
 item_name[issuer_other]="Andere"
index 0fdd871691c7ce1ea4bb86b425ec36c55025af05..ced72413830caa682ff56ef390c0f14714e2417a 100755 (executable)
@@ -96,13 +96,22 @@ done )
   <label for="indicator_reading">$(l10n indicator_reading)</label>
   <span id="indicator_reading">${mpx[indicator_reading]}</span>
 </p>
+</fieldset>
+
+<p class="therapy_dates">
+  <label>$(l10n therapy_dates):</label>
+  $(therapy_dates "$id" \
+    | while read date; do
+      printf '<span>%s</span>' "$date"
+    done
+  )
+</p>
+
 <p class="issuer">
   <label>$(l10n issuer)</label>
   <span id="issuer">$mpx[issuer]</span>
 </p>
 
-</fieldset>
-
 <fieldset class="controls">
 <a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}#${mpx[prescription]}">$(l10n edit)</a>
 <a class="button" href="?p=therapy&amp;id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a>