@ampath/esm-reports-app 1.0.0-next.10

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 (154) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc +57 -0
  4. package/.husky/pre-commit +7 -0
  5. package/.husky/pre-push +6 -0
  6. package/.prettierignore +14 -0
  7. package/.turbo.json +18 -0
  8. package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
  9. package/LICENSE +401 -0
  10. package/README.md +9 -0
  11. package/__mocks__/react-i18next.js +50 -0
  12. package/dist/138.js +2 -0
  13. package/dist/138.js.LICENSE.txt +20 -0
  14. package/dist/138.js.map +1 -0
  15. package/dist/184.js +2 -0
  16. package/dist/184.js.LICENSE.txt +14 -0
  17. package/dist/184.js.map +1 -0
  18. package/dist/197.js +1 -0
  19. package/dist/205.js +1 -0
  20. package/dist/205.js.map +1 -0
  21. package/dist/282.js +2 -0
  22. package/dist/282.js.LICENSE.txt +32 -0
  23. package/dist/282.js.map +1 -0
  24. package/dist/300.js +1 -0
  25. package/dist/311.js +1 -0
  26. package/dist/311.js.map +1 -0
  27. package/dist/335.js +1 -0
  28. package/dist/353.js +1 -0
  29. package/dist/353.js.map +1 -0
  30. package/dist/478.js +2 -0
  31. package/dist/478.js.LICENSE.txt +9 -0
  32. package/dist/478.js.map +1 -0
  33. package/dist/540.js +2 -0
  34. package/dist/540.js.LICENSE.txt +9 -0
  35. package/dist/540.js.map +1 -0
  36. package/dist/55.js +1 -0
  37. package/dist/652.js +1 -0
  38. package/dist/677.js +1 -0
  39. package/dist/677.js.map +1 -0
  40. package/dist/812.js +1 -0
  41. package/dist/812.js.map +1 -0
  42. package/dist/961.js +2 -0
  43. package/dist/961.js.LICENSE.txt +19 -0
  44. package/dist/961.js.map +1 -0
  45. package/dist/99.js +1 -0
  46. package/dist/ampath-esm-reports-app.js +1 -0
  47. package/dist/ampath-esm-reports-app.js.buildmanifest.json +539 -0
  48. package/dist/ampath-esm-reports-app.js.map +1 -0
  49. package/dist/main.js +1 -0
  50. package/dist/main.js.map +1 -0
  51. package/dist/routes.json +1 -0
  52. package/e2e/README.md +115 -0
  53. package/e2e/core/global-setup.ts +32 -0
  54. package/e2e/core/index.ts +1 -0
  55. package/e2e/core/test.ts +20 -0
  56. package/e2e/fixtures/api.ts +26 -0
  57. package/e2e/fixtures/index.ts +1 -0
  58. package/e2e/pages/index.ts +1 -0
  59. package/e2e/pages/root-page.ts +32 -0
  60. package/e2e/specs/template-app.spec.ts +23 -0
  61. package/e2e/support/github/Dockerfile +34 -0
  62. package/e2e/support/github/docker-compose.yml +24 -0
  63. package/e2e/support/github/run-e2e-docker-env.sh +37 -0
  64. package/example.env +6 -0
  65. package/jest.config.js +33 -0
  66. package/package.json +106 -0
  67. package/playwright.config.ts +32 -0
  68. package/prettier.config.js +8 -0
  69. package/src/common/report-filters/report-filters.component.tsx +127 -0
  70. package/src/common/report-filters/report-filters.scss +49 -0
  71. package/src/config-schema.ts +12 -0
  72. package/src/createDashboardLink.tsx +9 -0
  73. package/src/dashboard/reports-dasboard.tsx +41 -0
  74. package/src/dashboard/reports-dashboard.module.scss +14 -0
  75. package/src/dashboard-meta/reports-dashboard.meta.ts +6 -0
  76. package/src/declarations.d.ts +5 -0
  77. package/src/index.ts +20 -0
  78. package/src/reports/datatable-wrapper/datatable-wrapper.component.tsx +54 -0
  79. package/src/reports/moh-240/moh-240.component.tsx +12 -0
  80. package/src/reports/moh-240/sub-reports/moh-240-register.component.tsx +42 -0
  81. package/src/reports/moh-240/sub-reports/page-summary.component.tsx +95 -0
  82. package/src/reports/moh-505/moh-505.component.tsx +234 -0
  83. package/src/reports/moh-705B/moh-705b.component.tsx +466 -0
  84. package/src/reports/moh-705B/moh-705b.scss +41 -0
  85. package/src/reports/moh-705a/moh-705a.component.tsx +473 -0
  86. package/src/reports/moh-705a/moh-705a.scss +41 -0
  87. package/src/reports/moh-706/moh-706.component.tsx +26 -0
  88. package/src/reports/moh-706/moh-706.scss +18 -0
  89. package/src/reports/moh-706/sub-reports/bacteriology/bacteriology.component.tsx +117 -0
  90. package/src/reports/moh-706/sub-reports/blood-chemistry/blood-chemistry.component.tsx +311 -0
  91. package/src/reports/moh-706/sub-reports/drug-susceptibility-testing/drug-susceptibility-testing.component.tsx +137 -0
  92. package/src/reports/moh-706/sub-reports/haematology/haematology.component.tsx +172 -0
  93. package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +88 -0
  94. package/src/reports/moh-706/sub-reports/parasitology/parasitology.component.tsx +114 -0
  95. package/src/reports/moh-706/sub-reports/serology/serology.component.tsx +40 -0
  96. package/src/reports/moh-706/sub-reports/specimen-referral-to-higher-levels/specimen-referral-to-higher-levels.component.tsx +39 -0
  97. package/src/reports/moh-706/sub-reports/urine-analysis/urine-analysis.component.tsx +101 -0
  98. package/src/reports/moh-710/moh-710.component.tsx +663 -0
  99. package/src/reports/moh-710/moh-710.scss +41 -0
  100. package/src/reports/moh-711/moh-711.component.tsx +121 -0
  101. package/src/reports/moh-711/moh711.scss +71 -0
  102. package/src/reports/moh-711/sections/anc.component.tsx +134 -0
  103. package/src/reports/moh-711/sections/cervical-cancer.component.tsx +104 -0
  104. package/src/reports/moh-711/sections/chanis.component.tsx +367 -0
  105. package/src/reports/moh-711/sections/family-planning.component.tsx +221 -0
  106. package/src/reports/moh-711/sections/gbv.component.tsx +115 -0
  107. package/src/reports/moh-711/sections/maternity.component.tsx +280 -0
  108. package/src/reports/moh-711/sections/medical-social-work.component.tsx +83 -0
  109. package/src/reports/moh-711/sections/other.component.tsx +47 -0
  110. package/src/reports/moh-711/sections/physiotherapy.component.tsx +61 -0
  111. package/src/reports/moh-711/sections/pnc.component.tsx +92 -0
  112. package/src/reports/moh-711/sections/post-abortion.component.tsx +42 -0
  113. package/src/reports/moh-711/sections/rehabilitation.component.tsx +57 -0
  114. package/src/reports/moh-711/sections/report-compiled-by.component.tsx +42 -0
  115. package/src/reports/moh-711/sections/tb-screening.component.tsx +57 -0
  116. package/src/reports/moh-717/moh-717.component.tsx +152 -0
  117. package/src/reports/moh-717/moh717.scss +150 -0
  118. package/src/reports/moh-717/sections/finance.component.tsx +42 -0
  119. package/src/reports/moh-717/sections/inpatient.component.tsx +374 -0
  120. package/src/reports/moh-717/sections/maternity.component.tsx +94 -0
  121. package/src/reports/moh-717/sections/medical-records.component.tsx +35 -0
  122. package/src/reports/moh-717/sections/mortuary.component.tsx +43 -0
  123. package/src/reports/moh-717/sections/operations.component.tsx +53 -0
  124. package/src/reports/moh-717/sections/orthopaedic-trauma.component.tsx +98 -0
  125. package/src/reports/moh-717/sections/outpatient.component.tsx +489 -0
  126. package/src/reports/moh-717/sections/pharmacy.component.tsx +43 -0
  127. package/src/reports/moh-717/sections/preparedby.component.tsx +47 -0
  128. package/src/reports/moh-717/sections/special-services.component.tsx +114 -0
  129. package/src/reports/moh-745/moh-745.component.tsx +629 -0
  130. package/src/reports/moh-745/moh-745.scss +67 -0
  131. package/src/reports/table-wrapper/table-row-mapper.component.tsx +42 -0
  132. package/src/reports/table-wrapper/table-wrapper.component.tsx +21 -0
  133. package/src/reports/table-wrapper/table-wrapper.scss +31 -0
  134. package/src/resources/moh-705.resource.ts +60 -0
  135. package/src/resources/moh-710.resource.ts +34 -0
  136. package/src/resources/moh-711.resource.ts +34 -0
  137. package/src/resources/moh-717.resource.ts +35 -0
  138. package/src/resources/moh-745.resource.ts +34 -0
  139. package/src/root.component.tsx +35 -0
  140. package/src/root.scss +15 -0
  141. package/src/routes.json +27 -0
  142. package/src/utils/get-base-url.ts +12 -0
  143. package/src/utils/utils.ts +7 -0
  144. package/tools/i18next-parser.config.js +89 -0
  145. package/tools/setup-tests.ts +1 -0
  146. package/tools/update-openmrs-deps.mjs +43 -0
  147. package/translations/am.json +24 -0
  148. package/translations/en.json +24 -0
  149. package/translations/es.json +24 -0
  150. package/translations/fr.json +24 -0
  151. package/translations/he.json +24 -0
  152. package/translations/km.json +24 -0
  153. package/tsconfig.json +24 -0
  154. package/webpack.config.js +1 -0
@@ -0,0 +1,127 @@
1
+ import { ArrowLeft } from '@carbon/react/icons';
2
+ import { useNavigate } from 'react-router-dom';
3
+ import React from 'react';
4
+ import { Button } from '@carbon/react';
5
+
6
+ import styles from './report-filters.scss';
7
+
8
+ interface ReportFiltersComponentProps {
9
+ reportName: string;
10
+ mode?: 'monthly' | 'daily';
11
+ isFacility?: false | 'true';
12
+ onGenerate?: (filters: { startDate?: string; endDate?: string; month?: string }) => void;
13
+ isLoding?: boolean;
14
+ }
15
+ const ReportFiltersComponent: React.FC<ReportFiltersComponentProps> = ({
16
+ reportName,
17
+ mode = 'daily',
18
+ isFacility,
19
+ onGenerate,
20
+ isLoding = false,
21
+ }) => {
22
+ const navigate = useNavigate();
23
+
24
+ const getToday = () => {
25
+ return new Date().toISOString().split('T')[0];
26
+ };
27
+
28
+ const getPreviousMonth = () => {
29
+ const date = new Date();
30
+ date.setMonth(date.getMonth() - 1);
31
+
32
+ const year = date.getFullYear();
33
+ const month = String(date.getMonth() + 1).padStart(2, '0');
34
+
35
+ return `${year}-${month}`;
36
+ };
37
+
38
+ const [startDateString, setStartDateString] = React.useState<string>(getToday());
39
+ const [endDateString, setEndDateString] = React.useState<string>(getToday());
40
+ const [monthString, setMonthString] = React.useState<string>(getPreviousMonth());
41
+ const [selectedFacility, setSelectedFacility] = React.useState<string>('');
42
+ const [facility, setFacility] = React.useState<string>('Select Facility');
43
+ const [startDateTime, setStartDateTime] = React.useState<string>('');
44
+ const [endDateTime, setEndDateTime] = React.useState<string>('');
45
+
46
+ const generateReport = () => {
47
+ if (onGenerate) {
48
+ const filters: { startDate?: string; endDate?: string; month?: string } = {};
49
+ if (mode === 'daily') {
50
+ filters.startDate = startDateString;
51
+ filters.endDate = endDateString;
52
+ } else if (mode === 'monthly') {
53
+ filters.month = monthString;
54
+ }
55
+ onGenerate(filters);
56
+ }
57
+ };
58
+ return (
59
+ <>
60
+ <div className={styles.titleContainer}>
61
+ <ArrowLeft className={styles.backIcon} onClick={() => navigate(-1)} />
62
+ <h2 className={styles.title}>{reportName}</h2>
63
+ </div>
64
+ <div className={styles.filtersContainer}>
65
+ {mode === 'daily' && (
66
+ <div className={styles.dateContainer}>
67
+ <label htmlFor="startingMonth">Start Date:</label>
68
+ <label htmlFor="endingMonth">End Date:</label>
69
+
70
+ <input
71
+ id="startingMonth"
72
+ type="date"
73
+ className={styles.input}
74
+ value={startDateString}
75
+ onChange={(e) => setStartDateString(e.target.value)}
76
+ />
77
+
78
+ <input
79
+ id="endingMonth"
80
+ type="date"
81
+ className={styles.input}
82
+ value={endDateString}
83
+ onChange={(e) => setEndDateString(e.target.value)}
84
+ />
85
+ </div>
86
+ )}
87
+ {mode === 'monthly' && (
88
+ <div>
89
+ <div>
90
+ <div>
91
+ <label htmlFor="month">Month:</label>
92
+ <input
93
+ id="month"
94
+ type="month"
95
+ className={styles.input}
96
+ value={monthString}
97
+ onChange={(e) => setMonthString(e.target.value)}
98
+ />
99
+ </div>
100
+ </div>
101
+ <div className={styles.clearFix}></div>
102
+ </div>
103
+ )}
104
+ {isFacility === 'true' && (
105
+ <div>
106
+ <label>Facility</label>
107
+ <select
108
+ className={styles.input}
109
+ name="selectedFacility"
110
+ value={selectedFacility}
111
+ onChange={(e) => setSelectedFacility(e.target.value)}
112
+ >
113
+ <option value="">{facility}</option>
114
+ </select>
115
+ </div>
116
+ )}
117
+ </div>
118
+ {!isLoding && (
119
+ <div className={styles.buttonContainer}>
120
+ <Button onClick={generateReport}>Generate Report</Button>
121
+ </div>
122
+ )}
123
+ </>
124
+ );
125
+ };
126
+
127
+ export default ReportFiltersComponent;
@@ -0,0 +1,49 @@
1
+
2
+
3
+ .filtersContainer {
4
+ margin: 0 2rem;
5
+ margin-bottom: 0.5rem;
6
+ border: 1px solid #ccc;
7
+ padding: 1rem;
8
+ }
9
+
10
+ .title {
11
+ font-size: 1.5rem;
12
+ font-weight: bold;
13
+ margin-top: 1rem;
14
+ color: green;
15
+ text-decoration: underline;
16
+ }
17
+
18
+ .titleContainer {
19
+ margin: 2rem;
20
+ }
21
+
22
+ .dateContainer {
23
+ display: grid;
24
+ grid-template-columns: 1fr 1fr;
25
+ gap: 8px 16px;
26
+ align-items: center;
27
+ }
28
+
29
+ .dateContainer label {
30
+ font-weight: 500;
31
+ }
32
+
33
+ .input {
34
+ width: 100%;
35
+ padding: 6px 8px;
36
+ box-sizing: border-box;
37
+ border: 1px solid #ccc;
38
+ outline: none;
39
+ }
40
+ .input:focus {
41
+ border-color: #999;
42
+ }
43
+
44
+ .buttonContainer {
45
+ display: flex;
46
+ justify-content: flex-end;
47
+ gap: 10px;
48
+ margin: 0 2rem;
49
+ }
@@ -0,0 +1,12 @@
1
+ import { Type } from '@openmrs/esm-framework';
2
+ export const configSchema = {
3
+ etlBaseUrl: {
4
+ _type: Type.String,
5
+ _default: '',
6
+ _description: 'ETL endpoint',
7
+ },
8
+ };
9
+
10
+ export type Config = {
11
+ etlBaseUrl: string;
12
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { BrowserRouter } from 'react-router-dom';
3
+ import { DashboardExtension, type DashboardExtensionProps, type IconId } from '@openmrs/esm-framework';
4
+
5
+ export const createDashboardLink = (config: Omit<DashboardExtensionProps, 'icon'> & { icon?: IconId }) => () => (
6
+ <BrowserRouter>
7
+ <DashboardExtension path={config.path} title={config.title} basePath={config.basePath} icon={config.icon} />
8
+ </BrowserRouter>
9
+ );
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { useNavigate } from 'react-router-dom';
3
+ import { ClickableTile } from '@carbon/react';
4
+
5
+ import styles from './reports-dashboard.module.scss';
6
+ interface ReportsDashboardProps {}
7
+ const ReportsDashboard: React.FC<ReportsDashboardProps> = () => {
8
+ const navigate = useNavigate();
9
+ return (
10
+ <>
11
+ <div className={styles.container}>
12
+ <ClickableTile onClick={() => navigate('/moh-710')} className={styles.tile}>
13
+ MOH-710 REPORT
14
+ </ClickableTile>
15
+ <ClickableTile onClick={() => navigate('/moh-711')} className={styles.tile}>
16
+ MOH-711 REPORT
17
+ </ClickableTile>
18
+ <ClickableTile onClick={() => navigate('/moh-717')} className={styles.tile}>
19
+ MOH-717 REPORT
20
+ </ClickableTile>
21
+ <ClickableTile onClick={() => navigate('/moh-706')} className={styles.tile}>
22
+ MOH-706 REPORT
23
+ </ClickableTile>
24
+ <ClickableTile onClick={() => navigate('/moh-505')} className={styles.tile}>
25
+ MOH-505 REPORT
26
+ </ClickableTile>
27
+ <ClickableTile onClick={() => navigate('/moh-705a')} className={styles.tile}>
28
+ MOH-705A REPORT
29
+ </ClickableTile>
30
+ <ClickableTile onClick={() => navigate('/moh-705b')} className={styles.tile}>
31
+ MOH-705B REPORT
32
+ </ClickableTile>
33
+ <ClickableTile onClick={() => navigate('/moh-745')} className={styles.tile}>
34
+ MOH-745 REPORT
35
+ </ClickableTile>
36
+ </div>
37
+ </>
38
+ );
39
+ };
40
+
41
+ export default ReportsDashboard;
@@ -0,0 +1,14 @@
1
+ .container {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ gap: 20px;
5
+ margin: 2rem;
6
+ }
7
+
8
+ .tile {
9
+ flex: 1 1 calc(33.333% - 40px);
10
+ min-width: 5rem;
11
+ max-width: 15rem;
12
+ padding: 1rem;
13
+ text-align: center;
14
+ }
@@ -0,0 +1,6 @@
1
+ export const reportsDashboardMeta = {
2
+ path: 'reports',
3
+ slot: 'ampath-reports',
4
+ title: 'Reports',
5
+ basePath: `${window.spaBase}/home`,
6
+ };
@@ -0,0 +1,5 @@
1
+ declare module '*.css';
2
+ declare module '*.scss';
3
+ declare module '*.png';
4
+
5
+ declare type SideNavProps = object;
package/src/index.ts ADDED
@@ -0,0 +1,20 @@
1
+ import { getAsyncLifecycle, defineConfigSchema, getSyncLifecycle } from '@openmrs/esm-framework';
2
+ import { configSchema } from './config-schema';
3
+ import { createDashboardLink } from './createDashboardLink';
4
+ import { reportsDashboardMeta } from './dashboard-meta/reports-dashboard.meta';
5
+
6
+ export const moduleName = '@ampath/esm-reports-app';
7
+
8
+ const options = {
9
+ featureName: 'ampath-esm-reports',
10
+ moduleName,
11
+ };
12
+
13
+ export const importTranslation = require.context('../translations', false, /.json$/, 'lazy');
14
+
15
+ export function startupApp() {
16
+ defineConfigSchema(moduleName, configSchema);
17
+ }
18
+ export const root = getAsyncLifecycle(() => import('./root.component'), options);
19
+
20
+ export const reportsDashboardLink = getSyncLifecycle(createDashboardLink(reportsDashboardMeta), options);
@@ -0,0 +1,54 @@
1
+ import { DataTable, type DataTableHeader, type DataTableRow, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@carbon/react";
2
+ import React from "react";
3
+
4
+ interface DatatableWrapperProps {
5
+ rows: Omit<DataTableRow<any[]>, "cells">[];
6
+ headers: DataTableHeader[];
7
+ subHeaders?: string[];
8
+ }
9
+
10
+ const DatatableWrapper: React.FC<DatatableWrapperProps> = ({ rows, headers, subHeaders = [] }) => {
11
+ return <DataTable rows={rows} headers={headers}>
12
+ {({
13
+ rows,
14
+ headers,
15
+ getTableProps,
16
+ getHeaderProps,
17
+ getRowProps,
18
+ getCellProps,
19
+ }) => (
20
+ <Table {...getTableProps()}>
21
+ <TableHead>
22
+ <TableRow>
23
+ {headers.map((header) => (
24
+ <TableHeader {...getHeaderProps({ header })}>
25
+ {header.header}
26
+ </TableHeader>
27
+ ))}
28
+ </TableRow>
29
+ {
30
+ (subHeaders && subHeaders.length) &&
31
+ <TableRow>
32
+ {subHeaders.map((head, i) => (
33
+ <TableHeader key={i}>
34
+ {head}
35
+ </TableHeader>
36
+ ))}
37
+ </TableRow>
38
+ }
39
+ </TableHead>
40
+ <TableBody>
41
+ {rows.map((row) => (
42
+ <TableRow {...getRowProps({ row })}>
43
+ {row.cells.map((cell) => (
44
+ <TableCell {...getCellProps({ cell })}>{cell.value}</TableCell>
45
+ ))}
46
+ </TableRow>
47
+ ))}
48
+ </TableBody>
49
+ </Table>
50
+ )}
51
+ </DataTable>
52
+ }
53
+
54
+ export default DatatableWrapper;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import Moh240Register from "./sub-reports/moh-240-register.component";
3
+ import Moh240PageSummary from "./sub-reports/page-summary.component";
4
+
5
+ const Moh240Report: React.FC = () => {
6
+ return <>
7
+ <Moh240Register />
8
+ <Moh240PageSummary />
9
+ </>
10
+ }
11
+
12
+ export default Moh240Report;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import DatatableWrapper from "../../datatable-wrapper/datatable-wrapper.component";
3
+
4
+ const Moh240Register: React.FC = () => {
5
+ const headers = [
6
+ { key: 'date', header: 'Date (DD/MM/YYYY)' },
7
+ { key: 'opd_ipd_no', header: 'OPD / IPD Ref. No.' },
8
+ { key: 'lab_no', header: 'Lab. No. (new client)' },
9
+ { key: 'revisit_no', header: 'Revisit No.' },
10
+ { key: 'full_name', header: 'Full Names (Three names)' },
11
+ { key: 'age', header: 'Age' },
12
+ { key: 'sex', header: 'Sex' },
13
+ { key: 'county_sub_county', header: 'County / Sub County' },
14
+ { key: 'village_estate_landmark', header: 'Village / Estate / Landmark' },
15
+ { key: 'telephone', header: 'Telephone Number' },
16
+ { key: 'clinical_diagnosis', header: 'Clinical Diagnosis' },
17
+ { key: 'prior_treatment', header: 'Prior Treatment' },
18
+ { key: 'type_of_specimen', header: 'Type of Specimen' },
19
+ { key: 'condition_of_specimen', header: 'Condition of Specimen' },
20
+ { key: 'investigation_required', header: 'Investigation Required' },
21
+ { key: 'date_sample_collected', header: 'Date Sample Collected' },
22
+ { key: 'date_sample_received', header: 'Date Sample Received' },
23
+ { key: 'clinician_name', header: 'Clinician Name' },
24
+ { key: 'date_sample_analysed', header: 'Date Sample Analysed' },
25
+ { key: 'results', header: 'Results' },
26
+ { key: 'date_results_dispatched', header: 'Date Results Dispatched' },
27
+ { key: 'amount_charged', header: 'Amount Charged' },
28
+ { key: 'receipt_number', header: 'Receipt Number' },
29
+ { key: 'referrals', header: 'Referrals (From Other HF / To Other HF / 3rd Tier Reference Laboratories)' },
30
+ { key: 'comments', header: 'Comments' },
31
+ { key: 'analysing_officer', header: 'Name of Analysing/Testing Officer' },
32
+ { key: 'signature', header: 'Signature' }
33
+ ];
34
+
35
+ const subHeaders = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', 'AA'];
36
+
37
+ const rows = [];
38
+
39
+ return <DatatableWrapper headers={headers} rows={rows} subHeaders={subHeaders}/>
40
+ }
41
+
42
+ export default Moh240Register;
@@ -0,0 +1,95 @@
1
+ import React, { useMemo } from "react";
2
+ import TableWrapper from "../../table-wrapper/table-wrapper.component";
3
+ import TableRowMapper from "../../table-wrapper/table-row-mapper.component";
4
+ import { getCell } from "../../../utils/utils";
5
+
6
+ const Moh240PageSummary: React.FC = () => {
7
+ const tableRows = useMemo(() => {
8
+ return [
9
+ {
10
+ tableCells: [
11
+ getCell("", "Page Summary", 8, 1, true),
12
+ ]
13
+ },
14
+ {
15
+ tableCells: [
16
+ getCell("", "Malaria Testing", 3, 1, true),
17
+ getCell("", "Type of test", 2, 1, true),
18
+ getCell("", "Referrals", 3, 1, true),
19
+ ]
20
+ },
21
+ {
22
+ tableCells: [
23
+ getCell("", "", 1, 2, true),
24
+ getCell("", "Number", 2, 1, true),
25
+ getCell("", "", 1, 2, true),
26
+ getCell("", "Number", 1, 2, true),
27
+ getCell("", "", 1, 1, true),
28
+ getCell("", "Number", 2, 1, true),
29
+ ]
30
+ },
31
+ {
32
+ tableCells: [
33
+ ,
34
+ getCell("", "OPD", 1, 1, true),
35
+ getCell("", "IP", 1, 1, true),
36
+ ,
37
+ ,
38
+ getCell(),
39
+ getCell("", "Routine", 1, 1, true),
40
+ getCell("", "Specialized", 1, 1, true),
41
+ ]
42
+ },
43
+ {
44
+ tableCells: [
45
+ getCell("", "Malaria BS (Under five years)"),
46
+ getCell(),
47
+ getCell(),
48
+ getCell("", "No. of Routine tests", 1, 2),
49
+ getCell("", "", 1, 2),
50
+ getCell("", "From Other HF"),
51
+ getCell(),
52
+ getCell()
53
+ ]
54
+ },
55
+ {
56
+ tableCells: [
57
+ getCell("", "Malaria BS (5 years and above)"),
58
+ getCell(),
59
+ getCell(),
60
+ ,
61
+ ,
62
+ getCell("", "To Other HF"),
63
+ getCell(),
64
+ getCell(),
65
+ ]
66
+ },
67
+ {
68
+ tableCells: [
69
+ getCell("", "Malaria Rapid Diagnostic Tests (Under five years)"),
70
+ getCell(),
71
+ getCell(),
72
+ getCell("", "No. of Special tests", 1, 2),
73
+ getCell("", "", 1, 2),
74
+ getCell("", "To Reference Laboratories", 1, 2),
75
+ getCell("", "", 1, 2),
76
+ getCell("", "", 1, 2)
77
+ ]
78
+ },
79
+ {
80
+ tableCells: [
81
+ getCell("", "Malaria Rapid Diagnostic Tests (5 years and above)"),
82
+ getCell(),
83
+ getCell()
84
+ ]
85
+ },
86
+ ]
87
+ }, []);
88
+
89
+
90
+ return <TableWrapper>
91
+ <TableRowMapper tableRows={tableRows} />
92
+ </TableWrapper>
93
+ }
94
+
95
+ export default Moh240PageSummary;