From 957f0ced0095d421006a0dbc68ef9be8a4325514 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 1 Jul 2016 15:00:50 +0000 Subject: [PATCH] issuer field on prescription document svn path=/trunk/; revision=118 --- actions/update_prescription.sh | 2 ++ pages/cards.sh | 3 ++- pages/prescriptions.sh | 6 +++++ templates/edit_prescription.sh | 16 ++++++++++- templates/prescriptions.css.sh | 47 ++++++++++++++++++++++++++++++--- templates/text_prescriptions.sh | 4 +++ templates/view_prescription.sh | 19 ++++++++----- 7 files changed, 85 insertions(+), 12 deletions(-) diff --git a/actions/update_prescription.sh b/actions/update_prescription.sh index a0d9371..aeb4993 100755 --- a/actions/update_prescription.sh +++ b/actions/update_prescription.sh @@ -31,6 +31,8 @@ if [ -z "$prescription" -o \! -f "$clientfile" ]; then exit 0 fi +[ "$_POST[issuer_select]" = "other" ] && _POST[issuer]="${_POST[issuer_other]}" + # serialize POST array into file for key in ${(k)_POST}; do printf %s:%s\\n "$key" "${_POST[$key]//$BR/\\n}" diff --git a/pages/cards.sh b/pages/cards.sh index 056f4d2..17b8f73 100755 --- a/pages/cards.sh +++ b/pages/cards.sh @@ -47,7 +47,8 @@ listcourses() { } list_hi_companies(){ - sed -rn 's;^X-HEALTH-INSURANCE:([^\;]+)\;.*$;\1;p' ${_DATA}/vcard/*vcf + sed -rn 's;^X-HEALTH-INSURANCE:([^\;]+)\;.*$;\1;p' ${_DATA}/vcard/*vcf \ + | sort -u } listcards() { diff --git a/pages/prescriptions.sh b/pages/prescriptions.sh index 20b2bc0..73c5c2c 100755 --- a/pages/prescriptions.sh +++ b/pages/prescriptions.sh @@ -34,6 +34,12 @@ list_prescriptions(){ | sort -r | cut -f2 } +list_prescription_issuers(){ + sed -rn 's;^issuer:(.+)$;\1;p' ${_DATA}/prescriptions/*.mpx \ + | sort -u +} + + edit_prescription(){ id="$1" prescfile="$_DATA/prescriptions/$id" diff --git a/templates/edit_prescription.sh b/templates/edit_prescription.sh index dac7270..b7a9af4 100755 --- a/templates/edit_prescription.sh +++ b/templates/edit_prescription.sh @@ -135,7 +135,6 @@ $( for n in {0..10}; do "$(l10n quantity_weekly)" "${mpx[quantity_weekly$n]}" done ) -

@@ -149,6 +148,21 @@ done )

+
+

+ + + + +

diff --git a/templates/prescriptions.css.sh b/templates/prescriptions.css.sh index 0bf19c1..3810eeb 100755 --- a/templates/prescriptions.css.sh +++ b/templates/prescriptions.css.sh @@ -138,13 +138,16 @@ form.prescription { padding-top: 1ex;} .prescription input[name=presctype] + label { font-size: medium; width: 22%; - margin: 0; margin-right: -.75ex; - vertical-align: bottom; - padding: .125em .5ex .25em 3ex; + margin: 0; margin-right: -.5ex; + vertical-align: top; + padding: .25em .5ex .25em 3ex; + height: 2.5em; + border-top: 1px solid #DDD; } .prescription label.presctype { text-align: right; font-weight: bold; + font-size: .875em; padding-right: 1ex; padding-left: 0; } @@ -248,6 +251,44 @@ 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 .controls { width: 100%; } .controls a.button, .controls button[value=save], diff --git a/templates/text_prescriptions.sh b/templates/text_prescriptions.sh index 4fa02a5..56a81a0 100755 --- a/templates/text_prescriptions.sh +++ b/templates/text_prescriptions.sh @@ -58,3 +58,7 @@ item_name[noprescription]="Ohne Ver­ord­nung" item_name[selfpaid]="Selbst­zah­lend" item_name[private]="Pri­vat" item_name[compulsory]="Ge­setz­lich" + +item_name[issuer]="Ausgestellt durch" +item_name[issuer_from_list]="Aus Liste" +item_name[issuer_other]="Andere" diff --git a/templates/view_prescription.sh b/templates/view_prescription.sh index 78f995b..0fdd871 100755 --- a/templates/view_prescription.sh +++ b/templates/view_prescription.sh @@ -85,17 +85,22 @@ $( for n in {0..10}; do done )

- -${mpx[indicator]} -
- -${mpx[icd10]} + + ${mpx[indicator]} +
+ + ${mpx[icd10]}


- -${mpx[indicator_reading]} + + ${mpx[indicator_reading]} +

+

+ + $mpx[issuer]

+
-- 2.39.2