@ampath/esm-reports-app 1.0.0-next.11 → 1.0.0-next.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/197.js +1 -1
- package/dist/282.js +1 -1
- package/dist/282.js.map +1 -1
- package/dist/295.css +1 -0
- package/dist/295.css.map +1 -0
- package/dist/295.js +1 -0
- package/dist/295.js.map +1 -0
- package/dist/299.js +2 -0
- package/dist/299.js.LICENSE.txt +3 -0
- package/dist/299.js.map +1 -0
- package/dist/300.js +1 -1
- package/dist/311.js +1 -1
- package/dist/311.js.map +1 -1
- package/dist/335.js +1 -1
- package/dist/353.js +1 -1
- package/dist/353.js.map +1 -1
- package/dist/354.js +2 -0
- package/dist/354.js.LICENSE.txt +20 -0
- package/dist/354.js.map +1 -0
- package/dist/410.js +1 -0
- package/dist/410.js.map +1 -0
- package/dist/457.js +2 -0
- package/dist/457.js.LICENSE.txt +261 -0
- package/dist/457.js.map +1 -0
- package/dist/478.js +1 -1
- package/dist/478.js.map +1 -1
- package/dist/480.js +1 -0
- package/dist/540.js +1 -1
- package/dist/540.js.map +1 -1
- package/dist/55.js +1 -1
- package/dist/600.js +2 -0
- package/dist/600.js.LICENSE.txt +35 -0
- package/dist/600.js.map +1 -0
- package/dist/652.js +1 -1
- package/dist/757.js +1 -0
- package/dist/757.js.map +1 -0
- package/dist/781.js +1 -0
- package/dist/781.js.map +1 -0
- package/dist/955.css +1 -0
- package/dist/955.css.map +1 -0
- package/dist/955.js +1 -0
- package/dist/955.js.map +1 -0
- package/dist/961.js +1 -1
- package/dist/961.js.map +1 -1
- package/dist/99.js +1 -1
- package/dist/99.js.map +1 -0
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/ampath-esm-reports-app.js.map +1 -1
- package/dist/routes.json +1 -1
- package/local-config.json +5 -0
- package/package.json +5 -2
- package/src/common/daily-summary-table.tsx +55 -0
- package/src/common/linelist-table/index.ts +3 -0
- package/src/common/linelist-table/linelist-columns.ts +48 -0
- package/src/common/linelist-table/linelist-table.component.tsx +442 -0
- package/src/common/linelist-table/linelist-table.scss +306 -0
- package/src/common/linelist-table/linelist-table.test.tsx +120 -0
- package/src/common/linelist-table/use-all-rows.ts +93 -0
- package/src/common/linelist-table/use-column-layout.ts +123 -0
- package/src/common/report-error/index.ts +1 -0
- package/src/common/report-error/show-report-error.ts +25 -0
- package/src/common/report-filters/date-range.ts +137 -0
- package/src/common/report-filters/index.ts +4 -0
- package/src/common/report-filters/report-filters.component.tsx +319 -101
- package/src/common/report-filters/report-filters.scss +269 -32
- package/src/common/report-filters/types.ts +83 -0
- package/src/common/report-filters/use-restore-period.ts +53 -0
- package/src/common/report-header/index.ts +2 -0
- package/src/common/report-header/use-facility-name.ts +117 -0
- package/src/common/report-header/use-location-details.ts +58 -0
- package/src/common/report-page/download-sheet-pdf.ts +225 -0
- package/src/common/report-page/index.ts +3 -0
- package/src/common/report-page/report-page.component.tsx +32 -0
- package/src/common/report-page/report-page.scss +45 -0
- package/src/common/report-page/use-page-scale.ts +60 -0
- package/src/common/report-placeholder/has-report-data.ts +15 -0
- package/src/common/report-placeholder/index.ts +3 -0
- package/src/common/report-placeholder/report-placeholder.component.tsx +81 -0
- package/src/common/report-placeholder/report-placeholder.scss +48 -0
- package/src/common/report-placeholder/use-generated-location.ts +62 -0
- package/src/common/report-register/index.ts +6 -0
- package/src/common/report-register/register-columns.ts +46 -0
- package/src/common/report-register/register-layout.component.tsx +302 -0
- package/src/common/report-register/register-layout.scss +209 -0
- package/src/common/report-register/register-table.scss +71 -0
- package/src/common/report-register/report-parents.ts +31 -0
- package/src/common/report-register/rows-to-csv.ts +89 -0
- package/src/common/report-register/use-location-name.ts +54 -0
- package/src/common/report-register/use-patient-list.ts +92 -0
- package/src/common/report-skeleton/index.ts +1 -0
- package/src/common/report-skeleton/report-skeleton.component.tsx +46 -0
- package/src/common/report-skeleton/report-skeleton.scss +29 -0
- package/src/config-schema.ts +9 -1
- package/src/dashboard/report-catalog.ts +501 -0
- package/src/dashboard/reports-dasboard.tsx +269 -33
- package/src/dashboard/reports-dashboard.module.scss +601 -14
- package/src/index.ts +13 -1
- package/src/registers/moh-240/moh-240-register.scss +41 -0
- package/src/registers/moh-240/moh-240.component.test.tsx +166 -0
- package/src/registers/moh-240/moh-240.component.tsx +164 -0
- package/src/registers/moh-267/moh-267-register.component.tsx +409 -0
- package/src/registers/moh-267/moh-267-register.scss +298 -0
- package/src/registers/moh-267/moh-267-summary.ts +103 -0
- package/src/registers/moh-267/moh-267.component.tsx +94 -0
- package/src/registers/moh-267/moh-267.types.ts +47 -0
- package/src/registers/moh-362/moh-362-lab-register.component.tsx +551 -0
- package/src/registers/moh-362/moh-362-lab-register.scss +412 -0
- package/src/registers/moh-362/moh-362-linkage-register.component.tsx +215 -0
- package/src/registers/moh-362/moh-362-linkage-register.scss +91 -0
- package/src/registers/moh-362/moh-362.component.tsx +117 -0
- package/src/registers/moh-362/moh-362.scss +11 -0
- package/src/registers/moh-362/moh-362.types.ts +87 -0
- package/src/registers/moh-368/moh-368.columns.ts +36 -0
- package/src/registers/moh-368/moh-368.component.tsx +178 -0
- package/src/registers/moh-368/moh-368.scss +163 -0
- package/src/registers/presumptive-tb/presumptive-tb-register.component.tsx +391 -0
- package/src/registers/presumptive-tb/presumptive-tb-register.scss +262 -0
- package/src/registers/presumptive-tb/presumptive-tb.component.tsx +92 -0
- package/src/registers/presumptive-tb/presumptive-tb.types.ts +88 -0
- package/src/registers/register-catalog.ts +293 -0
- package/src/registers/register-file-name.ts +18 -0
- package/src/registers/tb-lab-register/tb-lab-register-table.component.tsx +116 -0
- package/src/registers/tb-lab-register/tb-lab-register-table.scss +123 -0
- package/src/registers/tb-lab-register/tb-lab-register.columns.ts +164 -0
- package/src/registers/tb-lab-register/tb-lab-register.component.test.tsx +232 -0
- package/src/registers/tb-lab-register/tb-lab-register.component.tsx +153 -0
- package/src/registers/tb4/tb4-parts.tsx +164 -0
- package/src/registers/tb4/tb4-patient-sheet.component.tsx +418 -0
- package/src/registers/tb4/tb4-register.scss +282 -0
- package/src/registers/tb4/tb4-treatment-sheet.component.tsx +349 -0
- package/src/registers/tb4/tb4.component.tsx +120 -0
- package/src/registers/tb4/tb4.types.ts +129 -0
- package/src/reports/acf-summary/acf-summary-form.component.tsx +176 -0
- package/src/reports/acf-summary/acf-summary-linelist.component.tsx +91 -0
- package/src/reports/acf-summary/acf-summary.component.tsx +101 -0
- package/src/reports/acf-summary/acf-summary.counts.ts +37 -0
- package/src/reports/acf-summary/acf-summary.scss +162 -0
- package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +63 -48
- package/src/reports/moh-240/line-list.columns.test.tsx +156 -0
- package/src/reports/moh-240/line-list.columns.ts +139 -0
- package/src/reports/moh-240/moh-240-header.component.tsx +62 -0
- package/src/reports/moh-240/moh-240.columns.ts +113 -0
- package/src/reports/moh-240/moh-240.component.test.tsx +109 -0
- package/src/reports/moh-240/moh-240.component.tsx +85 -9
- package/src/reports/moh-240/moh-240.scss +40 -0
- package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +31 -37
- package/src/reports/moh-240/sub-reports/page-summary.component.tsx +143 -90
- package/src/reports/moh-505/moh-505-header.component.tsx +67 -0
- package/src/reports/moh-505/moh-505.component.tsx +396 -231
- package/src/reports/moh-505/moh-505.scss +131 -0
- package/src/reports/moh-643/moh-643.component.tsx +222 -0
- package/src/reports/moh-643/moh-643.rows.ts +77 -0
- package/src/reports/moh-643/moh-643.scss +164 -0
- package/src/reports/moh-643/registers/moh-643-register.component.tsx +112 -0
- package/src/reports/moh-643/registers/moh-643.columns.ts +32 -0
- package/src/reports/moh-645/moh-645.component.tsx +331 -0
- package/src/reports/moh-645/moh-645.scss +147 -0
- package/src/reports/moh-645/registers/moh-645-register.component.tsx +125 -0
- package/src/reports/moh-645/registers/moh-645.columns.ts +40 -0
- package/src/reports/moh-705B/linelist/moh-705b-linelist.component.tsx +78 -0
- package/src/reports/moh-705B/moh-204b-register.component.tsx +318 -0
- package/src/reports/moh-705B/moh-204b.columns.ts +39 -0
- package/src/reports/moh-705B/moh-705b.component.tsx +622 -427
- package/src/reports/moh-705B/moh-705b.scss +153 -22
- package/src/reports/moh-705a/linelist/moh-705a-linelist.component.tsx +84 -0
- package/src/reports/moh-705a/moh-705a.component.test.tsx +56 -0
- package/src/reports/moh-705a/moh-705a.component.tsx +623 -433
- package/src/reports/moh-705a/moh-705a.scss +153 -22
- package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +404 -0
- package/src/reports/moh-705a/registers/moh-204a.columns.ts +57 -0
- package/src/reports/moh-705a/type.ts +6 -0
- package/src/reports/moh-706/moh-706-header.component.tsx +66 -0
- package/src/reports/moh-706/moh-706.component.tsx +150 -24
- package/src/reports/moh-706/moh-706.scss +119 -11
- package/src/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +43 -34
- package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +229 -305
- package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +30 -23
- package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +25 -25
- package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +31 -24
- package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +21 -14
- package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +2 -2
- package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +27 -20
- package/src/reports/moh-710/moh-710.component.tsx +803 -621
- package/src/reports/moh-710/moh-710.scss +142 -21
- package/src/reports/moh-710/registers/moh-413/moh-413-columns.ts +22 -0
- package/src/reports/moh-710/registers/moh-413/moh-413.component.tsx +140 -0
- package/src/reports/moh-710/registers/moh-413/moh-413.scss +64 -0
- package/src/reports/moh-710/registers/moh-510/moh-510.columns.ts +40 -0
- package/src/reports/moh-710/registers/moh-510/moh-510.component.tsx +191 -0
- package/src/reports/moh-710/registers/moh-510/moh-510.scss +130 -0
- package/src/reports/moh-710/registers/moh-511/moh-511-columns.ts +52 -0
- package/src/reports/moh-710/registers/moh-511/moh-511-register.component.tsx +301 -0
- package/src/reports/moh-710/registers/moh-511/moh-511.scss +130 -0
- package/src/reports/moh-710/registers/moh-511/type.ts +32 -0
- package/src/reports/moh-711/linelist/moh-711-anc-linelist.component.tsx +79 -0
- package/src/reports/moh-711/linelist/moh-711-chanis-linelist.component.tsx +75 -0
- package/src/reports/moh-711/linelist/moh-711-family-planning-linelist.component.tsx +105 -0
- package/src/reports/moh-711/linelist/moh-711-maternity-linelist.component.tsx +105 -0
- package/src/reports/moh-711/linelist/moh-711-pnc-linelist.component.tsx +82 -0
- package/src/reports/moh-711/linelist/use-open-moh-711-anc-linelist.ts +20 -0
- package/src/reports/moh-711/linelist/use-open-moh-711-chanis-linelist.ts +20 -0
- package/src/reports/moh-711/linelist/use-open-moh-711-family-planning-linelist.ts +20 -0
- package/src/reports/moh-711/linelist/use-open-moh-711-maternity-linelist.ts +20 -0
- package/src/reports/moh-711/linelist/use-open-moh-711-pnc-linelist.ts +20 -0
- package/src/reports/moh-711/moh-711.component.tsx +139 -67
- package/src/reports/moh-711/moh711.scss +113 -28
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +675 -0
- package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +562 -0
- package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +577 -0
- package/src/reports/moh-711/registers/moh-406.columns.ts +133 -0
- package/src/reports/moh-711/registers/moh-407-register.component.tsx +153 -0
- package/src/reports/moh-711/registers/moh-407.columns.ts +24 -0
- package/src/reports/moh-711/registers/moh-407.scss +64 -0
- package/src/reports/moh-711/registers/moh-512-columns.ts +94 -0
- package/src/reports/moh-711/registers/moh-512.component.tsx +276 -0
- package/src/reports/moh-711/registers/moh-512.scss +64 -0
- package/src/reports/moh-711/registers/tb-register-columns.ts +17 -0
- package/src/reports/moh-711/registers/tb-register.component.tsx +96 -0
- package/src/reports/moh-711/registers/tb-register.scss +64 -0
- package/src/reports/moh-711/registers/type.ts +192 -0
- package/src/reports/moh-711/sections/anc.component.tsx +39 -24
- package/src/reports/moh-711/sections/cervical-cancer.component.tsx +36 -33
- package/src/reports/moh-711/sections/chanis.component.tsx +89 -84
- package/src/reports/moh-711/sections/family-planning.component.tsx +117 -51
- package/src/reports/moh-711/sections/gbv.component.tsx +43 -43
- package/src/reports/moh-711/sections/maternity.component.tsx +76 -47
- package/src/reports/moh-711/sections/medical-social-work.component.tsx +11 -21
- package/src/reports/moh-711/sections/other.component.tsx +2 -2
- package/src/reports/moh-711/sections/physiotherapy.component.tsx +2 -2
- package/src/reports/moh-711/sections/pnc.component.tsx +38 -15
- package/src/reports/moh-711/sections/post-abortion.component.tsx +2 -2
- package/src/reports/moh-711/sections/rehabilitation.component.tsx +2 -2
- package/src/reports/moh-711/sections/report-compiled-by.component.tsx +12 -4
- package/src/reports/moh-711/sections/tb-screening.component.tsx +52 -15
- package/src/reports/moh-713/moh-713.component.scss +162 -0
- package/src/reports/moh-713/moh-713.component.tsx +122 -0
- package/src/reports/moh-713/sections/section-a-b-c.component.tsx +571 -0
- package/src/reports/moh-713/sections/section-d.component.tsx +133 -0
- package/src/reports/moh-717/moh-717.component.tsx +139 -97
- package/src/reports/moh-717/moh717.scss +174 -77
- package/src/reports/moh-717/registers/moh-209-register.component.tsx +159 -0
- package/src/reports/moh-717/registers/moh-209.columns.ts +30 -0
- package/src/reports/moh-717/registers/nutrition-register.component.tsx +48 -0
- package/src/reports/moh-717/sections/maternity.component.tsx +43 -13
- package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +1 -1
- package/src/reports/moh-717/sections/outpatient.component.tsx +130 -40
- package/src/reports/moh-717/sections/preparedby.component.tsx +7 -2
- package/src/reports/moh-717/sections/special-services.component.tsx +64 -10
- package/src/reports/moh-718/moh-718.component.scss +107 -0
- package/src/reports/moh-718/moh-718.component.tsx +2675 -0
- package/src/reports/moh-718/registers/moh-301/moh-301.register.scss +145 -0
- package/src/reports/moh-718/registers/moh-301/moh-301.register.tsx +173 -0
- package/src/reports/moh-729b/moh-729b-form.component.tsx +404 -0
- package/src/reports/moh-729b/moh-729b-linelist.component.tsx +283 -0
- package/src/reports/moh-729b/moh-729b-summary.component.tsx +258 -0
- package/src/reports/moh-729b/moh-729b-summary.config.ts +291 -0
- package/src/reports/moh-729b/moh-729b.component.tsx +165 -0
- package/src/reports/moh-729b/moh-729b.config.ts +241 -0
- package/src/reports/moh-729b/moh-729b.scss +276 -0
- package/src/reports/moh-729b/moh-729b.types.ts +177 -0
- package/src/reports/moh-731/linelist/moh-731-indicators.ts +1126 -0
- package/src/reports/moh-731/linelist/moh-731-linelist-sections.ts +474 -0
- package/src/reports/moh-731/linelist/moh-731-linelist.component.tsx +107 -0
- package/src/reports/moh-731/linelist/use-open-moh-731-linelist.ts +50 -0
- package/src/reports/moh-731/moh-731.component.tsx +272 -0
- package/src/reports/moh-731/moh-731.scss +496 -0
- package/src/reports/moh-731/registers/moh-366.columns.ts +38 -0
- package/src/reports/moh-731/registers/moh-366.component.tsx +471 -0
- package/src/reports/moh-731/registers/prep-register.component.tsx +284 -0
- package/src/reports/moh-731/registers/prep.columns.ts +34 -0
- package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +1206 -0
- package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +727 -0
- package/src/reports/moh-731/sections/pmtct.component.tsx +572 -0
- package/src/reports/moh-731/summary/moh-731-summary.component.tsx +313 -0
- package/src/reports/moh-731/summary/moh-731-summary.config.ts +538 -0
- package/src/reports/moh-731/summary/moh-731-summary.scss +247 -0
- package/src/reports/moh-733/linelist/moh-733-linelist.component.tsx +75 -0
- package/src/reports/moh-733/linelist/use-open-moh-733-linelist.ts +19 -0
- package/src/reports/moh-733/moh-733.component.tsx +176 -0
- package/src/reports/moh-733/moh-733.scss +222 -0
- package/src/reports/moh-733/sections/client-category.component.tsx +432 -0
- package/src/reports/moh-733/sections/nutrition-intervention-pregnant-breastfeeding.component.tsx +318 -0
- package/src/reports/moh-733/sections/nutrition-intervention.component.tsx +412 -0
- package/src/reports/moh-733/sections/nutrition-status-weight.component.tsx +409 -0
- package/src/reports/moh-733/sections/nutrition-status.component.tsx +409 -0
- package/src/reports/moh-740/moh-740.component.scss +202 -30
- package/src/reports/moh-740/moh-740.component.tsx +1313 -308
- package/src/reports/moh-740/moh-740.resource.ts +48 -8
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss +20 -0
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +183 -0
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss +6 -0
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +151 -0
- package/src/reports/moh-740/registers/moh-740-patient-list.scss +0 -0
- package/src/reports/moh-740/registers/moh-740-patient-list.tsx +60 -0
- package/src/reports/moh-740/registers/moh-740.columns.ts +54 -0
- package/src/reports/moh-740/shared/data-cell/data-cell.scss +6 -0
- package/src/reports/moh-740/shared/data-cell/data-cell.tsx +23 -0
- package/src/reports/moh-740/shared/utils/indicator-register-map.ts +159 -0
- package/src/reports/moh-740/types/index.ts +198 -2
- package/src/reports/moh-745/moh-745.component.tsx +2020 -591
- package/src/reports/moh-745/moh-745.scss +114 -39
- package/src/reports/moh-745/registers/moh-412-register.component.scss +6 -0
- package/src/reports/moh-745/registers/moh-412-register.component.tsx +275 -0
- package/src/reports/moh-745/registers/moh-412.columns.ts +52 -0
- package/src/reports/moh-745/registers/type.ts +223 -0
- package/src/reports/program/care-and-treatment/care-and-treatment-linelist.component.tsx +148 -0
- package/src/reports/program/care-and-treatment/care-and-treatment-table.component.tsx +159 -0
- package/src/reports/program/care-and-treatment/care-and-treatment.component.tsx +284 -0
- package/src/reports/program/care-and-treatment/care-and-treatment.config.ts +210 -0
- package/src/reports/program/care-and-treatment/care-and-treatment.scss +460 -0
- package/src/reports/program/program-report.component.tsx +97 -0
- package/src/reports/program/program-report.scss +75 -0
- package/src/reports/table-wrapper/table-row-mapper.component.tsx +19 -4
- package/src/reports/table-wrapper/table-wrapper.component.tsx +23 -14
- package/src/reports/table-wrapper/table-wrapper.scss +1 -16
- package/src/resources/care-and-treatment.resource.ts +65 -0
- package/src/resources/moh-267.resource.ts +27 -0
- package/src/resources/moh-362.resource.ts +27 -0
- package/src/resources/moh-505.resource.ts +76 -0
- package/src/resources/moh-643.resource.ts +61 -0
- package/src/resources/moh-645.resource.ts +61 -0
- package/src/resources/moh-705.resource.ts +81 -17
- package/src/resources/moh-706.resource.ts +80 -0
- package/src/resources/moh-710.resource.ts +92 -9
- package/src/resources/moh-711.resource.ts +188 -9
- package/src/resources/moh-713.resource.ts +64 -0
- package/src/resources/moh-717.resource.ts +57 -9
- package/src/resources/moh-729b.resource.ts +25 -0
- package/src/resources/moh-731.resource.ts +90 -0
- package/src/resources/moh-733.resource.ts +31 -0
- package/src/resources/moh-745.resource.ts +56 -14
- package/src/resources/patient-list-page.ts +66 -0
- package/src/resources/presumptive-tb.resource.ts +27 -0
- package/src/root.component.tsx +146 -13
- package/src/root.scss +36 -0
- package/src/routes.json +3 -1
- package/src/utils/format-indicator.ts +39 -0
- package/src/utils/get-base-url.ts +39 -7
- package/src/utils/utils.ts +30 -1
- package/tsconfig.json +1 -1
- package/webpack.config.js +22 -1
- package/dist/138.js +0 -2
- package/dist/138.js.LICENSE.txt +0 -20
- package/dist/138.js.map +0 -1
- package/dist/184.js +0 -2
- package/dist/184.js.LICENSE.txt +0 -14
- package/dist/184.js.map +0 -1
- package/dist/205.js +0 -1
- package/dist/205.js.map +0 -1
- package/dist/339.js +0 -1
- package/dist/339.js.map +0 -1
- package/dist/812.js +0 -1
- package/dist/812.js.map +0 -1
- package/dist/ampath-esm-reports-app.js.buildmanifest.json +0 -560
- package/dist/main.js +0 -1
- package/dist/main.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { Tab, TabList, TabPanel, TabPanels, Tabs } from '@carbon/react';
|
|
4
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
5
|
+
|
|
6
|
+
import { ReportFiltersComponent, type ReportPeriod, useRestorePeriod } from '../../common/report-filters';
|
|
7
|
+
import { showReportError } from '../../common/report-error';
|
|
8
|
+
import { downloadSheetsPdf } from '../../common/report-page';
|
|
9
|
+
import { registerFileName } from '../register-file-name';
|
|
10
|
+
import { ReportPlaceholder, useGeneratedLocation } from '../../common/report-placeholder';
|
|
11
|
+
import { ReportSkeleton } from '../../common/report-skeleton';
|
|
12
|
+
import { getMoh362 } from '../../resources/moh-362.resource';
|
|
13
|
+
import Moh362LabRegister from './moh-362-lab-register.component';
|
|
14
|
+
import Moh362LinkageRegister from './moh-362-linkage-register.component';
|
|
15
|
+
import { isLinked, type Moh362Row } from './moh-362.types';
|
|
16
|
+
import styles from './moh-362.scss';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* MOH 362 HTS Lab, Referral & Linkage Register, opened from the landing page's
|
|
20
|
+
* Registers tab. It shares the reports' filter bar. Unlike the other registers
|
|
21
|
+
* the form holds two sheets, shown as tabs: the HTS lab register (every test,
|
|
22
|
+
* the same tests as MOH 731 1.1 HIV Tests) and the referral and linkage
|
|
23
|
+
* register (those who tested positive and were linked to care, i.e. have an ART
|
|
24
|
+
* start date).
|
|
25
|
+
*/
|
|
26
|
+
const Moh362Register: React.FC = () => {
|
|
27
|
+
const [rows, setRows] = useState<Moh362Row[] | null>(null);
|
|
28
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
29
|
+
const [period, setPeriod] = useState<{ startDate: string; endDate: string }>({ startDate: '', endDate: '' });
|
|
30
|
+
|
|
31
|
+
const session = useSession();
|
|
32
|
+
const locationUuids = session?.sessionLocation?.uuid ?? '';
|
|
33
|
+
/* Only a register for the current location counts */
|
|
34
|
+
const { isForCurrentLocation, hasLocationChanged, markGenerated } = useGeneratedLocation('moh362Location');
|
|
35
|
+
const isGenerated = rows !== null && isForCurrentLocation;
|
|
36
|
+
|
|
37
|
+
const generate = async ({ startDate, endDate }: ReportPeriod) => {
|
|
38
|
+
setIsLoading(true);
|
|
39
|
+
setPeriod({ startDate, endDate });
|
|
40
|
+
try {
|
|
41
|
+
setRows(await getMoh362({ locationUuids, startDate, endDate }));
|
|
42
|
+
markGenerated(locationUuids);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
showReportError('the MOH 362 register', error);
|
|
45
|
+
} finally {
|
|
46
|
+
setIsLoading(false);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
useRestorePeriod(generate);
|
|
51
|
+
|
|
52
|
+
/* Download PDF saves the whole register, whichever sheet is open: the HTS lab
|
|
53
|
+
register's pages, then the referral and linkage register's, each an A4
|
|
54
|
+
landscape page. The file is made from copies, so the pages on screen are
|
|
55
|
+
left as they are. */
|
|
56
|
+
const sheetsRef = useRef<HTMLDivElement>(null);
|
|
57
|
+
const downloadPdf = async () => {
|
|
58
|
+
const pages = Array.from(sheetsRef.current?.querySelectorAll<HTMLElement>('[data-register-page]') ?? []);
|
|
59
|
+
const name = registerFileName('MOH-362', session?.sessionLocation?.display ?? '', period);
|
|
60
|
+
/* the register is styled by its own stylesheets in Arial and Georgia only,
|
|
61
|
+
and runs to many pages */
|
|
62
|
+
await downloadSheetsPdf(pages, name, { orientation: 'landscape', stylesheetsOnly: true, image: 'jpeg' });
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/* the open sheet is kept in the URL */
|
|
66
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
67
|
+
const selectedSheet = searchParams.get('sheet') === 'linkage' ? 1 : 0;
|
|
68
|
+
const selectSheet = ({ selectedIndex }: { selectedIndex: number }) => {
|
|
69
|
+
const next = new URLSearchParams(searchParams);
|
|
70
|
+
if (selectedIndex === 1) {
|
|
71
|
+
next.set('sheet', 'linkage');
|
|
72
|
+
} else {
|
|
73
|
+
next.delete('sheet');
|
|
74
|
+
}
|
|
75
|
+
setSearchParams(next, { replace: true });
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<>
|
|
80
|
+
<ReportFiltersComponent
|
|
81
|
+
reportName="MOH 362 HTS Lab, Referral & Linkage Register"
|
|
82
|
+
mode="both"
|
|
83
|
+
onGenerate={generate}
|
|
84
|
+
isLoading={isLoading}
|
|
85
|
+
isReportGenerated={isGenerated}
|
|
86
|
+
generatedPeriod={period}
|
|
87
|
+
defaultTab="custom"
|
|
88
|
+
backLink={{ label: 'All registers', to: '/?tab=registers' }}
|
|
89
|
+
onDownloadPdf={downloadPdf}
|
|
90
|
+
/>
|
|
91
|
+
{isLoading && <ReportSkeleton />}
|
|
92
|
+
{!isLoading && !isGenerated && (
|
|
93
|
+
<ReportPlaceholder reportName="MOH 362 register" isLocationChanged={rows !== null && hasLocationChanged} />
|
|
94
|
+
)}
|
|
95
|
+
{!isLoading && isGenerated && (
|
|
96
|
+
<div ref={sheetsRef}>
|
|
97
|
+
<Tabs selectedIndex={selectedSheet} onChange={selectSheet}>
|
|
98
|
+
<TabList aria-label="MOH 362 registers" className={styles.sheetTabs}>
|
|
99
|
+
<Tab>HTS Lab Register</Tab>
|
|
100
|
+
<Tab>Referral and Linkage Register</Tab>
|
|
101
|
+
</TabList>
|
|
102
|
+
<TabPanels>
|
|
103
|
+
<TabPanel className={styles.sheetPanel}>
|
|
104
|
+
<Moh362LabRegister rows={rows} />
|
|
105
|
+
</TabPanel>
|
|
106
|
+
<TabPanel className={styles.sheetPanel}>
|
|
107
|
+
<Moh362LinkageRegister rows={rows.filter(isLinked)} />
|
|
108
|
+
</TabPanel>
|
|
109
|
+
</TabPanels>
|
|
110
|
+
</Tabs>
|
|
111
|
+
</div>
|
|
112
|
+
)}
|
|
113
|
+
</>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default Moh362Register;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One test in the MOH 362 register, as the ETL returns it (/moh-362-register):
|
|
5
|
+
* the same tests as MOH 731 1.1 HIV Tests, with the register's details.
|
|
6
|
+
*/
|
|
7
|
+
export interface Moh362Row {
|
|
8
|
+
serial_number?: number | string;
|
|
9
|
+
patient_id?: number;
|
|
10
|
+
nupi?: string | null;
|
|
11
|
+
amrsID?: string | null;
|
|
12
|
+
id_number?: string | null;
|
|
13
|
+
full_name?: string | null;
|
|
14
|
+
first_name?: string | null;
|
|
15
|
+
middle_name?: string | null;
|
|
16
|
+
last_name?: string | null;
|
|
17
|
+
age?: number | string | null;
|
|
18
|
+
sex?: string | null;
|
|
19
|
+
telephone?: string | null;
|
|
20
|
+
date_of_visit?: string | null;
|
|
21
|
+
hts_provider?: string | null;
|
|
22
|
+
/** Married, Widowed, Single, Divorced or Separated */
|
|
23
|
+
marital_status?: string | null;
|
|
24
|
+
/** Gen Pop or KVP */
|
|
25
|
+
population_type?: string | null;
|
|
26
|
+
sub_population?: string | null;
|
|
27
|
+
/** Facility or Community */
|
|
28
|
+
setting?: string | null;
|
|
29
|
+
/** Negative, Positive or Inconclusive */
|
|
30
|
+
hiv_test1?: string | null;
|
|
31
|
+
kit1_name?: string | null;
|
|
32
|
+
lot1?: string | null;
|
|
33
|
+
expiry1?: string | null;
|
|
34
|
+
hiv_test2?: string | null;
|
|
35
|
+
kit2_name?: string | null;
|
|
36
|
+
lot2?: string | null;
|
|
37
|
+
expiry2?: string | null;
|
|
38
|
+
hiv_test3?: string | null;
|
|
39
|
+
kit3_name?: string | null;
|
|
40
|
+
lot3?: string | null;
|
|
41
|
+
expiry3?: string | null;
|
|
42
|
+
/** Positive, Negative or Inconclusive */
|
|
43
|
+
final_result?: string | null;
|
|
44
|
+
/** Yes, No or NA */
|
|
45
|
+
discordant_couple?: string | null;
|
|
46
|
+
/** PrEP, PEP, VMMC, PMTCT, as a list, or NA */
|
|
47
|
+
referral_services?: string | null;
|
|
48
|
+
client_tested_as?: string | null;
|
|
49
|
+
referral_to?: string | null;
|
|
50
|
+
residence?: string | null;
|
|
51
|
+
handed_to?: string | null;
|
|
52
|
+
art_start_date?: string | null;
|
|
53
|
+
ccc_number?: string | null;
|
|
54
|
+
screening_remarks?: string | null;
|
|
55
|
+
initial_remarks?: string | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** Blank rather than "null" / "undefined" in a cell */
|
|
59
|
+
export const text = (value: unknown) => (value === null || value === undefined ? '' : String(value));
|
|
60
|
+
|
|
61
|
+
/** DD/MM/YYYY, as the form asks */
|
|
62
|
+
export const formDate = (value: unknown) => (value ? dayjs(String(value)).format('DD/MM/YYYY') : '');
|
|
63
|
+
|
|
64
|
+
export const clientName = (row: Moh362Row) =>
|
|
65
|
+
row.full_name || [row.first_name, row.middle_name, row.last_name].filter(Boolean).join(' ');
|
|
66
|
+
|
|
67
|
+
/** Tested positive and linked to care: started on ART */
|
|
68
|
+
export const isLinked = (row: Moh362Row) => row.final_result === 'Positive' && Boolean(row.art_start_date);
|
|
69
|
+
|
|
70
|
+
export const ageOf = (row: Moh362Row) => {
|
|
71
|
+
const age = Number(row.age);
|
|
72
|
+
return Number.isFinite(age) && row.age !== null && row.age !== '' ? age : null;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** The form's age bands for the Tests (n) and Positive (n) summaries */
|
|
76
|
+
export const AGE_BANDS: Array<{ label: string; min: number; max?: number }> = [
|
|
77
|
+
{ label: '1-9 yrs', min: 1, max: 9 },
|
|
78
|
+
{ label: '10-14 yrs', min: 10, max: 14 },
|
|
79
|
+
{ label: '15-19 yrs', min: 15, max: 19 },
|
|
80
|
+
{ label: '20-24 yrs', min: 20, max: 24 },
|
|
81
|
+
{ label: '25+ yrs', min: 25 },
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
export const inBand = (row: Moh362Row, band: { min: number; max?: number }) => {
|
|
85
|
+
const age = ageOf(row);
|
|
86
|
+
return age !== null && age >= band.min && (band.max === undefined || age <= band.max);
|
|
87
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../common/report-register';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 368 columns in the order they appear on the register.
|
|
5
|
+
*/
|
|
6
|
+
export const moh368ExportColumns: RegisterColumn[] = [
|
|
7
|
+
{ header: 'No', value: (_row, index) => index + 1 },
|
|
8
|
+
{
|
|
9
|
+
header: 'Unique Nutrition Reg Number',
|
|
10
|
+
value: (row) => row.nutrition_reg_number ?? '',
|
|
11
|
+
text: true,
|
|
12
|
+
},
|
|
13
|
+
{ header: 'Admission Date', value: (row) => row.admission_date ?? '' },
|
|
14
|
+
{ header: "Client's Name", value: (row) => row.client_name ?? '' },
|
|
15
|
+
{ header: 'Birth Notification Number', value: (row) => row.birth_notification_number ?? '', text: true },
|
|
16
|
+
{
|
|
17
|
+
header: 'Physical Address / County/Subcounty / Phone Number',
|
|
18
|
+
value: (row) => [row.address, row.county_subcounty, row.phone_number].filter(Boolean).join(', '),
|
|
19
|
+
text: true,
|
|
20
|
+
},
|
|
21
|
+
{ header: 'Age (Years)', value: (row) => row.age ?? '' },
|
|
22
|
+
{ header: 'Sex (M/F)', value: (row) => row.sex ?? '' },
|
|
23
|
+
{ header: 'In Household food security programme[1]', value: (row) => row.inhousehold_food_security ?? '' },
|
|
24
|
+
{ header: 'Admission criteria', value: (row) => row.admission_criteria ?? '' },
|
|
25
|
+
{ header: 'Type of admission', value: (row) => row.type_of_admission ?? '' },
|
|
26
|
+
{ header: 'Serostatus', value: (row) => row.serostatus ?? '' },
|
|
27
|
+
{ header: 'TB Status', value: (row) => row.tb_status ?? '' },
|
|
28
|
+
{ header: 'Height/Length (cm)', value: (row) => row.height ?? '' },
|
|
29
|
+
{ header: 'Weight (Kg)', value: (row) => row.weight ?? '' },
|
|
30
|
+
{ header: 'WHZ score', value: (row) => row.whz_score ?? '' },
|
|
31
|
+
{ header: 'MUAC (cm)', value: (row) => row.muac ?? '' },
|
|
32
|
+
{ header: 'Day 1 Weight', value: (row) => row.weight_in_kgs ?? row.weight ?? '' },
|
|
33
|
+
{ header: 'Day 1 MUAC', value: (row) => row.muac ?? '' },
|
|
34
|
+
{ header: 'Day 2 Weight', value: (row) => row.weight_in_kgs ?? row.weight ?? '' },
|
|
35
|
+
{ header: 'Day 2 MUAC', value: (row) => row.muac ?? '' },
|
|
36
|
+
];
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import styles from './moh-368.scss';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { ReportFiltersComponent, type ReportPeriod } from '../../common/report-filters';
|
|
6
|
+
import { RegisterLayout, usePatientList } from '../../common/report-register';
|
|
7
|
+
import { getMoh368Register } from '../../resources/moh-713.resource';
|
|
8
|
+
import { useSearchParams } from 'react-router-dom';
|
|
9
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
10
|
+
import { moh368ExportColumns } from './moh-368.columns';
|
|
11
|
+
|
|
12
|
+
interface MOH368ComponentProps {}
|
|
13
|
+
const MOH368Component: React.FC<MOH368ComponentProps> = () => {
|
|
14
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
15
|
+
const session = useSession();
|
|
16
|
+
const [generatedPeriod, setGeneratedPeriod] = useState<{ startDate: string; endDate: string } | null>(() => {
|
|
17
|
+
const startDate = searchParams.get('startDate');
|
|
18
|
+
const endDate = searchParams.get('endDate');
|
|
19
|
+
return startDate && endDate ? { startDate, endDate } : null;
|
|
20
|
+
});
|
|
21
|
+
const isGenerated = Boolean(generatedPeriod);
|
|
22
|
+
|
|
23
|
+
const startDate = generatedPeriod?.startDate ?? searchParams.get('startDate');
|
|
24
|
+
const endDate = generatedPeriod?.endDate ?? searchParams.get('endDate');
|
|
25
|
+
const locationUuids = searchParams.get('locationUuids') ?? session?.sessionLocation?.uuid ?? '';
|
|
26
|
+
const indicator = searchParams.get('indicator');
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
rows: patientlist,
|
|
30
|
+
total,
|
|
31
|
+
isTotalExact,
|
|
32
|
+
isLoading,
|
|
33
|
+
page,
|
|
34
|
+
pageSize,
|
|
35
|
+
onPageChange,
|
|
36
|
+
fetchAll,
|
|
37
|
+
} = usePatientList(
|
|
38
|
+
({ startIndex, limit }) => {
|
|
39
|
+
if (!generatedPeriod) {
|
|
40
|
+
return Promise.resolve({ results: [], total: 0, isTotalExact: true });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return getMoh368Register({
|
|
44
|
+
startDate: startDate ?? undefined,
|
|
45
|
+
endDate: endDate ?? undefined,
|
|
46
|
+
locationUuids,
|
|
47
|
+
indicator: indicator ?? undefined,
|
|
48
|
+
startIndex,
|
|
49
|
+
limit,
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
[startDate, endDate, locationUuids, indicator, generatedPeriod],
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const generate = ({ startDate, endDate }: ReportPeriod) => {
|
|
56
|
+
setGeneratedPeriod({ startDate, endDate });
|
|
57
|
+
setSearchParams((currentParams) => {
|
|
58
|
+
const nextParams = new URLSearchParams(currentParams);
|
|
59
|
+
nextParams.set('startDate', startDate);
|
|
60
|
+
nextParams.set('endDate', endDate);
|
|
61
|
+
if (!nextParams.has('locationUuids') && locationUuids) {
|
|
62
|
+
nextParams.set('locationUuids', locationUuids);
|
|
63
|
+
}
|
|
64
|
+
return nextParams;
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
<ReportFiltersComponent
|
|
70
|
+
reportName="MOH-368 Register"
|
|
71
|
+
mode="both"
|
|
72
|
+
defaultTab="custom"
|
|
73
|
+
onGenerate={generate}
|
|
74
|
+
isLoading={isLoading}
|
|
75
|
+
isReportGenerated={Boolean(generatedPeriod)}
|
|
76
|
+
generatedPeriod={generatedPeriod ?? undefined}
|
|
77
|
+
backLink={{ label: 'All registers', to: '/?tab=registers' }}
|
|
78
|
+
/>
|
|
79
|
+
<RegisterLayout
|
|
80
|
+
parentLabel="All registers"
|
|
81
|
+
parentPath="/?tab=registers"
|
|
82
|
+
hideBreadcrumb
|
|
83
|
+
title="MOH-368 Register"
|
|
84
|
+
isLoading={isLoading}
|
|
85
|
+
isEmpty={isGenerated && patientlist?.length === 0}
|
|
86
|
+
page={page}
|
|
87
|
+
pageSize={pageSize}
|
|
88
|
+
total={total}
|
|
89
|
+
isTotalExact={isTotalExact}
|
|
90
|
+
onPageChange={onPageChange}
|
|
91
|
+
fetchAll={isGenerated ? fetchAll : undefined}
|
|
92
|
+
columns={moh368ExportColumns}
|
|
93
|
+
>
|
|
94
|
+
<h5 className={styles.mainTitleBox}>INPATIENT NUTRITION CARE REGISTER</h5>
|
|
95
|
+
<div className={styles.tableContainer}>
|
|
96
|
+
<table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
|
|
97
|
+
<thead>
|
|
98
|
+
<tr>
|
|
99
|
+
<th colSpan={13}>ADMISSION DETAILS</th>
|
|
100
|
+
<th colSpan={4}>ADMISSION MEASUREMTS(admission day)</th>
|
|
101
|
+
<th colSpan={4}>
|
|
102
|
+
WEIGHT(kg)MUAC
|
|
103
|
+
<br />
|
|
104
|
+
(cm)MONITORING
|
|
105
|
+
</th>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<th rowSpan={2}>No</th>
|
|
109
|
+
<th rowSpan={2}>
|
|
110
|
+
Unique Nutrition Reg
|
|
111
|
+
<br />
|
|
112
|
+
Number
|
|
113
|
+
</th>
|
|
114
|
+
<th rowSpan={2}>Admission Date</th>
|
|
115
|
+
<th rowSpan={2}>Client's Name</th>
|
|
116
|
+
<th rowSpan={2}>Birth Notification Number</th>
|
|
117
|
+
<th rowSpan={2}>Physical Address / County/Subcounty / Phone Number</th>
|
|
118
|
+
<th rowSpan={2}>
|
|
119
|
+
Age
|
|
120
|
+
<br />
|
|
121
|
+
(Years)
|
|
122
|
+
</th>
|
|
123
|
+
<th rowSpan={2}>
|
|
124
|
+
Sex
|
|
125
|
+
<br />
|
|
126
|
+
(M/F)
|
|
127
|
+
</th>
|
|
128
|
+
<th rowSpan={2}>
|
|
129
|
+
In Household <br />
|
|
130
|
+
food security
|
|
131
|
+
<br />
|
|
132
|
+
programme[1]
|
|
133
|
+
</th>
|
|
134
|
+
<th rowSpan={2}>Admission criteria</th>
|
|
135
|
+
<th rowSpan={2}>Type of admission</th>
|
|
136
|
+
<th rowSpan={2}>Serostatus</th>
|
|
137
|
+
<th rowSpan={2}>TB Status</th>
|
|
138
|
+
<th rowSpan={2}>
|
|
139
|
+
Height/Length
|
|
140
|
+
<br />
|
|
141
|
+
(cm)
|
|
142
|
+
</th>
|
|
143
|
+
<th rowSpan={2}>Weight (Kg)</th>
|
|
144
|
+
<th rowSpan={2}>WHZ score</th>
|
|
145
|
+
<th rowSpan={2}>MUAC (cm)</th>
|
|
146
|
+
<th colSpan={2}>Day 1</th>
|
|
147
|
+
<th colSpan={2}>Day 2</th>
|
|
148
|
+
</tr>
|
|
149
|
+
<tr>
|
|
150
|
+
<th>Weight</th>
|
|
151
|
+
<th>MUAC</th>
|
|
152
|
+
<th>Weight</th>
|
|
153
|
+
<th>MUAC</th>
|
|
154
|
+
</tr>
|
|
155
|
+
</thead>
|
|
156
|
+
<tbody>
|
|
157
|
+
{patientlist?.length > 0 ? (
|
|
158
|
+
patientlist?.map((patient, index) => (
|
|
159
|
+
<tr key={index}>
|
|
160
|
+
{moh368ExportColumns.map((column) => (
|
|
161
|
+
<td key={column.header}>{String(column.value(patient, index) ?? '')}</td>
|
|
162
|
+
))}
|
|
163
|
+
</tr>
|
|
164
|
+
))
|
|
165
|
+
) : (
|
|
166
|
+
<tr>
|
|
167
|
+
<td colSpan={moh368ExportColumns.length}>No data available</td>
|
|
168
|
+
</tr>
|
|
169
|
+
)}
|
|
170
|
+
</tbody>
|
|
171
|
+
</table>
|
|
172
|
+
</div>
|
|
173
|
+
</RegisterLayout>
|
|
174
|
+
</>
|
|
175
|
+
);
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export default MOH368Component;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
2
|
+
|
|
3
|
+
/* MOH-710 laid out for A4, on the same scale as MOH-711, MOH-740 and MOH-745.
|
|
4
|
+
Its 106 rows across eleven tables run to about two pages, so this is a
|
|
5
|
+
flowing document: the blocks share their edges, and a lettered section is
|
|
6
|
+
kept whole across a page break. */
|
|
7
|
+
|
|
8
|
+
$ink: #000;
|
|
9
|
+
$bar: #d9d9d9;
|
|
10
|
+
$rule: 1px solid $ink;
|
|
11
|
+
|
|
12
|
+
$text: 7pt;
|
|
13
|
+
$title: 7.5pt;
|
|
14
|
+
$meta: 6.5pt;
|
|
15
|
+
|
|
16
|
+
$pad: 3mm;
|
|
17
|
+
|
|
18
|
+
/* Masthead */
|
|
19
|
+
|
|
20
|
+
.mainTitleBox {
|
|
21
|
+
padding: $pad;
|
|
22
|
+
text-align: center;
|
|
23
|
+
border: $rule;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
.ministry {
|
|
28
|
+
font-size: $meta;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.reportTitle {
|
|
32
|
+
font-size: $title;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
color: $ink;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Facility and period strip, joined to the masthead above */
|
|
38
|
+
|
|
39
|
+
.location {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-wrap: nowrap;
|
|
42
|
+
align-items: baseline;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
gap: 2.5mm;
|
|
45
|
+
padding: 2mm $pad;
|
|
46
|
+
font-size: $meta;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
border: $rule;
|
|
49
|
+
border-top: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.line,
|
|
53
|
+
.shortLine {
|
|
54
|
+
display: inline-block;
|
|
55
|
+
padding: 0 0.5mm;
|
|
56
|
+
margin-left: 1mm;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
text-align: center;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
vertical-align: bottom;
|
|
62
|
+
border-bottom: $rule;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.line {
|
|
66
|
+
width: 26mm;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.shortLine {
|
|
70
|
+
width: 14mm;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* A lettered section, kept off a page break so a table never splits from the
|
|
74
|
+
heading that names it. Sections share edges rather than sitting apart. */
|
|
75
|
+
|
|
76
|
+
.container {
|
|
77
|
+
border: $rule;
|
|
78
|
+
border-top: none;
|
|
79
|
+
break-inside: avoid;
|
|
80
|
+
page-break-inside: avoid;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.title {
|
|
84
|
+
padding: 1.5mm $pad;
|
|
85
|
+
font-size: $text;
|
|
86
|
+
font-weight: 700;
|
|
87
|
+
color: $ink;
|
|
88
|
+
text-align: left;
|
|
89
|
+
background-color: $bar;
|
|
90
|
+
border-bottom: $rule;
|
|
91
|
+
break-after: avoid;
|
|
92
|
+
page-break-after: avoid;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.tableContainer {
|
|
96
|
+
overflow-x: auto;
|
|
97
|
+
padding: $pad;
|
|
98
|
+
|
|
99
|
+
& + .tableContainer {
|
|
100
|
+
padding-top: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.table {
|
|
105
|
+
width: 100%;
|
|
106
|
+
border-collapse: collapse;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.tableBordered td,
|
|
110
|
+
.tableBordered th {
|
|
111
|
+
padding: 1mm 1.5mm;
|
|
112
|
+
font-size: $text;
|
|
113
|
+
text-align: left;
|
|
114
|
+
border: $rule;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.tableBordered th {
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
color: $ink;
|
|
120
|
+
background-color: #f0f0f0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.tableStriped tbody tr:nth-of-type(odd) {
|
|
124
|
+
background-color: #fafafa;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media screen {
|
|
128
|
+
.tableStriped tbody tr:hover {
|
|
129
|
+
background-color: $brand-primary-10;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Sign-off, enclosed by the form rather than floating beneath it. Three fields
|
|
134
|
+
across the sheet, so its rules can be wider than the header strip's five. */
|
|
135
|
+
|
|
136
|
+
.signOff {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-wrap: nowrap;
|
|
139
|
+
align-items: baseline;
|
|
140
|
+
justify-content: space-between;
|
|
141
|
+
gap: 2.5mm;
|
|
142
|
+
padding: $pad;
|
|
143
|
+
font-size: $meta;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
border: $rule;
|
|
146
|
+
border-top: none;
|
|
147
|
+
|
|
148
|
+
.line {
|
|
149
|
+
width: 45mm;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.shortLine {
|
|
153
|
+
width: 25mm;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* On paper the striping is screen affordance that prints as grey noise */
|
|
158
|
+
|
|
159
|
+
@media print {
|
|
160
|
+
.tableStriped tbody tr:nth-of-type(odd) {
|
|
161
|
+
background-color: transparent;
|
|
162
|
+
}
|
|
163
|
+
}
|