@argusoft/medplat-core 1.0.29 → 1.0.31

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 (217) hide show
  1. package/dist/AccessRights-DUgY6ewy.js +1031 -0
  2. package/dist/AccessRights-DUgY6ewy.js.map +1 -0
  3. package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
  4. package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
  5. package/dist/{AddFeatures-v3TmGQee.js → AddFeatures-D1sU8RjY.js} +2 -2
  6. package/dist/{AddFeatures-v3TmGQee.js.map → AddFeatures-D1sU8RjY.js.map} +1 -1
  7. package/dist/AddLabelModal-Bq-wRqv9.js +631 -0
  8. package/dist/AddLabelModal-Bq-wRqv9.js.map +1 -0
  9. package/dist/AddMenuConfiguration-c6ZKiN0i.js +8898 -0
  10. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
  11. package/dist/AppModal-CCtrQ5Tr.js +394 -0
  12. package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
  13. package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js +387 -0
  14. package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js.map +1 -0
  15. package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js +398 -0
  16. package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
  17. package/dist/{ChangePasswordModalCore-DutQAZOx.js → ChangePasswordModalCore-lQ9GamH1.js} +1605 -1610
  18. package/dist/ChangePasswordModalCore-lQ9GamH1.js.map +1 -0
  19. package/dist/ConditionConfig-BQBmBHaM.js +408 -0
  20. package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
  21. package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js +435 -0
  22. package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js.map +1 -0
  23. package/dist/EventConfig-BY2cgGyx.js +27 -0
  24. package/dist/EventConfig-BY2cgGyx.js.map +1 -0
  25. package/dist/EventConfigurations-CUPEN5BV.js +544 -0
  26. package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
  27. package/dist/EventConfigurations.css +1 -1
  28. package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
  29. package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
  30. package/dist/EventsUi-D6O9S7BK.js +258 -0
  31. package/dist/EventsUi-D6O9S7BK.js.map +1 -0
  32. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +79 -0
  33. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +1 -0
  34. package/dist/FeatureMenu-CHsBbw3W.js +525 -0
  35. package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
  36. package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-iXBPkRVF.js} +22 -22
  37. package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-iXBPkRVF.js.map} +1 -1
  38. package/dist/{FhirServerWizard-Db6Hm4bQ.js → FhirServerWizard-DZI8Olku.js} +15 -15
  39. package/dist/{FhirServerWizard-Db6Hm4bQ.js.map → FhirServerWizard-DZI8Olku.js.map} +1 -1
  40. package/dist/FlywayQuery-CQygj51V.js +179 -0
  41. package/dist/FlywayQuery-CQygj51V.js.map +1 -0
  42. package/dist/GrantPermissionModal-D7iNZd0M.js +239 -0
  43. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  44. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js +8019 -0
  45. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +1 -0
  46. package/dist/ImmunizationConfigurationBase.css +1 -1
  47. package/dist/ImmunizationConfigurationsList-TZcLDEci.js +369 -0
  48. package/dist/ImmunizationConfigurationsList-TZcLDEci.js.map +1 -0
  49. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +665 -0
  50. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +1 -0
  51. package/dist/LanguagesModal-B3NTebYT.js +352 -0
  52. package/dist/LanguagesModal-B3NTebYT.js.map +1 -0
  53. package/dist/ManageDynamicFeature-BU0I45dd.js +4475 -0
  54. package/dist/ManageDynamicFeature-BU0I45dd.js.map +1 -0
  55. package/dist/ManageEventConfiguration-DqW3krT6.js +1216 -0
  56. package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
  57. package/dist/ManageEventConfiguration.css +1 -1
  58. package/dist/{ManageNotification-CfhHlfxA.js → ManageNotification-C5MhV77Q.js} +2 -2
  59. package/dist/{ManageNotification-CfhHlfxA.js.map → ManageNotification-C5MhV77Q.js.map} +1 -1
  60. package/dist/{ManageRole-4Y2PP4dQ.js → ManageRole-CNZBRKGU.js} +2 -2
  61. package/dist/{ManageRole-4Y2PP4dQ.js.map → ManageRole-CNZBRKGU.js.map} +1 -1
  62. package/dist/ManageTranslation-vRiptUAP.js +833 -0
  63. package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
  64. package/dist/ManageTranslation.css +1 -1
  65. package/dist/{ManageUser-DDzyd9jm.js → ManageUser-DZltBina.js} +224 -224
  66. package/dist/{ManageUser-DDzyd9jm.js.map → ManageUser-DZltBina.js.map} +1 -1
  67. package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js +272 -0
  68. package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map +1 -0
  69. package/dist/MobileAnalytics-BLOionG_.js +17301 -0
  70. package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
  71. package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
  72. package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
  73. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
  74. package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
  75. package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
  76. package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
  77. package/dist/{NotificationList-BMFpNUJG.js → NotificationList-DEyRZEuM.js} +2 -2
  78. package/dist/{NotificationList-BMFpNUJG.js.map → NotificationList-DEyRZEuM.js.map} +1 -1
  79. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
  80. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
  81. package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js +482 -0
  82. package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map +1 -0
  83. package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js +157 -0
  84. package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map +1 -0
  85. package/dist/PermissionsModal-CCYkcKlC.js +151 -0
  86. package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
  87. package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js +119 -0
  88. package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map +1 -0
  89. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +783 -0
  90. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +1 -0
  91. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js +818 -0
  92. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
  93. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +599 -0
  94. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +1 -0
  95. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +1305 -0
  96. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
  97. package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js +253 -0
  98. package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
  99. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +675 -0
  100. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
  101. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js +1577 -0
  102. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
  103. package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js +279 -0
  104. package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map +1 -0
  105. package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js +293 -0
  106. package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js.map +1 -0
  107. package/dist/QueryBuilder-CXaBe6sr.js +478 -0
  108. package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
  109. package/dist/{RoleManagement-DEiBNfT8.js → RoleManagement-s8iNx2Mu.js} +145 -155
  110. package/dist/RoleManagement-s8iNx2Mu.js.map +1 -0
  111. package/dist/Roles-BIyiic67.js +14 -0
  112. package/dist/Roles-BIyiic67.js.map +1 -0
  113. package/dist/SaleCreatePage-CZnIOydv-DKBw-qp7.js +544 -0
  114. package/dist/SaleCreatePage-CZnIOydv-DKBw-qp7.js.map +1 -0
  115. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js +315 -0
  116. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
  117. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
  118. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +1 -0
  119. package/dist/ShowFlywayQuery-D10Olk5Z.js +154 -0
  120. package/dist/ShowFlywayQuery-D10Olk5Z.js.map +1 -0
  121. package/dist/{ShowFlywayQuery-DVRCd384.js → ShowFlywayQuery-DIOUdYfG.js} +170 -123
  122. package/dist/ShowFlywayQuery-DIOUdYfG.js.map +1 -0
  123. package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
  124. package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
  125. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js +728 -0
  126. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
  127. package/dist/SubMenu-BdMTYtC1.js +319 -0
  128. package/dist/SubMenu-BdMTYtC1.js.map +1 -0
  129. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js +746 -0
  130. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +1 -0
  131. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +315 -0
  132. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +1 -0
  133. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +476 -0
  134. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
  135. package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
  136. package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
  137. package/dist/{UserList-Bc8gYxRL.js → UserList-L41Xw0Q6.js} +253 -236
  138. package/dist/{UserList-Bc8gYxRL.js.map → UserList-L41Xw0Q6.js.map} +1 -1
  139. package/dist/Users-CsJ08Kjm.js.map +1 -1
  140. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +321 -0
  141. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +1 -0
  142. package/dist/constants-DpXnLsAB-D6lN5cjK.js +445 -0
  143. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
  144. package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
  145. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +1 -0
  146. package/dist/format-UOyOu75i-D0GyylyQ.js +63 -0
  147. package/dist/format-UOyOu75i-D0GyylyQ.js.map +1 -0
  148. package/dist/index.css +1 -1
  149. package/dist/index.js +1 -1
  150. package/dist/index.lib-ETRQOzvE.js +894 -0
  151. package/dist/index.lib-ETRQOzvE.js.map +1 -0
  152. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
  153. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +1 -0
  154. package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js +28 -0
  155. package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js.map +1 -0
  156. package/dist/validation-BzlHnL-r-CCJm2utQ.js +125 -0
  157. package/dist/validation-BzlHnL-r-CCJm2utQ.js.map +1 -0
  158. package/package.json +4 -3
  159. package/dist/AccessRights-Zm8Obm4N.js +0 -1284
  160. package/dist/AccessRights-Zm8Obm4N.js.map +0 -1
  161. package/dist/AddEditQueryBuilder-Brdnm6rQ.js +0 -313
  162. package/dist/AddEditQueryBuilder-Brdnm6rQ.js.map +0 -1
  163. package/dist/AddLabelModal-DFllBVcd.js +0 -734
  164. package/dist/AddLabelModal-DFllBVcd.js.map +0 -1
  165. package/dist/AddMenuConfiguration-Ce91MhnU.js +0 -8547
  166. package/dist/AddMenuConfiguration-Ce91MhnU.js.map +0 -1
  167. package/dist/AppModal-CtG2GjD_.js +0 -428
  168. package/dist/AppModal-CtG2GjD_.js.map +0 -1
  169. package/dist/ChangePasswordModalCore-DutQAZOx.js.map +0 -1
  170. package/dist/ConditionConfig-B4Ffpgj3.js +0 -395
  171. package/dist/ConditionConfig-B4Ffpgj3.js.map +0 -1
  172. package/dist/ConditionConfig.css +0 -1
  173. package/dist/EventConfigurations-BJcURufo.js +0 -449
  174. package/dist/EventConfigurations-BJcURufo.js.map +0 -1
  175. package/dist/EventsExceptionModal-BlZtBQoR.js +0 -200
  176. package/dist/EventsExceptionModal-BlZtBQoR.js.map +0 -1
  177. package/dist/EventsSkeleton-DK6JDKAK.js +0 -83
  178. package/dist/EventsSkeleton-DK6JDKAK.js.map +0 -1
  179. package/dist/FeatureMenu-C3503UIX.js +0 -265
  180. package/dist/FeatureMenu-C3503UIX.js.map +0 -1
  181. package/dist/FlywayQuery-Cx2sly6g.js +0 -169
  182. package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
  183. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +0 -5895
  184. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js.map +0 -1
  185. package/dist/ImmunizationConfigurationsList-DdSZicTP.js +0 -344
  186. package/dist/ImmunizationConfigurationsList-DdSZicTP.js.map +0 -1
  187. package/dist/LanguagesModal-D6VfaGrl.js +0 -394
  188. package/dist/LanguagesModal-D6VfaGrl.js.map +0 -1
  189. package/dist/ManageDynamicFeature-dt096fyj.js +0 -4189
  190. package/dist/ManageDynamicFeature-dt096fyj.js.map +0 -1
  191. package/dist/ManageEventConfiguration-BpSJszSX.js +0 -1017
  192. package/dist/ManageEventConfiguration-BpSJszSX.js.map +0 -1
  193. package/dist/ManageTranslation-B4C9-lWD.js +0 -625
  194. package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
  195. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  196. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  197. package/dist/MobileTypeEventConfigModal-DUkUYACe.js +0 -783
  198. package/dist/MobileTypeEventConfigModal-DUkUYACe.js.map +0 -1
  199. package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
  200. package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
  201. package/dist/OtherTypeEventConfigModal-CYBfr2XE.js +0 -2046
  202. package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +0 -1
  203. package/dist/QueryBuilder-z7eqfd7D.js +0 -383
  204. package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
  205. package/dist/RoleManagement-DEiBNfT8.js.map +0 -1
  206. package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
  207. package/dist/ShowFlywayQuery-tj42YQAS.js +0 -130
  208. package/dist/ShowFlywayQuery-tj42YQAS.js.map +0 -1
  209. package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
  210. package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
  211. package/dist/SubMenu-B072oEGb.js +0 -191
  212. package/dist/SubMenu-B072oEGb.js.map +0 -1
  213. package/dist/TypeConfiguration-C3xoP2Nb.js +0 -117
  214. package/dist/TypeConfiguration-C3xoP2Nb.js.map +0 -1
  215. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  216. package/dist/index.lib-C3fwoM3y.js +0 -820
  217. package/dist/index.lib-C3fwoM3y.js.map +0 -1
@@ -0,0 +1,894 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { lazy as m } from "react";
3
+ import { createSlice as Q } from "@reduxjs/toolkit";
4
+ import { execute as f, executeAll as W } from "@/common/services/GlobalApis";
5
+ import { api as L } from "@/common/interceptors/AxiosInterceptor";
6
+ import './index.css';const d = m(
7
+ () => import("@/views/feature-components/VerifyRoute.jsx")
8
+ ), J = m(() => import("./RoleManagement-s8iNx2Mu.js")), K = m(
9
+ () => import("./QueryBuilder-CXaBe6sr.js").then((e) => e.Q)
10
+ ), Y = m(() => import("./UserList-L41Xw0Q6.js")), V = m(() => import("./ManageUser-DZltBina.js").then((e) => e.M)), ee = m(
11
+ () => import("./QueryManagement-BIhEDKuA.js")
12
+ ), te = m(() => import("./FeatureMenu-CHsBbw3W.js").then((e) => e.F)), ie = m(() => import("./index-D9YNFPn9.js")), ne = m(
13
+ () => import("./NewServerManagement-Cxe0dV0O.js")
14
+ ), O = m(
15
+ () => import("./ManageDynamicFeature-BU0I45dd.js")
16
+ ), ae = m(
17
+ () => import("./SecurityAuditLogList-Dod711KT.js")
18
+ ), re = m(
19
+ () => import("./EventConfigurations-CUPEN5BV.js")
20
+ ), G = m(
21
+ () => import("./ManageEventConfiguration-DqW3krT6.js")
22
+ ), le = m(
23
+ () => import("./EntityManagement-CPQL6qBj.js")
24
+ ), oe = m(
25
+ () => import("./MobileAnalytics-BLOionG_.js")
26
+ ), se = m(
27
+ () => import("./MobileMenuManagement-68Wijb0X.js")
28
+ ), ce = m(
29
+ () => import("./AddMenuConfiguration-c6ZKiN0i.js")
30
+ ), de = m(
31
+ () => import("./ManageTranslation-vRiptUAP.js").then((e) => e.j)
32
+ ), me = m(
33
+ () => import("./WidgetList-D7YuWfDD.js")
34
+ ), ue = m(
35
+ () => import("./NotificationList-DEyRZEuM.js").then((e) => e.N)
36
+ ), pe = m(
37
+ () => import("./ImmunizationConfigurationsList-TZcLDEci.js")
38
+ ), C = m(
39
+ () => import("./manageImmunization-B4swS745.js")
40
+ ), ge = m(
41
+ () => import("./ImmunizationConfigurationBase-aUtx0JEe.js").then((e) => e.ai)
42
+ ), Ie = m(
43
+ () => import("./FhirServerList-iXBPkRVF.js")
44
+ ), fe = m(
45
+ () => import("./FhirServerWizard-DZI8Olku.js")
46
+ ), Te = m(
47
+ () => import("./FhirServerProfile-CUOwC6Wb.js")
48
+ ), be = m(
49
+ () => import("./FhirRawResourceList-ZZFd7gTX.js")
50
+ ), it = [
51
+ {
52
+ path: "medplat/manage/role",
53
+ element: /* @__PURE__ */ s(
54
+ d,
55
+ {
56
+ headerTitle: "Roles",
57
+ pageTitle: "General",
58
+ url: "medplat/manage/role",
59
+ component: J
60
+ }
61
+ )
62
+ },
63
+ {
64
+ path: "medplat/manage/query",
65
+ element: /* @__PURE__ */ s(
66
+ d,
67
+ {
68
+ headerTitle: "Query Master",
69
+ pageTitle: "General",
70
+ url: "medplat/manage/query",
71
+ component: K
72
+ }
73
+ )
74
+ },
75
+ {
76
+ path: "medplat/manage/users",
77
+ element: /* @__PURE__ */ s(
78
+ d,
79
+ {
80
+ headerTitle: "Users",
81
+ pageTitle: "UserList",
82
+ url: "medplat/manage/users",
83
+ component: Y
84
+ }
85
+ )
86
+ },
87
+ {
88
+ path: "medplat/manage/user",
89
+ element: /* @__PURE__ */ s(
90
+ d,
91
+ {
92
+ headerTitle: "Users",
93
+ pageTitle: "ManageUser",
94
+ url: "medplat/manage/users",
95
+ component: V
96
+ }
97
+ )
98
+ },
99
+ {
100
+ path: "medplat/manage/user/:id",
101
+ element: /* @__PURE__ */ s(
102
+ d,
103
+ {
104
+ headerTitle: "Users",
105
+ pageTitle: "General",
106
+ url: "medplat/manage/users",
107
+ component: V
108
+ }
109
+ )
110
+ },
111
+ {
112
+ path: "medplat/querymanagement",
113
+ element: /* @__PURE__ */ s(
114
+ d,
115
+ {
116
+ headerTitle: "Query Management",
117
+ pageTitle: "General",
118
+ url: "medplat/querymanagement",
119
+ component: ee
120
+ }
121
+ )
122
+ },
123
+ {
124
+ path: "medplat/manage/menu",
125
+ element: /* @__PURE__ */ s(
126
+ d,
127
+ {
128
+ headerTitle: "Features",
129
+ pageTitle: "General",
130
+ url: "medplat/manage/menu",
131
+ component: te
132
+ }
133
+ )
134
+ },
135
+ {
136
+ path: "medplat/manage/menu/addfeature",
137
+ element: /* @__PURE__ */ s(
138
+ d,
139
+ {
140
+ headerTitle: "Features",
141
+ pageTitle: "General",
142
+ url: "medplat/manage/menu",
143
+ component: O
144
+ }
145
+ )
146
+ },
147
+ {
148
+ path: "medplat/manage/menu/addDynamicFeature",
149
+ element: /* @__PURE__ */ s(
150
+ d,
151
+ {
152
+ headerTitle: "Features",
153
+ pageTitle: "General",
154
+ url: "medplat/manage/menu",
155
+ component: O
156
+ }
157
+ )
158
+ },
159
+ {
160
+ path: "medplat/notification/all",
161
+ element: /* @__PURE__ */ s(
162
+ d,
163
+ {
164
+ headerTitle: "Event Configuration",
165
+ pageTitle: "General",
166
+ url: "medplat/notification/all",
167
+ component: re
168
+ }
169
+ )
170
+ },
171
+ {
172
+ path: "medplat/views/config",
173
+ element: /* @__PURE__ */ s(
174
+ d,
175
+ {
176
+ headerTitle: "Event Configuration",
177
+ pageTitle: "General",
178
+ url: "medplat/notification",
179
+ component: G
180
+ }
181
+ )
182
+ },
183
+ {
184
+ path: "medplat/views/config/:id",
185
+ element: /* @__PURE__ */ s(
186
+ d,
187
+ {
188
+ headerTitle: "Event Configuration",
189
+ pageTitle: "General",
190
+ url: "medplat/notification",
191
+ component: G
192
+ }
193
+ )
194
+ },
195
+ {
196
+ path: "medplat/admin/newServerManagement",
197
+ element: /* @__PURE__ */ s(
198
+ d,
199
+ {
200
+ headerTitle: "Server Management",
201
+ url: "medplat/admin/newServerManagement",
202
+ component: ne
203
+ }
204
+ )
205
+ },
206
+ {
207
+ path: "medplat/admin/mobileEntityManagement",
208
+ element: /* @__PURE__ */ s(
209
+ d,
210
+ {
211
+ pageTitle: "General",
212
+ url: "medplat/admin/mobileEntityManagement",
213
+ component: le,
214
+ headerTitle: "Mobile Database Management"
215
+ }
216
+ )
217
+ },
218
+ {
219
+ path: "medplat/admin/mobileAnalytics",
220
+ element: /* @__PURE__ */ s(
221
+ d,
222
+ {
223
+ url: "medplat/admin/mobileAnalytics",
224
+ component: oe,
225
+ headerTitle: "Mobile Analytics"
226
+ }
227
+ )
228
+ },
229
+ {
230
+ path: "medplat/admin/mobileMenuManagement",
231
+ element: /* @__PURE__ */ s(
232
+ d,
233
+ {
234
+ url: "medplat/admin/mobileMenuManagement",
235
+ component: /* @__PURE__ */ s(se, {}),
236
+ headerTitle: "Mobile Menu Management"
237
+ }
238
+ )
239
+ },
240
+ {
241
+ path: "medplat/admin/mobileMenuManagement/addMenuConfiguration",
242
+ element: /* @__PURE__ */ s(ce, {})
243
+ },
244
+ {
245
+ path: "medplat/manage/manageTranslation",
246
+ element: /* @__PURE__ */ s(
247
+ d,
248
+ {
249
+ headerTitle: "Manage Translation",
250
+ pageTitle: "General",
251
+ url: "medplat/manage/manageTranslation",
252
+ component: de
253
+ }
254
+ )
255
+ },
256
+ {
257
+ path: "medplat/manage/managewidgets",
258
+ element: /* @__PURE__ */ s(
259
+ d,
260
+ {
261
+ headerTitle: "Widgets",
262
+ pageTitle: "General",
263
+ url: "medplat/manage/manage-widgets",
264
+ component: me
265
+ }
266
+ )
267
+ },
268
+ {
269
+ path: "medplat/manage/notification",
270
+ element: /* @__PURE__ */ s(
271
+ d,
272
+ {
273
+ headerTitle: "Notification Configuration",
274
+ pageTitle: "General",
275
+ url: "medplat/manage/notification",
276
+ component: ue
277
+ }
278
+ )
279
+ },
280
+ {
281
+ path: "medplat/manage/immunizationConfiguratorList",
282
+ element: /* @__PURE__ */ s(
283
+ d,
284
+ {
285
+ headerTitle: "Immunizations",
286
+ pageTitle: "General",
287
+ url: "medplat/manage/manageTranslation",
288
+ component: pe
289
+ }
290
+ )
291
+ },
292
+ {
293
+ path: "medplat/manage/manageImmunization",
294
+ element: /* @__PURE__ */ s(
295
+ d,
296
+ {
297
+ headerTitle: "Immunizations",
298
+ pageTitle: "General",
299
+ url: "medplat/training/question",
300
+ component: C
301
+ }
302
+ )
303
+ },
304
+ {
305
+ path: "medplat/manage/manageImmunization/:id",
306
+ element: /* @__PURE__ */ s(
307
+ d,
308
+ {
309
+ headerTitle: "Immunizations",
310
+ pageTitle: "General",
311
+ url: "medplat/training/question",
312
+ component: C
313
+ }
314
+ )
315
+ },
316
+ {
317
+ path: "medplat/manage/immunizationConfiguration",
318
+ element: /* @__PURE__ */ s(
319
+ d,
320
+ {
321
+ headerTitle: "Immunization Configuration",
322
+ pageTitle: "General",
323
+ url: "medplat/manage/immunizationConfiguration",
324
+ component: ge
325
+ }
326
+ )
327
+ },
328
+ {
329
+ path: "medplat/manage/securityAuditLogs",
330
+ element: /* @__PURE__ */ s(
331
+ d,
332
+ {
333
+ headerTitle: "Security Audit Logs",
334
+ pageTitle: "Security Audit Logs",
335
+ url: "medplat/manage/securityAuditLogs",
336
+ component: ae
337
+ }
338
+ )
339
+ },
340
+ {
341
+ path: "medplat/manage/activityAnalytics",
342
+ element: /* @__PURE__ */ s(
343
+ d,
344
+ {
345
+ headerTitle: "Activity Analytics",
346
+ url: "medplat/manage/activityAnalytics",
347
+ component: ie
348
+ }
349
+ )
350
+ },
351
+ {
352
+ path: "medplat/admin/fhirResource",
353
+ element: /* @__PURE__ */ s(
354
+ d,
355
+ {
356
+ headerTitle: "FHIR Sync",
357
+ pageTitle: "General",
358
+ url: "medplat/admin/fhirResource",
359
+ component: Ie
360
+ }
361
+ )
362
+ },
363
+ {
364
+ path: "medplat/admin/fhirResource/new",
365
+ element: /* @__PURE__ */ s(
366
+ d,
367
+ {
368
+ headerTitle: "Connect FHIR Server",
369
+ pageTitle: "General",
370
+ url: "medplat/admin/fhirResource",
371
+ component: fe
372
+ }
373
+ )
374
+ },
375
+ {
376
+ path: "medplat/admin/fhirResource/:serverId",
377
+ element: /* @__PURE__ */ s(
378
+ d,
379
+ {
380
+ headerTitle: "FHIR Server",
381
+ pageTitle: "General",
382
+ url: "medplat/admin/fhirResource",
383
+ component: Te
384
+ }
385
+ )
386
+ },
387
+ {
388
+ path: "medplat/admin/fhirResource/:serverId/staging",
389
+ element: /* @__PURE__ */ s(
390
+ d,
391
+ {
392
+ headerTitle: "FHIR Staging Inbox",
393
+ pageTitle: "General",
394
+ url: "medplat/admin/fhirResource",
395
+ component: be
396
+ }
397
+ )
398
+ }
399
+ ], w = () => ({
400
+ vaccines: [],
401
+ selectedVaccineIds: [],
402
+ views: [
403
+ {
404
+ id: "landing",
405
+ name: "Dashboard"
406
+ },
407
+ {
408
+ id: "schedule-config",
409
+ name: "Schedule Config"
410
+ },
411
+ {
412
+ id: "summary",
413
+ name: "Configuration Summary"
414
+ }
415
+ ],
416
+ currentViewId: "summary",
417
+ scheduledVaccines: [],
418
+ baseDateMaster: [],
419
+ recipientMaster: [],
420
+ dbTablesMaster: [],
421
+ filtersMaster: [],
422
+ featureRights: {},
423
+ isConfigLoaded: !1,
424
+ validationErrors: {}
425
+ }), he = w(), U = (e = [], t = {}) => {
426
+ const n = e.findIndex(
427
+ (i) => t.id !== void 0 && (i == null ? void 0 : i.id) === t.id || t.code && (i == null ? void 0 : i.code) === t.code
428
+ );
429
+ return n === -1 ? [...e, t] : e.map(
430
+ (i, r) => r === n ? {
431
+ ...i,
432
+ ...t
433
+ } : i
434
+ );
435
+ }, z = Q({
436
+ name: "immunization",
437
+ initialState: he,
438
+ reducers: {
439
+ toggleVaccine: (e, t) => {
440
+ const n = t.payload;
441
+ Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
442
+ const i = e.selectedVaccineIds.indexOf(n);
443
+ i > -1 ? e.selectedVaccineIds.splice(i, 1) : e.selectedVaccineIds.push(n);
444
+ },
445
+ setVaccines: (e, t) => {
446
+ const n = Array.isArray(t.payload) ? t.payload : [];
447
+ e.vaccines = n, e.selectedVaccineIds.length === 0 && (e.selectedVaccineIds = n.filter((i) => i.isActive).map((i) => i.id));
448
+ },
449
+ setSelectedVaccineIds: (e, t) => {
450
+ e.selectedVaccineIds = t.payload;
451
+ },
452
+ addCustomVaccine: (e, t) => {
453
+ const n = t.payload || {}, {
454
+ name: i,
455
+ vaccine_name: r,
456
+ disease: a,
457
+ target_prevention: c,
458
+ id: g,
459
+ baseDateCode: u,
460
+ base_date_code: T,
461
+ recipientType: o,
462
+ recipient_type: b
463
+ } = n, I = i || r || "Unnamed Vaccine", N = a || c || "General", y = (Array.isArray(e.vaccines) ? e.vaccines : []).map((h) => Number(h == null ? void 0 : h.id)).filter((h) => !Number.isNaN(h)), p = y.length > 0 ? Math.max(...y) + 1 : 1, v = {
464
+ id: g || p,
465
+ name: I,
466
+ category: N,
467
+ doses: 0,
468
+ doseType: "FIXED",
469
+ scheduleType: "ROUTINE",
470
+ doseDetails: {},
471
+ regions: [],
472
+ dependencies: [],
473
+ isActive: n.isActive !== void 0 ? n.isActive : !1,
474
+ baseDateCode: u || T || null,
475
+ recipientType: o || b || ""
476
+ };
477
+ Array.isArray(e.vaccines) || (e.vaccines = []), e.vaccines.push(v);
478
+ },
479
+ setCurrentView: (e, t) => {
480
+ e.currentViewId = t.payload;
481
+ },
482
+ updateScheduledVaccine: (e, t) => {
483
+ const n = t.payload, i = e.scheduledVaccines.findIndex((r) => r.id === n.id);
484
+ i !== -1 ? e.scheduledVaccines[i] = {
485
+ ...e.scheduledVaccines[i],
486
+ ...n
487
+ } : e.scheduledVaccines.push(n);
488
+ },
489
+ setBaseDatesMaster: (e, t) => {
490
+ e.baseDateMaster = t.payload;
491
+ },
492
+ setRecipientMaster: (e, t) => {
493
+ e.recipientMaster = t.payload;
494
+ },
495
+ setDbTablesMaster: (e, t) => {
496
+ e.dbTablesMaster = t.payload;
497
+ },
498
+ setFiltersMaster: (e, t) => {
499
+ e.filtersMaster = t.payload;
500
+ },
501
+ upsertBaseDateMasterItem: (e, t) => {
502
+ e.baseDateMaster = U(e.baseDateMaster, t.payload);
503
+ },
504
+ upsertRecipientMasterItem: (e, t) => {
505
+ e.recipientMaster = U(e.recipientMaster, t.payload);
506
+ },
507
+ updateBaseDateMasterStatus: (e, t) => {
508
+ const { code: n, is_active: i } = t.payload;
509
+ e.baseDateMaster = e.baseDateMaster.map(
510
+ (r) => r.code === n ? { ...r, is_active: i } : r
511
+ );
512
+ },
513
+ upsertFilterMasterItem: (e, t) => {
514
+ e.filtersMaster = U(e.filtersMaster, t.payload);
515
+ },
516
+ updateFilterMasterStatus: (e, t) => {
517
+ const { code: n, is_active: i } = t.payload;
518
+ e.filtersMaster = e.filtersMaster.map(
519
+ (r) => r.code === n ? { ...r, is_active: i } : r
520
+ );
521
+ },
522
+ setFeatureRights: (e, t) => {
523
+ e.featureRights = t.payload || {};
524
+ },
525
+ setImmunizationConfigLoaded: (e, t) => {
526
+ e.isConfigLoaded = t.payload;
527
+ },
528
+ resetImmunizationState: () => w(),
529
+ activateSelectedVaccines: (e) => {
530
+ e.vaccines = e.vaccines.map((t) => ({
531
+ ...t,
532
+ isActive: e.selectedVaccineIds.includes(t.id)
533
+ }));
534
+ },
535
+ setVaccineStatus: (e, t) => {
536
+ const { vaccineId: n, status: i } = t.payload, r = e.vaccines.findIndex((c) => c.id === n);
537
+ r !== -1 && (e.vaccines[r].isActive = i), Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
538
+ const a = e.selectedVaccineIds.indexOf(n);
539
+ i && a === -1 ? e.selectedVaccineIds.push(n) : !i && a !== -1 && e.selectedVaccineIds.splice(a, 1);
540
+ },
541
+ setValidationErrors: (e, t) => {
542
+ const { vaccineId: n, errors: i } = t.payload;
543
+ e.validationErrors[n] = i;
544
+ },
545
+ clearValidationErrors: (e, t) => {
546
+ const n = t.payload;
547
+ n ? delete e.validationErrors[n] : e.validationErrors = {};
548
+ }
549
+ }
550
+ }), {
551
+ toggleVaccine: nt,
552
+ setVaccines: at,
553
+ addCustomVaccine: rt,
554
+ setCurrentView: lt,
555
+ updateScheduledVaccine: ot,
556
+ setBaseDatesMaster: st,
557
+ setRecipientMaster: ct,
558
+ setDbTablesMaster: dt,
559
+ setFiltersMaster: mt,
560
+ upsertBaseDateMasterItem: ut,
561
+ upsertRecipientMasterItem: pt,
562
+ updateBaseDateMasterStatus: gt,
563
+ upsertFilterMasterItem: It,
564
+ updateFilterMasterStatus: ft,
565
+ setFeatureRights: Tt,
566
+ setImmunizationConfigLoaded: bt,
567
+ resetImmunizationState: ht,
568
+ activateSelectedVaccines: yt,
569
+ setSelectedVaccineIds: Et,
570
+ setValidationErrors: Mt,
571
+ clearValidationErrors: At,
572
+ setVaccineStatus: vt
573
+ } = z.actions, Ft = z.reducer, B = (e) => !e || typeof e == "string" && e.toLowerCase() === "birth" ? 0 : Number.parseInt(e) || 0, E = (e, t) => {
574
+ if (!e || typeof e == "string" && e.toLowerCase() === "birth") return 0;
575
+ const n = Number.parseInt(e) || 0;
576
+ return t === "weeks" ? n * 7 : t === "months" ? n * 30 : t === "years" ? n * 365 : n;
577
+ }, x = (e) => e == null || String(e).trim() === "", Nt = "lifelong", D = (e) => e === null, ye = "LIFELONG", Ee = (e, t = {}, n) => {
578
+ const i = {}, r = !x(e.overdueFrom), a = !x(e.overdueTill);
579
+ if (!r)
580
+ return a && (i.overdueTill = "Set Overdue From first"), i;
581
+ const c = E(e.overdueFrom, t.overdueFrom || "days"), g = E(e.overdueTill, t.overdueTill || "days");
582
+ return c <= 0 ? i.overdueFrom = "Must be greater than 0" : n > 0 && c >= n && (i.overdueFrom = "Must be within the eligibility window"), a ? g <= c ? i.overdueTill = "Must be greater than Overdue From" : n > 0 && g > n && (i.overdueTill = "Must be within the eligibility window") : i.overdueTill = "Overdue Till is required", i;
583
+ }, Me = (e, t, n, i = {}) => {
584
+ if (n === 0) return null;
585
+ const r = [], a = Array.isArray(e) ? e : [e], c = i.eligibleFrom || "days", g = i.eligibleTo || "days", u = i.interval || "days", T = a.findIndex((o) => D(o == null ? void 0 : o.eligibleTo));
586
+ return a.forEach((o, b) => {
587
+ const I = o.units || {}, N = I.eligibleFrom || c, l = I.eligibleTo || g, y = I.interval || u, p = {}, A = E(o.eligibleFrom, N), v = E(o.eligibleTo, l), h = D(o.eligibleTo);
588
+ (o.eligibleFrom === void 0 || o.eligibleFrom === null || o.eligibleFrom === "") && b !== 0 && (p.eligibleFrom = "Eligible From is required"), !h && (o.eligibleTo === void 0 || o.eligibleTo === "" || E(o.eligibleTo, l) === 0) && (p.eligibleTo = "Eligible To is required");
589
+ const X = t === "FLEXIBLE" && b === a.length - 1;
590
+ if (t === "FIXED" && n > 1 || !X && t === "FLEXIBLE") {
591
+ const F = Number.parseInt(o.interval) || 0, _ = E(o.interval, y);
592
+ o.interval === void 0 || o.interval === null || o.interval === "" || F === 0 || o.interval === "0 days" ? p.interval = "Interval is required" : t === "FIXED" && n > 1 && // An open-ended window always has room for every dose.
593
+ !h && (n - 1) * _ > v - A && (p.interval = `Number of doses not possible in the window. Total interval exceeds available window (${v - A} days).`);
594
+ }
595
+ if (!h && v <= A && o.eligibleFrom && o.eligibleTo && (p.eligibleTo = "Must be strictly greater than ELIGIBLE FROM"), t === "FLEXIBLE" && !h && T !== -1 && b > T && (p.eligibleTo = "Doses after a lifelong dose must also be lifelong"), t === "FLEXIBLE" && Object.assign(p, Ee(o, I, h ? null : v - A)), b > 0 && t === "FLEXIBLE") {
596
+ const F = a[b - 1], _ = F.units || {}, j = _.eligibleFrom || c, H = _.interval || u, k = E(F.eligibleFrom, j), Z = E(F.interval, H);
597
+ A < k + Z && (p.eligibleFrom = "Must be greater than previous ELIGIBLE FROM and INTERVAL"), F.isBooster && !o.isBooster && (p.isBooster = "A regular dose cannot follow a booster dose");
598
+ }
599
+ Object.keys(p).length > 0 && (r[b] = p);
600
+ }), r.length > 0 ? r : null;
601
+ }, Ae = (e) => {
602
+ const t = [], n = /* @__PURE__ */ new Set();
603
+ return e.forEach((i, r) => {
604
+ const a = {};
605
+ i.vaccine ? (n.has(i.vaccine) && (a.vaccine = "This vaccine is already added as a dependency"), n.add(i.vaccine)) : a.vaccine = "Vaccine selection is required";
606
+ const c = i.minGap === "" || i.minGap === null || i.minGap === void 0, g = i.maxGap === "" || i.maxGap === null || i.maxGap === void 0, u = B(i.minGap), T = B(i.maxGap);
607
+ i.requirement === "Should be given" || i.requirement === "Optional" ? (c ? a.minGap = "Gap cannot be empty" : u <= 0 && (a.minGap = "Must be greater than 0"), !c && !g && u > 0 && T > 0 && T <= u && (a.maxGap = "Max gap must be greater than Min Gap")) : (!c && u < 0 && (a.minGap = "Gap cannot be negative"), !g && T < 0 && (a.maxGap = "Gap cannot be negative")), Object.keys(a).length > 0 && (t[r] = a);
608
+ }), t.some((i) => i && Object.keys(i).length > 0) ? t : null;
609
+ }, ve = (e) => {
610
+ const t = [], n = /* @__PURE__ */ new Set();
611
+ return (e || []).forEach((i, r) => {
612
+ const a = {};
613
+ i.type ? (n.has(i.type) && (a.type = "This type is already added"), n.add(i.type)) : a.type = "Type is required", (!i.value || i.value.trim() === "") && (a.value = "Value is required"), Object.keys(a).length > 0 && (t[r] = a);
614
+ }), t.some((i) => i && Object.keys(i).length > 0) ? t : null;
615
+ }, q = (e) => {
616
+ const t = String(e ?? "").trim().split(/\s+/);
617
+ return E(e, t.length > 1 ? t[t.length - 1] : "days");
618
+ }, Fe = (e) => {
619
+ const t = e.recurringBooster;
620
+ if (!t || e.doseType !== "FLEXIBLE")
621
+ return null;
622
+ const n = {}, i = Number.parseInt(t.eligibleFrom, 10), r = Number.parseInt(t.interval, 10);
623
+ return i >= 0 || (n.eligibleFrom = "Eligible From is required"), r > 0 || (n.interval = "Interval must be greater than 0"), D(t.eligibleTo) || (Number.parseInt(t.eligibleTo, 10) > 0 ? q(t.eligibleTo) <= q(t.eligibleFrom) && (n.eligibleTo = "Must be strictly greater than Eligible From") : n.eligibleTo = "Eligible To is required, or set it to No end"), Object.keys(n).length > 0 ? n : null;
624
+ }, _t = (e, t = !0) => {
625
+ var T;
626
+ const n = {};
627
+ (!e.name || e.name.trim() === "") && (n.name = "Vaccine Name is required"), e.recipientType || (n.recipientType = "Recipient Type is required"), e.baseDateCode || (n.baseDateCode = "Base Date is required");
628
+ const i = ve(e.codeSets || []);
629
+ if (i && (n.codeSets = i), !t)
630
+ return Object.keys(n).length > 0 ? n : null;
631
+ const r = e.doseType === "RECURRING";
632
+ !r && (!e.doses || e.doses === 0) && (n.doses = "At least one dose is required");
633
+ const a = Me(
634
+ e.doseDetails,
635
+ r ? "FIXED" : e.doseType,
636
+ r ? 1 : e.doses,
637
+ e.durationUnits
638
+ );
639
+ a && (n.doseDetails = a);
640
+ const c = Array.isArray(e.doseDetails) ? e.doseDetails[0] : e.doseDetails;
641
+ r && !(Number.parseInt(c == null ? void 0 : c.interval, 10) > 0) && (n.doseDetails = {
642
+ ...n.doseDetails || {},
643
+ 0: { ...((T = n.doseDetails) == null ? void 0 : T[0]) || {}, interval: "Interval must be greater than 0" }
644
+ });
645
+ const g = Fe(e);
646
+ g && (n.recurringBooster = g);
647
+ const u = Ae(e.dependencies || []);
648
+ return u && (n.dependencies = u), Object.keys(n).length > 0 ? n : null;
649
+ }, M = (e, t) => {
650
+ if (e == null)
651
+ return t;
652
+ if (typeof e != "string")
653
+ return e;
654
+ try {
655
+ return JSON.parse(e);
656
+ } catch {
657
+ return t;
658
+ }
659
+ }, S = (...e) => e.filter(Boolean).join("_"), R = (e) => D(e) ? ye : e === void 0 || e === "" || e === "N.A." || e === "null days" ? "N.A." : e, $ = (e, t = "FLEXIBLE", n = 1) => {
660
+ const i = t === "RECURRING";
661
+ if (n === 0 && !i || !e)
662
+ return "N.A.";
663
+ if (t === "FIXED" || i) {
664
+ const c = Array.isArray(e) ? e[0] : e;
665
+ if (!c)
666
+ return "N.A.";
667
+ const g = R(c.eligibleFrom), u = R(c.eligibleTo);
668
+ return g === "N.A." && u === "N.A." ? "N.A." : `${g} to ${u}`;
669
+ }
670
+ if (!Array.isArray(e) || e.length === 0)
671
+ return "N.A.";
672
+ const r = R(e[0].eligibleFrom), a = R(
673
+ e[e.length - 1].eligibleTo
674
+ );
675
+ return r === "N.A." && a === "N.A." ? "N.A." : `${r} to ${a}`;
676
+ }, P = {
677
+ eligibleFrom: "days",
678
+ eligibleTo: "days",
679
+ interval: "days"
680
+ }, Ne = () => ({
681
+ productId: null,
682
+ noOfDoses: 0,
683
+ doseType: "FIXED",
684
+ doseEligibleFrom: void 0,
685
+ doseEligibleTo: void 0,
686
+ minGap: 0,
687
+ durationUnits: { ...P },
688
+ dose: [],
689
+ location: [],
690
+ validations: []
691
+ }), _e = (e, t, n) => {
692
+ const i = String(e.doseType || "").toLowerCase(), r = i === "fixed" || i === "na" || i === "recurring" || !e.doseType, a = M(e.durationUnits, {
693
+ ...P
694
+ }), c = `${t}s${n}`, g = r ? [
695
+ {
696
+ id: S("fixed", c),
697
+ eligibleFrom: e.doseEligibleFrom !== void 0 && e.doseEligibleFrom !== null ? `${e.doseEligibleFrom} ${a.eligibleFrom || "days"}` : "",
698
+ // NULL is the stored form of a lifelong window — see the FLEXIBLE branch below.
699
+ eligibleTo: e.doseEligibleTo === null ? null : e.doseEligibleTo !== void 0 ? `${e.doseEligibleTo} ${a.eligibleTo || "days"}` : "",
700
+ interval: e.minGap || 0
701
+ }
702
+ ] : M(e.dose, []).map((l, y) => {
703
+ const p = {
704
+ eligibleFrom: l.eligible_from_unit || a.eligibleFrom || "days",
705
+ eligibleTo: l.eligible_to_unit || a.eligibleTo || "days",
706
+ interval: l.interval_unit || a.interval || "days",
707
+ overdueFrom: l.overdue_from_unit || "days",
708
+ overdueTill: l.overdue_till_unit || "days"
709
+ };
710
+ return {
711
+ id: l.id || S("dose", c, y),
712
+ isBooster: l.isBooster === !0 || l.is_booster === !0 || typeof l.dose == "string" && l.dose.toUpperCase().startsWith("B"),
713
+ alias: l.alias || l.booster_alias || "",
714
+ eligibleFrom: l.eligible_from !== void 0 ? `${l.eligible_from} ${p.eligibleFrom}` : "",
715
+ // NULL is the stored form of a lifelong window; it must survive as null rather
716
+ // than becoming the string "null days".
717
+ eligibleTo: l.eligible_to === null ? null : l.eligible_to !== void 0 ? `${l.eligible_to} ${p.eligibleTo}` : "",
718
+ overdueFrom: l.overdue_from !== void 0 && l.overdue_from !== null ? `${l.overdue_from} ${p.overdueFrom}` : "",
719
+ overdueTill: l.overdue_till !== void 0 && l.overdue_till !== null ? `${l.overdue_till} ${p.overdueTill}` : "",
720
+ interval: l.min_gap || 0,
721
+ units: p
722
+ };
723
+ }), u = M(e.location, []).filter((l) => l && typeof l == "object").map((l, y) => {
724
+ var p;
725
+ return {
726
+ id: S("region", c, y),
727
+ locationId: l.locationId,
728
+ locationIdArr: l.locationIdArr,
729
+ locationList: l.locationList,
730
+ fullPath: (p = l.locationList) == null ? void 0 : p.replaceAll(" => ", " → ")
731
+ };
732
+ }), T = M(e.validations, []).map(
733
+ (l, y) => ({
734
+ id: S("dep", c, y),
735
+ vaccine: l.vaccine || "",
736
+ requirement: l.requirement || "Should be given",
737
+ minGap: Number.parseInt(l.minGap, 10) || 0,
738
+ maxGap: Number.parseInt(l.maxGap, 10) || 0,
739
+ message: l.message || ""
740
+ })
741
+ ), o = e.noOfDoses || 0, b = e.doseType && e.doseType !== "NA" ? e.doseType : "FIXED", I = e.recurringBooster ? M(e.recurringBooster, null) : null, N = I && I.eligibleFrom !== void 0 && I.eligibleFrom !== null ? {
742
+ eligibleFrom: `${I.eligibleFrom} ${I.eligibleFromUnit || "days"}`,
743
+ // NULL is the stored form of a lifelong window, exactly as for a dose.
744
+ eligibleTo: I.eligibleTo === null || I.eligibleTo === void 0 ? null : `${I.eligibleTo} ${I.eligibleToUnit || "days"}`,
745
+ interval: `${I.interval ?? 0} ${I.intervalUnit || "days"}`
746
+ } : null;
747
+ return {
748
+ productId: e.productId ?? null,
749
+ doses: o,
750
+ doseType: b,
751
+ doseDetails: g,
752
+ durationUnits: a,
753
+ recurringBooster: N,
754
+ regions: u,
755
+ dependencies: T,
756
+ eligibility: $(g, b, o)
757
+ };
758
+ }, Se = (e) => {
759
+ const t = M(e.schedule, []), i = (Array.isArray(t) && t.length > 0 ? t : [Ne()]).map(
760
+ (T, o) => _e(T || {}, e.id, o)
761
+ ), r = M(e.filters, []), a = Array.isArray(r) ? r : (r == null ? void 0 : r.codes) || [], c = M(e.code_sets, []), g = Array.isArray(c) ? c : [], [u] = i;
762
+ return {
763
+ ...e,
764
+ name: e.vaccine_name || e.name || "N.A.",
765
+ category: e.target_prevention || e.disease || e.category || "N.A.",
766
+ productSchedules: i,
767
+ doses: u.doses,
768
+ doseType: u.doseType,
769
+ doseDetails: u.doseDetails,
770
+ eligibility: u.eligibility,
771
+ isActive: e.is_active !== void 0 ? e.is_active : !0,
772
+ // True while this vaccine has configuration saved but not yet published. Everything above
773
+ // is already the draft's values — FETCH_IMMUNISATION_MASTER prefers the draft — so this is
774
+ // the only thing telling the screen that what it is showing is not what members see.
775
+ hasUnpublishedChanges: !!e.has_unpublished_changes,
776
+ regions: u.regions,
777
+ dependencies: u.dependencies,
778
+ filters: a,
779
+ codeSets: g,
780
+ durationUnits: u.durationUnits,
781
+ baseDateCode: e.base_date_code,
782
+ recipientType: e.recipient_type || "",
783
+ scheduleType: e.schedule_type === "NON_ROUTINE" ? "NON_ROUTINE" : "ROUTINE"
784
+ };
785
+ }, Re = () => f({
786
+ code: "FETCH_IMMUNISATION_MASTER",
787
+ parameters: {}
788
+ }), De = () => f({
789
+ code: "FETCH_IMMUNISATION_BASE_DATE",
790
+ parameters: {}
791
+ }), Ue = () => f({
792
+ code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
793
+ parameters: {}
794
+ }), Le = () => W([
795
+ {
796
+ code: "FETCH_IMMUNISATION_BASE_DATE",
797
+ parameters: {},
798
+ sequence: 1
799
+ },
800
+ {
801
+ code: "GET_ALL_IMMUNISATION_FILTERS",
802
+ parameters: {},
803
+ sequence: 2
804
+ },
805
+ {
806
+ code: "FETCH_IMMUNISATION_MASTER",
807
+ parameters: {},
808
+ sequence: 3
809
+ },
810
+ {
811
+ code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
812
+ parameters: {},
813
+ sequence: 4
814
+ }
815
+ ]), Ve = (e) => f({
816
+ code: "INSERT_IMMUNIZATION_MASTER",
817
+ parameters: e
818
+ }), Oe = (e) => f({
819
+ code: "UPDATE_IMMUNIZATION_DOSE",
820
+ ...e
821
+ }), Ge = (e) => f({
822
+ code: "CHECK_IMMUNIZATION_CONFIGURATION_INITIATION",
823
+ ...e
824
+ }), Ce = (e) => f({
825
+ code: "UPDATE_IMMUNIZATION_STATUS",
826
+ ...e
827
+ }), Be = (e) => f({
828
+ code: "UPDATE_IMMUNIZATION_STATUS_FOR_ARRAY",
829
+ ...e
830
+ }), xe = (e) => f({
831
+ code: "UPDATE_IMMUNIZATION_CONFIGURATION_INITIATION",
832
+ ...e
833
+ }), qe = (e) => f({
834
+ code: "SAVE_IMMUNISATION_BASE_DATE",
835
+ parameters: e
836
+ }), we = (e) => f({
837
+ code: "SAVE_IMMUNISATION_RECEPIENT_MASTER",
838
+ parameters: e
839
+ }), ze = (e) => f({
840
+ code: "UPDATE_IMMUNISATION_RECEPIENT_MASTER",
841
+ parameters: e
842
+ }), $e = (e) => f({
843
+ code: "UPDATE_IMMUNISATION_BASE_DATE",
844
+ parameters: e
845
+ }), Pe = () => f({
846
+ code: "retrieve_all_tables_and_columns",
847
+ parameters: {}
848
+ }), Xe = () => f({
849
+ code: "GET_ALL_IMMUNISATION_FILTERS",
850
+ parameters: {}
851
+ }), je = (e) => f({
852
+ code: "ADD_IMMUNISATION_FILTER",
853
+ parameters: e
854
+ }), He = (e) => f({
855
+ code: "UPDATE_IMMUNISATION_FILTER",
856
+ parameters: e
857
+ }), ke = (e) => L.post("/medplatform/v2/immunisation/list", e), Ze = (e) => L.post("/medplatform/v2/immunisation/revalidate", e), Qe = (e) => L.post("/medplatform/v2/immunisation/config-change-notification", e), St = {
858
+ calculateOverallEligibility: $,
859
+ mapImmunizationVaccineConfig: Se,
860
+ getVaccines: Re,
861
+ getBaseDates: De,
862
+ getRecipients: Ue,
863
+ getImmunizationReferenceData: Le,
864
+ addImmunization: Ve,
865
+ updateImmunization: Oe,
866
+ checkImmunizationConfigurationInitiation: Ge,
867
+ updateVaccineStatus: Ce,
868
+ updateVaccineStatusFromArray: Be,
869
+ updateImmunizationConfigurationInitiation: xe,
870
+ saveBaseDate: qe,
871
+ saveRecipient: we,
872
+ updateRecipient: ze,
873
+ updateBaseDate: $e,
874
+ getAllTablesAndColumns: Pe,
875
+ getFilters: Xe,
876
+ addFilter: je,
877
+ updateFilter: He,
878
+ getImmunisationV2List: ke,
879
+ revalidateImmunisationV2List: Ze,
880
+ notifyConfigChange: Qe
881
+ };
882
+ export {
883
+ St as I,
884
+ Nt as L,
885
+ x as a,
886
+ _t as b,
887
+ ye as c,
888
+ Ft as d,
889
+ it as e,
890
+ E as g,
891
+ D as i,
892
+ Ee as v
893
+ };
894
+ //# sourceMappingURL=index.lib-ETRQOzvE.js.map