@ampath/esm-reports-app 1.0.0-next.6 → 1.0.0-next.60

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 (229) hide show
  1. package/dist/197.js +1 -1
  2. package/dist/282.js +1 -1
  3. package/dist/282.js.map +1 -1
  4. package/dist/295.css +1 -0
  5. package/dist/295.css.map +1 -0
  6. package/dist/295.js +1 -0
  7. package/dist/295.js.map +1 -0
  8. package/dist/300.js +1 -1
  9. package/dist/311.js +1 -1
  10. package/dist/311.js.map +1 -1
  11. package/dist/335.js +1 -1
  12. package/dist/353.js +1 -1
  13. package/dist/353.js.map +1 -1
  14. package/dist/410.js +1 -0
  15. package/dist/410.js.map +1 -0
  16. package/dist/478.js +1 -1
  17. package/dist/478.js.map +1 -1
  18. package/dist/540.js +1 -1
  19. package/dist/540.js.map +1 -1
  20. package/dist/55.js +1 -1
  21. package/dist/580.js +1 -0
  22. package/dist/580.js.map +1 -0
  23. package/dist/652.js +1 -1
  24. package/dist/876.css +1 -0
  25. package/dist/876.css.map +1 -0
  26. package/dist/876.js +1 -0
  27. package/dist/876.js.map +1 -0
  28. package/dist/907.js +2 -0
  29. package/dist/907.js.LICENSE.txt +35 -0
  30. package/dist/907.js.map +1 -0
  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/daily-summary-table.tsx +55 -0
  39. package/src/common/linelist-table/index.ts +3 -0
  40. package/src/common/linelist-table/linelist-columns.ts +48 -0
  41. package/src/common/linelist-table/linelist-table.component.tsx +442 -0
  42. package/src/common/linelist-table/linelist-table.scss +306 -0
  43. package/src/common/linelist-table/linelist-table.test.tsx +120 -0
  44. package/src/common/linelist-table/use-all-rows.ts +93 -0
  45. package/src/common/linelist-table/use-column-layout.ts +123 -0
  46. package/src/common/report-error/index.ts +1 -0
  47. package/src/common/report-error/show-report-error.ts +25 -0
  48. package/src/common/report-filters/date-range.ts +137 -0
  49. package/src/common/report-filters/index.ts +4 -0
  50. package/src/common/report-filters/report-filters.component.tsx +297 -100
  51. package/src/common/report-filters/report-filters.scss +255 -32
  52. package/src/common/report-filters/types.ts +66 -0
  53. package/src/common/report-filters/use-restore-period.ts +43 -0
  54. package/src/common/report-header/index.ts +1 -0
  55. package/src/common/report-header/use-location-details.ts +58 -0
  56. package/src/common/report-page/index.ts +2 -0
  57. package/src/common/report-page/report-page.component.tsx +32 -0
  58. package/src/common/report-page/report-page.scss +45 -0
  59. package/src/common/report-page/use-page-scale.ts +60 -0
  60. package/src/common/report-placeholder/has-report-data.ts +15 -0
  61. package/src/common/report-placeholder/index.ts +3 -0
  62. package/src/common/report-placeholder/report-placeholder.component.tsx +81 -0
  63. package/src/common/report-placeholder/report-placeholder.scss +48 -0
  64. package/src/common/report-placeholder/use-generated-location.ts +62 -0
  65. package/src/common/report-register/index.ts +6 -0
  66. package/src/common/report-register/register-columns.ts +46 -0
  67. package/src/common/report-register/register-layout.component.tsx +265 -0
  68. package/src/common/report-register/register-layout.scss +150 -0
  69. package/src/common/report-register/register-table.scss +71 -0
  70. package/src/common/report-register/report-parents.ts +27 -0
  71. package/src/common/report-register/rows-to-csv.ts +89 -0
  72. package/src/common/report-register/use-location-name.ts +54 -0
  73. package/src/common/report-register/use-patient-list.ts +92 -0
  74. package/src/common/report-skeleton/index.ts +1 -0
  75. package/src/common/report-skeleton/report-skeleton.component.tsx +46 -0
  76. package/src/common/report-skeleton/report-skeleton.scss +29 -0
  77. package/src/config-schema.ts +9 -1
  78. package/src/dashboard/report-catalog.ts +173 -0
  79. package/src/dashboard/reports-dasboard.tsx +101 -17
  80. package/src/dashboard/reports-dashboard.module.scss +269 -11
  81. package/src/index.ts +13 -1
  82. package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +69 -0
  83. package/src/reports/moh-240/moh-240-header.component.tsx +62 -0
  84. package/src/reports/moh-240/moh-240.columns.ts +113 -0
  85. package/src/reports/moh-240/moh-240.component.tsx +75 -0
  86. package/src/reports/moh-240/moh-240.scss +40 -0
  87. package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +36 -0
  88. package/src/reports/moh-240/sub-reports/page-summary.component.tsx +148 -0
  89. package/src/reports/moh-505/moh-505-header.component.tsx +67 -0
  90. package/src/reports/moh-505/moh-505.component.tsx +441 -0
  91. package/src/reports/moh-505/moh-505.scss +117 -0
  92. package/src/reports/moh-705B/moh-204b-register.component.tsx +244 -0
  93. package/src/reports/moh-705B/moh-204b.columns.ts +39 -0
  94. package/src/reports/moh-705B/moh-705b.component.tsx +658 -0
  95. package/src/reports/moh-705B/moh-705b.scss +172 -0
  96. package/src/reports/moh-705a/moh-705a.component.tsx +660 -0
  97. package/src/reports/moh-705a/moh-705a.scss +172 -0
  98. package/src/reports/moh-705a/registers/moh-204a-register.component.tsx +329 -0
  99. package/src/reports/moh-705a/registers/moh-204a.columns.ts +57 -0
  100. package/src/reports/moh-705a/type.ts +6 -0
  101. package/src/reports/moh-706/moh-706-header.component.tsx +66 -0
  102. package/src/reports/moh-706/moh-706.component.tsx +150 -24
  103. package/src/reports/moh-706/moh-706.scss +119 -11
  104. package/src/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +36 -44
  105. package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +232 -318
  106. package/src/reports/moh-706/sub-reports/drug-susceptibility-testing/drug-susceptibility-testing.component.tsx +32 -47
  107. package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +44 -52
  108. package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +25 -40
  109. package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +31 -39
  110. package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +26 -34
  111. package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +10 -25
  112. package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +42 -50
  113. package/src/reports/moh-710/moh-710.component.tsx +799 -632
  114. package/src/reports/moh-710/moh-710.scss +142 -21
  115. package/src/reports/moh-710/registers/moh-510/moh-510.columns.ts +40 -0
  116. package/src/reports/moh-710/registers/moh-510/moh-510.component.tsx +144 -0
  117. package/src/reports/moh-710/registers/moh-510/moh-510.scss +130 -0
  118. package/src/reports/moh-710/registers/moh-511-710-register.component.tsx +268 -0
  119. package/src/reports/moh-710/registers/moh-511-710.columns.ts +52 -0
  120. package/src/reports/moh-710/registers/type.ts +31 -0
  121. package/src/reports/moh-711/moh-711.component.tsx +138 -1269
  122. package/src/reports/moh-711/moh711.scss +135 -20
  123. package/src/reports/moh-711/registers/moh-333-register.component.tsx +637 -0
  124. package/src/reports/moh-711/registers/moh-333.columns.ts +119 -0
  125. package/src/reports/moh-711/registers/moh-405-register.component.tsx +520 -0
  126. package/src/reports/moh-711/registers/moh-405.columns.ts +120 -0
  127. package/src/reports/moh-711/registers/moh-406-register.component.tsx +530 -0
  128. package/src/reports/moh-711/registers/moh-406.columns.ts +133 -0
  129. package/src/reports/moh-711/registers/moh-510-register.component.tsx +55 -0
  130. package/src/reports/moh-711/registers/moh-511-register.component.tsx +270 -0
  131. package/src/reports/moh-711/registers/moh-511.columns.ts +59 -0
  132. package/src/reports/moh-711/registers/type.ts +192 -0
  133. package/src/reports/moh-711/sections/anc.component.tsx +159 -0
  134. package/src/reports/moh-711/sections/cervical-cancer.component.tsx +148 -0
  135. package/src/reports/moh-711/sections/chanis.component.tsx +366 -0
  136. package/src/reports/moh-711/sections/family-planning.component.tsx +221 -0
  137. package/src/reports/moh-711/sections/gbv.component.tsx +115 -0
  138. package/src/reports/moh-711/sections/maternity.component.tsx +321 -0
  139. package/src/reports/moh-711/sections/medical-social-work.component.tsx +73 -0
  140. package/src/reports/moh-711/sections/other.component.tsx +47 -0
  141. package/src/reports/moh-711/sections/physiotherapy.component.tsx +61 -0
  142. package/src/reports/moh-711/sections/pnc.component.tsx +127 -0
  143. package/src/reports/moh-711/sections/post-abortion.component.tsx +42 -0
  144. package/src/reports/moh-711/sections/rehabilitation.component.tsx +57 -0
  145. package/src/reports/moh-711/sections/report-compiled-by.component.tsx +50 -0
  146. package/src/reports/moh-711/sections/tb-screening.component.tsx +57 -0
  147. package/src/reports/moh-717/moh-717.component.tsx +149 -985
  148. package/src/reports/moh-717/moh717.scss +217 -21
  149. package/src/reports/moh-717/registers/nutrition-register.component.tsx +48 -0
  150. package/src/reports/moh-717/sections/finance.component.tsx +42 -0
  151. package/src/reports/moh-717/sections/inpatient.component.tsx +374 -0
  152. package/src/reports/moh-717/sections/maternity.component.tsx +126 -0
  153. package/src/reports/moh-717/sections/medical-records.component.tsx +35 -0
  154. package/src/reports/moh-717/sections/mortuary.component.tsx +43 -0
  155. package/src/reports/moh-717/sections/operations.component.tsx +53 -0
  156. package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +98 -0
  157. package/src/reports/moh-717/sections/outpatient.component.tsx +597 -0
  158. package/src/reports/moh-717/sections/pharmacy.component.tsx +43 -0
  159. package/src/reports/moh-717/sections/preparedby.component.tsx +52 -0
  160. package/src/reports/moh-717/sections/special-services.component.tsx +114 -0
  161. package/src/reports/moh-731/linelist/moh-731-indicators.ts +1040 -0
  162. package/src/reports/moh-731/linelist/moh-731-linelist-sections.ts +423 -0
  163. package/src/reports/moh-731/linelist/moh-731-linelist.component.tsx +102 -0
  164. package/src/reports/moh-731/linelist/use-open-moh-731-linelist.ts +50 -0
  165. package/src/reports/moh-731/moh-731.component.tsx +251 -0
  166. package/src/reports/moh-731/moh-731.scss +493 -0
  167. package/src/reports/moh-731/registers/moh-366.columns.ts +38 -0
  168. package/src/reports/moh-731/registers/moh-366.component.tsx +471 -0
  169. package/src/reports/moh-731/registers/prep-register.component.tsx +284 -0
  170. package/src/reports/moh-731/registers/prep.columns.ts +34 -0
  171. package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +1209 -0
  172. package/src/reports/moh-731/sections/hiv-testing-and-pre-exposure.component.tsx +727 -0
  173. package/src/reports/moh-731/sections/pmtct.component.tsx +572 -0
  174. package/src/reports/moh-731/summary/moh-731-summary.component.tsx +313 -0
  175. package/src/reports/moh-731/summary/moh-731-summary.config.ts +520 -0
  176. package/src/reports/moh-731/summary/moh-731-summary.scss +242 -0
  177. package/src/reports/moh-740/moh-740.component.scss +202 -0
  178. package/src/reports/moh-740/moh-740.component.tsx +1312 -0
  179. package/src/reports/moh-740/moh-740.resource.ts +49 -0
  180. package/src/reports/moh-740/registers/moh-222-daily-register/moh-222-daily-register.tsx +89 -0
  181. package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +61 -0
  182. package/src/reports/moh-740/registers/moh-740-patient-list.scss +0 -0
  183. package/src/reports/moh-740/registers/moh-740-patient-list.tsx +95 -0
  184. package/src/reports/moh-740/registers/moh-740.columns.ts +52 -0
  185. package/src/reports/moh-740/shared/data-cell/data-cell.scss +6 -0
  186. package/src/reports/moh-740/shared/data-cell/data-cell.tsx +23 -0
  187. package/src/reports/moh-740/shared/utils/indicator-register-map.ts +157 -0
  188. package/src/reports/moh-740/types/index.ts +220 -0
  189. package/src/reports/moh-745/moh-745.component.tsx +1021 -0
  190. package/src/reports/moh-745/moh-745.scss +132 -0
  191. package/src/reports/moh-745/registers/moh-412-register.component.tsx +199 -0
  192. package/src/reports/moh-745/registers/moh-412.columns.ts +52 -0
  193. package/src/reports/moh-745/registers/type.ts +181 -0
  194. package/src/reports/table-wrapper/table-row-mapper.component.tsx +53 -0
  195. package/src/reports/table-wrapper/table-wrapper.component.tsx +30 -0
  196. package/src/reports/{moh-706/table-wrapper → table-wrapper}/table-wrapper.scss +1 -16
  197. package/src/resources/moh-505.resource.ts +69 -0
  198. package/src/resources/moh-705.resource.ts +106 -0
  199. package/src/resources/moh-706.resource.ts +80 -0
  200. package/src/resources/moh-710.resource.ts +32 -9
  201. package/src/resources/moh-711.resource.ts +137 -9
  202. package/src/resources/moh-717.resource.ts +26 -9
  203. package/src/resources/moh-731.resource.ts +90 -0
  204. package/src/resources/moh-745.resource.ts +76 -0
  205. package/src/resources/patient-list-page.ts +65 -0
  206. package/src/root.component.tsx +50 -7
  207. package/src/root.scss +36 -0
  208. package/src/routes.json +3 -1
  209. package/src/utils/format-indicator.ts +22 -0
  210. package/src/utils/get-base-url.ts +39 -7
  211. package/src/utils/utils.ts +36 -0
  212. package/tsconfig.json +1 -1
  213. package/webpack.config.js +22 -1
  214. package/dist/184.js +0 -2
  215. package/dist/184.js.LICENSE.txt +0 -14
  216. package/dist/184.js.map +0 -1
  217. package/dist/260.js +0 -1
  218. package/dist/260.js.map +0 -1
  219. package/dist/402.js +0 -1
  220. package/dist/402.js.map +0 -1
  221. package/dist/812.js +0 -1
  222. package/dist/812.js.map +0 -1
  223. package/dist/959.js +0 -2
  224. package/dist/959.js.LICENSE.txt +0 -20
  225. package/dist/959.js.map +0 -1
  226. package/dist/ampath-esm-reports-app.js.buildmanifest.json +0 -539
  227. package/dist/main.js +0 -1
  228. package/dist/main.js.map +0 -1
  229. package/src/reports/moh-706/table-wrapper/table-wrapper.component.tsx +0 -21
@@ -0,0 +1,658 @@
1
+ import React, { useState } from 'react';
2
+ import styles from './moh-705b.scss';
3
+ import { formatDate, useSession } from '@openmrs/esm-framework';
4
+ import dayjs from 'dayjs';
5
+ import { getMoh705b } from '../../resources/moh-705.resource';
6
+ import classNames from 'classnames';
7
+ import { ReportFiltersComponent, type ReportPeriod, useRestorePeriod } from '../../common/report-filters';
8
+ import { showReportError } from '../../common/report-error';
9
+ import { hasReportData, ReportPlaceholder, useGeneratedLocation } from '../../common/report-placeholder';
10
+ import { useNavigate } from 'react-router-dom';
11
+ import { ReportSkeleton } from '../../common/report-skeleton';
12
+ import { ReportPage } from '../../common/report-page';
13
+ import { renderDailyReportRows, reportDays } from '../../common/daily-summary-table';
14
+
15
+ const indicators = [
16
+ 'diarrhoea',
17
+ 'tuberculosis',
18
+ 'dysentry',
19
+ 'cholera',
20
+ 'meningococcal_meningitis',
21
+ 'other_meningitis',
22
+ 'tetanus',
23
+ 'poliomyelitis',
24
+ 'chicken_pox',
25
+ 'measles',
26
+ 'hepatitis',
27
+ 'mumps',
28
+ 'suspected_malaria',
29
+ 'confirmed_malaria',
30
+ 'malaria_in_pregnancy',
31
+ 'amoebiasis',
32
+ 'typhoid_fever',
33
+ 'sexually_transmitted_infections',
34
+ 'urinary_tract_infections',
35
+ 'bilharzia',
36
+ 'intestinal_worms',
37
+ 'malnutrition',
38
+ 'anaemia',
39
+ 'eye_infections',
40
+ 'ear_infections',
41
+ 'upper_respiratory_tract_infections',
42
+ 'asthma',
43
+ 'pneumonia',
44
+ 'other_lower_respiratory_tract_infections',
45
+ 'abortion',
46
+ 'puerperium_childbirth',
47
+ 'hypertention',
48
+ 'mental_disorders',
49
+ 'dental_disorders',
50
+ 'jiggers_infestation',
51
+ 'diseases_of_the_skin',
52
+ 'athritis',
53
+ 'poisoning',
54
+ 'road_traffic_injuries',
55
+ 'deaths_due_to_road_traffic_injuries',
56
+ 'other_injuries',
57
+ 'sexual_violence',
58
+ 'violence_related_injuries',
59
+ 'burns',
60
+ 'snake_bites',
61
+ 'dog_bites',
62
+ 'other_bites',
63
+ 'diabetes',
64
+ 'epilepsy',
65
+ 'brucellosis',
66
+ 'cardiovascular_conditions',
67
+ 'central_nervous_system_conditions',
68
+ 'overweight',
69
+ 'mascular_skeletal_conditions',
70
+ 'fistula',
71
+ 'suspected_neoplams_cancers',
72
+ 'physical_disability',
73
+ 'trypanosomiasis',
74
+ 'rift_valley_fever',
75
+ 'yellow_fever',
76
+ 'viral_haemorrhagic_fever',
77
+ 'chikungunya',
78
+ 'dengue_fever',
79
+ 'leishmaniasis',
80
+ 'cutaneous_leishmaniasis',
81
+ 'suspected_anthrax',
82
+ 'all_other_diseases',
83
+ 'tested_for_malaria',
84
+ 'no_of_first_attendances',
85
+ 're_attendances',
86
+ 'referrals_from_other_health_facility',
87
+ 'referrals_to_other_health_facility',
88
+ 'referrals_from_community_unit',
89
+ 'referrals_to_community_unit',
90
+ ];
91
+
92
+ const Moh705BComponent: React.FC = () => {
93
+ const [moh705bData, setMoh705bData] = useState<any>([]);
94
+ /* Only a report for the current location counts: after switching location the
95
+ old figures would otherwise be shown, and labelled, as the new location's. */
96
+ const { isForCurrentLocation, hasLocationChanged, markGenerated } = useGeneratedLocation();
97
+ const isReportGenerated = hasReportData(moh705bData) && isForCurrentLocation;
98
+ const [isLoading, setIsLoading] = useState<boolean>(false);
99
+ const [startDate, setStartDate] = useState<string>('');
100
+ const [endDate, setEndDate] = useState<string>('');
101
+
102
+ const session = useSession();
103
+ const locationUuids = session?.sessionLocation?.uuid;
104
+ const navigate = useNavigate();
105
+
106
+ /* Masthead and sign-off fill themselves in, as on the other reports */
107
+ const facility = session?.sessionLocation?.display ?? '';
108
+ const reportMonth = startDate ? dayjs(startDate).format('MMMM') : '';
109
+ const reportYear = startDate ? dayjs(startDate).format('YYYY') : '';
110
+ const compiledBy = session?.user?.person?.display ?? session?.user?.display ?? '';
111
+ const compiledOn = formatDate(new Date(), { mode: 'standard', time: false, noToday: true });
112
+
113
+ const fetchMoh705bReportData = async ({ startDate, endDate }: ReportPeriod) => {
114
+ setIsLoading(true);
115
+ setStartDate(startDate);
116
+ setEndDate(endDate);
117
+
118
+ const params = {
119
+ locationUuids: locationUuids || '',
120
+ startDate,
121
+ endDate,
122
+ };
123
+ try {
124
+ const data = await getMoh705b(params);
125
+ setMoh705bData(data.result ?? []);
126
+ setIsLoading(false);
127
+ } catch (error) {
128
+ setIsLoading(false);
129
+ showReportError('the MOH-705B report', error);
130
+ }
131
+ };
132
+
133
+ /* A register's breadcrumb links back here with the period it was opened
134
+ for, so the report comes back showing the figures rather than the
135
+ placeholder. */
136
+ useRestorePeriod(fetchMoh705bReportData);
137
+
138
+ const navigateToRegister = (indicator: string, day?: number) => {
139
+ const selectedDate = day ? dayjs(startDate).startOf('month').date(day) : undefined;
140
+ if (selectedDate && day && day > dayjs(startDate).daysInMonth()) {
141
+ return;
142
+ }
143
+ const registerStartDate = selectedDate?.format('YYYY-MM-DD') ?? startDate;
144
+ const registerEndDate = selectedDate?.format('YYYY-MM-DD') ?? endDate;
145
+
146
+ navigate(
147
+ `/moh-204b?startDate=${registerStartDate}&endDate=${registerEndDate}&locationUuids=${locationUuids}&indicator=${indicator}&from=moh-705b`,
148
+ );
149
+ };
150
+
151
+ return (
152
+ <>
153
+ <ReportFiltersComponent
154
+ reportName="MOH-705B Report"
155
+ mode="both"
156
+ onGenerate={fetchMoh705bReportData}
157
+ isLoading={isLoading}
158
+ isReportGenerated={isReportGenerated}
159
+ generatedPeriod={{ startDate, endDate }}
160
+ />
161
+ {isLoading && <ReportSkeleton />}
162
+ {!isLoading && !isReportGenerated && (
163
+ <ReportPlaceholder reportName="MOH-705B" isLocationChanged={hasReportData(moh705bData) && hasLocationChanged} />
164
+ )}
165
+ {!isLoading && isReportGenerated && (
166
+ <ReportPage>
167
+ <div className={styles.mainTitleBox}>
168
+ <p className={styles.ministry}>Ministry of Health</p>
169
+ <h3 className={styles.reportTitle}>KHIS Aggregate</h3>
170
+ </div>
171
+
172
+ <p className={styles.location}>
173
+ <span>
174
+ Facility Name:<span className={styles.line}>{facility}</span>
175
+ </span>
176
+ <span>
177
+ County:
178
+ <span className={styles.line} />
179
+ </span>
180
+ <span>
181
+ Sub County:
182
+ <span className={styles.line} />
183
+ </span>
184
+ <span>
185
+ Month:<span className={styles.shortLine}>{reportMonth}</span>
186
+ </span>
187
+ <span>
188
+ Year:<span className={styles.shortLine}>{reportYear}</span>
189
+ </span>
190
+ </p>
191
+
192
+ <div className={styles.container}>
193
+ <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
194
+ <colgroup>
195
+ <col className={styles.numberColumn} />
196
+ <col className={styles.diseaseColumn} />
197
+ {reportDays.map((day) => (
198
+ <col className={styles.dayColumn} key={day} />
199
+ ))}
200
+ <col className={styles.totalColumn} />
201
+ </colgroup>
202
+ <thead>
203
+ <tr>
204
+ <th colSpan={2}>DISEASES (New Cases Only)</th>
205
+ {reportDays.map((day) => (
206
+ <th key={day}>{day}</th>
207
+ ))}
208
+ <th>Totals</th>
209
+ </tr>
210
+ </thead>
211
+ <tbody>
212
+ {renderDailyReportRows(
213
+ <>
214
+ <tr>
215
+ <td>1</td>
216
+ <td>Diarrhoea</td>
217
+ <td onClick={() => navigateToRegister('diarrhoea')}>{moh705bData.diarrhoea}</td>
218
+ </tr>
219
+ <tr>
220
+ <td>2</td>
221
+ <td>Tuberculosis</td>
222
+ <td onClick={() => navigateToRegister('tuberculosis')}>{moh705bData.tuberculosis}</td>
223
+ </tr>
224
+ <tr>
225
+ <td>3</td>
226
+ <td>Dysentry (Bloody diarrhoea)</td>
227
+ <td onClick={() => navigateToRegister('dysentry')}>{moh705bData.dysentry}</td>
228
+ </tr>
229
+ <tr>
230
+ <td>4</td>
231
+ <td>Cholera</td>
232
+ <td onClick={() => navigateToRegister('cholera')}>{moh705bData.cholera}</td>
233
+ </tr>
234
+ <tr>
235
+ <td>5</td>
236
+ <td>Meningococcal Meningitis</td>
237
+ <td onClick={() => navigateToRegister('meningococcal_meningitis')}>
238
+ {moh705bData.meningococcal_meningitis}
239
+ </td>
240
+ </tr>
241
+ <tr>
242
+ <td>6</td>
243
+ <td>Other Meningitis</td>
244
+ <td onClick={() => navigateToRegister('other_meningitis')}>{moh705bData.other_meningitis}</td>
245
+ </tr>
246
+ <tr>
247
+ <td>7</td>
248
+ <td>Tetanus</td>
249
+ <td onClick={() => navigateToRegister('tetanus')}>{moh705bData.tetanus}</td>
250
+ </tr>
251
+ <tr>
252
+ <td>8</td>
253
+ <td>Poliomyelitis (AFP)</td>
254
+ <td onClick={() => navigateToRegister('poliomyelitis')}>{moh705bData.poliomyelitis}</td>
255
+ </tr>
256
+ <tr>
257
+ <td>9</td>
258
+ <td>Chicken Pox</td>
259
+ <td onClick={() => navigateToRegister('chicken_pox')}>{moh705bData.chicken_pox}</td>
260
+ </tr>
261
+ <tr>
262
+ <td>10</td>
263
+ <td>Measles</td>
264
+ <td onClick={() => navigateToRegister('measles')}>{moh705bData.measles}</td>
265
+ </tr>
266
+ <tr>
267
+ <td>11</td>
268
+ <td>Hepatitis</td>
269
+ <td onClick={() => navigateToRegister('hepatitis')}>{moh705bData.hepatitis}</td>
270
+ </tr>
271
+ <tr>
272
+ <td>12</td>
273
+ <td>Mumps</td>
274
+ <td onClick={() => navigateToRegister('mumps')}>{moh705bData.mumps}</td>
275
+ </tr>
276
+ <tr>
277
+ <td>13</td>
278
+ <td>Suspected Malaria</td>
279
+ <td onClick={() => navigateToRegister('suspected_malaria')}>{moh705bData.suspected_malaria}</td>
280
+ </tr>
281
+ <tr>
282
+ <td>14</td>
283
+ <td>Confirmed Malaria</td>
284
+ <td onClick={() => navigateToRegister('confirmed_malaria')}>{moh705bData.confirmed_malaria}</td>
285
+ </tr>
286
+ <tr>
287
+ <td>15</td>
288
+ <td>Malaria in Pregnancy</td>
289
+ <td onClick={() => navigateToRegister('malaria_in_pregnancy')}>
290
+ {moh705bData.malaria_in_pregnancy}
291
+ </td>
292
+ </tr>
293
+ <tr>
294
+ <td>16</td>
295
+ <td>Amoebiasis</td>
296
+ <td onClick={() => navigateToRegister('amoebiasis')}>{moh705bData.amoebiasis}</td>
297
+ </tr>
298
+ <tr>
299
+ <td>17</td>
300
+ <td>Typhoid fever</td>
301
+ <td onClick={() => navigateToRegister('typhoid_fever')}>{moh705bData.typhoid_fever}</td>
302
+ </tr>
303
+ <tr>
304
+ <td>18</td>
305
+ <td>Sexually Transmitted Infections</td>
306
+ <td onClick={() => navigateToRegister('sexually_transmitted_infections')}>
307
+ {moh705bData.sexually_transmitted_infections}
308
+ </td>
309
+ </tr>
310
+ <tr>
311
+ <td>19</td>
312
+ <td>Urinary Tract Infections</td>
313
+ <td onClick={() => navigateToRegister('urinary_tract_infections')}>
314
+ {moh705bData.urinary_tract_infections}
315
+ </td>
316
+ </tr>
317
+ <tr>
318
+ <td>20</td>
319
+ <td>Bilharzia (Schistosomiasis)</td>
320
+ <td onClick={() => navigateToRegister('bilharzia')}>{moh705bData.bilharzia}</td>
321
+ </tr>
322
+ <tr>
323
+ <td>21</td>
324
+ <td>Intestinal worms</td>
325
+ <td onClick={() => navigateToRegister('intestinal_worms')}>{moh705bData.intestinal_worms}</td>
326
+ </tr>
327
+ <tr>
328
+ <td>22</td>
329
+ <td>Malnutrition</td>
330
+ <td onClick={() => navigateToRegister('malnutrition')}>{moh705bData.malnutrition}</td>
331
+ </tr>
332
+ <tr>
333
+ <td>23</td>
334
+ <td>Anaemia</td>
335
+ <td onClick={() => navigateToRegister('anaemia')}>{moh705bData.anaemia}</td>
336
+ </tr>
337
+ <tr>
338
+ <td>24</td>
339
+ <td>Eye Infections/Conditions</td>
340
+ <td onClick={() => navigateToRegister('eye_infections')}>{moh705bData.eye_infections}</td>
341
+ </tr>
342
+ <tr>
343
+ <td>25</td>
344
+ <td>Ear Infections/Conditions</td>
345
+ <td onClick={() => navigateToRegister('ear_infections')}>{moh705bData.ear_infections}</td>
346
+ </tr>
347
+ <tr>
348
+ <td>26</td>
349
+ <td>Upper Respiratory Tract Infections </td>
350
+ <td onClick={() => navigateToRegister('upper_respiratory_tract_infections')}>
351
+ {moh705bData.upper_respiratory_tract_infections}
352
+ </td>
353
+ </tr>
354
+ <tr>
355
+ <td>27</td>
356
+ <td>Asthma</td>
357
+ <td onClick={() => navigateToRegister('asthma')}>{moh705bData.asthma}</td>
358
+ </tr>
359
+ <tr>
360
+ <td>28</td>
361
+ <td>Pneumonia</td>
362
+ <td onClick={() => navigateToRegister('pneumonia')}>{moh705bData.pneumonia}</td>
363
+ </tr>
364
+ <tr>
365
+ <td>29</td>
366
+ <td>Other Lower Respiratory tract infections</td>
367
+ <td onClick={() => navigateToRegister('other_lower_respiratory_tract_infections')}>
368
+ {moh705bData.other_lower_respiratory_tract_infections}
369
+ </td>
370
+ </tr>
371
+ <tr>
372
+ <td>30</td>
373
+ <td>Abortion</td>
374
+ <td onClick={() => navigateToRegister('abortion')}>{moh705bData.abortion}</td>
375
+ </tr>
376
+ <tr>
377
+ <td>31</td>
378
+ <td>Dis. of Puerperium & Childbirth</td>
379
+ <td onClick={() => navigateToRegister('puerperium_childbirth')}>
380
+ {moh705bData.puerperium_childbirth}
381
+ </td>
382
+ </tr>
383
+ <tr>
384
+ <td>32</td>
385
+ <td>Hypertension</td>
386
+ <td onClick={() => navigateToRegister('hypertention')}>{moh705bData.hypertention}</td>
387
+ </tr>
388
+ <tr>
389
+ <td>33</td>
390
+ <td>Mental Disorders</td>
391
+ <td onClick={() => navigateToRegister('mental_disorders')}>{moh705bData.mental_disorders}</td>
392
+ </tr>
393
+ <tr>
394
+ <td>34</td>
395
+ <td>Dental Disorders</td>
396
+ <td onClick={() => navigateToRegister('dental_disorders')}>{moh705bData.dental_disorders}</td>
397
+ </tr>
398
+ <tr>
399
+ <td>35</td>
400
+ <td>Jiggers Infestation</td>
401
+ <td onClick={() => navigateToRegister('jiggers_infestation')}>
402
+ {moh705bData.jiggers_infestation}
403
+ </td>
404
+ </tr>
405
+ <tr>
406
+ <td>36</td>
407
+ <td>Disease of the skin</td>
408
+ <td onClick={() => navigateToRegister('diseases_of_the_skin')}>
409
+ {moh705bData.diseases_of_the_skin}
410
+ </td>
411
+ </tr>
412
+ <tr>
413
+ <td>37</td>
414
+ <td>Athritis, Joint pains etc.</td>
415
+ <td onClick={() => navigateToRegister('athritis')}>{moh705bData.athritis}</td>
416
+ </tr>
417
+ <tr>
418
+ <td>38</td>
419
+ <td>Poisoning</td>
420
+ <td onClick={() => navigateToRegister('poisoning')}>{moh705bData.poisoning}</td>
421
+ </tr>
422
+ <tr>
423
+ <td>39</td>
424
+ <td>Road Traffic Injuries</td>
425
+ <td onClick={() => navigateToRegister('road_traffic_injuries')}>
426
+ {moh705bData.road_traffic_injuries}
427
+ </td>
428
+ </tr>
429
+ <tr>
430
+ <td>40</td>
431
+ <td>Deaths due to Road Traffic Injuries</td>
432
+ <td onClick={() => navigateToRegister('deaths_due_to_road_traffic_injuries')}>
433
+ {moh705bData.deaths_due_to_road_traffic_injuries}
434
+ </td>
435
+ </tr>
436
+ <tr>
437
+ <td>41</td>
438
+ <td>Other Injuries</td>
439
+ <td onClick={() => navigateToRegister('other_injuries')}>{moh705bData.other_injuries}</td>
440
+ </tr>
441
+ <tr>
442
+ <td>42</td>
443
+ <td>Sexual Violence</td>
444
+ <td onClick={() => navigateToRegister('sexual_violence')}>{moh705bData.sexual_violence}</td>
445
+ </tr>
446
+ <tr>
447
+ <td>43</td>
448
+ <td>Violence related Injuries</td>
449
+ <td onClick={() => navigateToRegister('violence_related_injuries')}>
450
+ {moh705bData.violence_related_injuries}
451
+ </td>
452
+ </tr>
453
+ <tr>
454
+ <td>44</td>
455
+ <td>Burns</td>
456
+ <td onClick={() => navigateToRegister('burns')}>{moh705bData.burns}</td>
457
+ </tr>
458
+ <tr>
459
+ <td>45</td>
460
+ <td>Snake Bites</td>
461
+ <td onClick={() => navigateToRegister('snake_bites')}>{moh705bData.snake_bites}</td>
462
+ </tr>
463
+ <tr>
464
+ <td>46</td>
465
+ <td>Dog Bites</td>
466
+ <td onClick={() => navigateToRegister('dog_bites')}>{moh705bData.dog_bites}</td>
467
+ </tr>
468
+ <tr>
469
+ <td>47</td>
470
+ <td>Other Bites</td>
471
+ <td onClick={() => navigateToRegister('other_bites')}>{moh705bData.other_bites}</td>
472
+ </tr>
473
+ <tr>
474
+ <td>48</td>
475
+ <td>Diabetes</td>
476
+ <td onClick={() => navigateToRegister('diabetes')}>{moh705bData.diabetes}</td>
477
+ </tr>
478
+ <tr>
479
+ <td>49</td>
480
+ <td>Epilepsy</td>
481
+ <td onClick={() => navigateToRegister('epilepsy')}>{moh705bData.epilepsy}</td>
482
+ </tr>
483
+ <tr>
484
+ <td>50</td>
485
+ <td>Brucellosis</td>
486
+ <td onClick={() => navigateToRegister('brucellosis')}>{moh705bData.brucellosis}</td>
487
+ </tr>
488
+ <tr>
489
+ <td>51</td>
490
+ <td>Cardiovascular conditions</td>
491
+ <td onClick={() => navigateToRegister('cardiovascular_conditions')}>
492
+ {moh705bData.cardiovascular_conditions}
493
+ </td>
494
+ </tr>
495
+ <tr>
496
+ <td>52</td>
497
+ <td>Central Nervous System Conditions</td>
498
+ <td onClick={() => navigateToRegister('central_nervous_system_conditions')}>
499
+ {moh705bData.central_nervous_system_conditions}
500
+ </td>
501
+ </tr>
502
+ <tr>
503
+ <td>53</td>
504
+ <td>Overweight (BMI &gt; 25)</td>
505
+ <td onClick={() => navigateToRegister('overweight')}>{moh705bData.overweight}</td>
506
+ </tr>
507
+ <tr>
508
+ <td>54</td>
509
+ <td>Muscular skeletal conditions</td>
510
+ <td onClick={() => navigateToRegister('mascular_skeletal_conditions')}>
511
+ {moh705bData.mascular_skeletal_conditions}
512
+ </td>
513
+ </tr>
514
+ <tr>
515
+ <td>55</td>
516
+ <td>Fistula (Birth related)</td>
517
+ <td onClick={() => navigateToRegister('fistula')}>{moh705bData.fistula}</td>
518
+ </tr>
519
+ <tr>
520
+ <td>56</td>
521
+ <td>Suspected Neoplams/Cancers</td>
522
+ <td onClick={() => navigateToRegister('suspected_neoplams_cancers')}>
523
+ {moh705bData.suspected_neoplams_cancers}
524
+ </td>
525
+ </tr>
526
+ <tr>
527
+ <td>57</td>
528
+ <td>Physical Disability</td>
529
+ <td onClick={() => navigateToRegister('physical_disability')}>
530
+ {moh705bData.physical_disability}
531
+ </td>
532
+ </tr>
533
+ <tr>
534
+ <td>58</td>
535
+ <td>Trypanosomiasis</td>
536
+ <td onClick={() => navigateToRegister('trypanosomiasis')}>{moh705bData.trypanosomiasis}</td>
537
+ </tr>
538
+ <tr>
539
+ <td>59</td>
540
+ <td>Rift valley fever</td>
541
+ <td onClick={() => navigateToRegister('rift_valley_fever')}>{moh705bData.rift_valley_fever}</td>
542
+ </tr>
543
+ <tr>
544
+ <td>60</td>
545
+ <td>Yellow Fever</td>
546
+ <td onClick={() => navigateToRegister('yellow_fever')}>{moh705bData.yellow_fever}</td>
547
+ </tr>
548
+ <tr>
549
+ <td>61</td>
550
+ <td>Viral Haemorrhagic Fever</td>
551
+ <td onClick={() => navigateToRegister('viral_haemorrhagic_fever')}>
552
+ {moh705bData.viral_haemorrhagic_fever}
553
+ </td>
554
+ </tr>
555
+ <tr>
556
+ <td>62</td>
557
+ <td>Chikungunya</td>
558
+ <td onClick={() => navigateToRegister('chikungunya')}>{moh705bData.chikungunya}</td>
559
+ </tr>
560
+ <tr>
561
+ <td>63</td>
562
+ <td>Dengue fever</td>
563
+ <td onClick={() => navigateToRegister('dengue_fever')}>{moh705bData.dengue_fever}</td>
564
+ </tr>
565
+ <tr>
566
+ <td>64</td>
567
+ <td>Leishmaniasis(Kala-azar)</td>
568
+ <td onClick={() => navigateToRegister('leishmaniasis')}>{moh705bData.leishmaniasis}</td>
569
+ </tr>
570
+ <tr>
571
+ <td>65</td>
572
+ <td>Cuteneous leishmaniasis</td>
573
+ <td onClick={() => navigateToRegister('cutaneous_leishmaniasis')}>
574
+ {moh705bData.cutaneous_leishmaniasis}
575
+ </td>
576
+ </tr>
577
+ <tr>
578
+ <td>66</td>
579
+ <td>Suspected Anthrax</td>
580
+ <td onClick={() => navigateToRegister('suspected_anthrax')}>{moh705bData.suspected_anthrax}</td>
581
+ </tr>
582
+ <tr>
583
+ <td>67</td>
584
+ <td>ALL OTHER DISEASES</td>
585
+ <td onClick={() => navigateToRegister('all_other_diseases')}>{moh705bData.all_other_diseases}</td>
586
+ </tr>
587
+ <tr>
588
+ <td>68</td>
589
+ <td>Tested for Malaria</td>
590
+ <td onClick={() => navigateToRegister('tested_for_malaria')}>{moh705bData.tested_for_malaria}</td>
591
+ </tr>
592
+ <tr>
593
+ <td>69</td>
594
+ <td>NO. OF FIRST ATTENDANCES</td>
595
+ <td onClick={() => navigateToRegister('no_of_first_attendances')}>
596
+ {moh705bData.no_of_first_attendances}
597
+ </td>
598
+ </tr>
599
+ <tr>
600
+ <td>70</td>
601
+ <td>RE-ATTENDANCES</td>
602
+ <td onClick={() => navigateToRegister('re_attendances')}>{moh705bData.re_attendances}</td>
603
+ </tr>
604
+ <tr>
605
+ <td>71</td>
606
+ <td>Referrals from other health facilities</td>
607
+ <td onClick={() => navigateToRegister('referrals_from_other_health_facility')}>
608
+ {moh705bData.referrals_from_other_health_facility}
609
+ </td>
610
+ </tr>
611
+ <tr>
612
+ <td>72</td>
613
+ <td>Referrals to other health facilities</td>
614
+ <td onClick={() => navigateToRegister('referrals_to_other_health_facility')}>
615
+ {moh705bData.referrals_to_other_health_facility}
616
+ </td>
617
+ </tr>
618
+ <tr>
619
+ <td>73</td>
620
+ <td>Referrals from community unit</td>
621
+ <td onClick={() => navigateToRegister('referrals_from_community_unit')}>
622
+ {moh705bData.referrals_from_community_unit}
623
+ </td>
624
+ </tr>
625
+ <tr>
626
+ <td>74</td>
627
+ <td>Referrals to community unit</td>
628
+ <td onClick={() => navigateToRegister('referrals_to_community_unit')}>
629
+ {moh705bData.referrals_to_community_unit}
630
+ </td>
631
+ </tr>
632
+ </>,
633
+ moh705bData,
634
+ indicators,
635
+ navigateToRegister,
636
+ )}
637
+ </tbody>
638
+ </table>
639
+ </div>
640
+
641
+ <div className={styles.signOff}>
642
+ <span>
643
+ Compiled by:<span className={styles.line}>{compiledBy}</span>
644
+ </span>
645
+ <span>
646
+ Signature:
647
+ <span className={styles.line} />
648
+ </span>
649
+ <span>
650
+ Date:<span className={styles.shortLine}>{compiledOn}</span>
651
+ </span>
652
+ </div>
653
+ </ReportPage>
654
+ )}
655
+ </>
656
+ );
657
+ };
658
+ export default Moh705BComponent;