diff options
author | Arun Isaac | 2022-10-04 00:34:16 +0530 |
---|---|---|
committer | Arun Isaac | 2022-10-04 00:34:16 +0530 |
commit | 9519b052158019cfa6e4f8e582d7f8e0b86f72c8 (patch) | |
tree | 4d42dfe0490c22c9813e0a49186720c33483e05f | |
parent | 194468cd87794680efa3f6e4b295c0603369522d (diff) | |
download | ksh-reports-9519b052158019cfa6e4f8e582d7f8e0b86f72c8.tar.gz ksh-reports-9519b052158019cfa6e4f8e582d7f8e0b86f72c8.tar.lz ksh-reports-9519b052158019cfa6e4f8e582d7f8e0b86f72c8.zip |
Prefix all form variables with form specific prefixes.
If the form variables are not prefixed and thus namespaced correctly,
form variables from different forms interact illegitimately and cause
pandemonium.
* ksh-scan2.el, ksh-scan3.el: Prefix all form variables with form
specific prefixes.
-rw-r--r-- | ksh-scan2.el | 239 | ||||
-rw-r--r-- | ksh-scan3.el | 169 |
2 files changed, 205 insertions, 203 deletions
diff --git a/ksh-scan2.el b/ksh-scan2.el index 2587a0f..0e8c410 100644 --- a/ksh-scan2.el +++ b/ksh-scan2.el @@ -7,168 +7,169 @@ (setq forms-file (expand-file-name "data/scan2.dat" ksh-path)) (setq forms-number-of-fields (forms-enumerate - '(ip-op-no patient-name age sex visit-date lmp-date lmp-edd - scan - maternal-cervix maternal-internal-os - survey-presentation survey-placenta survey-liquor - survey-umbilical-cord survey-fetal-activity survey-cardiac-activity - biometry-bpd biometry-bpd-age biometry-bpd-percentile - biometry-hc biometry-hc-age biometry-hc-percentile - biometry-ac biometry-ac-age biometry-ac-percentile - biometry-fl biometry-fl-age biometry-fl-percentile - biometry-fetal-weight - extended-foot-length extended-tcd - anatomy-intracranial anatomy-neck anatomy-spine - anatomy-face anatomy-lungs anatomy-heart - anatomy-abdominal-situs anatomy-kidneys-bladder - anatomy-long-bones - impression-gestational-age impression-menstrual-age - impression-corrected-edd impression-notes - sonologist))) + (list 'ksh-scan2-ip-op-no 'ksh-scan2-patient-name 'ksh-scan2-age 'ksh-scan2-sex + 'ksh-scan2-visit-date 'ksh-scan2-lmp-date 'ksh-scan2-lmp-edd + 'ksh-scan2-scan + 'ksh-scan2-maternal-cervix 'ksh-scan2-maternal-internal-os + 'ksh-scan2-survey-presentation 'ksh-scan2-survey-placenta 'ksh-scan2-survey-liquor + 'ksh-scan2-survey-umbilical-cord 'ksh-scan2-survey-fetal-activity 'ksh-scan2-survey-cardiac-activity + 'ksh-scan2-biometry-bpd 'ksh-scan2-biometry-bpd-age 'ksh-scan2-biometry-bpd-percentile + 'ksh-scan2-biometry-hc 'ksh-scan2-biometry-hc-age 'ksh-scan2-biometry-hc-percentile + 'ksh-scan2-biometry-ac 'ksh-scan2-biometry-ac-age 'ksh-scan2-biometry-ac-percentile + 'ksh-scan2-biometry-fl 'ksh-scan2-biometry-fl-age 'ksh-scan2-biometry-fl-percentile + 'ksh-scan2-biometry-fetal-weight + 'ksh-scan2-extended-foot-length 'ksh-scan2-extended-tcd + 'ksh-scan2-anatomy-intracranial 'ksh-scan2-anatomy-neck 'ksh-scan2-anatomy-spine + 'ksh-scan2-anatomy-face 'ksh-scan2-anatomy-lungs 'ksh-scan2-anatomy-heart + 'ksh-scan2-anatomy-abdominal-situs 'ksh-scan2-anatomy-kidneys-bladder + 'ksh-scan2-anatomy-long-bones + 'ksh-scan2-impression-gestational-age 'ksh-scan2-impression-menstrual-age + 'ksh-scan2-impression-corrected-edd 'ksh-scan2-impression-notes + 'ksh-scan2-sonologist))) ;; Default values for fields (setq default-field-values - `((,sex . "F") - (,survey-presentation . "cephalic") - (,survey-placenta . "posterior") - (,survey-liquor . "normal") - (,survey-fetal-activity . "present") - (,survey-cardiac-activity . "present") - (,anatomy-intracranial . "normal") - (,anatomy-neck . "normal. No evidence of significant open neural tube defect") - (,anatomy-spine . "normal") - (,anatomy-face . "normal") - (,anatomy-lungs . "normal") - (,anatomy-heart . "normal") - (,anatomy-abdominal-situs . "normal") - (,anatomy-kidneys-bladder . "normal") - (,anatomy-long-bones . "normal for the period of gestation") - (,sonologist . "Dr. Bala Bharathy"))) + `((,ksh-scan2-sex . "F") + (,ksh-scan2-survey-presentation . "cephalic") + (,ksh-scan2-survey-placenta . "posterior") + (,ksh-scan2-survey-liquor . "normal") + (,ksh-scan2-survey-fetal-activity . "present") + (,ksh-scan2-survey-cardiac-activity . "present") + (,ksh-scan2-anatomy-intracranial . "normal") + (,ksh-scan2-anatomy-neck . "normal. No evidence of significant open neural tube defect") + (,ksh-scan2-anatomy-spine . "normal") + (,ksh-scan2-anatomy-face . "normal") + (,ksh-scan2-anatomy-lungs . "normal") + (,ksh-scan2-anatomy-heart . "normal") + (,ksh-scan2-anatomy-abdominal-situs . "normal") + (,ksh-scan2-anatomy-kidneys-bladder . "normal") + (,ksh-scan2-anatomy-long-bones . "normal for the period of gestation") + (,ksh-scan2-sonologist . "Dr. Bala Bharathy"))) ;; Format specification for form display (setq forms-format-list (append (list "Trimester 2 - Scan Report\n\n") (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))) + '(("IP/OP No" . ksh-scan2-ip-op-no) + ("Patient Name" . ksh-scan2-patient-name) + ("Age" . ksh-scan2-age) + ("Sex" . ksh-scan2-sex) + ("Visit Date" . ksh-scan2-visit-date) + ("LMP Date" . ksh-scan2-lmp-date) + ("LMP EDD" . ksh-scan2-lmp-edd))) (list "Indications\n" "Target Scan\n" "Real time B-mode ultrasonography of gravid uterus done.\n" - "Route: Transabdominal\n" scan "\n\n") + "Route: Transabdominal\n" ksh-scan2-scan "\n\n") (list "Maternal\n") (seq-mapcat 'form-entry - '(("Cervix" . maternal-cervix) - ("Internal os" . maternal-internal-os))) + '(("Cervix" . ksh-scan2-maternal-cervix) + ("Internal os" . ksh-scan2-maternal-internal-os))) (list "Fetal Survey\n") (seq-mapcat 'form-entry - '(("Presentation" . survey-presentation) - ("Placenta" . survey-placenta) - ("Liquor" . survey-liquor) - ("Umbilical cord" . survey-umbilical-cord) - ("Fetal activity" . survey-fetal-activity) - ("Cardiac activity" . survey-cardiac-activity))) + '(("Presentation" . ksh-scan2-survey-presentation) + ("Placenta" . ksh-scan2-survey-placenta) + ("Liquor" . ksh-scan2-survey-liquor) + ("Umbilical cord" . ksh-scan2-survey-umbilical-cord) + ("Fetal activity" . ksh-scan2-survey-fetal-activity) + ("Cardiac activity" . ksh-scan2-survey-cardiac-activity))) (list "Fetal Biometry\n") (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))) + '(("BPD" . ksh-scan2-biometry-bpd) + ("BPD-Age" . ksh-scan2-biometry-bpd-age) + ("BPD-Percentile" . ksh-scan2-biometry-bpd-percentile) + ("HC" . ksh-scan2-biometry-hc) + ("HC-Age" . ksh-scan2-biometry-hc-age) + ("HC-Percentile" . ksh-scan2-biometry-hc-percentile) + ("AC" . ksh-scan2-biometry-ac) + ("AC-Age" . ksh-scan2-biometry-ac-age) + ("AC-Percentile" . ksh-scan2-biometry-ac-percentile) + ("FL" . ksh-scan2-biometry-fl) + ("FL-Age" . ksh-scan2-biometry-fl-age) + ("FL-Percentile" . ksh-scan2-biometry-fl-percentile) + ("Estimated fetal weight according to BPD, HC, AC, FL" . ksh-scan2-biometry-fetal-weight))) (list "Extended Biometry\n") (seq-mapcat 'form-entry - '(("Foot Length" . extended-foot-length) - ("TCD" . extended-tcd))) + '(("Foot Length" . ksh-scan2-extended-foot-length) + ("TCD" . ksh-scan2-extended-tcd))) (list "Fetal Anatomy\n") (seq-mapcat 'form-entry - '(("Intracranial structures" . anatomy-intracranial) - ("Neck" . anatomy-neck) - ("Spine" . anatomy-spine) - ("Fetal face" . anatomy-face) - ("Both lungs" . anatomy-lungs) - ("Heart" . anatomy-heart) - ("Abdominal situs" . anatomy-abdominal-situs) - ("Both kidneys and bladder" . anatomy-kidneys-bladder) - ("All long bones" . anatomy-long-bones))) + '(("Intracranial structures" . ksh-scan2-anatomy-intracranial) + ("Neck" . ksh-scan2-anatomy-neck) + ("Spine" . ksh-scan2-anatomy-spine) + ("Fetal face" . ksh-scan2-anatomy-face) + ("Both lungs" . ksh-scan2-anatomy-lungs) + ("Heart" . ksh-scan2-anatomy-heart) + ("Abdominal situs" . ksh-scan2-anatomy-abdominal-situs) + ("Both kidneys and bladder" . ksh-scan2-anatomy-kidneys-bladder) + ("All long bones" . ksh-scan2-anatomy-long-bones))) (list "Impression\n") (seq-mapcat 'form-entry - '(("Gestational age" . impression-gestational-age) - ("Menstrual age" . impression-menstrual-age) - ("Corrected EDD" . impression-corrected-edd) - ("Notes" . impression-notes) - ("Sonologist" . sonologist))))) + '(("Gestational age" . ksh-scan2-impression-gestational-age) + ("Menstrual age" . ksh-scan2-impression-menstrual-age) + ("Corrected EDD" . ksh-scan2-impression-corrected-edd) + ("Notes" . ksh-scan2-impression-notes) + ("Sonologist" . ksh-scan2-sonologist))))) (setq form-to-org (lambda () (with-output-to-string (make-report-header "OB - 2/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))) + `(("IP/OP No" . ,ksh-scan2-ip-op-no) + ("Age" . ,ksh-scan2-age) + ("Sex" . ,ksh-scan2-sex) + ("Name of Patient" . ,ksh-scan2-patient-name) + ("Visit Date" . ,ksh-scan2-visit-date) + ("LMP Date" . ,ksh-scan2-lmp-date) + ("LMP EDD" . ,ksh-scan2-lmp-edd))) (mapc 'princ `("* Indications\n" "** Target Scan\n" "Real time B-mode ultrasonography of gravid uterus done.\n\n")) (single-line-org-entry '("Route" . "Transabdominal")) - (princ (get-field scan)) + (princ (get-field ksh-scan2-scan)) (princ "\n\n* Maternal\n") (seq-do 'single-line-org-entry - `(("Cervix" . ,maternal-cervix) - ("Internal os" . ,maternal-internal-os))) + `(("Cervix" . ,ksh-scan2-maternal-cervix) + ("Internal os" . ,ksh-scan2-maternal-internal-os))) (princ "* Fetal Survey\n") (seq-do 'single-line-org-entry - `(("Presentation" . ,survey-presentation) - ("Placenta" . ,survey-placenta) - ("Liquor" . ,survey-liquor) - ("Umbilical cord" . ,survey-umbilical-cord) - ("Fetal activity" . ,survey-fetal-activity) - ("Cardiac activity" . ,survey-cardiac-activity))) + `(("Presentation" . ,ksh-scan2-survey-presentation) + ("Placenta" . ,ksh-scan2-survey-placenta) + ("Liquor" . ,ksh-scan2-survey-liquor) + ("Umbilical cord" . ,ksh-scan2-survey-umbilical-cord) + ("Fetal activity" . ,ksh-scan2-survey-fetal-activity) + ("Cardiac activity" . ,ksh-scan2-survey-cardiac-activity))) (insert-biometry "Fetal 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))) + `(("BPD" ,ksh-scan2-biometry-bpd ,ksh-scan2-biometry-bpd-age ,ksh-scan2-biometry-bpd-percentile) + ("HC" ,ksh-scan2-biometry-hc ,ksh-scan2-biometry-hc-age ,ksh-scan2-biometry-hc-percentile) + ("AC" ,ksh-scan2-biometry-ac ,ksh-scan2-biometry-ac-age ,ksh-scan2-biometry-ac-percentile) + ("FL" ,ksh-scan2-biometry-fl ,ksh-scan2-biometry-fl-age ,ksh-scan2-biometry-fl-percentile))) (princ "* Extended Biometry\n") (seq-do 'single-line-org-entry - `(("Foot Length" . ,extended-foot-length) - ("TCD" . ,extended-tcd))) + `(("Foot Length" . ,ksh-scan2-extended-foot-length) + ("TCD" . ,ksh-scan2-extended-tcd))) (princ "* Fetal Anatomy\n") (seq-do 'single-line-org-entry - `(("Intracranial structures" . ,anatomy-intracranial) - ("Neck" . ,anatomy-neck) - ("Spine" . ,anatomy-spine) - ("Fetal face" . ,anatomy-face) - ("Both lungs" . ,anatomy-lungs) - ("Heart" . ,anatomy-heart) - ("Abdominal situs" . ,anatomy-abdominal-situs) - ("Both kidneys and bladder" . ,anatomy-kidneys-bladder) - ("All long bones" . ,anatomy-long-bones))) + `(("Intracranial structures" . ,ksh-scan2-anatomy-intracranial) + ("Neck" . ,ksh-scan2-anatomy-neck) + ("Spine" . ,ksh-scan2-anatomy-spine) + ("Fetal face" . ,ksh-scan2-anatomy-face) + ("Both lungs" . ,ksh-scan2-anatomy-lungs) + ("Heart" . ,ksh-scan2-anatomy-heart) + ("Abdominal situs" . ,ksh-scan2-anatomy-abdominal-situs) + ("Both kidneys and bladder" . ,ksh-scan2-anatomy-kidneys-bladder) + ("All long bones" . ,ksh-scan2-anatomy-long-bones))) (princ "* Impression\n") (princ (format "%s corresponding to a gestational age of %s\n\n" - (get-field scan) (get-field impression-gestational-age))) + (get-field ksh-scan2-scan) (get-field ksh-scan2-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))))) + `(("Menstrual age" . ,ksh-scan2-impression-menstrual-age) + ("Corrected EDD" . ,ksh-scan2-impression-corrected-edd) + ("Placenta" . ,ksh-scan2-survey-placenta) + ("Presentation" . ,ksh-scan2-survey-presentation) + ("Liquor" . ,ksh-scan2-survey-liquor) + ("Estimated fetal weight according to BPD,ksh-scan2- HC,ksh-scan2- AC,ksh-scan2- FL" . ,ksh-scan2-biometry-fetal-weight))) + (text-if-non-blank (get-field ksh-scan2-impression-notes)) + (multi-line-org-entry `("Sonologist" . ,ksh-scan2-sonologist))))) diff --git a/ksh-scan3.el b/ksh-scan3.el index 7d25a74..76a7431 100644 --- a/ksh-scan3.el +++ b/ksh-scan3.el @@ -7,121 +7,122 @@ (setq forms-file (expand-file-name "data/scan3.dat" ksh-path)) (setq forms-number-of-fields (forms-enumerate - '(ip-op-no patient-name age sex visit-date lmp-date lmp-edd - scan - survey-presentation survey-placenta survey-liquor - survey-amniotic-fluid-index survey-umbilical-cord - survey-fetal-activity survey-cardiac-activity - survey-fetal-heart-rate - biometry-bpd biometry-bpd-age biometry-bpd-percentile - biometry-hc biometry-hc-age biometry-hc-percentile - biometry-ac biometry-ac-age biometry-ac-percentile - biometry-fl biometry-fl-age biometry-fl-percentile - biometry-fetal-weight - impression-gestational-age impression-menstrual-age - impression-corrected-edd impression-notes - sonologist))) + (list 'ksh-scan3-ip-op-no 'ksh-scan3-patient-name 'ksh-scan3-age 'ksh-scan3-sex + 'ksh-scan3-visit-date 'ksh-scan3-lmp-date 'ksh-scan3-lmp-edd + 'ksh-scan3-scan + 'ksh-scan3-survey-presentation 'ksh-scan3-survey-placenta 'ksh-scan3-survey-liquor + 'ksh-scan3-survey-amniotic-fluid-index 'ksh-scan3-survey-umbilical-cord + 'ksh-scan3-survey-fetal-activity 'ksh-scan3-survey-cardiac-activity + 'ksh-scan3-survey-fetal-heart-rate + 'ksh-scan3-biometry-bpd 'ksh-scan3-biometry-bpd-age 'ksh-scan3-biometry-bpd-percentile + 'ksh-scan3-biometry-hc 'ksh-scan3-biometry-hc-age 'ksh-scan3-biometry-hc-percentile + 'ksh-scan3-biometry-ac 'ksh-scan3-biometry-ac-age 'ksh-scan3-biometry-ac-percentile + 'ksh-scan3-biometry-fl 'ksh-scan3-biometry-fl-age 'ksh-scan3-biometry-fl-percentile + 'ksh-scan3-biometry-fetal-weight + 'ksh-scan3-impression-gestational-age 'ksh-scan3-impression-menstrual-age + 'ksh-scan3-impression-corrected-edd 'ksh-scan3-impression-notes + 'ksh-scan3-sonologist))) ;; Default values for fields (setq default-field-values - `((,sex . "F") - (,survey-presentation . "cephalic") - (,survey-placenta . "posterior") - (,survey-liquor . "normal") - (,survey-fetal-activity . "normal") - (,survey-cardiac-activity . "normal") - (,sonologist . "Dr. Bala Bharathy"))) + `((,ksh-scan3-sex . "F") + (,ksh-scan3-survey-presentation . "cephalic") + (,ksh-scan3-survey-placenta . "posterior") + (,ksh-scan3-survey-liquor . "normal") + (,ksh-scan3-survey-fetal-activity . "normal") + (,ksh-scan3-survey-cardiac-activity . "normal") + (,ksh-scan3-sonologist . "Dr. Bala Bharathy"))) ;; Format specification for form display (setq forms-format-list (append (list "Trimester 3 - Scan Report\n\n") (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))) + '(("IP/OP No" . ksh-scan3-ip-op-no) + ("Patient Name" . ksh-scan3-patient-name) + ("Age" . ksh-scan3-age) + ("Sex" . ksh-scan3-sex) + ("Visit Date" . ksh-scan3-visit-date) + ("LMP Date" . ksh-scan3-lmp-date) + ("LMP EDD" . ksh-scan3-lmp-edd))) (list "Indications\n" "Growth Scan\n" "Real time B-mode ultrasonography of gravid uterus done.\n" - "Route: Transabdominal\n" scan "\n\n") + "Route: Transabdominal\n" ksh-scan3-scan "\n\n") (list "Fetal Survey\n") (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))) + '(("Presentation" . ksh-scan3-survey-presentation) + ("Placenta" . ksh-scan3-survey-placenta) + ("Liquor" . ksh-scan3-survey-liquor) + ("Amniotic fluid index" . ksh-scan3-survey-amniotic-fluid-index) + ("Umbilical cord" . ksh-scan3-survey-umbilical-cord) + ("Fetal activity" . ksh-scan3-survey-fetal-activity) + ("Cardiac activity" . ksh-scan3-survey-cardiac-activity) + ("Fetal heart rate" . ksh-scan3-survey-fetal-heart-rate))) (list "Fetal Biometry\n") (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))) + '(("BPD" . ksh-scan3-biometry-bpd) + ("BPD-Age" . ksh-scan3-biometry-bpd-age) + ("BPD-Percentile" . ksh-scan3-biometry-bpd-percentile) + ("HC" . ksh-scan3-biometry-hc) + ("HC-Age" . ksh-scan3-biometry-hc-age) + ("HC-Percentile" . ksh-scan3-biometry-hc-percentile) + ("AC" . ksh-scan3-biometry-ac) + ("AC-Age" . ksh-scan3-biometry-ac-age) + ("AC-Percentile" . ksh-scan3-biometry-ac-percentile) + ("FL" . ksh-scan3-biometry-fl) + ("FL-Age" . ksh-scan3-biometry-fl-age) + ("FL-Percentile" . ksh-scan3-biometry-fl-percentile) + ("Estimated fetal weight according to BPD, HC, AC, FL" . ksh-scan3-biometry-fetal-weight))) (list "Impression\n") (seq-mapcat 'form-entry - '(("Gestational age" . impression-gestational-age) - ("Menstrual age" . impression-menstrual-age) - ("Corrected EDD" . impression-corrected-edd) - ("Notes" . impression-notes) - ("Sonologist" . sonologist))))) + '(("Gestational age" . ksh-scan3-impression-gestational-age) + ("Menstrual age" . ksh-scan3-impression-menstrual-age) + ("Corrected EDD" . ksh-scan3-impression-corrected-edd) + ("Notes" . ksh-scan3-impression-notes) + ("Sonologist" . ksh-scan3-sonologist))))) (setq form-to-org (lambda () (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))) + `(("IP/OP No" . ,ksh-scan3-ip-op-no) + ("Age" . ,ksh-scan3-age) + ("Sex" . ,ksh-scan3-sex) + ("Name of Patient" . ,ksh-scan3-patient-name) + ("Visit Date" . ,ksh-scan3-visit-date) + ("LMP Date" . ,ksh-scan3-lmp-date) + ("LMP EDD" . ,ksh-scan3-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)) + (text-if-non-blank (get-field ksh-scan3-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))) + `(("Presentation" . ,ksh-scan3-survey-presentation) + ("Placenta" . ,ksh-scan3-survey-placenta) + ("Liquor" . ,ksh-scan3-survey-liquor) + ("Amniotic fluid index" . ,ksh-scan3-survey-amniotic-fluid-index) + ("Umbilical cord" . ,ksh-scan3-survey-umbilical-cord) + ("Fetal activity" . ,ksh-scan3-survey-fetal-activity) + ("Cardiac activity" . ,ksh-scan3-survey-cardiac-activity) + ("Fetal heart rate" . ,ksh-scan3-survey-fetal-heart-rate))) (insert-biometry "Fetal 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))) + `(("BPD" ,ksh-scan3-biometry-bpd ,ksh-scan3-biometry-bpd-age ,ksh-scan3-biometry-bpd-percentile) + ("HC" ,ksh-scan3-biometry-hc ,ksh-scan3-biometry-hc-age ,ksh-scan3-biometry-hc-percentile) + ("AC" ,ksh-scan3-biometry-ac ,ksh-scan3-biometry-ac-age ,ksh-scan3-biometry-ac-percentile) + ("FL" ,ksh-scan3-biometry-fl ,ksh-scan3-biometry-fl-age ,ksh-scan3-biometry-fl-percentile))) (princ "* Impression\n") (princ (format "%s gestational age assigned as per biometry (CRL)\n\n" - (get-field impression-gestational-age))) + (get-field ksh-scan3-impression-gestational-age))) (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))))) + `(("Menstrual age" . ,ksh-scan3-impression-menstrual-age) + ("Corrected EDD" . ,ksh-scan3-impression-corrected-edd) + ("Placenta" . ,ksh-scan3-survey-placenta) + ("Presentation" . ,ksh-scan3-survey-presentation) + ("Liquor" . ,ksh-scan3-survey-liquor) + ("Estimated fetal weight according to BPD, HC, AC, FL" . ,ksh-scan3-biometry-fetal-weight))) + (text-if-non-blank (get-field ksh-scan3-impression-notes)) + (multi-line-org-entry `("Sonologist" . ,ksh-scan3-sonologist))))) |