@ampath/esm-reports-app 1.0.0-next.4 → 1.0.0-next.40

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 (131) hide show
  1. package/dist/110.js +1 -0
  2. package/dist/110.js.map +1 -0
  3. package/dist/{260.js → 205.js} +1 -1
  4. package/dist/{260.js.map → 205.js.map} +1 -1
  5. package/dist/812.js +1 -1
  6. package/dist/812.js.map +1 -1
  7. package/dist/822.js +2 -0
  8. package/dist/822.js.map +1 -0
  9. package/dist/ampath-esm-reports-app.js +1 -1
  10. package/dist/ampath-esm-reports-app.js.buildmanifest.json +95 -74
  11. package/dist/ampath-esm-reports-app.js.map +1 -1
  12. package/dist/main.js +1 -1
  13. package/dist/main.js.map +1 -1
  14. package/dist/routes.json +1 -1
  15. package/package.json +1 -1
  16. package/src/common/report-filters/report-filters.component.tsx +5 -1
  17. package/src/dashboard/reports-dasboard.tsx +21 -0
  18. package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +54 -0
  19. package/src/reports/moh-240/moh-240-header.component.tsx +61 -0
  20. package/src/reports/moh-240/moh-240.component.tsx +93 -0
  21. package/src/reports/moh-240/moh-240.scss +11 -0
  22. package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +75 -0
  23. package/src/reports/moh-240/sub-reports/page-summary.component.tsx +98 -0
  24. package/src/reports/moh-505/moh-505-header.component.tsx +62 -0
  25. package/src/reports/moh-505/moh-505.component.tsx +440 -0
  26. package/src/reports/moh-505/moh-505.scss +3 -0
  27. package/src/reports/moh-705B/moh-204b-register.component.tsx +236 -0
  28. package/src/reports/moh-705B/moh-705b.component.tsx +524 -0
  29. package/src/reports/moh-705B/moh-705b.scss +44 -0
  30. package/src/reports/moh-705a/moh-705a.component.tsx +528 -0
  31. package/src/reports/moh-705a/moh-705a.scss +45 -0
  32. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +321 -0
  33. package/src/reports/moh-705a/type.ts +6 -0
  34. package/src/reports/moh-706/moh-706-header.component.tsx +61 -0
  35. package/src/reports/moh-706/moh-706.component.tsx +117 -0
  36. package/src/reports/moh-706/moh-706.scss +30 -0
  37. package/src/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +124 -0
  38. package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +318 -0
  39. package/src/reports/moh-706/sub-reports/drug-susceptibility-testing/drug-susceptibility-testing.component.tsx +137 -0
  40. package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +179 -0
  41. package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +88 -0
  42. package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +121 -0
  43. package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +47 -0
  44. package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +39 -0
  45. package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +108 -0
  46. package/src/reports/moh-710/moh-710.component.tsx +211 -79
  47. package/src/reports/moh-710/moh-710.scss +5 -1
  48. package/src/reports/moh-710/registers/moh-511-710-register.component.tsx +263 -0
  49. package/src/reports/moh-710/registers/type.ts +31 -0
  50. package/src/reports/moh-711/moh-711.component.tsx +109 -1234
  51. package/src/reports/moh-711/moh711.scss +92 -8
  52. package/src/reports/moh-711/registers/moh-333-register.component.tsx +639 -0
  53. package/src/reports/moh-711/registers/moh-405-register.component.tsx +521 -0
  54. package/src/reports/moh-711/registers/moh-406-register.component.tsx +533 -0
  55. package/src/reports/moh-711/registers/moh-510-register.component.tsx +61 -0
  56. package/src/reports/moh-711/registers/moh-511-register.component.tsx +271 -0
  57. package/src/reports/moh-711/registers/type.ts +192 -0
  58. package/src/reports/moh-711/sections/anc.component.tsx +159 -0
  59. package/src/reports/moh-711/sections/cervical-cancer.component.tsx +148 -0
  60. package/src/reports/moh-711/sections/chanis.component.tsx +367 -0
  61. package/src/reports/moh-711/sections/family-planning.component.tsx +221 -0
  62. package/src/reports/moh-711/sections/gbv.component.tsx +115 -0
  63. package/src/reports/moh-711/sections/maternity.component.tsx +326 -0
  64. package/src/reports/moh-711/sections/medical-social-work.component.tsx +83 -0
  65. package/src/reports/moh-711/sections/other.component.tsx +47 -0
  66. package/src/reports/moh-711/sections/physiotherapy.component.tsx +61 -0
  67. package/src/reports/moh-711/sections/pnc.component.tsx +125 -0
  68. package/src/reports/moh-711/sections/post-abortion.component.tsx +42 -0
  69. package/src/reports/moh-711/sections/rehabilitation.component.tsx +57 -0
  70. package/src/reports/moh-711/sections/report-compiled-by.component.tsx +42 -0
  71. package/src/reports/moh-711/sections/tb-screening.component.tsx +57 -0
  72. package/src/reports/moh-717/moh-717.component.tsx +120 -946
  73. package/src/reports/moh-717/moh717.scss +138 -3
  74. package/src/reports/moh-717/registers/nutrition-register.component.tsx +48 -0
  75. package/src/reports/moh-717/sections/finance.component.tsx +42 -0
  76. package/src/reports/moh-717/sections/inpatient.component.tsx +374 -0
  77. package/src/reports/moh-717/sections/maternity.component.tsx +126 -0
  78. package/src/reports/moh-717/sections/medical-records.component.tsx +35 -0
  79. package/src/reports/moh-717/sections/mortuary.component.tsx +43 -0
  80. package/src/reports/moh-717/sections/operations.component.tsx +53 -0
  81. package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +98 -0
  82. package/src/reports/moh-717/sections/outpatient.component.tsx +597 -0
  83. package/src/reports/moh-717/sections/pharmacy.component.tsx +43 -0
  84. package/src/reports/moh-717/sections/preparedby.component.tsx +47 -0
  85. package/src/reports/moh-717/sections/special-services.component.tsx +114 -0
  86. package/src/reports/moh-731/moh-731.component.tsx +181 -0
  87. package/src/reports/moh-731/moh-731.scss +118 -0
  88. package/src/reports/moh-731/registers/moh-366.component.tsx +478 -0
  89. package/src/reports/moh-731/registers/moh-366.scss +45 -0
  90. package/src/reports/moh-731/registers/prep-register.component.tsx +292 -0
  91. package/src/reports/moh-731/registers/prep-registers.scss +45 -0
  92. package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +932 -0
  93. package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +569 -0
  94. package/src/reports/moh-731/sections/pmtct.component.tsx +451 -0
  95. package/src/reports/moh-740/moh-740.component.scss +120 -0
  96. package/src/reports/moh-740/moh-740.component.tsx +1271 -0
  97. package/src/reports/moh-740/moh-740.resource.ts +42 -0
  98. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.scss +18 -0
  99. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +104 -0
  100. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.scss +18 -0
  101. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +79 -0
  102. package/src/reports/moh-740/registers/moh-740-patient-list.scss +0 -0
  103. package/src/reports/moh-740/registers/moh-740-patient-list.tsx +66 -0
  104. package/src/reports/moh-740/shared/data-cell/data-cell.scss +6 -0
  105. package/src/reports/moh-740/shared/data-cell/data-cell.tsx +23 -0
  106. package/src/reports/moh-740/shared/utils/format-indicator.ts +22 -0
  107. package/src/reports/moh-740/shared/utils/indicator-register-map.ts +157 -0
  108. package/src/reports/moh-740/types/index.ts +216 -0
  109. package/src/reports/moh-745/moh-745.component.tsx +928 -0
  110. package/src/reports/moh-745/moh-745.scss +74 -0
  111. package/src/reports/moh-745/registers/moh-412-register.component.tsx +191 -0
  112. package/src/reports/moh-745/registers/type.ts +30 -0
  113. package/src/reports/table-wrapper/table-row-mapper.component.tsx +53 -0
  114. package/src/reports/table-wrapper/table-wrapper.component.tsx +21 -0
  115. package/src/reports/table-wrapper/table-wrapper.scss +31 -0
  116. package/src/resources/moh-505.resource.ts +86 -0
  117. package/src/resources/moh-705.resource.ts +117 -0
  118. package/src/resources/moh-706.resource.ts +86 -0
  119. package/src/resources/moh-710.resource.ts +28 -0
  120. package/src/resources/moh-711.resource.ts +146 -0
  121. package/src/resources/moh-717.resource.ts +27 -0
  122. package/src/resources/moh-731.resource.ts +96 -0
  123. package/src/resources/moh-745.resource.ts +64 -0
  124. package/src/root.component.tsx +39 -0
  125. package/src/routes.json +3 -1
  126. package/src/utils/utils.ts +36 -0
  127. package/dist/367.js +0 -2
  128. package/dist/367.js.map +0 -1
  129. package/dist/86.js +0 -1
  130. package/dist/86.js.map +0 -1
  131. /package/dist/{367.js.LICENSE.txt → 822.js.LICENSE.txt} +0 -0
@@ -0,0 +1,292 @@
1
+ import React, { useEffect, useState } from 'react';
2
+
3
+ import styles from './prep-registers.scss';
4
+ import { useNavigate, useSearchParams } from 'react-router-dom';
5
+ import { getPrepPatientList } from '../../../resources/moh-731.resource';
6
+ import { Button, Loading } from '@carbon/react';
7
+ import classNames from 'classnames';
8
+ const PrepRegisterComponent: React.FC = () => {
9
+ const navigate = useNavigate();
10
+ const [patientlist, setPatientList] = useState<any[]>([]);
11
+ const [isLoading, setIsLoading] = useState(false);
12
+
13
+ const [searchParams] = useSearchParams();
14
+
15
+ const startDate = searchParams.get('startDate');
16
+ const endDate = searchParams.get('endDate');
17
+ const locationUuids = searchParams.get('locationUuids');
18
+ const indicator = searchParams.get('indicator');
19
+ const gender = searchParams.get('gender');
20
+
21
+ useEffect(() => {
22
+ const fetchData = async () => {
23
+ if (!startDate || !endDate || !locationUuids || !indicator || !gender) return;
24
+
25
+ setIsLoading(true);
26
+
27
+ try {
28
+ const params = {
29
+ startDate,
30
+ endDate,
31
+ locationUuids,
32
+ indicator,
33
+ gender,
34
+ };
35
+
36
+ const data = await getPrepPatientList(params);
37
+
38
+ setPatientList(data?.results.results || []);
39
+ } catch (error) {
40
+ console.error('Failed to fetch register data', error);
41
+ } finally {
42
+ setIsLoading(false);
43
+ }
44
+ };
45
+
46
+ fetchData();
47
+ }, [startDate, endDate, locationUuids, indicator, gender]);
48
+
49
+ function navigateBack() {
50
+ navigate('/moh-731');
51
+ }
52
+
53
+ const transformDate = (date: string): string => {
54
+ if (!date) return '';
55
+
56
+ return new Intl.DateTimeFormat('en-GB', {
57
+ day: '2-digit',
58
+ month: '2-digit',
59
+ year: 'numeric',
60
+ }).format(new Date(date));
61
+ };
62
+ return (
63
+ <>
64
+ <div className={styles.buttonContainer}>
65
+ <Button onClick={navigateBack}>Back</Button>
66
+ </div>
67
+ {isLoading && <Loading />}
68
+ <div className={styles.container}>
69
+ <b>Ministry Of Health</b>
70
+ <b>MOH 267 PrEP Daily Activity Register</b>
71
+ <b>Ver. July 2023</b>
72
+ </div>
73
+ <table className={classNames(styles.table, styles.tableBordered, styles.textCentre)}>
74
+ <thead>
75
+ <tr>
76
+ <th rowSpan={2} colSpan={2}>
77
+ PrEP No
78
+ </th>
79
+ <th rowSpan={2} colSpan={2}>
80
+ Date of Visit
81
+ </th>
82
+ <th rowSpan={2} colSpan={2}>
83
+ AMRSID
84
+ </th>
85
+ <th colSpan={3} style={{ maxWidth: '120px' }}>
86
+ National Identification Number
87
+ </th>
88
+ <th rowSpan={2} colSpan={2}>
89
+ Age
90
+ </th>
91
+ <th rowSpan={2} colSpan={2}>
92
+ Sex <br />
93
+ (M/F)
94
+ </th>
95
+ <th rowSpan={2} colSpan={3}>
96
+ Population type
97
+ <br />
98
+ (Use the codes): <br />
99
+ 1. General Population <br />
100
+ 2. Discordant Couple <br />
101
+ 3. MSM/MSW <br />
102
+ 4. FSW
103
+ <br />
104
+ 5. PWID/PWUD
105
+ <br />
106
+ 6. VP
107
+ </th>
108
+ <th rowSpan={2} colSpan={2}>
109
+ Client PrEP Status: <br />
110
+ N- New <br />
111
+ C- Continuing <br />
112
+ D-Discontinued
113
+ <br />
114
+ R-Restart
115
+ </th>
116
+ <th rowSpan={2} colSpan={3}>
117
+ PrEP Method: <br />
118
+ 1. Daily oral PrEP <br />
119
+ 2. Event driven oral PrEP
120
+ <br />
121
+ 3. Dapivirine Vaginal ring <br />
122
+ 4. Cabotegravir Injectable
123
+ </th>
124
+ <th rowSpan={2} colSpan={2}>
125
+ HIV Results <br />
126
+ (N/P/Ic/NA)
127
+ </th>
128
+ <th rowSpan={2} colSpan={2}>
129
+ Diagnosed with <br />
130
+ STI
131
+ <br />
132
+ (N/Y)
133
+ </th>
134
+ <th rowSpan={2} colSpan={4}>
135
+ Remarks
136
+ </th>
137
+ </tr>
138
+ <tr>
139
+ <th colSpan={3} style={{ maxWidth: '120px' }}>
140
+ National Unique Patient Identifier (NUPI)
141
+ </th>
142
+ </tr>
143
+ <tr>
144
+ <th colSpan={2} className={styles.textCenter}>
145
+ (a)
146
+ </th>
147
+ <th colSpan={2} className={styles.textCenter}>
148
+ (b)
149
+ </th>
150
+ <th colSpan={2} className={styles.textCenter}>
151
+ (l)
152
+ </th>
153
+ <th colSpan={3} className={styles.textCenter}>
154
+ (c)
155
+ </th>
156
+ <th colSpan={2} className={styles.textCenter}>
157
+ (d)
158
+ </th>
159
+ <th colSpan={2} className={styles.textCenter}>
160
+ (e)
161
+ </th>
162
+ <th colSpan={3} className={styles.textCenter}>
163
+ (f)
164
+ </th>
165
+ <th colSpan={2} className={styles.textCenter}>
166
+ (g)
167
+ </th>
168
+ <th colSpan={3} className={styles.textCenter}>
169
+ (h)
170
+ </th>
171
+ <th colSpan={2} className={styles.textCenter}>
172
+ (i)
173
+ </th>
174
+ <th colSpan={2} className={styles.textCenter}>
175
+ (j)
176
+ </th>
177
+ <th colSpan={4} className={styles.textCenter}>
178
+ (k)
179
+ </th>
180
+ </tr>
181
+ </thead>
182
+ <tbody>
183
+ {patientlist?.map((data, i) => (
184
+ <React.Fragment key={data?.PrEP_Number || i}>
185
+ <tr>
186
+ <td colSpan={2} rowSpan={2}>
187
+ {data.PrEP_Number}
188
+ </td>
189
+
190
+ <td colSpan={2} rowSpan={2}>
191
+ {transformDate(data.Date_Of_Visit)}
192
+ </td>
193
+
194
+ <td colSpan={2} rowSpan={2}>
195
+ {data.amrsId}
196
+ </td>
197
+
198
+ <td colSpan={3}>{data.National_ID}</td>
199
+
200
+ <td colSpan={2} rowSpan={2}>
201
+ {data.Age}
202
+ </td>
203
+
204
+ <td colSpan={2} rowSpan={2}>
205
+ {data.Sex}
206
+ </td>
207
+
208
+ <td colSpan={3} rowSpan={2}>
209
+ {data.population_type}
210
+ </td>
211
+
212
+ <td colSpan={2} rowSpan={2}>
213
+ {data.client_prep_status}
214
+ </td>
215
+
216
+ <td colSpan={3} rowSpan={2}>
217
+ {data.prep_method}
218
+ </td>
219
+
220
+ <td colSpan={2} rowSpan={2}>
221
+ {data.HIV_result}
222
+ </td>
223
+
224
+ <td colSpan={2} rowSpan={2}>
225
+ {data.with_STI}
226
+ </td>
227
+
228
+ <td colSpan={4} rowSpan={2} style={{ maxWidth: '200px' }}>
229
+ {data.remarks}
230
+ </td>
231
+ </tr>
232
+
233
+ <tr>
234
+ <td colSpan={3}>{data.NUPI}</td>
235
+ </tr>
236
+ </React.Fragment>
237
+ ))}
238
+
239
+ <tr>
240
+ <td colSpan={7}>
241
+ <b>TOTAL this Page</b>
242
+ </td>
243
+
244
+ <td colSpan={2} className={styles.textCenter}>
245
+ {patientlist.length}
246
+ </td>
247
+
248
+ <td colSpan={2} className={styles.textCenter}></td>
249
+
250
+ <td colSpan={3} className={styles.textCenter}></td>
251
+
252
+ <td colSpan={2} className={styles.textCenter}></td>
253
+
254
+ <td colSpan={3} className={styles.textCenter}></td>
255
+
256
+ <td colSpan={2} className={styles.textCenter}></td>
257
+
258
+ <td colSpan={2} className={styles.textCenter}></td>
259
+
260
+ <td colSpan={4} className={styles.textCenter}></td>
261
+ </tr>
262
+
263
+ <tr>
264
+ <td colSpan={7}>
265
+ <b>TOTAL this Month</b>
266
+ </td>
267
+
268
+ <td colSpan={2} className={styles.textCenter}>
269
+ {patientlist.length}
270
+ </td>
271
+
272
+ <td colSpan={2} className={styles.textCenter}></td>
273
+
274
+ <td colSpan={3} className={styles.textCenter}></td>
275
+
276
+ <td colSpan={2} className={styles.textCenter}></td>
277
+
278
+ <td colSpan={3} className={styles.textCenter}></td>
279
+
280
+ <td colSpan={2} className={styles.textCenter}></td>
281
+
282
+ <td colSpan={2} className={styles.textCenter}></td>
283
+
284
+ <td colSpan={4} className={styles.textCenter}></td>
285
+ </tr>
286
+ </tbody>
287
+ </table>
288
+ </>
289
+ );
290
+ };
291
+
292
+ export default PrepRegisterComponent;
@@ -0,0 +1,45 @@
1
+
2
+ .table {
3
+ border: 2px solid #000;
4
+ margin: 2rem;
5
+ }
6
+
7
+ .tableBordered td,
8
+ .tableBordered th {
9
+ border: 2px solid black;
10
+ padding: 1rem;
11
+ font-size: small;
12
+ }
13
+
14
+ .verticalText {
15
+ writing-mode: vertical-rl;
16
+ transform: rotate(180deg);
17
+ }
18
+
19
+ .center {
20
+ vertical-align: middle;
21
+ font-weight: bold;
22
+ text-align: center;
23
+ }
24
+ .textCentre {
25
+ text-align: center;
26
+ }
27
+
28
+ .container {
29
+ display: flex;
30
+ font-weight: bold;
31
+ justify-content: space-between;
32
+ margin: 2rem;
33
+ }
34
+
35
+ .bold {
36
+ font-weight: bolder;
37
+ }
38
+
39
+ .right {
40
+ text-align: right;
41
+ }
42
+
43
+ .buttonContainer {
44
+ margin: 2rem;
45
+ }