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

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 +54 -62
  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 +45 -53
  108. package/src/reports/moh-706/sub-reports/histology-and-cytology/histology-and-cytology.component.tsx +44 -59
  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 +27 -35
  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 +44 -52
  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,119 @@
1
+ import { type RegisterColumn } from '../../../common/report-register';
2
+
3
+ /**
4
+ * MOH 333 as the register prints it: one column per cell, in the order they appear.
5
+ *
6
+ * The last 8 columns are rendered by the table but have no headings above
7
+ * them -- the header row is 53 columns wide against 61 of data. They carry
8
+ * their field names rather than headings borrowed from neighbouring columns.
9
+ */
10
+ export const moh333ExportColumns: RegisterColumn[] = [
11
+ { header: 'Date of Admission (dd/mm/yyyy)', value: (row) => row.date_of_admission ?? '' },
12
+ { header: 'AMRSID', value: (row) => row.amrsID ?? '' },
13
+ { header: 'Admission number (yyyy-mm-nnnn) - NUPI', value: (row) => row.admission_number ?? '' },
14
+ { header: 'Full Name (First, Middle, surname)', value: (row) => row.full_names ?? '' },
15
+ { header: 'Date of Birth (dd/mm/yyyy) - Age', value: (row) => row.date_of_birth ?? '' },
16
+ { header: 'County/ Subcounty', value: (row) => row.subcounty_county ?? '' },
17
+ { header: 'Village/ Estate/ Land mark - Phone number', value: (row) => row.village_estate_landmark ?? '' },
18
+ {
19
+ header: 'Marital Status 1 = Married 2 = Widowed 3 = Single 4 = Divorced 5 = Separated',
20
+ value: (row) => row.marital_status ?? '',
21
+ },
22
+ { header: 'Parity (X+Y)', value: (row) => row.parity ?? '' },
23
+ { header: 'Gravidae', value: (row) => row.gravidae ?? '' },
24
+ { header: 'No. of ANC visits', value: (row) => row.no_of_anc_visits ?? '' },
25
+ { header: 'Date of Last Menstrual Period (LMP) (dd/mm/yyyy)', value: (row) => row.lmp ?? '' },
26
+ { header: 'Estimated Date of Delivery (EDD) (dd/mm/yyyy)', value: (row) => row.edd ?? '' },
27
+ { header: 'Diagnosis', value: (row) => row.diagnosis ?? '' },
28
+ { header: 'Delivery - Duration of labour (hours)', value: (row) => row.duration_of_labour ?? '' },
29
+ { header: 'Delivery - Date of Delivery (dd/mm/yyyy)', value: (row) => row.date_of_delivery ?? '' },
30
+ { header: 'Delivery - Time of Delivery', value: (row) => row.time_of_delivery ?? '' },
31
+ { header: 'Delivery - Gestation at Birth (wks)', value: (row) => row.gestation_at_birth ?? '' },
32
+ { header: 'Delivery - Mode of Delivery 1) SVD 2) CS 3) Breech 4) AVD', value: (row) => row.mode_of_delivery ?? '' },
33
+ { header: 'Delivery - No.of babies delivered', value: (row) => row.no_of_babies_delivered ?? '' },
34
+ { header: 'Delivery - Placenta Complete 1=Yes 2=No 3=BBA', value: (row) => row.placenta_complete ?? '' },
35
+ {
36
+ header: 'Delivery - Uterotonic given 1=oxytocin 2=Carbetocin 3=Others Specify 4= None',
37
+ value: (row) => row.uterotonic_given ?? '',
38
+ },
39
+ {
40
+ header: 'Delivery - Vaginal Examination 1= Normal 2=Episiotomy 3=Vaginal tear 4=FGM 5=Vaginal warts',
41
+ value: (row) => row.vaginal_examination ?? '',
42
+ },
43
+ { header: 'Delivery - Blood loss (mls)', value: (row) => row.blood_loss ?? '' },
44
+ {
45
+ header: "Delivery - Mother's status after Delivery (Alive/ Dead)",
46
+ value: (row) => row.mother_status_after_delivery ?? '',
47
+ },
48
+ {
49
+ header: 'Delivery - Maternal deaths Notified (Y/N/NA) - Date Death notified',
50
+ value: (row) => row.maternal_deaths_notified ?? '',
51
+ },
52
+ {
53
+ header:
54
+ 'Delivery - Delivery Complications 1=A.P.H. (Ante Partum Haemorrhage); 2=P.P.H. (Post Partum Haemorrhage); 3= Eclampsia; 4=Ruptured Uterus; 5=Obstructed labour; 6=Sepsis 7= NA',
55
+ value: (row) => row.delivery_complications ?? '',
56
+ },
57
+ { header: 'APGAR Score', value: (row) => row.apgar_score ?? '' },
58
+ { header: 'Birth Outcome (LB/FSB/ MSB)', value: (row) => row.birth_outcome ?? '' },
59
+ { header: 'Birth Weight (grams)', value: (row) => row.birth_weight ?? '' },
60
+ { header: 'Sex (M/F)', value: (row) => row.sex ?? '' },
61
+ {
62
+ header: 'Initiated on BF in < 1hr (Y/N) - Kangaroo Mother Care (Y/N)',
63
+ value: (row) => row.initiated_on_bf_less_one_hour ?? '',
64
+ },
65
+ { header: 'TEO given at birth? (Y/N)', value: (row) => row.teo_given_at_birth ?? '' },
66
+ { header: 'Chlorhexidine applied on cord stump (Y/N)', value: (row) => row.chlorhexdine_applied_on_cord_stump ?? '' },
67
+ {
68
+ header: 'Birth with deformity (Y/N) - 1- congenital syphilis. 2- spina bifida, 3- Hydrocephalus, 4- Talipes',
69
+ value: (row) => row.birth_with_deformity ?? '',
70
+ },
71
+ { header: 'Given Vitamin K (Y/N)', value: (row) => row.given_vitamin_k ?? '' },
72
+ {
73
+ header: 'VDRL/ RPR Results (Specify 1-VDRL 2-RPR 3-Duo testing) - (P/N/ND)',
74
+ value: (row) => row.duo_test_result ?? '',
75
+ },
76
+ {
77
+ header: 'Baby - HIV Test 1 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
78
+ value: (row) => row.hiv_test_1_kit_name ?? '',
79
+ },
80
+ {
81
+ header: 'Baby - HIV Test 2 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
82
+ value: (row) => row.hiv_test_2_kit_name ?? '',
83
+ },
84
+ {
85
+ header: 'Baby - HIV Test 3 - Kit Name: - Lot No. - Expiry / / - (N/P/I/NA)',
86
+ value: (row) => row.hiv_test_3_kit_name ?? '',
87
+ },
88
+ {
89
+ header: 'Baby - HIV Result Maternity (N/P/Inc/U/NA) - Initial/Retest/ NA',
90
+ value: (row) => row.hiv_test_results_maternity ?? '',
91
+ },
92
+ { header: 'Maternal HAART - Start at Maternity - (Y/N/NA)', value: (row) => row.maternal_haart ?? '' },
93
+ { header: 'Infant Prophylaxis - (Y/N/NA)', value: (row) => row.infant_prophylaxis ?? '' },
94
+ { header: 'Partner Tested for HIV - (Y/N/NA)', value: (row) => row.partner_tested_for_hiv ?? '' },
95
+ { header: 'Counselled on infant feeding (Y/N/NA)', value: (row) => row.counselled_on_infant_feeding ?? '' },
96
+ { header: 'Delivery Conducted by (Enter Name)', value: (row) => row.deleivery_conducted_by ?? '' },
97
+ { header: 'Birth Notification Number', value: (row) => row.birth_notification_number ?? '' },
98
+ { header: 'Discharge - Date (dd/mm/yyyy)', value: (row) => row.discharge_date ?? '' },
99
+ { header: 'Discharge - Status of Baby A= Alive D= Dead', value: (row) => row.discharge_status_of_baby ?? '' },
100
+ {
101
+ header: 'Referral - From - 1= From Community Unit, 2= From Another Health Facility, 3=Not Applicable',
102
+ value: (row) => row.referrals_from ?? '',
103
+ },
104
+ {
105
+ header:
106
+ 'Referral - To - 1= To Community Unit, 2=Referred to HIV preventive services 3=Another Health Facility, 4=Not Applicable',
107
+ value: (row) => row.referrals_to ?? '',
108
+ },
109
+ { header: 'Referral - Reason for referral', value: (row) => row.reasons_for_refferal ?? '' },
110
+ { header: 'Comments', value: (row) => row.comments ?? '' },
111
+ { header: 'Nupi', value: (row) => row.nupi ?? '' },
112
+ { header: 'Age', value: (row) => row.age ?? '' },
113
+ { header: 'Phone number', value: (row) => row.phone_number ?? '' },
114
+ { header: 'Date maternal death notified', value: (row) => row.date_maternal_death_notified ?? '' },
115
+ { header: 'Kangaroo mother care', value: (row) => row.kangaroo_mother_care ?? '' },
116
+ { header: 'Type of deformity', value: (row) => row.type_of_deformity ?? '' },
117
+ { header: 'Hiv test type', value: (row) => row.hiv_test_type ?? '' },
118
+ { header: 'Hiv test type', value: (row) => row.hiv_test_type ?? '' },
119
+ ];
@@ -0,0 +1,520 @@
1
+ import { TableCell, TableRow } from '@carbon/react';
2
+ import React from 'react';
3
+ import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
4
+
5
+ import styles from '../../../common/report-register/register-table.scss';
6
+ import classNames from 'classnames';
7
+ import { getMoh405PatientList } from '../../../resources/moh-711.resource';
8
+ import { moh405Columns } from './type';
9
+ import { moh405ExportColumns } from './moh-405.columns';
10
+ import { RegisterLayout, usePatientList } from '../../../common/report-register';
11
+
12
+ const Moh405Register: React.FC = () => {
13
+ const [searchParams] = useSearchParams();
14
+ const location = useLocation();
15
+
16
+ const startDate = searchParams.get('startDate');
17
+ const endDate = searchParams.get('endDate');
18
+ const locationUuids = searchParams.get('locationUuids');
19
+ const indicator = searchParams.get('indicator');
20
+ const reportName = location.state?.reportName || '';
21
+
22
+ const {
23
+ rows: patientlist,
24
+ total,
25
+ isTotalExact,
26
+ isLoading,
27
+ page,
28
+ pageSize,
29
+ onPageChange,
30
+ fetchAll,
31
+ } = usePatientList(
32
+ ({ startIndex, limit }) =>
33
+ getMoh405PatientList({
34
+ startDate,
35
+ endDate,
36
+ locationUuids,
37
+ indicator,
38
+ reportName,
39
+ startIndex,
40
+ limit,
41
+ }),
42
+ [startDate, endDate, locationUuids, indicator, reportName],
43
+ );
44
+ return (
45
+ <RegisterLayout
46
+ parentLabel="MOH-711 Report"
47
+ parentPath="/moh-711"
48
+ title="MOH 405 ANC Register"
49
+ isLoading={isLoading}
50
+ isEmpty={patientlist.length === 0}
51
+ page={page}
52
+ pageSize={pageSize}
53
+ total={total}
54
+ isTotalExact={isTotalExact}
55
+ onPageChange={onPageChange}
56
+ fetchAll={fetchAll}
57
+ columns={moh405ExportColumns}
58
+ >
59
+ <div className={styles.tableContainer}>
60
+ <table className={classNames(`${styles.table}`, `${styles.tableBordered}`, `${styles.tableStriped}`)}>
61
+ <thead>
62
+ <tr>
63
+ <th rowSpan={7}>Date of visit</th>
64
+ <th>(New Client)</th>
65
+ <th rowSpan={7}>
66
+ ANC <br />
67
+ Number/NUPI
68
+ <br />
69
+ (Re Visit)
70
+ </th>
71
+ <th rowSpan={7}>AMRSID</th>
72
+ <th rowSpan={7}>
73
+ Number of <br />
74
+ Visits <br />
75
+ (1st,2nd,3rd,
76
+ <br />
77
+ 4th ….)
78
+ </th>
79
+ <th rowSpan={7}>
80
+ Full Name
81
+ <br />
82
+ (First, Middle, Surname)
83
+ </th>
84
+ <th rowSpan={1}>
85
+ Date of Birth
86
+ <br />
87
+ (DD/MM/YYYY)
88
+ </th>
89
+ <th rowSpan={7}>Subcounty/ County</th>
90
+ <th rowSpan={1}>Village/Estate/ Landmark</th>
91
+ <th rowSpan={7}>
92
+ <u>Marital Status</u>
93
+ <br />
94
+ NM=Never <br />
95
+ Married/Single
96
+ <br />
97
+ MM=Married <br />
98
+ Monogamous
99
+ <br />
100
+ MP=Married
101
+ <br />
102
+ Polygamous
103
+ <br />
104
+ W=Widowed
105
+ <br />
106
+ D=Divorced
107
+ <br />
108
+ S=Separated
109
+ </th>
110
+ <th rowSpan={7}>Parity</th>
111
+ <th rowSpan={7}>Gravidae</th>
112
+ <th rowSpan={1}>
113
+ Date of Last Menstrual <br />
114
+ Period (LMP)
115
+ </th>
116
+ <th rowSpan={1}>Expected Date of Delivery (EDD)</th>
117
+ <th rowSpan={7}>
118
+ Gestation in
119
+ <br />
120
+ Weeks
121
+ </th>
122
+ <th rowSpan={7}>
123
+ MUAC <br />
124
+ 1= Green, <br />
125
+ 2=Yellow, <br />
126
+ 3=Red
127
+ </th>
128
+ <th rowSpan={7}>Height (cm)</th>
129
+ <th rowSpan={7}>Weight (kg)</th>
130
+ <th rowSpan={7}>Blood Pressure</th>
131
+ <th rowSpan={7}>
132
+ Breast Exam
133
+ <br />
134
+ 1=normal <br />
135
+ 2=abnormal
136
+ </th>
137
+ <th rowSpan={1}>FGM (Y/N)</th>
138
+ <th rowSpan={1} colSpan={12}>
139
+ Laboratory
140
+ </th>
141
+ <th rowSpan={1}>Maternal HAART</th>
142
+ <th rowSpan={1}>Infant Prophylaxis</th>
143
+ <th rowSpan={1}>Partner HIV Testing</th>
144
+ <th rowSpan={1}>Other Conditions and Treatment</th>
145
+ <th rowSpan={1}>Deworming</th>
146
+ <th rowSpan={1}>IPT 1-3</th>
147
+ <th rowSpan={1}>TT Dose</th>
148
+ <th rowSpan={1}>Supplementation</th>
149
+ <th rowSpan={1}>LLITNs</th>
150
+ <th rowSpan={1} colSpan={3}>
151
+ Referrrals
152
+ </th>
153
+ <th rowSpan={7}>Remarks</th>
154
+ </tr>
155
+ <tr>
156
+ <th>ANC Number</th>
157
+ <th rowSpan={6}>Age</th>
158
+ <th rowSpan={6}>Phone Number</th>
159
+ <th rowSpan={6}>(dd/mm/yyyy)</th>
160
+ <th rowSpan={6}>(dd/mm/yyyy)</th>
161
+ <th rowSpan={6}>
162
+ FGM associated <br />
163
+ complications:
164
+ <br />
165
+ 1=Scarring
166
+ <br />
167
+ 2=Keloids
168
+ <br />
169
+ 3=Dyspaneuria
170
+ <br />
171
+ 4=UTI 5 = NA
172
+ </th>
173
+ <th rowSpan={6}>
174
+ Haemoglobin <br />
175
+ (Level/ ND/NA)
176
+ </th>
177
+ <th rowSpan={6}>
178
+ Blood Sugar Testing <br />
179
+ for Diabetes: <br />
180
+ 1=RBS&lt; 11.1 <br />
181
+ mmol/L, No <br />
182
+ Diabetes,
183
+ <br />
184
+ 2=RBS&gt;11.1
185
+ <br />
186
+ mmol/L, Has <br />
187
+ Diabetes,
188
+ <br />
189
+ 3=No RBS done
190
+ </th>
191
+ <th rowSpan={6}>
192
+ Blood group <br />
193
+ and rhesus <br />
194
+ (Y/N)
195
+ </th>
196
+ <th rowSpan={6}>
197
+ Urinalysis
198
+ <br />
199
+ (Y/N)
200
+ </th>
201
+ <th rowSpan={1}>
202
+ Type of Test <br />
203
+ RPR/ VDRL/ <br />
204
+ Duo Test/ NA
205
+ </th>
206
+ <th rowSpan={1}>
207
+ Hepatitis B virus <br />
208
+ Sceening Result
209
+ <br />
210
+ (P/N/ND)
211
+ </th>
212
+ <th rowSpan={1}>
213
+ TB Screening:
214
+ <br />
215
+ Codes (1-5)
216
+ </th>
217
+ <th rowSpan={1} colSpan={5}></th>
218
+ <th rowSpan={6}>
219
+ N = New on ART.
220
+ <br />
221
+ OA = On ART
222
+ <br />
223
+ NA = Not
224
+ <br />
225
+ Applicable
226
+ </th>
227
+ <th rowSpan={6}>
228
+ AN = AZT&NVP <br />
229
+ A = AZT
230
+ <br />
231
+ N = NVP
232
+ <br />
233
+ NA
234
+ </th>
235
+ <th rowSpan={6}>N/P/KP/NA</th>
236
+ <th rowSpan={1}>
237
+ 1=Hypertension; <br />
238
+ 2=Diabetes; <br />
239
+ 3=Epilepsy; <br />
240
+ 4=Malaria in Pregnancy; <br />
241
+ 5=STIs/RTI; <br />
242
+ 6=Others (Specify) <br />
243
+ 7=None <br />
244
+ Record all that apply
245
+ </th>
246
+ <th rowSpan={6}>(Y/N/NA)</th>
247
+ <th rowSpan={6}>(1,2,3,N,NA)</th>
248
+ <th rowSpan={6}>
249
+ 1=TT Dose 1st <br />
250
+ dose 2=2nd dose <br />
251
+ 3=3rd dose <br />
252
+ 4=4th dose <br />
253
+ 5=5th dose <br />
254
+ NA=None
255
+ </th>
256
+ <th rowSpan={6}>
257
+ Given
258
+ <br />
259
+ Supplementation <br />
260
+ 1=Combined IFAs
261
+ <br />
262
+ 2=Iron <br />
263
+ 3=Folate <br />
264
+ 4=Iron+Folate <br />
265
+ Separately <br />
266
+ 5=Calcium
267
+ </th>
268
+ <th rowSpan={6}>
269
+ Received
270
+ <br />
271
+ LLITNs <br />
272
+ (Y/N)
273
+ </th>
274
+ <th rowSpan={1}>From</th>
275
+ <th rowSpan={1}>To</th>
276
+ <th rowSpan={6}>
277
+ Reason for referral
278
+ <br />
279
+ (specify)
280
+ </th>
281
+ </tr>
282
+ <tr>
283
+ <th rowSpan={5}>NUPI</th>
284
+ <th rowSpan={5}>
285
+ Test Results <br />
286
+ (P/N/NA)
287
+ </th>
288
+ <th rowSpan={5}>
289
+ Treatment
290
+ <br />
291
+ (Y/N/NA)
292
+ </th>
293
+ <th rowSpan={5}>
294
+ 1=Presumed TB <br />
295
+ 2=No Signs <br />
296
+ 3=On TB <br />
297
+ Treatment <br />
298
+ 4=On TPT
299
+ <br />
300
+ 5=Not Done
301
+ </th>
302
+ <th rowSpan={1}>
303
+ HIV Testing <br />
304
+ (Initial or Retest,
305
+ <br />
306
+ Known Poitive or <br />
307
+ Revisit)
308
+ </th>
309
+ <th rowSpan={1}>HIV Test 1</th>
310
+ <th rowSpan={1}>HIV Test 2</th>
311
+ <th rowSpan={1}>HIV Test 3</th>
312
+ <th rowSpan={1}>HIV Results</th>
313
+ <th rowSpan={5}>Treatment (Y/N/NA)</th>
314
+ <th rowSpan={5}>
315
+ 1=From <br />
316
+ Community Unit <br />
317
+ 2=Another
318
+ <br />
319
+ Health Facility <br />
320
+ 3=Not Applicable
321
+ </th>
322
+ <th rowSpan={5}>
323
+ 1=To Community <br />
324
+ Unit <br />
325
+ 2=HIV preventive <br />
326
+ services
327
+ <br />
328
+ 3=Another Health <br />
329
+ Facility 4=Not <br />
330
+ Applicable
331
+ </th>
332
+ </tr>
333
+ <tr>
334
+ <th rowSpan={5}>(I/R/KP/ND/Rev)</th>
335
+ <th rowSpan={1}>Kit Name</th>
336
+ <th rowSpan={1}>Kit Name</th>
337
+ <th rowSpan={1}>Kit Name</th>
338
+ <th rowSpan={5}>(N/P/Ic/U/N A)</th>
339
+ </tr>
340
+ <tr>
341
+ <th rowSpan={1}>Expiry / /</th>
342
+ <th rowSpan={1}>Expiry / /</th>
343
+ <th rowSpan={1}>Expiry / /</th>
344
+ </tr>
345
+ <tr>
346
+ <th rowSpan={1}>(N/P/I/NA)</th>
347
+ <th rowSpan={1}>(N/P/I/NA)</th>
348
+ <th rowSpan={1}>(N/P/I/NA)</th>
349
+ </tr>
350
+ </thead>
351
+ <tbody>
352
+ <tr>
353
+ <td className={styles.textCentre}>(a)</td>
354
+ <td className={styles.textCentre}>(b)</td>
355
+ <td className={styles.textCentre}>(c)</td>
356
+ <td className={styles.textCentre}>(d)</td>
357
+ <td className={styles.textCentre}>(e)</td>
358
+ <td className={styles.textCentre}>(f)</td>
359
+ <td className={styles.textCentre}>(g)</td>
360
+ <td className={styles.textCentre}>(h)</td>
361
+ <td className={styles.textCentre}>(i)</td>
362
+ <td className={styles.textCentre}>(j)</td>
363
+ <td className={styles.textCentre}>(k)</td>
364
+ <td className={styles.textCentre}>(l)</td>
365
+ <td className={styles.textCentre}>(m)</td>
366
+ <td className={styles.textCentre}>(n)</td>
367
+ <td className={styles.textCentre}>(o)</td>
368
+ <td className={styles.textCentre}>(p)</td>
369
+ <td className={styles.textCentre}>(q)</td>
370
+ <td className={styles.textCentre}>(r)</td>
371
+ <td className={styles.textCentre}>(s)</td>
372
+ <td className={styles.textCentre}>(t)</td>
373
+ <td className={styles.textCentre}>(u)</td>
374
+ <td className={styles.textCentre}>(v)</td>
375
+ <td className={styles.textCentre}>(w)</td>
376
+ <td className={styles.textCentre}>(x)</td>
377
+ <td className={styles.textCentre}>(y)</td>
378
+ <td className={styles.textCentre}>(z)</td>
379
+ <td className={styles.textCentre}>(aa)</td>
380
+ <td className={styles.textCentre}>(ab)</td>
381
+ <td className={styles.textCentre}>(ac)</td>
382
+ <td className={styles.textCentre}>(ad)</td>
383
+ <td className={styles.textCentre}>(ae)</td>
384
+ <td className={styles.textCentre}>(af)</td>
385
+ <td className={styles.textCentre}>(ag)</td>
386
+ <td className={styles.textCentre}>(ah)</td>
387
+ <td className={styles.textCentre}>(ai)</td>
388
+ <td className={styles.textCentre}>(aj)</td>
389
+ <td className={styles.textCentre}>(ak)</td>
390
+ <td className={styles.textCentre}>(al)</td>
391
+ <td className={styles.textCentre}>(am)</td>
392
+ <td className={styles.textCentre}>(an)</td>
393
+ <td className={styles.textCentre}>(ao)</td>
394
+ <td className={styles.textCentre}>(ap)</td>
395
+ <td className={styles.textCentre}>(aq)</td>
396
+ <td className={styles.textCentre}>(ar)</td>
397
+ <td className={styles.textCentre}>(as)</td>
398
+ <td className={styles.textCentre}>(at)</td>
399
+ </tr>
400
+ {patientlist?.length > 0 ? (
401
+ patientlist.map((patient, rowIndex) => (
402
+ <React.Fragment key={rowIndex}>
403
+ <tr>
404
+ <td rowSpan={2}>
405
+ {patient.date_of_visit ? new Date(patient.date_of_visit).toLocaleDateString('en-GB') : ''}
406
+ </td>
407
+ <td>{patient.anc_number}</td>
408
+ <td rowSpan={2}>{patient.anc_number}</td>
409
+ <td rowSpan={2}>{patient.amrs_id}</td>
410
+ <td rowSpan={2}>{patient.number_of_anc_visits}</td>
411
+ <td rowSpan={2}>{patient.full_names}</td>
412
+ <td>{patient.date_of_birth ? new Date(patient.date_of_birth).toLocaleDateString('en-GB') : ''}</td>
413
+ <td rowSpan={2}>{patient.subcounty_county}</td>
414
+ <td>{patient.village_estate_landmark}</td>
415
+ <td rowSpan={2}>{patient.marital_status}</td>
416
+ <td rowSpan={2}>{patient.parity}</td>
417
+ <td rowSpan={2}>{patient.gravidae}</td>
418
+ <td rowSpan={2}>
419
+ {patient.last_lmp_date ? new Date(patient.last_lmp_date).toLocaleDateString('en-GB') : ''}
420
+ </td>
421
+ <td rowSpan={2}>{patient.edd ? new Date(patient.edd).toLocaleDateString('en-GB') : ''}</td>
422
+ <td rowSpan={2}>{patient.gestation_in_weeks}</td>
423
+ <td rowSpan={2}>{patient.muac}</td>
424
+ <td rowSpan={2}>{patient.height}</td>
425
+ <td rowSpan={2}>{patient.weight}</td>
426
+ <td rowSpan={2}>{patient.blood_pressure}</td>
427
+ <td rowSpan={2}>{patient.breast_exam}</td>
428
+ <td>{patient.fgm}</td>
429
+ <td rowSpan={2}>{patient.haemoglobin}</td>
430
+ <td rowSpan={2}>{patient.blood_sugar_test}</td>
431
+ <td rowSpan={2}>{patient.blood_group_rhesus}</td>
432
+ <td rowSpan={2}>{patient.urinalysis}</td>
433
+ <td>{patient.rpr_vdrl_duo}</td>
434
+ <td>{patient.hepatitisB}</td>
435
+ <td rowSpan={2}>{patient.tb_screening}</td>
436
+ <td rowSpan={2}>{patient.hiv_test_type}</td>
437
+
438
+ <td>
439
+ {patient.hiv_test_1_kit_name} / {patient.hiv_test_1_lot_no} /{' '}
440
+ {patient.hiv_test_1_expiry_date
441
+ ? new Date(patient.hiv_test_1_expiry_date).toLocaleDateString('en-GB')
442
+ : ''}{' '}
443
+ / {patient.hiv_test_1_test_result}
444
+ </td>
445
+
446
+ <td>
447
+ {patient.hiv_test_2_kit_name} / {patient.hiv_test_2_lot_number} /{' '}
448
+ {patient.hiv_test_2_expiry_date
449
+ ? new Date(patient.hiv_test_2_expiry_date).toLocaleDateString('en-GB')
450
+ : ''}{' '}
451
+ / {patient.hiv_test_2_test_result}
452
+ </td>
453
+
454
+ <td>
455
+ {patient.hiv_test_3_kit_name} / {patient.hiv_test_3_lot_number} /{' '}
456
+ {patient.hiv_test_3_expiry_date
457
+ ? new Date(patient.hiv_test_3_expiry_date).toLocaleDateString('en-GB')
458
+ : ''}{' '}
459
+ / {patient.hiv_test_3_test_result}
460
+ </td>
461
+
462
+ <td rowSpan={2}>{patient.hiv_results}</td>
463
+ <td rowSpan={2}>{patient.maternal_haart}</td>
464
+ <td rowSpan={2}>{patient.infant_prophylaxis}</td>
465
+ <td rowSpan={2}>{patient.partner_hiv_testing}</td>
466
+ <td>{patient.other_conditions}</td>
467
+ <td rowSpan={2}>{patient.deworming}</td>
468
+ <td rowSpan={2}>{patient.ipt_1_3}</td>
469
+ <td rowSpan={2}>{patient.tt_dose}</td>
470
+ <td rowSpan={2}>{patient.supplementation}</td>
471
+ <td rowSpan={2}>{patient.llitns}</td>
472
+ <td rowSpan={2}>{patient.referrals_from}</td>
473
+ <td rowSpan={2}>{patient.referrals_to}</td>
474
+ <td rowSpan={2}>{patient.reason_for_referral}</td>
475
+ <td rowSpan={2}>{patient.remarks}</td>
476
+ </tr>
477
+
478
+ <tr>
479
+ <td>{patient.nupi}</td>
480
+ <td>{patient.age}</td>
481
+ <td>{patient.phone_number}</td>
482
+ <td>{patient.fgm_complications}</td>
483
+ <td>{patient.rpr_vdrl_duo_results}</td>
484
+ <td>{patient.hepatitisB_treatment}</td>
485
+
486
+ <td>
487
+ {patient.hiv_test_1_expiry_date
488
+ ? new Date(patient.hiv_test_1_expiry_date).toLocaleDateString('en-GB')
489
+ : ''}
490
+ </td>
491
+
492
+ <td>
493
+ {patient.hiv_test_2_expiry_date
494
+ ? new Date(patient.hiv_test_2_expiry_date).toLocaleDateString('en-GB')
495
+ : ''}
496
+ </td>
497
+
498
+ <td>
499
+ {patient.hiv_test_3_expiry_date
500
+ ? new Date(patient.hiv_test_3_expiry_date).toLocaleDateString('en-GB')
501
+ : ''}
502
+ </td>
503
+
504
+ <td>{patient.other_conditions_treatment}</td>
505
+ </tr>
506
+ </React.Fragment>
507
+ ))
508
+ ) : (
509
+ <TableRow>
510
+ <TableCell colSpan={moh405Columns.length}>No data available</TableCell>
511
+ </TableRow>
512
+ )}
513
+ </tbody>
514
+ </table>
515
+ </div>
516
+ </RegisterLayout>
517
+ );
518
+ };
519
+
520
+ export default Moh405Register;