primary_care_admin_binder 0.1.46 → 0.1.50

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 +73 -34
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -8264,8 +8264,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8264
8264
 
8265
8265
  if (data.identification && data.identification.length > 0) {
8266
8266
  data.identification.map(function (val) {
8267
+ var _val$_key;
8268
+
8267
8269
  var data = {
8268
8270
  // "_id": "string",
8271
+ "_key": (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : "",
8269
8272
  "user": val.id_type.value ? val.id_type.value : "",
8270
8273
  "system": "",
8271
8274
  "value": val.id_number ? val.id_number : "",
@@ -8289,8 +8292,11 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8289
8292
 
8290
8293
  if (data.names && data.names.length > 0) {
8291
8294
  data.names.map(function (val) {
8295
+ var _val$_key2;
8296
+
8292
8297
  var nameData = {
8293
8298
  // "_id": "string",
8299
+ "_key": (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : "",
8294
8300
  "use": val.use ? val.use.value : "",
8295
8301
  "text": val.first_name ? val.first_name : "",
8296
8302
  "family": val.last_name ? val.last_name : "",
@@ -8346,6 +8352,8 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8346
8352
 
8347
8353
  if (data.practitionerbyrole && data.practitionerbyrole.length > 0) {
8348
8354
  data.practitionerbyrole.map(function (val) {
8355
+ var _val$speciality, _val$speciality2, _val$select_entity, _val$select_entity2, _val$entity_name, _val$entity_name2, _val$entity_name3, _val$entity_name4, _val$select_location, _val$select_location2;
8356
+
8349
8357
  var key = {};
8350
8358
  var roleId = {};
8351
8359
 
@@ -8369,14 +8377,14 @@ var generateJSON$2 = function generateJSON(data, _key, person_id) {
8369
8377
  end: val.end_date ? getUtcTime(moment(val.end_date)) : null // "id": "number"
8370
8378
 
8371
8379
  }],
8372
- SpecialtyID: val.speciality ? val.speciality.value : "",
8373
- EntityType: val.select_entity ? val.select_entity._id : "",
8374
- OrgID: val.entity_name ? "".concat(val.entity_name.value) : "",
8375
- EntityName: val.entity_name ? "".concat(val.entity_name.value) : "",
8376
- locationID: val.select_location ? val.select_location.value : "",
8377
- primary_specialty: val.primary_specialty ? val.primary_specialty : false,
8380
+ SpecialtyID: val !== null && val !== void 0 && (_val$speciality = val.speciality) !== null && _val$speciality !== void 0 && _val$speciality.value ? val === null || val === void 0 ? void 0 : (_val$speciality2 = val.speciality) === null || _val$speciality2 === void 0 ? void 0 : _val$speciality2.value : "",
8381
+ EntityType: val !== null && val !== void 0 && (_val$select_entity = val.select_entity) !== null && _val$select_entity !== void 0 && _val$select_entity._id ? val === null || val === void 0 ? void 0 : (_val$select_entity2 = val.select_entity) === null || _val$select_entity2 === void 0 ? void 0 : _val$select_entity2._id : "",
8382
+ OrgID: val !== null && val !== void 0 && (_val$entity_name = val.entity_name) !== null && _val$entity_name !== void 0 && _val$entity_name.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name2 = val.entity_name) === null || _val$entity_name2 === void 0 ? void 0 : _val$entity_name2.value) : "",
8383
+ EntityName: val !== null && val !== void 0 && (_val$entity_name3 = val.entity_name) !== null && _val$entity_name3 !== void 0 && _val$entity_name3.value ? "".concat(val === null || val === void 0 ? void 0 : (_val$entity_name4 = val.entity_name) === null || _val$entity_name4 === void 0 ? void 0 : _val$entity_name4.value) : "",
8384
+ locationID: val !== null && val !== void 0 && (_val$select_location = val.select_location) !== null && _val$select_location !== void 0 && _val$select_location.value ? val === null || val === void 0 ? void 0 : (_val$select_location2 = val.select_location) === null || _val$select_location2 === void 0 ? void 0 : _val$select_location2.value : "",
8385
+ primary_specialty: val !== null && val !== void 0 && val.primary_specialty ? val === null || val === void 0 ? void 0 : val.primary_specialty : false,
8378
8386
  telecom: contactList(val.contact),
8379
- files: val.doc ? val.doc : []
8387
+ files: val !== null && val !== void 0 && val.doc ? val === null || val === void 0 ? void 0 : val.doc : []
8380
8388
  }, roleId), key);
8381
8389
 
8382
8390
  practitioner_list.push(practitionerData);
@@ -8941,7 +8949,7 @@ var masterQuery$7 = {
8941
8949
  "priority": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRIORITY'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
8942
8950
  "address_type": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ADDRESSTYPE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
8943
8951
  "role": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\":\"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='PRACTROLE' && CodeableConceptMaster.status == true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
8944
- "location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && LocationMaster.status=='active'\",\n \"return_fields\": \"LocationMaster\"\n }"),
8952
+ "location": "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"LocationMaster\",\n \"sort\":\"LocationMaster.shortdesc\",\n \"filter\": \"LocationMaster.activestatus==true && lower(LocationMaster.status)=='active'\", \n \"return_fields\": \"LocationMaster\"\n }"),
8945
8953
  // "city": `{
8946
8954
  // "db_name": "${dbName}",
8947
8955
  // "entity": "SMGeographicMaster",
@@ -9159,7 +9167,7 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
9159
9167
 
9160
9168
  if (data.identifier && ((_data$identifier = data.identifier) === null || _data$identifier === void 0 ? void 0 : _data$identifier.length) > 0) {
9161
9169
  data.identifier.map(function (val) {
9162
- var _val$user;
9170
+ var _val$user, _val$_key;
9163
9171
 
9164
9172
  var identifierData = {
9165
9173
  "id_type": ((_val$user = val.user) === null || _val$user === void 0 ? void 0 : _val$user.length) > 0 && masters.id_type.filter(function (idlabel) {
@@ -9169,7 +9177,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
9169
9177
  })[0] : {},
9170
9178
  "id_number": val.value,
9171
9179
  "expiry_date": val.period[0].end ? utcTOLocal(val.period[0].end, "YYYY-MM-DD") : null,
9172
- "doc": val.files
9180
+ "doc": val.files,
9181
+ _key: (_val$_key = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key !== void 0 ? _val$_key : ""
9173
9182
  };
9174
9183
  identifier.push(identifierData);
9175
9184
  });
@@ -9179,6 +9188,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
9179
9188
 
9180
9189
  if (data.name && ((_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.length) > 0) {
9181
9190
  data.name.map(function (val) {
9191
+ var _val$_key2;
9192
+
9182
9193
  var namedatas = {
9183
9194
  use: val.use ? masters.use.filter(function (idlabel) {
9184
9195
  return idlabel.value === val.use;
@@ -9191,7 +9202,8 @@ var generateReadJSON$5 = function generateReadJSON(data, masters, countryData, s
9191
9202
  last_name: val.family,
9192
9203
  suffix: val.suffix ? masters.suffix.filter(function (idlabel) {
9193
9204
  return idlabel.value === val.suffix;
9194
- })[0] : {}
9205
+ })[0] : {},
9206
+ _key: (_val$_key2 = val === null || val === void 0 ? void 0 : val._key) !== null && _val$_key2 !== void 0 ? _val$_key2 : ""
9195
9207
  };
9196
9208
  nameslist.push(namedatas);
9197
9209
  });
@@ -12550,19 +12562,21 @@ var generateJSON = function generateJSON(data, _key) {
12550
12562
 
12551
12563
  if (data.working_days_yes_no === "Yes") {
12552
12564
  workingDayArr = [{
12553
- allday: true,
12554
- year: 0,
12555
- day: "",
12556
- daysOfWeek: []
12565
+ effFrmDate: 0,
12566
+ effToDate: 0,
12567
+ workDaysOfWeek: []
12557
12568
  }];
12558
12569
  } else if (data.working_days_yes_no === "No") {
12559
12570
  data.workingday_daySlots.map(function (val, i) {
12560
12571
  var day_obj = {
12561
- allday: false,
12562
- //year: data.workingday_year,
12563
- year: parseInt(data.workingday_year),
12564
- day: val.day,
12565
- daysOfWeek: workday_timeslot(val.timeSlots)
12572
+ effFrmDate: 0,
12573
+ effToDate: 0,
12574
+ workDaysOfWeek: workday_timeslot(val.timeSlots) // allday: false,
12575
+ // //year: data.workingday_year,
12576
+ // year: parseInt(data.workingday_year),
12577
+ // day: val.day,
12578
+ // daysOfWeek: workday_timeslot(val.timeSlots),
12579
+
12566
12580
  };
12567
12581
  workingDayArr.push(day_obj);
12568
12582
  });
@@ -12660,11 +12674,7 @@ var generateJSON = function generateJSON(data, _key) {
12660
12674
  objectid: data.photo[0].objectid
12661
12675
  }],
12662
12676
  pharmacy: [{
12663
- storecode: data.storeCode,
12664
- returnAllowed: data.returnAllowed,
12665
- maxdaysforRtn: parseInt(data.maxDaysForReturn),
12666
- exRxAllowed: data.externalRxAllowed,
12667
- otcAllowed: data.otcAllowed
12677
+ maxdaysforRtn: parseInt(data.maxDaysForReturn)
12668
12678
  }]
12669
12679
  }
12670
12680
  })];
@@ -22708,7 +22718,7 @@ var queries$c = {
22708
22718
  db_name: dbName$1,
22709
22719
  entity: "SMGeographicMaster",
22710
22720
  sort: "SMGeographicMaster.geogLevelName",
22711
- filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.activestatus == true",
22721
+ filter: "Lower(DOCUMENT(SMGeographicMaster.geogLevelType).display)=='country' && SMGeographicMaster.activestatus == true && SMGeographicMaster.active == true",
22712
22722
  return_fields: "{_id:SMGeographicMaster._id,id:SMGeographicMaster.id,geogLevelName:SMGeographicMaster.geogLevelName,parentGeogLevelType:SMGeographicMaster.parentGeogLevelType,parentGeogLevelCode:SMGeographicMaster.parentGeogLevelCode,GeoLocationISDCode:SMGeographicMaster.GeoLocationISDCode}"
22713
22723
  };
22714
22724
  },
@@ -36718,12 +36728,19 @@ var symptomAndSpecialtySlice$1 = symptomAndSpecialtySlice.reducer;
36718
36728
 
36719
36729
  var queries = {
36720
36730
  encounterType: function encounterType(type) {
36731
+ // return {
36732
+ // "db_name": dbName,
36733
+ // "entity": "AMPatientClass",
36734
+ // "filter": "AMPatientClass.activestatus==true",
36735
+ // "return_fields": "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
36736
+ // "sort": "document(AMPatientClass.encTypeDesc).display"
36737
+ // }
36721
36738
  return {
36722
36739
  "db_name": dbName$1,
36723
36740
  "entity": "AMPatientClass",
36724
36741
  "filter": "AMPatientClass.activestatus==true",
36725
- "return_fields": "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
36726
- "sort": "document(AMPatientClass.encTypeDesc).display"
36742
+ "return_fields": "merge(AMPatientClass,{encClsByTypes:(for encClsByTypes in (AMPatientClass.encClsByTypes) return merge(encClsByTypes,{encClsType:document(encClsByTypes.encClsType)}))},{encType:document(AMPatientClass.encType)})",
36743
+ "sort": "document(AMPatientClass.encType).display "
36727
36744
  };
36728
36745
  },
36729
36746
  //STATUS CHANGE
@@ -36769,13 +36786,14 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
36769
36786
  arry = [];
36770
36787
  data.result.map(function (val, i) {
36771
36788
  if (val !== null && val !== void 0 && val._id) {
36772
- var _val$encTypeDesc, _val$encType;
36789
+ var _val$id, _val$_id, _val$encType$display, _val$encType, _val$encType$code, _val$encType2;
36773
36790
 
36774
36791
  arry.push(_objectSpread2({
36775
- id: val === null || val === void 0 ? void 0 : val.id,
36776
- description: (_val$encTypeDesc = val === null || val === void 0 ? void 0 : val.encTypeDesc) !== null && _val$encTypeDesc !== void 0 ? _val$encTypeDesc : "",
36777
- code: (_val$encType = val === null || val === void 0 ? void 0 : val.encType) !== null && _val$encType !== void 0 ? _val$encType : "",
36778
- encounter_class: val !== null && val !== void 0 && val.encClsDesc ? val === null || val === void 0 ? void 0 : val.encClsDesc : "" + " ( " + (val === null || val === void 0 ? void 0 : val.encClsType) ? val === null || val === void 0 ? void 0 : val.encClsType : "" + " )"
36792
+ id: (_val$id = val === null || val === void 0 ? void 0 : val.id) !== null && _val$id !== void 0 ? _val$id : "",
36793
+ _id: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : "",
36794
+ description: (_val$encType$display = val === null || val === void 0 ? void 0 : (_val$encType = val.encType) === null || _val$encType === void 0 ? void 0 : _val$encType.display) !== null && _val$encType$display !== void 0 ? _val$encType$display : "",
36795
+ code: (_val$encType$code = val === null || val === void 0 ? void 0 : (_val$encType2 = val.encType) === null || _val$encType2 === void 0 ? void 0 : _val$encType2.code) !== null && _val$encType$code !== void 0 ? _val$encType$code : "",
36796
+ encounter_class: constructEncounterClassData(val === null || val === void 0 ? void 0 : val.encClsByTypes).toString()
36779
36797
  }, val));
36780
36798
  }
36781
36799
  });
@@ -36796,7 +36814,28 @@ var ENCOUNTER_TYPE_READ = createAsyncThunk("encouterTypeSlice/encouterTypeRead",
36796
36814
  }
36797
36815
  }
36798
36816
  }, _callee, null, [[2, 12]]);
36799
- }))); //ENCOUNTER_TYPE_STATUS_CHANGE
36817
+ })));
36818
+
36819
+ var constructEncounterClassData = function constructEncounterClassData(data) {
36820
+ var arr = [];
36821
+
36822
+ if (data.length > 0 && Array.isArray(data)) {
36823
+ data.map(function (val) {
36824
+ var _val$encClsType, _val$encClsType2;
36825
+
36826
+ if (val !== null && val !== void 0 && (_val$encClsType = val.encClsType) !== null && _val$encClsType !== void 0 && _val$encClsType.display && val !== null && val !== void 0 && (_val$encClsType2 = val.encClsType) !== null && _val$encClsType2 !== void 0 && _val$encClsType2.code) {
36827
+ var _val$encClsType3, _val$encClsType4, _val$encClsType5, _val$encClsType6;
36828
+
36829
+ var dis = val !== null && val !== void 0 && (_val$encClsType3 = val.encClsType) !== null && _val$encClsType3 !== void 0 && _val$encClsType3.display ? val === null || val === void 0 ? void 0 : (_val$encClsType4 = val.encClsType) === null || _val$encClsType4 === void 0 ? void 0 : _val$encClsType4.display : "";
36830
+ var co = val !== null && val !== void 0 && (_val$encClsType5 = val.encClsType) !== null && _val$encClsType5 !== void 0 && _val$encClsType5.code ? val === null || val === void 0 ? void 0 : (_val$encClsType6 = val.encClsType) === null || _val$encClsType6 === void 0 ? void 0 : _val$encClsType6.code : "" + " )";
36831
+ arr.push(dis + " (" + co + ")");
36832
+ }
36833
+ });
36834
+ }
36835
+
36836
+ return arr;
36837
+ }; //ENCOUNTER_TYPE_STATUS_CHANGE
36838
+
36800
36839
 
36801
36840
  var ENCOUNTER_TYPE_STATUS_CHANGE = createAsyncThunk("encouterTypeSlice/encouterStatusChange", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
36802
36841
  var payload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.46",
3
+ "version": "0.1.50",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",