@ampath/esm-reports-app 1.0.0-next.8 → 1.0.0-next.80
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/dist/0.css +1 -0
- package/dist/0.css.map +1 -0
- package/dist/0.js +1 -0
- package/dist/0.js.map +1 -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/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/package.json +4 -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 +317 -99
- package/src/common/report-filters/report-filters.scss +264 -32
- package/src/common/report-filters/types.ts +79 -0
- package/src/common/report-filters/use-restore-period.ts +43 -0
- package/src/common/report-header/index.ts +1 -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 +265 -0
- package/src/common/report-register/register-layout.scss +150 -0
- package/src/common/report-register/register-table.scss +71 -0
- package/src/common/report-register/report-parents.ts +29 -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 +191 -0
- package/src/dashboard/reports-dasboard.tsx +189 -18
- package/src/dashboard/reports-dashboard.module.scss +357 -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 +407 -0
- package/src/registers/moh-267/moh-267-register.scss +298 -0
- package/src/registers/moh-267/moh-267-summary.ts +102 -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/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 +202 -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 +86 -0
- package/src/reports/acf-summary/acf-summary.component.tsx +97 -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/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.tsx +72 -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 -106
- package/src/reports/moh-505/moh-505-header.component.tsx +67 -0
- package/src/reports/moh-505/moh-505.component.tsx +441 -0
- package/src/reports/moh-505/moh-505.scss +117 -0
- package/src/reports/moh-705B/moh-204b-register.component.tsx +246 -0
- package/src/reports/moh-705B/moh-204b.columns.ts +39 -0
- package/src/reports/moh-705B/moh-705b.component.tsx +659 -0
- package/src/reports/moh-705B/moh-705b.scss +172 -0
- package/src/reports/moh-705a/moh-705a.component.tsx +661 -0
- package/src/reports/moh-705a/moh-705a.scss +172 -0
- package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +331 -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 +35 -28
- 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 +26 -19
- package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +23 -23
- package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +25 -18
- 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 +815 -632
- 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-710-register.component.tsx +268 -0
- package/src/reports/moh-710/registers/moh-511-710.columns.ts +52 -0
- package/src/reports/moh-710/registers/type.ts +31 -0
- package/src/reports/moh-711/moh-711.component.tsx +153 -1269
- package/src/reports/moh-711/moh711.scss +135 -20
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +680 -0
- package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +566 -0
- package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +581 -0
- package/src/reports/moh-711/registers/moh-406.columns.ts +133 -0
- package/src/reports/moh-711/registers/moh-407-register.component.tsx +157 -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-510-register.component.tsx +55 -0
- package/src/reports/moh-711/registers/moh-511-register.component.tsx +270 -0
- package/src/reports/moh-711/registers/moh-511.columns.ts +59 -0
- package/src/reports/moh-711/registers/moh-512-columns.ts +94 -0
- package/src/reports/moh-711/registers/moh-512.component.tsx +191 -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 +159 -0
- package/src/reports/moh-711/sections/cervical-cancer.component.tsx +148 -0
- package/src/reports/moh-711/sections/chanis.component.tsx +389 -0
- package/src/reports/moh-711/sections/family-planning.component.tsx +299 -0
- package/src/reports/moh-711/sections/gbv.component.tsx +115 -0
- package/src/reports/moh-711/sections/maternity.component.tsx +321 -0
- package/src/reports/moh-711/sections/medical-social-work.component.tsx +73 -0
- package/src/reports/moh-711/sections/other.component.tsx +47 -0
- package/src/reports/moh-711/sections/physiotherapy.component.tsx +61 -0
- package/src/reports/moh-711/sections/pnc.component.tsx +127 -0
- package/src/reports/moh-711/sections/post-abortion.component.tsx +42 -0
- package/src/reports/moh-711/sections/rehabilitation.component.tsx +57 -0
- package/src/reports/moh-711/sections/report-compiled-by.component.tsx +50 -0
- package/src/reports/moh-711/sections/tb-screening.component.tsx +94 -0
- package/src/reports/moh-717/moh-717.component.tsx +149 -985
- package/src/reports/moh-717/moh717.scss +217 -21
- package/src/reports/moh-717/registers/nutrition-register.component.tsx +48 -0
- package/src/reports/moh-717/sections/finance.component.tsx +42 -0
- package/src/reports/moh-717/sections/inpatient.component.tsx +374 -0
- package/src/reports/moh-717/sections/maternity.component.tsx +126 -0
- package/src/reports/moh-717/sections/medical-records.component.tsx +35 -0
- package/src/reports/moh-717/sections/mortuary.component.tsx +43 -0
- package/src/reports/moh-717/sections/operations.component.tsx +53 -0
- package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +98 -0
- package/src/reports/moh-717/sections/outpatient.component.tsx +597 -0
- package/src/reports/moh-717/sections/pharmacy.component.tsx +43 -0
- package/src/reports/moh-717/sections/preparedby.component.tsx +52 -0
- package/src/reports/moh-717/sections/special-services.component.tsx +114 -0
- package/src/reports/moh-729b/moh-729b-form.component.tsx +385 -0
- package/src/reports/moh-729b/moh-729b-linelist.component.tsx +205 -0
- package/src/reports/moh-729b/moh-729b-summary.component.tsx +258 -0
- package/src/reports/moh-729b/moh-729b-summary.config.ts +229 -0
- package/src/reports/moh-729b/moh-729b.component.tsx +157 -0
- package/src/reports/moh-729b/moh-729b.config.ts +235 -0
- package/src/reports/moh-729b/moh-729b.scss +276 -0
- package/src/reports/moh-729b/moh-729b.types.ts +111 -0
- package/src/reports/moh-731/linelist/moh-731-indicators.ts +1122 -0
- package/src/reports/moh-731/linelist/moh-731-linelist-sections.ts +472 -0
- package/src/reports/moh-731/linelist/moh-731-linelist.component.tsx +102 -0
- package/src/reports/moh-731/linelist/use-open-moh-731-linelist.ts +50 -0
- package/src/reports/moh-731/moh-731.component.tsx +269 -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 +527 -0
- package/src/reports/moh-731/summary/moh-731-summary.scss +247 -0
- package/src/reports/moh-740/moh-740.component.scss +202 -0
- package/src/reports/moh-740/moh-740.component.tsx +1332 -0
- package/src/reports/moh-740/moh-740.resource.ts +54 -0
- package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +149 -0
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +123 -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 +223 -0
- package/src/reports/moh-745/moh-745.component.tsx +2058 -0
- package/src/reports/moh-745/moh-745.scss +142 -0
- package/src/reports/moh-745/registers/moh-412-register.component.tsx +249 -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/table-wrapper/table-row-mapper.component.tsx +20 -5
- package/src/reports/table-wrapper/table-wrapper.component.tsx +23 -14
- package/src/reports/table-wrapper/table-wrapper.scss +1 -16
- 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 +69 -0
- package/src/resources/moh-705.resource.ts +118 -0
- package/src/resources/moh-706.resource.ts +80 -0
- package/src/resources/moh-710.resource.ts +60 -9
- package/src/resources/moh-711.resource.ts +206 -9
- package/src/resources/moh-717.resource.ts +26 -9
- package/src/resources/moh-729b.resource.ts +25 -0
- package/src/resources/moh-731.resource.ts +90 -0
- package/src/resources/moh-745.resource.ts +76 -0
- package/src/resources/patient-list-page.ts +66 -0
- package/src/resources/presumptive-tb.resource.ts +27 -0
- package/src/root.component.tsx +79 -8
- 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/812.js +0 -1
- package/dist/812.js.map +0 -1
- package/dist/879.js +0 -1
- package/dist/879.js.map +0 -1
- package/dist/ampath-esm-reports-app.js.buildmanifest.json +0 -539
- package/dist/main.js +0 -1
- package/dist/main.js.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 406 as the register prints it: one column per cell, in the order they appear.
|
|
5
|
+
*
|
|
6
|
+
* The last 6 columns are rendered by the table but have no headings above
|
|
7
|
+
* them -- the header row is 43 columns wide against 49 of data. They carry
|
|
8
|
+
* their field names rather than headings borrowed from neighbouring columns.
|
|
9
|
+
*/
|
|
10
|
+
export const moh406ExportColumns: RegisterColumn[] = [
|
|
11
|
+
{ header: 'Registration Information - Date of Visit (dd/mm/yyyy)', value: (row) => row.date_of_visit ?? '' },
|
|
12
|
+
{ header: 'Registration Information - PNC Number (New Visit) - NUPI', value: (row) => row.pnc_number ?? '' },
|
|
13
|
+
{ header: 'Registration Information - PNC Number/NUPI (Revisit)', value: (row) => row.pnc_number ?? '' },
|
|
14
|
+
{ header: 'Registration Information - CRID', value: (row) => row.cr_id ?? '' },
|
|
15
|
+
{
|
|
16
|
+
header: 'Registration Information - Full Name(first name, middle and surname)',
|
|
17
|
+
value: (row) => row.full_names ?? '',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
header: 'Registration Information - Date of Birth (dd/mm/yyyy) - Age in Years',
|
|
21
|
+
value: (row) => row.date_of_birth ?? '',
|
|
22
|
+
},
|
|
23
|
+
{ header: 'Registration Information - County/ SubCounty', value: (row) => row.subcounty_county ?? '' },
|
|
24
|
+
{
|
|
25
|
+
header: 'Registration Information - Village/Estate/ Landmark - Telephone number',
|
|
26
|
+
value: (row) => row.village_estate_landmark ?? '',
|
|
27
|
+
},
|
|
28
|
+
{ header: 'Maternity History - Date of Delivery (dd/mm/yyyy)', value: (row) => row.date_of_delivery ?? '' },
|
|
29
|
+
{
|
|
30
|
+
header: 'Maternity History - Place of Delivery 1)Facility 2) Home 3) BBA',
|
|
31
|
+
value: (row) => row.place_of_delivery ?? '',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
header: 'Maternity History - Mode of Delivery 1) SVD 2) CS 3) Breech 4) AVD',
|
|
35
|
+
value: (row) => row.mode_of_delivery ?? '',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
header: 'Postpartum Visit - Timing Mother - 1=no change, 2=10 days to 14 days; 3=4 to 6 weeks; 4=4 to 6 months',
|
|
39
|
+
value: (row) => row.timing_mother ?? '',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
header: 'Postpartum Visit - Timing Baby - 1=no change, 2=10 days to 14 days; 3=4 to 6 weeks; 4=4 to 6 months',
|
|
43
|
+
value: (row) => row.timing_baby ?? '',
|
|
44
|
+
},
|
|
45
|
+
{ header: 'Vital Signs - Temp', value: (row) => row.temperature ?? '' },
|
|
46
|
+
{ header: 'Vital Signs - Pulse', value: (row) => row.pulse ?? '' },
|
|
47
|
+
{ header: 'Vital Signs - Blood Pressure', value: (row) => row.blood_pressure ?? '' },
|
|
48
|
+
{
|
|
49
|
+
header: 'Postnatal Examinations - Pallor (Y/N) - 1= mild; 2= moderate; 3= severe',
|
|
50
|
+
value: (row) => row.pallor_present ?? '',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
header: 'Postnatal Examinations - Breast 1=normal 2= cracked nipple 3=engorged 4=mastitis',
|
|
54
|
+
value: (row) => row.breast ?? '',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
header: 'Postnatal Examinations - Uterus 1= contracte d 2= not contracte d 3= Others Specify',
|
|
58
|
+
value: (row) => row.uterus ?? '',
|
|
59
|
+
},
|
|
60
|
+
{ header: 'Postnatal Examinations - PPH 1=present 2=Absent', value: (row) => row.pph ?? '' },
|
|
61
|
+
{
|
|
62
|
+
header: 'Postnatal Examinations - C-Section Site 1=Bleeding 2=Normal 3=Infected 4=Gapping 5=N/A',
|
|
63
|
+
value: (row) => row.c_section_site ?? '',
|
|
64
|
+
},
|
|
65
|
+
{ header: 'Postnatal Examinations - Lochia 1=Normal 2=Foul smelling 3=Excessi ve', value: (row) => row.lochia ?? '' },
|
|
66
|
+
{
|
|
67
|
+
header: 'Postnatal Examinations - Episiotomy 1=Repaired 2=Gaping 3=Infected 4=Healed 5=N/',
|
|
68
|
+
value: (row) => row.episiotomy ?? '',
|
|
69
|
+
},
|
|
70
|
+
{ header: 'Postnatal Examinations - Fistula 1=VVF 2=RVF 3=VVR 4=Non', value: (row) => row.fistula ?? '' },
|
|
71
|
+
{
|
|
72
|
+
header: 'TB screening - TB Screening 1: Presumed TB 2: No signs 3: On TB treatment 4: On TPT 5: Not done',
|
|
73
|
+
value: (row) => row.tb_screening ?? '',
|
|
74
|
+
},
|
|
75
|
+
{ header: 'Tested PNC - (I/R/ND/KP)', value: (row) => row.tested_pnc ?? '' },
|
|
76
|
+
{
|
|
77
|
+
header: 'HIV Test 1 - Kit Name: - Lot No. - Expiry No. / / - (N,P,I,NA)',
|
|
78
|
+
value: (row) => row.hiv_test_1_kit_name ?? '',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
header: 'HIV Test 2 - Kit Name: - Lot No. - Expiry No. / / - (N,P,I,NA)',
|
|
82
|
+
value: (row) => row.hiv_test_2_kit_name ?? '',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
header: 'HIV Test 3 - Kit Name: - Lot No. - Expiry No. / / - (N,P,I,NA)',
|
|
86
|
+
value: (row) => row.hiv_test_3_kit_name ?? '',
|
|
87
|
+
},
|
|
88
|
+
{ header: 'Results in PNC - <=6wks - (N/P/Ic/NA)', value: (row) => row.results_less_6_weeks ?? '' },
|
|
89
|
+
{ header: 'Results in PNC - >6wks - (N/P/Ic/NA)', value: (row) => row.results_greater_6_weeks ?? '' },
|
|
90
|
+
{
|
|
91
|
+
header: 'HAART & Infant Prophylaxis and Treatment - <=6wks - Infant - NVP +AZT +CTX or NVP +CTX - (Y/N/NA/R)',
|
|
92
|
+
value: (row) => row.infant_prophylaxis_less_6_weeks ?? '',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
header: 'HAART & Infant Prophylaxis and Treatment - <=6wks - Mother - HAART - (Y/N/NA/R)',
|
|
96
|
+
value: (row) => row.maternal_haart_less_6_weeks ?? '',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
header: 'HAART & Infant Prophylaxis and Treatment - >6wks - Infant - NVP +AZT +CTX or NVP +CTX - (Y/N/NA/R)',
|
|
100
|
+
value: (row) => row.infant_prophylaxis_greater_6_weeks ?? '',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
header: 'HAART & Infant Prophylaxis and Treatment - >6wks - Mother - HAART - (Y/N/NA/R)',
|
|
104
|
+
value: (row) => row.maternal_haart_greater_6_weeks ?? '',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
header:
|
|
108
|
+
'Cervical Cancer Screening (VIA/VILLI/PAP Smear/ND) - Results 1=Normal, 2=Suspected, 3= Confirmed, 4= Not done',
|
|
109
|
+
value: (row) => row.cervical_cancer_method ?? '',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
header: 'Modern Post Partum Family Planning (Y/N) - Counseled Method received',
|
|
113
|
+
value: (row) => row.counselled ?? '',
|
|
114
|
+
},
|
|
115
|
+
{ header: 'Other Maternal Complications', value: (row) => row.other_maternal_complications ?? '' },
|
|
116
|
+
{ header: 'Haematinics (Y/N)', value: (row) => row.haematinics ?? '' },
|
|
117
|
+
{
|
|
118
|
+
header: 'Refferals - From - 1 = Community Unit 2 = Another Health Facility 3 = Not Applicable',
|
|
119
|
+
value: (row) => row.referrals_from ?? '',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
header: 'Refferals - To - 1 = Community Unit 2 = Another Health Facility 3 = Not Applicable',
|
|
123
|
+
value: (row) => row.referrals_to ?? '',
|
|
124
|
+
},
|
|
125
|
+
{ header: 'Refferals - Reasons for referral (specify)', value: (row) => row.reason_for_referral ?? '' },
|
|
126
|
+
{ header: 'Remarks', value: (row) => row.remarks ?? '' },
|
|
127
|
+
{ header: 'Nupi', value: (row) => row.nupi ?? '' },
|
|
128
|
+
{ header: 'Age', value: (row) => row.age ?? '' },
|
|
129
|
+
{ header: 'Phone number', value: (row) => row.phone_number ?? '' },
|
|
130
|
+
{ header: 'Pallor', value: (row) => row.pallor ?? '' },
|
|
131
|
+
{ header: 'Cervical cancer results', value: (row) => row.cervical_cancer_results ?? '' },
|
|
132
|
+
{ header: 'Family planning method', value: (row) => row.family_planning_method ?? '' },
|
|
133
|
+
];
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
3
|
+
import { useLocation, useSearchParams } from 'react-router-dom';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { useSession } from '@openmrs/esm-framework';
|
|
6
|
+
|
|
7
|
+
import styles from './moh-407.scss';
|
|
8
|
+
import { Moh407xportColumns } from './moh-407.columns';
|
|
9
|
+
import { getMoh407PatientList } from '../../../resources/moh-711.resource';
|
|
10
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@carbon/react';
|
|
11
|
+
import { ReportFiltersComponent, type ReportPeriod } from '../../../common/report-filters';
|
|
12
|
+
|
|
13
|
+
interface Moh407RegisterComponentProps {}
|
|
14
|
+
|
|
15
|
+
const Moh407RegisterComponent: React.FC<Moh407RegisterComponentProps> = () => {
|
|
16
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
17
|
+
const location = useLocation();
|
|
18
|
+
const session = useSession();
|
|
19
|
+
|
|
20
|
+
const from = searchParams.get('from');
|
|
21
|
+
const isDrilldown = Boolean(from);
|
|
22
|
+
const [generatedPeriod, setGeneratedPeriod] = useState<{ startDate: string; endDate: string } | null>(() => {
|
|
23
|
+
const startDate = searchParams.get('startDate');
|
|
24
|
+
const endDate = searchParams.get('endDate');
|
|
25
|
+
return !isDrilldown && startDate && endDate ? { startDate, endDate } : null;
|
|
26
|
+
});
|
|
27
|
+
const isGenerated = isDrilldown || Boolean(generatedPeriod);
|
|
28
|
+
|
|
29
|
+
const startDate = generatedPeriod?.startDate ?? searchParams.get('startDate');
|
|
30
|
+
const endDate = generatedPeriod?.endDate ?? searchParams.get('endDate');
|
|
31
|
+
const locationUuids = searchParams.get('locationUuids') ?? session?.sessionLocation?.uuid ?? '';
|
|
32
|
+
const indicator = searchParams.get('indicator');
|
|
33
|
+
const reportName = location.state?.reportName || 'moh711Report';
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
rows: patientlist,
|
|
37
|
+
total,
|
|
38
|
+
isTotalExact,
|
|
39
|
+
isLoading,
|
|
40
|
+
page,
|
|
41
|
+
pageSize,
|
|
42
|
+
onPageChange,
|
|
43
|
+
fetchAll,
|
|
44
|
+
} = usePatientList(
|
|
45
|
+
({ startIndex, limit }) => {
|
|
46
|
+
if (!isDrilldown && !generatedPeriod) {
|
|
47
|
+
return Promise.resolve({ results: [], total: 0, isTotalExact: true });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return getMoh407PatientList({
|
|
51
|
+
startDate,
|
|
52
|
+
endDate,
|
|
53
|
+
locationUuids,
|
|
54
|
+
indicator,
|
|
55
|
+
reportName,
|
|
56
|
+
startIndex,
|
|
57
|
+
limit,
|
|
58
|
+
from,
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
[startDate, endDate, locationUuids, indicator, reportName, from, isDrilldown, generatedPeriod],
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const generate = ({ startDate, endDate }: ReportPeriod) => {
|
|
65
|
+
setGeneratedPeriod({ startDate, endDate });
|
|
66
|
+
setSearchParams((currentParams) => {
|
|
67
|
+
const nextParams = new URLSearchParams(currentParams);
|
|
68
|
+
nextParams.set('startDate', startDate);
|
|
69
|
+
nextParams.set('endDate', endDate);
|
|
70
|
+
if (!nextParams.has('locationUuids') && locationUuids) {
|
|
71
|
+
nextParams.set('locationUuids', locationUuids);
|
|
72
|
+
}
|
|
73
|
+
return nextParams;
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<>
|
|
79
|
+
{!isDrilldown && (
|
|
80
|
+
<ReportFiltersComponent
|
|
81
|
+
reportName="MOH 407 Register"
|
|
82
|
+
mode="range"
|
|
83
|
+
onGenerate={generate}
|
|
84
|
+
isLoading={isLoading}
|
|
85
|
+
isReportGenerated={Boolean(generatedPeriod)}
|
|
86
|
+
generatedPeriod={generatedPeriod ?? undefined}
|
|
87
|
+
backLink={{ label: 'All registers', to: '/?tab=registers' }}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
90
|
+
<RegisterLayout
|
|
91
|
+
parentLabel={isDrilldown ? 'MOH-711 Report' : 'All registers'}
|
|
92
|
+
parentPath={isDrilldown ? '/moh-711' : '/?tab=registers'}
|
|
93
|
+
title="MOH 407 Register"
|
|
94
|
+
isLoading={isLoading}
|
|
95
|
+
isEmpty={isGenerated && patientlist.length === 0}
|
|
96
|
+
page={page}
|
|
97
|
+
pageSize={pageSize}
|
|
98
|
+
total={total}
|
|
99
|
+
isTotalExact={isTotalExact}
|
|
100
|
+
onPageChange={onPageChange}
|
|
101
|
+
fetchAll={isGenerated ? fetchAll : undefined}
|
|
102
|
+
columns={Moh407xportColumns}
|
|
103
|
+
>
|
|
104
|
+
{isGenerated && (
|
|
105
|
+
<div className={styles.tableContainer}>
|
|
106
|
+
<Table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
|
|
107
|
+
<TableHead>
|
|
108
|
+
<TableRow>
|
|
109
|
+
<TableHeader aria-rowspan={2}>Serial Number</TableHeader>
|
|
110
|
+
<TableHeader aria-rowspan={2}>Date</TableHeader>
|
|
111
|
+
<TableHeader aria-rowspan={2}>National Identification Number</TableHeader>
|
|
112
|
+
<TableHeader aria-rowspan={2}>Patient Names</TableHeader>
|
|
113
|
+
<TableHeader aria-rowspan={2}>Patient Visit</TableHeader>
|
|
114
|
+
<TableHeader aria-rowspan={2}>Residence</TableHeader>
|
|
115
|
+
<TableHeader aria-rowspan={2}>Sex</TableHeader>
|
|
116
|
+
<TableHeader colSpan={2}>Age</TableHeader>
|
|
117
|
+
<TableHeader aria-rowspan={2}>Pregnant or Breastfeeding</TableHeader>
|
|
118
|
+
<TableHeader>Nutritional Assessment</TableHeader>
|
|
119
|
+
<TableHeader aria-rowspan={2}>Nutrition Status</TableHeader>
|
|
120
|
+
<TableHeader aria-rowspan={2}>Serostatus</TableHeader>
|
|
121
|
+
<TableHeader aria-rowspan={2}>Medical Condition</TableHeader>
|
|
122
|
+
<TableHeader aria-rowspan={2}>Food Secure</TableHeader>
|
|
123
|
+
<TableHeader aria-rowspan={2}>Nutrition Intervention</TableHeader>
|
|
124
|
+
<TableHeader aria-rowspan={2}>Remarks</TableHeader>
|
|
125
|
+
</TableRow>
|
|
126
|
+
<TableRow>
|
|
127
|
+
<TableHeader>Years</TableHeader>
|
|
128
|
+
<TableHeader>Months</TableHeader>
|
|
129
|
+
<TableHeader>Figure for z score</TableHeader>
|
|
130
|
+
</TableRow>
|
|
131
|
+
</TableHead>
|
|
132
|
+
<TableBody>
|
|
133
|
+
{patientlist.length > 0 ? (
|
|
134
|
+
patientlist.map((patient, index) => (
|
|
135
|
+
<TableRow key={patient.person_id || patient.id || index}>
|
|
136
|
+
{Moh407xportColumns.map((column, columnIndex) => (
|
|
137
|
+
<TableCell key={`${column.header}-${columnIndex}`}>
|
|
138
|
+
{String(column.value(patient, (page - 1) * pageSize + index) ?? '')}
|
|
139
|
+
</TableCell>
|
|
140
|
+
))}
|
|
141
|
+
</TableRow>
|
|
142
|
+
))
|
|
143
|
+
) : (
|
|
144
|
+
<TableRow>
|
|
145
|
+
<TableCell colSpan={Moh407xportColumns.length}>No data available</TableCell>
|
|
146
|
+
</TableRow>
|
|
147
|
+
)}
|
|
148
|
+
</TableBody>
|
|
149
|
+
</Table>
|
|
150
|
+
</div>
|
|
151
|
+
)}
|
|
152
|
+
</RegisterLayout>
|
|
153
|
+
</>
|
|
154
|
+
);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export default Moh407RegisterComponent;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type RegisterColumn } from '../../../common/report-register/register-columns';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MOH 407 columns, flattened from the register's two-row table header.
|
|
5
|
+
*/
|
|
6
|
+
export const Moh407xportColumns: RegisterColumn[] = [
|
|
7
|
+
{ header: 'Serial Number', value: (_row, index) => index + 1 },
|
|
8
|
+
{ header: 'Date', value: (row) => row.date ?? '' },
|
|
9
|
+
{ header: 'National Identification Number', value: (row) => row.national_identification_number ?? '' },
|
|
10
|
+
{ header: 'Patient Names', value: (row) => row.patient_names ?? '' },
|
|
11
|
+
{ header: 'Patient Visit', value: (row) => row.patient_visit ?? '' },
|
|
12
|
+
{ header: 'Residence', value: (row) => row.residence ?? '' },
|
|
13
|
+
{ header: 'Sex', value: (row) => row.sex ?? '' },
|
|
14
|
+
{ header: 'Age - Years', value: (row) => row.age_years ?? '' },
|
|
15
|
+
{ header: 'Age - Months', value: (row) => row.age_months ?? '' },
|
|
16
|
+
{ header: 'Pregnant or Breastfeeding', value: (row) => row.pregnant_or_breastfeeding ?? '' },
|
|
17
|
+
{ header: 'Nutritional Assessment - Figure for z score', value: (row) => row.z_score ?? '' },
|
|
18
|
+
{ header: 'Nutrition Status', value: (row) => row.nutrition_status ?? '' },
|
|
19
|
+
{ header: 'Serostatus', value: (row) => row.serostatus ?? '' },
|
|
20
|
+
{ header: 'Medical Condition', value: (row) => row.medical_condition ?? '' },
|
|
21
|
+
{ header: 'Food Secure', value: (row) => row.food_secure ?? '' },
|
|
22
|
+
{ header: 'Nutrition Intervention', value: (row) => row.nutrition_intervention ?? '' },
|
|
23
|
+
{ header: 'Remarks', value: (row) => row.remarks ?? '' },
|
|
24
|
+
];
|
|
@@ -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,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useSearchParams } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
import styles from '../../../common/report-register/register-table.scss';
|
|
5
|
+
import { RegisterLayout, usePatientList } from '../../../common/report-register';
|
|
6
|
+
import { getMoh510PatientList } from '../../../resources/moh-710.resource';
|
|
7
|
+
|
|
8
|
+
const Moh510Register: React.FC = () => {
|
|
9
|
+
const [searchParams] = useSearchParams();
|
|
10
|
+
|
|
11
|
+
const startDate = searchParams.get('startDate');
|
|
12
|
+
const endDate = searchParams.get('endDate');
|
|
13
|
+
const locationUuids = searchParams.get('locationUuids');
|
|
14
|
+
const indicator = searchParams.get('indicator');
|
|
15
|
+
|
|
16
|
+
const {
|
|
17
|
+
rows: patientlist,
|
|
18
|
+
total,
|
|
19
|
+
isTotalExact,
|
|
20
|
+
isLoading,
|
|
21
|
+
page,
|
|
22
|
+
pageSize,
|
|
23
|
+
onPageChange,
|
|
24
|
+
fetchAll,
|
|
25
|
+
} = usePatientList(
|
|
26
|
+
({ startIndex, limit }) =>
|
|
27
|
+
getMoh510PatientList({
|
|
28
|
+
startDate,
|
|
29
|
+
endDate,
|
|
30
|
+
locationUuids,
|
|
31
|
+
indicator,
|
|
32
|
+
startIndex,
|
|
33
|
+
limit,
|
|
34
|
+
}),
|
|
35
|
+
[startDate, endDate, locationUuids, indicator],
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<RegisterLayout
|
|
40
|
+
parentLabel="MOH-711 Report"
|
|
41
|
+
parentPath="/moh-711"
|
|
42
|
+
title="MOH 510 Register"
|
|
43
|
+
isLoading={isLoading}
|
|
44
|
+
isEmpty={patientlist.length === 0}
|
|
45
|
+
page={page}
|
|
46
|
+
pageSize={pageSize}
|
|
47
|
+
total={total}
|
|
48
|
+
isTotalExact={isTotalExact}
|
|
49
|
+
onPageChange={onPageChange}
|
|
50
|
+
fetchAll={fetchAll}
|
|
51
|
+
></RegisterLayout>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default Moh510Register;
|