From: paul <paul@plutz.net> Date: Thu, 7 Apr 2016 04:07:58 +0000 (+0000) Subject: additional prescription functions X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=015242823eb4a79cf615bef6951b0af6bd0a5b01;p=confetti additional prescription functions svn path=/trunk/; revision=90 --- diff --git a/actions/update_prescription.sh b/actions/update_prescription.sh index 68cb7fd..a0d9371 100755 --- a/actions/update_prescription.sh +++ b/actions/update_prescription.sh @@ -50,4 +50,4 @@ case "${_POST[action]}" in ;; esac -redirect "?p=prescriptions&client=${client}" +redirect "?p=prescriptions&client=${client}#${prescription}" diff --git a/actions/update_therapy.sh b/actions/update_therapy.sh index 43a2e1f..cc95e39 100755 --- a/actions/update_therapy.sh +++ b/actions/update_therapy.sh @@ -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" diff --git a/templates/edit_prescription.sh b/templates/edit_prescription.sh index b916258..4701ebb 100755 --- a/templates/edit_prescription.sh +++ b/templates/edit_prescription.sh @@ -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"> diff --git a/templates/frame.html.sh b/templates/frame.html.sh index 2cc13d1..5fd6e7c 100755 --- a/templates/frame.html.sh +++ b/templates/frame.html.sh @@ -26,6 +26,7 @@ cat <<EOF <html> <head> <title>$(l10n p_${PAGE})</title> + <meta name="viewport" content="width=device-width"> <style type="text/css"> <!-- * { diff --git a/templates/prescriptions.css.sh b/templates/prescriptions.css.sh index 3374f98..cd87760 100755 --- a/templates/prescriptions.css.sh +++ b/templates/prescriptions.css.sh @@ -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, diff --git a/templates/text_prescriptions.sh b/templates/text_prescriptions.sh index 047dc49..4fa02a5 100755 --- a/templates/text_prescriptions.sh +++ b/templates/text_prescriptions.sh @@ -41,6 +41,7 @@ item_name[housecall]="Haus­be­such" item_name[report]="The­ra­pie­be­richt" item_name[indicator]="In­di­ka­tions­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­hand­lungs­be­ginn spä­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­arzt" +item_name[altpractition]="Heil­prak­tiker" +item_name[noprescription]="Ohne Ver­ord­nung" +item_name[selfpaid]="Selbst­zah­lend" +item_name[private]="Pri­vat" +item_name[compulsory]="Ge­setz­lich" diff --git a/templates/therapy.css.sh b/templates/therapy.css.sh index 8a87a8e..807d47f 100755 --- a/templates/therapy.css.sh +++ b/templates/therapy.css.sh @@ -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){ diff --git a/templates/therapy.html.sh b/templates/therapy.html.sh index f6533f7..9d37db8 100755 --- a/templates/therapy.html.sh +++ b/templates/therapy.html.sh @@ -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 } diff --git a/templates/view_client.sh b/templates/view_client.sh index bbcc091..ef214c5 100755 --- a/templates/view_client.sh +++ b/templates/view_client.sh @@ -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&client=%s" >%s: %s - %s%s</a></li>' \ + printf '<li><a href="?p=prescriptions&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")" \ diff --git a/templates/view_prescription.sh b/templates/view_prescription.sh index 57ff0b6..df89cdb 100755 --- a/templates/view_prescription.sh +++ b/templates/view_prescription.sh @@ -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&edit=${mpx[prescription]}">$(l10n edit)</a> +<a class="button" href="?p=prescriptions&edit=${mpx[prescription]}#${mpx[prescription]}">$(l10n edit)</a> <a class="button" href="?p=therapy&id=${mpx[prescription]%.mpx}.tpy">$(l10n therapy)</a> </fieldset>