primary_care_admin_binder 0.1.59 → 0.1.62

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 +52 -30
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -12451,7 +12451,7 @@ var vitalsMasterSectionActions = {
12451
12451
  var vitalsMasterSectionSlice$1 = vitalsMasterSectionSlice.reducer;
12452
12452
 
12453
12453
  var queries$m = {
12454
- locationlist: function locationlist(type) {
12454
+ locationlist: function locationlist(type, page, perPage) {
12455
12455
  // return {
12456
12456
  // db_name: dbName,
12457
12457
  // entity:
@@ -12469,8 +12469,8 @@ var queries$m = {
12469
12469
  "count": perPage
12470
12470
  },
12471
12471
  filter: "LocationMaster.activestatus==true",
12472
- return_fields: "merge(LocationMaster,{TotalCount:COUNT(FOR cnt IN LocationMaster RETURN cnt._key) , operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})" // return_fields: "merge(keep(LocationMaster,'locationID','_key','_id','id','activestatus','status','longdesc','shortdesc'),{locationType:(for cod in document(to_array(LocationMaster.locationType)) return merge(cod,{coding:document(cod.coding)}))})"
12473
- // return_fields: "merge(LocationMaster,{operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})"
12472
+ // return_fields: "merge(LocationMaster,{TotalCount:COUNT(FOR cnt IN LocationMaster RETURN cnt._key) , operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})"
12473
+ return_fields: "merge(LocationMaster,{locationType:(for cod in document(to_array(LocationMaster.locationType)) return merge(cod,{coding:document(cod.coding)}))},{TotalCount:count(For loc IN LocationMaster filter loc.activestatus==true return loc._id)})" // return_fields: "merge(LocationMaster,{operationalStatus:(for ops in CodeableConceptMaster filter ops._id==LocationMaster.operationalStatus return merge(ops,{coding:document(ops.coding)}))},{managingOrgEntityType:(for moe in CodeableConceptMaster filter moe._id==LocationMaster.managingOrgEntityType return merge(moe,{coding:document(moe.coding)}))}, {parentLocationID_desc:document(to_array(LocationMaster.parentLocationID_desc))},{address:document(LocationMaster.address)},{locationType:(for lt in CodeableConceptMaster filter lt._id==LocationMaster.locationType return (merge(lt,{coding:document(lt.coding)})))},{managingOrgID:document(to_array(LocationMaster.managingOrgID))},{locationRoletype:document(to_array(LocationMaster.locationRoletype))},{specialty:document(to_array(LocationMaster.specialty))},{photo:document(LocationMaster.photo)}, {pharmacy:(for ph in LocationMaster.pharmacy return merge(ph,{inventorySubStore:document(ph.inventorySubStore)}))}, {telecom:(for tel in document(LocationMaster.telecom) return merge(tel,{use:document(tel.use)},{rank:document(tel.rank)},{system:document(tel.system)}))})"
12474
12474
 
12475
12475
  };
12476
12476
  },
@@ -12831,7 +12831,8 @@ var LOCATION_READ = createAsyncThunk("locationSlice/locationlist", /*#__PURE__*/
12831
12831
  id: val.id,
12832
12832
  _id: val._id,
12833
12833
  status: val.status === "Active" ? true : false,
12834
- active_status: val.activestatus
12834
+ active_status: val.activestatus,
12835
+ totalCount: val === null || val === void 0 ? void 0 : val.TotalCount
12835
12836
  });
12836
12837
  }
12837
12838
  });
@@ -15490,7 +15491,7 @@ var queries$i = {
15490
15491
  entity_type: "{\n \"db_name\":\"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type=='ORGTYPE' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }")
15491
15492
  },
15492
15493
  appointment_type_read: function appointment_type_read(page, perPage, search) {
15493
- return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"sort\": \"document(CodeableConceptMaster.coding[0]).display\",\n \"filter\": \"CodeableConceptMaster.Type == 'APPTYPE' && (LIKE(CodeableConceptMaster.shortdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.code,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true\",\n \"limit\" : { \"offset\" : ").concat(page, ", \"count\": ").concat(perPage, "},\n \"return_fields\": \"MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.activestatus==true && cnt.Type=='APPTYPE' RETURN cnt._key) ,coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }");
15494
+ return "{\n \"db_name\": \"".concat(dbName$1, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \" CodeableConceptMaster.Type == 'APPTYPE' &&(LIKE(document(CodeableConceptMaster.coding[0]).code,'%").concat(search ? search : '', "%',true) ||LIKE(document(CodeableConceptMaster.coding[0]).shortdesc,'%").concat(search ? search : '', "%',true) || LIKE(document(CodeableConceptMaster.coding[0]).longdesc,'%").concat(search ? search : '', "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true\",\n \"limit\": {\n \"offset\": ").concat(page, ",\n \"count\": ").concat(perPage, "\n },\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)},{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='APPTYPE' filter cnt.activestatus==true RETURN cnt._key)})\"\n}");
15494
15495
  },
15495
15496
  upsert: function upsert(data) {
15496
15497
  var filter = {};
@@ -15603,13 +15604,14 @@ var APPOINTMENT_TYPE_READ = createAsyncThunk("availabilityManagementSlice/appoin
15603
15604
  case 0:
15604
15605
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
15605
15606
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
15606
- _context2.prev = 2;
15607
- _context2.next = 5;
15607
+ debugger;
15608
+ _context2.prev = 3;
15609
+ _context2.next = 6;
15608
15610
  return fetchData({
15609
15611
  body: queries$i.appointment_type_read(payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.search ? payload === null || payload === void 0 ? void 0 : payload.search : '')
15610
15612
  }, __readDocumentUrl__);
15611
15613
 
15612
- case 5:
15614
+ case 6:
15613
15615
  data = _context2.sent;
15614
15616
  arry = [];
15615
15617
  data.result.map(function (val) {
@@ -15632,19 +15634,19 @@ var APPOINTMENT_TYPE_READ = createAsyncThunk("availabilityManagementSlice/appoin
15632
15634
  data: arry
15633
15635
  }));
15634
15636
 
15635
- case 11:
15636
- _context2.prev = 11;
15637
- _context2.t0 = _context2["catch"](2);
15637
+ case 12:
15638
+ _context2.prev = 12;
15639
+ _context2.t0 = _context2["catch"](3);
15638
15640
  return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
15639
15641
  message: _context2.t0.message
15640
15642
  })));
15641
15643
 
15642
- case 14:
15644
+ case 15:
15643
15645
  case "end":
15644
15646
  return _context2.stop();
15645
15647
  }
15646
15648
  }
15647
- }, _callee2, null, [[2, 11]]);
15649
+ }, _callee2, null, [[3, 12]]);
15648
15650
  })));
15649
15651
  var CODEABLE_CONCEPT_MASTER_UPSERT = createAsyncThunk("availabilityManagementSlice/masterupsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
15650
15652
  var payload,
@@ -29093,18 +29095,39 @@ var permissionSlice$1 = permissionSlice.reducer;
29093
29095
  var permission_actions = _objectSpread2({}, permissionActions);
29094
29096
 
29095
29097
  var queries$7 = {
29096
- person_read: function person_read(data) {
29097
- return {
29098
- "db_name": dbName$1,
29099
- "entity": "Person",
29100
- "filter": "(LIKE(document(Person.name)[0].given,'%".concat(data.search ? data.search : '', "%',true) || LIKE(document(Person.telecom)[0].value,'%").concat(data.search ? data.search : '', "%',true)) && Person.activestatus==true"),
29101
- "sort": "Person.createddate",
29102
- "limit": {
29103
- "offset": data === null || data === void 0 ? void 0 : data.page,
29104
- "count": data === null || data === void 0 ? void 0 : data.perPage
29105
- },
29106
- "return_fields": "merge(Person,{TotalCount:COUNT(FOR cnt IN Person RETURN cnt._key), name:(for nam in HumanNameMaster filter nam._id in Person.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)}))},{gender:document(Person.gender)},{telecom:(for con in ContactPointMaster filter con._id in Person.telecom return merge(con,{use:document(con.use),rank:document(con.rank)}))},{photo:document(Person.photo)},{address:document(Person.address)},{identifier:(for iden in IdentifierMaster filter iden._id in Person.identifier return merge(iden,{user:document(iden.user),Type:document(iden.Type)}))},{OrgID:document(Person.OrgID)},{orgType:document(Person.orgType)})"
29107
- };
29098
+ person_read: function person_read(_ref) {
29099
+ var withoutLimit = _ref.withoutLimit,
29100
+ _ref$search = _ref.search,
29101
+ search = _ref$search === void 0 ? '' : _ref$search,
29102
+ _ref$page = _ref.page,
29103
+ page = _ref$page === void 0 ? 0 : _ref$page,
29104
+ _ref$perPage = _ref.perPage,
29105
+ perPage = _ref$perPage === void 0 ? 10 : _ref$perPage;
29106
+ var queryPayload = null;
29107
+
29108
+ if (withoutLimit) {
29109
+ queryPayload = {
29110
+ "db_name": dbName$1,
29111
+ "entity": "Person",
29112
+ "filter": "Person.activestatus==true",
29113
+ "sort": "Person.createddate",
29114
+ "return_fields": "merge(Person,{name:(for nam in HumanNameMaster filter nam._id in Person.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)}))},{gender:document(Person.gender)},{telecom:(for con in ContactPointMaster filter con._id in Person.telecom return merge(con,{use:document(con.use),rank:document(con.rank)}))},{photo:document(Person.photo)},{address:document(Person.address)},{identifier:(for iden in IdentifierMaster filter iden._id in Person.identifier return merge(iden,{user:document(iden.user),Type:document(iden.Type)}))},{OrgID:document(Person.OrgID)},{orgType:document(Person.orgType)})"
29115
+ };
29116
+ } else {
29117
+ queryPayload = {
29118
+ "db_name": dbName$1,
29119
+ "entity": "Person",
29120
+ "filter": "(LIKE(document(Person.name)[0].given,'%".concat(search !== null && search !== void 0 ? search : '', "%',true) || LIKE(document(Person.telecom)[0].value,'%").concat(search !== null && search !== void 0 ? search : '', "%',true)) && Person.activestatus==true"),
29121
+ "limit": {
29122
+ "offset": page,
29123
+ "count": perPage
29124
+ },
29125
+ "sort": "Person.createddate",
29126
+ "return_fields": "merge(Person,{TotalCount:COUNT(FOR cnt IN Person RETURN cnt._key), name:(for nam in HumanNameMaster filter nam._id in Person.name return merge(nam,{use:document(nam.use),suffix:document(nam.suffix),prefix:document(nam.prefix)}))},{gender:document(Person.gender)},{telecom:(for con in ContactPointMaster filter con._id in Person.telecom return merge(con,{use:document(con.use),rank:document(con.rank)}))},{photo:document(Person.photo)},{address:document(Person.address)},{identifier:(for iden in IdentifierMaster filter iden._id in Person.identifier return merge(iden,{user:document(iden.user),Type:document(iden.Type)}))},{OrgID:document(Person.OrgID)},{orgType:document(Person.orgType)})"
29127
+ };
29128
+ }
29129
+
29130
+ return queryPayload;
29108
29131
  },
29109
29132
  person_delete: function person_delete(data) {
29110
29133
  var filter = {};
@@ -37050,13 +37073,12 @@ var queries$2 = {
37050
37073
  return {
37051
37074
  "db_name": dbName$1,
37052
37075
  "entity": "CodeableConceptMaster",
37053
- "sort": "document(CodeableConceptMaster.coding[0]).display",
37054
- "filter": "CodeableConceptMaster.Type == '".concat(type, "' && (LIKE(CodeableConceptMaster.shortdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.longdesc,'%").concat(search, "%',true) || LIKE(CodeableConceptMaster.code,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true"),
37076
+ "filter": "CodeableConceptMaster.Type == '".concat(type, "' &&(LIKE(document(CodeableConceptMaster.coding[0]).code,'%").concat(search, "%',true) ||LIKE(document(CodeableConceptMaster.coding[0]).shortdesc,'%").concat(search, "%',true) || LIKE(document(CodeableConceptMaster.coding[0]).longdesc,'%").concat(search, "%',true)) && CodeableConceptMaster.status == true && CodeableConceptMaster.activestatus == true"),
37055
37077
  "limit": {
37056
- "offset": page,
37057
- "count": perPage
37078
+ "offset": "".concat(page),
37079
+ "count": "".concat(perPage)
37058
37080
  },
37059
- "return_fields": "MERGE(CodeableConceptMaster,{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='".concat(type, "' filter cnt.activestatus==true RETURN cnt._key), coding:document(CodeableConceptMaster.coding)})")
37081
+ "return_fields": "MERGE(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)},{TotalCount:COUNT(FOR cnt IN CodeableConceptMaster filter cnt.Type=='".concat(type, "' filter cnt.activestatus==true RETURN cnt._key)})")
37060
37082
  };
37061
37083
  },
37062
37084
  add_new_general_type: function add_new_general_type(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.59",
3
+ "version": "0.1.62",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",