@argusoft/medplat-core 1.0.27 → 1.0.29

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 (97) hide show
  1. package/dist/AccessRights-Zm8Obm4N.js +1284 -0
  2. package/dist/AccessRights-Zm8Obm4N.js.map +1 -0
  3. package/dist/{AddFeatures-C0Z29oSd.js → AddFeatures-v3TmGQee.js} +2 -2
  4. package/dist/{AddFeatures-C0Z29oSd.js.map → AddFeatures-v3TmGQee.js.map} +1 -1
  5. package/dist/AddMenuConfiguration-Ce91MhnU.js +8547 -0
  6. package/dist/AddMenuConfiguration-Ce91MhnU.js.map +1 -0
  7. package/dist/{AddRoleDrawer-CQdzQZLb.js → AddRoleDrawer-0gqAK8N0.js} +62 -63
  8. package/dist/AddRoleDrawer-0gqAK8N0.js.map +1 -0
  9. package/dist/{ChangePasswordModalCore-CDxkeIIM.js → ChangePasswordModalCore-DutQAZOx.js} +2 -2
  10. package/dist/{ChangePasswordModalCore-CDxkeIIM.js.map → ChangePasswordModalCore-DutQAZOx.js.map} +1 -1
  11. package/dist/{ConditionConfig-DSsgGEXS.js → ConditionConfig-B4Ffpgj3.js} +2 -2
  12. package/dist/ConditionConfig-B4Ffpgj3.js.map +1 -0
  13. package/dist/{EntityManagement-GaYsBTvf.js → EntityManagement-CPQL6qBj.js} +2 -2
  14. package/dist/{EntityManagement-GaYsBTvf.js.map → EntityManagement-CPQL6qBj.js.map} +1 -1
  15. package/dist/{EventConfigurations-kNtAj_WM.js → EventConfigurations-BJcURufo.js} +3 -3
  16. package/dist/{EventConfigurations-kNtAj_WM.js.map → EventConfigurations-BJcURufo.js.map} +1 -1
  17. package/dist/{EventsExceptionModal-D4Bf1ilS.js → EventsExceptionModal-BlZtBQoR.js} +2 -2
  18. package/dist/{EventsExceptionModal-D4Bf1ilS.js.map → EventsExceptionModal-BlZtBQoR.js.map} +1 -1
  19. package/dist/{EventsSkeleton-8iiETGcf.js → EventsSkeleton-DK6JDKAK.js} +26 -19
  20. package/dist/EventsSkeleton-DK6JDKAK.js.map +1 -0
  21. package/dist/{FeatureMenu-jl7-Tk6y.js → FeatureMenu-C3503UIX.js} +3 -3
  22. package/dist/{FeatureMenu-jl7-Tk6y.js.map → FeatureMenu-C3503UIX.js.map} +1 -1
  23. package/dist/Features-Dne21RWu.js +14 -0
  24. package/dist/Features-Dne21RWu.js.map +1 -0
  25. package/dist/FileSaver.min-CN9EpL2h.js.map +1 -1
  26. package/dist/{ManageNotification-CaBAOhji.js → Google-DQxMfbaL.js} +1725 -2652
  27. package/dist/Google-DQxMfbaL.js.map +1 -0
  28. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +5895 -0
  29. package/dist/ImmunizationConfigurationBase-DLQVSNnt.js.map +1 -0
  30. package/dist/ImmunizationConfigurationBase.css +1 -1
  31. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +1 -1
  32. package/dist/{ManageDynamicFeature-BhONvfC_.js → ManageDynamicFeature-dt096fyj.js} +2 -2
  33. package/dist/{ManageDynamicFeature-BhONvfC_.js.map → ManageDynamicFeature-dt096fyj.js.map} +1 -1
  34. package/dist/{ManageEventConfiguration-DV3I5POA.js → ManageEventConfiguration-BpSJszSX.js} +5 -5
  35. package/dist/{ManageEventConfiguration-DV3I5POA.js.map → ManageEventConfiguration-BpSJszSX.js.map} +1 -1
  36. package/dist/ManageNotification-CfhHlfxA.js +934 -0
  37. package/dist/ManageNotification-CfhHlfxA.js.map +1 -0
  38. package/dist/{ManageRole-CGYfglpo.js → ManageRole-4Y2PP4dQ.js} +32 -30
  39. package/dist/ManageRole-4Y2PP4dQ.js.map +1 -0
  40. package/dist/{ManageUser-AY1EUDLI.js → ManageUser-DDzyd9jm.js} +1728 -1592
  41. package/dist/ManageUser-DDzyd9jm.js.map +1 -0
  42. package/dist/MobileMenuManagement-Cf8IZlla.js +108 -0
  43. package/dist/MobileMenuManagement-Cf8IZlla.js.map +1 -0
  44. package/dist/{MobileTypeEventConfigModal-BxLympIO.js → MobileTypeEventConfigModal-DUkUYACe.js} +2 -2
  45. package/dist/MobileTypeEventConfigModal-DUkUYACe.js.map +1 -0
  46. package/dist/{NotificationList-C3Vb_jKU.js → NotificationList-BMFpNUJG.js} +109 -110
  47. package/dist/NotificationList-BMFpNUJG.js.map +1 -0
  48. package/dist/{OtherTypeEventConfigModal-BeG1GrUi.js → OtherTypeEventConfigModal-CYBfr2XE.js} +570 -478
  49. package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +1 -0
  50. package/dist/{RoleManagement-BPl2cE27.js → RoleManagement-DEiBNfT8.js} +100 -101
  51. package/dist/RoleManagement-DEiBNfT8.js.map +1 -0
  52. package/dist/{ServerSyncModal-D_oFpv3C.js → ServerSyncModal-92U3xtqI.js} +84 -85
  53. package/dist/ServerSyncModal-92U3xtqI.js.map +1 -0
  54. package/dist/{SubMenu-DYxAPH2Z.js → SubMenu-B072oEGb.js} +3 -3
  55. package/dist/{SubMenu-DYxAPH2Z.js.map → SubMenu-B072oEGb.js.map} +1 -1
  56. package/dist/{TableDetails-Cf_YfnY2.js → TableDetails-BtafRxXb.js} +1069 -831
  57. package/dist/TableDetails-BtafRxXb.js.map +1 -0
  58. package/dist/{TableList-D6jnIbnz.js → TableList-Dpo6dO7S.js} +2 -2
  59. package/dist/{TableList-D6jnIbnz.js.map → TableList-Dpo6dO7S.js.map} +1 -1
  60. package/dist/{TypeConfiguration-37wp-gsl.js → TypeConfiguration-C3xoP2Nb.js} +2 -2
  61. package/dist/{TypeConfiguration-37wp-gsl.js.map → TypeConfiguration-C3xoP2Nb.js.map} +1 -1
  62. package/dist/{WidgetList-Dw_FmbbE.js → WidgetList-D7YuWfDD.js} +2 -2
  63. package/dist/{WidgetList-Dw_FmbbE.js.map → WidgetList-D7YuWfDD.js.map} +1 -1
  64. package/dist/dashboardLayoutUtils-D1xCAxp3.js +405 -0
  65. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +1 -0
  66. package/dist/i18next-CTOWN_jH.js.map +1 -1
  67. package/dist/index.css +1 -1
  68. package/dist/index.js +4 -752
  69. package/dist/index.js.map +1 -1
  70. package/dist/index.lib-C3fwoM3y.js +820 -0
  71. package/dist/index.lib-C3fwoM3y.js.map +1 -0
  72. package/dist/xlsx.min-D1LFqt_b.js.map +1 -1
  73. package/package.json +2 -2
  74. package/dist/AccessRights-CHu27ZOw.js +0 -1262
  75. package/dist/AccessRights-CHu27ZOw.js.map +0 -1
  76. package/dist/AddMenuConfiguration-BSQLl88V.js +0 -6570
  77. package/dist/AddMenuConfiguration-BSQLl88V.js.map +0 -1
  78. package/dist/AddRoleDrawer-CQdzQZLb.js.map +0 -1
  79. package/dist/ConditionConfig-DSsgGEXS.js.map +0 -1
  80. package/dist/EventsSkeleton-8iiETGcf.js.map +0 -1
  81. package/dist/Features-CObdzJp_.js +0 -13
  82. package/dist/Features-CObdzJp_.js.map +0 -1
  83. package/dist/ImmunizationConfigurationBase-BevKZx_l.js +0 -5910
  84. package/dist/ImmunizationConfigurationBase-BevKZx_l.js.map +0 -1
  85. package/dist/ManageNotification-CaBAOhji.js.map +0 -1
  86. package/dist/ManageRole-CGYfglpo.js.map +0 -1
  87. package/dist/ManageUser-AY1EUDLI.js.map +0 -1
  88. package/dist/MobileMenuManagement-CVAKyKDa.js +0 -112
  89. package/dist/MobileMenuManagement-CVAKyKDa.js.map +0 -1
  90. package/dist/MobileTypeEventConfigModal-BxLympIO.js.map +0 -1
  91. package/dist/NotificationList-C3Vb_jKU.js.map +0 -1
  92. package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +0 -1
  93. package/dist/RoleManagement-BPl2cE27.js.map +0 -1
  94. package/dist/ServerSyncModal-D_oFpv3C.js.map +0 -1
  95. package/dist/TableDetails-Cf_YfnY2.js.map +0 -1
  96. package/dist/dashboardLayoutUtils-Bt5HA96J.js +0 -265
  97. package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,755 +1,7 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { lazy as s } from "react";
3
- import { createSlice as L } from "@reduxjs/toolkit";
4
- import { execute as d, executeAll as O } from "@/common/services/GlobalApis";
5
- import { api as F } from "@/common/interceptors/AxiosInterceptor";
6
- import './index.css';const o = s(
7
- () => import("@/views/feature-components/VerifyRoute.jsx")
8
- ), G = s(() => import("./RoleManagement-BPl2cE27.js").then((e) => e.R)), z = s(
9
- () => import("./QueryBuilder-z7eqfd7D.js").then((e) => e.Q)
10
- ), x = s(() => import("./UserList-Bc8gYxRL.js")), S = s(() => import("./ManageUser-AY1EUDLI.js").then((e) => e.M)), B = s(
11
- () => import("./QueryManagement-BIhEDKuA.js")
12
- ), w = s(() => import("./FeatureMenu-jl7-Tk6y.js").then((e) => e.F)), P = s(() => import("./index-D9YNFPn9.js")), $ = s(
13
- () => import("./NewServerManagement-Cxe0dV0O.js")
14
- ), E = s(
15
- () => import("./ManageDynamicFeature-BhONvfC_.js")
16
- ), q = s(
17
- () => import("./SecurityAuditLogList-Dod711KT.js")
18
- ), H = s(
19
- () => import("./EventConfigurations-kNtAj_WM.js")
20
- ), b = s(
21
- () => import("./ManageEventConfiguration-DV3I5POA.js")
22
- ), Z = s(
23
- () => import("./EntityManagement-GaYsBTvf.js")
24
- ), Q = s(
25
- () => import("./MobileMenuManagement-CVAKyKDa.js")
26
- ), W = s(
27
- () => import("./AddMenuConfiguration-BSQLl88V.js")
28
- ), X = s(
29
- () => import("./ManageTranslation-B4C9-lWD.js").then((e) => e.M)
30
- ), j = s(
31
- () => import("./WidgetList-Dw_FmbbE.js")
32
- ), J = s(
33
- () => import("./NotificationList-C3Vb_jKU.js").then((e) => e.N)
34
- ), K = s(
35
- () => import("./ImmunizationConfigurationsList-DdSZicTP.js")
36
- ), V = s(
37
- () => import("./manageImmunization-B4swS745.js")
38
- ), Y = s(
39
- () => import("./ImmunizationConfigurationBase-BevKZx_l.js")
40
- ), k = s(
41
- () => import("./FhirServerList-Dkq7Kbes.js")
42
- ), ee = s(
43
- () => import("./FhirServerWizard-Db6Hm4bQ.js")
44
- ), te = s(
45
- () => import("./FhirServerProfile-CUOwC6Wb.js")
46
- ), ae = s(
47
- () => import("./FhirRawResourceList-ZZFd7gTX.js")
48
- ), Ue = [
49
- {
50
- path: "medplat/manage/role",
51
- element: /* @__PURE__ */ r(
52
- o,
53
- {
54
- headerTitle: "Roles",
55
- pageTitle: "General",
56
- url: "medplat/manage/role",
57
- component: G
58
- }
59
- )
60
- },
61
- {
62
- path: "medplat/manage/query",
63
- element: /* @__PURE__ */ r(
64
- o,
65
- {
66
- headerTitle: "Query Master",
67
- pageTitle: "General",
68
- url: "medplat/manage/query",
69
- component: z
70
- }
71
- )
72
- },
73
- {
74
- path: "medplat/manage/users",
75
- element: /* @__PURE__ */ r(
76
- o,
77
- {
78
- headerTitle: "Users",
79
- pageTitle: "UserList",
80
- url: "medplat/manage/users",
81
- component: x
82
- }
83
- )
84
- },
85
- {
86
- path: "medplat/manage/user",
87
- element: /* @__PURE__ */ r(
88
- o,
89
- {
90
- headerTitle: "Users",
91
- pageTitle: "ManageUser",
92
- url: "medplat/manage/users",
93
- component: S
94
- }
95
- )
96
- },
97
- {
98
- path: "medplat/manage/user/:id",
99
- element: /* @__PURE__ */ r(
100
- o,
101
- {
102
- headerTitle: "Users",
103
- pageTitle: "General",
104
- url: "medplat/manage/users",
105
- component: S
106
- }
107
- )
108
- },
109
- {
110
- path: "medplat/querymanagement",
111
- element: /* @__PURE__ */ r(
112
- o,
113
- {
114
- headerTitle: "Query Management",
115
- pageTitle: "General",
116
- url: "medplat/querymanagement",
117
- component: B
118
- }
119
- )
120
- },
121
- {
122
- path: "medplat/manage/menu",
123
- element: /* @__PURE__ */ r(
124
- o,
125
- {
126
- headerTitle: "Features",
127
- pageTitle: "General",
128
- url: "medplat/manage/menu",
129
- component: w
130
- }
131
- )
132
- },
133
- {
134
- path: "medplat/manage/menu/addfeature",
135
- element: /* @__PURE__ */ r(
136
- o,
137
- {
138
- headerTitle: "Features",
139
- pageTitle: "General",
140
- url: "medplat/manage/menu",
141
- component: E
142
- }
143
- )
144
- },
145
- {
146
- path: "medplat/manage/menu/addDynamicFeature",
147
- element: /* @__PURE__ */ r(
148
- o,
149
- {
150
- headerTitle: "Features",
151
- pageTitle: "General",
152
- url: "medplat/manage/menu",
153
- component: E
154
- }
155
- )
156
- },
157
- {
158
- path: "medplat/notification/all",
159
- element: /* @__PURE__ */ r(
160
- o,
161
- {
162
- headerTitle: "Event Configuration",
163
- pageTitle: "General",
164
- url: "medplat/notification/all",
165
- component: H
166
- }
167
- )
168
- },
169
- {
170
- path: "medplat/views/config",
171
- element: /* @__PURE__ */ r(
172
- o,
173
- {
174
- headerTitle: "Event Configuration",
175
- pageTitle: "General",
176
- url: "medplat/notification",
177
- component: b
178
- }
179
- )
180
- },
181
- {
182
- path: "medplat/views/config/:id",
183
- element: /* @__PURE__ */ r(
184
- o,
185
- {
186
- headerTitle: "Event Configuration",
187
- pageTitle: "General",
188
- url: "medplat/notification",
189
- component: b
190
- }
191
- )
192
- },
193
- {
194
- path: "medplat/admin/newServerManagement",
195
- element: /* @__PURE__ */ r(
196
- o,
197
- {
198
- headerTitle: "Server Management",
199
- url: "medplat/admin/newServerManagement",
200
- component: $
201
- }
202
- )
203
- },
204
- {
205
- path: "medplat/admin/mobileEntityManagement",
206
- element: /* @__PURE__ */ r(
207
- o,
208
- {
209
- pageTitle: "General",
210
- url: "medplat/admin/mobileEntityManagement",
211
- component: Z,
212
- headerTitle: "Mobile Database Management"
213
- }
214
- )
215
- },
216
- {
217
- path: "medplat/admin/mobileMenuManagement",
218
- element: /* @__PURE__ */ r(
219
- o,
220
- {
221
- url: "medplat/admin/mobileMenuManagement",
222
- component: /* @__PURE__ */ r(Q, {}),
223
- headerTitle: "Mobile Menu Management"
224
- }
225
- )
226
- },
227
- {
228
- path: "medplat/admin/mobileMenuManagement/addMenuConfiguration",
229
- element: /* @__PURE__ */ r(W, {})
230
- },
231
- {
232
- path: "medplat/manage/manageTranslation",
233
- element: /* @__PURE__ */ r(
234
- o,
235
- {
236
- headerTitle: "Manage Translation",
237
- pageTitle: "General",
238
- url: "medplat/manage/manageTranslation",
239
- component: X
240
- }
241
- )
242
- },
243
- {
244
- path: "medplat/manage/managewidgets",
245
- element: /* @__PURE__ */ r(
246
- o,
247
- {
248
- headerTitle: "Widgets",
249
- pageTitle: "General",
250
- url: "medplat/manage/manage-widgets",
251
- component: j
252
- }
253
- )
254
- },
255
- {
256
- path: "medplat/manage/notification",
257
- element: /* @__PURE__ */ r(
258
- o,
259
- {
260
- headerTitle: "Notification Configuration",
261
- pageTitle: "General",
262
- url: "medplat/manage/notification",
263
- component: J
264
- }
265
- )
266
- },
267
- {
268
- path: "medplat/manage/immunizationConfiguratorList",
269
- element: /* @__PURE__ */ r(
270
- o,
271
- {
272
- headerTitle: "Immunizations",
273
- pageTitle: "General",
274
- url: "medplat/manage/manageTranslation",
275
- component: K
276
- }
277
- )
278
- },
279
- {
280
- path: "medplat/manage/manageImmunization",
281
- element: /* @__PURE__ */ r(
282
- o,
283
- {
284
- headerTitle: "Immunizations",
285
- pageTitle: "General",
286
- url: "medplat/training/question",
287
- component: V
288
- }
289
- )
290
- },
291
- {
292
- path: "medplat/manage/manageImmunization/:id",
293
- element: /* @__PURE__ */ r(
294
- o,
295
- {
296
- headerTitle: "Immunizations",
297
- pageTitle: "General",
298
- url: "medplat/training/question",
299
- component: V
300
- }
301
- )
302
- },
303
- {
304
- path: "medplat/manage/immunizationConfiguration",
305
- element: /* @__PURE__ */ r(
306
- o,
307
- {
308
- headerTitle: "Immunization Configuration",
309
- pageTitle: "General",
310
- url: "medplat/manage/immunizationConfiguration",
311
- component: Y
312
- }
313
- )
314
- },
315
- {
316
- path: "medplat/manage/securityAuditLogs",
317
- element: /* @__PURE__ */ r(
318
- o,
319
- {
320
- headerTitle: "Security Audit Logs",
321
- pageTitle: "Security Audit Logs",
322
- url: "medplat/manage/securityAuditLogs",
323
- component: q
324
- }
325
- )
326
- },
327
- {
328
- path: "medplat/manage/activityAnalytics",
329
- element: /* @__PURE__ */ r(
330
- o,
331
- {
332
- headerTitle: "Activity Analytics",
333
- url: "medplat/manage/activityAnalytics",
334
- component: P
335
- }
336
- )
337
- },
338
- {
339
- path: "medplat/admin/fhirResource",
340
- element: /* @__PURE__ */ r(
341
- o,
342
- {
343
- headerTitle: "FHIR Sync",
344
- pageTitle: "General",
345
- url: "medplat/admin/fhirResource",
346
- component: k
347
- }
348
- )
349
- },
350
- {
351
- path: "medplat/admin/fhirResource/new",
352
- element: /* @__PURE__ */ r(
353
- o,
354
- {
355
- headerTitle: "Connect FHIR Server",
356
- pageTitle: "General",
357
- url: "medplat/admin/fhirResource",
358
- component: ee
359
- }
360
- )
361
- },
362
- {
363
- path: "medplat/admin/fhirResource/:serverId",
364
- element: /* @__PURE__ */ r(
365
- o,
366
- {
367
- headerTitle: "FHIR Server",
368
- pageTitle: "General",
369
- url: "medplat/admin/fhirResource",
370
- component: te
371
- }
372
- )
373
- },
374
- {
375
- path: "medplat/admin/fhirResource/:serverId/staging",
376
- element: /* @__PURE__ */ r(
377
- o,
378
- {
379
- headerTitle: "FHIR Staging Inbox",
380
- pageTitle: "General",
381
- url: "medplat/admin/fhirResource",
382
- component: ae
383
- }
384
- )
385
- }
386
- ], R = () => ({
387
- vaccines: [],
388
- selectedVaccineIds: [],
389
- views: [
390
- {
391
- id: "landing",
392
- name: "Dashboard"
393
- },
394
- {
395
- id: "schedule-config",
396
- name: "Schedule Config"
397
- },
398
- {
399
- id: "summary",
400
- name: "Configuration Summary"
401
- }
402
- ],
403
- currentViewId: "summary",
404
- scheduledVaccines: [],
405
- baseDateMaster: [],
406
- recipientMaster: [],
407
- dbTablesMaster: [],
408
- filtersMaster: [],
409
- featureRights: {},
410
- isConfigLoaded: !1,
411
- validationErrors: {}
412
- }), ne = R(), h = (e = [], t = {}) => {
413
- const i = e.findIndex(
414
- (a) => t.id !== void 0 && (a == null ? void 0 : a.id) === t.id || t.code && (a == null ? void 0 : a.code) === t.code
415
- );
416
- return i === -1 ? [...e, t] : e.map(
417
- (a, l) => l === i ? {
418
- ...a,
419
- ...t
420
- } : a
421
- );
422
- }, C = L({
423
- name: "immunization",
424
- initialState: ne,
425
- reducers: {
426
- toggleVaccine: (e, t) => {
427
- const i = t.payload;
428
- Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
429
- const a = e.selectedVaccineIds.indexOf(i);
430
- a > -1 ? e.selectedVaccineIds.splice(a, 1) : e.selectedVaccineIds.push(i);
431
- },
432
- setVaccines: (e, t) => {
433
- const i = Array.isArray(t.payload) ? t.payload : [];
434
- e.vaccines = i, e.selectedVaccineIds.length === 0 && (e.selectedVaccineIds = i.filter((a) => a.isActive).map((a) => a.id));
435
- },
436
- setSelectedVaccineIds: (e, t) => {
437
- e.selectedVaccineIds = t.payload;
438
- },
439
- addCustomVaccine: (e, t) => {
440
- const i = t.payload || {}, {
441
- name: a,
442
- vaccine_name: l,
443
- disease: m,
444
- target_prevention: u,
445
- id: c,
446
- baseDateCode: _,
447
- base_date_code: f,
448
- recipientType: y,
449
- recipient_type: n
450
- } = i, g = a || l || "Unnamed Vaccine", p = m || u || "General", N = (Array.isArray(e.vaccines) ? e.vaccines : []).map((T) => Number(T == null ? void 0 : T.id)).filter((T) => !Number.isNaN(T)), U = N.length > 0 ? Math.max(...N) + 1 : 1, D = {
451
- id: c || U,
452
- name: g,
453
- category: p,
454
- doses: 0,
455
- doseType: "FIXED",
456
- doseDetails: {},
457
- regions: [],
458
- dependencies: [],
459
- isActive: i.isActive !== void 0 ? i.isActive : !1,
460
- baseDateCode: _ || f || null,
461
- recipientType: y || n || ""
462
- };
463
- Array.isArray(e.vaccines) || (e.vaccines = []), e.vaccines.push(D);
464
- },
465
- setCurrentView: (e, t) => {
466
- e.currentViewId = t.payload;
467
- },
468
- updateScheduledVaccine: (e, t) => {
469
- const i = t.payload, a = e.scheduledVaccines.findIndex((l) => l.id === i.id);
470
- a !== -1 ? e.scheduledVaccines[a] = {
471
- ...e.scheduledVaccines[a],
472
- ...i
473
- } : e.scheduledVaccines.push(i);
474
- },
475
- setBaseDatesMaster: (e, t) => {
476
- e.baseDateMaster = t.payload;
477
- },
478
- setRecipientMaster: (e, t) => {
479
- e.recipientMaster = t.payload;
480
- },
481
- setDbTablesMaster: (e, t) => {
482
- e.dbTablesMaster = t.payload;
483
- },
484
- setFiltersMaster: (e, t) => {
485
- e.filtersMaster = t.payload;
486
- },
487
- upsertBaseDateMasterItem: (e, t) => {
488
- e.baseDateMaster = h(e.baseDateMaster, t.payload);
489
- },
490
- upsertRecipientMasterItem: (e, t) => {
491
- e.recipientMaster = h(e.recipientMaster, t.payload);
492
- },
493
- updateBaseDateMasterStatus: (e, t) => {
494
- const { code: i, is_active: a } = t.payload;
495
- e.baseDateMaster = e.baseDateMaster.map(
496
- (l) => l.code === i ? { ...l, is_active: a } : l
497
- );
498
- },
499
- upsertFilterMasterItem: (e, t) => {
500
- e.filtersMaster = h(e.filtersMaster, t.payload);
501
- },
502
- updateFilterMasterStatus: (e, t) => {
503
- const { code: i, is_active: a } = t.payload;
504
- e.filtersMaster = e.filtersMaster.map(
505
- (l) => l.code === i ? { ...l, is_active: a } : l
506
- );
507
- },
508
- setFeatureRights: (e, t) => {
509
- e.featureRights = t.payload || {};
510
- },
511
- setImmunizationConfigLoaded: (e, t) => {
512
- e.isConfigLoaded = t.payload;
513
- },
514
- resetImmunizationState: () => R(),
515
- activateSelectedVaccines: (e) => {
516
- e.vaccines = e.vaccines.map((t) => ({
517
- ...t,
518
- isActive: e.selectedVaccineIds.includes(t.id)
519
- }));
520
- },
521
- setVaccineStatus: (e, t) => {
522
- const { vaccineId: i, status: a } = t.payload, l = e.vaccines.findIndex((u) => u.id === i);
523
- l !== -1 && (e.vaccines[l].isActive = a), Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
524
- const m = e.selectedVaccineIds.indexOf(i);
525
- a && m === -1 ? e.selectedVaccineIds.push(i) : !a && m !== -1 && e.selectedVaccineIds.splice(m, 1);
526
- },
527
- setValidationErrors: (e, t) => {
528
- const { vaccineId: i, errors: a } = t.payload;
529
- e.validationErrors[i] = a;
530
- },
531
- clearValidationErrors: (e, t) => {
532
- const i = t.payload;
533
- i ? delete e.validationErrors[i] : e.validationErrors = {};
534
- }
535
- }
536
- }), {
537
- toggleVaccine: De,
538
- setVaccines: Le,
539
- addCustomVaccine: Oe,
540
- setCurrentView: Ge,
541
- updateScheduledVaccine: ze,
542
- setBaseDatesMaster: xe,
543
- setRecipientMaster: Be,
544
- setDbTablesMaster: we,
545
- setFiltersMaster: Pe,
546
- upsertBaseDateMasterItem: $e,
547
- upsertRecipientMasterItem: qe,
548
- updateBaseDateMasterStatus: He,
549
- upsertFilterMasterItem: Ze,
550
- updateFilterMasterStatus: Qe,
551
- setFeatureRights: We,
552
- setImmunizationConfigLoaded: Xe,
553
- resetImmunizationState: je,
554
- activateSelectedVaccines: Je,
555
- setSelectedVaccineIds: Ke,
556
- setValidationErrors: Ye,
557
- clearValidationErrors: ke,
558
- setVaccineStatus: et
559
- } = C.actions, tt = C.reducer, I = (e, t) => {
560
- if (e == null)
561
- return t;
562
- if (typeof e != "string")
563
- return e;
564
- try {
565
- return JSON.parse(e);
566
- } catch {
567
- return t;
568
- }
569
- }, M = (...e) => e.filter(Boolean).join("_"), A = (e) => e == null || e === "" || e === "N.A." || e === "null days" ? "N.A." : e, v = (e, t = "FLEXIBLE", i = 1) => {
570
- if (i === 0 || !e)
571
- return "N.A.";
572
- if (t === "FIXED") {
573
- const m = Array.isArray(e) ? e[0] : e;
574
- if (!m)
575
- return "N.A.";
576
- const u = A(m.eligibleFrom), c = A(m.eligibleTo);
577
- return u === "N.A." && c === "N.A." ? "N.A." : `${u} to ${c}`;
578
- }
579
- if (!Array.isArray(e) || e.length === 0)
580
- return "N.A.";
581
- const a = A(e[0].eligibleFrom), l = A(
582
- e[e.length - 1].eligibleTo
583
- );
584
- return a === "N.A." && l === "N.A." ? "N.A." : `${a} to ${l}`;
585
- }, ie = (e) => {
586
- const t = String(e.dose_type || "").toLowerCase(), i = t === "fixed" || t === "na" || !e.dose_type, a = I(e.duration_units, {
587
- eligibleFrom: "days",
588
- eligibleTo: "days",
589
- interval: "days"
590
- }), l = i ? [
591
- {
592
- id: M("fixed", e.id),
593
- eligibleFrom: e.dose_eligible_from !== void 0 ? `${e.dose_eligible_from} ${a.eligibleFrom || "days"}` : "",
594
- eligibleTo: e.dose_eligible_to !== void 0 ? `${e.dose_eligible_to} ${a.eligibleTo || "days"}` : "",
595
- interval: e.min_gap || 0
596
- }
597
- ] : I(e.dose, []).map((n, g) => {
598
- const p = {
599
- eligibleFrom: n.eligible_from_unit || a.eligibleFrom || "days",
600
- eligibleTo: n.eligible_to_unit || a.eligibleTo || "days",
601
- interval: n.interval_unit || a.interval || "days",
602
- overdue: n.overdue_unit || "days"
603
- };
604
- return {
605
- id: n.id || M("dose", e.id, g),
606
- isBooster: n.isBooster === !0 || n.is_booster === !0 || typeof n.dose == "string" && n.dose.toUpperCase().startsWith("B"),
607
- alias: n.alias || n.booster_alias || "",
608
- eligibleFrom: n.eligible_from !== void 0 ? `${n.eligible_from} ${p.eligibleFrom}` : "",
609
- eligibleTo: n.eligible_to !== void 0 ? `${n.eligible_to} ${p.eligibleTo}` : "",
610
- overdue: n.overdue !== void 0 && n.overdue !== null ? `${n.overdue} ${p.overdue}` : "",
611
- interval: n.min_gap || 0,
612
- units: p
613
- };
614
- }), m = I(e.location, []).filter((n) => n && typeof n == "object").map((n, g) => {
615
- var p;
616
- return {
617
- id: M("region", e.id, g),
618
- locationId: n.locationId,
619
- locationIdArr: n.locationIdArr,
620
- locationList: n.locationList,
621
- fullPath: (p = n.locationList) == null ? void 0 : p.replaceAll(" => ", " → ")
622
- };
623
- }), u = I(e.validations, []).map(
624
- (n, g) => ({
625
- id: M("dep", e.id, g),
626
- vaccine: n.vaccine || "",
627
- requirement: n.requirement || "Should be given",
628
- minGap: Number.parseInt(n.minGap, 10) || 0,
629
- maxGap: Number.parseInt(n.maxGap, 10) || 0,
630
- message: n.message || ""
631
- })
632
- ), c = I(e.filters, []), _ = Array.isArray(c) ? c : (c == null ? void 0 : c.codes) || [], f = I(e.code_sets, []), y = Array.isArray(f) ? f : [];
633
- return {
634
- ...e,
635
- name: e.vaccine_name || e.name || "N.A.",
636
- category: e.target_prevention || e.disease || e.category || "N.A.",
637
- doses: e.no_of_doses || 0,
638
- doseType: e.dose_type && e.dose_type !== "NA" ? e.dose_type : "FIXED",
639
- doseDetails: l,
640
- eligibility: v(
641
- l,
642
- e.dose_type,
643
- e.no_of_doses || 0
644
- ),
645
- isActive: e.is_active !== void 0 ? e.is_active : !0,
646
- regions: m,
647
- dependencies: u,
648
- filters: _,
649
- codeSets: y,
650
- durationUnits: a,
651
- baseDateCode: e.base_date_code,
652
- recipientType: e.recipient_type || ""
653
- };
654
- }, re = () => d({
655
- code: "FETCH_IMMUNISATION_MASTER",
656
- parameters: {}
657
- }), oe = () => d({
658
- code: "FETCH_IMMUNISATION_BASE_DATE",
659
- parameters: {}
660
- }), se = () => d({
661
- code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
662
- parameters: {}
663
- }), le = () => O([
664
- {
665
- code: "FETCH_IMMUNISATION_BASE_DATE",
666
- parameters: {},
667
- sequence: 1
668
- },
669
- {
670
- code: "GET_ALL_IMMUNISATION_FILTERS",
671
- parameters: {},
672
- sequence: 2
673
- },
674
- {
675
- code: "FETCH_IMMUNISATION_MASTER",
676
- parameters: {},
677
- sequence: 3
678
- },
679
- {
680
- code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
681
- parameters: {},
682
- sequence: 4
683
- }
684
- ]), de = (e) => d({
685
- code: "INSERT_IMMUNIZATION_MASTER",
686
- parameters: e
687
- }), me = (e) => d({
688
- code: "UPDATE_IMMUNIZATION_DOSE",
689
- ...e
690
- }), ce = (e) => d({
691
- code: "CHECK_IMMUNIZATION_CONFIGURATION_INITIATION",
692
- ...e
693
- }), pe = (e) => d({
694
- code: "UPDATE_IMMUNIZATION_STATUS",
695
- ...e
696
- }), ue = (e) => d({
697
- code: "UPDATE_IMMUNIZATION_STATUS_FOR_ARRAY",
698
- ...e
699
- }), ge = (e) => d({
700
- code: "UPDATE_IMMUNIZATION_CONFIGURATION_INITIATION",
701
- ...e
702
- }), Ie = (e) => d({
703
- code: "SAVE_IMMUNISATION_BASE_DATE",
704
- parameters: e
705
- }), Te = (e) => d({
706
- code: "SAVE_IMMUNISATION_RECEPIENT_MASTER",
707
- parameters: e
708
- }), fe = (e) => d({
709
- code: "UPDATE_IMMUNISATION_RECEPIENT_MASTER",
710
- parameters: e
711
- }), Me = (e) => d({
712
- code: "UPDATE_IMMUNISATION_BASE_DATE",
713
- parameters: e
714
- }), Ae = () => d({
715
- code: "retrieve_all_tables_and_columns",
716
- parameters: {}
717
- }), _e = () => d({
718
- code: "GET_ALL_IMMUNISATION_FILTERS",
719
- parameters: {}
720
- }), ye = (e) => d({
721
- code: "ADD_IMMUNISATION_FILTER",
722
- parameters: e
723
- }), he = (e) => d({
724
- code: "UPDATE_IMMUNISATION_FILTER",
725
- parameters: e
726
- }), Ne = (e) => F.post("/medplatform/v2/immunisation/list", e), Se = (e) => F.post("/medplatform/v2/immunisation/revalidate", e), at = {
727
- calculateOverallEligibility: v,
728
- mapImmunizationVaccineConfig: ie,
729
- getVaccines: re,
730
- getBaseDates: oe,
731
- getRecipients: se,
732
- getImmunizationReferenceData: le,
733
- addImmunization: de,
734
- updateImmunization: me,
735
- checkImmunizationConfigurationInitiation: ce,
736
- updateVaccineStatus: pe,
737
- updateVaccineStatusFromArray: ue,
738
- updateImmunizationConfigurationInitiation: ge,
739
- saveBaseDate: Ie,
740
- saveRecipient: Te,
741
- updateRecipient: fe,
742
- updateBaseDate: Me,
743
- getAllTablesAndColumns: Ae,
744
- getFilters: _e,
745
- addFilter: ye,
746
- updateFilter: he,
747
- getImmunisationV2List: Ne,
748
- revalidateImmunisationV2List: Se
749
- };
1
+ import { I as e, d as m, e as o } from "./index.lib-C3fwoM3y.js";
750
2
  export {
751
- at as ImmunizationUtil,
752
- tt as immunizationReducer,
753
- Ue as routes
3
+ e as ImmunizationUtil,
4
+ m as immunizationReducer,
5
+ o as routes
754
6
  };
755
7
  //# sourceMappingURL=index.js.map