@ampath/esm-reports-app 1.0.0-next.11 → 1.0.0-next.110
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/709.css +1 -0
- package/dist/709.css.map +1 -0
- package/dist/709.js +1 -0
- package/dist/709.js.map +1 -0
- 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/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 +276 -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-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 +144 -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,276 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableRow } from '@carbon/react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
8
|
+
|
|
9
|
+
import styles from './moh-512.scss';
|
|
10
|
+
import { moh512ExportColumns } from './moh-512-columns';
|
|
11
|
+
import { getMoh512PatientList } from '../../../resources/moh-711.resource';
|
|
12
|
+
import { ReportFiltersComponent, type ReportPeriod } from '../../../common/report-filters';
|
|
13
|
+
|
|
14
|
+
interface Moh512RegisterComponentProps {}
|
|
15
|
+
|
|
16
|
+
const Moh512RegisterComponent: React.FC<Moh512RegisterComponentProps> = () => {
|
|
17
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
18
|
+
const session = useSession();
|
|
19
|
+
|
|
20
|
+
const [generatedPeriod, setGeneratedPeriod] = useState<{ startDate: string; endDate: string } | null>(() => {
|
|
21
|
+
const startDate = searchParams.get('startDate');
|
|
22
|
+
const endDate = searchParams.get('endDate');
|
|
23
|
+
return startDate && endDate ? { startDate, endDate } : null;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const startDate = generatedPeriod?.startDate ?? searchParams.get('startDate');
|
|
27
|
+
const endDate = generatedPeriod?.endDate ?? searchParams.get('endDate');
|
|
28
|
+
const locationUuids = searchParams.get('locationUuids') ?? session?.sessionLocation?.uuid ?? '';
|
|
29
|
+
const indicator = searchParams.get('indicator');
|
|
30
|
+
const isGenerated = Boolean(generatedPeriod);
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
rows: patientlist,
|
|
34
|
+
total,
|
|
35
|
+
isTotalExact,
|
|
36
|
+
isLoading,
|
|
37
|
+
page,
|
|
38
|
+
pageSize,
|
|
39
|
+
onPageChange,
|
|
40
|
+
fetchAll,
|
|
41
|
+
} = usePatientList(
|
|
42
|
+
({ startIndex, limit }) => {
|
|
43
|
+
if (!generatedPeriod) {
|
|
44
|
+
return Promise.resolve({ results: [], total: 0, isTotalExact: true });
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return getMoh512PatientList({
|
|
48
|
+
startDate,
|
|
49
|
+
endDate,
|
|
50
|
+
locationUuids,
|
|
51
|
+
indicator,
|
|
52
|
+
startIndex,
|
|
53
|
+
limit,
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
[startDate, endDate, locationUuids, indicator, generatedPeriod],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const generate = ({ startDate, endDate }: ReportPeriod) => {
|
|
60
|
+
setGeneratedPeriod({ startDate, endDate });
|
|
61
|
+
setSearchParams((currentParams) => {
|
|
62
|
+
const nextParams = new URLSearchParams(currentParams);
|
|
63
|
+
nextParams.set('startDate', startDate);
|
|
64
|
+
nextParams.set('endDate', endDate);
|
|
65
|
+
if (!nextParams.has('locationUuids') && locationUuids) {
|
|
66
|
+
nextParams.set('locationUuids', locationUuids);
|
|
67
|
+
}
|
|
68
|
+
return nextParams;
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const columns = [
|
|
73
|
+
{ key: 'date', label: 'Date' },
|
|
74
|
+
{ key: 'cr_id', label: 'Client Number' },
|
|
75
|
+
{ key: 'name_of_client', label: 'Name of Client' },
|
|
76
|
+
{ key: 'client_type', label: 'Client Type (1=New, 2=Revisit)' },
|
|
77
|
+
{ key: 'first_ever_use_of_contraceptive', label: '1st Ever User (Y/N)' },
|
|
78
|
+
{ key: 'age', label: 'Age (Years)' },
|
|
79
|
+
{ key: 'sex', label: 'Sex (M/F/I)' },
|
|
80
|
+
{ key: 'disability_status', label: 'Disability Status' },
|
|
81
|
+
{ key: 'phone_number', label: 'Telephone Number' },
|
|
82
|
+
{ key: 'village_estate_landmark', label: 'Village/Estate/Landmark' },
|
|
83
|
+
{ key: 'counselled_on_fp', label: 'Counselled on FP (Y/N)' },
|
|
84
|
+
{ key: 'type_of_visit_for_method_combined_oral_contraceptive', label: 'COC Visit Type' },
|
|
85
|
+
{ key: 'quantity_dispensed_combined_oral_contraceptive', label: 'COC Qty (Cycles)' },
|
|
86
|
+
{ key: 'type_of_visit_for_method_progestine', label: 'POP Visit Type' },
|
|
87
|
+
{ key: 'quantity_dispensed_progestine', label: 'POP Qty (Cycles)' },
|
|
88
|
+
{ key: 'quantity_dispensed_emergency_contraceptive_pills', label: 'Emergency Contraceptive Doses' },
|
|
89
|
+
{ key: 'type_of_visit_for_method_injectables', label: 'Injectables Visit Type' },
|
|
90
|
+
{ key: 'quantity_dispensed_dmpa_im', label: 'DMPA IM Qty (Vials)' },
|
|
91
|
+
{ key: 'quantity_dispensed_dmpa_sc', label: 'DMPA SC Qty (Vials)' },
|
|
92
|
+
{ key: 'type_of_visit_for_method_1_rod', label: 'Implant Visit Type' },
|
|
93
|
+
{ key: 'quantity_dispensed_1_rod', label: '1 Rod (Sets)' },
|
|
94
|
+
{ key: 'quantity_dispensed_2_rod', label: '2 Rods 3 Years (Sets)' },
|
|
95
|
+
{ key: 'quantity_dispensed_2_rod_5_years', label: '2 Rods 5 Years (Sets)' },
|
|
96
|
+
{ key: 'type_of_visit_for_method_iud', label: 'IUD Visit Type' },
|
|
97
|
+
{ key: 'quantity_dispensed_non_hormonal', label: 'Non-Hormonal IUD (Sets)' },
|
|
98
|
+
{ key: 'quantity_dispensed_hormonal', label: 'Hormonal IUD (Sets)' },
|
|
99
|
+
{ key: 'reason_for_larc_removal', label: 'Reason for LARC Removal' },
|
|
100
|
+
{ key: 'type_of_condom', label: 'Condom Client Sex' },
|
|
101
|
+
{ key: 'quantity_dispensed_male_condoms', label: 'Male Condoms' },
|
|
102
|
+
{ key: 'quantity_dispensed_female_condoms', label: 'Female Condoms' },
|
|
103
|
+
{ key: 'voluntary_surgical_contraception', label: 'VSC' },
|
|
104
|
+
{ key: 'counseled_on_natural_fp', label: 'Natural FP' },
|
|
105
|
+
{ key: 'given_cycle_beads', label: 'Cycle Beads Given' },
|
|
106
|
+
{ key: 'received_post_partum_fp', label: 'Timing of PPFP' },
|
|
107
|
+
{ key: 'tb_screening', label: 'TB Screening' },
|
|
108
|
+
{ key: 'counselled_on_hiv', label: 'Counselled for HIV' },
|
|
109
|
+
{ key: 'tested_for_hiv', label: 'Counselled and Tested for HIV' },
|
|
110
|
+
{ key: 'hiv_results', label: 'HIV Status' },
|
|
111
|
+
{ key: 'intimate_partner_violence', label: 'IPV/Reproductive Coercion' },
|
|
112
|
+
{ key: 'screened_for_cervical_cancer', label: 'Cervical Cancer Screened' },
|
|
113
|
+
{ key: 'cervical_cancer_screening_result', label: 'Cervical Cancer Result' },
|
|
114
|
+
{ key: 'referral_from', label: 'Referral From' },
|
|
115
|
+
{ key: 'referral_to', label: 'Referral To' },
|
|
116
|
+
{ key: 'reason_for_referral', label: 'Reason for Referral' },
|
|
117
|
+
{ key: 'comments', label: 'Remarks' },
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<>
|
|
122
|
+
<ReportFiltersComponent
|
|
123
|
+
reportName="MOH 512 Register"
|
|
124
|
+
mode="both"
|
|
125
|
+
defaultTab="custom"
|
|
126
|
+
onGenerate={generate}
|
|
127
|
+
isLoading={isLoading}
|
|
128
|
+
isReportGenerated={Boolean(generatedPeriod)}
|
|
129
|
+
generatedPeriod={generatedPeriod ?? undefined}
|
|
130
|
+
backLink={{ label: 'All registers', to: '/?tab=registers' }}
|
|
131
|
+
/>
|
|
132
|
+
<RegisterLayout
|
|
133
|
+
parentLabel="All registers"
|
|
134
|
+
parentPath="/?tab=registers"
|
|
135
|
+
hideBreadcrumb
|
|
136
|
+
title="MOH 512 Register"
|
|
137
|
+
isLoading={isLoading}
|
|
138
|
+
isEmpty={isGenerated && patientlist?.length === 0}
|
|
139
|
+
page={page}
|
|
140
|
+
pageSize={pageSize}
|
|
141
|
+
total={total}
|
|
142
|
+
isTotalExact={isTotalExact}
|
|
143
|
+
onPageChange={onPageChange}
|
|
144
|
+
fetchAll={isGenerated ? fetchAll : undefined}
|
|
145
|
+
columns={moh512ExportColumns}
|
|
146
|
+
>
|
|
147
|
+
{isGenerated && (
|
|
148
|
+
<div className={styles.tableContainer}>
|
|
149
|
+
<Table className={classNames(styles.table, styles.tableBordered, styles.tableStriped)}>
|
|
150
|
+
<TableHead>
|
|
151
|
+
<TableRow>
|
|
152
|
+
{columns.slice(0, 11).map((column) => (
|
|
153
|
+
<th key={column.key} rowSpan={3} scope="col">
|
|
154
|
+
{column.label}
|
|
155
|
+
</th>
|
|
156
|
+
))}
|
|
157
|
+
<th colSpan={19} scope="colgroup">
|
|
158
|
+
Contraceptives dispensed at this visit
|
|
159
|
+
</th>
|
|
160
|
+
{columns.slice(30, 35).map((column) => (
|
|
161
|
+
<th key={column.key} rowSpan={3} scope="col">
|
|
162
|
+
{column.label}
|
|
163
|
+
</th>
|
|
164
|
+
))}
|
|
165
|
+
<th colSpan={3} scope="colgroup">
|
|
166
|
+
HIV Status
|
|
167
|
+
</th>
|
|
168
|
+
<th rowSpan={3} scope="col">
|
|
169
|
+
IPV / Reproductive Coercion
|
|
170
|
+
</th>
|
|
171
|
+
<th colSpan={2} scope="colgroup">
|
|
172
|
+
Cervical Cancer Screening
|
|
173
|
+
</th>
|
|
174
|
+
<th colSpan={3} scope="colgroup">
|
|
175
|
+
Referrals
|
|
176
|
+
</th>
|
|
177
|
+
<th rowSpan={3} scope="col">
|
|
178
|
+
Remarks
|
|
179
|
+
</th>
|
|
180
|
+
</TableRow>
|
|
181
|
+
<TableRow>
|
|
182
|
+
<th colSpan={4} scope="colgroup">
|
|
183
|
+
Oral Contraceptives (Cycles)
|
|
184
|
+
</th>
|
|
185
|
+
<th rowSpan={2} scope="col">
|
|
186
|
+
Emergency Contraceptive Pills (Doses)
|
|
187
|
+
</th>
|
|
188
|
+
<th colSpan={3} scope="colgroup">
|
|
189
|
+
Injectables — DMPA
|
|
190
|
+
</th>
|
|
191
|
+
<th colSpan={4} scope="colgroup">
|
|
192
|
+
Implants (Sets)
|
|
193
|
+
</th>
|
|
194
|
+
<th colSpan={3} scope="colgroup">
|
|
195
|
+
IUDs (Sets)
|
|
196
|
+
</th>
|
|
197
|
+
<th rowSpan={2} scope="col">
|
|
198
|
+
Reasons for LARC Removal
|
|
199
|
+
</th>
|
|
200
|
+
<th colSpan={3} scope="colgroup">
|
|
201
|
+
Condoms for FP
|
|
202
|
+
</th>
|
|
203
|
+
{columns.slice(35, 38).map((column) => (
|
|
204
|
+
<th key={column.key} rowSpan={2} scope="col">
|
|
205
|
+
{column.label}
|
|
206
|
+
</th>
|
|
207
|
+
))}
|
|
208
|
+
{columns.slice(39, 41).map((column) => (
|
|
209
|
+
<th key={column.key} rowSpan={2} scope="col">
|
|
210
|
+
{column.label}
|
|
211
|
+
</th>
|
|
212
|
+
))}
|
|
213
|
+
{columns.slice(41, 44).map((column) => (
|
|
214
|
+
<th key={column.key} rowSpan={2} scope="col">
|
|
215
|
+
{column.label}
|
|
216
|
+
</th>
|
|
217
|
+
))}
|
|
218
|
+
</TableRow>
|
|
219
|
+
<TableRow>
|
|
220
|
+
{columns.slice(11, 15).map((column) => (
|
|
221
|
+
<th key={column.key} scope="col">
|
|
222
|
+
{column.label}
|
|
223
|
+
</th>
|
|
224
|
+
))}
|
|
225
|
+
{columns.slice(16, 26).map((column) => (
|
|
226
|
+
<th key={column.key} scope="col">
|
|
227
|
+
{column.label}
|
|
228
|
+
</th>
|
|
229
|
+
))}
|
|
230
|
+
{columns.slice(27, 30).map((column) => (
|
|
231
|
+
<th key={column.key} scope="col">
|
|
232
|
+
{column.label}
|
|
233
|
+
</th>
|
|
234
|
+
))}
|
|
235
|
+
</TableRow>
|
|
236
|
+
<TableRow>
|
|
237
|
+
{columns.map((column, index) => (
|
|
238
|
+
<th key={column.key} scope="col" title={column.label}>
|
|
239
|
+
{index < 26 ? String.fromCharCode(65 + index) : `A${String.fromCharCode(65 + index - 26)}`}
|
|
240
|
+
</th>
|
|
241
|
+
))}
|
|
242
|
+
</TableRow>
|
|
243
|
+
</TableHead>
|
|
244
|
+
|
|
245
|
+
<TableBody>
|
|
246
|
+
{isLoading ? (
|
|
247
|
+
<TableRow>
|
|
248
|
+
<TableCell colSpan={columns.length}>Loading register...</TableCell>
|
|
249
|
+
</TableRow>
|
|
250
|
+
) : patientlist.length === 0 ? (
|
|
251
|
+
<TableRow>
|
|
252
|
+
<TableCell colSpan={columns.length}>No records found.</TableCell>
|
|
253
|
+
</TableRow>
|
|
254
|
+
) : (
|
|
255
|
+
patientlist.map((patient, index) => (
|
|
256
|
+
<TableRow key={patient.person_id || patient.id || index}>
|
|
257
|
+
{columns.map((column) => (
|
|
258
|
+
<TableCell key={column.key}>
|
|
259
|
+
{column.key === 'date' && patient[column.key]
|
|
260
|
+
? dayjs(patient[column.key]).format('YYYY-MM-DD')
|
|
261
|
+
: (patient[column.key] ?? '')}
|
|
262
|
+
</TableCell>
|
|
263
|
+
))}
|
|
264
|
+
</TableRow>
|
|
265
|
+
))
|
|
266
|
+
)}
|
|
267
|
+
</TableBody>
|
|
268
|
+
</Table>
|
|
269
|
+
</div>
|
|
270
|
+
)}
|
|
271
|
+
</RegisterLayout>
|
|
272
|
+
</>
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export default Moh512RegisterComponent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.tableContainer {
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Sized to content rather than to the frame, so a long value -- a full name,
|
|
9
|
+
say -- widens its own column instead of wrapping. `.tableScroll` in the
|
|
10
|
+
layout scrolls when the table outgrows the page. */
|
|
11
|
+
|
|
12
|
+
.table {
|
|
13
|
+
width: auto;
|
|
14
|
+
min-width: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
font-size: 0.75rem;
|
|
17
|
+
border-collapse: collapse;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tableBordered td,
|
|
21
|
+
.tableBordered th {
|
|
22
|
+
padding: 0.125rem 0.5rem;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
border: 1px solid $ui-04;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tableBordered th {
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: $color-gray-100;
|
|
31
|
+
background-color: $ui-01;
|
|
32
|
+
/* headings carry deliberate line breaks, so they wrap where the markup says */
|
|
33
|
+
white-space: normal;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tableBordered td {
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Long prose columns (diagnoses, referrals, comments) wrap inside a bounded
|
|
41
|
+
width instead of stretching the row past the fold. */
|
|
42
|
+
.tableBordered td.wrapCell {
|
|
43
|
+
white-space: normal;
|
|
44
|
+
min-width: 8rem;
|
|
45
|
+
max-width: 16rem;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tableStriped tbody tr:nth-of-type(odd) {
|
|
50
|
+
background-color: $ui-01;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tableStriped tbody tr:hover {
|
|
54
|
+
background-color: $brand-primary-10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.textCentre {
|
|
58
|
+
text-align: center;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.verticalText {
|
|
62
|
+
writing-mode: vertical-rl;
|
|
63
|
+
transform: rotate(180deg);
|
|
64
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register/register-columns';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 204A as the register prints it: one column per cell, in the order they appear.
|
|
5
|
+
*/
|
|
6
|
+
export const TBExportColumns: RegisterColumn[] = [
|
|
7
|
+
{ header: 'Date (DD/MM/YYYY) - A', value: (row) => row.date ?? '' },
|
|
8
|
+
{
|
|
9
|
+
header: 'CR Number - B',
|
|
10
|
+
value: (row) => row.child_number ?? '',
|
|
11
|
+
},
|
|
12
|
+
{ header: 'TB Screening - C', value: (row) => row.child_names ?? '' },
|
|
13
|
+
{ header: 'TB Status - D', value: (row) => row.sex ?? '' },
|
|
14
|
+
{ header: 'Date of Birth - E', value: (row) => row.date_of_birth ?? '' },
|
|
15
|
+
{ header: 'Gender - F', value: (row) => row.date_first_seen ?? '' },
|
|
16
|
+
{ header: 'TCA - F', value: (row) => row.date_first_seen ?? '' },
|
|
17
|
+
];
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
7
|
+
|
|
8
|
+
import styles from './tb-register.scss';
|
|
9
|
+
import { TBExportColumns } from './tb-register-columns';
|
|
10
|
+
import { getTBPatientList } from '../../../resources/moh-711.resource';
|
|
11
|
+
|
|
12
|
+
interface TbRegisterComponentProps {}
|
|
13
|
+
|
|
14
|
+
const TbRegisterComponent: React.FC<TbRegisterComponentProps> = () => {
|
|
15
|
+
const [searchParams] = useSearchParams();
|
|
16
|
+
const startDate = searchParams.get('startDate');
|
|
17
|
+
const endDate = searchParams.get('endDate');
|
|
18
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
19
|
+
const indicator = searchParams.get('indicator');
|
|
20
|
+
|
|
21
|
+
const {
|
|
22
|
+
rows: patientlist,
|
|
23
|
+
total,
|
|
24
|
+
isTotalExact,
|
|
25
|
+
isLoading,
|
|
26
|
+
page,
|
|
27
|
+
pageSize,
|
|
28
|
+
onPageChange,
|
|
29
|
+
fetchAll,
|
|
30
|
+
} = usePatientList(
|
|
31
|
+
({ startIndex, limit }) =>
|
|
32
|
+
getTBPatientList({
|
|
33
|
+
startDate: startDate!,
|
|
34
|
+
endDate: endDate!,
|
|
35
|
+
locationUuids: locationUuids!,
|
|
36
|
+
indicator: indicator!,
|
|
37
|
+
startIndex,
|
|
38
|
+
limit,
|
|
39
|
+
reportName: 'moh711Report',
|
|
40
|
+
}),
|
|
41
|
+
[startDate, endDate, locationUuids, indicator],
|
|
42
|
+
);
|
|
43
|
+
return (
|
|
44
|
+
<RegisterLayout
|
|
45
|
+
parentLabel="MOH-711 Report"
|
|
46
|
+
parentPath="/moh-711"
|
|
47
|
+
title="TB Register"
|
|
48
|
+
isLoading={isLoading}
|
|
49
|
+
isEmpty={patientlist?.length === 0}
|
|
50
|
+
page={page}
|
|
51
|
+
pageSize={pageSize}
|
|
52
|
+
total={total}
|
|
53
|
+
isTotalExact={isTotalExact}
|
|
54
|
+
onPageChange={onPageChange}
|
|
55
|
+
fetchAll={fetchAll}
|
|
56
|
+
columns={TBExportColumns}
|
|
57
|
+
>
|
|
58
|
+
<div className={styles.tableContainer}>
|
|
59
|
+
<Table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
|
|
60
|
+
<TableHead>
|
|
61
|
+
<TableRow>
|
|
62
|
+
<TableHeader>Date</TableHeader>
|
|
63
|
+
<TableHeader>CR No</TableHeader>
|
|
64
|
+
<TableHeader>DOB</TableHeader>
|
|
65
|
+
<TableHeader>Gender</TableHeader>
|
|
66
|
+
<TableHeader>TB Screening</TableHeader>
|
|
67
|
+
<TableHeader>TCA</TableHeader>
|
|
68
|
+
</TableRow>
|
|
69
|
+
</TableHead>
|
|
70
|
+
<TableBody>
|
|
71
|
+
{patientlist?.length > 0 ? (
|
|
72
|
+
patientlist?.map((patient, i) => (
|
|
73
|
+
<TableRow key={patient.person_id || patient.id}>
|
|
74
|
+
<TableCell>{patient.date ? dayjs(patient.date).format('YYYY-MM-DD') : ''}</TableCell>
|
|
75
|
+
<TableCell>{patient.cr_id}</TableCell>
|
|
76
|
+
<TableCell>
|
|
77
|
+
{patient.date_of_birth ? dayjs(patient.date_of_birth).format('YYYY-MM-DD') : ''}
|
|
78
|
+
</TableCell>
|
|
79
|
+
<TableCell>{patient.gender}</TableCell>
|
|
80
|
+
<TableCell>{patient.tb_screening}</TableCell>
|
|
81
|
+
<TableCell>{patient.rtc}</TableCell>
|
|
82
|
+
</TableRow>
|
|
83
|
+
))
|
|
84
|
+
) : (
|
|
85
|
+
<TableRow>
|
|
86
|
+
<TableCell colSpan={28}>No data available</TableCell>
|
|
87
|
+
</TableRow>
|
|
88
|
+
)}
|
|
89
|
+
</TableBody>
|
|
90
|
+
</Table>
|
|
91
|
+
</div>
|
|
92
|
+
</RegisterLayout>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default TbRegisterComponent;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.tableContainer {
|
|
5
|
+
width: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Sized to content rather than to the frame, so a long value -- a full name,
|
|
9
|
+
say -- widens its own column instead of wrapping. `.tableScroll` in the
|
|
10
|
+
layout scrolls when the table outgrows the page. */
|
|
11
|
+
|
|
12
|
+
.table {
|
|
13
|
+
width: auto;
|
|
14
|
+
min-width: 100%;
|
|
15
|
+
margin: 0;
|
|
16
|
+
font-size: 0.75rem;
|
|
17
|
+
border-collapse: collapse;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.tableBordered td,
|
|
21
|
+
.tableBordered th {
|
|
22
|
+
padding: 0.125rem 0.5rem;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
border: 1px solid $ui-04;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tableBordered th {
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: $color-gray-100;
|
|
31
|
+
background-color: $ui-01;
|
|
32
|
+
/* headings carry deliberate line breaks, so they wrap where the markup says */
|
|
33
|
+
white-space: normal;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tableBordered td {
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Long prose columns (diagnoses, referrals, comments) wrap inside a bounded
|
|
41
|
+
width instead of stretching the row past the fold. */
|
|
42
|
+
.tableBordered td.wrapCell {
|
|
43
|
+
white-space: normal;
|
|
44
|
+
min-width: 8rem;
|
|
45
|
+
max-width: 16rem;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.tableStriped tbody tr:nth-of-type(odd) {
|
|
50
|
+
background-color: $ui-01;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tableStriped tbody tr:hover {
|
|
54
|
+
background-color: $brand-primary-10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.textCentre {
|
|
58
|
+
text-align: center;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.verticalText {
|
|
62
|
+
writing-mode: vertical-rl;
|
|
63
|
+
transform: rotate(180deg);
|
|
64
|
+
}
|