]> git.plutz.net Git - confetti/commitdiff
additional prescription functions
authorpaul <paul@plutz.net>
Thu, 7 Apr 2016 04:07:58 +0000 (04:07 +0000)
committerpaul <paul@plutz.net>
Thu, 7 Apr 2016 04:07:58 +0000 (04:07 +0000)
svn path=/trunk/; revision=90

actions/update_prescription.sh
actions/update_therapy.sh
templates/edit_prescription.sh
templates/frame.html.sh
templates/prescriptions.css.sh
templates/text_prescriptions.sh
templates/therapy.css.sh
templates/therapy.html.sh
templates/view_client.sh
templates/view_prescription.sh

index 68cb7fdc5082b66bfd41699f9a610cc5829e2025..a0d9371b2849400ae6a843ae0dd9ac5b089591b1 100755 (executable)
@@ -50,4 +50,4 @@ case "${_POST[action]}" in
     ;;
 esac
 
-redirect "?p=prescriptions&client=${client}"
+redirect "?p=prescriptions&client=${client}#${prescription}"
index 43a2e1fdff49cd1421765bf34f0c46e2c1a63e3a..cc95e3965c973da376392d9971fbc1e637dd7445 100755 (executable)
@@ -42,13 +42,38 @@ if [ -n "$_POST[delete_session]" ]; then
 
 elif [ -n "$_POST[new_session]" ]; then
   sid="$_POST[new_session]"
-  printf '%s:exists\n' "$sid" >>"$tempfile"
 
   identify "$_EXEC/templates/therapy_background.png" \
   | sed -r 's;^.* ([0-9]+x[0-9]+) .*$;\1;' \
   | read dim
 
   convert -size "$dim" xc:transparent "${tpyfile%.tpy}_${sid}.png"
+
+  printf '%s:exists\n' "$sid" >>"$tempfile"
+  printf '%s_open:checked\n' "$sid" >>"$tempfile"
+
+elif [ -n "$_POST[dotmark.x]" -a -n "$_POST[dotmark.y]" ]; then
+  sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \
+  | sort -n \
+  | tail -n1 \
+  | read sid
+
+  x="$_POST[dotmark.x]"
+  y="$_POST[dotmark.y]"
+
+  case "$_POST[color]" in
+    c000) c="#000000";;
+    c001) c="#000088";;
+    c010) c="#008800";;
+    c011) c="#008888";;
+    c100) c="#880000";;
+    c101) c="#880088";;
+    c110) c="#888800";;
+    c111) c="#888888";;
+  esac
+
+  convert "${tpyfile%.tpy}_${sid}.png" -fill "$c" -stroke "$c" -draw "circle $x,$y $(($x+5)),$y" "${tpyfile%.tpy}_${sid}.png"
+
 fi
 
 mv "$tempfile" "$tpyfile"
index b9162582b9d2bfafae735d058999c9522c925361..4701ebb813a51f42671ce3e21325ade4960c93b3 100755 (executable)
@@ -21,6 +21,63 @@ cat <<END_HTML
 <form class="prescription" action="?action=update_prescription" method="POST">
 <input type="hidden" name="prescription" value="${mpx[prescription]}">
 
+<table class="type"><tbody>
+  <tr>
+    <th>$(l10n doctor)</th>
+    <th>$(l10n dentist)</th>
+    <th>$(l10n noprescription)</th>
+    <th>$(l10n altpractition)</th>
+  </tr>
+  <tr>
+    <td class="selfpaid doctor">
+      <input type=radio name=presctype id=doctor_selfpaid value=doctor_selfpaid>
+      <label for=doctor_selfpaid>$(l10n selfpaid)</label>
+    </td>
+    <td class="selfpaid dentist">
+      <input type=radio name=presctype id=dentist_selfpaid value=dentist_selfpaid>
+      <label for=dentist_selfpaid>$(l10n selfpaid)</label>
+    </td>
+    <td class="selfpaid noprescription">
+      <input type=radio name=presctype id=noprescription_selfpaid value=noprescription_selfpaid>
+      <label for=noprescription_selfpaid>$(l10n selfpaid)</label>
+    </td>
+    <td class="selfpaid altpractition">
+      <input type=radio name=presctype id=altpractition_selfpaid value=altpractition_selfpaid>
+      <label for=altpractition_selfpaid>$(l10n selfpaid)</label>
+    </td>
+  </tr>
+  <tr>
+    <td class="private doctor">
+      <input type=radio name=presctype id=doctor_private value=doctor_private>
+      <label for=doctor_private>$(l10n private)</label>
+    </td>
+    <td class="private dentist">
+      <input type=radio name=presctype id=dentist_private value=dentist_private>
+      <label for=dentist_private>$(l10n private)</label>
+    </td>
+    <td class="private noprescription">
+    </td>
+    <td class="private altpractition">
+      <input type=radio name=presctype id=altpractition_private value=altpractition_private>
+      <label for=altpractition_private>$(l10n private)</label>
+    </td>
+  </tr>
+  <tr>
+    <td class="compulsory doctor">
+      <input type=radio name=presctype id=doctor_compulsory value=doctor_compulsory>
+      <label for=doctor_compulsory>$(l10n compulsory)</label>
+    </td>
+    <td class="compulsory dentist">
+      <input type=radio name=presctype id=dentist_compulsory value=dentist_compulsory>
+      <label for=dentist_compulsory>$(l10n compulsory)</label>
+    </td>
+    <td class="compulsory noprescription">
+    </td>
+    <td class="compulsory altpractition">
+    </td>
+  </tr>
+</tbody></table>
+
 <fieldset class="baseinfo">
 <label for="insurance">$(l10n insurance)</label>
 <input id="insurance" name="insurance" value="${mpx[insurance]}" placeholder="$(l10n insurance)">
@@ -37,7 +94,7 @@ cat <<END_HTML
 </fieldset>
 
 <fieldset class="misc">
-<h1>$(l10n therapy_prescription)</h1>
+<h1 id="${mpx[prescription]}">$(l10n therapy_prescription)</h1>
 
 <label for="addcontrib">$(l10n addcontrib)</label>
 <input id="addcontrib" name="addcontrib" value="${mpx[addcontrib]}" placeholder="$(l10n addcontrib)">
@@ -94,11 +151,18 @@ cat <<END_HTML
 <input id="quantity_weekly1" name="quantity_weekly1" value="${mpx[quantity_weekly1]}" placeholder="$(l10n quantity_weekly)">
 
 <br>
+<p class="indicator_codes">
 <label for="indicator">$(l10n indicator)</label>
 <input id="indicator" name="indicator" value="${mpx[indicator]}" placeholder="$(l10n indicator)">
 <br>
 <label for="icd10">$(l10n icd10)</label>
 <input id="icd10" name="icd10" value="${mpx[icd10]}" placeholder="$(l10n icd10)">
+</p>
+<br>
+<p class="indicator_reading">
+<label for="indicator_reading">$(l10n indicator_reading)</label>
+<textarea id="indicator_reading" name="indicator_reading" placeholder="$(l10n indicator_reading)">${mpx[indicator_reading]}</textarea>
+</p>
 </fieldset>
 
 <fieldset class="controls">
index 2cc13d13231cb638d45ff61807e2ce3a8fdf422b..5fd6e7c971137a25043f7f1ec4215793ebdd88f5 100755 (executable)
@@ -26,6 +26,7 @@ cat <<EOF
 <html>
   <head>
     <title>$(l10n p_${PAGE})</title>
+    <meta name="viewport" content="width=device-width">
     <style type="text/css">
     <!--
 * {
index 3374f9832c6933608166cf32d49c669c5ed37330..cd8776022919766104447414412910a87be7c885 100755 (executable)
@@ -50,6 +50,26 @@ cat <<EOF
   font-size: .75em;
 }
 
+.prescription table {display: block; width: 100%; border-collapse: collapse;}
+.prescription table tbody {width: 100%; margin: 0 auto;}
+.prescription table tr {display: table-row; width: 100%; margin: 0 auto;}
+.prescription table tr th,
+.prescription table tr td {
+  display: table-cell;
+  text-align: left;
+  padding: .25ex 1ex;
+  border-left: 1px solid red;
+}
+.prescription table tr th { padding: .25em 1ex; border-bottom: 1px solid red;}
+.prescription table tr th:nth-of-type(1),
+.prescription table tr td:nth-of-type(1) { border-left: none;}
+
+td.private  {background-color: #BFB;}
+td.selfpaid {background-color: #FFB;}
+td.compulsory.doctor {background-color: #BBF;}
+td.compulsory.dentist {background-color: #FBB;}
+td.altpractition { background-color: #FBF;}
+
 .prescription fieldset {
   display: inline-block;
   margin: 0; padding: 1ex;
@@ -175,8 +195,8 @@ cat <<EOF
   }
   .catalogue label[for=presccontinual] { margin-right: 33%;}
 
-.prescription .description { width: 100%; }
-  .description * { margin-right: -.625ex; vertical-align: top;}
+.prescription .description { width: 100%; position: relative;}
+  .description * { margin-right: -.625ex; vertical-align: top; }
   .description label {vertical-align: bottom;}
   .description label[for=quantity1],
   .description label[for=remidy1],
@@ -192,10 +212,16 @@ cat <<EOF
   .description #quantity_weekly,
   .description #quantity_weekly1 { width: 20%; height: 3em; text-align: center;}
 
+  .description .indicator_codes {display: inline-block; width: 20%; padding: 0; padding-top: 1.5ex;}
   .description label[for=indicator],
-  .description label[for=icd10] { display: block; width: 20%;}
+  .description label[for=icd10] { display: block; width: 100%;}
   .description #icd10,
-  .description #indicator {width: 20%; text-align: right;}
+  .description #indicator {width: 100%; text-align: right;}
+
+  .description .indicator_reading { display: inline-block; width: 78%; padding: 0; padding-top: 1.5ex;  margin-left: 2%;}
+  .description label[for=indicator_reading],
+  .description #indicator_reading { width: 100%; display: block;}
+  .description #indicator_reading { height: 4em;}
 
 .prescription .controls { width: 100%; }
   .controls a.button,
index 047dc49ab076548be6a078b388890bb981213c47..4fa02a55c48a9836d6cd63d8293e1648b7464057 100755 (executable)
@@ -41,6 +41,7 @@ item_name[housecall]="Haus&shy;be&shy;such"
 item_name[report]="The&shy;ra&shy;pie&shy;be&shy;richt"
 item_name[indicator]="In&shy;di&shy;ka&shy;tions&shy;schlüssel"
 item_name[icd10]="ICD-10-Code"
+item_name[indicator_reading]="Befund Beschreibung"
 item_name[insurance]="Krankenkasse bzw. Kostenträger"
 item_name[prescription_by_catalogue]="Verordnung nach Maßgabe des Kataloges (Regelfall)"
 item_name[therapy_start]="Be&shy;hand&shy;lungs&shy;be&shy;ginn spä&shy;test. am"
@@ -49,3 +50,11 @@ item_name[save]="Speichern"
 item_name[cancel]="Abbrechen"
 item_name[delete]="Löschen"
 item_name[therapy]="Zur Therapie"
+
+item_name[doctor]="Arzt"
+item_name[dentist]="Zahn&shy;arzt"
+item_name[altpractition]="Heil&shy;prak&shy;tiker"
+item_name[noprescription]="Ohne Ver&shy;ord&shy;nung"
+item_name[selfpaid]="Selbst&shy;zah&shy;lend"
+item_name[private]="Pri&shy;vat"
+item_name[compulsory]="Ge&shy;setz&shy;lich"
index 8a87a8e292aa2b0e55b94a736aba7777b54ad88a..807d47f6e22a87601624453584eaa412a85d7056 100755 (executable)
@@ -84,7 +84,7 @@ fieldset.color {
 }
 .dotmark.ov {
   position: absolute;
-  bottom: 5px; right: 0%;
+  bottom: 5px; right: 0;
   z-index: 1;
 }
 @media(min-width: 800px){
index f6533f74d3dc0ca9a111ce145f7b7615e65321a6..9d37db88a87d7d199ca6ebdbf013ce2cdaefe936 100755 (executable)
@@ -108,7 +108,6 @@ cat <<EOF
  --><input class=therapist name=${sid}_therapist value="" placeholder="$(l10n therapist)" /><!--
  --><button type=submit name=new_session value=$sid>+</button></span>
     <input type=hidden name="${sid}_note1" value="">
-    <input type=hidden name="${sid}_open" value="checked">
   </fieldset>
 EOF
 }
index bbcc09196844497e7cb6b8ef540907be1e9f1ccf..ef214c586214833c639f0ae82b8c7977b7ec82c3 100755 (executable)
@@ -89,7 +89,8 @@ cat <<END_HTML
     $(find "$_DATA/prescriptions/" -name "${id%.vcf}.*.mpx" \
       | while read pfile; do
         printf '%s\t%s\t%s\n'  
-        printf '<li><a href="?p=prescriptions&amp;client=%s" >%s: %s - %s%s</a></li>' \
+        printf '<li><a href="?p=prescriptions&amp;client=%s#%s" >%s: %s - %s%s</a></li>' \
+          "${id}" \
           "${id}" \
           "$(sed -nr 's;^date:(.+)$;\1;p' "$pfile")" \
           "$(sed -nr 's;^indicator:(.+)$;\1;p' "$pfile")" \
index 57ff0b624f36bcd9cecb5449aaf8b7a38d3c4b6c..df89cdba5b2db646fc1aeb666ebb5f4fea45cdf0 100755 (executable)
@@ -34,7 +34,7 @@ cat <<END_HTML
 </fieldset>
 
 <fieldset class="misc">
-<h1>$(l10n therapy_prescription)</h1>
+<h1 id="${mpx[prescription]}">$(l10n therapy_prescription)</h1>
 <br>
 <label for="addcontrib">$(l10n addcontrib)</label>
 <span id="addcontrib">${mpx[addcontrib]}</span>
@@ -85,15 +85,22 @@ cat <<END_HTML
 <span id="quantity_weekly1">${mpx[quantity_weekly1]}</span>
 
 <br>
+<p class="indicator_codes">
 <label for="indicator">$(l10n indicator)</label>
 <span id="indicator">${mpx[indicator]}</span>
 <br>
 <label for="icd10">$(l10n icd10)</label>
 <span id="icd10">${mpx[icd10]}</span>
+</p>
+<br>
+<p class="indicator_reading">
+<label for="indicator_reading">$(l10n indicator_reading)</label>
+<span id="indicator_reading">${mpx[indicator_reading]}</span>
+</p>
 </fieldset>
 
 <fieldset class="controls">
-<a class="button" href="?p=prescriptions&amp;edit=${mpx[prescription]}">$(l10n edit)</a>
+<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>
 </fieldset>