primarycare-binder 1.1.63 → 1.1.66
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.
- package/dist/index.cjs.js +42 -27
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15080,6 +15080,8 @@ var MASTER_SEARCH = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*
|
|
|
15080
15080
|
_yield$Promise$all2$,
|
|
15081
15081
|
encounterData,
|
|
15082
15082
|
returnData,
|
|
15083
|
+
_encounterData$result,
|
|
15084
|
+
encounterClass,
|
|
15083
15085
|
encounterRes,
|
|
15084
15086
|
_args9 = arguments;
|
|
15085
15087
|
|
|
@@ -15149,15 +15151,23 @@ var MASTER_SEARCH = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*
|
|
|
15149
15151
|
}
|
|
15150
15152
|
|
|
15151
15153
|
if (fetchEncounter) {
|
|
15152
|
-
|
|
15154
|
+
encounterClass = {};
|
|
15155
|
+
encounterRes = encounterData === null || encounterData === void 0 ? void 0 : (_encounterData$result = encounterData.result) === null || _encounterData$result === void 0 ? void 0 : _encounterData$result.map(function (enc) {
|
|
15156
|
+
encounterClass[enc._id] = enc === null || enc === void 0 ? void 0 : enc.encClsByTypes.map(function (cls) {
|
|
15157
|
+
return {
|
|
15158
|
+
_id: cls === null || cls === void 0 ? void 0 : cls.encClsType,
|
|
15159
|
+
value: cls === null || cls === void 0 ? void 0 : cls.shortDesc
|
|
15160
|
+
};
|
|
15161
|
+
});
|
|
15153
15162
|
return {
|
|
15154
15163
|
data: enc,
|
|
15155
15164
|
coding: {
|
|
15156
15165
|
_id: enc._id,
|
|
15157
|
-
display: enc.
|
|
15166
|
+
display: enc.shortDesc
|
|
15158
15167
|
}
|
|
15159
15168
|
};
|
|
15160
15169
|
});
|
|
15170
|
+
returnData['ENCOUNTERCLASS'] = encounterClass;
|
|
15161
15171
|
returnData['ENCOUNTERTYPE'] = encounterRes;
|
|
15162
15172
|
}
|
|
15163
15173
|
|
|
@@ -25268,7 +25278,6 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
|
|
|
25268
25278
|
defaultValue,
|
|
25269
25279
|
months,
|
|
25270
25280
|
orgid,
|
|
25271
|
-
stateValues,
|
|
25272
25281
|
stateDatakey,
|
|
25273
25282
|
orgData,
|
|
25274
25283
|
component,
|
|
@@ -25283,20 +25292,23 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
|
|
|
25283
25292
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
25284
25293
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
25285
25294
|
_context4.prev = 2;
|
|
25286
|
-
defaultValue = payload.defaultValue, months = payload.months, orgid = payload.orgid;
|
|
25287
|
-
|
|
25288
|
-
stateDatakey = [];
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25295
|
+
defaultValue = payload.defaultValue, months = payload.months, orgid = payload.orgid; // let stateValues = Object.keys(payload.dynamicValue);
|
|
25296
|
+
|
|
25297
|
+
stateDatakey = []; // stateValues.filter((val, i) => {
|
|
25298
|
+
// if (i % 2 === 0) {
|
|
25299
|
+
// stateDatakey.push(val);
|
|
25300
|
+
// }
|
|
25301
|
+
// });
|
|
25302
|
+
|
|
25303
|
+
stateDatakey = Object.keys(payload.dynamicValue).filter(function (e) {
|
|
25304
|
+
return /^[A-Z0-9]+$/.exec(e);
|
|
25293
25305
|
});
|
|
25294
|
-
_context4.next =
|
|
25306
|
+
_context4.next = 8;
|
|
25295
25307
|
return fetchData$3({
|
|
25296
25308
|
body: vitalsQueries.getOrganizationId(payload.orgid)
|
|
25297
25309
|
}, __readDocumentUrl__);
|
|
25298
25310
|
|
|
25299
|
-
case
|
|
25311
|
+
case 8:
|
|
25300
25312
|
orgData = _context4.sent;
|
|
25301
25313
|
component = [];
|
|
25302
25314
|
stateDatakey.map(function (val) {
|
|
@@ -25319,19 +25331,19 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
|
|
|
25319
25331
|
encounterid: payload.encounterid,
|
|
25320
25332
|
component: component
|
|
25321
25333
|
};
|
|
25322
|
-
_context4.next =
|
|
25334
|
+
_context4.next = 14;
|
|
25323
25335
|
return fetchData$3({
|
|
25324
25336
|
body: JSON.stringify(vitalsQueries.savedPayload(payloadData, payload.editId))
|
|
25325
25337
|
}, __uspsertUrl__);
|
|
25326
25338
|
|
|
25327
|
-
case
|
|
25339
|
+
case 14:
|
|
25328
25340
|
saveddata = _context4.sent;
|
|
25329
25341
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
25330
25342
|
data: saveddata
|
|
25331
25343
|
}));
|
|
25332
25344
|
|
|
25333
|
-
case
|
|
25334
|
-
_context4.prev =
|
|
25345
|
+
case 18:
|
|
25346
|
+
_context4.prev = 18;
|
|
25335
25347
|
_context4.t0 = _context4["catch"](2);
|
|
25336
25348
|
// ;
|
|
25337
25349
|
alert(_context4.t0.message);
|
|
@@ -25339,12 +25351,12 @@ var SAVE_VITALS = createAsyncThunk("VitalsApiSlice/saveVitals", /*#__PURE__*/_as
|
|
|
25339
25351
|
message: _context4.t0.message
|
|
25340
25352
|
})));
|
|
25341
25353
|
|
|
25342
|
-
case
|
|
25354
|
+
case 22:
|
|
25343
25355
|
case "end":
|
|
25344
25356
|
return _context4.stop();
|
|
25345
25357
|
}
|
|
25346
25358
|
}
|
|
25347
|
-
}, _callee4, null, [[2,
|
|
25359
|
+
}, _callee4, null, [[2, 18]]);
|
|
25348
25360
|
})));
|
|
25349
25361
|
var GET_VITALS_BASED_ENCOUNTER = createAsyncThunk("VitalsApiSlice/vitalsBasedEncounter", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
25350
25362
|
var payload,
|
|
@@ -42220,7 +42232,7 @@ var queries = {
|
|
|
42220
42232
|
return "";
|
|
42221
42233
|
},
|
|
42222
42234
|
dayBasedPractitioner: function dayBasedPractitioner(date) {
|
|
42223
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DayEndProcess\",\n \"filter\": \"DayEndProcess.docdate == ").concat(date, " && DayEndProcess.activestatus == true\",\n \"return_fields\": \"merge(DayEndProcess,{appointmentid:(for app IN Appointment FILTER app.id==TO_NUMBER(DayEndProcess.appointmentid) RETURN app)[0]},{encounterid:(for enc in Encounter filter DayEndProcess.encounterid!=null AND enc.id == TO_NUMBER(DayEndProcess.encounterid) return merge(enc,{patient_id:(for pat in Patient filter pat.id==enc.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}))}))[0]})\"\n }");
|
|
42235
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DayEndProcess\",\n \"filter\": \"DayEndProcess.docdate == ").concat(date, " && DayEndProcess.activestatus == true\",\n \"return_fields\": \"merge(DayEndProcess,{appointmentid:(for app IN Appointment FILTER app.id == TO_NUMBER(DayEndProcess.appointmentid) RETURN merge(app,{ Person: (for Per in Person filter app.PersonID any == Per.Id return merge({ _id: Per._id }, { birthDate: Per.birthDay }, { name: (for doc in HumanNameMaster filter doc._id in Per.name return merge(doc, { use: (document(doc.use)), prefix: (document(doc.prefix)), suffix:(document(doc.suffix))}))}))},{PatientID:(for Patient in Patient filter app.PersonID any == Patient.personID return merge({_id:Patient._id},{alias:Patient.alias},{birthDate:Patient.birthDate},{age:Patient.age},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))}) )}))[0]},{encounterid:(for enc in Encounter filter DayEndProcess.encounterid!=null AND enc.id == TO_NUMBER(DayEndProcess.encounterid) return merge(enc,{patient_id:(for pat in Patient filter pat.id==enc.patient_id return merge(pat,{name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}))}))[0]})\"\n }");
|
|
42224
42236
|
}
|
|
42225
42237
|
};
|
|
42226
42238
|
|
|
@@ -42343,17 +42355,20 @@ var DAY_BASED_PRACTITIONER_LIST = createAsyncThunk("dayEndProcessSlice/dayBasedP
|
|
|
42343
42355
|
case 5:
|
|
42344
42356
|
data = _context3.sent;
|
|
42345
42357
|
arr = data.result.map(function (val) {
|
|
42346
|
-
var _val$encounterid, _val$encounterid
|
|
42358
|
+
var _val$encounterid, _val$encounterid$pati, _val$encounterid$pati2, _val$encounterid$pati3, _val$appointmentid, _val$appointmentid$Pa, _val$appointmentid$Pa2, _val$appointmentid$Pa3, _val$appointmentid2, _val$appointmentid2$P, _val$appointmentid2$P2, _val$appointmentid2$P3, _val$encounterid2, _val$encounterid2$pat, _val$encounterid2$pat2, _val$appointmentid3, _val$appointmentid3$P, _val$appointmentid3$P2, _val$encounterid3, _val$encounterid3$pat, _val$encounterid3$pat2, _val$appointmentid4, _val$appointmentid4$P, _val$appointmentid4$P2, _val$appointmentid5, _val$appointmentid5$P, _val$appointmentid5$P2, _val$appointmentid6, _val$encounterid4, _val$encounterid5, _val$appointmentid7;
|
|
42347
42359
|
|
|
42360
|
+
var name = makeName(val === null || val === void 0 ? void 0 : (_val$encounterid = val.encounterid) === null || _val$encounterid === void 0 ? void 0 : (_val$encounterid$pati = _val$encounterid.patient_id) === null || _val$encounterid$pati === void 0 ? void 0 : (_val$encounterid$pati2 = _val$encounterid$pati[0]) === null || _val$encounterid$pati2 === void 0 ? void 0 : (_val$encounterid$pati3 = _val$encounterid$pati2.name) === null || _val$encounterid$pati3 === void 0 ? void 0 : _val$encounterid$pati3[0]) || makeName(val === null || val === void 0 ? void 0 : (_val$appointmentid = val.appointmentid) === null || _val$appointmentid === void 0 ? void 0 : (_val$appointmentid$Pa = _val$appointmentid.PatientID) === null || _val$appointmentid$Pa === void 0 ? void 0 : (_val$appointmentid$Pa2 = _val$appointmentid$Pa[0]) === null || _val$appointmentid$Pa2 === void 0 ? void 0 : (_val$appointmentid$Pa3 = _val$appointmentid$Pa2.name) === null || _val$appointmentid$Pa3 === void 0 ? void 0 : _val$appointmentid$Pa3[0]) || makeName(val === null || val === void 0 ? void 0 : (_val$appointmentid2 = val.appointmentid) === null || _val$appointmentid2 === void 0 ? void 0 : (_val$appointmentid2$P = _val$appointmentid2.Person) === null || _val$appointmentid2$P === void 0 ? void 0 : (_val$appointmentid2$P2 = _val$appointmentid2$P[0]) === null || _val$appointmentid2$P2 === void 0 ? void 0 : (_val$appointmentid2$P3 = _val$appointmentid2$P2.name) === null || _val$appointmentid2$P3 === void 0 ? void 0 : _val$appointmentid2$P3[0]);
|
|
42361
|
+
var MRN = (val === null || val === void 0 ? void 0 : (_val$encounterid2 = val.encounterid) === null || _val$encounterid2 === void 0 ? void 0 : (_val$encounterid2$pat = _val$encounterid2.patient_id) === null || _val$encounterid2$pat === void 0 ? void 0 : (_val$encounterid2$pat2 = _val$encounterid2$pat[0]) === null || _val$encounterid2$pat2 === void 0 ? void 0 : _val$encounterid2$pat2.MRN) || (val === null || val === void 0 ? void 0 : (_val$appointmentid3 = val.appointmentid) === null || _val$appointmentid3 === void 0 ? void 0 : (_val$appointmentid3$P = _val$appointmentid3.PatientID) === null || _val$appointmentid3$P === void 0 ? void 0 : (_val$appointmentid3$P2 = _val$appointmentid3$P[0]) === null || _val$appointmentid3$P2 === void 0 ? void 0 : _val$appointmentid3$P2.alias) || "----";
|
|
42362
|
+
var age = getAge(val === null || val === void 0 ? void 0 : (_val$encounterid3 = val.encounterid) === null || _val$encounterid3 === void 0 ? void 0 : (_val$encounterid3$pat = _val$encounterid3.patient_id) === null || _val$encounterid3$pat === void 0 ? void 0 : (_val$encounterid3$pat2 = _val$encounterid3$pat[0]) === null || _val$encounterid3$pat2 === void 0 ? void 0 : _val$encounterid3$pat2.birthDate) || getAge(val === null || val === void 0 ? void 0 : (_val$appointmentid4 = val.appointmentid) === null || _val$appointmentid4 === void 0 ? void 0 : (_val$appointmentid4$P = _val$appointmentid4.PatientID) === null || _val$appointmentid4$P === void 0 ? void 0 : (_val$appointmentid4$P2 = _val$appointmentid4$P[0]) === null || _val$appointmentid4$P2 === void 0 ? void 0 : _val$appointmentid4$P2.birthDate) || getAge(val === null || val === void 0 ? void 0 : (_val$appointmentid5 = val.appointmentid) === null || _val$appointmentid5 === void 0 ? void 0 : (_val$appointmentid5$P = _val$appointmentid5.Person) === null || _val$appointmentid5$P === void 0 ? void 0 : (_val$appointmentid5$P2 = _val$appointmentid5$P[0]) === null || _val$appointmentid5$P2 === void 0 ? void 0 : _val$appointmentid5$P2.birthDate);
|
|
42348
42363
|
return {
|
|
42349
|
-
name:
|
|
42350
|
-
MRN:
|
|
42351
|
-
age:
|
|
42352
|
-
appointmentId: val === null || val === void 0 ? void 0 : (_val$
|
|
42353
|
-
id: val === null || val === void 0 ? void 0 : (_val$encounterid4 = val.encounterid) === null || _val$encounterid4 === void 0 ? void 0 :
|
|
42354
|
-
visit_type: val === null || val === void 0 ? void 0 : (_val$encounterid5 = val.encounterid) === null || _val$encounterid5 === void 0 ? void 0 :
|
|
42364
|
+
name: name,
|
|
42365
|
+
MRN: MRN,
|
|
42366
|
+
age: age,
|
|
42367
|
+
appointmentId: val === null || val === void 0 ? void 0 : (_val$appointmentid6 = val.appointmentid) === null || _val$appointmentid6 === void 0 ? void 0 : _val$appointmentid6.appno,
|
|
42368
|
+
id: (val === null || val === void 0 ? void 0 : (_val$encounterid4 = val.encounterid) === null || _val$encounterid4 === void 0 ? void 0 : _val$encounterid4._key) || "-----",
|
|
42369
|
+
visit_type: (val === null || val === void 0 ? void 0 : (_val$encounterid5 = val.encounterid) === null || _val$encounterid5 === void 0 ? void 0 : _val$encounterid5.visit_type) || "-----",
|
|
42355
42370
|
curStatus: val.curStatus,
|
|
42356
|
-
aptdate: moment$1.unix(val === null || val === void 0 ? void 0 : (_val$
|
|
42371
|
+
aptdate: moment$1.unix(val === null || val === void 0 ? void 0 : (_val$appointmentid7 = val.appointmentid) === null || _val$appointmentid7 === void 0 ? void 0 : _val$appointmentid7.createddate).format("DD MMM,YYYY HH:MM:SS")
|
|
42357
42372
|
};
|
|
42358
42373
|
});
|
|
42359
42374
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|