primary_care_admin_binder 0.1.154 → 0.1.155

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 -47
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -11164,7 +11164,10 @@ var query_ids = {
11164
11164
  "resOrderCatalogVitalCode": "493389da-6789-4ed0-89e4-a2d546025f1e",
11165
11165
  "gmLoadQuery": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e",
11166
11166
  "signInApiSlice/getpermissiondata": "1a91eea3-8c88-4f78-87c1-fcd6af54e81f",
11167
- "getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697"
11167
+ "getAllergyList": "777aa602-1905-48d3-b1cd-db1cca7d7697",
11168
+ "getCodingmasterByType": "b283129b-9841-419b-bdfc-de5105ebbad7",
11169
+ "symptom_and_specialty_single_read": "b4157ebd-a966-4d06-8c02-7a9cf8e7f1f5",
11170
+ "symptom_and_specialty_read": "78c9fdd7-fd12-4d36-9729-88ea3174867c"
11168
11171
  };
11169
11172
 
11170
11173
  var query$9 = {
@@ -43016,7 +43019,7 @@ var queries$1 = {
43016
43019
  },
43017
43020
  is_metadata: true,
43018
43021
  metadataId: metaDataId$1,
43019
- metadata_dbname: metaDatadbName,
43022
+ metadata_dbname: metaDatadbName$1,
43020
43023
  doc: {
43021
43024
  status: data.status
43022
43025
  }
@@ -43031,14 +43034,14 @@ var queries$1 = {
43031
43034
  },
43032
43035
  is_metadata: true,
43033
43036
  metadataId: metaDataId$1,
43034
- metadata_dbname: metaDatadbName,
43037
+ metadata_dbname: metaDatadbName$1,
43035
43038
  doc: {
43036
43039
  status: data.status
43037
43040
  }
43038
43041
  }];
43039
43042
  },
43040
43043
  symptom_and_specialty_upsert: function symptom_and_specialty_upsert(data) {
43041
- var _data$symptomsname, _data$symptomscode$tr, _data$symptomscode, _data$speciality, _data$id, _data$status, _data$designation, _data$property, _data$description, _data$imageurl;
43044
+ var _data$symptomsname, _data$symptomscode$tr, _data$symptomscode, _data$speciality, _data$id, _data$status, _data$designation, _data$property, _data$questionnaire, _data$description, _data$imageurl;
43042
43045
  var filter = {};
43043
43046
  if (data._key) {
43044
43047
  filter = {
@@ -43063,50 +43066,52 @@ var queries$1 = {
43063
43066
  }, filter), {}, {
43064
43067
  is_metadata: true,
43065
43068
  metadataId: metaDataId$1,
43066
- metadata_dbname: metaDatadbName,
43069
+ metadata_dbname: metaDatadbName$1,
43067
43070
  doc: {
43068
- SymptomsName: (_data$symptomsname = data === null || data === void 0 ? void 0 : data.symptomsname) !== null && _data$symptomsname !== void 0 ? _data$symptomsname : "",
43071
+ symptomsName: (_data$symptomsname = data === null || data === void 0 ? void 0 : data.symptomsname) !== null && _data$symptomsname !== void 0 ? _data$symptomsname : "",
43069
43072
  symptomsCode: (_data$symptomscode$tr = data === null || data === void 0 || (_data$symptomscode = data.symptomscode) === null || _data$symptomscode === void 0 ? void 0 : _data$symptomscode.trim()) !== null && _data$symptomscode$tr !== void 0 ? _data$symptomscode$tr : "",
43070
- specialty: (_data$speciality = data === null || data === void 0 ? void 0 : data.speciality) !== null && _data$speciality !== void 0 ? _data$speciality : [],
43073
+ specialty: (_data$speciality = data === null || data === void 0 ? void 0 : data.speciality) !== null && _data$speciality !== void 0 ? _data$speciality : [''],
43071
43074
  id: (_data$id = data === null || data === void 0 ? void 0 : data.id) !== null && _data$id !== void 0 ? _data$id : 0,
43072
43075
  status: (_data$status = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status !== void 0 ? _data$status : true,
43073
43076
  designation: (_data$designation = data === null || data === void 0 ? void 0 : data.designation) !== null && _data$designation !== void 0 ? _data$designation : "",
43074
43077
  property: (_data$property = data === null || data === void 0 ? void 0 : data.property) !== null && _data$property !== void 0 ? _data$property : "",
43075
- questionnaire: parseJson(data === null || data === void 0 ? void 0 : data.questionnaire),
43078
+ questionnaire: (_data$questionnaire = data === null || data === void 0 ? void 0 : data.questionnaire) !== null && _data$questionnaire !== void 0 ? _data$questionnaire : [],
43076
43079
  rule: parseJson(data === null || data === void 0 ? void 0 : data.rule),
43077
43080
  description: (_data$description = data === null || data === void 0 ? void 0 : data.description) !== null && _data$description !== void 0 ? _data$description : "",
43078
- imageurl: (_data$imageurl = data === null || data === void 0 ? void 0 : data.imageurl) !== null && _data$imageurl !== void 0 ? _data$imageurl : ""
43081
+ imageUrl: (_data$imageurl = data === null || data === void 0 ? void 0 : data.imageurl) !== null && _data$imageurl !== void 0 ? _data$imageurl : ""
43079
43082
  }
43080
43083
  })];
43081
43084
  },
43082
- symptom_and_specialty_read: function symptom_and_specialty_read(search, page, perPage, sort, direction) {
43085
+ symptom_and_specialty_read: function symptom_and_specialty_read(search, page, perPage) {
43083
43086
  return {
43084
43087
  db_name: dbName,
43085
- entity: "SymptomsMapping",
43086
- filter: "SymptomsMapping.activestatus==true ".concat(search ? "&& (UPPER(SymptomsMapping.SymptomsName) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(SymptomsMapping.symptomsCode) LIKE '%").concat(search.toUpperCase(), "%')") : ""),
43087
- limit: {
43088
+ queryid: query_ids.symptom_and_specialty_read,
43089
+ filter: {
43090
+ search: "".concat(search),
43088
43091
  offset: page,
43089
43092
  count: perPage
43090
- },
43091
- return_fields: "merge(SymptomsMapping,{TotalCount:COUNT(".concat(search ? "FOR cnt IN SymptomsMapping filter UPPER(cnt.SymptomsName) LIKE '%".concat(search.toUpperCase(), "%' || UPPER(cnt.symptomsCode) LIKE '%").concat(search.toUpperCase(), "%' RETURN cnt._key") : "FOR cnt IN SymptomsMapping RETURN cnt._key", "), specialty:(FOR cod IN CodeableConceptMaster filter cod._id in SymptomsMapping.specialty RETURN merge(cod,{coding:document(cod.coding)}))})"),
43092
- sort: "".concat(sort === "Symptom Code" ? "SymptomsMapping.symptomsCode ".concat(direction) : "SymptomsMapping.SymptomsName ".concat(direction))
43093
+ }
43093
43094
  };
43094
43095
  },
43095
43096
  symptom_and_specialty_single_read: function symptom_and_specialty_single_read(_key) {
43096
43097
  return {
43097
43098
  db_name: dbName,
43098
- entity: "SymptomsMapping",
43099
- filter: "SymptomsMapping._key=='".concat(_key, "' && SymptomsMapping.activestatus==true"),
43100
- return_fields: "merge(SymptomsMapping,{specialty:(FOR cod IN CodeableConceptMaster filter cod._id in SymptomsMapping.specialty RETURN merge(cod,{coding:document(cod.coding)}))})"
43099
+ queryid: query_ids.symptom_and_specialty_single_read,
43100
+ filter: {
43101
+ _key: _key
43102
+ }
43101
43103
  };
43102
43104
  },
43103
43105
  specialtyMaster: function specialtyMaster() {
43104
43106
  return {
43105
43107
  db_name: dbName,
43106
- entity: "CodeableConceptMaster",
43107
- filter: "CodeableConceptMaster.Type=='SPECIALTY' && CodeableConceptMaster.activestatus==true",
43108
- return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})",
43109
- sort: "document(CodeableConceptMaster.coding)[*].display"
43108
+ queryid: query_ids.getCodingmasterByType,
43109
+ filter: {
43110
+ type: "SPECIALTY",
43111
+ code: "",
43112
+ status: true,
43113
+ sortField: "display"
43114
+ }
43110
43115
  };
43111
43116
  },
43112
43117
  upsert: function upsert(data) {
@@ -43129,7 +43134,7 @@ var queries$1 = {
43129
43134
  entity: "CodeableConceptMaster",
43130
43135
  is_metadata: true,
43131
43136
  mmetadataId: metaDataId$1,
43132
- metadata_dbname: metaDatadbName
43137
+ metadata_dbname: metaDatadbName$1
43133
43138
  }, filter), {}, {
43134
43139
  doc: {
43135
43140
  text: "",
@@ -43195,8 +43200,8 @@ var constructReadJSON = function constructReadJSON(data) {
43195
43200
  if (!Array.isArray(data)) return "";
43196
43201
  var arry = [];
43197
43202
  data.map(function (val) {
43198
- var _val$coding$0$display, _val$coding;
43199
- arry.push((_val$coding$0$display = (_val$coding = val.coding) === null || _val$coding === void 0 || (_val$coding = _val$coding[0]) === null || _val$coding === void 0 ? void 0 : _val$coding.display) !== null && _val$coding$0$display !== void 0 ? _val$coding$0$display : "");
43203
+ var _val$display;
43204
+ arry.push((_val$display = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display !== void 0 ? _val$display : "");
43200
43205
  });
43201
43206
  return arry.join(", ");
43202
43207
  };
@@ -43206,10 +43211,10 @@ var constructSingleReadJSON = function constructSingleReadJSON(data) {
43206
43211
  if (!Array.isArray(data)) return [];
43207
43212
  var arry = [];
43208
43213
  data.map(function (val) {
43209
- var _val$_id, _val$coding$0$display2, _val$coding2;
43214
+ var _val$_id, _val$display2;
43210
43215
  arry.push({
43211
- value: (_val$_id = val._id) !== null && _val$_id !== void 0 ? _val$_id : 0,
43212
- label: (_val$coding$0$display2 = (_val$coding2 = val.coding) === null || _val$coding2 === void 0 || (_val$coding2 = _val$coding2[0]) === null || _val$coding2 === void 0 ? void 0 : _val$coding2.display) !== null && _val$coding$0$display2 !== void 0 ? _val$coding$0$display2 : ""
43216
+ value: (_val$_id = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id !== void 0 ? _val$_id : 0,
43217
+ label: (_val$display2 = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display2 !== void 0 ? _val$display2 : ""
43213
43218
  });
43214
43219
  });
43215
43220
  return arry;
@@ -43229,30 +43234,29 @@ var SYMPTOM_AND_SPECIALTY_READ = createAsyncThunk("symptomAndSpecialtySlice/symp
43229
43234
  payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
43230
43235
  _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
43231
43236
  _context2.p = 1;
43232
- readqueries = queries$1.symptom_and_specialty_read(payload === null || payload === void 0 ? void 0 : payload.search, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage, payload !== null && payload !== void 0 && payload.sort ? payload === null || payload === void 0 ? void 0 : payload.sort : "", payload !== null && payload !== void 0 && payload.direction ? payload === null || payload === void 0 ? void 0 : payload.direction : "");
43237
+ readqueries = queries$1.symptom_and_specialty_read(payload === null || payload === void 0 ? void 0 : payload.search, payload === null || payload === void 0 ? void 0 : payload.page, payload === null || payload === void 0 ? void 0 : payload.perPage);
43233
43238
  _context2.n = 2;
43234
43239
  return fetchData({
43235
43240
  body: JSON.stringify(readqueries)
43236
- }, __readDocumentUrl__);
43241
+ }, __baseUrl__$1);
43237
43242
  case 2:
43238
43243
  data = _context2.v;
43239
43244
  arry = [];
43240
- data.result.map(function (val) {
43245
+ data.map(function (val) {
43241
43246
  if (val._key) {
43242
- var _val$designation, _val$property, _val$description, _val$imageurl;
43247
+ var _val$designation, _val$property, _val$description, _val$imageUrl;
43243
43248
  arry.push({
43244
43249
  total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
43245
43250
  id: val.id ? val.id : 0,
43246
43251
  _key: val._key ? val._key : "",
43247
43252
  status: val.status ? val.status : false,
43248
- // Correct mapping: SymptomsName is the name, symptomsCode is the code
43249
- symptomsname: val.SymptomsName ? val.SymptomsName : "",
43253
+ symptomsname: val.symptomsName ? val.symptomsName : val.SymptomsName,
43250
43254
  symptomscode: val.symptomsCode ? val.symptomsCode : "",
43251
43255
  speciality: constructReadJSON(val.specialty),
43252
43256
  designation: (_val$designation = val.designation) !== null && _val$designation !== void 0 ? _val$designation : "",
43253
43257
  property: (_val$property = val.property) !== null && _val$property !== void 0 ? _val$property : "",
43254
43258
  description: (_val$description = val.description) !== null && _val$description !== void 0 ? _val$description : "",
43255
- imageurl: (_val$imageurl = val.imageurl) !== null && _val$imageurl !== void 0 ? _val$imageurl : ""
43259
+ imageurl: (_val$imageUrl = val.imageUrl) !== null && _val$imageUrl !== void 0 ? _val$imageUrl : ""
43256
43260
  });
43257
43261
  }
43258
43262
  });
@@ -43283,23 +43287,23 @@ var SYMPTOM_AND_SPECIALTY_SINGLE_READ = createAsyncThunk("symptomAndSpecialtySli
43283
43287
  payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
43284
43288
  _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
43285
43289
  _context3.p = 1;
43286
- readqueries = queries$1.symptom_and_specialty_single_read(payload.kay);
43290
+ readqueries = queries$1.symptom_and_specialty_single_read(payload === null || payload === void 0 ? void 0 : payload._key);
43287
43291
  _context3.n = 2;
43288
43292
  return fetchData({
43289
43293
  body: JSON.stringify(readqueries)
43290
- }, __readDocumentUrl__);
43294
+ }, __baseUrl__$1);
43291
43295
  case 2:
43292
43296
  data = _context3.v;
43293
43297
  arry = [];
43294
- data.result.map(function (val) {
43298
+ data.map(function (val) {
43295
43299
  if (val._key) {
43296
- var _val$designation2, _val$property2, _val$questionnaire, _val$rule, _val$description2, _val$imageurl2;
43300
+ var _val$designation2, _val$property2, _val$questionnaire, _val$rule, _val$description2, _val$imageUrl2;
43297
43301
  arry.push({
43298
43302
  id: val.id ? val.id : 0,
43303
+ _id: val._id ? val._id : "",
43299
43304
  _key: val._key ? val._key : "",
43300
43305
  status: val.status ? val.status : false,
43301
- symptomsdescription: val.symptomsdescription ? val.symptomsdescription : "",
43302
- symptomsname: val.SymptomsName ? val.SymptomsName : "",
43306
+ symptomsname: val.symptomsName ? val.symptomsName : "",
43303
43307
  symptomscode: val.symptomsCode ? val.symptomsCode : "",
43304
43308
  speciality: constructSingleReadJSON(val.specialty),
43305
43309
  designation: (_val$designation2 = val.designation) !== null && _val$designation2 !== void 0 ? _val$designation2 : "",
@@ -43307,7 +43311,7 @@ var SYMPTOM_AND_SPECIALTY_SINGLE_READ = createAsyncThunk("symptomAndSpecialtySli
43307
43311
  questionnaire: _typeof(val.questionnaire) === "object" && val.questionnaire !== null ? JSON.stringify(val.questionnaire, null, 2) : (_val$questionnaire = val.questionnaire) !== null && _val$questionnaire !== void 0 ? _val$questionnaire : "",
43308
43312
  rule: _typeof(val.rule) === "object" && val.rule !== null ? JSON.stringify(val.rule, null, 2) : (_val$rule = val.rule) !== null && _val$rule !== void 0 ? _val$rule : "",
43309
43313
  description: (_val$description2 = val.description) !== null && _val$description2 !== void 0 ? _val$description2 : "",
43310
- imageurl: (_val$imageurl2 = val.imageurl) !== null && _val$imageurl2 !== void 0 ? _val$imageurl2 : ""
43314
+ imageurl: (_val$imageUrl2 = val.imageUrl) !== null && _val$imageUrl2 !== void 0 ? _val$imageUrl2 : ""
43311
43315
  });
43312
43316
  }
43313
43317
  });
@@ -43371,15 +43375,16 @@ var SYMPTOM_AND_SPECIALTY_MASTERS = createAsyncThunk("symptomAndSpecialtySlice/s
43371
43375
  _context5.n = 2;
43372
43376
  return fetchData({
43373
43377
  body: JSON.stringify(queries$1.specialtyMaster())
43374
- }, __readDocumentUrl__);
43378
+ }, __baseUrl__$1);
43375
43379
  case 2:
43376
43380
  data_arr = _context5.v;
43377
43381
  arry = [];
43378
43382
  _context5.n = 3;
43379
- return data_arr.result.map(function (val) {
43383
+ return data_arr.map(function (val) {
43384
+ var _val$display3, _val$_id2;
43380
43385
  arry.push({
43381
- label: val.coding[0].display,
43382
- value: val._id
43386
+ label: (_val$display3 = val === null || val === void 0 ? void 0 : val.display) !== null && _val$display3 !== void 0 ? _val$display3 : "",
43387
+ value: (_val$_id2 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id2 !== void 0 ? _val$_id2 : ""
43383
43388
  });
43384
43389
  });
43385
43390
  case 3:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.154",
3
+ "version": "0.1.155",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",