From 63a4a5bfc01513a173216a0a8984ab3ef0cd0c81 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 31 Dec 2020 12:50:43 +0530 Subject: Deprecate plural functions. * ksh-discharge.el (forms-format-list, form-to-org): Deprecate form-entries, single-line-org-entries, multi-line-org-entries. * ksh-scan2.el (forms-format-list): Deprecate form-entries. (form-to-org): Deprecate single-line-org-entries, multi-line-org-entries. * ksh-scan3.el (forms-format-list, form-to-org): Deprecate form-entries, single-line-org-entries, multi-line-org-entries. * ksh-forms-improved.el (single-line-org-entries, multi-line-org-entries, form-entries): Delete functions. squash! Deprecate plural functions. --- ksh-scan3.el | 167 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 83 insertions(+), 84 deletions(-) (limited to 'ksh-scan3.el') diff --git a/ksh-scan3.el b/ksh-scan3.el index 83018c5..ac50f36 100644 --- a/ksh-scan3.el +++ b/ksh-scan3.el @@ -37,94 +37,93 @@ (setq forms-format-list (append (list "Trimester 3 - Scan Report\n\n") - (form-entries - '(("IP/OP No" . ip-op-no) - ("Patient Name" . patient-name) - ("Age" . age) - ("Sex" . sex) - ("Visit Date" . visit-date) - ("LMP Date" . lmp-date) - ("LMP EDD" . lmp-edd))) + (seq-mapcat 'form-entry + '(("IP/OP No" . ip-op-no) + ("Patient Name" . patient-name) + ("Age" . age) + ("Sex" . sex) + ("Visit Date" . visit-date) + ("LMP Date" . lmp-date) + ("LMP EDD" . lmp-edd))) (list "Indications\n" "Growth Scan\n" - "Real time B-mode ultrasonography of gravid uterus done.\n" - "Route: Transabdominal\n" scan "\n\n") + "Real time B-mode ultrasonography of gravid uterus done.\n" + "Route: Transabdominal\n" scan "\n\n") (list "Fetal Survey\n") - (form-entries - '(("Presentation" . survey-presentation) - ("Placenta" . survey-placenta) - ("Liquor" . survey-liquor) - ("Amniotic fluid index" . survey-amniotic-fluid-index) - ("Umbilical cord" . survey-umbilical-cord) - ("Fetal activity" . survey-fetal-activity) - ("Cardiac activity" . survey-cardiac-activity) - ("Fetal heart rate" . survey-fetal-heart-rate))) + (seq-mapcat 'form-entry + '(("Presentation" . survey-presentation) + ("Placenta" . survey-placenta) + ("Liquor" . survey-liquor) + ("Amniotic fluid index" . survey-amniotic-fluid-index) + ("Umbilical cord" . survey-umbilical-cord) + ("Fetal activity" . survey-fetal-activity) + ("Cardiac activity" . survey-cardiac-activity) + ("Fetal heart rate" . survey-fetal-heart-rate))) (list "Fetal Biometry\n") - (form-entries - '(("BPD" . biometry-bpd) - ("BPD-Age" . biometry-bpd-age) - ("BPD-Percentile" . biometry-bpd-percentile) - ("HC" . biometry-hc) - ("HC-Age" . biometry-hc-age) - ("HC-Percentile" . biometry-hc-percentile) - ("AC" . biometry-ac) - ("AC-Age" . biometry-ac-age) - ("AC-Percentile" . biometry-ac-percentile) - ("FL" . biometry-fl) - ("FL-Age" . biometry-fl-age) - ("FL-Percentile" . biometry-fl-percentile) - ("Estimated fetal weight according to BPD, HC, AC, FL" . biometry-fetal-weight))) + (seq-mapcat 'form-entry + '(("BPD" . biometry-bpd) + ("BPD-Age" . biometry-bpd-age) + ("BPD-Percentile" . biometry-bpd-percentile) + ("HC" . biometry-hc) + ("HC-Age" . biometry-hc-age) + ("HC-Percentile" . biometry-hc-percentile) + ("AC" . biometry-ac) + ("AC-Age" . biometry-ac-age) + ("AC-Percentile" . biometry-ac-percentile) + ("FL" . biometry-fl) + ("FL-Age" . biometry-fl-age) + ("FL-Percentile" . biometry-fl-percentile) + ("Estimated fetal weight according to BPD, HC, AC, FL" . biometry-fetal-weight))) (list "Impression\n") - (form-entries - '(("Gestational age" . impression-gestational-age) - ("Menstrual age" . impression-menstrual-age) - ("Corrected EDD" . impression-corrected-edd) - ("Notes" . impression-notes) - ("Sonologist" . sonologist))))) + (seq-mapcat 'form-entry + '(("Gestational age" . impression-gestational-age) + ("Menstrual age" . impression-menstrual-age) + ("Corrected EDD" . impression-corrected-edd) + ("Notes" . impression-notes) + ("Sonologist" . sonologist))))) (setq form-to-org (lambda () - (with-output-to-string - (make-report-header "OB - 3/3 TRIMESTER SCAN REPORT") - (single-line-org-entries - `(("IP/OP No" . ,ip-op-no) - ("Age" . ,age) - ("Sex" . ,sex) - ("Name of Patient" . ,patient-name) - ("Visit Date" . ,visit-date) - ("LMP Date" . ,lmp-date) - ("LMP EDD" . ,lmp-edd))) - (mapc 'princ `("* Indications\n" "** Growth Scan\n" - "Real time B-mode ultrasonography of gravid uterus done.\n\n")) - (single-line-org-entries - `(("Route" . "Transabdominal"))) - (text-if-non-blank (get-field scan)) - (princ "* Fetal Survey\n") - (single-line-org-entries - `(("Presentation" . ,survey-presentation) - ("Placenta" . ,survey-placenta) - ("Liquor" . ,survey-liquor) - ("Amniotic fluid index" . ,survey-amniotic-fluid-index) - ("Umbilical cord" . ,survey-umbilical-cord) - ("Fetal activity" . ,survey-fetal-activity) - ("Cardiac activity" . ,survey-cardiac-activity) - ("Fetal heart rate" . ,survey-fetal-heart-rate))) - (princ "* Fetal Biometry\n") - (insert-biometry - `(("BPD" ,biometry-bpd ,biometry-bpd-age ,biometry-bpd-percentile) - ("HC" ,biometry-hc ,biometry-hc-age ,biometry-hc-percentile) - ("AC" ,biometry-ac ,biometry-ac-age ,biometry-ac-percentile) - ("FL" ,biometry-fl ,biometry-fl-age ,biometry-fl-percentile))) - (princ "* Impression\n") - (princ (format "%s corresponding to a gestational age of %s\n\n" - (get-field scan) (get-field impression-gestational-age))) - (princ "Gestational age assigned as per biometry (CRL)\n\n") - (single-line-org-entries - `(("Menstrual age" . ,impression-menstrual-age) - ("Corrected EDD" . ,impression-corrected-edd) - ("Placenta" . ,survey-placenta) - ("Presentation" . ,survey-presentation) - ("Liquor" . ,survey-liquor) - ("Estimated fetal weight according to BPD, HC, AC, FL" . ,biometry-fetal-weight))) - (text-if-non-blank (get-field impression-notes)) - (multi-line-org-entries - `(("Sonologist" . ,sonologist)))))) + (with-output-to-string + (make-report-header "OB - 3/3 TRIMESTER SCAN REPORT") + (seq-do 'single-line-org-entry + `(("IP/OP No" . ,ip-op-no) + ("Age" . ,age) + ("Sex" . ,sex) + ("Name of Patient" . ,patient-name) + ("Visit Date" . ,visit-date) + ("LMP Date" . ,lmp-date) + ("LMP EDD" . ,lmp-edd))) + (mapc 'princ `("* Indications\n" "** Growth Scan\n" + "Real time B-mode ultrasonography of gravid uterus done.\n\n")) + (seq-do 'single-line-org-entry + `(("Route" . "Transabdominal"))) + (text-if-non-blank (get-field scan)) + (princ "* Fetal Survey\n") + (seq-do 'single-line-org-entry + `(("Presentation" . ,survey-presentation) + ("Placenta" . ,survey-placenta) + ("Liquor" . ,survey-liquor) + ("Amniotic fluid index" . ,survey-amniotic-fluid-index) + ("Umbilical cord" . ,survey-umbilical-cord) + ("Fetal activity" . ,survey-fetal-activity) + ("Cardiac activity" . ,survey-cardiac-activity) + ("Fetal heart rate" . ,survey-fetal-heart-rate))) + (princ "* Fetal Biometry\n") + (insert-biometry + `(("BPD" ,biometry-bpd ,biometry-bpd-age ,biometry-bpd-percentile) + ("HC" ,biometry-hc ,biometry-hc-age ,biometry-hc-percentile) + ("AC" ,biometry-ac ,biometry-ac-age ,biometry-ac-percentile) + ("FL" ,biometry-fl ,biometry-fl-age ,biometry-fl-percentile))) + (princ "* Impression\n") + (princ (format "%s corresponding to a gestational age of %s\n\n" + (get-field scan) (get-field impression-gestational-age))) + (princ "Gestational age assigned as per biometry (CRL)\n\n") + (seq-do 'single-line-org-entry + `(("Menstrual age" . ,impression-menstrual-age) + ("Corrected EDD" . ,impression-corrected-edd) + ("Placenta" . ,survey-placenta) + ("Presentation" . ,survey-presentation) + ("Liquor" . ,survey-liquor) + ("Estimated fetal weight according to BPD, HC, AC, FL" . ,biometry-fetal-weight))) + (text-if-non-blank (get-field impression-notes)) + (multi-line-org-entry '("Sonologist" . ,sonologist))))) -- cgit v1.2.3