X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_client.sh;h=c1e3987c09dc7807fdc8ae92d637004b6754fddc;hp=47d6d219b5ce8eb1ae2757b64b0b22986f454c89;hb=824bab9c4c5b5ae745a78b43a338d4b068e99cfa;hpb=2805ee334bead55e2ab08b7c4dbdbf07dcebf8e9 diff --git a/templates/view_client.sh b/templates/view_client.sh index 47d6d21..c1e3987 100755 --- a/templates/view_client.sh +++ b/templates/view_client.sh @@ -21,8 +21,10 @@ n=$(printf %s "$values[N]" \ ) fullname="${n:-${values[FN]:-${values[NICKNAME]}}}" -hi_number="${values[X-HEALTH-INSURANCE]%;*}" -hi_company="${values[X-HEALTH-INSURANCE]#*;}" +hi_company="$(printf %s "${values[X-HEALTH-INSURANCE]}" |cut -d\; -f1)" +hi_number="$(printf %s "${values[X-HEALTH-INSURANCE]}" |cut -d\; -f2)" +hi_status="$(printf %s "${values[X-HEALTH-INSURANCE]}" |cut -d\; -f3)" + cat < @@ -71,6 +73,7 @@ cat <$(l10n X-HEALTH-INSURANCE) ${hi_company:+${hi_company}} ${hi_number:+ ${hi_number}} + ${hi_status:+ ${hi_status}}
@@ -87,10 +90,14 @@ cat <

$(l10n prescriptions)

    - $(sed -rn 's:(.*)\t'$id'$:\1:p' "$_DATA/mappings/attendance" |while read each; do - cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")" - echo '
  • '$cname'
  • ' - done) + $(find "$_DATA/prescriptions/" -name "${id%.vcf}.*.mpx" \ + | while read pfile; do + printf '%s\t%s\t%s\n' "$(grep '^date' "$pfile")" "$(sed -nr 's;^icd10:(.*)$;\1;p' "$pfile")" + done \ + | sort -r | cut -f2 \ + | while read icd; do + printf '
  • %s
  • ' "${id}" "${icd:-$(l10n no_icd)}" + done)
END_HTML