@ampath/esm-reports-app 1.0.0-next.7 → 1.0.0-next.71
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/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/580.js +1 -0
- package/dist/580.js.map +1 -0
- 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/781.js +1 -0
- package/dist/781.js.map +1 -0
- package/dist/919.css +1 -0
- package/dist/919.css.map +1 -0
- package/dist/919.js +1 -0
- package/dist/919.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 +255 -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 +59 -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 +27 -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 +173 -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-362/moh-362-lab-register.component.tsx +392 -0
- package/src/registers/moh-362/moh-362-linkage-register.component.tsx +120 -0
- package/src/registers/moh-362/moh-362-register.scss +222 -0
- package/src/registers/moh-362/moh-362.component.tsx +99 -0
- package/src/registers/moh-362/moh-362.scss +11 -0
- package/src/registers/moh-362/moh-362.types.ts +97 -0
- package/src/registers/register-catalog.ts +96 -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/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 +244 -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 +329 -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 +54 -62
- package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +228 -317
- package/src/reports/moh-706/sub-reports/drug-susceptibility-testing/drug-susceptibility-testing.component.tsx +31 -46
- package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +47 -55
- package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +43 -58
- package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +31 -39
- package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +26 -34
- package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +9 -24
- package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +43 -51
- package/src/reports/moh-710/moh-710.component.tsx +799 -632
- package/src/reports/moh-710/moh-710.scss +142 -21
- 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 +144 -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 +138 -1269
- package/src/reports/moh-711/moh711.scss +135 -20
- package/src/reports/moh-711/registers/moh-333-register.component.tsx +637 -0
- package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
- package/src/reports/moh-711/registers/moh-405-register.component.tsx +520 -0
- package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
- package/src/reports/moh-711/registers/moh-406-register.component.tsx +530 -0
- package/src/reports/moh-711/registers/moh-406.columns.ts +133 -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/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 +366 -0
- package/src/reports/moh-711/sections/family-planning.component.tsx +221 -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 +57 -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-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 +266 -0
- package/src/reports/moh-731/moh-731.scss +499 -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 +529 -0
- package/src/reports/moh-731/summary/moh-731-summary.scss +242 -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 +1021 -0
- package/src/reports/moh-745/moh-745.scss +132 -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 +181 -0
- package/src/reports/table-wrapper/table-row-mapper.component.tsx +57 -0
- 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-362.resource.ts +27 -0
- package/src/resources/moh-505.resource.ts +69 -0
- package/src/resources/moh-705.resource.ts +106 -0
- package/src/resources/moh-706.resource.ts +80 -0
- package/src/resources/moh-710.resource.ts +32 -9
- package/src/resources/moh-711.resource.ts +137 -9
- package/src/resources/moh-717.resource.ts +26 -9
- 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 +65 -0
- package/src/root.component.tsx +59 -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 +36 -0
- 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/711.js +0 -1
- package/dist/711.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 -539
- package/dist/main.js +0 -1
- package/dist/main.js.map +0 -1
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
@use '@carbon/layout';
|
|
2
|
+
@use '@openmrs/esm-styleguide/src/vars' as *;
|
|
3
|
+
|
|
4
|
+
/* A replica of the printed MOH 731 (Ver. July 2023) facility summary sheet,
|
|
5
|
+
laid out as a real A4 portrait page.
|
|
6
|
+
|
|
7
|
+
Everything is expressed in the units the document is drawn in -- millimetres
|
|
8
|
+
for geometry, points for type -- so the sheet occupies exactly one A4 page on
|
|
9
|
+
screen and prints at 1:1. */
|
|
10
|
+
|
|
11
|
+
$page-w: 210mm; // A4 portrait
|
|
12
|
+
$page-h: 297mm;
|
|
13
|
+
$page-margin: 8mm;
|
|
14
|
+
|
|
15
|
+
$ink: #000; // rules, borders and body text
|
|
16
|
+
$bar: #d9d9d9; // grey fill behind the numbered section bars
|
|
17
|
+
$rule: 1px solid $ink;
|
|
18
|
+
$dotted: 1px dotted $ink; // sub-block and column separators inside a section
|
|
19
|
+
|
|
20
|
+
/* Sized so the whole return fits one A4 page. The binding constraint is
|
|
21
|
+
height, not width: stacking the tallest column of each section plus the
|
|
22
|
+
masthead comes to 271mm of the 281mm available at a 2.7mm row. */
|
|
23
|
+
|
|
24
|
+
$text: 5.5pt; // body size for labels and codes
|
|
25
|
+
$title: 8pt; // masthead only
|
|
26
|
+
$caption: 4.5pt; // "Male" / "Female" column captions
|
|
27
|
+
|
|
28
|
+
$box-w: 8.5mm; // every value box
|
|
29
|
+
$box-h: 2.5mm; // a little taller than the label line, as on the form
|
|
30
|
+
$row-h: 2.7mm; // one indicator row: the box plus hairline clearance
|
|
31
|
+
|
|
32
|
+
$pad: 1.5mm; // padding inside columns and the sheet's bands
|
|
33
|
+
$gap: 0.8mm; // between a code and its box
|
|
34
|
+
$block-gap: 1mm; // above a sub-block heading
|
|
35
|
+
$label-gap: 4mm; // between a row label and its first code
|
|
36
|
+
|
|
37
|
+
/* Width of the label column. Fixed rather than content-sized so that every
|
|
38
|
+
block within a column lines its codes and boxes up at the same offset, as
|
|
39
|
+
the form does -- the blocks are separate tables, so left to size themselves
|
|
40
|
+
each one lands somewhere slightly different. Overridden per column in
|
|
41
|
+
section 3, whose columns are narrower. */
|
|
42
|
+
$label-w: 36mm;
|
|
43
|
+
$section-gap: 0.8mm; // around a divider
|
|
44
|
+
|
|
45
|
+
/* Form / Summary tabs, between the filters and the panels */
|
|
46
|
+
.tabList {
|
|
47
|
+
margin-top: layout.$spacing-05;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Each tab's panel brings its own spacing (the report card, the summary grid) */
|
|
51
|
+
.formPanel,
|
|
52
|
+
.summaryPanel {
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.summaryPanel {
|
|
57
|
+
margin-top: layout.$spacing-05;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* The card the sheet sits in, drawn like the filter card above it (same rule
|
|
61
|
+
and fill) so the report reads as the second panel of one page.
|
|
62
|
+
It wraps `.viewport` rather than styling it: the page is scaled to the
|
|
63
|
+
viewport's width, so padding there would push the sheet into a scrollbar. */
|
|
64
|
+
.reportFrame {
|
|
65
|
+
margin-top: layout.$spacing-05;
|
|
66
|
+
padding: layout.$spacing-05;
|
|
67
|
+
background-color: $ui-02;
|
|
68
|
+
border: 1px solid $ui-03;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Holds the fixed-width page without making the app scroll sideways.
|
|
72
|
+
|
|
73
|
+
No padding of its own: vertical padding here is dead space, and horizontal
|
|
74
|
+
padding would eat into the width the page needs and bring on a scrollbar that
|
|
75
|
+
is not otherwise required. The left and right gutter comes from `.page` in
|
|
76
|
+
root.scss, which every route already sits inside. */
|
|
77
|
+
|
|
78
|
+
.viewport {
|
|
79
|
+
overflow-x: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* On screen the sheet sits inside `.reportFrame`, whose padding is the margin:
|
|
83
|
+
drawn as a separate shadowed page with its own 8mm margins, it sat further
|
|
84
|
+
in from the card's edge than any other panel's content does. So the screen
|
|
85
|
+
sheet is the printable area only -- A4 less its margins, which `@page` puts
|
|
86
|
+
back for print -- and `usePageScale` is told that width. */
|
|
87
|
+
.form {
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
width: $page-w - 2 * $page-margin;
|
|
90
|
+
margin: 0 auto;
|
|
91
|
+
color: $ink;
|
|
92
|
+
font-size: $text;
|
|
93
|
+
line-height: 1.15;
|
|
94
|
+
background-color: #fff;
|
|
95
|
+
/* Set by `usePageScale` from the measured container width, floored at 1 so
|
|
96
|
+
the sheet is never drawn smaller than the paper. Reset to 1 for print. */
|
|
97
|
+
zoom: var(--page-zoom, 1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Ministry line, above the ruled sheet */
|
|
101
|
+
|
|
102
|
+
.ministryLine {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
margin-bottom: $pad;
|
|
106
|
+
font-weight: 700;
|
|
107
|
+
font-size: $text;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* The ruled sheet itself */
|
|
111
|
+
|
|
112
|
+
.sheet {
|
|
113
|
+
border: $rule;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Masthead */
|
|
117
|
+
|
|
118
|
+
/* The title is centred on the full width of the sheet, not on the space left
|
|
119
|
+
over beside the version box. The version box is taken out of flow so it
|
|
120
|
+
cannot push the title off centre. */
|
|
121
|
+
|
|
122
|
+
.formHeader {
|
|
123
|
+
position: relative;
|
|
124
|
+
padding: $pad;
|
|
125
|
+
border-bottom: $rule;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.formTitle {
|
|
129
|
+
text-align: center;
|
|
130
|
+
|
|
131
|
+
strong {
|
|
132
|
+
display: block;
|
|
133
|
+
font-size: $title;
|
|
134
|
+
font-weight: 700;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.formVersion {
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: $pad;
|
|
141
|
+
right: $pad;
|
|
142
|
+
padding: 0.5mm 1mm;
|
|
143
|
+
font-size: $text;
|
|
144
|
+
border: $dotted;
|
|
145
|
+
white-space: nowrap;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* County / Sub County / Facility fill-in line */
|
|
149
|
+
|
|
150
|
+
.locationContainer {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-wrap: nowrap;
|
|
153
|
+
align-items: baseline;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
gap: 2.5mm;
|
|
156
|
+
padding: $pad;
|
|
157
|
+
font-size: $text;
|
|
158
|
+
white-space: nowrap;
|
|
159
|
+
border-bottom: $rule;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* These carry the facility and period once a report is generated, so they need
|
|
163
|
+
to hold text on the rule rather than just draw it. */
|
|
164
|
+
|
|
165
|
+
.line,
|
|
166
|
+
.shortLine {
|
|
167
|
+
display: inline-block;
|
|
168
|
+
padding: 0 1mm;
|
|
169
|
+
margin-left: 1mm;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
font-weight: 600;
|
|
172
|
+
text-align: center;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
vertical-align: bottom;
|
|
176
|
+
border-bottom: $rule;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.line {
|
|
180
|
+
width: 27mm;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.shortLine {
|
|
184
|
+
width: 12mm;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Numbered section bar, full width of the sheet. `text-align` is stated rather
|
|
188
|
+
than left to inherit: CSS Modules does not scope bare element selectors, and
|
|
189
|
+
other report stylesheets ship a global `h5 { text-align: center }`. */
|
|
190
|
+
|
|
191
|
+
.sectionHeader {
|
|
192
|
+
padding: 0.8mm $pad;
|
|
193
|
+
text-align: left;
|
|
194
|
+
font-size: $text;
|
|
195
|
+
font-weight: 700;
|
|
196
|
+
background-color: $bar;
|
|
197
|
+
border-bottom: $rule;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* The same bar, but scoped to one column -- sections 4 and 5 sit inside the
|
|
201
|
+
right-hand column of section 3 on the printed form. */
|
|
202
|
+
|
|
203
|
+
.columnHeader {
|
|
204
|
+
padding: 0.8mm $pad;
|
|
205
|
+
text-align: left;
|
|
206
|
+
margin: $block-gap (-$pad) $pad;
|
|
207
|
+
font-size: $text;
|
|
208
|
+
font-weight: 700;
|
|
209
|
+
background-color: $bar;
|
|
210
|
+
border-top: $rule;
|
|
211
|
+
border-bottom: $rule;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Column grid inside a section */
|
|
215
|
+
|
|
216
|
+
.flexRow {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: stretch;
|
|
219
|
+
border-bottom: $rule;
|
|
220
|
+
|
|
221
|
+
/* the sheet's own border closes the last section; a second rule there
|
|
222
|
+
doubles the line */
|
|
223
|
+
&:last-child {
|
|
224
|
+
border-bottom: none;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.flexColumn {
|
|
229
|
+
flex: 1 1 0;
|
|
230
|
+
min-width: 0;
|
|
231
|
+
padding: $pad;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* No rule between columns by default: on the form only section 3 divides its
|
|
235
|
+
columns, and it does so with a dotted line (see `.borderRight` below). */
|
|
236
|
+
|
|
237
|
+
/* Section 3 only: columns 1 and 2 are grouped so the sign-off can run along
|
|
238
|
+
their foot while section 5 continues in column 3 beside it. */
|
|
239
|
+
|
|
240
|
+
/* Section 3's columns are not equal thirds on the form. Column 1 carries a
|
|
241
|
+
male and a female value on every row, so it takes 45% of the width, against
|
|
242
|
+
26% and 29% for the single-value columns beside it. Splitting evenly left
|
|
243
|
+
column 1 about 21mm short, which forced its labels to wrap. */
|
|
244
|
+
|
|
245
|
+
.colGroup {
|
|
246
|
+
display: flex;
|
|
247
|
+
flex: 71 1 0; // columns 1 and 2 together
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
min-width: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.colPair > .borderRight {
|
|
253
|
+
flex: 63 1 0; // column 1, of the pair
|
|
254
|
+
--label-w: 24mm;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.colPair > .flexColumn:last-child {
|
|
258
|
+
flex: 37 1 0; // column 2
|
|
259
|
+
--label-w: 25mm;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.flexRow > .borderLeft {
|
|
263
|
+
flex: 29 1 0; // column 3
|
|
264
|
+
--label-w: 30mm;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.colPair {
|
|
268
|
+
display: flex;
|
|
269
|
+
flex: 1 1 auto;
|
|
270
|
+
align-items: stretch;
|
|
271
|
+
min-width: 0;
|
|
272
|
+
/* clearance between the last indicator rows and the sign-off rule below */
|
|
273
|
+
padding-bottom: 1.5mm;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
/* Section 3's column separators, dotted as on the form */
|
|
279
|
+
|
|
280
|
+
.borderRight {
|
|
281
|
+
padding: $pad;
|
|
282
|
+
border-right: $dotted;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.borderLeft {
|
|
286
|
+
padding: $pad;
|
|
287
|
+
border-left: $dotted;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Indicator rows.
|
|
291
|
+
|
|
292
|
+
Measured off the form: each section splits into two equal 90mm halves, and a
|
|
293
|
+
block occupies only about 70mm of its half, left aligned, leaving ~15mm of
|
|
294
|
+
trailing slack. That slack is what reads as the gap between column 1 and
|
|
295
|
+
column 2 -- there is no gutter between them. So the table is sized to its
|
|
296
|
+
content rather than stretched: stretching pushed the value boxes onto the
|
|
297
|
+
column boundary and closed the gap up.
|
|
298
|
+
|
|
299
|
+
Auto layout, not fixed: `.textBox` is `nowrap` (a code must never be split
|
|
300
|
+
from its box) so it has a hard minimum width, and a fixed layout would hand
|
|
301
|
+
out narrower columns and push the pair outside the section rule. */
|
|
302
|
+
|
|
303
|
+
.block {
|
|
304
|
+
width: auto;
|
|
305
|
+
max-width: 100%;
|
|
306
|
+
border-collapse: collapse;
|
|
307
|
+
table-layout: auto;
|
|
308
|
+
|
|
309
|
+
td {
|
|
310
|
+
height: $row-h;
|
|
311
|
+
padding: 0.1mm 0.8mm 0.1mm 0;
|
|
312
|
+
font-size: $text;
|
|
313
|
+
vertical-align: middle;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* Fixed width so codes and boxes align across every block in the column */
|
|
317
|
+
td:first-child:not([colspan]) {
|
|
318
|
+
box-sizing: border-box;
|
|
319
|
+
width: var(--label-w, #{$label-w});
|
|
320
|
+
padding-right: $label-gap;
|
|
321
|
+
overflow-wrap: anywhere;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* Sub-block heading, e.g. "1.1 HIV Tests". Flush with the column's left edge,
|
|
326
|
+
in line with the row labels beneath it. */
|
|
327
|
+
|
|
328
|
+
.blockTitle {
|
|
329
|
+
padding-top: $block-gap;
|
|
330
|
+
padding-bottom: 0.6mm;
|
|
331
|
+
padding-left: 0;
|
|
332
|
+
font-size: $text;
|
|
333
|
+
font-weight: 700;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* A heading within a block, e.g. "Below 6 months" */
|
|
337
|
+
|
|
338
|
+
.groupTitle {
|
|
339
|
+
padding-top: 1mm;
|
|
340
|
+
padding-left: 0;
|
|
341
|
+
font-size: $text;
|
|
342
|
+
font-weight: 700;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* "Male" / "Female (including PMTCT)" column captions */
|
|
346
|
+
|
|
347
|
+
.subTitle {
|
|
348
|
+
padding-bottom: 0.5mm;
|
|
349
|
+
font-size: $caption;
|
|
350
|
+
font-weight: 400;
|
|
351
|
+
text-align: center;
|
|
352
|
+
vertical-align: bottom;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/* The separator between sub-blocks: one dotted rule across the column, so every
|
|
356
|
+
separator in a section is the same length. */
|
|
357
|
+
|
|
358
|
+
.divider {
|
|
359
|
+
height: 0;
|
|
360
|
+
margin: $section-gap 0;
|
|
361
|
+
border: none;
|
|
362
|
+
border-top: $dotted;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.spaceAfter {
|
|
366
|
+
padding-right: 2mm;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.emptyColumn {
|
|
370
|
+
width: auto;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/* Code plus its value box */
|
|
374
|
+
|
|
375
|
+
.textBox,
|
|
376
|
+
.textBox2 {
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
justify-content: flex-end;
|
|
380
|
+
gap: $gap;
|
|
381
|
+
white-space: nowrap;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.textBox span {
|
|
385
|
+
font-size: $text;
|
|
386
|
+
font-variant-numeric: tabular-nums;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.rectangle {
|
|
390
|
+
display: inline-flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
justify-content: center;
|
|
393
|
+
flex-shrink: 0;
|
|
394
|
+
box-sizing: border-box;
|
|
395
|
+
width: $box-w;
|
|
396
|
+
height: $box-h;
|
|
397
|
+
font-size: $text;
|
|
398
|
+
font-variant-numeric: tabular-nums;
|
|
399
|
+
background-color: #fff;
|
|
400
|
+
border: $rule;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/* Only the boxes wired to a register drill-down carry the hover text, so the
|
|
404
|
+
attribute doubles as the selector: a box with no linelist behind it must not
|
|
405
|
+
offer a pointer cursor it cannot honour. */
|
|
406
|
+
|
|
407
|
+
.rectangle[title]:hover {
|
|
408
|
+
background-color: $brand-primary-10;
|
|
409
|
+
border-color: var(--brand-01);
|
|
410
|
+
cursor: pointer;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/* Sign-off strip along the foot of the sheet */
|
|
414
|
+
|
|
415
|
+
.reviewSection {
|
|
416
|
+
display: grid;
|
|
417
|
+
grid-template-columns: 22mm repeat(4, 1fr);
|
|
418
|
+
align-items: end;
|
|
419
|
+
column-gap: 4mm;
|
|
420
|
+
/* the form leaves about 1.7mm clear between a label and its rule */
|
|
421
|
+
row-gap: 1.5mm;
|
|
422
|
+
/* pushed to the foot of the grouped columns, clear of the rows above */
|
|
423
|
+
margin-top: auto;
|
|
424
|
+
padding: 1.5mm $pad 1mm;
|
|
425
|
+
font-size: $text;
|
|
426
|
+
/* full-width rule across columns 1 and 2, as on the form */
|
|
427
|
+
border-top: $rule;
|
|
428
|
+
|
|
429
|
+
span {
|
|
430
|
+
text-align: center;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.reviewLabel {
|
|
435
|
+
text-align: left;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* A fixed height keeps the prefilled cells (name, date) on the same baseline as
|
|
439
|
+
the blank ones (designation, signature), which have no content to give them
|
|
440
|
+
height. */
|
|
441
|
+
|
|
442
|
+
.reviewRule {
|
|
443
|
+
min-height: $row-h;
|
|
444
|
+
padding-bottom: 0.3mm;
|
|
445
|
+
text-align: center;
|
|
446
|
+
border-bottom: $rule;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* No responsive reflow: this is a replica of a fixed A4 sheet, so on a narrow
|
|
450
|
+
screen the page keeps its proportions and scrolls inside `.viewport` rather
|
|
451
|
+
than restacking into something the printed form does not do. */
|
|
452
|
+
|
|
453
|
+
@media print {
|
|
454
|
+
@page {
|
|
455
|
+
size: A4 portrait;
|
|
456
|
+
margin: $page-margin;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/* The app chrome is hidden by `.page` in root.scss; this only needs to undo
|
|
460
|
+
the on-screen scroll container. */
|
|
461
|
+
|
|
462
|
+
.viewport {
|
|
463
|
+
overflow: visible;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* Download PDF prints the form whichever tab is open */
|
|
467
|
+
.tabList,
|
|
468
|
+
.summaryPanel {
|
|
469
|
+
display: none !important;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.formPanel[hidden] {
|
|
473
|
+
display: block !important;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* the card is screen chrome; the printout is the bare sheet */
|
|
477
|
+
.reportFrame {
|
|
478
|
+
margin: 0;
|
|
479
|
+
padding: 0;
|
|
480
|
+
background: none;
|
|
481
|
+
border: none;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.form {
|
|
485
|
+
width: auto;
|
|
486
|
+
min-height: 0;
|
|
487
|
+
padding: 0;
|
|
488
|
+
margin: 0;
|
|
489
|
+
box-shadow: none;
|
|
490
|
+
/* paper geometry stands on its own; magnification is for screens */
|
|
491
|
+
zoom: 1;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.flexRow,
|
|
495
|
+
.reviewSection {
|
|
496
|
+
break-inside: avoid;
|
|
497
|
+
page-break-inside: avoid;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ageBandColumns, type RegisterColumn } from '../../../common/report-register';
|
|
2
|
+
|
|
3
|
+
const tbColumn = (heading: string, field: string, under15: boolean): RegisterColumn => ({
|
|
4
|
+
header: `${heading} ${under15 ? '< 15 yrs' : '15+ yrs'}`,
|
|
5
|
+
value: (row) => ((under15 ? row.age < 15 : row.age >= 15) ? (row.started_on_art === 'Y' ? row[field] : 'NA') : ''),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The columns the MOH 366 register prints, in order.
|
|
10
|
+
*
|
|
11
|
+
* Kept beside the table it mirrors: most cells are not fields but a
|
|
12
|
+
* presentation of them -- an age band crossed with a gender -- so an export
|
|
13
|
+
* that listed the raw response would not line up with the printed register at
|
|
14
|
+
* all.
|
|
15
|
+
*/
|
|
16
|
+
export const moh366Columns: RegisterColumn[] = [
|
|
17
|
+
{ header: 'No', value: (_row, index) => index + 1 },
|
|
18
|
+
{ header: 'Date', value: (row) => (row.date ? new Date(row.date).toLocaleDateString('en-GB') : '') },
|
|
19
|
+
{ header: 'AMRSID', value: (row) => row.amrsID },
|
|
20
|
+
{ header: 'National Identification Number', value: (row) => row.national_id_number },
|
|
21
|
+
{ header: 'Client CCC Number', value: (row) => row.ccc_number?.replace('-', '') },
|
|
22
|
+
{ header: 'Age', value: (row) => row.age },
|
|
23
|
+
|
|
24
|
+
...ageBandColumns('Starting ART', (row) => (row.started_on_art === 'Y' ? 'Y' : '')),
|
|
25
|
+
|
|
26
|
+
tbColumn('Screened for TB', 'screened_for_tb', true),
|
|
27
|
+
tbColumn('Screened for TB', 'screened_for_tb', false),
|
|
28
|
+
tbColumn('Started TPT', 'started_on_tpt', true),
|
|
29
|
+
tbColumn('Started TPT', 'started_on_tpt', false),
|
|
30
|
+
|
|
31
|
+
...ageBandColumns('Currently on ART', (row) =>
|
|
32
|
+
row.revisit ? row.revisit : row.current_on_art > 0 ? row.current_on_art : 1,
|
|
33
|
+
),
|
|
34
|
+
|
|
35
|
+
{ header: 'DSD Status', value: (row) => row.dsd_status },
|
|
36
|
+
{ header: 'DSD Type', value: (row) => row.dsd_type },
|
|
37
|
+
{ header: 'Remarks', value: (row) => row.remarks },
|
|
38
|
+
];
|