@kenyaemr/esm-ward-app 8.5.4-pre.76 → 8.5.4-pre.8

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 (256) hide show
  1. package/package.json +1 -1
  2. package/src/config-schema.ts +365 -6
  3. package/src/in-patient/inpatient-tabs.component.tsx +84 -3
  4. package/src/in-patient/labourCareGuide/alert-rules.ts +559 -0
  5. package/src/in-patient/labourCareGuide/components/lcg-correction-audit-banner.component.tsx +42 -0
  6. package/src/in-patient/labourCareGuide/components/section-toolbar.component.tsx +53 -0
  7. package/src/in-patient/labourCareGuide/constants/admission-form.constants.ts +22 -0
  8. package/src/in-patient/labourCareGuide/constants/labour-care-guide.constants.ts +4 -0
  9. package/src/in-patient/labourCareGuide/context/lcg-section-state.context.tsx +252 -0
  10. package/src/in-patient/labourCareGuide/forms/admission-details-form.component.tsx +360 -0
  11. package/src/in-patient/labourCareGuide/forms/baby-form.component.tsx +1044 -0
  12. package/src/in-patient/labourCareGuide/forms/contractions-form.component.tsx +275 -0
  13. package/src/in-patient/labourCareGuide/forms/emergency-entry-modal.component.tsx +116 -0
  14. package/src/in-patient/labourCareGuide/forms/form-scoped-time-pickers.component.tsx +20 -0
  15. package/src/in-patient/labourCareGuide/forms/index.ts +9 -0
  16. package/src/in-patient/labourCareGuide/forms/labour-care-guide-forms.component.tsx +678 -0
  17. package/src/in-patient/labourCareGuide/forms/labour-progress-form.component.tsx +1036 -0
  18. package/src/in-patient/labourCareGuide/forms/lcg-session-correction-wizard.component.tsx +214 -0
  19. package/src/in-patient/labourCareGuide/forms/medication-form.component.tsx +1136 -0
  20. package/src/in-patient/labourCareGuide/forms/shared-decision-assessment-field.component.tsx +109 -0
  21. package/src/in-patient/labourCareGuide/forms/shared-decision-making-form.component.tsx +787 -0
  22. package/src/in-patient/labourCareGuide/forms/supportive-care-form.component.tsx +399 -0
  23. package/src/in-patient/labourCareGuide/forms/time-form.component.tsx +253 -0
  24. package/src/in-patient/labourCareGuide/forms/time-picker-dropdown.component.tsx +435 -0
  25. package/src/in-patient/labourCareGuide/forms/time-picker-dropdown.scss +107 -0
  26. package/src/in-patient/labourCareGuide/forms/time-picker-with-clock.component.tsx +175 -0
  27. package/src/in-patient/labourCareGuide/forms/time-picker-with-clock.scss +178 -0
  28. package/src/in-patient/labourCareGuide/forms/woman-form.component.tsx +575 -0
  29. package/src/in-patient/labourCareGuide/global-cds-alerts/global-cds-alert-banner.component.tsx +236 -0
  30. package/src/in-patient/labourCareGuide/global-cds-alerts/global-cds-alert-context.tsx +260 -0
  31. package/src/in-patient/labourCareGuide/global-cds-alerts/global-cds-alert-display.component.tsx +79 -0
  32. package/src/in-patient/labourCareGuide/graphs/baby.component.tsx +925 -0
  33. package/src/in-patient/labourCareGuide/graphs/drugs-iv-fluids-graph.component.tsx +48 -0
  34. package/src/in-patient/labourCareGuide/graphs/labour-care-guide-header.component.tsx +245 -0
  35. package/src/in-patient/labourCareGuide/graphs/labour-progress.component.tsx +1639 -0
  36. package/src/in-patient/labourCareGuide/graphs/medication.component.tsx +407 -0
  37. package/src/in-patient/labourCareGuide/graphs/shared-decision-making.component.tsx +629 -0
  38. package/src/in-patient/labourCareGuide/graphs/supportive-care.component.tsx +387 -0
  39. package/src/in-patient/labourCareGuide/graphs/woman.component.tsx +1059 -0
  40. package/src/in-patient/labourCareGuide/hooks/use-lcg-alert-sound.ts +136 -0
  41. package/src/in-patient/labourCareGuide/hooks/use-lcg-data.ts +1436 -0
  42. package/src/in-patient/labourCareGuide/hooks/use-lcg-debounced-value.ts +17 -0
  43. package/src/in-patient/labourCareGuide/hooks/use-lcg-form-clock.ts +36 -0
  44. package/src/in-patient/labourCareGuide/hooks/use-lcg-section-autosave.ts +33 -0
  45. package/src/in-patient/labourCareGuide/labour-care-guide-header.component.tsx +93 -0
  46. package/src/in-patient/labourCareGuide/labour-care-guide.component.tsx +1881 -0
  47. package/src/in-patient/labourCareGuide/labour-care-guide.scss +901 -0
  48. package/src/in-patient/labourCareGuide/labour-care-guide.utils.ts +350 -0
  49. package/src/in-patient/labourCareGuide/labour-delivery.scss +187 -0
  50. package/src/in-patient/labourCareGuide/lcg-alert-lifecycle.ts +161 -0
  51. package/src/in-patient/labourCareGuide/partography-dashboard.meta.ts +8 -0
  52. package/src/in-patient/labourCareGuide/partography-data-form.scss +541 -0
  53. package/src/in-patient/labourCareGuide/partography-link.component.tsx +21 -0
  54. package/src/in-patient/labourCareGuide/partography.resource.ts +1674 -0
  55. package/src/in-patient/labourCareGuide/partography.scss +1740 -0
  56. package/src/in-patient/labourCareGuide/resources/admission-details.resource.ts +430 -0
  57. package/src/in-patient/labourCareGuide/resources/baby.resource.ts +408 -0
  58. package/src/in-patient/labourCareGuide/resources/drug-stock.resource.ts +98 -0
  59. package/src/in-patient/labourCareGuide/resources/drugs-fluids.resource.ts +93 -0
  60. package/src/in-patient/labourCareGuide/resources/labour-progress.resource.ts +239 -0
  61. package/src/in-patient/labourCareGuide/resources/labour-time-set-select-setup.resource.ts +121 -0
  62. package/src/in-patient/labourCareGuide/resources/lcg-session-correction.resource.ts +1027 -0
  63. package/src/in-patient/labourCareGuide/resources/medication.resource.ts +528 -0
  64. package/src/in-patient/labourCareGuide/resources/shared-decision-making.resource.ts +358 -0
  65. package/src/in-patient/labourCareGuide/resources/supportive-care.resource.ts +294 -0
  66. package/src/in-patient/labourCareGuide/storage/lcg-local-storage.ts +374 -0
  67. package/src/in-patient/labourCareGuide/time-slot-utils.ts +797 -0
  68. package/src/in-patient/labourCareGuide/types/concept-uuids.constants.ts +171 -0
  69. package/src/in-patient/labourCareGuide/types/index.ts +1615 -0
  70. package/src/in-patient/labourCareGuide/types/labour-care-guide.types.ts +10 -0
  71. package/src/in-patient/labourCareGuide/woman-schedule-utils.ts +160 -0
  72. package/src/in-patient/treatmentChart/nursing-cardex-payload-builder.ts +24 -21
  73. package/src/in-patient/treatmentChart/nursing-cardex-plan.resource.ts +35 -11
  74. package/src/in-patient/treatmentChart/nursing-cardex-plan.workspace.scss +73 -8
  75. package/src/in-patient/treatmentChart/nursing-cardex-plan.workspace.tsx +178 -297
  76. package/src/in-patient/treatmentChart/nursing-treatment-sheet.resource.ts +27 -2
  77. package/src/in-patient/treatmentChart/treatment-chart-dashboard.component.tsx +166 -8
  78. package/src/in-patient/treatmentChart/treatment-chart-dashboard.scss +35 -0
  79. package/src/in-patient/treatmentChart/use-nursing-cardex-form-schema.ts +2 -2
  80. package/src/index.ts +8 -0
  81. package/src/root.component.tsx +11 -6
  82. package/src/routes.json +19 -0
  83. package/translations/en.json +362 -21
  84. package/translations/fr.json +362 -20
  85. package/.turbo/turbo-build.log +0 -7
  86. package/dist/1189.js +0 -1
  87. package/dist/1189.js.map +0 -1
  88. package/dist/12.js +0 -17
  89. package/dist/12.js.map +0 -1
  90. package/dist/126.js +0 -1
  91. package/dist/1308.js +0 -1
  92. package/dist/1308.js.map +0 -1
  93. package/dist/1374.js +0 -1
  94. package/dist/1374.js.map +0 -1
  95. package/dist/1387.js +0 -1
  96. package/dist/1387.js.map +0 -1
  97. package/dist/15.js +0 -1
  98. package/dist/1564.js +0 -1
  99. package/dist/1567.js +0 -1
  100. package/dist/1567.js.map +0 -1
  101. package/dist/1739.js +0 -1
  102. package/dist/1739.js.map +0 -1
  103. package/dist/1845.js +0 -1
  104. package/dist/1972.js +0 -1
  105. package/dist/1972.js.map +0 -1
  106. package/dist/2016.js +0 -1
  107. package/dist/2016.js.map +0 -1
  108. package/dist/2117.js +0 -1
  109. package/dist/2117.js.map +0 -1
  110. package/dist/215.js +0 -1
  111. package/dist/2178.js +0 -1
  112. package/dist/239.js +0 -1
  113. package/dist/239.js.map +0 -1
  114. package/dist/2486.js +0 -1
  115. package/dist/2486.js.map +0 -1
  116. package/dist/2566.js +0 -1
  117. package/dist/2759.js +0 -1
  118. package/dist/3089.js +0 -1
  119. package/dist/3089.js.map +0 -1
  120. package/dist/3230.js +0 -1
  121. package/dist/3261.js +0 -1
  122. package/dist/3261.js.map +0 -1
  123. package/dist/3321.js +0 -1
  124. package/dist/3321.js.map +0 -1
  125. package/dist/3350.js +0 -1
  126. package/dist/3399.js +0 -1
  127. package/dist/3399.js.map +0 -1
  128. package/dist/3441.js +0 -1
  129. package/dist/3547.js +0 -1
  130. package/dist/3547.js.map +0 -1
  131. package/dist/3548.js +0 -1
  132. package/dist/3548.js.map +0 -1
  133. package/dist/3565.js +0 -1
  134. package/dist/3571.js +0 -1
  135. package/dist/3571.js.map +0 -1
  136. package/dist/364.js +0 -1
  137. package/dist/364.js.map +0 -1
  138. package/dist/3746.js +0 -1
  139. package/dist/3925.js +0 -1
  140. package/dist/3946.js +0 -1
  141. package/dist/401.js +0 -1
  142. package/dist/401.js.map +0 -1
  143. package/dist/4206.js +0 -1
  144. package/dist/4206.js.map +0 -1
  145. package/dist/4480.js +0 -1
  146. package/dist/4480.js.map +0 -1
  147. package/dist/4635.js +0 -1
  148. package/dist/4635.js.map +0 -1
  149. package/dist/4684.js +0 -1
  150. package/dist/4684.js.map +0 -1
  151. package/dist/4735.js +0 -1
  152. package/dist/4735.js.map +0 -1
  153. package/dist/4744.js +0 -1
  154. package/dist/4744.js.map +0 -1
  155. package/dist/4894.js +0 -1
  156. package/dist/4970.js +0 -1
  157. package/dist/4970.js.map +0 -1
  158. package/dist/5069.js +0 -1
  159. package/dist/5069.js.map +0 -1
  160. package/dist/5130.js +0 -1
  161. package/dist/5187.js +0 -1
  162. package/dist/534.js +0 -22
  163. package/dist/534.js.map +0 -1
  164. package/dist/5411.js +0 -1
  165. package/dist/5411.js.map +0 -1
  166. package/dist/5441.js +0 -1
  167. package/dist/5441.js.map +0 -1
  168. package/dist/5491.js +0 -1
  169. package/dist/5491.js.map +0 -1
  170. package/dist/5496.js +0 -1
  171. package/dist/5496.js.map +0 -1
  172. package/dist/5595.js +0 -1
  173. package/dist/5659.js +0 -1
  174. package/dist/5659.js.map +0 -1
  175. package/dist/5706.js +0 -1
  176. package/dist/5706.js.map +0 -1
  177. package/dist/5961.js +0 -1
  178. package/dist/6061.js +0 -1
  179. package/dist/6061.js.map +0 -1
  180. package/dist/6133.js +0 -1
  181. package/dist/6180.js +0 -1
  182. package/dist/6180.js.map +0 -1
  183. package/dist/6296.js +0 -1
  184. package/dist/6296.js.map +0 -1
  185. package/dist/6322.js +0 -1
  186. package/dist/6322.js.map +0 -1
  187. package/dist/6381.js +0 -1
  188. package/dist/6381.js.map +0 -1
  189. package/dist/6455.js +0 -1
  190. package/dist/6455.js.map +0 -1
  191. package/dist/6456.js +0 -1
  192. package/dist/6466.js +0 -1
  193. package/dist/6613.js +0 -1
  194. package/dist/6753.js +0 -15
  195. package/dist/6753.js.map +0 -1
  196. package/dist/6783.js +0 -1
  197. package/dist/6925.js +0 -1
  198. package/dist/6925.js.map +0 -1
  199. package/dist/7091.js +0 -1
  200. package/dist/7091.js.map +0 -1
  201. package/dist/7263.js +0 -1
  202. package/dist/7263.js.map +0 -1
  203. package/dist/7348.js +0 -1
  204. package/dist/7431.js +0 -1
  205. package/dist/7431.js.map +0 -1
  206. package/dist/7543.js +0 -1
  207. package/dist/7607.js +0 -1
  208. package/dist/762.js +0 -1
  209. package/dist/762.js.map +0 -1
  210. package/dist/772.js +0 -1
  211. package/dist/775.js +0 -1
  212. package/dist/775.js.map +0 -1
  213. package/dist/8171.js +0 -1
  214. package/dist/8171.js.map +0 -1
  215. package/dist/8377.js +0 -1
  216. package/dist/8377.js.map +0 -1
  217. package/dist/8488.js +0 -1
  218. package/dist/8488.js.map +0 -1
  219. package/dist/8727.js +0 -1
  220. package/dist/8736.js +0 -1
  221. package/dist/8736.js.map +0 -1
  222. package/dist/8847.js +0 -1
  223. package/dist/9009.js +0 -1
  224. package/dist/9009.js.map +0 -1
  225. package/dist/9015.js +0 -1
  226. package/dist/906.js +0 -1
  227. package/dist/9065.js +0 -1
  228. package/dist/9182.js +0 -1
  229. package/dist/9314.js +0 -1
  230. package/dist/9314.js.map +0 -1
  231. package/dist/9339.js +0 -1
  232. package/dist/9361.js +0 -1
  233. package/dist/9361.js.map +0 -1
  234. package/dist/9453.js +0 -1
  235. package/dist/9465.js +0 -1
  236. package/dist/9465.js.map +0 -1
  237. package/dist/9610.js +0 -1
  238. package/dist/9610.js.map +0 -1
  239. package/dist/9668.js +0 -1
  240. package/dist/9668.js.map +0 -1
  241. package/dist/9727.js +0 -1
  242. package/dist/9727.js.map +0 -1
  243. package/dist/9734.js +0 -1
  244. package/dist/9734.js.map +0 -1
  245. package/dist/9833.js +0 -1
  246. package/dist/9833.js.map +0 -1
  247. package/dist/9848.js +0 -1
  248. package/dist/9848.js.map +0 -1
  249. package/dist/9920.js +0 -1
  250. package/dist/9938.js +0 -1
  251. package/dist/kenyaemr-esm-ward-app.js +0 -5
  252. package/dist/kenyaemr-esm-ward-app.js.buildmanifest.json +0 -2621
  253. package/dist/kenyaemr-esm-ward-app.js.map +0 -1
  254. package/dist/main.js +0 -5
  255. package/dist/main.js.map +0 -1
  256. package/dist/routes.json +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenyaemr/esm-ward-app",
3
- "version": "8.5.4-pre.76",
3
+ "version": "8.5.4-pre.8",
4
4
  "description": "Ward and bed management module for O3",
5
5
  "browser": "dist/kenyaemr-esm-ward-app.js",
6
6
  "main": "src/index.ts",
@@ -27,6 +27,351 @@ export const addressFields = [
27
27
 
28
28
  type AddressField = keyof typeof addressFields;
29
29
 
30
+ export const labourCareGuideConceptUuids = {
31
+ UUID_SHARED_DECISION_ASSESSMENT: '162164AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
32
+ UUID_SHARED_DECISION_PLAN: '166021AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
33
+ UUID_SHARED_DECISION_ACTION: '160433AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
34
+ UUID_SHARED_DECISION_CONTINUE_MONITORING: '159835AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
35
+ UUID_SHARED_DECISION_TRANSFER_TO_CS: '159739AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
36
+ UUID_SHARED_DECISION_REFERRAL: '0dcc1312-e83e-4317-97c3-4b127b599744',
37
+ UUID_SHARED_DECISION_TWIN_ONE_BIRTH: 'd9ad3cc2-5800-4cd0-ab51-fa3306295617',
38
+ UUID_SHARED_DECISION_BIRTH: 'fb50f3e1-0971-4f82-9774-41ff57e38043',
39
+ UUID_CONTRACTION_NONE: '1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
40
+ UUID_CONTRACTION_MILD: '1498AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
41
+ UUID_CONTRACTION_MODERATE: '1499AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
42
+ UUID_CONTRACTION_STRONG: '166788AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
43
+ UUID_CONTRACTION_STRONG_FALLBACK: '4b90b73a-ad11-4650-91b0-baea131974e0',
44
+ UUID_URINE_NEGATIVE: '1874AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
45
+ UUID_URINE_ONE_PLUS: '1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
46
+ UUID_URINE_TWO_PLUS: '1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
47
+ UUID_URINE_THREE_PLUS: '1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
48
+ UUID_URINE_NOT_DONE: '1118AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
49
+ UUID_URINE_TEST_TIME_SLOT: 'bb3724c9-fbcc-49c5-9702-6cde0be325ca',
50
+ UUID_PARTOGRAPHY_ENCOUNTER: '022d62af-e2a5-4282-953b-52dd5cba3296',
51
+ UUID_MEDICATION_OXYTOCIN_ADMINISTERED: '82580974-ff46-41c5-b218-4bea7f53bf7e',
52
+ UUID_MEDICATION_OXYTOCIN_DOSE: '166530AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
53
+ UUID_MEDICATION_MEDICATION: '1282AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
54
+ UUID_MEDICATION_NAME: 'c3082af8-f935-40c5-aa5b-74c684e81aea',
55
+ UUID_YES: '1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
56
+ UUID_NO: '1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
57
+ UUID_SUPPORTIVE_CARE_COMPANION: '8a5757a7-b607-4948-b8a8-587b1f44366a',
58
+ UUID_SUPPORTIVE_CARE_PAIN_RELIEF: 'a563b9bd-eb1d-4a0e-8271-f3ee00da6d25',
59
+ UUID_SUPPORTIVE_CARE_ORAL: '217c3dcb-d13e-48d6-89b9-f2c588d50a3c',
60
+ UUID_SUPPORTIVE_CARE_POSTURE: 'dc94a788-de10-417d-aac8-0aed5ba3b806',
61
+ UUID_SUPPORTIVE_CARE_DECLINED: '167156AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
62
+ UUID_SUPPORTIVE_CARE_SUPINE: '159629AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
63
+ UUID_SUPPORTIVE_CARE_MOBILE: 'c05125ad-e297-491f-aa65-d73ecc3245f0',
64
+ UUID_BABY_BASELINE_FHR: '1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
65
+ UUID_BABY_FHR_DECELERATION: 'c608022e-a29c-44c9-a4c8-24b6e3105ae4',
66
+ UUID_BABY_AMNIOTIC_FLUID: '30ea66be-16d1-44f6-af40-4fe273814454',
67
+ UUID_BABY_FETAL_POSITION: '78a5cb66-ca95-4965-9c54-0cb6198c9389',
68
+ UUID_BABY_CAPUT: '4e54e9bf-9a1a-4dfd-a4a1-b727860f1c4a',
69
+ UUID_BABY_MOULDING: '166527AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
70
+ UUID_BABY_FHR_DECELERATION_LATE: '167151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
71
+ UUID_BABY_FHR_DECELERATION_EARLY: '58f1c745-8873-44ff-9680-2a3bbe172990',
72
+ UUID_BABY_FHR_DECELERATION_VARIABLE: '155653AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
73
+ UUID_BABY_AMNIOTIC_INTACT: '164899AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
74
+ UUID_BABY_AMNIOTIC_CLEAR: '159484AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
75
+ UUID_BABY_AMNIOTIC_BLOOD: '1077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
76
+ UUID_BABY_AMNIOTIC_MECONIUM: '134488AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
77
+ UUID_BABY_FETAL_POSITION_ANTERIOR: '164148AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
78
+ UUID_BABY_FETAL_POSITION_POSTERIOR: '541AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
79
+ UUID_BABY_FETAL_POSITION_TRANSVERSE: '124261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
80
+ UUID_MATERNITY_INPATIENT_ENCOUNTER_TYPE: '6877a5b4-441d-4dff-ada1-fcc2485c33e6',
81
+ UUID_MATERNITY_INPATIENT_FORM: '57b8bb54-321f-4b94-bba5-58850527bfd6',
82
+ UUID_PARITY_CONCEPT: '160080AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
83
+ UUID_MISCARRIAGE_ABORTIONS_CONCEPT: '1823AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
84
+ UUID_URGE_TO_PUSH: '9ad5b56d-597c-4a40-ade6-387802daa44a',
85
+ UUID_EMERGENCY_OVERRIDE: '1670AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
86
+ UUID_EMERGENCY_REASON: '163761AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
87
+ UUID_SHARED_DECISION_TERMINATE_ONGOING_PROGRESS: '737fa73a-509f-40d8-9e84-91dc71db7f4c',
88
+ UUID_LCG_TERMINATION_REASON_TYPE: '6098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
89
+ UUID_LCG_TERMINATION_REASON_WRONG_PATIENT: '164144AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
90
+ UUID_LCG_TERMINATION_REASON_OTHER: '5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
91
+ UUID_LCG_CORRECTION_ENCOUNTER_TYPE: 'b2c4d5e6-7f8a-4e9b-8c1d-2e3f8e4a3b8f',
92
+ UUID_LCG_CORRECTION_TYPE: '4b3eb27b-43c0-4862-bd83-be06beb3d699',
93
+ UUID_LCG_CORRECTION_TYPE_WRONG_PATIENT_TRANSFER: '1286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
94
+ UUID_LCG_CORRECTION_SOURCE_PATIENT_UUID: '162720AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
95
+ UUID_LCG_CORRECTION_SOURCE_TERMINATE_ENCOUNTER_UUID: '1671AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
96
+ UUID_LCG_CORRECTION_TERMINATION_REASON: '162704AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
97
+ UUID_LCG_CORRECTION_SOURCE_PATIENT_DISPLAY: '850a960b-e8b5-4775-ba74-aaddb2abbf51',
98
+ UUID_LCG_CORRECTION_TERMINATED_AT: '163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
99
+ UUID_LCG_CORRECTION_TRANSFER_NOTES: '1056dc03-ce4d-45cb-a1eb-87707162e6ee',
100
+ FETAL_HEART_RATE_CONCEPT: '1440AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
101
+ FETAL_HEART_RATE_TIME_CONCEPT: 'bb3724c9-fbcc-49c5-9702-6cde0be325ca',
102
+ FETAL_HEART_RATE_HOUR_CONCEPT: '160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
103
+ AMNIOTIC_FLUID_CONCEPT: '162653AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
104
+ RUPTURED_MEMBRANES_CONCEPT: '164900AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
105
+ AMNIOTIC_CLEAR_LIQUOR_CONCEPT: '159484AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
106
+ AMNIOTIC_MECONIUM_STAINED_CONCEPT: '134488AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
107
+ AMNIOTIC_ABSENT_CONCEPT: '163747AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
108
+ AMNIOTIC_BLOOD_STAINED_CONCEPT: '1077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
109
+ AMNIOTIC_MEMBRANE_INTACT_CONCEPT: 'd1787a76-7310-4223-a645-9fd410d418c1',
110
+ UTERINE_CONTRACTIONS_CONCEPT: '163750AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
111
+ CONTRACTION_LEVEL_MILD_CONCEPT: '1498AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
112
+ CONTRACTION_LEVEL_MODERATE_CONCEPT: '1499AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
113
+ CONTRACTION_LEVEL_STRONG_CONCEPT: '166788AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
114
+ UTERINE_CONTRACTION_FREQUENCY_CONCEPT: 'd266dee4-bbe8-4736-b94d-c33300f55bca',
115
+ UTERINE_CONTRACTION_DURATION_CONCEPT: '159368AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
116
+ OXYTOCIN_TIME_CONCEPT: 'bb3724c9-fbcc-49c5-9702-6cde0be325ca',
117
+ OXYTOCIN_DROPS_PER_MINUTE_CONCEPT: '1d109b10-7b30-4bfa-8a7c-6ecb73357fc2',
118
+ OXYTOCIN_DOSE_CONCEPT: '81369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
119
+ ROUTE_CONCEPT: '8878f9c0-a1ce-47ec-a88f-69ef0f6576ba',
120
+ FREQUENCY_CONCEPT: 'fd9f82fd-f327-4502-ac8e-5d9144dbd504',
121
+ MEDICATION_CONCEPT: 'c3082af8-f935-40c5-aa5b-74c684e81aea',
122
+ IV_FLUIDS_CONCEPT: '644504bd-23bc-4f1e-b9a0-d44f81f4148e',
123
+ IV_FLUID_TYPE_CONCEPT: '161911AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
124
+ DOSAGE_CONCEPT: 'b71ddb80-2d7f-4bde-a44b-236e62d4c1b6',
125
+ DRUG_DOSE_CONCEPT: '162384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
126
+ MATERNAL_PULSE_CONCEPT: '5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
127
+ SYSTOLIC_BP_CONCEPT: '5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
128
+ DIASTOLIC_BP_CONCEPT: '5086AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
129
+ PULSE_BP_TIME_CONCEPT: 'bb3724c9-fbcc-49c5-9702-6cde0be325ca',
130
+ PROTEIN_LEVEL_CONCEPT: '1875AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
131
+ GLUCOSE_LEVEL_CONCEPT: '887AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
132
+ KETONE_LEVEL_CONCEPT: '161442AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
133
+ URINE_VOLUME_CONCEPT: '159660AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
134
+ URINE_CHARACTERISTICS_CONCEPT: '56AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
135
+ TIME_RESULTS_RETURNED: '67c3d4c6-465e-4c12-9b7f-d8587ca90603',
136
+ TIME_SAMPLE_COLLECTED: 'c554f157-2e16-4585-af29-c48f5e765ce0',
137
+ CERVIX_CONCEPT: '162261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
138
+ DESCENT_OF_HEAD_CONCEPT: '166528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
139
+ STATION_0_CONCEPT: '160769AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
140
+ STATION_1_CONCEPT: '162135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
141
+ STATION_2_CONCEPT: '166065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
142
+ STATION_3_CONCEPT: '166066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
143
+ STATION_4_CONCEPT: '166067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
144
+ STATION_5_CONCEPT: '163734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
145
+ DRUG_ORDER_TYPE_UUID: '131168f4-15f5-102d-96e4-000c29c2a5d7',
146
+ ENCOUNTER_ROLE: '240b26f9-dd88-4172-823d-4a8bfeb7841f',
147
+ MOULDING_NONE_CONCEPT: '1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
148
+ MOULDING_SLIGHT_CONCEPT: '1362AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
149
+ MOULDING_MODERATE_CONCEPT: '1363AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
150
+ MOULDING_SEVERE_CONCEPT: '1364AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
151
+ TEMPERATURE_CONCEPT: '5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
152
+ CONTRACTION_COUNT_CONCEPT: 'd266dee4-bbe8-4736-b94d-c33300f55bca',
153
+ MEDICATION_NAME_CONCEPT: '164231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
154
+ EVENT_TYPE_CONCEPT: '162879AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
155
+ EVENT_DESCRIPTION_CONCEPT: '160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
156
+ MOULDING_CONCEPT: '166527AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
157
+ BLOOD_GROUP_CONCEPT: '300AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
158
+ TIME_SLOT_CONCEPT: '163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
159
+ LABOR_PATTERN_CONCEPT: '164135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
160
+ HOURS_SINCE_RUPTURE_CONCEPT: '167149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
161
+ DATE_OF_ADMISSION_CONCEPT: '1640AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
162
+ GESTATION_WEEKS_CONCEPT: '1789AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
163
+ ESTIMATED_DELIVERY_DATE_CONCEPT: '5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
164
+ LAST_MENSTRUAL_PERIOD_CONCEPT: '1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
165
+ } as const;
166
+
167
+ export const labourCareGuidePartographyConfig = {
168
+ conceptMappings: {
169
+ 'fetal-heart-rate': [labourCareGuideConceptUuids.FETAL_HEART_RATE_CONCEPT],
170
+ 'blood-pressure': [
171
+ labourCareGuideConceptUuids.SYSTOLIC_BP_CONCEPT,
172
+ labourCareGuideConceptUuids.DIASTOLIC_BP_CONCEPT,
173
+ ],
174
+ 'maternal-pulse': [labourCareGuideConceptUuids.MATERNAL_PULSE_CONCEPT],
175
+ temperature: [labourCareGuideConceptUuids.TEMPERATURE_CONCEPT],
176
+ 'cervical-dilation': [labourCareGuideConceptUuids.CERVIX_CONCEPT],
177
+ 'descent-of-head': [labourCareGuideConceptUuids.DESCENT_OF_HEAD_CONCEPT],
178
+ 'uterine-contractions': [labourCareGuideConceptUuids.UTERINE_CONTRACTION_FREQUENCY_CONCEPT],
179
+ 'urine-analysis': [
180
+ labourCareGuideConceptUuids.PROTEIN_LEVEL_CONCEPT,
181
+ labourCareGuideConceptUuids.GLUCOSE_LEVEL_CONCEPT,
182
+ labourCareGuideConceptUuids.KETONE_LEVEL_CONCEPT,
183
+ ],
184
+ 'drugs-fluids': [
185
+ labourCareGuideConceptUuids.UUID_MEDICATION_MEDICATION,
186
+ labourCareGuideConceptUuids.IV_FLUIDS_CONCEPT,
187
+ labourCareGuideConceptUuids.IV_FLUID_TYPE_CONCEPT,
188
+ ],
189
+ 'progress-events': [
190
+ labourCareGuideConceptUuids.EVENT_TYPE_CONCEPT,
191
+ labourCareGuideConceptUuids.EVENT_DESCRIPTION_CONCEPT,
192
+ labourCareGuideConceptUuids.FETAL_HEART_RATE_CONCEPT,
193
+ labourCareGuideConceptUuids.CERVIX_CONCEPT,
194
+ labourCareGuideConceptUuids.UTERINE_CONTRACTIONS_CONCEPT,
195
+ ],
196
+ },
197
+ conceptUuids: {
198
+ cervix: labourCareGuideConceptUuids.CERVIX_CONCEPT,
199
+ 'fetal-heart-rate': labourCareGuideConceptUuids.FETAL_HEART_RATE_CONCEPT,
200
+ 'fetal-heart-rate-hour': labourCareGuideConceptUuids.FETAL_HEART_RATE_HOUR_CONCEPT,
201
+ 'fetal-heart-rate-time': labourCareGuideConceptUuids.FETAL_HEART_RATE_TIME_CONCEPT,
202
+ 'cervical-dilation': labourCareGuideConceptUuids.CERVIX_CONCEPT,
203
+ 'descent-of-head': labourCareGuideConceptUuids.DESCENT_OF_HEAD_CONCEPT,
204
+ 'uterine-contractions': labourCareGuideConceptUuids.UTERINE_CONTRACTIONS_CONCEPT,
205
+ 'uterine-contraction-frequency': labourCareGuideConceptUuids.UTERINE_CONTRACTION_FREQUENCY_CONCEPT,
206
+ 'uterine-contraction-duration': labourCareGuideConceptUuids.UTERINE_CONTRACTION_DURATION_CONCEPT,
207
+ 'maternal-pulse': labourCareGuideConceptUuids.MATERNAL_PULSE_CONCEPT,
208
+ 'systolic-bp': labourCareGuideConceptUuids.SYSTOLIC_BP_CONCEPT,
209
+ 'diastolic-bp': labourCareGuideConceptUuids.DIASTOLIC_BP_CONCEPT,
210
+ temperature: labourCareGuideConceptUuids.TEMPERATURE_CONCEPT,
211
+ 'protein-level': labourCareGuideConceptUuids.PROTEIN_LEVEL_CONCEPT,
212
+ 'glucose-level': labourCareGuideConceptUuids.GLUCOSE_LEVEL_CONCEPT,
213
+ 'ketone-level': labourCareGuideConceptUuids.KETONE_LEVEL_CONCEPT,
214
+ 'urine-volume': labourCareGuideConceptUuids.URINE_VOLUME_CONCEPT,
215
+ 'contraction-count': labourCareGuideConceptUuids.CONTRACTION_COUNT_CONCEPT,
216
+ 'urine-characteristics': labourCareGuideConceptUuids.URINE_CHARACTERISTICS_CONCEPT,
217
+ medication: labourCareGuideConceptUuids.MEDICATION_CONCEPT,
218
+ 'medication-name': labourCareGuideConceptUuids.MEDICATION_NAME_CONCEPT,
219
+ 'oxytocin-dose': labourCareGuideConceptUuids.OXYTOCIN_DOSE_CONCEPT,
220
+ 'oxytocin-drops-per-minute': labourCareGuideConceptUuids.OXYTOCIN_DROPS_PER_MINUTE_CONCEPT,
221
+ 'oxytocin-time': labourCareGuideConceptUuids.OXYTOCIN_TIME_CONCEPT,
222
+ 'iv-fluids': labourCareGuideConceptUuids.IV_FLUIDS_CONCEPT,
223
+ 'iv-fluid-type': labourCareGuideConceptUuids.IV_FLUID_TYPE_CONCEPT,
224
+ dosage: labourCareGuideConceptUuids.DOSAGE_CONCEPT,
225
+ route: labourCareGuideConceptUuids.ROUTE_CONCEPT,
226
+ frequency: labourCareGuideConceptUuids.FREQUENCY_CONCEPT,
227
+ 'drug-dose': labourCareGuideConceptUuids.DRUG_DOSE_CONCEPT,
228
+ 'event-type': labourCareGuideConceptUuids.EVENT_TYPE_CONCEPT,
229
+ 'event-description': labourCareGuideConceptUuids.EVENT_DESCRIPTION_CONCEPT,
230
+ 'amniotic-fluid': labourCareGuideConceptUuids.AMNIOTIC_FLUID_CONCEPT,
231
+ 'amniotic-clear-liquor': labourCareGuideConceptUuids.AMNIOTIC_CLEAR_LIQUOR_CONCEPT,
232
+ 'amniotic-meconium-stained': labourCareGuideConceptUuids.AMNIOTIC_MECONIUM_STAINED_CONCEPT,
233
+ 'amniotic-absent': labourCareGuideConceptUuids.AMNIOTIC_ABSENT_CONCEPT,
234
+ 'amniotic-blood-stained': labourCareGuideConceptUuids.AMNIOTIC_BLOOD_STAINED_CONCEPT,
235
+ moulding: labourCareGuideConceptUuids.MOULDING_CONCEPT,
236
+ 'moulding-none': labourCareGuideConceptUuids.MOULDING_NONE_CONCEPT,
237
+ 'moulding-slight': labourCareGuideConceptUuids.MOULDING_SLIGHT_CONCEPT,
238
+ 'moulding-moderate': labourCareGuideConceptUuids.MOULDING_MODERATE_CONCEPT,
239
+ 'moulding-severe': labourCareGuideConceptUuids.MOULDING_SEVERE_CONCEPT,
240
+ 'blood-group': labourCareGuideConceptUuids.BLOOD_GROUP_CONCEPT,
241
+ 'time-slot': labourCareGuideConceptUuids.TIME_SLOT_CONCEPT,
242
+ 'pulse-time-slot': labourCareGuideConceptUuids.PULSE_BP_TIME_CONCEPT,
243
+ 'labor-pattern': labourCareGuideConceptUuids.LABOR_PATTERN_CONCEPT,
244
+ 'hours-since-rupture': labourCareGuideConceptUuids.HOURS_SINCE_RUPTURE_CONCEPT,
245
+ 'ruptured-membranes': labourCareGuideConceptUuids.RUPTURED_MEMBRANES_CONCEPT,
246
+ 'date-of-admission': labourCareGuideConceptUuids.DATE_OF_ADMISSION_CONCEPT,
247
+ 'gestation-weeks': labourCareGuideConceptUuids.GESTATION_WEEKS_CONCEPT,
248
+ 'estimated-delivery-date': labourCareGuideConceptUuids.ESTIMATED_DELIVERY_DATE_CONCEPT,
249
+ 'last-menstrual-period': labourCareGuideConceptUuids.LAST_MENSTRUAL_PERIOD_CONCEPT,
250
+ 'baby-twin-index': '163460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
251
+ 'station-0': labourCareGuideConceptUuids.STATION_0_CONCEPT,
252
+ 'station-1': labourCareGuideConceptUuids.STATION_1_CONCEPT,
253
+ 'station-2': labourCareGuideConceptUuids.STATION_2_CONCEPT,
254
+ 'station-3': labourCareGuideConceptUuids.STATION_3_CONCEPT,
255
+ 'station-4': labourCareGuideConceptUuids.STATION_4_CONCEPT,
256
+ 'station-5': labourCareGuideConceptUuids.STATION_5_CONCEPT,
257
+ },
258
+ stationDisplayMapping: {
259
+ [labourCareGuideConceptUuids.STATION_0_CONCEPT]: '0/5',
260
+ [labourCareGuideConceptUuids.STATION_1_CONCEPT]: '1/5',
261
+ [labourCareGuideConceptUuids.STATION_2_CONCEPT]: '2/5',
262
+ [labourCareGuideConceptUuids.STATION_3_CONCEPT]: '3/5',
263
+ [labourCareGuideConceptUuids.STATION_4_CONCEPT]: '4/5',
264
+ [labourCareGuideConceptUuids.STATION_5_CONCEPT]: '5/5',
265
+ },
266
+ stationValueMapping: {
267
+ [labourCareGuideConceptUuids.STATION_0_CONCEPT]: 0,
268
+ [labourCareGuideConceptUuids.STATION_1_CONCEPT]: 1,
269
+ [labourCareGuideConceptUuids.STATION_2_CONCEPT]: 2,
270
+ [labourCareGuideConceptUuids.STATION_3_CONCEPT]: 3,
271
+ [labourCareGuideConceptUuids.STATION_4_CONCEPT]: 4,
272
+ [labourCareGuideConceptUuids.STATION_5_CONCEPT]: 5,
273
+ },
274
+ encounterPatterns: [
275
+ 'mch-partograph',
276
+ 'partography',
277
+ 'fetal-monitoring',
278
+ 'maternal-monitoring',
279
+ 'obstetric-vitals',
280
+ 'labor-monitoring',
281
+ 'labour-monitoring',
282
+ ],
283
+ fallbackEncounterMapping: {
284
+ 'fetal-heart-rate': ['mch-mother-consultation', 'vitals', 'obstetric', 'maternal', 'consultation', 'clinical'],
285
+ 'cervical-dilation': ['mch-mother-consultation', 'obstetric', 'maternal', 'consultation', 'clinical'],
286
+ 'maternal-pulse': ['vitals', 'maternal', 'consultation', 'clinical'],
287
+ 'blood-pressure': ['vitals', 'maternal', 'consultation', 'clinical'],
288
+ temperature: ['vitals', 'consultation', 'clinical'],
289
+ 'urine-analysis': ['vitals', 'laboratory', 'consultation', 'clinical'],
290
+ 'drugs-fluids': ['medication', 'treatment', 'consultation', 'clinical'],
291
+ 'progress-events': ['obstetric', 'maternal', 'consultation', 'clinical'],
292
+ },
293
+ defaultFallbackSequence: ['consultation', 'clinical'],
294
+ retryFallbackTypes: ['vitals', 'consultation', 'clinical'],
295
+ defaultEncounterProviderRole: 'a0b03050-c99b-11e0-9572-0800200c9a66',
296
+ defaultLocationUuid: '1',
297
+ storage: {
298
+ maxLocalEntries: 100,
299
+ storageKeyPrefix: 'partography_',
300
+ cacheKeyPrefix: 'partography_encounters_',
301
+ },
302
+ timeConfig: {
303
+ defaultEncounterOffset: 300000,
304
+ retryEncounterOffset: 3600000,
305
+ cacheInvalidationDelay: 1000,
306
+ },
307
+ progressEventConceptNames: {
308
+ [labourCareGuideConceptUuids.FETAL_HEART_RATE_CONCEPT]: {
309
+ name: 'Fetal Heart Rate',
310
+ unit: 'BPM',
311
+ },
312
+ [labourCareGuideConceptUuids.CERVIX_CONCEPT]: {
313
+ name: 'Cervical Dilation',
314
+ unit: 'cm',
315
+ },
316
+ [labourCareGuideConceptUuids.UTERINE_CONTRACTIONS_CONCEPT]: {
317
+ name: 'Uterine Contractions',
318
+ unit: 'per 10min',
319
+ },
320
+ },
321
+ uuids: {
322
+ timeSlot: 'a1b2c3d4-1111-2222-3333-444455556666',
323
+ mchPartographyEncounterUuid: labourCareGuideConceptUuids.UUID_PARTOGRAPHY_ENCOUNTER,
324
+ drugsFluidsEncounterUuid: '39da3525-afe4-45ff-8977-c53b7b359158',
325
+ contractionStrongConceptUuid: labourCareGuideConceptUuids.UUID_CONTRACTION_STRONG_FALLBACK,
326
+ },
327
+ graphTypeDisplayNames: {
328
+ 'fetal-heart-rate': 'Fetal Heart Rate',
329
+ 'cervical-dilation': 'Cervical Dilation',
330
+ 'descent-of-head': 'Descent of Head',
331
+ 'uterine-contractions': 'Uterine Contractions',
332
+ 'maternal-pulse': 'Maternal Pulse',
333
+ 'blood-pressure': 'Blood Pressure',
334
+ temperature: 'Temperature',
335
+ 'urine-analysis': 'Urine Analysis',
336
+ 'drugs-fluids': 'Drugs & Fluids',
337
+ 'progress-events': 'Progress & Events',
338
+ },
339
+ amnioticFluidMap: {
340
+ 'Membrane intact': labourCareGuideConceptUuids.UUID_BABY_AMNIOTIC_INTACT,
341
+ 'Clear liquor': labourCareGuideConceptUuids.UUID_BABY_AMNIOTIC_CLEAR,
342
+ 'Meconium Stained': labourCareGuideConceptUuids.UUID_BABY_AMNIOTIC_MECONIUM,
343
+ Absent: labourCareGuideConceptUuids.AMNIOTIC_ABSENT_CONCEPT,
344
+ 'Blood Stained': labourCareGuideConceptUuids.UUID_BABY_AMNIOTIC_BLOOD,
345
+ },
346
+ mouldingMap: {
347
+ '0': labourCareGuideConceptUuids.UUID_CONTRACTION_NONE,
348
+ '+': labourCareGuideConceptUuids.UUID_URINE_ONE_PLUS,
349
+ '++': labourCareGuideConceptUuids.UUID_URINE_TWO_PLUS,
350
+ '+++': labourCareGuideConceptUuids.UUID_URINE_THREE_PLUS,
351
+ },
352
+ testData: {
353
+ testGraphTypes: ['fetal-heart-rate', 'cervical-dilation', 'maternal-pulse', 'temperature', 'blood-pressure'],
354
+ sampleDataPoints: [
355
+ { value: 120, time: '10:00' },
356
+ { value: 125, time: '11:00' },
357
+ { value: 130, time: '12:00' },
358
+ { value: 128, time: '13:00' },
359
+ ],
360
+ valueIncrement: 10,
361
+ bloodPressureDecrement: 40,
362
+ },
363
+ descentOfHeadUuidToValue: {
364
+ [labourCareGuideConceptUuids.STATION_0_CONCEPT]: 0,
365
+ [labourCareGuideConceptUuids.STATION_1_CONCEPT]: 1,
366
+ [labourCareGuideConceptUuids.STATION_2_CONCEPT]: 2,
367
+ [labourCareGuideConceptUuids.STATION_3_CONCEPT]: 3,
368
+ [labourCareGuideConceptUuids.STATION_4_CONCEPT]: 4,
369
+ [labourCareGuideConceptUuids.STATION_5_CONCEPT]: 5,
370
+ },
371
+ } as const;
372
+
373
+ export type LabourCareGuidePartographyConfig = typeof labourCareGuidePartographyConfig;
374
+
30
375
  export const configSchema: ConfigSchema = {
31
376
  patientCardElements: {
32
377
  _description:
@@ -550,39 +895,50 @@ export const configSchema: ConfigSchema = {
550
895
  inpatientLocationTags: {
551
896
  _default: {
552
897
  maternityWard: 'b95dd376-fa35-40a6-b140-d144c5f22f62',
898
+ antenatalWard: 'dab3c2bb-0b0b-4ebd-8f99-3ad44996d311',
553
899
  labourWard: '7680b7ee-6880-450c-8b7e-2a748b6f9dc7',
554
900
  },
555
901
  },
556
902
  treatmentChartCardexEncounterTypeUuid: {
557
- _description: 'Encounter type uuid for the cardex section of the treatment chart',
903
+ _description: 'Encounter type uuid for the cardex section of the treatment sheet',
558
904
  _type: Type.UUID,
559
905
  _default: 'b6569074-3b8c-43ba-bd4a-98c445405035',
560
906
  },
561
907
  treatmentChartCardexFormUuid: {
562
- _description: 'Form uuid for the cardex section of the treatment chart',
908
+ _description: 'Form uuid for the cardex section of the treatment sheet',
563
909
  _type: Type.UUID,
564
910
  _default: '1f81d5e2-3569-40cf-bbb9-361a53ba409b',
565
911
  },
566
912
  treatmentChartMedicationGroupUuid: {
567
- _description: 'Concept uuid for the medication group in the cardex section of the treatment chart',
913
+ _description: 'Concept uuid for the medication group in the cardex section of the treatment sheet',
568
914
  _type: Type.UUID,
569
915
  _default: '159369AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
570
916
  },
571
917
  treatmentChartFluidGroupUuid: {
572
- _description: 'Concept uuid for the fluids group in the cardex section of the treatment chart',
918
+ _description: 'Concept uuid for the fluids group in the cardex section of the treatment sheet',
573
919
  _type: Type.UUID,
574
920
  _default: '161911AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
575
921
  },
576
922
  treatmentChartNameConceptUuid: {
577
- _description: 'Concept uuid for the name field in the cardex section of the treatment chart',
923
+ _description: 'Concept uuid for the name field in the cardex section of the treatment sheet',
578
924
  _type: Type.UUID,
579
925
  _default: '164231AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
580
926
  },
581
927
  treatmentChartTimeConceptUuid: {
582
- _description: 'Concept uuid for the time field in the cardex section of the treatment chart',
928
+ _description: 'Concept uuid for the time field in the cardex section of the treatment sheet',
583
929
  _type: Type.UUID,
584
930
  _default: '9c4c7722-ba3e-4bdf-ab97-c04170100037',
585
931
  },
932
+ partography: {
933
+ _type: Type.Object,
934
+ _description: 'Labour care guide partography module configuration',
935
+ _default: labourCareGuidePartographyConfig,
936
+ },
937
+ lcgSessionCorrectionPrivilege: {
938
+ _type: Type.String,
939
+ _description: 'OpenMRS privilege required to open the LCG wrong-patient correction wizard',
940
+ _default: 'Correct LCG Wrong Patient',
941
+ },
586
942
  } as const;
587
943
 
588
944
  export interface WardConfigObject {
@@ -683,6 +1039,7 @@ export interface WardConfigObject {
683
1039
  };
684
1040
  inpatientLocationTags: {
685
1041
  maternityWard: string;
1042
+ antenatalWard: string;
686
1043
  labourWard: string;
687
1044
  };
688
1045
  treatmentChartCardexEncounterTypeUuid: string;
@@ -691,6 +1048,8 @@ export interface WardConfigObject {
691
1048
  treatmentChartFluidGroupUuid: string;
692
1049
  treatmentChartNameConceptUuid: string;
693
1050
  treatmentChartTimeConceptUuid: string;
1051
+ partography: LabourCareGuidePartographyConfig;
1052
+ lcgSessionCorrectionPrivilege: string;
694
1053
  }
695
1054
  export interface PendingItemsElementConfig {
696
1055
  id: string;
@@ -6,6 +6,7 @@ import {
6
6
  ExtensionSlot,
7
7
  type FHIRResource,
8
8
  useAssignedExtensions,
9
+ useConfig,
9
10
  usePatient,
10
11
  useRenderableExtensions,
11
12
  } from '@openmrs/esm-framework';
@@ -14,14 +15,71 @@ import { useTranslation } from 'react-i18next';
14
15
  import { ComponentContext, translateFrom } from '@openmrs/esm-framework/src/internal';
15
16
  import styles from './inpatient.scss';
16
17
  import { moduleName } from '../constant';
18
+ import useCurrentPatientAdmissionEncounter from '../hooks/useCurrentPatientAdmissionEncounter';
19
+ import { useAdmissionLocationTags } from './in-patient.resource';
20
+ import type { WardConfigObject } from '../config-schema';
17
21
 
18
22
  type InpatientTabsProps = {
19
23
  patientUuid: string;
20
24
  };
21
25
  const INPATIENT_TABS_EXTENSION_SLOT = 'inpatient-dashboard-tabs-slot';
26
+ const LABOUR_CARE_GUIDE_EXTENSION_NAME = 'maternal-and-child-health-labour-care-guide';
27
+
28
+ const getPatientGenderValue = (patient: any): string => {
29
+ const gender = patient?.gender;
30
+ if (typeof gender === 'string') {
31
+ return gender;
32
+ }
33
+
34
+ if (gender && typeof gender === 'object') {
35
+ return String(gender.display ?? gender.name ?? gender.value ?? '');
36
+ }
37
+
38
+ return '';
39
+ };
40
+
41
+ const isFemalePatient = (patient: any): boolean => {
42
+ const gender = getPatientGenderValue(patient).trim().toLowerCase();
43
+ return gender === 'f' || gender === 'female' || gender.startsWith('female ');
44
+ };
45
+
46
+ const getPatientAge = (patient: any): number => {
47
+ const ageFromPatient = Number(patient?.age);
48
+ if (Number.isFinite(ageFromPatient)) {
49
+ return ageFromPatient;
50
+ }
51
+
52
+ const birthDate = patient?.birthDate;
53
+ if (!birthDate) {
54
+ return NaN;
55
+ }
56
+
57
+ const birth = new Date(birthDate);
58
+ if (Number.isNaN(birth.getTime())) {
59
+ return NaN;
60
+ }
61
+
62
+ const now = new Date();
63
+ let age = now.getFullYear() - birth.getFullYear();
64
+ const hasNotHadBirthdayYet =
65
+ now.getMonth() < birth.getMonth() || (now.getMonth() === birth.getMonth() && now.getDate() < birth.getDate());
66
+ if (hasNotHadBirthdayYet) {
67
+ age -= 1;
68
+ }
69
+
70
+ return age;
71
+ };
72
+
22
73
  const InpatientTabs: FC<InpatientTabsProps> = ({ patientUuid }) => {
23
74
  const { t } = useTranslation();
24
75
  const { patient, isLoading, error } = usePatient(patientUuid);
76
+ const { inpatientLocationTags } = useConfig<WardConfigObject>();
77
+ const {
78
+ admissionEncounter,
79
+ isLoading: isLoadingAdmission,
80
+ isPatientAdmitted,
81
+ } = useCurrentPatientAdmissionEncounter(patientUuid);
82
+ const { tags, isLoading: isLoadingTags } = useAdmissionLocationTags(admissionEncounter?.location?.uuid);
25
83
  const state = useMemo(() => ({ patientUuid, patient }), [patientUuid, patient]);
26
84
  const assignedExtensions = useAssignedExtensions(INPATIENT_TABS_EXTENSION_SLOT);
27
85
  const extensions = useRenderableExtensions(INPATIENT_TABS_EXTENSION_SLOT);
@@ -32,7 +90,30 @@ const InpatientTabs: FC<InpatientTabsProps> = ({ patientUuid }) => {
32
90
  (a.order ?? Infinity) - (b.order ?? Infinity),
33
91
  );
34
92
  }, [assignedExtensions]);
35
- if (isLoading) {
93
+
94
+ const isAdmittedToAllowedWard = useMemo(() => {
95
+ const allowedWardTags = [
96
+ inpatientLocationTags?.labourWard,
97
+ inpatientLocationTags?.antenatalWard,
98
+ inpatientLocationTags?.maternityWard,
99
+ ].filter(Boolean);
100
+ return allowedWardTags.some((tagUuid) => tags.some((tag) => tag.uuid === tagUuid));
101
+ }, [inpatientLocationTags, tags]);
102
+
103
+ const canShowLabourCareGuideTab = useMemo(() => {
104
+ const age = getPatientAge(patient);
105
+ return isFemalePatient(patient) && Number.isFinite(age) && age > 9 && isPatientAdmitted && isAdmittedToAllowedWard;
106
+ }, [patient, isPatientAdmitted, isAdmittedToAllowedWard]);
107
+
108
+ const visibleExtensions = useMemo(
109
+ () =>
110
+ sortedExtensions.filter(
111
+ (extension) => extension.name !== LABOUR_CARE_GUIDE_EXTENSION_NAME || canShowLabourCareGuideTab,
112
+ ),
113
+ [sortedExtensions, canShowLabourCareGuideTab],
114
+ );
115
+
116
+ if (isLoading || isLoadingAdmission || isLoadingTags) {
36
117
  return <TabsSkeleton />;
37
118
  }
38
119
 
@@ -43,14 +124,14 @@ const InpatientTabs: FC<InpatientTabsProps> = ({ patientUuid }) => {
43
124
  <Layer>
44
125
  <Tabs>
45
126
  <TabList contained>
46
- {sortedExtensions.map((ext) => (
127
+ {visibleExtensions.map((ext) => (
47
128
  <Tab key={ext.name}>{translateFrom(ext.moduleName, ext.meta.title, ext.meta.title)}</Tab>
48
129
  ))}
49
130
  </TabList>
50
131
  <TabPanels
51
132
  data-extension-slot-name={INPATIENT_TABS_EXTENSION_SLOT}
52
133
  data-extension-slot-module-name={moduleName}>
53
- {sortedExtensions.map((ext) => (
134
+ {visibleExtensions.map((ext) => (
54
135
  <TabPanel key={ext.name}>
55
136
  <ComponentContext.Provider
56
137
  key={ext.id}