@ampath/esm-reports-app 1.0.0-next.62 → 1.0.0-next.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/299.js +2 -0
- package/dist/299.js.LICENSE.txt +3 -0
- package/dist/299.js.map +1 -0
- package/dist/354.js +2 -0
- package/dist/354.js.LICENSE.txt +20 -0
- package/dist/354.js.map +1 -0
- package/dist/410.js +1 -1
- package/dist/410.js.map +1 -1
- package/dist/457.js +2 -0
- package/dist/457.js.LICENSE.txt +261 -0
- package/dist/457.js.map +1 -0
- package/dist/480.js +1 -0
- package/dist/781.js +1 -0
- package/dist/781.js.map +1 -0
- package/dist/907.js +1 -1
- package/dist/907.js.map +1 -1
- package/dist/953.css +1 -0
- package/dist/953.css.map +1 -0
- package/dist/953.js +1 -0
- package/dist/953.js.map +1 -0
- package/dist/99.js +1 -1
- package/dist/99.js.map +1 -0
- package/dist/ampath-esm-reports-app.js +1 -1
- package/dist/routes.json +1 -1
- package/package.json +3 -1
- package/src/common/linelist-table/linelist-table.component.tsx +1 -1
- package/src/common/report-filters/report-filters.component.tsx +25 -4
- package/src/common/report-filters/types.ts +13 -0
- package/src/common/report-page/download-sheet-pdf.ts +59 -0
- package/src/common/report-page/index.ts +1 -0
- package/src/dashboard/reports-dasboard.tsx +156 -69
- package/src/dashboard/reports-dashboard.module.scss +144 -59
- package/src/registers/moh-362/moh-362-lab-register.component.tsx +392 -0
- package/src/registers/moh-362/moh-362-linkage-register.component.tsx +120 -0
- package/src/registers/moh-362/moh-362-register.scss +222 -0
- package/src/registers/moh-362/moh-362.component.tsx +99 -0
- package/src/registers/moh-362/moh-362.scss +11 -0
- package/src/registers/moh-362/moh-362.types.ts +97 -0
- package/src/registers/register-catalog.ts +30 -0
- package/src/reports/moh-731/linelist/moh-731-indicators.ts +82 -0
- package/src/reports/moh-731/linelist/moh-731-linelist-sections.ts +51 -2
- package/src/reports/moh-731/moh-731.component.tsx +18 -3
- package/src/reports/moh-731/moh-731.scss +6 -0
- package/src/reports/moh-731/sections/hiv-and-tb-treatment.component.tsx +49 -52
- package/src/reports/moh-731/summary/moh-731-summary.config.ts +25 -16
- package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx +2 -0
- package/src/reports/moh-740/registers/moh-740.columns.ts +2 -0
- package/src/reports/moh-740/types/index.ts +1 -0
- package/src/resources/moh-362.resource.ts +27 -0
- package/src/root.component.tsx +2 -0
- package/dist/876.css +0 -1
- package/dist/876.css.map +0 -1
- package/dist/876.js +0 -1
- package/dist/876.js.map +0 -1
|
@@ -408,15 +408,64 @@ export const MOH_731_LINELIST_SECTIONS = {
|
|
|
408
408
|
fetchPatientList: getMoh366PatientList,
|
|
409
409
|
columns: [cccNumber, name, nupi, sex, age, phoneNumber],
|
|
410
410
|
},
|
|
411
|
+
/* 3.6 Nutrition and HIV (HV03-037 to HV03-060): one row per client, their
|
|
412
|
+
latest SAM / MAM status in the period, from the ETL's nutrition dataset
|
|
413
|
+
(service/moh-731/ver-2023/nutrition) */
|
|
411
414
|
nutrition: {
|
|
412
415
|
title: 'Nutrition and HIV',
|
|
413
416
|
fetchPatientList: getMoh366PatientList,
|
|
414
|
-
columns: [
|
|
417
|
+
columns: [
|
|
418
|
+
{
|
|
419
|
+
header: 'Visit Date',
|
|
420
|
+
value: (row) => formatDate(row.encounter_date),
|
|
421
|
+
sortValue: (row) => row.encounter_date,
|
|
422
|
+
},
|
|
423
|
+
{ header: 'Name', field: 'full_name' },
|
|
424
|
+
{ header: 'CCC Number', field: 'ccc_number', text: true },
|
|
425
|
+
{ header: 'NUPI', field: 'nupi', text: true },
|
|
426
|
+
{ header: 'AMRS Number', field: 'amrs_number', text: true },
|
|
427
|
+
{ header: 'Sex', field: 'gender' },
|
|
428
|
+
{ header: 'Age', field: 'age' },
|
|
429
|
+
{ header: 'Age (Months)', field: 'age_months', hidden: true },
|
|
430
|
+
{ header: 'SAM / MAM', field: 'sam_mam' },
|
|
431
|
+
{ header: 'Food Given', field: 'food_given' },
|
|
432
|
+
{ header: 'Pregnant / Lactating', field: 'pregnant_lactating' },
|
|
433
|
+
{ header: 'Current ARV Regimen', field: 'current_arv_regimen' },
|
|
434
|
+
{ header: 'ARV Line', field: 'cur_arv_line', hidden: true },
|
|
435
|
+
{
|
|
436
|
+
header: 'ART Start Date',
|
|
437
|
+
value: (row) => formatDate(row.art_start_date),
|
|
438
|
+
sortValue: (row) => row.art_start_date,
|
|
439
|
+
},
|
|
440
|
+
{ header: 'RTC Date', value: (row) => formatDate(row.rtc_date), sortValue: (row) => row.rtc_date },
|
|
441
|
+
{ header: 'HIV Clinic', field: 'hiv_clinic', hidden: true },
|
|
442
|
+
{ header: 'Encounter Type', field: 'encounter_type', hidden: true },
|
|
443
|
+
{ header: 'Location', field: 'location' },
|
|
444
|
+
{ header: 'Entered By', field: 'entered_by', hidden: true },
|
|
445
|
+
],
|
|
415
446
|
},
|
|
447
|
+
/* 5. Post Exposure Prophylaxis (HV05-01 to HV05-04): one row per exposure, from
|
|
448
|
+
the ETL's PEP dataset (service/moh-731/ver-2023/pep) */
|
|
416
449
|
pep: {
|
|
417
450
|
title: 'Post Exposure Prophylaxis',
|
|
418
451
|
fetchPatientList: getMoh366PatientList,
|
|
419
|
-
columns: [
|
|
452
|
+
columns: [
|
|
453
|
+
{
|
|
454
|
+
header: 'Exposure Date',
|
|
455
|
+
value: (row) => formatDate(row.exposure_date),
|
|
456
|
+
sortValue: (row) => row.exposure_date,
|
|
457
|
+
},
|
|
458
|
+
{ header: 'Name', field: 'full_name' },
|
|
459
|
+
{ header: 'CCC Number', field: 'ccc_number', text: true },
|
|
460
|
+
{ header: 'NUPI', field: 'nupi', text: true },
|
|
461
|
+
{ header: 'AMRS Number', field: 'amrs_number', text: true },
|
|
462
|
+
{ header: 'Sex', field: 'gender' },
|
|
463
|
+
{ header: 'Age', field: 'age' },
|
|
464
|
+
{ header: 'Exposure Type', field: 'exposure_type' },
|
|
465
|
+
{ header: 'PEP Given', field: 'pep_given_status' },
|
|
466
|
+
{ header: 'Location', field: 'location' },
|
|
467
|
+
{ header: 'Entered By', field: 'entered_by' },
|
|
468
|
+
],
|
|
420
469
|
},
|
|
421
470
|
} satisfies Record<string, Moh731LinelistSection>;
|
|
422
471
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import styles from './moh-731.scss';
|
|
4
4
|
import { ReportFiltersComponent, type ReportPeriod } from '../../common/report-filters';
|
|
@@ -13,7 +13,7 @@ import HivTestingandPreExposusreProphylaxis from './sections/hiv-testing-and-pre
|
|
|
13
13
|
import PmtctComponent from './sections/pmtct.component';
|
|
14
14
|
import HivAndTBTreatmentComponent from './sections/hiv-and-tb-treatment.component';
|
|
15
15
|
import { ReportSkeleton } from '../../common/report-skeleton';
|
|
16
|
-
import { usePageScale } from '../../common/report-page';
|
|
16
|
+
import { downloadSheetPdf, usePageScale } from '../../common/report-page';
|
|
17
17
|
import Moh731Summary from './summary/moh-731-summary.component';
|
|
18
18
|
import { useOpenMoh731Linelist } from './linelist/use-open-moh-731-linelist';
|
|
19
19
|
|
|
@@ -98,6 +98,20 @@ const Moh731Report: React.FC<Moh731Props> = () => {
|
|
|
98
98
|
/** Fills the available width, never rendering below A4 */
|
|
99
99
|
const { ref: viewportRef, scale } = usePageScale<HTMLDivElement>(SHEET_WIDTH_MM);
|
|
100
100
|
|
|
101
|
+
/* Download PDF saves the form whichever tab is open; the file is made from a
|
|
102
|
+
copy, so the sheet on screen is left as it is */
|
|
103
|
+
const formRef = useRef<HTMLDivElement>(null);
|
|
104
|
+
const downloadPdf = async () => {
|
|
105
|
+
if (!formRef.current) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const name = ['MOH-731', facility, startDate ? dayjs(startDate).format('YYYY-MM') : '']
|
|
109
|
+
.filter(Boolean)
|
|
110
|
+
.join('_')
|
|
111
|
+
.replace(/[^a-z0-9_-]+/gi, '-');
|
|
112
|
+
await downloadSheetPdf(formRef.current, `${name}.pdf`);
|
|
113
|
+
};
|
|
114
|
+
|
|
101
115
|
const fetchMoh731ReportData = async ({ startDate, endDate }: ReportPeriod) => {
|
|
102
116
|
setIsLoading(true);
|
|
103
117
|
setStartDate(startDate);
|
|
@@ -129,6 +143,7 @@ const Moh731Report: React.FC<Moh731Props> = () => {
|
|
|
129
143
|
isLoading={isLoading}
|
|
130
144
|
isReportGenerated={isReportGenerated}
|
|
131
145
|
generatedPeriod={{ startDate, endDate }}
|
|
146
|
+
onDownloadPdf={downloadPdf}
|
|
132
147
|
/>
|
|
133
148
|
{isLoading && <ReportSkeleton blocks={3} />}
|
|
134
149
|
{!isLoading && !isReportGenerated && (
|
|
@@ -148,7 +163,7 @@ const Moh731Report: React.FC<Moh731Props> = () => {
|
|
|
148
163
|
<div className={styles.viewport} ref={viewportRef}>
|
|
149
164
|
{/* The scale is a custom property rather than an inline `zoom`, so
|
|
150
165
|
the print stylesheet can still reset it to 1 */}
|
|
151
|
-
<div className={styles.form} style={{ '--page-zoom': scale } as React.CSSProperties}>
|
|
166
|
+
<div className={styles.form} ref={formRef} style={{ '--page-zoom': scale } as React.CSSProperties}>
|
|
152
167
|
{/* Ministry line sits above the ruled sheet, as on the printed form */}
|
|
153
168
|
<div className={styles.ministryLine}>
|
|
154
169
|
<span>Ministry of Health</span>
|
|
@@ -217,6 +217,12 @@ $section-gap: 0.8mm; // around a divider
|
|
|
217
217
|
display: flex;
|
|
218
218
|
align-items: stretch;
|
|
219
219
|
border-bottom: $rule;
|
|
220
|
+
|
|
221
|
+
/* the sheet's own border closes the last section; a second rule there
|
|
222
|
+
doubles the line */
|
|
223
|
+
&:last-child {
|
|
224
|
+
border-bottom: none;
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
227
|
|
|
222
228
|
.flexColumn {
|
|
@@ -628,7 +628,13 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
628
628
|
<td>Pregnant & Lactating</td>
|
|
629
629
|
<td className={styles.textBox}>
|
|
630
630
|
<span>HV03-042</span>
|
|
631
|
-
<div
|
|
631
|
+
<div
|
|
632
|
+
onClick={() => openLinelist('HV03-042')}
|
|
633
|
+
className={styles.rectangle}
|
|
634
|
+
title="Click to open linelist"
|
|
635
|
+
>
|
|
636
|
+
{MOH731Data.has_sam_preg_lact}
|
|
637
|
+
</div>
|
|
632
638
|
</td>
|
|
633
639
|
<td></td>
|
|
634
640
|
</tr>
|
|
@@ -716,7 +722,13 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
716
722
|
<td>Pregnant & Lactating</td>
|
|
717
723
|
<td className={styles.textBox}>
|
|
718
724
|
<span>HV03-048</span>
|
|
719
|
-
<div
|
|
725
|
+
<div
|
|
726
|
+
onClick={() => openLinelist('HV03-048')}
|
|
727
|
+
className={styles.rectangle}
|
|
728
|
+
title="Click to open linelist"
|
|
729
|
+
>
|
|
730
|
+
{MOH731Data.has_smm_preg_lact}
|
|
731
|
+
</div>
|
|
720
732
|
</td>
|
|
721
733
|
<td></td>
|
|
722
734
|
</tr>
|
|
@@ -804,7 +816,13 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
804
816
|
<td>Pregnant & Lactating</td>
|
|
805
817
|
<td className={styles.textBox}>
|
|
806
818
|
<span>HV03-054</span>
|
|
807
|
-
<div
|
|
819
|
+
<div
|
|
820
|
+
onClick={() => openLinelist('HV03-054')}
|
|
821
|
+
className={styles.rectangle}
|
|
822
|
+
title="Click to open linelist"
|
|
823
|
+
>
|
|
824
|
+
{MOH731Data.severe_acute_supp_preg_lact}
|
|
825
|
+
</div>
|
|
808
826
|
</td>
|
|
809
827
|
<td></td>
|
|
810
828
|
</tr>
|
|
@@ -892,7 +910,13 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
892
910
|
<td>Pregnant & Lactating</td>
|
|
893
911
|
<td className={styles.textBox}>
|
|
894
912
|
<span>HV03-060</span>
|
|
895
|
-
<div
|
|
913
|
+
<div
|
|
914
|
+
onClick={() => openLinelist('HV03-060')}
|
|
915
|
+
className={styles.rectangle}
|
|
916
|
+
title="Click to open linelist"
|
|
917
|
+
>
|
|
918
|
+
{MOH731Data.severe_moderate_supp_preg_lact}
|
|
919
|
+
</div>
|
|
896
920
|
</td>
|
|
897
921
|
<td></td>
|
|
898
922
|
</tr>
|
|
@@ -906,6 +930,8 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
906
930
|
<table className={styles.block}>
|
|
907
931
|
<tbody>
|
|
908
932
|
<tr>
|
|
933
|
+
{/* Not reported yet: the earlier figures were misleading, so each box
|
|
934
|
+
shows - until this section's queries are corrected */}
|
|
909
935
|
<td className={styles.blockTitle} colSpan={3}>
|
|
910
936
|
3.7 HIV in TB Clinic
|
|
911
937
|
</td>
|
|
@@ -914,13 +940,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
914
940
|
<td>TB cases_New</td>
|
|
915
941
|
<td className={styles.textBox}>
|
|
916
942
|
<span>HV03-061</span>
|
|
917
|
-
<div
|
|
918
|
-
onClick={() => openLinelist('HV03-061')}
|
|
919
|
-
className={styles.rectangle}
|
|
920
|
-
title="Click to open linelist"
|
|
921
|
-
>
|
|
922
|
-
{MOH731Data.start_tb}
|
|
923
|
-
</div>
|
|
943
|
+
<div className={styles.rectangle}>-</div>
|
|
924
944
|
</td>
|
|
925
945
|
<td></td>
|
|
926
946
|
</tr>
|
|
@@ -932,13 +952,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
932
952
|
</td>
|
|
933
953
|
<td className={styles.textBox}>
|
|
934
954
|
<span>HV03-062</span>
|
|
935
|
-
<div
|
|
936
|
-
onClick={() => openLinelist('HV03-062')}
|
|
937
|
-
className={styles.rectangle}
|
|
938
|
-
title="Click to open linelist"
|
|
939
|
-
>
|
|
940
|
-
{MOH731Data.start_tb_known_positive}
|
|
941
|
-
</div>
|
|
955
|
+
<div className={styles.rectangle}>-</div>
|
|
942
956
|
</td>
|
|
943
957
|
<td></td>
|
|
944
958
|
</tr>
|
|
@@ -946,13 +960,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
946
960
|
<td>TB_New HIV Positive</td>
|
|
947
961
|
<td className={styles.textBox}>
|
|
948
962
|
<span>HV03-063</span>
|
|
949
|
-
<div
|
|
950
|
-
onClick={() => openLinelist('HV03-063')}
|
|
951
|
-
className={styles.rectangle}
|
|
952
|
-
title="Click to open linelist"
|
|
953
|
-
>
|
|
954
|
-
{MOH731Data.start_tb_positive}
|
|
955
|
-
</div>
|
|
963
|
+
<div className={styles.rectangle}>-</div>
|
|
956
964
|
</td>
|
|
957
965
|
<td></td>
|
|
958
966
|
</tr>
|
|
@@ -964,13 +972,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
964
972
|
</td>
|
|
965
973
|
<td className={styles.textBox}>
|
|
966
974
|
<span>HV03-064</span>
|
|
967
|
-
<div
|
|
968
|
-
onClick={() => openLinelist('HV03-064')}
|
|
969
|
-
className={styles.rectangle}
|
|
970
|
-
title="Click to open linelist"
|
|
971
|
-
>
|
|
972
|
-
{MOH731Data.start_tb_on_art}
|
|
973
|
-
</div>
|
|
975
|
+
<div className={styles.rectangle}>-</div>
|
|
974
976
|
</td>
|
|
975
977
|
<td></td>
|
|
976
978
|
</tr>
|
|
@@ -978,18 +980,13 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
978
980
|
<td>TB New_Start_HAART</td>
|
|
979
981
|
<td className={styles.textBox}>
|
|
980
982
|
<span>HV03-065</span>
|
|
981
|
-
<div
|
|
982
|
-
onClick={() => openLinelist('HV03-065')}
|
|
983
|
-
className={styles.rectangle}
|
|
984
|
-
title="Click to open linelist"
|
|
985
|
-
>
|
|
986
|
-
{MOH731Data.start_tb_art_new}
|
|
987
|
-
</div>
|
|
983
|
+
<div className={styles.rectangle}>-</div>
|
|
988
984
|
</td>
|
|
989
985
|
<td></td>
|
|
990
986
|
</tr>
|
|
991
987
|
</tbody>
|
|
992
988
|
</table>
|
|
989
|
+
{/* Not reported by the system yet, so each box shows - */}
|
|
993
990
|
<h5 className={styles.columnHeader}>4. Medical Male Circumcision</h5>
|
|
994
991
|
<table className={styles.block}>
|
|
995
992
|
<tbody>
|
|
@@ -1002,7 +999,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1002
999
|
<td>Circumcised_0-60 days</td>
|
|
1003
1000
|
<td className={styles.textBox}>
|
|
1004
1001
|
<span>HV04-01</span>
|
|
1005
|
-
<div className={styles.rectangle}
|
|
1002
|
+
<div className={styles.rectangle}>-</div>
|
|
1006
1003
|
</td>
|
|
1007
1004
|
<td></td>
|
|
1008
1005
|
</tr>
|
|
@@ -1010,7 +1007,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1010
1007
|
<td>Circumcised_61 days -9 yrs</td>
|
|
1011
1008
|
<td className={styles.textBox}>
|
|
1012
1009
|
<span>HV04-02</span>
|
|
1013
|
-
<div className={styles.rectangle}
|
|
1010
|
+
<div className={styles.rectangle}>-</div>
|
|
1014
1011
|
</td>
|
|
1015
1012
|
<td></td>
|
|
1016
1013
|
</tr>
|
|
@@ -1018,7 +1015,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1018
1015
|
<td>Circumcised_10-14</td>
|
|
1019
1016
|
<td className={styles.textBox}>
|
|
1020
1017
|
<span>HV04-03</span>
|
|
1021
|
-
<div className={styles.rectangle}
|
|
1018
|
+
<div className={styles.rectangle}>-</div>
|
|
1022
1019
|
</td>
|
|
1023
1020
|
<td></td>
|
|
1024
1021
|
</tr>
|
|
@@ -1026,7 +1023,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1026
1023
|
<td>Circumcised_15 +</td>
|
|
1027
1024
|
<td className={styles.textBox}>
|
|
1028
1025
|
<span>HV04-04</span>
|
|
1029
|
-
<div className={styles.rectangle}
|
|
1026
|
+
<div className={styles.rectangle}>-</div>
|
|
1030
1027
|
</td>
|
|
1031
1028
|
<td></td>
|
|
1032
1029
|
</tr>
|
|
@@ -1039,7 +1036,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1039
1036
|
<td className={styles.spaceAfter}>Tested_ HIV+</td>
|
|
1040
1037
|
<td className={styles.textBox}>
|
|
1041
1038
|
<span>HV04-05</span>
|
|
1042
|
-
<div className={styles.rectangle}
|
|
1039
|
+
<div className={styles.rectangle}>-</div>
|
|
1043
1040
|
</td>
|
|
1044
1041
|
<td></td>
|
|
1045
1042
|
</tr>
|
|
@@ -1047,7 +1044,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1047
1044
|
<td className={styles.spaceAfter}>Tested_ HIV-</td>
|
|
1048
1045
|
<td className={styles.textBox}>
|
|
1049
1046
|
<span>HV04-06</span>
|
|
1050
|
-
<div className={styles.rectangle}
|
|
1047
|
+
<div className={styles.rectangle}>-</div>
|
|
1051
1048
|
</td>
|
|
1052
1049
|
<td></td>
|
|
1053
1050
|
</tr>
|
|
@@ -1065,7 +1062,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1065
1062
|
<td>Surgical</td>
|
|
1066
1063
|
<td className={styles.textBox}>
|
|
1067
1064
|
<span>HV04-07</span>
|
|
1068
|
-
<div className={styles.rectangle}
|
|
1065
|
+
<div className={styles.rectangle}>-</div>
|
|
1069
1066
|
</td>
|
|
1070
1067
|
<td></td>
|
|
1071
1068
|
</tr>
|
|
@@ -1073,7 +1070,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1073
1070
|
<td>Devices</td>
|
|
1074
1071
|
<td className={styles.textBox}>
|
|
1075
1072
|
<span>HV04-08</span>
|
|
1076
|
-
<div className={styles.rectangle}
|
|
1073
|
+
<div className={styles.rectangle}>-</div>
|
|
1077
1074
|
</td>
|
|
1078
1075
|
<td></td>
|
|
1079
1076
|
</tr>
|
|
@@ -1091,7 +1088,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1091
1088
|
<td>AE_During_Moderate</td>
|
|
1092
1089
|
<td className={styles.textBox}>
|
|
1093
1090
|
<span>HV04-09</span>
|
|
1094
|
-
<div className={styles.rectangle}
|
|
1091
|
+
<div className={styles.rectangle}>-</div>
|
|
1095
1092
|
</td>
|
|
1096
1093
|
<td></td>
|
|
1097
1094
|
</tr>
|
|
@@ -1099,7 +1096,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1099
1096
|
<td>AE_During_Severe</td>
|
|
1100
1097
|
<td className={styles.textBox}>
|
|
1101
1098
|
<span>HV04-10</span>
|
|
1102
|
-
<div className={styles.rectangle}
|
|
1099
|
+
<div className={styles.rectangle}>-</div>
|
|
1103
1100
|
</td>
|
|
1104
1101
|
<td></td>
|
|
1105
1102
|
</tr>
|
|
@@ -1112,7 +1109,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1112
1109
|
<td className={styles.spaceAfter}>AE_Post_Moderate</td>
|
|
1113
1110
|
<td className={styles.textBox}>
|
|
1114
1111
|
<span>HV04-11</span>
|
|
1115
|
-
<div className={styles.rectangle}
|
|
1112
|
+
<div className={styles.rectangle}>-</div>
|
|
1116
1113
|
</td>
|
|
1117
1114
|
<td></td>
|
|
1118
1115
|
</tr>
|
|
@@ -1120,7 +1117,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1120
1117
|
<td className={styles.spaceAfter}>AE_Post_Severe</td>
|
|
1121
1118
|
<td className={styles.textBox}>
|
|
1122
1119
|
<span>HV04-12</span>
|
|
1123
|
-
<div className={styles.rectangle}
|
|
1120
|
+
<div className={styles.rectangle}>-</div>
|
|
1124
1121
|
</td>
|
|
1125
1122
|
<td></td>
|
|
1126
1123
|
</tr>
|
|
@@ -1133,7 +1130,7 @@ const HivAndTBTreatmentComponent: React.FC<HivAndTBTreatmentComponentProps> = ({
|
|
|
1133
1130
|
<td className={styles.spaceAfter}>Follow up visit < 14d</td>
|
|
1134
1131
|
<td className={styles.textBox}>
|
|
1135
1132
|
<span>HV04-13</span>
|
|
1136
|
-
<div className={styles.rectangle}
|
|
1133
|
+
<div className={styles.rectangle}>-</div>
|
|
1137
1134
|
</td>
|
|
1138
1135
|
<td></td>
|
|
1139
1136
|
</tr>
|
|
@@ -61,13 +61,12 @@ export interface SummarySection {
|
|
|
61
61
|
|
|
62
62
|
const SEX = ['Male', 'Female'];
|
|
63
63
|
|
|
64
|
-
/* Sections still on the earlier datasets, whose figures and linelists do not yet
|
|
65
|
-
agree; they get totals once their queries are corrected */
|
|
66
64
|
/* Section 4: nothing reports these figures yet, on the form or here */
|
|
67
|
-
const NOT_REPORTED = 'Not yet reported by the system; these boxes
|
|
65
|
+
const NOT_REPORTED = 'Not yet reported by the system; these boxes show – on the form too.';
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
/* 3.7: the earlier figures were misleading, so they are withheld, here and on the form */
|
|
68
|
+
const TB_CLINIC_NOT_REPORTED =
|
|
69
|
+
"Not reported until this section's queries are corrected: the earlier figures were misleading, so these boxes show – on the form too.";
|
|
71
70
|
|
|
72
71
|
const prepPopulations = (codes: Record<string, [SummaryCell, SummaryCell]>): SummaryRow[] => [
|
|
73
72
|
{ label: 'General population', cells: codes.general },
|
|
@@ -190,6 +189,7 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
190
189
|
subsections: [
|
|
191
190
|
{
|
|
192
191
|
block: '2.1 Maternal HIV Testing',
|
|
192
|
+
note: 'PNC with no delivery date: PNC tests that fit neither PNC box (no delivery date, or one after the test), for data cleanup. Not on the form, so not in the total.',
|
|
193
193
|
tables: [
|
|
194
194
|
{
|
|
195
195
|
columns: ['Initial test', 'Retest'],
|
|
@@ -199,6 +199,8 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
199
199
|
{ label: 'L&D', cells: ['HV02-04', 'HV02-05'] },
|
|
200
200
|
{ label: 'PNC ≤6 weeks', cells: ['HV02-06', 'HV02-07'] },
|
|
201
201
|
{ label: 'PNC >6 weeks', cells: ['HV02-08', 'HV02-09'] },
|
|
202
|
+
/* not on the form: PNC tests no delivery date places either side of six weeks */
|
|
203
|
+
{ label: 'PNC with no delivery date', cells: ['PNC-NODD-I', 'PNC-NODD-R'], excluded: true },
|
|
202
204
|
/* known positives are not tested, so they are not tests */
|
|
203
205
|
{ label: 'Known positive at 1st ANC', only: 'HV02-01', excluded: true },
|
|
204
206
|
],
|
|
@@ -370,6 +372,7 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
370
372
|
{
|
|
371
373
|
/* two splits of the same clients, each with its own total */
|
|
372
374
|
block: '3.5 Differentiated Service Delivery',
|
|
375
|
+
note: 'Both tables are the clients on ART and add up to 3.2 Currently on ART. Not categorized: no stability, or no DSD model, recorded.',
|
|
373
376
|
tables: [
|
|
374
377
|
{
|
|
375
378
|
title: 'By stability',
|
|
@@ -377,7 +380,8 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
377
380
|
totalLabel: 'Total by stability',
|
|
378
381
|
rows: [
|
|
379
382
|
{ label: 'Established', only: 'HV03-033' },
|
|
380
|
-
{ label: 'Not established', only: '
|
|
383
|
+
{ label: 'Not established', only: 'DSD-NE' },
|
|
384
|
+
{ label: 'Not categorized', only: 'DSD-NC' },
|
|
381
385
|
],
|
|
382
386
|
},
|
|
383
387
|
{
|
|
@@ -385,18 +389,21 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
385
389
|
columns: [],
|
|
386
390
|
totalLabel: 'Total by model',
|
|
387
391
|
rows: [
|
|
388
|
-
{ label: 'Community', only: '
|
|
389
|
-
{ label: 'Facility', only: '
|
|
392
|
+
{ label: 'Community', only: 'DSD-CO' },
|
|
393
|
+
{ label: 'Facility', only: 'DSD-FA' },
|
|
394
|
+
{ label: 'Not categorized', only: 'DSD-MNC' },
|
|
390
395
|
],
|
|
391
396
|
},
|
|
392
397
|
],
|
|
393
398
|
},
|
|
394
399
|
{
|
|
395
400
|
block: '3.6 Nutrition and HIV',
|
|
396
|
-
note:
|
|
401
|
+
note: 'Clients on ART by their latest SAM / MAM status in the period, by age at the period end. Pregnant & lactating women are counted in their own row only, not in an age band.',
|
|
397
402
|
tables: [
|
|
398
403
|
{
|
|
399
404
|
columns: ['SAM+', 'MAM+', 'SAM+ on therapeutic foods', 'MAM+ on supplemental foods'],
|
|
405
|
+
totalLabel: 'Total',
|
|
406
|
+
/* a client is SAM or MAM, and food is of the same clients: no row total */
|
|
400
407
|
rowTotals: false,
|
|
401
408
|
rows: [
|
|
402
409
|
{ label: '0–5 months', cells: ['HV03-037', 'HV03-043', 'HV03-049', 'HV03-055'] },
|
|
@@ -404,22 +411,23 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
404
411
|
{ label: '5–9 years', cells: ['HV03-039', 'HV03-045', 'HV03-051', 'HV03-057'] },
|
|
405
412
|
{ label: '10–17 years', cells: ['HV03-040', 'HV03-046', 'HV03-052', 'HV03-058'] },
|
|
406
413
|
{ label: '18+ years', cells: ['HV03-041', 'HV03-047', 'HV03-053', 'HV03-059'] },
|
|
414
|
+
{ label: 'Pregnant & lactating', cells: ['HV03-042', 'HV03-048', 'HV03-054', 'HV03-060'] },
|
|
407
415
|
],
|
|
408
416
|
},
|
|
409
417
|
],
|
|
410
418
|
},
|
|
411
419
|
{
|
|
412
420
|
block: '3.7 HIV in TB Clinic',
|
|
413
|
-
note:
|
|
421
|
+
note: TB_CLINIC_NOT_REPORTED,
|
|
414
422
|
tables: [
|
|
415
423
|
{
|
|
416
424
|
columns: [],
|
|
417
425
|
rows: [
|
|
418
|
-
{ label: 'New TB cases'
|
|
419
|
-
{ label: 'Known HIV positive'
|
|
420
|
-
{ label: 'on HAART',
|
|
421
|
-
{ label: 'Newly tested HIV positive'
|
|
422
|
-
{ label: 'started HAART',
|
|
426
|
+
{ label: 'New TB cases' },
|
|
427
|
+
{ label: 'Known HIV positive' },
|
|
428
|
+
{ label: 'on HAART', ofWhich: true },
|
|
429
|
+
{ label: 'Newly tested HIV positive' },
|
|
430
|
+
{ label: 'started HAART', ofWhich: true },
|
|
423
431
|
],
|
|
424
432
|
},
|
|
425
433
|
],
|
|
@@ -489,7 +497,7 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
489
497
|
subsections: [
|
|
490
498
|
{
|
|
491
499
|
block: '5. Post Exposure Prophylaxis',
|
|
492
|
-
note:
|
|
500
|
+
note: 'Other includes sexual assault. Given PEP is of the exposed.',
|
|
493
501
|
tables: [
|
|
494
502
|
{
|
|
495
503
|
title: 'Exposed',
|
|
@@ -503,6 +511,7 @@ export const MOH_731_SUMMARY: SummarySection[] = [
|
|
|
503
511
|
{
|
|
504
512
|
title: 'Given PEP',
|
|
505
513
|
columns: [],
|
|
514
|
+
totalLabel: 'Total given PEP',
|
|
506
515
|
rows: [
|
|
507
516
|
{ label: 'Occupational', only: 'HV05-03' },
|
|
508
517
|
{ label: 'Other', only: 'HV05-04' },
|
package/src/reports/moh-740/registers/moh-270-permanent-register/moh-270-permanent-register.tsx
CHANGED
|
@@ -15,6 +15,7 @@ const Moh270DailyRegister: React.FC<Moh270DailyRegisterProps> = ({ moh270Patient
|
|
|
15
15
|
<TableHeader>No</TableHeader>
|
|
16
16
|
<TableHeader>Date</TableHeader>
|
|
17
17
|
<TableHeader>Encounter Date</TableHeader>
|
|
18
|
+
<TableHeader>RTC Date</TableHeader>
|
|
18
19
|
<TableHeader>Patient No</TableHeader>
|
|
19
20
|
<TableHeader>Name</TableHeader>
|
|
20
21
|
<TableHeader>D.O.B</TableHeader>
|
|
@@ -36,6 +37,7 @@ const Moh270DailyRegister: React.FC<Moh270DailyRegisterProps> = ({ moh270Patient
|
|
|
36
37
|
<TableCell>{index + 1}</TableCell>
|
|
37
38
|
<TableCell>{p?.enrollment_date ?? ''}</TableCell>
|
|
38
39
|
<TableCell>{p?.encounter_date ?? ''}</TableCell>
|
|
40
|
+
<TableCell>{p?.rtc_date ?? ''}</TableCell>
|
|
39
41
|
<TableCell>{p.amrs_universal_id}</TableCell>
|
|
40
42
|
<TableCell>
|
|
41
43
|
<Link href={`${window.spaBase}/patient/${p.patient_uuid}/chart/`}>{p.person_name}</Link>
|
|
@@ -36,6 +36,8 @@ export const MOH_222_COLUMNS: RegisterColumn[] = [
|
|
|
36
36
|
export const MOH_270_COLUMNS: RegisterColumn[] = [
|
|
37
37
|
{ header: 'No', value: (_row, index) => index + 1 },
|
|
38
38
|
{ header: 'Date', value: (r) => r.encounter_date ?? '' },
|
|
39
|
+
{ header: 'Encounter Date', value: (r) => r.encounter_date ?? '' },
|
|
40
|
+
{ header: 'RTC Date', value: (r) => r.rtc_date ?? ''},
|
|
39
41
|
{ header: 'Patient No', value: (r) => r.amrs_universal_id ?? '' },
|
|
40
42
|
{ header: 'Name', value: (r) => r.person_name ?? '' },
|
|
41
43
|
{ header: 'D.O.B', value: (r) => r.birthdate ?? '' },
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { openmrsFetch } from '@openmrs/esm-framework';
|
|
2
|
+
import { buildEtlUrl } from '../utils/get-base-url';
|
|
3
|
+
|
|
4
|
+
interface Moh362Params {
|
|
5
|
+
locationUuids: string;
|
|
6
|
+
startDate: string;
|
|
7
|
+
endDate: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* MOH 362 HTS Lab, Referral & Linkage Register: one row per test in the
|
|
12
|
+
* period -- the same tests as MOH 731 1.1 HIV Tests -- for the whole facility of
|
|
13
|
+
* the location, with the register's details.
|
|
14
|
+
*/
|
|
15
|
+
export async function getMoh362(params: Moh362Params): Promise<Array<Record<string, unknown>>> {
|
|
16
|
+
const url = await buildEtlUrl('moh-362-register', {
|
|
17
|
+
locationUuids: params.locationUuids,
|
|
18
|
+
startDate: params.startDate,
|
|
19
|
+
endDate: params.endDate,
|
|
20
|
+
});
|
|
21
|
+
const response = await openmrsFetch(url);
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
throw new Error(`Failed to fetch the MOH 362 register: ${response.status} - ${await response.text()}`);
|
|
24
|
+
}
|
|
25
|
+
const data = await response.json();
|
|
26
|
+
return Array.isArray(data) ? data : [];
|
|
27
|
+
}
|
package/src/root.component.tsx
CHANGED
|
@@ -24,6 +24,7 @@ import Moh731Report from './reports/moh-731/moh-731.component';
|
|
|
24
24
|
import Moh366Register from './reports/moh-731/registers/moh-366.component';
|
|
25
25
|
import PrepRegisterComponent from './reports/moh-731/registers/prep-register.component';
|
|
26
26
|
import Moh731Linelist from './reports/moh-731/linelist/moh-731-linelist.component';
|
|
27
|
+
import Moh362Register from './registers/moh-362/moh-362.component';
|
|
27
28
|
import styles from './root.scss';
|
|
28
29
|
import Moh510RegisterComponent from './reports/moh-710/registers/moh-510/moh-510.component';
|
|
29
30
|
|
|
@@ -59,6 +60,7 @@ const RootComponent: React.FC = () => {
|
|
|
59
60
|
<Route path="/moh-366-register" element={<Moh366Register />} />
|
|
60
61
|
<Route path="/prep-register" element={<PrepRegisterComponent />} />
|
|
61
62
|
<Route path="/moh-510-register" element={<Moh510RegisterComponent />} />
|
|
63
|
+
<Route path="/moh-362" element={<Moh362Register />} />
|
|
62
64
|
</Routes>
|
|
63
65
|
</div>
|
|
64
66
|
</BrowserRouter>
|