@ampath/esm-reports-app 1.0.0-next.41 → 1.0.0-next.45

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.
Files changed (183) hide show
  1. package/dist/143.css +1 -0
  2. package/dist/143.css.map +1 -0
  3. package/dist/143.js +1 -0
  4. package/dist/143.js.map +1 -0
  5. package/dist/197.js +1 -1
  6. package/dist/282.js +1 -1
  7. package/dist/282.js.map +1 -1
  8. package/dist/295.css +1 -0
  9. package/dist/295.css.map +1 -0
  10. package/dist/295.js +1 -0
  11. package/dist/295.js.map +1 -0
  12. package/dist/300.js +1 -1
  13. package/dist/311.js +1 -1
  14. package/dist/311.js.map +1 -1
  15. package/dist/335.js +1 -1
  16. package/dist/353.js +1 -1
  17. package/dist/353.js.map +1 -1
  18. package/dist/410.js +1 -0
  19. package/dist/410.js.map +1 -0
  20. package/dist/427.js +2 -0
  21. package/dist/427.js.LICENSE.txt +35 -0
  22. package/dist/427.js.map +1 -0
  23. package/dist/441.js +1 -0
  24. package/dist/441.js.map +1 -0
  25. package/dist/478.js +1 -1
  26. package/dist/478.js.map +1 -1
  27. package/dist/540.js +1 -1
  28. package/dist/540.js.map +1 -1
  29. package/dist/55.js +1 -1
  30. package/dist/652.js +1 -1
  31. package/dist/961.js +1 -1
  32. package/dist/961.js.map +1 -1
  33. package/dist/99.js +1 -1
  34. package/dist/ampath-esm-reports-app.js +1 -1
  35. package/dist/ampath-esm-reports-app.js.map +1 -1
  36. package/dist/routes.json +1 -1
  37. package/package.json +2 -2
  38. package/src/common/report-error/index.ts +1 -0
  39. package/src/common/report-error/show-report-error.ts +25 -0
  40. package/src/common/report-filters/date-range.ts +137 -0
  41. package/src/common/report-filters/index.ts +4 -0
  42. package/src/common/report-filters/report-filters.component.tsx +281 -151
  43. package/src/common/report-filters/report-filters.scss +180 -55
  44. package/src/common/report-filters/types.ts +66 -0
  45. package/src/common/report-filters/use-restore-period.ts +43 -0
  46. package/src/common/report-page/index.ts +2 -0
  47. package/src/common/report-page/report-page.component.tsx +32 -0
  48. package/src/common/report-page/report-page.scss +45 -0
  49. package/src/common/report-page/use-page-scale.ts +50 -0
  50. package/src/common/report-placeholder/has-report-data.ts +15 -0
  51. package/src/common/report-placeholder/index.ts +2 -0
  52. package/src/common/report-placeholder/report-placeholder.component.tsx +56 -0
  53. package/src/common/report-placeholder/report-placeholder.scss +46 -0
  54. package/src/common/report-register/index.ts +5 -0
  55. package/src/common/report-register/register-columns.ts +34 -0
  56. package/src/common/report-register/register-layout.component.tsx +237 -0
  57. package/src/common/report-register/register-layout.scss +140 -0
  58. package/src/common/report-register/register-table.scss +62 -0
  59. package/src/common/report-register/report-parents.ts +27 -0
  60. package/src/common/report-register/rows-to-csv.ts +59 -0
  61. package/src/common/report-register/use-patient-list.ts +92 -0
  62. package/src/common/report-skeleton/index.ts +1 -0
  63. package/src/common/report-skeleton/report-skeleton.component.tsx +46 -0
  64. package/src/common/report-skeleton/report-skeleton.scss +29 -0
  65. package/src/config-schema.ts +9 -1
  66. package/src/dashboard/report-catalog.ts +173 -0
  67. package/src/dashboard/reports-dasboard.tsx +101 -35
  68. package/src/dashboard/reports-dashboard.module.scss +269 -11
  69. package/src/index.ts +13 -1
  70. package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +50 -48
  71. package/src/reports/moh-240/moh-240-header.component.tsx +54 -56
  72. package/src/reports/moh-240/moh-240.columns.ts +64 -0
  73. package/src/reports/moh-240/moh-240.component.tsx +65 -84
  74. package/src/reports/moh-240/moh-240.scss +36 -7
  75. package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +27 -65
  76. package/src/reports/moh-240/sub-reports/page-summary.component.tsx +2 -2
  77. package/src/reports/moh-505/moh-505-header.component.tsx +59 -57
  78. package/src/reports/moh-505/moh-505.component.tsx +51 -56
  79. package/src/reports/moh-505/moh-505.scss +116 -2
  80. package/src/reports/moh-705B/moh-204b-register.component.tsx +41 -42
  81. package/src/reports/moh-705B/moh-204b.columns.ts +39 -0
  82. package/src/reports/moh-705B/moh-705b.component.tsx +492 -473
  83. package/src/reports/moh-705B/moh-705b.scss +110 -24
  84. package/src/reports/moh-705a/moh-705a.component.tsx +496 -476
  85. package/src/reports/moh-705a/moh-705a.scss +109 -24
  86. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +41 -42
  87. package/src/reports/moh-705a/registers/moh-204a.columns.ts +57 -0
  88. package/src/reports/moh-706/moh-706-header.component.tsx +58 -56
  89. package/src/reports/moh-706/moh-706.component.tsx +84 -55
  90. package/src/reports/moh-706/moh-706.scss +115 -19
  91. package/src/reports/moh-710/moh-710.component.tsx +743 -727
  92. package/src/reports/moh-710/moh-710.scss +140 -23
  93. package/src/reports/moh-710/registers/moh-511-710-register.component.tsx +48 -43
  94. package/src/reports/moh-710/registers/moh-511-710.columns.ts +52 -0
  95. package/src/reports/moh-711/moh-711.component.tsx +94 -106
  96. package/src/reports/moh-711/moh711.scss +95 -64
  97. package/src/reports/moh-711/registers/moh-333-register.component.tsx +92 -94
  98. package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
  99. package/src/reports/moh-711/registers/moh-405-register.component.tsx +88 -89
  100. package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
  101. package/src/reports/moh-711/registers/moh-406-register.component.tsx +85 -88
  102. package/src/reports/moh-711/registers/moh-406.columns.ts +133 -0
  103. package/src/reports/moh-711/registers/moh-510-register.component.tsx +38 -44
  104. package/src/reports/moh-711/registers/moh-511-register.component.tsx +42 -43
  105. package/src/reports/moh-711/registers/moh-511.columns.ts +59 -0
  106. package/src/reports/moh-711/sections/anc.component.tsx +3 -3
  107. package/src/reports/moh-711/sections/cervical-cancer.component.tsx +3 -3
  108. package/src/reports/moh-711/sections/chanis.component.tsx +2 -3
  109. package/src/reports/moh-711/sections/family-planning.component.tsx +2 -2
  110. package/src/reports/moh-711/sections/gbv.component.tsx +2 -2
  111. package/src/reports/moh-711/sections/maternity.component.tsx +3 -8
  112. package/src/reports/moh-711/sections/medical-social-work.component.tsx +2 -12
  113. package/src/reports/moh-711/sections/other.component.tsx +2 -2
  114. package/src/reports/moh-711/sections/physiotherapy.component.tsx +2 -2
  115. package/src/reports/moh-711/sections/pnc.component.tsx +7 -5
  116. package/src/reports/moh-711/sections/post-abortion.component.tsx +2 -2
  117. package/src/reports/moh-711/sections/rehabilitation.component.tsx +2 -2
  118. package/src/reports/moh-711/sections/report-compiled-by.component.tsx +12 -4
  119. package/src/reports/moh-711/sections/tb-screening.component.tsx +2 -2
  120. package/src/reports/moh-717/moh-717.component.tsx +100 -121
  121. package/src/reports/moh-717/moh717.scss +163 -102
  122. package/src/reports/moh-717/sections/maternity.component.tsx +1 -1
  123. package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +1 -1
  124. package/src/reports/moh-717/sections/outpatient.component.tsx +23 -23
  125. package/src/reports/moh-717/sections/preparedby.component.tsx +7 -2
  126. package/src/reports/moh-717/sections/special-services.component.tsx +1 -1
  127. package/src/reports/moh-731/moh-731.component.tsx +127 -110
  128. package/src/reports/moh-731/moh-731.scss +396 -68
  129. package/src/reports/moh-731/registers/moh-366.columns.ts +38 -0
  130. package/src/reports/moh-731/registers/moh-366.component.tsx +76 -83
  131. package/src/reports/moh-731/registers/prep-register.component.tsx +70 -78
  132. package/src/reports/moh-731/registers/prep.columns.ts +34 -0
  133. package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +1031 -751
  134. package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +230 -86
  135. package/src/reports/moh-731/sections/pmtct.component.tsx +185 -64
  136. package/src/reports/moh-740/moh-740.component.scss +159 -79
  137. package/src/reports/moh-740/moh-740.component.tsx +261 -230
  138. package/src/reports/moh-740/moh-740.resource.ts +17 -10
  139. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +77 -96
  140. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +50 -70
  141. package/src/reports/moh-740/registers/moh-740-patient-list.tsx +61 -32
  142. package/src/reports/moh-740/registers/moh-740.columns.ts +52 -0
  143. package/src/reports/moh-740/shared/utils/indicator-register-map.ts +3 -3
  144. package/src/reports/moh-740/types/index.ts +3 -3
  145. package/src/reports/moh-745/moh-745.component.tsx +897 -877
  146. package/src/reports/moh-745/moh-745.scss +104 -46
  147. package/src/reports/moh-745/registers/moh-412-register.component.tsx +42 -43
  148. package/src/reports/moh-745/registers/moh-412.columns.ts +52 -0
  149. package/src/reports/table-wrapper/table-wrapper.component.tsx +23 -14
  150. package/src/reports/table-wrapper/table-wrapper.scss +1 -16
  151. package/src/resources/moh-505.resource.ts +18 -35
  152. package/src/resources/moh-705.resource.ts +28 -39
  153. package/src/resources/moh-706.resource.ts +17 -30
  154. package/src/resources/moh-710.resource.ts +7 -17
  155. package/src/resources/moh-711.resource.ts +46 -64
  156. package/src/resources/moh-717.resource.ts +7 -17
  157. package/src/resources/moh-731.resource.ts +26 -32
  158. package/src/resources/moh-745.resource.ts +18 -20
  159. package/src/resources/patient-list-page.ts +66 -0
  160. package/src/root.component.tsx +28 -26
  161. package/src/root.scss +36 -0
  162. package/src/utils/get-base-url.ts +39 -7
  163. package/tsconfig.json +1 -1
  164. package/dist/110.js +0 -1
  165. package/dist/110.js.map +0 -1
  166. package/dist/184.js +0 -2
  167. package/dist/184.js.LICENSE.txt +0 -14
  168. package/dist/184.js.map +0 -1
  169. package/dist/205.js +0 -1
  170. package/dist/205.js.map +0 -1
  171. package/dist/812.js +0 -1
  172. package/dist/812.js.map +0 -1
  173. package/dist/822.js +0 -2
  174. package/dist/822.js.LICENSE.txt +0 -20
  175. package/dist/822.js.map +0 -1
  176. package/dist/ampath-esm-reports-app.js.buildmanifest.json +0 -560
  177. package/dist/main.js +0 -1
  178. package/dist/main.js.map +0 -1
  179. package/src/reports/moh-731/registers/moh-366.scss +0 -45
  180. package/src/reports/moh-731/registers/prep-registers.scss +0 -45
  181. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss +0 -18
  182. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss +0 -18
  183. /package/src/{reports/moh-740/shared/utils → utils}/format-indicator.ts +0 -0
@@ -1,125 +1,156 @@
1
1
 
2
- h5 {
3
- text-align: center;
2
+ /* Smaller than the section headings beneath it: at 9pt the form title was
3
+ heavier than the lettered sections it introduces. */
4
+
5
+ .mainTitleBox h5 {
6
+ font-size: 7.5pt;
7
+ font-weight: 700;
8
+ line-height: 1.25;
9
+ text-align: center;
4
10
  }
5
11
 
6
12
  .container {
7
- margin: 2rem 2rem;
8
13
  display: grid;
9
14
  grid-template-columns: 1fr 1fr;
10
- gap: 1rem;
11
- padding: 0 2rem;
15
+ gap: 4mm;
16
+ align-items: start;
17
+ margin: 0 0 4mm;
12
18
 
13
- grid-template-areas:
14
- "left right";
19
+ grid-template-areas: 'left right';
15
20
  }
16
21
 
17
-
18
22
  .left {
19
23
  grid-area: left;
24
+ min-width: 0;
20
25
  }
21
26
 
22
27
  .right {
23
28
  grid-area: right;
29
+ min-width: 0;
24
30
  }
25
31
 
26
- /* 📱 Stack on small screens */
32
+ /* Stack on small screens */
27
33
  @media (max-width: 768px) {
28
34
  .container {
29
35
  grid-template-columns: 1fr;
30
36
  grid-template-areas:
31
- "left"
32
- "right";
37
+ 'left'
38
+ 'right';
33
39
  }
34
40
  }
35
41
 
36
- .sectionTitle {
37
- margin-left: 1rem ;
38
- }
42
+ /* A lettered section. Maternity carries three tables and Family Planning two,
43
+ so the gap inside a section is smaller than the gap between them -- given the
44
+ same margin, a multi-table section reads as several separate ones.
45
+
46
+ Kept off a page break so a section is never split from its heading; at about
47
+ 116 rows in the taller column this runs to roughly two A4 pages. */
39
48
 
40
- .title {
41
- text-align: center;
42
- font-size: 1rem;
43
- margin: 1rem;
49
+ .section {
50
+ margin-bottom: 4mm;
51
+ break-inside: avoid;
52
+ page-break-inside: avoid;
53
+
54
+ &:last-child {
55
+ margin-bottom: 0;
56
+ }
44
57
  }
58
+
59
+ /* Full width, so both columns fill their half of the grid and line up with the
60
+ header box above -- sized to content they came out ragged and short of it. */
61
+
45
62
  .table {
46
- width: auto;
63
+ width: 100%;
64
+ margin-bottom: 2mm;
65
+ table-layout: auto;
47
66
  border-collapse: collapse;
48
-
67
+
68
+ &:last-child {
69
+ margin-bottom: 0;
70
+ }
49
71
  }
50
72
 
51
73
  .tableBordered td,
52
74
  .tableBordered th {
53
- border: 1px solid black;
54
- padding: 0.3rem;
55
- font-size: small;
75
+ padding: 1mm 1.5mm;
76
+ font-size: 7pt;
77
+ border: 1px solid #000;
56
78
  }
57
79
 
58
80
  .tableBordered th {
59
- font-weight: bold;
60
- }
81
+ font-weight: 600;
82
+ background-color: #f4f4f4;
83
+ }
61
84
 
62
85
  .tableStriped tbody tr:nth-of-type(odd) {
63
86
  background-color: #f9f9f9;
64
87
  }
65
88
 
89
+ /* Sub-heading rows inside a section table */
90
+
66
91
  .greyBackground {
67
- background-color: #ccc;
68
- }
69
- .compiledBy {
70
- width: 10rem
92
+ font-weight: 600;
93
+ background-color: #e0e0e0;
71
94
  }
72
95
 
73
- .buttonContainer {
74
- margin: 1rem;
96
+ .compiledBy {
97
+ width: 10rem;
75
98
  }
76
99
 
77
- .textCenter {
78
- text-align: center;
79
- }
80
- .tableContainer {
81
- margin: 1rem;
82
- }
100
+ /* Spans the same width as the two columns beneath it */
83
101
 
84
102
  .headerContainer {
85
- display: flex;
86
- justify-content: space-between;
87
- align-items: flex-start;
88
- margin-bottom: 10px;
89
- margin: 2rem;
103
+ display: flex;
104
+ align-items: flex-start;
105
+ width: 100%;
106
+ margin: 0 0 4mm;
90
107
  }
91
108
 
92
109
  .mainTitleBox {
93
- border: 2px solid #000;
94
- padding: 10px;
95
- text-align: center;
96
- width: 100%;
97
- }
98
-
99
- .mainTitle {
100
- margin: 0;
101
- }
102
-
103
- .subTitle {
104
- margin: 5px 0;
110
+ width: 100%;
111
+ padding: 3mm;
112
+ text-align: center;
113
+ border: 1px solid #000;
105
114
  }
106
115
 
107
116
  .locationContainer {
108
117
  display: flex;
109
- margin: 1rem;
110
- justify-content: space-evenly;
118
+ flex-wrap: nowrap;
119
+ align-items: baseline;
120
+ justify-content: space-between;
121
+ gap: 3mm;
122
+ margin-top: 3mm;
123
+ font-size: 6.5pt;
124
+ white-space: nowrap;
111
125
  }
112
126
 
113
- .line {
127
+ /* These carry the facility and period once a report is generated, so they need
128
+ to hold text on the rule rather than only draw it. */
129
+
130
+ .line,
131
+ .shortLine {
114
132
  display: inline-block;
115
- width: 150px;
133
+ padding: 0 0.5mm;
134
+ margin-left: 1mm;
135
+ overflow: hidden;
136
+ font-weight: 600;
137
+ text-align: center;
138
+ text-overflow: ellipsis;
139
+ vertical-align: bottom;
116
140
  border-bottom: 1px solid #000;
117
- margin-left: 4px;
141
+ }
142
+
143
+ .line {
144
+ width: 26mm;
118
145
  }
119
146
 
120
147
  .shortLine {
121
- display: inline-block;
122
- width: 90px;
123
- border-bottom: 1px solid #000;
124
- margin-left: 4px;
125
- }
148
+ width: 14mm;
149
+ }
150
+ /* On paper the striping is screen affordance that prints as grey noise */
151
+
152
+ @media print {
153
+ .tableStriped tbody tr:nth-of-type(odd) {
154
+ background-color: transparent;
155
+ }
156
+ }
@@ -1,17 +1,14 @@
1
- import { Button, Loading } from '@carbon/react';
2
- import React, { useEffect, useState } from 'react';
1
+ import React from 'react';
3
2
  import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
4
3
 
5
- import styles from '../moh711.scss';
4
+ import styles from '../../../common/report-register/register-table.scss';
6
5
  import classNames from 'classnames';
7
6
  import { getMoh333PatientList } from '../../../resources/moh-711.resource';
8
7
  import { moh333Columns } from './type';
8
+ import { moh333ExportColumns } from './moh-333.columns';
9
+ import { RegisterLayout, usePatientList } from '../../../common/report-register';
9
10
 
10
11
  const Moh333Register: React.FC = () => {
11
- const navigate = useNavigate();
12
- const [patientlist, setPatientList] = useState<any[]>([]);
13
- const [isLoading, setIsLoading] = useState(false);
14
-
15
12
  const [searchParams] = useSearchParams();
16
13
  const location = useLocation();
17
14
 
@@ -21,44 +18,45 @@ const Moh333Register: React.FC = () => {
21
18
  const indicator = searchParams.get('indicator');
22
19
  const reportName = location.state?.reportName || '';
23
20
 
24
- useEffect(() => {
25
- const fetchData = async () => {
26
- if (!startDate || !endDate || !locationUuids || !indicator || !reportName) return;
27
-
28
- setIsLoading(true);
29
-
30
- try {
31
- const params = {
32
- startDate,
33
- endDate,
34
- locationUuids,
35
- indicator,
36
- reportName,
37
- };
38
-
39
- const data = await getMoh333PatientList(params);
40
-
41
- setPatientList(data?.results.results || []);
42
- } catch (error) {
43
- console.error('Failed to fetch register data', error);
44
- } finally {
45
- setIsLoading(false);
46
- }
47
- };
48
-
49
- fetchData();
50
- }, [startDate, endDate, locationUuids, indicator, reportName]);
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
+ getMoh333PatientList({
33
+ startDate,
34
+ endDate,
35
+ locationUuids,
36
+ indicator,
37
+ reportName,
38
+ startIndex,
39
+ limit,
40
+ }),
41
+ [startDate, endDate, locationUuids, indicator, reportName],
42
+ );
51
43
 
52
- function navigateBack() {
53
- navigate(location.state?.from || '//moh-711');
54
- }
55
44
  return (
56
- <>
45
+ <RegisterLayout
46
+ parentLabel="MOH-711 Report"
47
+ parentPath="/moh-711"
48
+ title="MOH 333 Register"
49
+ isLoading={isLoading}
50
+ isEmpty={patientlist.length === 0}
51
+ page={page}
52
+ pageSize={pageSize}
53
+ total={total}
54
+ isTotalExact={isTotalExact}
55
+ onPageChange={onPageChange}
56
+ fetchAll={fetchAll}
57
+ columns={moh333ExportColumns}
58
+ >
57
59
  {' '}
58
- <div className={styles.buttonContainer}>
59
- <Button onClick={navigateBack}>Back</Button>
60
- </div>
61
- <div>{isLoading && <Loading />}</div>
62
60
  <div className={styles.tableContainer}>
63
61
  <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
64
62
  <thead>
@@ -453,59 +451,59 @@ const Moh333Register: React.FC = () => {
453
451
  </thead>
454
452
  <tbody>
455
453
  <tr>
456
- <td className={styles.textCenter}>(a)</td>
457
- <td className={styles.textCenter}>(b)</td>
458
- <td className={styles.textCenter}>(c)</td>
459
- <td className={styles.textCenter}>(d)</td>
460
- <td className={styles.textCenter}>(e)</td>
461
- <td className={styles.textCenter}>(f)</td>
462
- <td className={styles.textCenter}>(g)</td>
463
- <td className={styles.textCenter}>(h)</td>
464
- <td className={styles.textCenter}>(i)</td>
465
- <td className={styles.textCenter}>(j)</td>
466
- <td className={styles.textCenter}>(k)</td>
467
- <td className={styles.textCenter}>(l)</td>
468
- <td className={styles.textCenter}>(m)</td>
469
- <td className={styles.textCenter}>(n)</td>
470
- <td className={styles.textCenter}>(o)</td>
471
- <td className={styles.textCenter}>(p)</td>
472
- <td className={styles.textCenter}>(q)</td>
473
- <td className={styles.textCenter}>(r)</td>
474
- <td className={styles.textCenter}>(s)</td>
475
- <td className={styles.textCenter}>(t)</td>
476
- <td className={styles.textCenter}>(u)</td>
477
- <td className={styles.textCenter}>(v)</td>
478
- <td className={styles.textCenter}>(w)</td>
479
- <td className={styles.textCenter}>(x)</td>
480
- <td className={styles.textCenter}>(y)</td>
481
- <td className={styles.textCenter}>(z)</td>
482
- <td className={styles.textCenter}>(aa)</td>
483
- <td className={styles.textCenter}>(ab)</td>
484
- <td className={styles.textCenter}>(ac)</td>
485
- <td className={styles.textCenter}>(ad)</td>
486
- <td className={styles.textCenter}>(ae)</td>
487
- <td className={styles.textCenter}>(af)</td>
488
- <td className={styles.textCenter}>(ag)</td>
489
- <td className={styles.textCenter}>(ah)</td>
490
- <td className={styles.textCenter}>(ai)</td>
491
- <td className={styles.textCenter}>(aj)</td>
492
- <td colSpan={3} className={styles.textCenter}>
454
+ <td className={styles.textCentre}>(a)</td>
455
+ <td className={styles.textCentre}>(b)</td>
456
+ <td className={styles.textCentre}>(c)</td>
457
+ <td className={styles.textCentre}>(d)</td>
458
+ <td className={styles.textCentre}>(e)</td>
459
+ <td className={styles.textCentre}>(f)</td>
460
+ <td className={styles.textCentre}>(g)</td>
461
+ <td className={styles.textCentre}>(h)</td>
462
+ <td className={styles.textCentre}>(i)</td>
463
+ <td className={styles.textCentre}>(j)</td>
464
+ <td className={styles.textCentre}>(k)</td>
465
+ <td className={styles.textCentre}>(l)</td>
466
+ <td className={styles.textCentre}>(m)</td>
467
+ <td className={styles.textCentre}>(n)</td>
468
+ <td className={styles.textCentre}>(o)</td>
469
+ <td className={styles.textCentre}>(p)</td>
470
+ <td className={styles.textCentre}>(q)</td>
471
+ <td className={styles.textCentre}>(r)</td>
472
+ <td className={styles.textCentre}>(s)</td>
473
+ <td className={styles.textCentre}>(t)</td>
474
+ <td className={styles.textCentre}>(u)</td>
475
+ <td className={styles.textCentre}>(v)</td>
476
+ <td className={styles.textCentre}>(w)</td>
477
+ <td className={styles.textCentre}>(x)</td>
478
+ <td className={styles.textCentre}>(y)</td>
479
+ <td className={styles.textCentre}>(z)</td>
480
+ <td className={styles.textCentre}>(aa)</td>
481
+ <td className={styles.textCentre}>(ab)</td>
482
+ <td className={styles.textCentre}>(ac)</td>
483
+ <td className={styles.textCentre}>(ad)</td>
484
+ <td className={styles.textCentre}>(ae)</td>
485
+ <td className={styles.textCentre}>(af)</td>
486
+ <td className={styles.textCentre}>(ag)</td>
487
+ <td className={styles.textCentre}>(ah)</td>
488
+ <td className={styles.textCentre}>(ai)</td>
489
+ <td className={styles.textCentre}>(aj)</td>
490
+ <td colSpan={3} className={styles.textCentre}>
493
491
  (ak)
494
492
  </td>
495
- <td className={styles.textCenter}>(al)</td>
496
- <td className={styles.textCenter}>(am)</td>
497
- <td className={styles.textCenter}>(an)</td>
498
- <td className={styles.textCenter}>(ao)</td>
499
- <td className={styles.textCenter}>(ap)</td>
500
- <td className={styles.textCenter}>(aq)</td>
501
- <td className={styles.textCenter}>(ar)</td>
502
- <td className={styles.textCenter}>(as)</td>
503
- <td className={styles.textCenter}>(at)</td>
504
- <td className={styles.textCenter}>(au)</td>
505
- <td className={styles.textCenter}>(av)</td>
506
- <td className={styles.textCenter}>(aw)</td>
507
- <td className={styles.textCenter}>(ax)</td>
508
- <td className={styles.textCenter}>(ay)</td>
493
+ <td className={styles.textCentre}>(al)</td>
494
+ <td className={styles.textCentre}>(am)</td>
495
+ <td className={styles.textCentre}>(an)</td>
496
+ <td className={styles.textCentre}>(ao)</td>
497
+ <td className={styles.textCentre}>(ap)</td>
498
+ <td className={styles.textCentre}>(aq)</td>
499
+ <td className={styles.textCentre}>(ar)</td>
500
+ <td className={styles.textCentre}>(as)</td>
501
+ <td className={styles.textCentre}>(at)</td>
502
+ <td className={styles.textCentre}>(au)</td>
503
+ <td className={styles.textCentre}>(av)</td>
504
+ <td className={styles.textCentre}>(aw)</td>
505
+ <td className={styles.textCentre}>(ax)</td>
506
+ <td className={styles.textCentre}>(ay)</td>
509
507
  </tr>
510
508
  {patientlist?.length > 0 ? (
511
509
  patientlist.map((row, i) => (
@@ -632,7 +630,7 @@ const Moh333Register: React.FC = () => {
632
630
  </tbody>
633
631
  </table>
634
632
  </div>
635
- </>
633
+ </RegisterLayout>
636
634
  );
637
635
  };
638
636
 
@@ -0,0 +1,119 @@
1
+ import { type RegisterColumn } from '../../../common/report-register';
2
+
3
+ /**
4
+ * MOH 333 as the register prints it: one column per cell, in the order they appear.
5
+ *
6
+ * The last 8 columns are rendered by the table but have no headings above
7
+ * them -- the header row is 53 columns wide against 61 of data. They carry
8
+ * their field names rather than headings borrowed from neighbouring columns.
9
+ */
10
+ export const moh333ExportColumns: RegisterColumn[] = [
11
+ { header: 'Date of Admission (dd/mm/yyyy)', value: (row) => row.date_of_admission ?? '' },
12
+ { header: 'AMRSID', value: (row) => row.amrsID ?? '' },
13
+ { header: 'Admission number (yyyy-mm-nnnn) - NUPI', value: (row) => row.admission_number ?? '' },
14
+ { header: 'Full Name (First, Middle, surname)', value: (row) => row.full_names ?? '' },
15
+ { header: 'Date of Birth (dd/mm/yyyy) - Age', value: (row) => row.date_of_birth ?? '' },
16
+ { header: 'County/ Subcounty', value: (row) => row.subcounty_county ?? '' },
17
+ { header: 'Village/ Estate/ Land mark - Phone number', value: (row) => row.village_estate_landmark ?? '' },
18
+ {
19
+ header: 'Marital Status 1 = Married 2 = Widowed 3 = Single 4 = Divorced 5 = Separated',
20
+ value: (row) => row.marital_status ?? '',
21
+ },
22
+ { header: 'Parity (X+Y)', value: (row) => row.parity ?? '' },
23
+ { header: 'Gravidae', value: (row) => row.gravidae ?? '' },
24
+ { header: 'No. of ANC visits', value: (row) => row.no_of_anc_visits ?? '' },
25
+ { header: 'Date of Last Menstrual Period (LMP) (dd/mm/yyyy)', value: (row) => row.lmp ?? '' },
26
+ { header: 'Estimated Date of Delivery (EDD) (dd/mm/yyyy)', value: (row) => row.edd ?? '' },
27
+ { header: 'Diagnosis', value: (row) => row.diagnosis ?? '' },
28
+ { header: 'Delivery - Duration of labour (hours)', value: (row) => row.duration_of_labour ?? '' },
29
+ { header: 'Delivery - Date of Delivery (dd/mm/yyyy)', value: (row) => row.date_of_delivery ?? '' },
30
+ { header: 'Delivery - Time of Delivery', value: (row) => row.time_of_delivery ?? '' },
31
+ { header: 'Delivery - Gestation at Birth (wks)', value: (row) => row.gestation_at_birth ?? '' },
32
+ { header: 'Delivery - Mode of Delivery 1) SVD 2) CS 3) Breech 4) AVD', value: (row) => row.mode_of_delivery ?? '' },
33
+ { header: 'Delivery - No.of babies delivered', value: (row) => row.no_of_babies_delivered ?? '' },
34
+ { header: 'Delivery - Placenta Complete 1=Yes 2=No 3=BBA', value: (row) => row.placenta_complete ?? '' },
35
+ {
36
+ header: 'Delivery - Uterotonic given 1=oxytocin 2=Carbetocin 3=Others Specify 4= None',
37
+ value: (row) => row.uterotonic_given ?? '',
38
+ },
39
+ {
40
+ header: 'Delivery - Vaginal Examination 1= Normal 2=Episiotomy 3=Vaginal tear 4=FGM 5=Vaginal warts',
41
+ value: (row) => row.vaginal_examination ?? '',
42
+ },
43
+ { header: 'Delivery - Blood loss (mls)', value: (row) => row.blood_loss ?? '' },
44
+ {
45
+ header: "Delivery - Mother's status after Delivery (Alive/ Dead)",
46
+ value: (row) => row.mother_status_after_delivery ?? '',
47
+ },
48
+ {
49
+ header: 'Delivery - Maternal deaths Notified (Y/N/NA) - Date Death notified',
50
+ value: (row) => row.maternal_deaths_notified ?? '',
51
+ },
52
+ {
53
+ header:
54
+ 'Delivery - Delivery Complications 1=A.P.H. (Ante Partum Haemorrhage); 2=P.P.H. (Post Partum Haemorrhage); 3= Eclampsia; 4=Ruptured Uterus; 5=Obstructed labour; 6=Sepsis 7= NA',
55
+ value: (row) => row.delivery_complications ?? '',
56
+ },
57
+ { header: 'APGAR Score', value: (row) => row.apgar_score ?? '' },
58
+ { header: 'Birth Outcome (LB/FSB/ MSB)', value: (row) => row.birth_outcome ?? '' },
59
+ { header: 'Birth Weight (grams)', value: (row) => row.birth_weight ?? '' },
60
+ { header: 'Sex (M/F)', value: (row) => row.sex ?? '' },
61
+ {
62
+ header: 'Initiated on BF in &lt; 1hr (Y/N) - Kangaroo Mother Care (Y/N)',
63
+ value: (row) => row.initiated_on_bf_less_one_hour ?? '',
64
+ },
65
+ { header: 'TEO given at birth? (Y/N)', value: (row) => row.teo_given_at_birth ?? '' },
66
+ { header: 'Chlorhexidine applied on cord stump (Y/N)', value: (row) => row.chlorhexdine_applied_on_cord_stump ?? '' },
67
+ {
68
+ header: 'Birth with deformity (Y/N) - 1- congenital syphilis. 2- spina bifida, 3- Hydrocephalus, 4- Talipes',
69
+ value: (row) => row.birth_with_deformity ?? '',
70
+ },
71
+ { header: 'Given Vitamin K (Y/N)', value: (row) => row.given_vitamin_k ?? '' },
72
+ {
73
+ header: 'VDRL/ RPR Results (Specify 1-VDRL 2-RPR 3-Duo testing) - (P/N/ND)',
74
+ value: (row) => row.duo_test_result ?? '',
75
+ },
76
+ {
77
+ header: 'Baby - HIV Test 1 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
78
+ value: (row) => row.hiv_test_1_kit_name ?? '',
79
+ },
80
+ {
81
+ header: 'Baby - HIV Test 2 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
82
+ value: (row) => row.hiv_test_2_kit_name ?? '',
83
+ },
84
+ {
85
+ header: 'Baby - HIV Test 3 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
86
+ value: (row) => row.hiv_test_3_kit_name ?? '',
87
+ },
88
+ {
89
+ header: 'Baby - HIV Result Maternity (N/P/Inc/U/NA) - Initial/Retest/ NA',
90
+ value: (row) => row.hiv_test_results_maternity ?? '',
91
+ },
92
+ { header: 'Maternal HAART - Start at Maternity - (Y/N/NA)', value: (row) => row.maternal_haart ?? '' },
93
+ { header: 'Infant Prophylaxis - (Y/N/NA)', value: (row) => row.infant_prophylaxis ?? '' },
94
+ { header: 'Partner Tested for HIV - (Y/N/NA)', value: (row) => row.partner_tested_for_hiv ?? '' },
95
+ { header: 'Counselled on infant feeding (Y/N/NA)', value: (row) => row.counselled_on_infant_feeding ?? '' },
96
+ { header: 'Delivery Conducted by (Enter Name)', value: (row) => row.deleivery_conducted_by ?? '' },
97
+ { header: 'Birth Notification Number', value: (row) => row.birth_notification_number ?? '' },
98
+ { header: 'Discharge - Date (dd/mm/yyyy)', value: (row) => row.discharge_date ?? '' },
99
+ { header: 'Discharge - Status of Baby A= Alive D= Dead', value: (row) => row.discharge_status_of_baby ?? '' },
100
+ {
101
+ header: 'Referral - From - 1= From Community Unit, 2= From Another Health Facility, 3=Not Applicable',
102
+ value: (row) => row.referrals_from ?? '',
103
+ },
104
+ {
105
+ header:
106
+ 'Referral - To - 1= To Community Unit, 2=Referred to HIV preventive services 3=Another Health Facility, 4=Not Applicable',
107
+ value: (row) => row.referrals_to ?? '',
108
+ },
109
+ { header: 'Referral - Reason for referral', value: (row) => row.reasons_for_refferal ?? '' },
110
+ { header: 'Comments', value: (row) => row.comments ?? '' },
111
+ { header: 'Nupi', value: (row) => row.nupi ?? '' },
112
+ { header: 'Age', value: (row) => row.age ?? '' },
113
+ { header: 'Phone number', value: (row) => row.phone_number ?? '' },
114
+ { header: 'Date maternal death notified', value: (row) => row.date_maternal_death_notified ?? '' },
115
+ { header: 'Kangaroo mother care', value: (row) => row.kangaroo_mother_care ?? '' },
116
+ { header: 'Type of deformity', value: (row) => row.type_of_deformity ?? '' },
117
+ { header: 'Hiv test type', value: (row) => row.hiv_test_type ?? '' },
118
+ { header: 'Hiv test type', value: (row) => row.hiv_test_type ?? '' },
119
+ ];