@argusoft/medplat-core 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ImmunizationConfigurationBase-CdCgDaAl.js → ImmunizationConfigurationBase-DZ8EqXlF.js} +2053 -2186
- package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.js +371 -194
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/ImmunizationConfigurationBase-CdCgDaAl.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,306 +1,308 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { createSlice as
|
|
4
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { lazy as l } from "react";
|
|
3
|
+
import { createSlice as z } from "@reduxjs/toolkit";
|
|
4
|
+
import { execute as d, executeAll as G } from "@/common/services/GlobalApis";
|
|
5
|
+
import { api as S } from "@/common/interceptors/AxiosInterceptor";
|
|
6
|
+
import './index.css';const s = l(
|
|
5
7
|
() => import("@/views/feature-components/VerifyRoute.jsx")
|
|
6
|
-
),
|
|
8
|
+
), L = l(() => import("./RoleManagement-CLaEJ90J.js").then((e) => e.R)), v = l(
|
|
7
9
|
() => import("./QueryBuilder-Cus_mRwZ.js").then((e) => e.Q)
|
|
8
|
-
),
|
|
10
|
+
), x = l(() => import("./UserList-BxB1tCwM.js")), y = l(() => import("./ManageUser-PHiTNyF8.js").then((e) => e.M)), B = l(
|
|
9
11
|
() => import("./QueryManagement-DXA73N2j.js")
|
|
10
|
-
),
|
|
12
|
+
), w = l(() => import("./FeatureMenu-BYSRoNm0.js").then((e) => e.F)), P = l(
|
|
11
13
|
() => import("./NewServerManagement-5YcAtF-g.js")
|
|
12
|
-
),
|
|
14
|
+
), h = l(
|
|
13
15
|
() => import("./ManageDynamicFeature-CeeqiS3K.js")
|
|
14
|
-
),
|
|
16
|
+
), q = l(
|
|
15
17
|
() => import("./EventConfigurations-jGCJ4LqP.js")
|
|
16
|
-
),
|
|
18
|
+
), N = l(
|
|
17
19
|
() => import("./ManageEventConfiguration-BJxS2Su0.js")
|
|
18
|
-
),
|
|
20
|
+
), $ = l(
|
|
19
21
|
() => import("./EntityManagement-D-x6Qzal.js")
|
|
20
|
-
),
|
|
22
|
+
), H = l(
|
|
21
23
|
() => import("./MobileMenuManagement-DmQU5TTo.js")
|
|
22
|
-
),
|
|
24
|
+
), Z = l(
|
|
23
25
|
() => import("./AddMenuConfiguration-QWfpcnuP.js")
|
|
24
|
-
),
|
|
26
|
+
), Q = l(
|
|
25
27
|
() => import("./ManageTranslation-BTxvSYKb.js").then((e) => e.M)
|
|
26
|
-
),
|
|
28
|
+
), X = l(
|
|
27
29
|
() => import("./WidgetList-BSApErov.js")
|
|
28
|
-
),
|
|
30
|
+
), j = l(
|
|
29
31
|
() => import("./NotificationList-BkpOrCpM.js").then((e) => e.N)
|
|
30
|
-
),
|
|
32
|
+
), W = l(
|
|
31
33
|
() => import("./ImmunizationConfigurationsList-CQnxWa09.js")
|
|
32
|
-
),
|
|
34
|
+
), E = l(
|
|
33
35
|
() => import("./manageImmunization-B4swS745.js")
|
|
34
|
-
),
|
|
35
|
-
() => import("./ImmunizationConfigurationBase-
|
|
36
|
-
),
|
|
36
|
+
), J = l(
|
|
37
|
+
() => import("./ImmunizationConfigurationBase-DZ8EqXlF.js")
|
|
38
|
+
), be = [
|
|
37
39
|
{
|
|
38
40
|
path: "medplat/manage/role",
|
|
39
|
-
element: /* @__PURE__ */
|
|
40
|
-
|
|
41
|
+
element: /* @__PURE__ */ r(
|
|
42
|
+
s,
|
|
41
43
|
{
|
|
42
44
|
headerTitle: "Roles",
|
|
43
45
|
pageTitle: "General",
|
|
44
46
|
url: "medplat/manage/role",
|
|
45
|
-
component:
|
|
47
|
+
component: L
|
|
46
48
|
}
|
|
47
49
|
)
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
path: "medplat/manage/query",
|
|
51
|
-
element: /* @__PURE__ */
|
|
52
|
-
|
|
53
|
+
element: /* @__PURE__ */ r(
|
|
54
|
+
s,
|
|
53
55
|
{
|
|
54
56
|
headerTitle: "Query Master",
|
|
55
57
|
pageTitle: "General",
|
|
56
58
|
url: "medplat/manage/query",
|
|
57
|
-
component:
|
|
59
|
+
component: v
|
|
58
60
|
}
|
|
59
61
|
)
|
|
60
62
|
},
|
|
61
63
|
{
|
|
62
64
|
path: "medplat/manage/users",
|
|
63
|
-
element: /* @__PURE__ */
|
|
64
|
-
|
|
65
|
+
element: /* @__PURE__ */ r(
|
|
66
|
+
s,
|
|
65
67
|
{
|
|
66
68
|
headerTitle: "Users",
|
|
67
69
|
pageTitle: "UserList",
|
|
68
70
|
url: "medplat/manage/users",
|
|
69
|
-
component:
|
|
71
|
+
component: x
|
|
70
72
|
}
|
|
71
73
|
)
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
path: "medplat/manage/user",
|
|
75
|
-
element: /* @__PURE__ */
|
|
76
|
-
|
|
77
|
+
element: /* @__PURE__ */ r(
|
|
78
|
+
s,
|
|
77
79
|
{
|
|
78
80
|
headerTitle: "Users",
|
|
79
81
|
pageTitle: "ManageUser",
|
|
80
82
|
url: "medplat/manage/users",
|
|
81
|
-
component:
|
|
83
|
+
component: y
|
|
82
84
|
}
|
|
83
85
|
)
|
|
84
86
|
},
|
|
85
87
|
{
|
|
86
88
|
path: "medplat/manage/user/:id",
|
|
87
|
-
element: /* @__PURE__ */
|
|
88
|
-
|
|
89
|
+
element: /* @__PURE__ */ r(
|
|
90
|
+
s,
|
|
89
91
|
{
|
|
90
92
|
headerTitle: "Users",
|
|
91
93
|
pageTitle: "General",
|
|
92
94
|
url: "medplat/manage/users",
|
|
93
|
-
component:
|
|
95
|
+
component: y
|
|
94
96
|
}
|
|
95
97
|
)
|
|
96
98
|
},
|
|
97
99
|
{
|
|
98
100
|
path: "medplat/querymanagement",
|
|
99
|
-
element: /* @__PURE__ */
|
|
100
|
-
|
|
101
|
+
element: /* @__PURE__ */ r(
|
|
102
|
+
s,
|
|
101
103
|
{
|
|
102
104
|
headerTitle: "Query Management",
|
|
103
105
|
pageTitle: "General",
|
|
104
106
|
url: "medplat/querymanagement",
|
|
105
|
-
component:
|
|
107
|
+
component: B
|
|
106
108
|
}
|
|
107
109
|
)
|
|
108
110
|
},
|
|
109
111
|
{
|
|
110
112
|
path: "medplat/manage/menu",
|
|
111
|
-
element: /* @__PURE__ */
|
|
112
|
-
|
|
113
|
+
element: /* @__PURE__ */ r(
|
|
114
|
+
s,
|
|
113
115
|
{
|
|
114
116
|
headerTitle: "Features",
|
|
115
117
|
pageTitle: "General",
|
|
116
118
|
url: "medplat/manage/menu",
|
|
117
|
-
component:
|
|
119
|
+
component: w
|
|
118
120
|
}
|
|
119
121
|
)
|
|
120
122
|
},
|
|
121
123
|
{
|
|
122
124
|
path: "medplat/manage/menu/addfeature",
|
|
123
|
-
element: /* @__PURE__ */
|
|
124
|
-
|
|
125
|
+
element: /* @__PURE__ */ r(
|
|
126
|
+
s,
|
|
125
127
|
{
|
|
126
128
|
headerTitle: "Features",
|
|
127
129
|
pageTitle: "General",
|
|
128
130
|
url: "medplat/manage/menu",
|
|
129
|
-
component:
|
|
131
|
+
component: h
|
|
130
132
|
}
|
|
131
133
|
)
|
|
132
134
|
},
|
|
133
135
|
{
|
|
134
136
|
path: "medplat/manage/menu/addDynamicFeature",
|
|
135
|
-
element: /* @__PURE__ */
|
|
136
|
-
|
|
137
|
+
element: /* @__PURE__ */ r(
|
|
138
|
+
s,
|
|
137
139
|
{
|
|
138
140
|
headerTitle: "Features",
|
|
139
141
|
pageTitle: "General",
|
|
140
142
|
url: "medplat/manage/menu",
|
|
141
|
-
component:
|
|
143
|
+
component: h
|
|
142
144
|
}
|
|
143
145
|
)
|
|
144
146
|
},
|
|
145
147
|
{
|
|
146
148
|
path: "medplat/notification/all",
|
|
147
|
-
element: /* @__PURE__ */
|
|
148
|
-
|
|
149
|
+
element: /* @__PURE__ */ r(
|
|
150
|
+
s,
|
|
149
151
|
{
|
|
150
152
|
headerTitle: "Event Configuration",
|
|
151
153
|
pageTitle: "General",
|
|
152
154
|
url: "medplat/notification/all",
|
|
153
|
-
component:
|
|
155
|
+
component: q
|
|
154
156
|
}
|
|
155
157
|
)
|
|
156
158
|
},
|
|
157
159
|
{
|
|
158
160
|
path: "medplat/views/config",
|
|
159
|
-
element: /* @__PURE__ */
|
|
160
|
-
|
|
161
|
+
element: /* @__PURE__ */ r(
|
|
162
|
+
s,
|
|
161
163
|
{
|
|
162
164
|
headerTitle: "Event Configuration",
|
|
163
165
|
pageTitle: "General",
|
|
164
166
|
url: "medplat/notification",
|
|
165
|
-
component:
|
|
167
|
+
component: N
|
|
166
168
|
}
|
|
167
169
|
)
|
|
168
170
|
},
|
|
169
171
|
{
|
|
170
172
|
path: "medplat/views/config/:id",
|
|
171
|
-
element: /* @__PURE__ */
|
|
172
|
-
|
|
173
|
+
element: /* @__PURE__ */ r(
|
|
174
|
+
s,
|
|
173
175
|
{
|
|
174
176
|
headerTitle: "Event Configuration",
|
|
175
177
|
pageTitle: "General",
|
|
176
178
|
url: "medplat/notification",
|
|
177
|
-
component:
|
|
179
|
+
component: N
|
|
178
180
|
}
|
|
179
181
|
)
|
|
180
182
|
},
|
|
181
183
|
{
|
|
182
184
|
path: "medplat/admin/newServerManagement",
|
|
183
|
-
element: /* @__PURE__ */
|
|
184
|
-
|
|
185
|
+
element: /* @__PURE__ */ r(
|
|
186
|
+
s,
|
|
185
187
|
{
|
|
186
188
|
headerTitle: "Server Management",
|
|
187
189
|
url: "medplat/admin/newServerManagement",
|
|
188
|
-
component:
|
|
190
|
+
component: P
|
|
189
191
|
}
|
|
190
192
|
)
|
|
191
193
|
},
|
|
192
194
|
{
|
|
193
195
|
path: "medplat/admin/mobileEntityManagement",
|
|
194
|
-
element: /* @__PURE__ */
|
|
195
|
-
|
|
196
|
+
element: /* @__PURE__ */ r(
|
|
197
|
+
s,
|
|
196
198
|
{
|
|
197
199
|
pageTitle: "General",
|
|
198
200
|
url: "medplat/admin/mobileEntityManagement",
|
|
199
|
-
component:
|
|
201
|
+
component: $,
|
|
200
202
|
headerTitle: "Mobile Database Management"
|
|
201
203
|
}
|
|
202
204
|
)
|
|
203
205
|
},
|
|
204
206
|
{
|
|
205
207
|
path: "medplat/admin/mobileMenuManagement",
|
|
206
|
-
element: /* @__PURE__ */
|
|
207
|
-
|
|
208
|
+
element: /* @__PURE__ */ r(
|
|
209
|
+
s,
|
|
208
210
|
{
|
|
209
211
|
url: "medplat/admin/mobileMenuManagement",
|
|
210
|
-
component: /* @__PURE__ */
|
|
212
|
+
component: /* @__PURE__ */ r(H, {}),
|
|
211
213
|
headerTitle: "Mobile Menu Management"
|
|
212
214
|
}
|
|
213
215
|
)
|
|
214
216
|
},
|
|
215
217
|
{
|
|
216
218
|
path: "medplat/admin/mobileMenuManagement/addMenuConfiguration",
|
|
217
|
-
element: /* @__PURE__ */
|
|
219
|
+
element: /* @__PURE__ */ r(Z, {})
|
|
218
220
|
},
|
|
219
221
|
{
|
|
220
222
|
path: "medplat/manage/manageTranslation",
|
|
221
|
-
element: /* @__PURE__ */
|
|
222
|
-
|
|
223
|
+
element: /* @__PURE__ */ r(
|
|
224
|
+
s,
|
|
223
225
|
{
|
|
224
226
|
headerTitle: "Manage Translation",
|
|
225
227
|
pageTitle: "General",
|
|
226
228
|
url: "medplat/manage/manageTranslation",
|
|
227
|
-
component:
|
|
229
|
+
component: Q
|
|
228
230
|
}
|
|
229
231
|
)
|
|
230
232
|
},
|
|
231
233
|
{
|
|
232
234
|
path: "medplat/manage/managewidgets",
|
|
233
|
-
element: /* @__PURE__ */
|
|
234
|
-
|
|
235
|
+
element: /* @__PURE__ */ r(
|
|
236
|
+
s,
|
|
235
237
|
{
|
|
236
238
|
headerTitle: "Widgets",
|
|
237
239
|
pageTitle: "General",
|
|
238
240
|
url: "medplat/manage/manage-widgets",
|
|
239
|
-
component:
|
|
241
|
+
component: X
|
|
240
242
|
}
|
|
241
243
|
)
|
|
242
244
|
},
|
|
243
245
|
{
|
|
244
246
|
path: "medplat/manage/notification",
|
|
245
|
-
element: /* @__PURE__ */
|
|
246
|
-
|
|
247
|
+
element: /* @__PURE__ */ r(
|
|
248
|
+
s,
|
|
247
249
|
{
|
|
248
250
|
headerTitle: "Notification Configuration",
|
|
249
251
|
pageTitle: "General",
|
|
250
252
|
url: "medplat/manage/notification",
|
|
251
|
-
component:
|
|
253
|
+
component: j
|
|
252
254
|
}
|
|
253
255
|
)
|
|
254
256
|
},
|
|
255
257
|
{
|
|
256
258
|
path: "medplat/manage/immunizationConfiguratorList",
|
|
257
|
-
element: /* @__PURE__ */
|
|
258
|
-
|
|
259
|
+
element: /* @__PURE__ */ r(
|
|
260
|
+
s,
|
|
259
261
|
{
|
|
260
262
|
headerTitle: "Immunizations",
|
|
261
263
|
pageTitle: "General",
|
|
262
264
|
url: "medplat/manage/manageTranslation",
|
|
263
|
-
component:
|
|
265
|
+
component: W
|
|
264
266
|
}
|
|
265
267
|
)
|
|
266
268
|
},
|
|
267
269
|
{
|
|
268
270
|
path: "medplat/manage/manageImmunization",
|
|
269
|
-
element: /* @__PURE__ */
|
|
270
|
-
|
|
271
|
+
element: /* @__PURE__ */ r(
|
|
272
|
+
s,
|
|
271
273
|
{
|
|
272
274
|
headerTitle: "Immunizations",
|
|
273
275
|
pageTitle: "General",
|
|
274
276
|
url: "medplat/training/question",
|
|
275
|
-
component:
|
|
277
|
+
component: E
|
|
276
278
|
}
|
|
277
279
|
)
|
|
278
280
|
},
|
|
279
281
|
{
|
|
280
282
|
path: "medplat/manage/manageImmunization/:id",
|
|
281
|
-
element: /* @__PURE__ */
|
|
282
|
-
|
|
283
|
+
element: /* @__PURE__ */ r(
|
|
284
|
+
s,
|
|
283
285
|
{
|
|
284
286
|
headerTitle: "Immunizations",
|
|
285
287
|
pageTitle: "General",
|
|
286
288
|
url: "medplat/training/question",
|
|
287
|
-
component:
|
|
289
|
+
component: E
|
|
288
290
|
}
|
|
289
291
|
)
|
|
290
292
|
},
|
|
291
293
|
{
|
|
292
294
|
path: "medplat/manage/immunizationConfiguration",
|
|
293
|
-
element: /* @__PURE__ */
|
|
294
|
-
|
|
295
|
+
element: /* @__PURE__ */ r(
|
|
296
|
+
s,
|
|
295
297
|
{
|
|
296
298
|
headerTitle: "Immunization Configuration",
|
|
297
299
|
pageTitle: "General",
|
|
298
300
|
url: "medplat/manage/immunizationConfiguration",
|
|
299
|
-
component:
|
|
301
|
+
component: J
|
|
300
302
|
}
|
|
301
303
|
)
|
|
302
304
|
}
|
|
303
|
-
],
|
|
305
|
+
], b = () => ({
|
|
304
306
|
vaccines: [],
|
|
305
307
|
selectedVaccineIds: [],
|
|
306
308
|
views: [
|
|
@@ -326,156 +328,331 @@ const r = s(
|
|
|
326
328
|
featureRights: {},
|
|
327
329
|
isConfigLoaded: !1,
|
|
328
330
|
validationErrors: {}
|
|
329
|
-
}),
|
|
331
|
+
}), K = b(), A = (e = [], t = {}) => {
|
|
330
332
|
const n = e.findIndex(
|
|
331
|
-
(
|
|
333
|
+
(a) => t.id !== void 0 && (a == null ? void 0 : a.id) === t.id || t.code && (a == null ? void 0 : a.code) === t.code
|
|
332
334
|
);
|
|
333
|
-
return n === -1 ? [...e,
|
|
334
|
-
(
|
|
335
|
-
...
|
|
336
|
-
...
|
|
337
|
-
} :
|
|
335
|
+
return n === -1 ? [...e, t] : e.map(
|
|
336
|
+
(a, o) => o === n ? {
|
|
337
|
+
...a,
|
|
338
|
+
...t
|
|
339
|
+
} : a
|
|
338
340
|
);
|
|
339
|
-
},
|
|
341
|
+
}, V = z({
|
|
340
342
|
name: "immunization",
|
|
341
|
-
initialState:
|
|
343
|
+
initialState: K,
|
|
342
344
|
reducers: {
|
|
343
|
-
toggleVaccine: (e,
|
|
344
|
-
const n =
|
|
345
|
+
toggleVaccine: (e, t) => {
|
|
346
|
+
const n = t.payload;
|
|
345
347
|
Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
+
const a = e.selectedVaccineIds.indexOf(n);
|
|
349
|
+
a > -1 ? e.selectedVaccineIds.splice(a, 1) : e.selectedVaccineIds.push(n);
|
|
348
350
|
},
|
|
349
|
-
setVaccines: (e,
|
|
350
|
-
const n = Array.isArray(
|
|
351
|
-
e.vaccines = n, e.selectedVaccineIds.length === 0 && (e.selectedVaccineIds = n.filter((
|
|
351
|
+
setVaccines: (e, t) => {
|
|
352
|
+
const n = Array.isArray(t.payload) ? t.payload : [];
|
|
353
|
+
e.vaccines = n, e.selectedVaccineIds.length === 0 && (e.selectedVaccineIds = n.filter((a) => a.isActive).map((a) => a.id));
|
|
352
354
|
},
|
|
353
|
-
setSelectedVaccineIds: (e,
|
|
354
|
-
e.selectedVaccineIds =
|
|
355
|
+
setSelectedVaccineIds: (e, t) => {
|
|
356
|
+
e.selectedVaccineIds = t.payload;
|
|
355
357
|
},
|
|
356
|
-
addCustomVaccine: (e,
|
|
357
|
-
const n =
|
|
358
|
-
name:
|
|
359
|
-
vaccine_name:
|
|
360
|
-
disease:
|
|
361
|
-
target_prevention:
|
|
362
|
-
id:
|
|
363
|
-
baseDateCode:
|
|
364
|
-
base_date_code:
|
|
365
|
-
recipientType:
|
|
366
|
-
recipient_type:
|
|
367
|
-
} = n,
|
|
368
|
-
id:
|
|
369
|
-
name:
|
|
370
|
-
category:
|
|
358
|
+
addCustomVaccine: (e, t) => {
|
|
359
|
+
const n = t.payload || {}, {
|
|
360
|
+
name: a,
|
|
361
|
+
vaccine_name: o,
|
|
362
|
+
disease: c,
|
|
363
|
+
target_prevention: m,
|
|
364
|
+
id: u,
|
|
365
|
+
baseDateCode: i,
|
|
366
|
+
base_date_code: p,
|
|
367
|
+
recipientType: I,
|
|
368
|
+
recipient_type: F
|
|
369
|
+
} = n, U = a || o || "Unnamed Vaccine", R = c || m || "General", _ = (Array.isArray(e.vaccines) ? e.vaccines : []).map((g) => Number(g == null ? void 0 : g.id)).filter((g) => !Number.isNaN(g)), D = _.length > 0 ? Math.max(..._) + 1 : 1, O = {
|
|
370
|
+
id: u || D,
|
|
371
|
+
name: U,
|
|
372
|
+
category: R,
|
|
371
373
|
doses: 0,
|
|
372
374
|
doseType: "FIXED",
|
|
373
375
|
doseDetails: {},
|
|
374
376
|
regions: [],
|
|
375
377
|
dependencies: [],
|
|
376
378
|
isActive: n.isActive !== void 0 ? n.isActive : !1,
|
|
377
|
-
baseDateCode:
|
|
378
|
-
recipientType:
|
|
379
|
+
baseDateCode: i || p || null,
|
|
380
|
+
recipientType: I || F || ""
|
|
379
381
|
};
|
|
380
|
-
Array.isArray(e.vaccines) || (e.vaccines = []), e.vaccines.push(
|
|
382
|
+
Array.isArray(e.vaccines) || (e.vaccines = []), e.vaccines.push(O);
|
|
381
383
|
},
|
|
382
|
-
setCurrentView: (e,
|
|
383
|
-
e.currentViewId =
|
|
384
|
+
setCurrentView: (e, t) => {
|
|
385
|
+
e.currentViewId = t.payload;
|
|
384
386
|
},
|
|
385
|
-
updateScheduledVaccine: (e,
|
|
386
|
-
const n =
|
|
387
|
-
|
|
388
|
-
...e.scheduledVaccines[
|
|
387
|
+
updateScheduledVaccine: (e, t) => {
|
|
388
|
+
const n = t.payload, a = e.scheduledVaccines.findIndex((o) => o.id === n.id);
|
|
389
|
+
a !== -1 ? e.scheduledVaccines[a] = {
|
|
390
|
+
...e.scheduledVaccines[a],
|
|
389
391
|
...n
|
|
390
392
|
} : e.scheduledVaccines.push(n);
|
|
391
393
|
},
|
|
392
|
-
setBaseDatesMaster: (e,
|
|
393
|
-
e.baseDateMaster =
|
|
394
|
+
setBaseDatesMaster: (e, t) => {
|
|
395
|
+
e.baseDateMaster = t.payload;
|
|
394
396
|
},
|
|
395
|
-
setRecipientMaster: (e,
|
|
396
|
-
e.recipientMaster =
|
|
397
|
+
setRecipientMaster: (e, t) => {
|
|
398
|
+
e.recipientMaster = t.payload;
|
|
397
399
|
},
|
|
398
|
-
setDbTablesMaster: (e,
|
|
399
|
-
e.dbTablesMaster =
|
|
400
|
+
setDbTablesMaster: (e, t) => {
|
|
401
|
+
e.dbTablesMaster = t.payload;
|
|
400
402
|
},
|
|
401
|
-
setFiltersMaster: (e,
|
|
402
|
-
e.filtersMaster =
|
|
403
|
+
setFiltersMaster: (e, t) => {
|
|
404
|
+
e.filtersMaster = t.payload;
|
|
403
405
|
},
|
|
404
|
-
upsertBaseDateMasterItem: (e,
|
|
405
|
-
e.baseDateMaster =
|
|
406
|
+
upsertBaseDateMasterItem: (e, t) => {
|
|
407
|
+
e.baseDateMaster = A(e.baseDateMaster, t.payload);
|
|
406
408
|
},
|
|
407
|
-
upsertRecipientMasterItem: (e,
|
|
408
|
-
e.recipientMaster =
|
|
409
|
+
upsertRecipientMasterItem: (e, t) => {
|
|
410
|
+
e.recipientMaster = A(e.recipientMaster, t.payload);
|
|
409
411
|
},
|
|
410
|
-
updateBaseDateMasterStatus: (e,
|
|
411
|
-
const { code: n, is_active:
|
|
412
|
+
updateBaseDateMasterStatus: (e, t) => {
|
|
413
|
+
const { code: n, is_active: a } = t.payload;
|
|
412
414
|
e.baseDateMaster = e.baseDateMaster.map(
|
|
413
|
-
(
|
|
415
|
+
(o) => o.code === n ? { ...o, is_active: a } : o
|
|
414
416
|
);
|
|
415
417
|
},
|
|
416
|
-
upsertFilterMasterItem: (e,
|
|
417
|
-
e.filtersMaster =
|
|
418
|
+
upsertFilterMasterItem: (e, t) => {
|
|
419
|
+
e.filtersMaster = A(e.filtersMaster, t.payload);
|
|
418
420
|
},
|
|
419
|
-
updateFilterMasterStatus: (e,
|
|
420
|
-
const { code: n, is_active:
|
|
421
|
+
updateFilterMasterStatus: (e, t) => {
|
|
422
|
+
const { code: n, is_active: a } = t.payload;
|
|
421
423
|
e.filtersMaster = e.filtersMaster.map(
|
|
422
|
-
(
|
|
424
|
+
(o) => o.code === n ? { ...o, is_active: a } : o
|
|
423
425
|
);
|
|
424
426
|
},
|
|
425
|
-
setFeatureRights: (e,
|
|
426
|
-
e.featureRights =
|
|
427
|
+
setFeatureRights: (e, t) => {
|
|
428
|
+
e.featureRights = t.payload || {};
|
|
427
429
|
},
|
|
428
|
-
setImmunizationConfigLoaded: (e,
|
|
429
|
-
e.isConfigLoaded =
|
|
430
|
+
setImmunizationConfigLoaded: (e, t) => {
|
|
431
|
+
e.isConfigLoaded = t.payload;
|
|
430
432
|
},
|
|
431
|
-
resetImmunizationState: () =>
|
|
433
|
+
resetImmunizationState: () => b(),
|
|
432
434
|
activateSelectedVaccines: (e) => {
|
|
433
|
-
e.vaccines = e.vaccines.map((
|
|
434
|
-
...
|
|
435
|
-
isActive: e.selectedVaccineIds.includes(
|
|
435
|
+
e.vaccines = e.vaccines.map((t) => ({
|
|
436
|
+
...t,
|
|
437
|
+
isActive: e.selectedVaccineIds.includes(t.id)
|
|
436
438
|
}));
|
|
437
439
|
},
|
|
438
|
-
setVaccineStatus: (e,
|
|
439
|
-
const { vaccineId: n, status:
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
|
|
440
|
+
setVaccineStatus: (e, t) => {
|
|
441
|
+
const { vaccineId: n, status: a } = t.payload, o = e.vaccines.findIndex((m) => m.id === n);
|
|
442
|
+
o !== -1 && (e.vaccines[o].isActive = a), Array.isArray(e.selectedVaccineIds) || (e.selectedVaccineIds = []);
|
|
443
|
+
const c = e.selectedVaccineIds.indexOf(n);
|
|
444
|
+
a && c === -1 ? e.selectedVaccineIds.push(n) : !a && c !== -1 && e.selectedVaccineIds.splice(c, 1);
|
|
443
445
|
},
|
|
444
|
-
setValidationErrors: (e,
|
|
445
|
-
const { vaccineId: n, errors:
|
|
446
|
-
e.validationErrors[n] =
|
|
446
|
+
setValidationErrors: (e, t) => {
|
|
447
|
+
const { vaccineId: n, errors: a } = t.payload;
|
|
448
|
+
e.validationErrors[n] = a;
|
|
447
449
|
},
|
|
448
|
-
clearValidationErrors: (e,
|
|
449
|
-
const n =
|
|
450
|
+
clearValidationErrors: (e, t) => {
|
|
451
|
+
const n = t.payload;
|
|
450
452
|
n ? delete e.validationErrors[n] : e.validationErrors = {};
|
|
451
453
|
}
|
|
452
454
|
}
|
|
453
455
|
}), {
|
|
454
|
-
toggleVaccine:
|
|
455
|
-
setVaccines:
|
|
456
|
-
addCustomVaccine:
|
|
457
|
-
setCurrentView:
|
|
458
|
-
updateScheduledVaccine:
|
|
459
|
-
setBaseDatesMaster:
|
|
460
|
-
setRecipientMaster:
|
|
461
|
-
setDbTablesMaster:
|
|
462
|
-
setFiltersMaster:
|
|
463
|
-
upsertBaseDateMasterItem:
|
|
464
|
-
upsertRecipientMasterItem:
|
|
465
|
-
updateBaseDateMasterStatus:
|
|
466
|
-
upsertFilterMasterItem:
|
|
467
|
-
updateFilterMasterStatus:
|
|
468
|
-
setFeatureRights:
|
|
469
|
-
setImmunizationConfigLoaded:
|
|
470
|
-
resetImmunizationState:
|
|
471
|
-
activateSelectedVaccines:
|
|
472
|
-
setSelectedVaccineIds:
|
|
473
|
-
setValidationErrors:
|
|
474
|
-
clearValidationErrors:
|
|
475
|
-
setVaccineStatus:
|
|
476
|
-
} =
|
|
456
|
+
toggleVaccine: Ve,
|
|
457
|
+
setVaccines: Ce,
|
|
458
|
+
addCustomVaccine: Fe,
|
|
459
|
+
setCurrentView: Ue,
|
|
460
|
+
updateScheduledVaccine: Re,
|
|
461
|
+
setBaseDatesMaster: De,
|
|
462
|
+
setRecipientMaster: Oe,
|
|
463
|
+
setDbTablesMaster: ze,
|
|
464
|
+
setFiltersMaster: Ge,
|
|
465
|
+
upsertBaseDateMasterItem: Le,
|
|
466
|
+
upsertRecipientMasterItem: ve,
|
|
467
|
+
updateBaseDateMasterStatus: xe,
|
|
468
|
+
upsertFilterMasterItem: Be,
|
|
469
|
+
updateFilterMasterStatus: we,
|
|
470
|
+
setFeatureRights: Pe,
|
|
471
|
+
setImmunizationConfigLoaded: qe,
|
|
472
|
+
resetImmunizationState: $e,
|
|
473
|
+
activateSelectedVaccines: He,
|
|
474
|
+
setSelectedVaccineIds: Ze,
|
|
475
|
+
setValidationErrors: Qe,
|
|
476
|
+
clearValidationErrors: Xe,
|
|
477
|
+
setVaccineStatus: je
|
|
478
|
+
} = V.actions, We = V.reducer, T = (e, t) => {
|
|
479
|
+
if (e == null)
|
|
480
|
+
return t;
|
|
481
|
+
if (typeof e != "string")
|
|
482
|
+
return e;
|
|
483
|
+
try {
|
|
484
|
+
return JSON.parse(e);
|
|
485
|
+
} catch {
|
|
486
|
+
return t;
|
|
487
|
+
}
|
|
488
|
+
}, M = (...e) => e.filter(Boolean).join("_"), f = (e) => e == null || e === "" || e === "N.A." || e === "null days" ? "N.A." : e, C = (e, t = "FLEXIBLE", n = 1) => {
|
|
489
|
+
if (n === 0 || !e)
|
|
490
|
+
return "N.A.";
|
|
491
|
+
if (t === "FIXED") {
|
|
492
|
+
const c = Array.isArray(e) ? e[0] : e;
|
|
493
|
+
if (!c)
|
|
494
|
+
return "N.A.";
|
|
495
|
+
const m = f(c.eligibleFrom), u = f(c.eligibleTo);
|
|
496
|
+
return m === "N.A." && u === "N.A." ? "N.A." : `${m} to ${u}`;
|
|
497
|
+
}
|
|
498
|
+
if (!Array.isArray(e) || e.length === 0)
|
|
499
|
+
return "N.A.";
|
|
500
|
+
const a = f(e[0].eligibleFrom), o = f(
|
|
501
|
+
e[e.length - 1].eligibleTo
|
|
502
|
+
);
|
|
503
|
+
return a === "N.A." && o === "N.A." ? "N.A." : `${a} to ${o}`;
|
|
504
|
+
}, Y = (e) => {
|
|
505
|
+
const t = String(e.dose_type || "").toLowerCase(), a = t === "fixed" || t === "na" || !e.dose_type ? [
|
|
506
|
+
{
|
|
507
|
+
id: M("fixed", e.id),
|
|
508
|
+
eligibleFrom: e.dose_eligible_from !== void 0 ? `${e.dose_eligible_from} days` : "",
|
|
509
|
+
eligibleTo: e.dose_eligible_to !== void 0 ? `${e.dose_eligible_to} days` : "",
|
|
510
|
+
interval: e.min_gap || 0
|
|
511
|
+
}
|
|
512
|
+
] : T(e.dose, []).map((i, p) => ({
|
|
513
|
+
id: i.id || M("dose", e.id, p),
|
|
514
|
+
isBooster: i.isBooster === !0 || i.is_booster === !0 || typeof i.dose == "string" && i.dose.toUpperCase().startsWith("B"),
|
|
515
|
+
alias: i.alias || i.booster_alias || "",
|
|
516
|
+
eligibleFrom: i.eligible_from !== void 0 ? `${i.eligible_from} days` : "",
|
|
517
|
+
eligibleTo: i.eligible_to !== void 0 ? `${i.eligible_to} days` : "",
|
|
518
|
+
interval: i.min_gap || 0
|
|
519
|
+
})), o = T(e.location, []).filter((i) => i && typeof i == "object").map((i, p) => {
|
|
520
|
+
var I;
|
|
521
|
+
return {
|
|
522
|
+
id: M("region", e.id, p),
|
|
523
|
+
locationId: i.locationId,
|
|
524
|
+
locationIdArr: i.locationIdArr,
|
|
525
|
+
locationList: i.locationList,
|
|
526
|
+
fullPath: (I = i.locationList) == null ? void 0 : I.replaceAll(" => ", " → ")
|
|
527
|
+
};
|
|
528
|
+
}), c = T(e.validations, []).map(
|
|
529
|
+
(i, p) => ({
|
|
530
|
+
id: M("dep", e.id, p),
|
|
531
|
+
vaccine: i.vaccine || "",
|
|
532
|
+
requirement: i.requirement || "Should be given",
|
|
533
|
+
minGap: Number.parseInt(i.minGap, 10) || 0,
|
|
534
|
+
maxGap: Number.parseInt(i.maxGap, 10) || 0,
|
|
535
|
+
message: i.message || ""
|
|
536
|
+
})
|
|
537
|
+
), m = T(e.filters, []), u = Array.isArray(m) ? m : (m == null ? void 0 : m.codes) || [];
|
|
538
|
+
return {
|
|
539
|
+
...e,
|
|
540
|
+
name: e.vaccine_name || e.name || "N.A.",
|
|
541
|
+
category: e.target_prevention || e.disease || e.category || "N.A.",
|
|
542
|
+
doses: e.no_of_doses || 0,
|
|
543
|
+
doseType: e.dose_type && e.dose_type !== "NA" ? e.dose_type : "FIXED",
|
|
544
|
+
doseDetails: a,
|
|
545
|
+
eligibility: C(
|
|
546
|
+
a,
|
|
547
|
+
e.dose_type,
|
|
548
|
+
e.no_of_doses || 0
|
|
549
|
+
),
|
|
550
|
+
isActive: e.is_active !== void 0 ? e.is_active : !0,
|
|
551
|
+
regions: o,
|
|
552
|
+
dependencies: c,
|
|
553
|
+
filters: u,
|
|
554
|
+
baseDateCode: e.base_date_code,
|
|
555
|
+
recipientType: e.recipient_type || ""
|
|
556
|
+
};
|
|
557
|
+
}, k = () => d({
|
|
558
|
+
code: "FETCH_IMMUNISATION_MASTER",
|
|
559
|
+
parameters: {}
|
|
560
|
+
}), ee = () => d({
|
|
561
|
+
code: "FETCH_IMMUNISATION_BASE_DATE",
|
|
562
|
+
parameters: {}
|
|
563
|
+
}), te = () => d({
|
|
564
|
+
code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
|
|
565
|
+
parameters: {}
|
|
566
|
+
}), ae = () => G([
|
|
567
|
+
{
|
|
568
|
+
code: "FETCH_IMMUNISATION_BASE_DATE",
|
|
569
|
+
parameters: {},
|
|
570
|
+
sequence: 1
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
code: "GET_ALL_IMMUNISATION_FILTERS",
|
|
574
|
+
parameters: {},
|
|
575
|
+
sequence: 2
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
code: "FETCH_IMMUNISATION_MASTER",
|
|
579
|
+
parameters: {},
|
|
580
|
+
sequence: 3
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
code: "FETCH_IMMUNISATION_RECEPIENT_MASTER",
|
|
584
|
+
parameters: {},
|
|
585
|
+
sequence: 4
|
|
586
|
+
}
|
|
587
|
+
]), ne = (e) => d({
|
|
588
|
+
code: "INSERT_IMMUNIZATION_MASTER",
|
|
589
|
+
parameters: e
|
|
590
|
+
}), ie = (e) => d({
|
|
591
|
+
code: "UPDATE_IMMUNIZATION_DOSE",
|
|
592
|
+
...e
|
|
593
|
+
}), re = (e) => d({
|
|
594
|
+
code: "CHECK_IMMUNIZATION_CONFIGURATION_INITIATION",
|
|
595
|
+
...e
|
|
596
|
+
}), se = (e) => d({
|
|
597
|
+
code: "UPDATE_IMMUNIZATION_STATUS",
|
|
598
|
+
...e
|
|
599
|
+
}), oe = (e) => d({
|
|
600
|
+
code: "UPDATE_IMMUNIZATION_STATUS_FOR_ARRAY",
|
|
601
|
+
...e
|
|
602
|
+
}), le = (e) => d({
|
|
603
|
+
code: "UPDATE_IMMUNIZATION_CONFIGURATION_INITIATION",
|
|
604
|
+
...e
|
|
605
|
+
}), de = (e) => d({
|
|
606
|
+
code: "SAVE_IMMUNISATION_BASE_DATE",
|
|
607
|
+
parameters: e
|
|
608
|
+
}), me = (e) => d({
|
|
609
|
+
code: "SAVE_IMMUNISATION_RECEPIENT_MASTER",
|
|
610
|
+
parameters: e
|
|
611
|
+
}), ce = (e) => d({
|
|
612
|
+
code: "UPDATE_IMMUNISATION_RECEPIENT_MASTER",
|
|
613
|
+
parameters: e
|
|
614
|
+
}), pe = (e) => d({
|
|
615
|
+
code: "UPDATE_IMMUNISATION_BASE_DATE",
|
|
616
|
+
parameters: e
|
|
617
|
+
}), ue = () => d({
|
|
618
|
+
code: "retrieve_all_tables_and_columns",
|
|
619
|
+
parameters: {}
|
|
620
|
+
}), ge = () => d({
|
|
621
|
+
code: "GET_ALL_IMMUNISATION_FILTERS",
|
|
622
|
+
parameters: {}
|
|
623
|
+
}), Ie = (e) => d({
|
|
624
|
+
code: "ADD_IMMUNISATION_FILTER",
|
|
625
|
+
parameters: e
|
|
626
|
+
}), Te = (e) => d({
|
|
627
|
+
code: "UPDATE_IMMUNISATION_FILTER",
|
|
628
|
+
parameters: e
|
|
629
|
+
}), Me = (e) => S.post("/medplatform/v2/immunisation/list", e), fe = (e) => S.post("/medplatform/v2/immunisation/revalidate", e), Je = {
|
|
630
|
+
calculateOverallEligibility: C,
|
|
631
|
+
mapImmunizationVaccineConfig: Y,
|
|
632
|
+
getVaccines: k,
|
|
633
|
+
getBaseDates: ee,
|
|
634
|
+
getRecipients: te,
|
|
635
|
+
getImmunizationReferenceData: ae,
|
|
636
|
+
addImmunization: ne,
|
|
637
|
+
updateImmunization: ie,
|
|
638
|
+
checkImmunizationConfigurationInitiation: re,
|
|
639
|
+
updateVaccineStatus: se,
|
|
640
|
+
updateVaccineStatusFromArray: oe,
|
|
641
|
+
updateImmunizationConfigurationInitiation: le,
|
|
642
|
+
saveBaseDate: de,
|
|
643
|
+
saveRecipient: me,
|
|
644
|
+
updateRecipient: ce,
|
|
645
|
+
updateBaseDate: pe,
|
|
646
|
+
getAllTablesAndColumns: ue,
|
|
647
|
+
getFilters: ge,
|
|
648
|
+
addFilter: Ie,
|
|
649
|
+
updateFilter: Te,
|
|
650
|
+
getImmunisationV2List: Me,
|
|
651
|
+
revalidateImmunisationV2List: fe
|
|
652
|
+
};
|
|
477
653
|
export {
|
|
478
|
-
|
|
479
|
-
|
|
654
|
+
Je as ImmunizationUtil,
|
|
655
|
+
We as immunizationReducer,
|
|
656
|
+
be as routes
|
|
480
657
|
};
|
|
481
658
|
//# sourceMappingURL=index.js.map
|