primary_care_admin_binder 0.0.91 → 0.0.95

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 +68 -38
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -2266,6 +2266,7 @@ var queries$m = {
2266
2266
  },
2267
2267
  upsert: function upsert(data) {
2268
2268
  var filter = {};
2269
+ var _key = {};
2269
2270
 
2270
2271
  if (data._key) {
2271
2272
  filter = {
@@ -2275,6 +2276,12 @@ var queries$m = {
2275
2276
  };
2276
2277
  }
2277
2278
 
2279
+ if (data !== null && data !== void 0 && data.coding_key) {
2280
+ _key = {
2281
+ _key: data === null || data === void 0 ? void 0 : data.coding_key
2282
+ };
2283
+ }
2284
+
2278
2285
  if (data.id) {
2279
2286
  ({
2280
2287
  id: data.id
@@ -2291,15 +2298,16 @@ var queries$m = {
2291
2298
  text: "",
2292
2299
  _id: "",
2293
2300
  id: 0,
2294
- coding: [{
2301
+ coding: [_objectSpread2({
2295
2302
  system: "",
2296
2303
  version: "1",
2297
2304
  code: data.code,
2298
2305
  display: data.description,
2299
2306
  userSelected: true,
2300
2307
  Type: data.type,
2301
- id: data.id
2302
- }],
2308
+ id: data.id,
2309
+ status: data.status
2310
+ }, _key)],
2303
2311
  Type: data.type,
2304
2312
  status: data.status
2305
2313
  }
@@ -8420,9 +8428,12 @@ var PRACTITIONER_ROLE_READ = createAsyncThunk("practitionerSlice/practitionerlis
8420
8428
  arry = [];
8421
8429
  data.result.map(function (val) {
8422
8430
  if (val.coding[0] && val.coding[0].code && val.coding[0].display) {
8431
+ var _val$coding$0$_key;
8432
+
8423
8433
  arry.push({
8424
8434
  "code_type": val.coding[0].code,
8425
8435
  "description": val.coding[0].display,
8436
+ "coding_key": (_val$coding$0$_key = val.coding[0]._key) !== null && _val$coding$0$_key !== void 0 ? _val$coding$0$_key : null,
8426
8437
  "id": val.coding[0].id,
8427
8438
  "_key": val._key,
8428
8439
  'status': val.status,
@@ -8470,7 +8481,8 @@ var PRACTITIONER_ROLE_UPSERT = createAsyncThunk("practitionerSlice/practitionerR
8470
8481
  type: payload.type,
8471
8482
  status: payload.status,
8472
8483
  _key: payload._key,
8473
- id: payload.id
8484
+ id: payload.id,
8485
+ coding_key: payload.coding_key
8474
8486
  };
8475
8487
  queriesjson = queries$m.upsert(upsertkey);
8476
8488
  _context2.next = 7;
@@ -20708,36 +20720,40 @@ var ruleExcutionPayload = function ruleExcutionPayload(payload) {
20708
20720
  var affectedListGenerator = function affectedListGenerator(payload) {
20709
20721
  try {
20710
20722
  var userData = {};
20711
- payload.map(function (val) {
20712
- var _val$slotID$ScheduleI, _val$slotID, _val$slotID$ScheduleI2;
20723
+ payload.map(function (value) {
20724
+ if (value !== null && value !== void 0 && value.Appointment) {
20725
+ value.Appointment.map(function (val) {
20726
+ var _val$Schedule$resourc, _val$Schedule;
20713
20727
 
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 : "";
20728
+ 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
20729
 
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;
20730
+ if (userData[resourceCode]) {
20731
+ 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
20732
 
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
- };
20733
+ 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);
20734
+ 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);
20735
+ 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);
20736
+ 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);
20737
+ 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);
20738
+ } else {
20739
+ 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;
20740
+
20741
+ userData[resourceCode] = {
20742
+ 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 : "",
20743
+ affectedCount: (_value$Count = value === null || value === void 0 ? void 0 : value.Count) !== null && _value$Count !== void 0 ? _value$Count : 0,
20744
+ 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 : "",
20745
+ 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 : "",
20746
+ maxAppointment: val === null || val === void 0 ? void 0 : val.Slot.maxgeneral,
20747
+ maxCount: (_value$Count2 = value === null || value === void 0 ? void 0 : value.Count) !== null && _value$Count2 !== void 0 ? _value$Count2 : 0,
20748
+ overBookCount: 0,
20749
+ waitListCount: 0,
20750
+ Maxwaiting: val === null || val === void 0 ? void 0 : val.Slot.Maxwaiting,
20751
+ Maxbooking: val === null || val === void 0 ? void 0 : val.Slot.Maxbooking,
20752
+ maxwalkin: val === null || val === void 0 ? void 0 : val.Slot.maxwalkin,
20753
+ bookedCount: val === null || val === void 0 ? void 0 : val.Slot.bookedCount
20754
+ };
20755
+ }
20756
+ });
20741
20757
  }
20742
20758
  });
20743
20759
  return Object.values(userData);
@@ -21225,9 +21241,23 @@ var ALL_PRACTITIONER = createAsyncThunk("scheduleManagementApiSlice/allPractitio
21225
21241
  data = _context2.sent;
21226
21242
  arr = [];
21227
21243
  data && data.result.map(function (val) {
21244
+ var _val$name$0$prefix$0$, _val$name, _val$name$, _val$name$$prefix, _val$name$$prefix$, _val$name$$prefix$$co, _val$name$$prefix$$co2, _val$name$0$text, _val$name2, _val$name2$, _val$name$0$given, _val$name3, _val$name$0$family, _val$name4, _val$name4$, _val$name$0$suffix$0$, _val$name5, _val$name5$, _val$name5$$suffix, _val$name5$$suffix$, _val$name5$$suffix$$c, _val$name5$$suffix$$c2;
21245
+
21228
21246
  arr.push({
21229
21247
  value: val._id,
21230
- label: val.name.length > 0 ? val.name[0].prefix.length > 0 ? val.name[0].prefix[0].coding[0].display + " " + val.name[0].text + " " + val.name[0].given + " " + val.name[0].family : "" + val.name[0].given + " " + val.name[0].family : "",
21248
+ label: ((_val$name$0$prefix$0$ = val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : (_val$name$ = _val$name[0]) === null || _val$name$ === void 0 ? void 0 : (_val$name$$prefix = _val$name$.prefix) === null || _val$name$$prefix === void 0 ? void 0 : (_val$name$$prefix$ = _val$name$$prefix[0]) === null || _val$name$$prefix$ === void 0 ? void 0 : (_val$name$$prefix$$co = _val$name$$prefix$.coding) === null || _val$name$$prefix$$co === void 0 ? void 0 : (_val$name$$prefix$$co2 = _val$name$$prefix$$co[0]) === null || _val$name$$prefix$$co2 === void 0 ? void 0 : _val$name$$prefix$$co2.display) !== null && _val$name$0$prefix$0$ !== void 0 ? _val$name$0$prefix$0$ : "") + " " + ((_val$name$0$text = val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : (_val$name2$ = _val$name2[0]) === null || _val$name2$ === void 0 ? void 0 : _val$name2$.text) !== null && _val$name$0$text !== void 0 ? _val$name$0$text : "") + " " + ((_val$name$0$given = val === null || val === void 0 ? void 0 : (_val$name3 = val.name) === null || _val$name3 === void 0 ? void 0 : _val$name3[0].given) !== null && _val$name$0$given !== void 0 ? _val$name$0$given : "") + " " + ((_val$name$0$family = val === null || val === void 0 ? void 0 : (_val$name4 = val.name) === null || _val$name4 === void 0 ? void 0 : (_val$name4$ = _val$name4[0]) === null || _val$name4$ === void 0 ? void 0 : _val$name4$.family) !== null && _val$name$0$family !== void 0 ? _val$name$0$family : "") + " " + ((_val$name$0$suffix$0$ = val === null || val === void 0 ? void 0 : (_val$name5 = val.name) === null || _val$name5 === void 0 ? void 0 : (_val$name5$ = _val$name5[0]) === null || _val$name5$ === void 0 ? void 0 : (_val$name5$$suffix = _val$name5$.suffix) === null || _val$name5$$suffix === void 0 ? void 0 : (_val$name5$$suffix$ = _val$name5$$suffix[0]) === null || _val$name5$$suffix$ === void 0 ? void 0 : (_val$name5$$suffix$$c = _val$name5$$suffix$.coding) === null || _val$name5$$suffix$$c === void 0 ? void 0 : (_val$name5$$suffix$$c2 = _val$name5$$suffix$$c[0]) === null || _val$name5$$suffix$$c2 === void 0 ? void 0 : _val$name5$$suffix$$c2.display) !== null && _val$name$0$suffix$0$ !== void 0 ? _val$name$0$suffix$0$ : ""),
21249
+ // label:
21250
+ // val.name.length > 0
21251
+ // ? val.name[0].prefix.length > 0
21252
+ // ? val.name[0].prefix[0].coding[0].display +
21253
+ // " " +
21254
+ // val.name[0].text +
21255
+ // " " +
21256
+ // val.name[0].given +
21257
+ // " " +
21258
+ // val.name[0].family
21259
+ // : "" + val.name[0].given + " " + val.name[0].family
21260
+ // : "",
21231
21261
  id: val.id,
21232
21262
  role: val.practitioner_role.length > 0 ? val.practitioner_role[0].role.length > 0 ? val.practitioner_role[0].role[0].coding[0].display : "" : "Role not Assigned"
21233
21263
  });
@@ -30456,7 +30486,7 @@ var queries$1 = {
30456
30486
  };
30457
30487
  },
30458
30488
  add_new_general_type: function add_new_general_type(data) {
30459
- var _data$code, _data$code2, _data$long_descriptio, _data$type, _data$short_descripti, _data$addition, _data$type2;
30489
+ var _data$code, _data$code$trim, _data$code2, _data$long_descriptio, _data$type, _data$short_descripti, _data$addition, _data$type2;
30460
30490
 
30461
30491
  // return [
30462
30492
  // {
@@ -30489,7 +30519,7 @@ var queries$1 = {
30489
30519
  "coding": [{
30490
30520
  // "system": "string",
30491
30521
  // "version": "string",
30492
- "code": (_data$code2 = data === null || data === void 0 ? void 0 : data.code) !== null && _data$code2 !== void 0 ? _data$code2 : "",
30522
+ "code": (_data$code$trim = data === null || data === void 0 ? void 0 : (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2.trim()) !== null && _data$code$trim !== void 0 ? _data$code$trim : "",
30493
30523
  "display": (_data$long_descriptio = data === null || data === void 0 ? void 0 : data.long_description) !== null && _data$long_descriptio !== void 0 ? _data$long_descriptio : "",
30494
30524
  // "userSelected": "boolean",
30495
30525
  "id": 0,
@@ -30505,7 +30535,7 @@ var queries$1 = {
30505
30535
  }];
30506
30536
  },
30507
30537
  update_general_type: function update_general_type(edit_data) {
30508
- var _edit_data$_key, _edit_data$code, _edit_data$long_descr, _edit_data$short_desc, _edit_data$addition;
30538
+ var _edit_data$_key, _edit_data$code$trim, _edit_data$code, _edit_data$long_descr, _edit_data$short_desc, _edit_data$addition;
30509
30539
 
30510
30540
  return [{
30511
30541
  "db_name": dbName,
@@ -30518,7 +30548,7 @@ var queries$1 = {
30518
30548
  "doc": {
30519
30549
  // "system": "string",
30520
30550
  // "version": "string",
30521
- "code": (_edit_data$code = edit_data === null || edit_data === void 0 ? void 0 : edit_data.code) !== null && _edit_data$code !== void 0 ? _edit_data$code : "",
30551
+ "code": (_edit_data$code$trim = edit_data === null || edit_data === void 0 ? void 0 : (_edit_data$code = edit_data.code) === null || _edit_data$code === void 0 ? void 0 : _edit_data$code.trim()) !== null && _edit_data$code$trim !== void 0 ? _edit_data$code$trim : "",
30522
30552
  "display": (_edit_data$long_descr = edit_data === null || edit_data === void 0 ? void 0 : edit_data.long_description) !== null && _edit_data$long_descr !== void 0 ? _edit_data$long_descr : "",
30523
30553
  // "userSelected": "boolean",
30524
30554
  // "id": "number",
@@ -31256,7 +31286,7 @@ var queries = {
31256
31286
  }];
31257
31287
  },
31258
31288
  symptom_and_specialty_upsert: function symptom_and_specialty_upsert(data) {
31259
- var _data$symtom_descript, _data$id, _data$status, _data$symptom_code, _data$specialities;
31289
+ var _data$symtom_descript, _data$id, _data$status, _data$symptom_code$tr, _data$symptom_code, _data$specialities;
31260
31290
 
31261
31291
  var filter = {};
31262
31292
 
@@ -31278,7 +31308,7 @@ var queries = {
31278
31308
  SymptomsName: (_data$symtom_descript = data === null || data === void 0 ? void 0 : data.symtom_description) !== null && _data$symtom_descript !== void 0 ? _data$symtom_descript : "",
31279
31309
  id: (_data$id = data === null || data === void 0 ? void 0 : data.id) !== null && _data$id !== void 0 ? _data$id : 0,
31280
31310
  status: (_data$status = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status !== void 0 ? _data$status : true,
31281
- symptomsCode: (_data$symptom_code = data === null || data === void 0 ? void 0 : data.symptom_code) !== null && _data$symptom_code !== void 0 ? _data$symptom_code : "",
31311
+ symptomsCode: (_data$symptom_code$tr = data === null || data === void 0 ? void 0 : (_data$symptom_code = data.symptom_code) === null || _data$symptom_code === void 0 ? void 0 : _data$symptom_code.trim()) !== null && _data$symptom_code$tr !== void 0 ? _data$symptom_code$tr : "",
31282
31312
  specialty: (_data$specialities = data === null || data === void 0 ? void 0 : data.specialities) !== null && _data$specialities !== void 0 ? _data$specialities : []
31283
31313
  }
31284
31314
  })];
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.95",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",