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.
Files changed (2) hide show
  1. package/dist/index.cjs.js +31 -27
  2. 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 (val) {
20712
- var _val$slotID$ScheduleI, _val$slotID, _val$slotID$ScheduleI2;
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
- var resourceCode = (_val$slotID$ScheduleI = val === null || val === void 0 ? void 0 : (_val$slotID = val.slotID) === null || _val$slotID === void 0 ? void 0 : (_val$slotID$ScheduleI2 = _val$slotID.ScheduleID) === null || _val$slotID$ScheduleI2 === void 0 ? void 0 : _val$slotID$ScheduleI2.resourceCode) !== null && _val$slotID$ScheduleI !== void 0 ? _val$slotID$ScheduleI : "";
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
- if (userData[resourceCode]) {
20717
- var _userData$resourceCod, _userData$resourceCod2, _val$slotID$bookedCou, _val$slotID2, _userData$resourceCod3, _userData$resourceCod4, _val$slotID$Maxwaitin, _val$slotID3, _userData$resourceCod5, _userData$resourceCod6, _val$slotID$Maxbookin, _val$slotID4, _userData$resourceCod7, _userData$resourceCod8, _val$slotID$maxwalkin, _val$slotID5, _userData$resourceCod9, _userData$resourceCod10, _val$slotID$maxgenera, _val$slotID6;
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
- 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$slotID$bookedCou = val === null || val === void 0 ? void 0 : (_val$slotID2 = val.slotID) === null || _val$slotID2 === void 0 ? void 0 : _val$slotID2.bookedCount) !== null && _val$slotID$bookedCou !== void 0 ? _val$slotID$bookedCou : 0);
20720
- 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$slotID$Maxwaitin = val === null || val === void 0 ? void 0 : (_val$slotID3 = val.slotID) === null || _val$slotID3 === void 0 ? void 0 : _val$slotID3.Maxwaiting) !== null && _val$slotID$Maxwaitin !== void 0 ? _val$slotID$Maxwaitin : 0);
20721
- 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$slotID$Maxbookin = val === null || val === void 0 ? void 0 : (_val$slotID4 = val.slotID) === null || _val$slotID4 === void 0 ? void 0 : _val$slotID4.Maxbooking) !== null && _val$slotID$Maxbookin !== void 0 ? _val$slotID$Maxbookin : 0);
20722
- 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$slotID$maxwalkin = val === null || val === void 0 ? void 0 : (_val$slotID5 = val.slotID) === null || _val$slotID5 === void 0 ? void 0 : _val$slotID5.maxwalkin) !== null && _val$slotID$maxwalkin !== void 0 ? _val$slotID$maxwalkin : 0);
20723
- 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$slotID$maxgenera = val === null || val === void 0 ? void 0 : (_val$slotID6 = val.slotID) === null || _val$slotID6 === void 0 ? void 0 : _val$slotID6.maxgeneral) !== null && _val$slotID$maxgenera !== void 0 ? _val$slotID$maxgenera : 0);
20724
- } else {
20725
- var _val$resourcecode$0$n, _val$resourcecode, _val$resourcecode$, _val$resourcecode$$na, _val$resourcecode$$na2, _val$affectedappointm, _val$affectedappointm2, _val$resourcecode$0$p, _val$resourcecode2, _val$resourcecode2$, _val$resourcecode2$$p, _val$resourcecode2$$p2, _val$resourcecode2$$p3, _val$resourcecode2$$p4, _val$resourcecode2$$p5, _val$resourcecode2$$p6, _val$resourcecode$0$p2, _val$resourcecode3, _val$resourcecode3$, _val$resourcecode3$$p, _val$resourcecode3$$p2, _val$resourcecode3$$p3, _val$affectedappointm3, _val$affectedappointm4;
20726
-
20727
- userData[resourceCode] = {
20728
- name: (_val$resourcecode$0$n = val === null || val === void 0 ? void 0 : (_val$resourcecode = val.resourcecode) === null || _val$resourcecode === void 0 ? void 0 : (_val$resourcecode$ = _val$resourcecode[0]) === null || _val$resourcecode$ === void 0 ? void 0 : (_val$resourcecode$$na = _val$resourcecode$.name) === null || _val$resourcecode$$na === void 0 ? void 0 : (_val$resourcecode$$na2 = _val$resourcecode$$na[0]) === null || _val$resourcecode$$na2 === void 0 ? void 0 : _val$resourcecode$$na2.text) !== null && _val$resourcecode$0$n !== void 0 ? _val$resourcecode$0$n : "",
20729
- affectedCount: (_val$affectedappointm = val === null || val === void 0 ? void 0 : (_val$affectedappointm2 = val.affectedappointment) === null || _val$affectedappointm2 === void 0 ? void 0 : _val$affectedappointm2[0]) !== null && _val$affectedappointm !== void 0 ? _val$affectedappointm : 0,
20730
- role: (_val$resourcecode$0$p = val === null || val === void 0 ? void 0 : (_val$resourcecode2 = val.resourcecode) === null || _val$resourcecode2 === void 0 ? void 0 : (_val$resourcecode2$ = _val$resourcecode2[0]) === null || _val$resourcecode2$ === void 0 ? void 0 : (_val$resourcecode2$$p = _val$resourcecode2$.practitioner_role) === null || _val$resourcecode2$$p === void 0 ? void 0 : (_val$resourcecode2$$p2 = _val$resourcecode2$$p[0]) === null || _val$resourcecode2$$p2 === void 0 ? void 0 : (_val$resourcecode2$$p3 = _val$resourcecode2$$p2.role) === null || _val$resourcecode2$$p3 === void 0 ? void 0 : (_val$resourcecode2$$p4 = _val$resourcecode2$$p3[0]) === null || _val$resourcecode2$$p4 === void 0 ? void 0 : (_val$resourcecode2$$p5 = _val$resourcecode2$$p4.coding) === null || _val$resourcecode2$$p5 === void 0 ? void 0 : (_val$resourcecode2$$p6 = _val$resourcecode2$$p5[0]) === null || _val$resourcecode2$$p6 === void 0 ? void 0 : _val$resourcecode2$$p6.display) !== null && _val$resourcecode$0$p !== void 0 ? _val$resourcecode$0$p : "",
20731
- type: (_val$resourcecode$0$p2 = val === null || val === void 0 ? void 0 : (_val$resourcecode3 = val.resourcecode) === null || _val$resourcecode3 === void 0 ? void 0 : (_val$resourcecode3$ = _val$resourcecode3[0]) === null || _val$resourcecode3$ === void 0 ? void 0 : (_val$resourcecode3$$p = _val$resourcecode3$.practitioner_type[0]) === null || _val$resourcecode3$$p === void 0 ? void 0 : (_val$resourcecode3$$p2 = _val$resourcecode3$$p.coding) === null || _val$resourcecode3$$p2 === void 0 ? void 0 : (_val$resourcecode3$$p3 = _val$resourcecode3$$p2[0]) === null || _val$resourcecode3$$p3 === void 0 ? void 0 : _val$resourcecode3$$p3.display) !== null && _val$resourcecode$0$p2 !== void 0 ? _val$resourcecode$0$p2 : "",
20732
- maxAppointment: val === null || val === void 0 ? void 0 : val.slotID.maxgeneral,
20733
- maxCount: (_val$affectedappointm3 = val === null || val === void 0 ? void 0 : (_val$affectedappointm4 = val.affectedappointment) === null || _val$affectedappointm4 === void 0 ? void 0 : _val$affectedappointm4[0]) !== null && _val$affectedappointm3 !== void 0 ? _val$affectedappointm3 : 0,
20734
- overBookCount: 0,
20735
- waitListCount: 0,
20736
- Maxwaiting: val === null || val === void 0 ? void 0 : val.slotID.Maxwaiting,
20737
- Maxbooking: val === null || val === void 0 ? void 0 : val.slotID.Maxbooking,
20738
- maxwalkin: val === null || val === void 0 ? void 0 : val.slotID.maxwalkin,
20739
- bookedCount: val === null || val === void 0 ? void 0 : val.slotID.bookedCount
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.0.91",
3
+ "version": "0.0.92",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",