]> git.plutz.net Git - confetti/blobdiff - templates/view_prescription.sh
make prescriptions colored
[confetti] / templates / view_prescription.sh
index c11bd9de731cd03bcb9d24fe0c1a9d673df7aca1..ce2b4967b7bf2e7ca4bbb37f22662733220a5a21 100755 (executable)
@@ -18,7 +18,7 @@
 check(){ [ "$1" = "$2" ] && printf checked}
 
 cat <<END_HTML
-<div class="prescription">
+<div class="prescription ${mpx[presctype]%_*} ${mpx[presctype]#*_}">
 <fieldset class="baseinfo">
 <label for="insurance">$(l10n insurance)</label>
 <span id="insurance">${mpx[insurance]}</span>
@@ -34,13 +34,20 @@ 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>
-<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>
 
+<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>
@@ -49,9 +56,9 @@ cat <<END_HTML
 <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>
+<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>
@@ -78,17 +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>
 
-<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=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>