primary_care_admin_binder 0.0.91 → 0.0.92
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/index.cjs.js +31 -27
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -20708,36 +20708,40 @@ var ruleExcutionPayload = function ruleExcutionPayload(payload) {
|
|
|
20708
20708
|
var affectedListGenerator = function affectedListGenerator(payload) {
|
|
20709
20709
|
try {
|
|
20710
20710
|
var userData = {};
|
|
20711
|
-
payload.map(function (
|
|
20712
|
-
|
|
20711
|
+
payload.map(function (value) {
|
|
20712
|
+
if (value !== null && value !== void 0 && value.Appointment) {
|
|
20713
|
+
value.Appointment.map(function (val) {
|
|
20714
|
+
var _val$Schedule$resourc, _val$Schedule;
|
|
20713
20715
|
|
|
20714
|
-
|
|
20716
|
+
var resourceCode = (_val$Schedule$resourc = val === null || val === void 0 ? void 0 : (_val$Schedule = val.Schedule) === null || _val$Schedule === void 0 ? void 0 : _val$Schedule.resourceCode) !== null && _val$Schedule$resourc !== void 0 ? _val$Schedule$resourc : "";
|
|
20715
20717
|
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
+
if (userData[resourceCode]) {
|
|
20719
|
+
var _userData$resourceCod, _userData$resourceCod2, _val$Slot$bookedCount, _val$Slot, _userData$resourceCod3, _userData$resourceCod4, _val$Slot$Maxwaiting, _val$Slot2, _userData$resourceCod5, _userData$resourceCod6, _val$Slot$Maxbooking, _val$Slot3, _userData$resourceCod7, _userData$resourceCod8, _val$Slot$maxwalkin, _val$Slot4, _userData$resourceCod9, _userData$resourceCod10, _val$Slot$maxgeneral, _val$Slot5;
|
|
20718
20720
|
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20721
|
+
userData[resourceCode].bookedCount = ((_userData$resourceCod = userData === null || userData === void 0 ? void 0 : (_userData$resourceCod2 = userData[resourceCode]) === null || _userData$resourceCod2 === void 0 ? void 0 : _userData$resourceCod2.bookedCount) !== null && _userData$resourceCod !== void 0 ? _userData$resourceCod : 0) + ((_val$Slot$bookedCount = val === null || val === void 0 ? void 0 : (_val$Slot = val.Slot) === null || _val$Slot === void 0 ? void 0 : _val$Slot.bookedCount) !== null && _val$Slot$bookedCount !== void 0 ? _val$Slot$bookedCount : 0);
|
|
20722
|
+
userData[resourceCode].Maxwaiting = ((_userData$resourceCod3 = userData === null || userData === void 0 ? void 0 : (_userData$resourceCod4 = userData[resourceCode]) === null || _userData$resourceCod4 === void 0 ? void 0 : _userData$resourceCod4.Maxwaiting) !== null && _userData$resourceCod3 !== void 0 ? _userData$resourceCod3 : 0) + ((_val$Slot$Maxwaiting = val === null || val === void 0 ? void 0 : (_val$Slot2 = val.Slot) === null || _val$Slot2 === void 0 ? void 0 : _val$Slot2.Maxwaiting) !== null && _val$Slot$Maxwaiting !== void 0 ? _val$Slot$Maxwaiting : 0);
|
|
20723
|
+
userData[resourceCode].Maxbooking = ((_userData$resourceCod5 = userData === null || userData === void 0 ? void 0 : (_userData$resourceCod6 = userData[resourceCode]) === null || _userData$resourceCod6 === void 0 ? void 0 : _userData$resourceCod6.Maxbooking) !== null && _userData$resourceCod5 !== void 0 ? _userData$resourceCod5 : 0) + ((_val$Slot$Maxbooking = val === null || val === void 0 ? void 0 : (_val$Slot3 = val.Slot) === null || _val$Slot3 === void 0 ? void 0 : _val$Slot3.Maxbooking) !== null && _val$Slot$Maxbooking !== void 0 ? _val$Slot$Maxbooking : 0);
|
|
20724
|
+
userData[resourceCode].maxwalkin = ((_userData$resourceCod7 = userData === null || userData === void 0 ? void 0 : (_userData$resourceCod8 = userData[resourceCode]) === null || _userData$resourceCod8 === void 0 ? void 0 : _userData$resourceCod8.maxwalkin) !== null && _userData$resourceCod7 !== void 0 ? _userData$resourceCod7 : 0) + ((_val$Slot$maxwalkin = val === null || val === void 0 ? void 0 : (_val$Slot4 = val.Slot) === null || _val$Slot4 === void 0 ? void 0 : _val$Slot4.maxwalkin) !== null && _val$Slot$maxwalkin !== void 0 ? _val$Slot$maxwalkin : 0);
|
|
20725
|
+
userData[resourceCode].maxAppointment = ((_userData$resourceCod9 = userData === null || userData === void 0 ? void 0 : (_userData$resourceCod10 = userData[resourceCode]) === null || _userData$resourceCod10 === void 0 ? void 0 : _userData$resourceCod10.maxAppointment) !== null && _userData$resourceCod9 !== void 0 ? _userData$resourceCod9 : 0) + ((_val$Slot$maxgeneral = val === null || val === void 0 ? void 0 : (_val$Slot5 = val.Slot) === null || _val$Slot5 === void 0 ? void 0 : _val$Slot5.maxgeneral) !== null && _val$Slot$maxgeneral !== void 0 ? _val$Slot$maxgeneral : 0);
|
|
20726
|
+
} else {
|
|
20727
|
+
var _val$Appointment$reso, _val$Appointment, _val$Appointment$reso2, _val$Appointment$reso3, _val$Appointment$reso4, _val$Appointment$reso5, _value$Count, _val$Appointment$reso6, _val$Appointment2, _val$Appointment2$res, _val$Appointment2$res2, _val$Appointment2$res3, _val$Appointment2$res4, _val$Appointment2$res5, _val$Appointment2$res6, _val$Appointment2$res7, _val$Appointment2$res8, _val$Appointment$reso7, _val$Appointment3, _val$Appointment3$res, _val$Appointment3$res2, _val$Appointment3$res3, _val$Appointment3$res4, _val$Appointment3$res5, _value$Count2;
|
|
20728
|
+
|
|
20729
|
+
userData[resourceCode] = {
|
|
20730
|
+
name: (_val$Appointment$reso = val === null || val === void 0 ? void 0 : (_val$Appointment = val.Appointment) === null || _val$Appointment === void 0 ? void 0 : (_val$Appointment$reso2 = _val$Appointment.resourcecode) === null || _val$Appointment$reso2 === void 0 ? void 0 : (_val$Appointment$reso3 = _val$Appointment$reso2[0]) === null || _val$Appointment$reso3 === void 0 ? void 0 : (_val$Appointment$reso4 = _val$Appointment$reso3.name) === null || _val$Appointment$reso4 === void 0 ? void 0 : (_val$Appointment$reso5 = _val$Appointment$reso4[0]) === null || _val$Appointment$reso5 === void 0 ? void 0 : _val$Appointment$reso5.text) !== null && _val$Appointment$reso !== void 0 ? _val$Appointment$reso : "",
|
|
20731
|
+
affectedCount: (_value$Count = value === null || value === void 0 ? void 0 : value.Count) !== null && _value$Count !== void 0 ? _value$Count : 0,
|
|
20732
|
+
role: (_val$Appointment$reso6 = val === null || val === void 0 ? void 0 : (_val$Appointment2 = val.Appointment) === null || _val$Appointment2 === void 0 ? void 0 : (_val$Appointment2$res = _val$Appointment2.resourcecode) === null || _val$Appointment2$res === void 0 ? void 0 : (_val$Appointment2$res2 = _val$Appointment2$res[0]) === null || _val$Appointment2$res2 === void 0 ? void 0 : (_val$Appointment2$res3 = _val$Appointment2$res2.practitioner_role) === null || _val$Appointment2$res3 === void 0 ? void 0 : (_val$Appointment2$res4 = _val$Appointment2$res3[0]) === null || _val$Appointment2$res4 === void 0 ? void 0 : (_val$Appointment2$res5 = _val$Appointment2$res4.role) === null || _val$Appointment2$res5 === void 0 ? void 0 : (_val$Appointment2$res6 = _val$Appointment2$res5[0]) === null || _val$Appointment2$res6 === void 0 ? void 0 : (_val$Appointment2$res7 = _val$Appointment2$res6.coding) === null || _val$Appointment2$res7 === void 0 ? void 0 : (_val$Appointment2$res8 = _val$Appointment2$res7[0]) === null || _val$Appointment2$res8 === void 0 ? void 0 : _val$Appointment2$res8.display) !== null && _val$Appointment$reso6 !== void 0 ? _val$Appointment$reso6 : "",
|
|
20733
|
+
type: (_val$Appointment$reso7 = val === null || val === void 0 ? void 0 : (_val$Appointment3 = val.Appointment) === null || _val$Appointment3 === void 0 ? void 0 : (_val$Appointment3$res = _val$Appointment3.resourcecode) === null || _val$Appointment3$res === void 0 ? void 0 : (_val$Appointment3$res2 = _val$Appointment3$res[0]) === null || _val$Appointment3$res2 === void 0 ? void 0 : (_val$Appointment3$res3 = _val$Appointment3$res2.practitioner_type[0]) === null || _val$Appointment3$res3 === void 0 ? void 0 : (_val$Appointment3$res4 = _val$Appointment3$res3.coding) === null || _val$Appointment3$res4 === void 0 ? void 0 : (_val$Appointment3$res5 = _val$Appointment3$res4[0]) === null || _val$Appointment3$res5 === void 0 ? void 0 : _val$Appointment3$res5.display) !== null && _val$Appointment$reso7 !== void 0 ? _val$Appointment$reso7 : "",
|
|
20734
|
+
maxAppointment: val === null || val === void 0 ? void 0 : val.Slot.maxgeneral,
|
|
20735
|
+
maxCount: (_value$Count2 = value === null || value === void 0 ? void 0 : value.Count) !== null && _value$Count2 !== void 0 ? _value$Count2 : 0,
|
|
20736
|
+
overBookCount: 0,
|
|
20737
|
+
waitListCount: 0,
|
|
20738
|
+
Maxwaiting: val === null || val === void 0 ? void 0 : val.Slot.Maxwaiting,
|
|
20739
|
+
Maxbooking: val === null || val === void 0 ? void 0 : val.Slot.Maxbooking,
|
|
20740
|
+
maxwalkin: val === null || val === void 0 ? void 0 : val.Slot.maxwalkin,
|
|
20741
|
+
bookedCount: val === null || val === void 0 ? void 0 : val.Slot.bookedCount
|
|
20742
|
+
};
|
|
20743
|
+
}
|
|
20744
|
+
});
|
|
20741
20745
|
}
|
|
20742
20746
|
});
|
|
20743
20747
|
return Object.values(userData);
|