primarycare-binder 1.0.145 → 1.0.146
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 +1273 -194
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -33223,32 +33223,300 @@ var siginInActions = {
|
|
|
33223
33223
|
};
|
|
33224
33224
|
var SigninFollowup$1 = SigninFollowup.reducer;
|
|
33225
33225
|
|
|
33226
|
+
var queries$8 = {
|
|
33227
|
+
category: "{\n \"db_name\": \"primarycare\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='DOCCATEGORY' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n}",
|
|
33228
|
+
document: function document(id) {
|
|
33229
|
+
return {
|
|
33230
|
+
db_name: "primarycare",
|
|
33231
|
+
entity: "CA_ClinicalDocumenttype",
|
|
33232
|
+
filter: "CA_ClinicalDocumenttype.doccategory=='".concat(id, "' && CA_ClinicalDocumenttype.activestatus==true"),
|
|
33233
|
+
return_fields: "{id:CA_ClinicalDocumenttype.id, _id:CA_ClinicalDocumenttype._id,docname:CA_ClinicalDocumenttype.docname,doccategory:CA_ClinicalDocumenttype.doccategory, formrefid:CA_ClinicalDocumenttype.formrefid}"
|
|
33234
|
+
};
|
|
33235
|
+
},
|
|
33236
|
+
speciality: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='SPECIALTY' && CodeableConceptMaster.activestatus==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n}"),
|
|
33237
|
+
encounter: function encounter(id) {
|
|
33238
|
+
return {
|
|
33239
|
+
db_name: dbName,
|
|
33240
|
+
entity: "Encounter",
|
|
33241
|
+
filter: "Encounter.activestatus==true && Encounter.patient_id==".concat(id),
|
|
33242
|
+
return_fields: "{id:Encounter.id,_id:Encounter._id,encounter_no:Encounter.encounter_no,encounterdate:Encounter.encounterdate}"
|
|
33243
|
+
};
|
|
33244
|
+
},
|
|
33245
|
+
practitioner: function practitioner(patient_id, encounter_id) {
|
|
33246
|
+
return {
|
|
33247
|
+
db_name: dbName,
|
|
33248
|
+
entity: "Encounter",
|
|
33249
|
+
filter: "Encounter.activestatus==true && Encounter.patient_id == ".concat(patient_id, " && Encounter.id==").concat(encounter_id),
|
|
33250
|
+
return_fields: " {Practitioner_id:(for doc in Practitioner filter doc.id in Encounter.participant[*].Practitioner_id return {name:document(doc.name),_id:doc._id})}"
|
|
33251
|
+
};
|
|
33252
|
+
},
|
|
33253
|
+
doc_read: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CAPatientClinicalDocs\",\n \"filter\": \"CAPatientClinicalDocs.activestatus ==true\",\n \"return_fields\": \"MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})\"\n}"),
|
|
33254
|
+
doc_single_read: function doc_single_read(key) {
|
|
33255
|
+
return {
|
|
33256
|
+
db_name: dbName,
|
|
33257
|
+
entity: "CAPatientClinicalDocs",
|
|
33258
|
+
filter: "CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs._key=='".concat(key, "'"),
|
|
33259
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:(for pract in Practitioner filter pract._id == CAPatientClinicalDocs.practitionerid return merge(pract,{name:(for doc in HumanNameMaster filter doc._id in pract.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))}))},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
33260
|
+
};
|
|
33261
|
+
},
|
|
33262
|
+
doc_agnst_category: function doc_agnst_category(category, speciality, encoumter, practitioner) {
|
|
33263
|
+
return {
|
|
33264
|
+
db_name: dbName,
|
|
33265
|
+
entity: "CAPatientClinicalDocs",
|
|
33266
|
+
filter: "CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs.doccategory=='".concat(category, "' || CAPatientClinicalDocs.specialty=='").concat(speciality, "' || CAPatientClinicalDocs.encounterid=='").concat(encoumter, "' || CAPatientClinicalDocs.practitionerid=='").concat(practitioner, "'"),
|
|
33267
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:(for pract in Practitioner filter pract._id == CAPatientClinicalDocs.practitionerid return merge(pract,{name:(for doc in HumanNameMaster filter doc._id in pract.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))}))},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
33268
|
+
};
|
|
33269
|
+
},
|
|
33270
|
+
doc_agnst_encounter: function doc_agnst_encounter(patient_id, encounter_id) {
|
|
33271
|
+
return {
|
|
33272
|
+
db_name: dbName,
|
|
33273
|
+
entity: "CAPatientClinicalDocs",
|
|
33274
|
+
filter: "CAPatientClinicalDocs.activestatus ==true || CAPatientClinicalDocs.patientid=='".concat(patient_id, "' && CAPatientClinicalDocs.encounterid !='").concat(encounter_id, "'"),
|
|
33275
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.doccategory return merge(doc,{coding:(for cod in doc.coding return document(cod).display)}))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.encountertype return merge(doc,{coding:(for cod in doc.coding return document(cod).display)})),specialty:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.specialty return merge(doc,{coding:(for cod in doc.coding return document(cod).display)}))})"
|
|
33276
|
+
};
|
|
33277
|
+
},
|
|
33278
|
+
doc_agnst_speciality: function doc_agnst_speciality(speciality) {
|
|
33279
|
+
return {
|
|
33280
|
+
db_name: dbName,
|
|
33281
|
+
entity: "CAPatientClinicalDocs",
|
|
33282
|
+
filter: "CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs.specialty=='".concat(speciality, "'"),
|
|
33283
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.encountertype return merge(doc,{coding:(for cod in doc.coding return document(cod).display)})),specialty:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.specialty return merge(doc,{coding:(for cod in doc.coding return document(cod).display)}))})"
|
|
33284
|
+
};
|
|
33285
|
+
},
|
|
33286
|
+
doc_agnst_doctype: function doc_agnst_doctype(doctype) {
|
|
33287
|
+
return {
|
|
33288
|
+
db_name: dbName,
|
|
33289
|
+
entity: "CAPatientClinicalDocs",
|
|
33290
|
+
filter: "CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs.doctype=='".concat(doctype, "'"),
|
|
33291
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.doccategory return merge(doc,{coding:(for cod in doc.coding return document(cod).display)}))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.encountertype return merge(doc,{coding:(for cod in doc.coding return document(cod).display)})),specialty:(for doc in CodeableConceptMaster filter doc._id==CAPatientClinicalDocs.specialty return merge(doc,{coding:(for cod in doc.coding return document(cod).display)}))})"
|
|
33292
|
+
};
|
|
33293
|
+
},
|
|
33294
|
+
practionerAgainstCategory: function practionerAgainstCategory(patient_id, doc_Category, doc_Type) {
|
|
33295
|
+
return {
|
|
33296
|
+
db_name: "primarycare",
|
|
33297
|
+
entity: "CAPatientClinicalDocs",
|
|
33298
|
+
filter: "CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs.patientid=='".concat(patient_id, "' && CAPatientClinicalDocs.doccategory=='").concat(doc_Category, "' && CAPatientClinicalDocs.doctype=='").concat(doc_Type, "'"),
|
|
33299
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:(for pract in Practitioner filter pract._id == CAPatientClinicalDocs.practitionerid return merge(pract,{name:(for doc in HumanNameMaster filter doc._id in pract.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))}))},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
33300
|
+
};
|
|
33301
|
+
}
|
|
33302
|
+
};
|
|
33303
|
+
|
|
33304
|
+
var genereateSaveJson = function genereateSaveJson(data) {
|
|
33305
|
+
var _data$data, _data$encounterData$d, _data$encounterData, _data$personDetails$p, _data$personDetails, _data$personDetails$p2, _data$personDetails$p3, _details$OldselectCat, _details$selectCatago, _data$formdata, _patient$type, _details$selectDoccum, _details$selectReason, _details$selectReason2;
|
|
33306
|
+
|
|
33307
|
+
var extraJson = {};
|
|
33308
|
+
var filter = {};
|
|
33309
|
+
|
|
33310
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.editId) {
|
|
33311
|
+
var _data$data2, _data$data3;
|
|
33312
|
+
|
|
33313
|
+
extraJson = {
|
|
33314
|
+
_id: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.editId
|
|
33315
|
+
};
|
|
33316
|
+
filter = {
|
|
33317
|
+
filter: {
|
|
33318
|
+
_id: (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.editId
|
|
33319
|
+
}
|
|
33320
|
+
};
|
|
33321
|
+
}
|
|
33322
|
+
|
|
33323
|
+
var patient = (_data$encounterData$d = data === null || data === void 0 ? void 0 : (_data$encounterData = data.encounterData) === null || _data$encounterData === void 0 ? void 0 : _data$encounterData.data) !== null && _data$encounterData$d !== void 0 ? _data$encounterData$d : {}; // const prac =
|
|
33324
|
+
// data?.personDetails?.practitioner?.[0]?.PractitionerRole?.[0]?.id ?? 0;
|
|
33325
|
+
|
|
33326
|
+
var prac = (_data$personDetails$p = data === null || data === void 0 ? void 0 : (_data$personDetails = data.personDetails) === null || _data$personDetails === void 0 ? void 0 : (_data$personDetails$p2 = _data$personDetails.practitioner) === null || _data$personDetails$p2 === void 0 ? void 0 : (_data$personDetails$p3 = _data$personDetails$p2[0]) === null || _data$personDetails$p3 === void 0 ? void 0 : _data$personDetails$p3._id) !== null && _data$personDetails$p !== void 0 ? _data$personDetails$p : "";
|
|
33327
|
+
var details = data === null || data === void 0 ? void 0 : data.data;
|
|
33328
|
+
return [_objectSpread2(_objectSpread2({
|
|
33329
|
+
db_name: dbName,
|
|
33330
|
+
entity: "CAPatientClinicalDocs",
|
|
33331
|
+
is_metadata: true,
|
|
33332
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
33333
|
+
}, filter), {}, {
|
|
33334
|
+
doc: _objectSpread2(_objectSpread2({}, extraJson), {}, {
|
|
33335
|
+
id: 0,
|
|
33336
|
+
organizationid: JSON.stringify(patient === null || patient === void 0 ? void 0 : patient.Organization_id),
|
|
33337
|
+
patientid: patient.pID,
|
|
33338
|
+
encounterid: patient.eId,
|
|
33339
|
+
practitionerid: prac,
|
|
33340
|
+
doccategory: details.editId ? details === null || details === void 0 ? void 0 : (_details$OldselectCat = details.OldselectCatagory) === null || _details$OldselectCat === void 0 ? void 0 : _details$OldselectCat._id : details === null || details === void 0 ? void 0 : (_details$selectCatago = details.selectCatagory) === null || _details$selectCatago === void 0 ? void 0 : _details$selectCatago._id,
|
|
33341
|
+
docformid: data === null || data === void 0 ? void 0 : data.formID,
|
|
33342
|
+
formdata: (_data$formdata = data === null || data === void 0 ? void 0 : data.formdata) !== null && _data$formdata !== void 0 ? _data$formdata : {},
|
|
33343
|
+
status: (details === null || details === void 0 ? void 0 : details.saveMode) === "Draft" ? false : true,
|
|
33344
|
+
DocStatusHistoryLog: [{
|
|
33345
|
+
startdate: 0,
|
|
33346
|
+
enddate: 0,
|
|
33347
|
+
statusreasoncode: "",
|
|
33348
|
+
statushistory: ""
|
|
33349
|
+
}],
|
|
33350
|
+
encountertype: (_patient$type = patient === null || patient === void 0 ? void 0 : patient.type) !== null && _patient$type !== void 0 ? _patient$type : "",
|
|
33351
|
+
doctype: details.editId ? details === null || details === void 0 ? void 0 : details.OldselectDoccument._id : details === null || details === void 0 ? void 0 : (_details$selectDoccum = details.selectDoccument) === null || _details$selectDoccum === void 0 ? void 0 : _details$selectDoccum._id,
|
|
33352
|
+
docdate: details.editId ? data === null || data === void 0 ? void 0 : data.docdate : moment().unix(),
|
|
33353
|
+
documents: [{
|
|
33354
|
+
_id: "",
|
|
33355
|
+
date: "",
|
|
33356
|
+
url: "",
|
|
33357
|
+
id: 0,
|
|
33358
|
+
fileName: "",
|
|
33359
|
+
fileid: "",
|
|
33360
|
+
filetype: "",
|
|
33361
|
+
objectid: ""
|
|
33362
|
+
}],
|
|
33363
|
+
reason: (_details$selectReason = details === null || details === void 0 ? void 0 : (_details$selectReason2 = details.selectReason) === null || _details$selectReason2 === void 0 ? void 0 : _details$selectReason2._id) !== null && _details$selectReason !== void 0 ? _details$selectReason : "",
|
|
33364
|
+
specialty: (patient === null || patient === void 0 ? void 0 : patient.speciality) === "" ? "General" : patient === null || patient === void 0 ? void 0 : patient.speciality
|
|
33365
|
+
})
|
|
33366
|
+
})];
|
|
33367
|
+
}; //genreate json for read
|
|
33368
|
+
|
|
33369
|
+
var generateResJson$6 = function generateResJson(dataList, state) {
|
|
33370
|
+
var obj = {};
|
|
33371
|
+
dataList.forEach(function (element) {
|
|
33372
|
+
var _element$doccategory;
|
|
33373
|
+
|
|
33374
|
+
if (element === null || element === void 0 ? void 0 : (_element$doccategory = element.doccategory) === null || _element$doccategory === void 0 ? void 0 : _element$doccategory.display) {
|
|
33375
|
+
var _element$doccategory2;
|
|
33376
|
+
|
|
33377
|
+
var category = element === null || element === void 0 ? void 0 : (_element$doccategory2 = element.doccategory) === null || _element$doccategory2 === void 0 ? void 0 : _element$doccategory2.display;
|
|
33378
|
+
|
|
33379
|
+
if (category in obj) {
|
|
33380
|
+
obj[category].count = obj[category].count + 1;
|
|
33381
|
+
} else {
|
|
33382
|
+
obj[category] = {
|
|
33383
|
+
count: 1,
|
|
33384
|
+
data: {}
|
|
33385
|
+
};
|
|
33386
|
+
obj[category].data = element;
|
|
33387
|
+
}
|
|
33388
|
+
}
|
|
33389
|
+
});
|
|
33390
|
+
console.log(Object.values(obj));
|
|
33391
|
+
return Object.values(obj);
|
|
33392
|
+
}; //generate json for single read
|
|
33393
|
+
|
|
33394
|
+
var generatesingleRead = function generatesingleRead(val, state) {
|
|
33395
|
+
var _state$docc_cat_read, _val$doctype, _val$doctype2, _val$doctype3, _val$doctype4;
|
|
33396
|
+
|
|
33397
|
+
return _objectSpread2({
|
|
33398
|
+
OldselectCatagory: state === null || state === void 0 ? void 0 : (_state$docc_cat_read = state.docc_cat_read) === null || _state$docc_cat_read === void 0 ? void 0 : _state$docc_cat_read.data.find(function (sys) {
|
|
33399
|
+
var _val$doccategory;
|
|
33400
|
+
|
|
33401
|
+
return (val === null || val === void 0 ? void 0 : (_val$doccategory = val.doccategory) === null || _val$doccategory === void 0 ? void 0 : _val$doccategory._id) === sys._id;
|
|
33402
|
+
}),
|
|
33403
|
+
OldselectDoccument: (val === null || val === void 0 ? void 0 : val.doctype) ? {
|
|
33404
|
+
label: val === null || val === void 0 ? void 0 : (_val$doctype = val.doctype) === null || _val$doctype === void 0 ? void 0 : _val$doctype.docname,
|
|
33405
|
+
value: val === null || val === void 0 ? void 0 : (_val$doctype2 = val.doctype) === null || _val$doctype2 === void 0 ? void 0 : _val$doctype2.doccategory,
|
|
33406
|
+
formrefid: val === null || val === void 0 ? void 0 : (_val$doctype3 = val.doctype) === null || _val$doctype3 === void 0 ? void 0 : _val$doctype3.formrefid,
|
|
33407
|
+
_id: val === null || val === void 0 ? void 0 : (_val$doctype4 = val.doctype) === null || _val$doctype4 === void 0 ? void 0 : _val$doctype4._id
|
|
33408
|
+
} : null,
|
|
33409
|
+
formID: val === null || val === void 0 ? void 0 : val.docformid,
|
|
33410
|
+
createdOn: getData$2(val.createddate ? moment.unix(val.createddate) : new Date()),
|
|
33411
|
+
editId: val._id,
|
|
33412
|
+
formData: val.formdata,
|
|
33413
|
+
saveMode: val.status === true ? "Final" : "Draft"
|
|
33414
|
+
}, val);
|
|
33415
|
+
}; //generate doc against category
|
|
33416
|
+
|
|
33417
|
+
var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
|
|
33418
|
+
var orderedData = data.sort(function (a, b) {
|
|
33419
|
+
return (b === null || b === void 0 ? void 0 : b.createddate) - (a === null || a === void 0 ? void 0 : a.createddate);
|
|
33420
|
+
});
|
|
33421
|
+
var obj = {};
|
|
33422
|
+
orderedData.forEach(function (element) {
|
|
33423
|
+
var _element$doccategory3;
|
|
33424
|
+
|
|
33425
|
+
if (element === null || element === void 0 ? void 0 : (_element$doccategory3 = element.doccategory) === null || _element$doccategory3 === void 0 ? void 0 : _element$doccategory3.display) {
|
|
33426
|
+
var _element$doccategory4;
|
|
33427
|
+
|
|
33428
|
+
var category = element === null || element === void 0 ? void 0 : (_element$doccategory4 = element.doccategory) === null || _element$doccategory4 === void 0 ? void 0 : _element$doccategory4.display;
|
|
33429
|
+
|
|
33430
|
+
if (category in obj) {
|
|
33431
|
+
var _element$practitioner, _element$practitioner2, _element$practitioner3, _element$practitioner4;
|
|
33432
|
+
|
|
33433
|
+
obj[category].count = obj[category].count + 1;
|
|
33434
|
+
|
|
33435
|
+
var userObj = _objectSpread2({
|
|
33436
|
+
// title:
|
|
33437
|
+
// element.practitionerid.length > 0
|
|
33438
|
+
// ? element?.practitionerid?.practitioner_role.length > 0
|
|
33439
|
+
// ? element?.practitionerid?.practitioner_role[0]?.name
|
|
33440
|
+
// : ""
|
|
33441
|
+
// : "Role",
|
|
33442
|
+
title: "Role",
|
|
33443
|
+
date: moment.unix(element.createddate).format("MMMM Do h:mm a"),
|
|
33444
|
+
name: element.practitionerid.length > 0 ? ((_element$practitioner = element.practitionerid[0]) === null || _element$practitioner === void 0 ? void 0 : (_element$practitioner2 = _element$practitioner.name[0]) === null || _element$practitioner2 === void 0 ? void 0 : _element$practitioner2.text) + ((_element$practitioner3 = element.practitionerid[0]) === null || _element$practitioner3 === void 0 ? void 0 : (_element$practitioner4 = _element$practitioner3.name[0]) === null || _element$practitioner4 === void 0 ? void 0 : _element$practitioner4.given) : "Dummy"
|
|
33445
|
+
}, element);
|
|
33446
|
+
|
|
33447
|
+
var childObj = {
|
|
33448
|
+
title: element.doctype.docname,
|
|
33449
|
+
user: [_objectSpread2({}, userObj)]
|
|
33450
|
+
};
|
|
33451
|
+
var findobj = obj[category].child.find(function (c) {
|
|
33452
|
+
return c.title === childObj.title;
|
|
33453
|
+
});
|
|
33454
|
+
|
|
33455
|
+
if (findobj) {
|
|
33456
|
+
findobj.user.push(userObj);
|
|
33457
|
+
} else {
|
|
33458
|
+
obj[category].child.push(childObj);
|
|
33459
|
+
}
|
|
33460
|
+
} else {
|
|
33461
|
+
var _element$practitioner5, _element$practitioner6, _element$practitioner7, _element$practitioner8;
|
|
33462
|
+
|
|
33463
|
+
obj[category] = {
|
|
33464
|
+
title: category,
|
|
33465
|
+
count: 1,
|
|
33466
|
+
child: []
|
|
33467
|
+
};
|
|
33468
|
+
|
|
33469
|
+
var _userObj = _objectSpread2({
|
|
33470
|
+
title: "Role",
|
|
33471
|
+
date: moment.unix(element.createddate).format("MMMM Do h:mm:ss a"),
|
|
33472
|
+
name: element.practitionerid.length > 0 ? ((_element$practitioner5 = element.practitionerid[0]) === null || _element$practitioner5 === void 0 ? void 0 : (_element$practitioner6 = _element$practitioner5.name[0]) === null || _element$practitioner6 === void 0 ? void 0 : _element$practitioner6.text) + ((_element$practitioner7 = element.practitionerid[0]) === null || _element$practitioner7 === void 0 ? void 0 : (_element$practitioner8 = _element$practitioner7.name[0]) === null || _element$practitioner8 === void 0 ? void 0 : _element$practitioner8.given) : "Dummy"
|
|
33473
|
+
}, element);
|
|
33474
|
+
|
|
33475
|
+
var childObj = {
|
|
33476
|
+
title: element.doctype.docname,
|
|
33477
|
+
user: [_objectSpread2({}, _userObj)]
|
|
33478
|
+
};
|
|
33479
|
+
obj[category].child.push(childObj);
|
|
33480
|
+
}
|
|
33481
|
+
}
|
|
33482
|
+
});
|
|
33483
|
+
console.log(Object.values(obj));
|
|
33484
|
+
return Object.values(obj);
|
|
33485
|
+
};
|
|
33486
|
+
var generatePractitoner = function generatePractitoner(data) {
|
|
33487
|
+
debugger;
|
|
33488
|
+
var orderedData = data.sort(function (a, b) {
|
|
33489
|
+
return (b === null || b === void 0 ? void 0 : b.createddate) - (a === null || a === void 0 ? void 0 : a.createddate);
|
|
33490
|
+
});
|
|
33491
|
+
var arr = [];
|
|
33492
|
+
orderedData.forEach(function (element) {
|
|
33493
|
+
var userObj = _objectSpread2({
|
|
33494
|
+
// title:
|
|
33495
|
+
// element.practitionerid.length > 0
|
|
33496
|
+
// ? element?.practitionerid?.practitioner_role[0]?.name
|
|
33497
|
+
// : "Role",
|
|
33498
|
+
title: "Role",
|
|
33499
|
+
date: moment.unix(element.createddate).format("MMMM Do h:mm a"),
|
|
33500
|
+
name: element.practitionerid.length > 0 ? "".concat(element.practitionerid[0].name[0].text + " " + element.practitionerid[0].name[0].given) : "Dummy"
|
|
33501
|
+
}, element);
|
|
33502
|
+
|
|
33503
|
+
arr.push(userObj);
|
|
33504
|
+
});
|
|
33505
|
+
debugger;
|
|
33506
|
+
return arr;
|
|
33507
|
+
};
|
|
33508
|
+
var getData$2 = function getData(date, time) {
|
|
33509
|
+
var da = date ? new Date(date) : new Date();
|
|
33510
|
+
var d = new Date(da).toDateString().split(" ");
|
|
33511
|
+
return "".concat(d[2], " ").concat(d[1], ", ").concat(d[3], " ").concat(time ? moment(da).format("LT") : "");
|
|
33512
|
+
};
|
|
33513
|
+
|
|
33226
33514
|
var _extraReducers$v;
|
|
33227
33515
|
var DOCC_SAVE_SERVICE = createAsyncThunk("DoccSlice/docc_save", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
33228
33516
|
var payload,
|
|
33229
33517
|
_ref2,
|
|
33230
33518
|
rejectWithValue,
|
|
33231
|
-
_data$encounterData$d,
|
|
33232
|
-
_data$encounterData,
|
|
33233
|
-
_data$personDetails$p,
|
|
33234
|
-
_data$personDetails,
|
|
33235
|
-
_data$personDetails$p2,
|
|
33236
|
-
_data$personDetails$p3,
|
|
33237
|
-
_data$personDetails$p4,
|
|
33238
|
-
_data$personDetails$p5,
|
|
33239
|
-
_details$selectCatago,
|
|
33240
|
-
_details$selectCatago2,
|
|
33241
|
-
_data$formdata,
|
|
33242
|
-
_patient$type,
|
|
33243
|
-
_details$selectDoccum,
|
|
33244
|
-
_details$selectDoccum2,
|
|
33245
|
-
_patient$speciality,
|
|
33246
33519
|
data,
|
|
33247
|
-
extraJson,
|
|
33248
|
-
filter,
|
|
33249
|
-
patient,
|
|
33250
|
-
prac,
|
|
33251
|
-
details,
|
|
33252
33520
|
body,
|
|
33253
33521
|
res,
|
|
33254
33522
|
_args = arguments;
|
|
@@ -33261,93 +33529,37 @@ var DOCC_SAVE_SERVICE = createAsyncThunk("DoccSlice/docc_save", /*#__PURE__*/_as
|
|
|
33261
33529
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
33262
33530
|
_context.prev = 2;
|
|
33263
33531
|
data = payload.data;
|
|
33264
|
-
|
|
33265
|
-
|
|
33266
|
-
|
|
33267
|
-
if (data.editId) {
|
|
33268
|
-
extraJson = {
|
|
33269
|
-
_id: data.editId
|
|
33270
|
-
};
|
|
33271
|
-
filter = {
|
|
33272
|
-
filter: {
|
|
33273
|
-
_id: data.editId
|
|
33274
|
-
}
|
|
33275
|
-
};
|
|
33276
|
-
}
|
|
33277
|
-
|
|
33278
|
-
patient = (_data$encounterData$d = data === null || data === void 0 ? void 0 : (_data$encounterData = data.encounterData) === null || _data$encounterData === void 0 ? void 0 : _data$encounterData.data) !== null && _data$encounterData$d !== void 0 ? _data$encounterData$d : {};
|
|
33279
|
-
prac = (_data$personDetails$p = data === null || data === void 0 ? void 0 : (_data$personDetails = data.personDetails) === null || _data$personDetails === void 0 ? void 0 : (_data$personDetails$p2 = _data$personDetails.practitioner) === null || _data$personDetails$p2 === void 0 ? void 0 : (_data$personDetails$p3 = _data$personDetails$p2[0]) === null || _data$personDetails$p3 === void 0 ? void 0 : (_data$personDetails$p4 = _data$personDetails$p3.PractitionerRole) === null || _data$personDetails$p4 === void 0 ? void 0 : (_data$personDetails$p5 = _data$personDetails$p4[0]) === null || _data$personDetails$p5 === void 0 ? void 0 : _data$personDetails$p5.id) !== null && _data$personDetails$p !== void 0 ? _data$personDetails$p : 0;
|
|
33280
|
-
details = data === null || data === void 0 ? void 0 : data.data;
|
|
33281
|
-
body = [_objectSpread2(_objectSpread2({
|
|
33282
|
-
"db_name": dbName,
|
|
33283
|
-
"entity": "CAPatientClinicalDocs",
|
|
33284
|
-
"is_metadata": true,
|
|
33285
|
-
"metadataId": "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
33286
|
-
}, filter), {}, {
|
|
33287
|
-
"doc": _objectSpread2(_objectSpread2({}, extraJson), {}, {
|
|
33288
|
-
"id": 0,
|
|
33289
|
-
"organizationid": JSON.stringify(patient === null || patient === void 0 ? void 0 : patient.Organization_id),
|
|
33290
|
-
"patientid": patient.pID,
|
|
33291
|
-
"encounterid": patient.eId,
|
|
33292
|
-
"practitionerid": JSON.stringify(prac),
|
|
33293
|
-
"doccategory": (_details$selectCatago = details === null || details === void 0 ? void 0 : (_details$selectCatago2 = details.selectCatagory) === null || _details$selectCatago2 === void 0 ? void 0 : _details$selectCatago2._id) !== null && _details$selectCatago !== void 0 ? _details$selectCatago : '',
|
|
33294
|
-
"docformid": data === null || data === void 0 ? void 0 : data.formID,
|
|
33295
|
-
"formdata": (_data$formdata = data === null || data === void 0 ? void 0 : data.formdata) !== null && _data$formdata !== void 0 ? _data$formdata : {},
|
|
33296
|
-
"status": true,
|
|
33297
|
-
"DocStatusHistoryLog": [{
|
|
33298
|
-
"startdate": 0,
|
|
33299
|
-
"enddate": 0,
|
|
33300
|
-
"statusreasoncode": "",
|
|
33301
|
-
"statushistory": ""
|
|
33302
|
-
}],
|
|
33303
|
-
"encountertype": (_patient$type = patient === null || patient === void 0 ? void 0 : patient.type) !== null && _patient$type !== void 0 ? _patient$type : '',
|
|
33304
|
-
"doctype": (_details$selectDoccum = details === null || details === void 0 ? void 0 : (_details$selectDoccum2 = details.selectDoccument) === null || _details$selectDoccum2 === void 0 ? void 0 : _details$selectDoccum2._id) !== null && _details$selectDoccum !== void 0 ? _details$selectDoccum : '',
|
|
33305
|
-
"docdate": moment().unix(),
|
|
33306
|
-
"documents": [{
|
|
33307
|
-
"_id": "",
|
|
33308
|
-
"date": "",
|
|
33309
|
-
"url": "",
|
|
33310
|
-
"id": 0,
|
|
33311
|
-
"fileName": "",
|
|
33312
|
-
"fileid": "",
|
|
33313
|
-
"filetype": "",
|
|
33314
|
-
"objectid": ""
|
|
33315
|
-
}],
|
|
33316
|
-
"reason": "",
|
|
33317
|
-
"specialty": (_patient$speciality = patient === null || patient === void 0 ? void 0 : patient.speciality) !== null && _patient$speciality !== void 0 ? _patient$speciality : ''
|
|
33318
|
-
})
|
|
33319
|
-
})];
|
|
33320
|
-
_context.next = 13;
|
|
33532
|
+
body = genereateSaveJson(data);
|
|
33533
|
+
_context.next = 7;
|
|
33321
33534
|
return fetchData$1({
|
|
33322
33535
|
body: JSON.stringify(body)
|
|
33323
33536
|
}, __uspsertUrl__);
|
|
33324
33537
|
|
|
33325
|
-
case
|
|
33538
|
+
case 7:
|
|
33326
33539
|
res = _context.sent;
|
|
33327
|
-
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.
|
|
33540
|
+
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
33328
33541
|
data: res
|
|
33329
33542
|
}));
|
|
33330
33543
|
|
|
33331
|
-
case
|
|
33332
|
-
_context.prev =
|
|
33544
|
+
case 11:
|
|
33545
|
+
_context.prev = 11;
|
|
33333
33546
|
_context.t0 = _context["catch"](2);
|
|
33334
33547
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33335
33548
|
message: _context.t0.message
|
|
33336
33549
|
})));
|
|
33337
33550
|
|
|
33338
|
-
case
|
|
33551
|
+
case 14:
|
|
33339
33552
|
case "end":
|
|
33340
33553
|
return _context.stop();
|
|
33341
33554
|
}
|
|
33342
33555
|
}
|
|
33343
|
-
}, _callee, null, [[2,
|
|
33556
|
+
}, _callee, null, [[2, 11]]);
|
|
33344
33557
|
})));
|
|
33345
33558
|
var DOCC_CATE_READ = createAsyncThunk("DoccSlice/docc_cat_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
33346
33559
|
var payload,
|
|
33347
33560
|
_ref4,
|
|
33348
33561
|
rejectWithValue,
|
|
33349
33562
|
getState,
|
|
33350
|
-
docc_read,
|
|
33351
33563
|
data,
|
|
33352
33564
|
arr,
|
|
33353
33565
|
_args2 = arguments;
|
|
@@ -33359,47 +33571,41 @@ var DOCC_CATE_READ = createAsyncThunk("DoccSlice/docc_cat_read", /*#__PURE__*/_a
|
|
|
33359
33571
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
33360
33572
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue, getState = _ref4.getState;
|
|
33361
33573
|
_context2.prev = 2;
|
|
33362
|
-
|
|
33363
|
-
"db_name": dbName,
|
|
33364
|
-
"entity": "CodeableConceptMaster",
|
|
33365
|
-
"filter": "CodeableConceptMaster.Type=='DOCCATEGORY' && CodeableConceptMaster.activestatus==true",
|
|
33366
|
-
"return_fields": "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
|
|
33367
|
-
};
|
|
33368
|
-
_context2.next = 6;
|
|
33574
|
+
_context2.next = 5;
|
|
33369
33575
|
return fetchData$1({
|
|
33370
|
-
body:
|
|
33576
|
+
body: queries$8.category
|
|
33371
33577
|
}, __readDocumentUrl__);
|
|
33372
33578
|
|
|
33373
|
-
case
|
|
33579
|
+
case 5:
|
|
33374
33580
|
data = _context2.sent;
|
|
33375
33581
|
arr = [];
|
|
33376
33582
|
data.result.map(function (v) {
|
|
33377
33583
|
var _v$coding$0$display, _v$coding, _v$coding$, _v$coding$0$Type, _v$coding2, _v$coding2$, _v$coding$0$_id, _v$coding3, _v$coding3$, _v$_id;
|
|
33378
33584
|
|
|
33379
33585
|
arr.push({
|
|
33380
|
-
label: (_v$coding$0$display = v === null || v === void 0 ? void 0 : (_v$coding = v.coding) === null || _v$coding === void 0 ? void 0 : (_v$coding$ = _v$coding[0]) === null || _v$coding$ === void 0 ? void 0 : _v$coding$.display) !== null && _v$coding$0$display !== void 0 ? _v$coding$0$display :
|
|
33381
|
-
value: (_v$coding$0$Type = v === null || v === void 0 ? void 0 : (_v$coding2 = v.coding) === null || _v$coding2 === void 0 ? void 0 : (_v$coding2$ = _v$coding2[0]) === null || _v$coding2$ === void 0 ? void 0 : _v$coding2$.Type) !== null && _v$coding$0$Type !== void 0 ? _v$coding$0$Type :
|
|
33382
|
-
_id: (_v$coding$0$_id = v === null || v === void 0 ? void 0 : (_v$coding3 = v.coding) === null || _v$coding3 === void 0 ? void 0 : (_v$coding3$ = _v$coding3[0]) === null || _v$coding3$ === void 0 ? void 0 : _v$coding3$._id) !== null && _v$coding$0$_id !== void 0 ? _v$coding$0$_id :
|
|
33383
|
-
__id: (_v$_id = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id !== void 0 ? _v$_id :
|
|
33586
|
+
label: (_v$coding$0$display = v === null || v === void 0 ? void 0 : (_v$coding = v.coding) === null || _v$coding === void 0 ? void 0 : (_v$coding$ = _v$coding[0]) === null || _v$coding$ === void 0 ? void 0 : _v$coding$.display) !== null && _v$coding$0$display !== void 0 ? _v$coding$0$display : "",
|
|
33587
|
+
value: (_v$coding$0$Type = v === null || v === void 0 ? void 0 : (_v$coding2 = v.coding) === null || _v$coding2 === void 0 ? void 0 : (_v$coding2$ = _v$coding2[0]) === null || _v$coding2$ === void 0 ? void 0 : _v$coding2$.Type) !== null && _v$coding$0$Type !== void 0 ? _v$coding$0$Type : "",
|
|
33588
|
+
_id: (_v$coding$0$_id = v === null || v === void 0 ? void 0 : (_v$coding3 = v.coding) === null || _v$coding3 === void 0 ? void 0 : (_v$coding3$ = _v$coding3[0]) === null || _v$coding3$ === void 0 ? void 0 : _v$coding3$._id) !== null && _v$coding$0$_id !== void 0 ? _v$coding$0$_id : "",
|
|
33589
|
+
__id: (_v$_id = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id !== void 0 ? _v$_id : ""
|
|
33384
33590
|
});
|
|
33385
33591
|
});
|
|
33386
33592
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33387
33593
|
data: arr
|
|
33388
33594
|
}));
|
|
33389
33595
|
|
|
33390
|
-
case
|
|
33391
|
-
_context2.prev =
|
|
33596
|
+
case 11:
|
|
33597
|
+
_context2.prev = 11;
|
|
33392
33598
|
_context2.t0 = _context2["catch"](2);
|
|
33393
33599
|
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33394
33600
|
message: _context2.t0.message
|
|
33395
33601
|
})));
|
|
33396
33602
|
|
|
33397
|
-
case
|
|
33603
|
+
case 14:
|
|
33398
33604
|
case "end":
|
|
33399
33605
|
return _context2.stop();
|
|
33400
33606
|
}
|
|
33401
33607
|
}
|
|
33402
|
-
}, _callee2, null, [[2,
|
|
33608
|
+
}, _callee2, null, [[2, 11]]);
|
|
33403
33609
|
})));
|
|
33404
33610
|
var DOCC_DOCC_READ = createAsyncThunk("DoccSlice/docc_docc_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
33405
33611
|
var payload,
|
|
@@ -33407,7 +33613,6 @@ var DOCC_DOCC_READ = createAsyncThunk("DoccSlice/docc_docc_read", /*#__PURE__*/_
|
|
|
33407
33613
|
rejectWithValue,
|
|
33408
33614
|
getState,
|
|
33409
33615
|
id,
|
|
33410
|
-
docc_docc_read,
|
|
33411
33616
|
data,
|
|
33412
33617
|
arr,
|
|
33413
33618
|
_args3 = arguments;
|
|
@@ -33420,18 +33625,12 @@ var DOCC_DOCC_READ = createAsyncThunk("DoccSlice/docc_docc_read", /*#__PURE__*/_
|
|
|
33420
33625
|
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue, getState = _ref6.getState;
|
|
33421
33626
|
_context3.prev = 2;
|
|
33422
33627
|
id = payload.id;
|
|
33423
|
-
|
|
33424
|
-
"db_name": "primarycare",
|
|
33425
|
-
"entity": "CA_ClinicalDocumenttype",
|
|
33426
|
-
"filter": "CA_ClinicalDocumenttype.doccategory=='".concat(id, "' && CA_ClinicalDocumenttype.activestatus==true"),
|
|
33427
|
-
"return_fields": "{id:CA_ClinicalDocumenttype.id, _id:CA_ClinicalDocumenttype._id,docname:CA_ClinicalDocumenttype.docname,doccategory:CA_ClinicalDocumenttype.doccategory, formrefid:CA_ClinicalDocumenttype.formrefid}"
|
|
33428
|
-
};
|
|
33429
|
-
_context3.next = 7;
|
|
33628
|
+
_context3.next = 6;
|
|
33430
33629
|
return fetchData$1({
|
|
33431
|
-
body: JSON.stringify(
|
|
33630
|
+
body: JSON.stringify(queries$8.document(id))
|
|
33432
33631
|
}, __readDocumentUrl__);
|
|
33433
33632
|
|
|
33434
|
-
case
|
|
33633
|
+
case 6:
|
|
33435
33634
|
data = _context3.sent;
|
|
33436
33635
|
arr = []; // console.log( data.result)
|
|
33437
33636
|
|
|
@@ -33439,38 +33638,37 @@ var DOCC_DOCC_READ = createAsyncThunk("DoccSlice/docc_docc_read", /*#__PURE__*/_
|
|
|
33439
33638
|
var _v$docname, _v$doccategory, _v$formrefid, _v$_id2;
|
|
33440
33639
|
|
|
33441
33640
|
arr.push({
|
|
33442
|
-
label: (_v$docname = v === null || v === void 0 ? void 0 : v.docname) !== null && _v$docname !== void 0 ? _v$docname :
|
|
33443
|
-
value: (_v$doccategory = v === null || v === void 0 ? void 0 : v.doccategory) !== null && _v$doccategory !== void 0 ? _v$doccategory :
|
|
33444
|
-
formrefid: (_v$formrefid = v === null || v === void 0 ? void 0 : v.formrefid) !== null && _v$formrefid !== void 0 ? _v$formrefid :
|
|
33445
|
-
_id: (_v$_id2 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id2 !== void 0 ? _v$_id2 :
|
|
33641
|
+
label: (_v$docname = v === null || v === void 0 ? void 0 : v.docname) !== null && _v$docname !== void 0 ? _v$docname : "",
|
|
33642
|
+
value: (_v$doccategory = v === null || v === void 0 ? void 0 : v.doccategory) !== null && _v$doccategory !== void 0 ? _v$doccategory : "",
|
|
33643
|
+
formrefid: (_v$formrefid = v === null || v === void 0 ? void 0 : v.formrefid) !== null && _v$formrefid !== void 0 ? _v$formrefid : "",
|
|
33644
|
+
_id: (_v$_id2 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id2 !== void 0 ? _v$_id2 : ""
|
|
33446
33645
|
});
|
|
33447
33646
|
});
|
|
33448
33647
|
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33449
33648
|
data: arr
|
|
33450
33649
|
}));
|
|
33451
33650
|
|
|
33452
|
-
case
|
|
33453
|
-
_context3.prev =
|
|
33651
|
+
case 12:
|
|
33652
|
+
_context3.prev = 12;
|
|
33454
33653
|
_context3.t0 = _context3["catch"](2);
|
|
33455
33654
|
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33456
33655
|
message: _context3.t0.message
|
|
33457
33656
|
})));
|
|
33458
33657
|
|
|
33459
|
-
case
|
|
33658
|
+
case 15:
|
|
33460
33659
|
case "end":
|
|
33461
33660
|
return _context3.stop();
|
|
33462
33661
|
}
|
|
33463
33662
|
}
|
|
33464
|
-
}, _callee3, null, [[2,
|
|
33663
|
+
}, _callee3, null, [[2, 12]]);
|
|
33465
33664
|
})));
|
|
33466
|
-
var
|
|
33665
|
+
var DOCC_SPECIALITY = createAsyncThunk("DoccSlice/docc_speciality", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
33467
33666
|
var payload,
|
|
33468
33667
|
_ref8,
|
|
33469
33668
|
rejectWithValue,
|
|
33470
33669
|
getState,
|
|
33471
|
-
_docc_read,
|
|
33472
|
-
docc_read,
|
|
33473
33670
|
data,
|
|
33671
|
+
arr,
|
|
33474
33672
|
_args4 = arguments;
|
|
33475
33673
|
|
|
33476
33674
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -33480,42 +33678,50 @@ var DOCC_READ = createAsyncThunk("DoccSlice/docc_read", /*#__PURE__*/_asyncToGen
|
|
|
33480
33678
|
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
33481
33679
|
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue, getState = _ref8.getState;
|
|
33482
33680
|
_context4.prev = 2;
|
|
33483
|
-
|
|
33484
|
-
"db_name": dbName
|
|
33485
|
-
}, _defineProperty(_docc_read, "db_name", "primarycare"), _defineProperty(_docc_read, "entity", "CAPatientClinicalDocs"), _defineProperty(_docc_read, "filter", "CAPatientClinicalDocs.activestatus ==true"), _defineProperty(_docc_read, "return_fields", "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"), _docc_read);
|
|
33486
|
-
_context4.next = 6;
|
|
33681
|
+
_context4.next = 5;
|
|
33487
33682
|
return fetchData$1({
|
|
33488
|
-
body:
|
|
33683
|
+
body: queries$8.speciality
|
|
33489
33684
|
}, __readDocumentUrl__);
|
|
33490
33685
|
|
|
33491
|
-
case
|
|
33686
|
+
case 5:
|
|
33492
33687
|
data = _context4.sent;
|
|
33688
|
+
arr = [];
|
|
33689
|
+
data.result.map(function (v) {
|
|
33690
|
+
var _v$coding$0$display2, _v$coding4, _v$coding4$, _v$coding$0$Type2, _v$coding5, _v$coding5$, _v$coding$0$_id2, _v$coding6, _v$coding6$, _v$_id3;
|
|
33691
|
+
|
|
33692
|
+
arr.push({
|
|
33693
|
+
label: (_v$coding$0$display2 = v === null || v === void 0 ? void 0 : (_v$coding4 = v.coding) === null || _v$coding4 === void 0 ? void 0 : (_v$coding4$ = _v$coding4[0]) === null || _v$coding4$ === void 0 ? void 0 : _v$coding4$.display) !== null && _v$coding$0$display2 !== void 0 ? _v$coding$0$display2 : "",
|
|
33694
|
+
value: (_v$coding$0$Type2 = v === null || v === void 0 ? void 0 : (_v$coding5 = v.coding) === null || _v$coding5 === void 0 ? void 0 : (_v$coding5$ = _v$coding5[0]) === null || _v$coding5$ === void 0 ? void 0 : _v$coding5$.Type) !== null && _v$coding$0$Type2 !== void 0 ? _v$coding$0$Type2 : "",
|
|
33695
|
+
_id: (_v$coding$0$_id2 = v === null || v === void 0 ? void 0 : (_v$coding6 = v.coding) === null || _v$coding6 === void 0 ? void 0 : (_v$coding6$ = _v$coding6[0]) === null || _v$coding6$ === void 0 ? void 0 : _v$coding6$._id) !== null && _v$coding$0$_id2 !== void 0 ? _v$coding$0$_id2 : "",
|
|
33696
|
+
__id: (_v$_id3 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id3 !== void 0 ? _v$_id3 : ""
|
|
33697
|
+
});
|
|
33698
|
+
});
|
|
33493
33699
|
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33494
|
-
data:
|
|
33700
|
+
data: arr
|
|
33495
33701
|
}));
|
|
33496
33702
|
|
|
33497
|
-
case
|
|
33498
|
-
_context4.prev =
|
|
33703
|
+
case 11:
|
|
33704
|
+
_context4.prev = 11;
|
|
33499
33705
|
_context4.t0 = _context4["catch"](2);
|
|
33500
33706
|
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33501
33707
|
message: _context4.t0.message
|
|
33502
33708
|
})));
|
|
33503
33709
|
|
|
33504
|
-
case
|
|
33710
|
+
case 14:
|
|
33505
33711
|
case "end":
|
|
33506
33712
|
return _context4.stop();
|
|
33507
33713
|
}
|
|
33508
33714
|
}
|
|
33509
|
-
}, _callee4, null, [[2,
|
|
33715
|
+
}, _callee4, null, [[2, 11]]);
|
|
33510
33716
|
})));
|
|
33511
|
-
var
|
|
33717
|
+
var DOCC_ENCOUNTER = createAsyncThunk("DoccSlice/docc_encounter", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
33512
33718
|
var payload,
|
|
33513
33719
|
_ref10,
|
|
33514
33720
|
rejectWithValue,
|
|
33515
33721
|
getState,
|
|
33516
33722
|
id,
|
|
33517
|
-
docc_read,
|
|
33518
33723
|
data,
|
|
33724
|
+
arr,
|
|
33519
33725
|
_args5 = arguments;
|
|
33520
33726
|
|
|
33521
33727
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -33526,68 +33732,451 @@ var DOCC_SINGLE_READ = createAsyncThunk("DoccSlice/docc_single_read", /*#__PURE_
|
|
|
33526
33732
|
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue, getState = _ref10.getState;
|
|
33527
33733
|
_context5.prev = 2;
|
|
33528
33734
|
id = payload.id;
|
|
33529
|
-
|
|
33530
|
-
"db_name": dbName,
|
|
33531
|
-
"entity": "CAPatientClinicalDocs",
|
|
33532
|
-
"filter": "CAPatientClinicalDocs.activestatus ==true",
|
|
33533
|
-
"return_fields": "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
33534
|
-
};
|
|
33535
|
-
_context5.next = 7;
|
|
33735
|
+
_context5.next = 6;
|
|
33536
33736
|
return fetchData$1({
|
|
33537
|
-
body: JSON.stringify(
|
|
33737
|
+
body: JSON.stringify(queries$8.encounter(id))
|
|
33538
33738
|
}, __readDocumentUrl__);
|
|
33539
33739
|
|
|
33540
|
-
case
|
|
33740
|
+
case 6:
|
|
33541
33741
|
data = _context5.sent;
|
|
33742
|
+
arr = [];
|
|
33743
|
+
data.result.map(function (v) {
|
|
33744
|
+
var _v$_id4, _v$_id5, _v$_id6, _v$id, _v$encounterdate;
|
|
33745
|
+
|
|
33746
|
+
arr.push({
|
|
33747
|
+
label: (_v$_id4 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id4 !== void 0 ? _v$_id4 : "label",
|
|
33748
|
+
//encounter_no
|
|
33749
|
+
value: (_v$_id5 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id5 !== void 0 ? _v$_id5 : "",
|
|
33750
|
+
_id: (_v$_id6 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id6 !== void 0 ? _v$_id6 : "",
|
|
33751
|
+
id: (_v$id = v === null || v === void 0 ? void 0 : v.id) !== null && _v$id !== void 0 ? _v$id : "",
|
|
33752
|
+
encounterDate: (_v$encounterdate = v === null || v === void 0 ? void 0 : v.encounterdate) !== null && _v$encounterdate !== void 0 ? _v$encounterdate : 0
|
|
33753
|
+
});
|
|
33754
|
+
});
|
|
33542
33755
|
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33543
|
-
data:
|
|
33756
|
+
data: arr
|
|
33544
33757
|
}));
|
|
33545
33758
|
|
|
33546
|
-
case
|
|
33547
|
-
_context5.prev =
|
|
33759
|
+
case 12:
|
|
33760
|
+
_context5.prev = 12;
|
|
33548
33761
|
_context5.t0 = _context5["catch"](2);
|
|
33549
33762
|
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33550
33763
|
message: _context5.t0.message
|
|
33551
33764
|
})));
|
|
33552
33765
|
|
|
33553
|
-
case
|
|
33766
|
+
case 15:
|
|
33554
33767
|
case "end":
|
|
33555
33768
|
return _context5.stop();
|
|
33556
33769
|
}
|
|
33557
33770
|
}
|
|
33558
|
-
}, _callee5, null, [[2,
|
|
33771
|
+
}, _callee5, null, [[2, 12]]);
|
|
33559
33772
|
})));
|
|
33560
|
-
var
|
|
33561
|
-
|
|
33562
|
-
|
|
33563
|
-
|
|
33564
|
-
|
|
33565
|
-
|
|
33566
|
-
|
|
33567
|
-
|
|
33568
|
-
|
|
33569
|
-
|
|
33570
|
-
|
|
33571
|
-
|
|
33572
|
-
state.docc_save = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
33573
|
-
}), _defineProperty(_extraReducers$v, DOCC_SAVE_SERVICE.pending, function (state, action) {
|
|
33574
|
-
state.docc_save.loading = true;
|
|
33575
|
-
}), _defineProperty(_extraReducers$v, DOCC_SAVE_SERVICE.rejected, function (state, action) {
|
|
33576
|
-
var _action$payload2;
|
|
33773
|
+
var DOCC_PRACTITIONER = createAsyncThunk("DoccSlice/docc_practitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
33774
|
+
var payload,
|
|
33775
|
+
_ref12,
|
|
33776
|
+
rejectWithValue,
|
|
33777
|
+
getState,
|
|
33778
|
+
patient_id,
|
|
33779
|
+
encounter_id,
|
|
33780
|
+
data,
|
|
33781
|
+
res,
|
|
33782
|
+
arr,
|
|
33783
|
+
_args6 = arguments;
|
|
33577
33784
|
|
|
33578
|
-
|
|
33579
|
-
|
|
33580
|
-
|
|
33785
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
33786
|
+
while (1) {
|
|
33787
|
+
switch (_context6.prev = _context6.next) {
|
|
33788
|
+
case 0:
|
|
33789
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
33790
|
+
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue, getState = _ref12.getState;
|
|
33791
|
+
_context6.prev = 2;
|
|
33792
|
+
patient_id = payload.patient_id, encounter_id = payload.encounter_id;
|
|
33793
|
+
_context6.next = 6;
|
|
33794
|
+
return fetchData$1({
|
|
33795
|
+
body: JSON.stringify(queries$8.practitioner(patient_id, encounter_id))
|
|
33796
|
+
}, __readDocumentUrl__);
|
|
33581
33797
|
|
|
33582
|
-
|
|
33583
|
-
|
|
33584
|
-
|
|
33585
|
-
|
|
33586
|
-
|
|
33798
|
+
case 6:
|
|
33799
|
+
data = _context6.sent;
|
|
33800
|
+
res = data.result[0].Practitioner_id;
|
|
33801
|
+
arr = [];
|
|
33802
|
+
res === null || res === void 0 ? void 0 : res.map(function (v) {
|
|
33803
|
+
var _v$_id7, _v$_id8;
|
|
33587
33804
|
|
|
33588
|
-
|
|
33589
|
-
|
|
33590
|
-
|
|
33805
|
+
arr.push({
|
|
33806
|
+
label: (v === null || v === void 0 ? void 0 : v.name[0].text) ? " ".concat((v === null || v === void 0 ? void 0 : v.name[0].family) + " " + (v === null || v === void 0 ? void 0 : v.name[0].text) + " " + (v === null || v === void 0 ? void 0 : v.name[0].given)) : "",
|
|
33807
|
+
value: (_v$_id7 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id7 !== void 0 ? _v$_id7 : "",
|
|
33808
|
+
_id: (_v$_id8 = v === null || v === void 0 ? void 0 : v._id) !== null && _v$_id8 !== void 0 ? _v$_id8 : ""
|
|
33809
|
+
});
|
|
33810
|
+
});
|
|
33811
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33812
|
+
data: arr
|
|
33813
|
+
}));
|
|
33814
|
+
|
|
33815
|
+
case 13:
|
|
33816
|
+
_context6.prev = 13;
|
|
33817
|
+
_context6.t0 = _context6["catch"](2);
|
|
33818
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33819
|
+
message: _context6.t0.message
|
|
33820
|
+
})));
|
|
33821
|
+
|
|
33822
|
+
case 16:
|
|
33823
|
+
case "end":
|
|
33824
|
+
return _context6.stop();
|
|
33825
|
+
}
|
|
33826
|
+
}
|
|
33827
|
+
}, _callee6, null, [[2, 13]]);
|
|
33828
|
+
})));
|
|
33829
|
+
var DOCC_READ = createAsyncThunk("DoccSlice/docc_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
|
|
33830
|
+
var payload,
|
|
33831
|
+
_ref14,
|
|
33832
|
+
rejectWithValue,
|
|
33833
|
+
getState,
|
|
33834
|
+
data,
|
|
33835
|
+
res,
|
|
33836
|
+
_args7 = arguments;
|
|
33837
|
+
|
|
33838
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
33839
|
+
while (1) {
|
|
33840
|
+
switch (_context7.prev = _context7.next) {
|
|
33841
|
+
case 0:
|
|
33842
|
+
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
33843
|
+
_ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue, getState = _ref14.getState;
|
|
33844
|
+
_context7.prev = 2;
|
|
33845
|
+
_context7.next = 5;
|
|
33846
|
+
return fetchData$1({
|
|
33847
|
+
body: queries$8.doc_read
|
|
33848
|
+
}, __readDocumentUrl__);
|
|
33849
|
+
|
|
33850
|
+
case 5:
|
|
33851
|
+
data = _context7.sent;
|
|
33852
|
+
res = generateResJson$6(data.result);
|
|
33853
|
+
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33854
|
+
data: res
|
|
33855
|
+
}));
|
|
33856
|
+
|
|
33857
|
+
case 10:
|
|
33858
|
+
_context7.prev = 10;
|
|
33859
|
+
_context7.t0 = _context7["catch"](2);
|
|
33860
|
+
return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33861
|
+
message: _context7.t0.message
|
|
33862
|
+
})));
|
|
33863
|
+
|
|
33864
|
+
case 13:
|
|
33865
|
+
case "end":
|
|
33866
|
+
return _context7.stop();
|
|
33867
|
+
}
|
|
33868
|
+
}
|
|
33869
|
+
}, _callee7, null, [[2, 10]]);
|
|
33870
|
+
})));
|
|
33871
|
+
var DOCC_SINGLE_READ = createAsyncThunk("DoccSlice/docc_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
33872
|
+
var payload,
|
|
33873
|
+
_ref16,
|
|
33874
|
+
rejectWithValue,
|
|
33875
|
+
getState,
|
|
33876
|
+
key,
|
|
33877
|
+
state,
|
|
33878
|
+
ccState,
|
|
33879
|
+
data,
|
|
33880
|
+
res,
|
|
33881
|
+
_args8 = arguments;
|
|
33882
|
+
|
|
33883
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
33884
|
+
while (1) {
|
|
33885
|
+
switch (_context8.prev = _context8.next) {
|
|
33886
|
+
case 0:
|
|
33887
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
33888
|
+
_ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue, getState = _ref16.getState;
|
|
33889
|
+
_context8.prev = 2;
|
|
33890
|
+
key = payload.key;
|
|
33891
|
+
state = getState();
|
|
33892
|
+
ccState = JSON.parse(JSON.stringify(state.DoccSlice));
|
|
33893
|
+
_context8.next = 8;
|
|
33894
|
+
return fetchData$1({
|
|
33895
|
+
body: JSON.stringify(queries$8.doc_single_read(key))
|
|
33896
|
+
}, __readDocumentUrl__);
|
|
33897
|
+
|
|
33898
|
+
case 8:
|
|
33899
|
+
data = _context8.sent;
|
|
33900
|
+
res = generatesingleRead(data.result[0], ccState);
|
|
33901
|
+
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33902
|
+
data: res
|
|
33903
|
+
}));
|
|
33904
|
+
|
|
33905
|
+
case 13:
|
|
33906
|
+
_context8.prev = 13;
|
|
33907
|
+
_context8.t0 = _context8["catch"](2);
|
|
33908
|
+
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33909
|
+
message: _context8.t0.message
|
|
33910
|
+
})));
|
|
33911
|
+
|
|
33912
|
+
case 16:
|
|
33913
|
+
case "end":
|
|
33914
|
+
return _context8.stop();
|
|
33915
|
+
}
|
|
33916
|
+
}
|
|
33917
|
+
}, _callee8, null, [[2, 13]]);
|
|
33918
|
+
})));
|
|
33919
|
+
var DOCC_AGAINST_CATEGORY = createAsyncThunk("DoccSlice/docc_agnst_category", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
33920
|
+
var payload,
|
|
33921
|
+
_ref18,
|
|
33922
|
+
rejectWithValue,
|
|
33923
|
+
getState,
|
|
33924
|
+
category,
|
|
33925
|
+
speciality,
|
|
33926
|
+
encoumter,
|
|
33927
|
+
practitioner,
|
|
33928
|
+
data,
|
|
33929
|
+
res,
|
|
33930
|
+
_args9 = arguments;
|
|
33931
|
+
|
|
33932
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
33933
|
+
while (1) {
|
|
33934
|
+
switch (_context9.prev = _context9.next) {
|
|
33935
|
+
case 0:
|
|
33936
|
+
payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
33937
|
+
_ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue, getState = _ref18.getState;
|
|
33938
|
+
_context9.prev = 2;
|
|
33939
|
+
category = payload.category, speciality = payload.speciality, encoumter = payload.encoumter, practitioner = payload.practitioner;
|
|
33940
|
+
_context9.next = 6;
|
|
33941
|
+
return fetchData$1({
|
|
33942
|
+
body: JSON.stringify(queries$8.doc_agnst_category(category, speciality, encoumter, practitioner))
|
|
33943
|
+
}, __readDocumentUrl__);
|
|
33944
|
+
|
|
33945
|
+
case 6:
|
|
33946
|
+
data = _context9.sent;
|
|
33947
|
+
res = genreateDocAgnstCategory(data.result);
|
|
33948
|
+
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33949
|
+
data: res
|
|
33950
|
+
}));
|
|
33951
|
+
|
|
33952
|
+
case 11:
|
|
33953
|
+
_context9.prev = 11;
|
|
33954
|
+
_context9.t0 = _context9["catch"](2);
|
|
33955
|
+
return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33956
|
+
message: _context9.t0.message
|
|
33957
|
+
})));
|
|
33958
|
+
|
|
33959
|
+
case 14:
|
|
33960
|
+
case "end":
|
|
33961
|
+
return _context9.stop();
|
|
33962
|
+
}
|
|
33963
|
+
}
|
|
33964
|
+
}, _callee9, null, [[2, 11]]);
|
|
33965
|
+
})));
|
|
33966
|
+
var DOCC_AGAINST_ENCOUNTER = createAsyncThunk("DoccSlice/docc_agnst_encoumter", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
33967
|
+
var payload,
|
|
33968
|
+
_ref20,
|
|
33969
|
+
rejectWithValue,
|
|
33970
|
+
getState,
|
|
33971
|
+
patient_id,
|
|
33972
|
+
encounter_id,
|
|
33973
|
+
data,
|
|
33974
|
+
_args10 = arguments;
|
|
33975
|
+
|
|
33976
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
33977
|
+
while (1) {
|
|
33978
|
+
switch (_context10.prev = _context10.next) {
|
|
33979
|
+
case 0:
|
|
33980
|
+
payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
|
|
33981
|
+
_ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue, getState = _ref20.getState;
|
|
33982
|
+
_context10.prev = 2;
|
|
33983
|
+
patient_id = payload.patient_id, encounter_id = payload.encounter_id;
|
|
33984
|
+
_context10.next = 6;
|
|
33985
|
+
return fetchData$1({
|
|
33986
|
+
body: JSON.stringify(queries$8.doc_agnst_encounter(patient_id, encounter_id))
|
|
33987
|
+
}, __readDocumentUrl__);
|
|
33988
|
+
|
|
33989
|
+
case 6:
|
|
33990
|
+
data = _context10.sent;
|
|
33991
|
+
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
33992
|
+
data: data.result
|
|
33993
|
+
}));
|
|
33994
|
+
|
|
33995
|
+
case 10:
|
|
33996
|
+
_context10.prev = 10;
|
|
33997
|
+
_context10.t0 = _context10["catch"](2);
|
|
33998
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
33999
|
+
message: _context10.t0.message
|
|
34000
|
+
})));
|
|
34001
|
+
|
|
34002
|
+
case 13:
|
|
34003
|
+
case "end":
|
|
34004
|
+
return _context10.stop();
|
|
34005
|
+
}
|
|
34006
|
+
}
|
|
34007
|
+
}, _callee10, null, [[2, 10]]);
|
|
34008
|
+
})));
|
|
34009
|
+
var DOCC_AGAINST_SPECIALITY = createAsyncThunk("DoccSlice/docc_agnst_speciality", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
34010
|
+
var payload,
|
|
34011
|
+
_ref22,
|
|
34012
|
+
rejectWithValue,
|
|
34013
|
+
getState,
|
|
34014
|
+
speciality,
|
|
34015
|
+
data,
|
|
34016
|
+
res,
|
|
34017
|
+
_args11 = arguments;
|
|
34018
|
+
|
|
34019
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
34020
|
+
while (1) {
|
|
34021
|
+
switch (_context11.prev = _context11.next) {
|
|
34022
|
+
case 0:
|
|
34023
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
34024
|
+
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue, getState = _ref22.getState;
|
|
34025
|
+
_context11.prev = 2;
|
|
34026
|
+
speciality = payload.speciality;
|
|
34027
|
+
_context11.next = 6;
|
|
34028
|
+
return fetchData$1({
|
|
34029
|
+
body: JSON.stringify(queries$8.doc_agnst_speciality(speciality))
|
|
34030
|
+
}, __readDocumentUrl__);
|
|
34031
|
+
|
|
34032
|
+
case 6:
|
|
34033
|
+
data = _context11.sent;
|
|
34034
|
+
res = genreateDocAgnstCategory(data.result);
|
|
34035
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34036
|
+
data: res
|
|
34037
|
+
}));
|
|
34038
|
+
|
|
34039
|
+
case 11:
|
|
34040
|
+
_context11.prev = 11;
|
|
34041
|
+
_context11.t0 = _context11["catch"](2);
|
|
34042
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34043
|
+
message: _context11.t0.message
|
|
34044
|
+
})));
|
|
34045
|
+
|
|
34046
|
+
case 14:
|
|
34047
|
+
case "end":
|
|
34048
|
+
return _context11.stop();
|
|
34049
|
+
}
|
|
34050
|
+
}
|
|
34051
|
+
}, _callee11, null, [[2, 11]]);
|
|
34052
|
+
})));
|
|
34053
|
+
var DOCC_AGAINST_DOCTYPE = createAsyncThunk("DoccSlice/docc_agnst_doctype", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
34054
|
+
var payload,
|
|
34055
|
+
_ref24,
|
|
34056
|
+
rejectWithValue,
|
|
34057
|
+
getState,
|
|
34058
|
+
doctype,
|
|
34059
|
+
data,
|
|
34060
|
+
_args12 = arguments;
|
|
34061
|
+
|
|
34062
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
34063
|
+
while (1) {
|
|
34064
|
+
switch (_context12.prev = _context12.next) {
|
|
34065
|
+
case 0:
|
|
34066
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
34067
|
+
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue, getState = _ref24.getState;
|
|
34068
|
+
_context12.prev = 2;
|
|
34069
|
+
doctype = payload.doctype;
|
|
34070
|
+
_context12.next = 6;
|
|
34071
|
+
return fetchData$1({
|
|
34072
|
+
body: JSON.stringify(queries$8.doc_agnst_doctype(doctype))
|
|
34073
|
+
}, __readDocumentUrl__);
|
|
34074
|
+
|
|
34075
|
+
case 6:
|
|
34076
|
+
data = _context12.sent;
|
|
34077
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34078
|
+
data: data.result
|
|
34079
|
+
}));
|
|
34080
|
+
|
|
34081
|
+
case 10:
|
|
34082
|
+
_context12.prev = 10;
|
|
34083
|
+
_context12.t0 = _context12["catch"](2);
|
|
34084
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34085
|
+
message: _context12.t0.message
|
|
34086
|
+
})));
|
|
34087
|
+
|
|
34088
|
+
case 13:
|
|
34089
|
+
case "end":
|
|
34090
|
+
return _context12.stop();
|
|
34091
|
+
}
|
|
34092
|
+
}
|
|
34093
|
+
}, _callee12, null, [[2, 10]]);
|
|
34094
|
+
})));
|
|
34095
|
+
var PRACTITIONER_AGAINST_CATEGORY = createAsyncThunk("DoccSlice/practioner_agnst_category", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
34096
|
+
var payload,
|
|
34097
|
+
_ref26,
|
|
34098
|
+
rejectWithValue,
|
|
34099
|
+
getState,
|
|
34100
|
+
patient_id,
|
|
34101
|
+
doc_Category,
|
|
34102
|
+
doc_Type,
|
|
34103
|
+
data,
|
|
34104
|
+
res,
|
|
34105
|
+
_args13 = arguments;
|
|
34106
|
+
|
|
34107
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
34108
|
+
while (1) {
|
|
34109
|
+
switch (_context13.prev = _context13.next) {
|
|
34110
|
+
case 0:
|
|
34111
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
34112
|
+
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue, getState = _ref26.getState;
|
|
34113
|
+
_context13.prev = 2;
|
|
34114
|
+
patient_id = payload.patient_id, doc_Category = payload.doc_Category, doc_Type = payload.doc_Type;
|
|
34115
|
+
_context13.next = 6;
|
|
34116
|
+
return fetchData$1({
|
|
34117
|
+
body: JSON.stringify(queries$8.practionerAgainstCategory(patient_id, doc_Category, doc_Type))
|
|
34118
|
+
}, __readDocumentUrl__);
|
|
34119
|
+
|
|
34120
|
+
case 6:
|
|
34121
|
+
data = _context13.sent;
|
|
34122
|
+
res = generatePractitoner(data.result);
|
|
34123
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34124
|
+
data: res
|
|
34125
|
+
}));
|
|
34126
|
+
|
|
34127
|
+
case 11:
|
|
34128
|
+
_context13.prev = 11;
|
|
34129
|
+
_context13.t0 = _context13["catch"](2);
|
|
34130
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34131
|
+
message: _context13.t0.message
|
|
34132
|
+
})));
|
|
34133
|
+
|
|
34134
|
+
case 14:
|
|
34135
|
+
case "end":
|
|
34136
|
+
return _context13.stop();
|
|
34137
|
+
}
|
|
34138
|
+
}
|
|
34139
|
+
}, _callee13, null, [[2, 11]]);
|
|
34140
|
+
})));
|
|
34141
|
+
var DoccSlice = createSlice({
|
|
34142
|
+
name: "DoccSlice",
|
|
34143
|
+
initialState: {
|
|
34144
|
+
docc_save: _objectSpread2({}, defaultState.Info),
|
|
34145
|
+
docc_cat_read: _objectSpread2({}, defaultState.Info),
|
|
34146
|
+
docc_docc_read: _objectSpread2({}, defaultState.Info),
|
|
34147
|
+
docc_read: _objectSpread2({}, defaultState.Info),
|
|
34148
|
+
docc_single_read: _objectSpread2({}, defaultState.Info),
|
|
34149
|
+
docc_speciality: _objectSpread2({}, defaultState.List),
|
|
34150
|
+
doc_encounter: _objectSpread2({}, defaultState.List),
|
|
34151
|
+
doc_practitioner: _objectSpread2({}, defaultState.List),
|
|
34152
|
+
doc_agnst_category: _objectSpread2({}, defaultState.List),
|
|
34153
|
+
doc_agnst_encounter: _objectSpread2({}, defaultState.List),
|
|
34154
|
+
doc_agnst_speciality: _objectSpread2({}, defaultState.List),
|
|
34155
|
+
doc_agnst_docType: _objectSpread2({}, defaultState.List),
|
|
34156
|
+
practioner_agnst_category: _objectSpread2({}, defaultState.List)
|
|
34157
|
+
},
|
|
34158
|
+
extraReducers: (_extraReducers$v = {}, _defineProperty(_extraReducers$v, DOCC_SAVE_SERVICE.fulfilled, function (state, action) {
|
|
34159
|
+
var _action$payload;
|
|
34160
|
+
|
|
34161
|
+
state.docc_save = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
34162
|
+
}), _defineProperty(_extraReducers$v, DOCC_SAVE_SERVICE.pending, function (state, action) {
|
|
34163
|
+
state.docc_save.loading = true;
|
|
34164
|
+
}), _defineProperty(_extraReducers$v, DOCC_SAVE_SERVICE.rejected, function (state, action) {
|
|
34165
|
+
var _action$payload2;
|
|
34166
|
+
|
|
34167
|
+
state.docc_save = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
34168
|
+
}), _defineProperty(_extraReducers$v, DOCC_CATE_READ.fulfilled, function (state, action) {
|
|
34169
|
+
var _action$payload3;
|
|
34170
|
+
|
|
34171
|
+
state.docc_cat_read = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
34172
|
+
}), _defineProperty(_extraReducers$v, DOCC_CATE_READ.pending, function (state, action) {
|
|
34173
|
+
state.docc_cat_read.loading = true;
|
|
34174
|
+
}), _defineProperty(_extraReducers$v, DOCC_CATE_READ.rejected, function (state, action) {
|
|
34175
|
+
var _action$payload4;
|
|
34176
|
+
|
|
34177
|
+
state.docc_cat_read = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
34178
|
+
}), _defineProperty(_extraReducers$v, DOCC_DOCC_READ.fulfilled, function (state, action) {
|
|
34179
|
+
var _action$payload5;
|
|
33591
34180
|
|
|
33592
34181
|
state.docc_docc_read = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
33593
34182
|
}), _defineProperty(_extraReducers$v, DOCC_DOCC_READ.pending, function (state, action) {
|
|
@@ -33596,34 +34185,122 @@ var DoccSlice = createSlice({
|
|
|
33596
34185
|
var _action$payload6;
|
|
33597
34186
|
|
|
33598
34187
|
state.docc_docc_read = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
33599
|
-
}), _defineProperty(_extraReducers$v,
|
|
34188
|
+
}), _defineProperty(_extraReducers$v, DOCC_SPECIALITY.fulfilled, function (state, action) {
|
|
33600
34189
|
var _action$payload7;
|
|
33601
34190
|
|
|
33602
|
-
state.
|
|
34191
|
+
state.docc_speciality = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
|
|
34192
|
+
}), _defineProperty(_extraReducers$v, DOCC_SPECIALITY.pending, function (state, action) {
|
|
34193
|
+
state.docc_speciality.loading = true;
|
|
34194
|
+
}), _defineProperty(_extraReducers$v, DOCC_SPECIALITY.rejected, function (state, action) {
|
|
34195
|
+
var _action$payload8;
|
|
34196
|
+
|
|
34197
|
+
state.docc_speciality = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
34198
|
+
}), _defineProperty(_extraReducers$v, DOCC_ENCOUNTER.fulfilled, function (state, action) {
|
|
34199
|
+
var _action$payload9;
|
|
34200
|
+
|
|
34201
|
+
state.doc_encounter = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
34202
|
+
}), _defineProperty(_extraReducers$v, DOCC_ENCOUNTER.pending, function (state, action) {
|
|
34203
|
+
state.doc_encounter.loading = true;
|
|
34204
|
+
}), _defineProperty(_extraReducers$v, DOCC_ENCOUNTER.rejected, function (state, action) {
|
|
34205
|
+
var _action$payload10;
|
|
34206
|
+
|
|
34207
|
+
state.doc_encounter = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
34208
|
+
}), _defineProperty(_extraReducers$v, DOCC_PRACTITIONER.fulfilled, function (state, action) {
|
|
34209
|
+
var _action$payload11;
|
|
34210
|
+
|
|
34211
|
+
state.doc_practitioner = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
34212
|
+
}), _defineProperty(_extraReducers$v, DOCC_PRACTITIONER.pending, function (state, action) {
|
|
34213
|
+
state.doc_practitioner.loading = true;
|
|
34214
|
+
}), _defineProperty(_extraReducers$v, DOCC_PRACTITIONER.rejected, function (state, action) {
|
|
34215
|
+
var _action$payload12;
|
|
34216
|
+
|
|
34217
|
+
state.doc_practitioner = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
34218
|
+
}), _defineProperty(_extraReducers$v, DOCC_READ.fulfilled, function (state, action) {
|
|
34219
|
+
var _action$payload13;
|
|
34220
|
+
|
|
34221
|
+
state.docc_read = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
|
|
33603
34222
|
}), _defineProperty(_extraReducers$v, DOCC_READ.pending, function (state, action) {
|
|
33604
34223
|
state.docc_read.loading = true;
|
|
33605
34224
|
}), _defineProperty(_extraReducers$v, DOCC_READ.rejected, function (state, action) {
|
|
33606
|
-
var _action$
|
|
34225
|
+
var _action$payload14;
|
|
33607
34226
|
|
|
33608
|
-
state.docc_read = (_action$
|
|
34227
|
+
state.docc_read = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
|
|
33609
34228
|
}), _defineProperty(_extraReducers$v, DOCC_SINGLE_READ.fulfilled, function (state, action) {
|
|
33610
|
-
var _action$
|
|
34229
|
+
var _action$payload15;
|
|
33611
34230
|
|
|
33612
|
-
state.docc_single_read = (_action$
|
|
34231
|
+
state.docc_single_read = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
|
|
33613
34232
|
}), _defineProperty(_extraReducers$v, DOCC_SINGLE_READ.pending, function (state, action) {
|
|
33614
34233
|
state.docc_single_read.loading = true;
|
|
33615
34234
|
}), _defineProperty(_extraReducers$v, DOCC_SINGLE_READ.rejected, function (state, action) {
|
|
33616
|
-
var _action$
|
|
34235
|
+
var _action$payload16;
|
|
34236
|
+
|
|
34237
|
+
state.docc_single_read = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
|
|
34238
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_CATEGORY.fulfilled, function (state, action) {
|
|
34239
|
+
var _action$payload17;
|
|
34240
|
+
|
|
34241
|
+
state.doc_agnst_category = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
|
|
34242
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_CATEGORY.pending, function (state, action) {
|
|
34243
|
+
state.doc_agnst_category.loading = true;
|
|
34244
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_CATEGORY.rejected, function (state, action) {
|
|
34245
|
+
var _action$payload18;
|
|
34246
|
+
|
|
34247
|
+
state.doc_agnst_category = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
|
|
34248
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_ENCOUNTER.fulfilled, function (state, action) {
|
|
34249
|
+
var _action$payload19;
|
|
34250
|
+
|
|
34251
|
+
state.doc_agnst_encounter = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
|
|
34252
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_ENCOUNTER.pending, function (state, action) {
|
|
34253
|
+
state.doc_agnst_encounter.loading = true;
|
|
34254
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_ENCOUNTER.rejected, function (state, action) {
|
|
34255
|
+
var _action$payload20;
|
|
34256
|
+
|
|
34257
|
+
state.doc_agnst_encounter = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
|
|
34258
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_SPECIALITY.fulfilled, function (state, action) {
|
|
34259
|
+
var _action$payload21;
|
|
34260
|
+
|
|
34261
|
+
state.doc_agnst_speciality = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
|
|
34262
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_SPECIALITY.pending, function (state, action) {
|
|
34263
|
+
state.doc_agnst_speciality.loading = true;
|
|
34264
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_SPECIALITY.rejected, function (state, action) {
|
|
34265
|
+
var _action$payload22;
|
|
34266
|
+
|
|
34267
|
+
state.doc_agnst_speciality = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
|
|
34268
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_DOCTYPE.fulfilled, function (state, action) {
|
|
34269
|
+
var _action$payload23;
|
|
34270
|
+
|
|
34271
|
+
state.doc_agnst_docType = (_action$payload23 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload23 !== void 0 ? _action$payload23 : {};
|
|
34272
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_DOCTYPE.pending, function (state, action) {
|
|
34273
|
+
state.doc_agnst_docType.loading = true;
|
|
34274
|
+
}), _defineProperty(_extraReducers$v, DOCC_AGAINST_DOCTYPE.rejected, function (state, action) {
|
|
34275
|
+
var _action$payload24;
|
|
34276
|
+
|
|
34277
|
+
state.doc_agnst_docType = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : {};
|
|
34278
|
+
}), _defineProperty(_extraReducers$v, PRACTITIONER_AGAINST_CATEGORY.fulfilled, function (state, action) {
|
|
34279
|
+
var _action$payload25;
|
|
34280
|
+
|
|
34281
|
+
state.practioner_agnst_category = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : {};
|
|
34282
|
+
}), _defineProperty(_extraReducers$v, PRACTITIONER_AGAINST_CATEGORY.pending, function (state, action) {
|
|
34283
|
+
state.practioner_agnst_category.loading = true;
|
|
34284
|
+
}), _defineProperty(_extraReducers$v, PRACTITIONER_AGAINST_CATEGORY.rejected, function (state, action) {
|
|
34285
|
+
var _action$payload26;
|
|
33617
34286
|
|
|
33618
|
-
state.
|
|
34287
|
+
state.practioner_agnst_category = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : {};
|
|
33619
34288
|
}), _extraReducers$v)
|
|
33620
34289
|
});
|
|
33621
34290
|
var DoccActions = {
|
|
33622
34291
|
DOCC_SAVE_SERVICE: DOCC_SAVE_SERVICE,
|
|
33623
34292
|
DOCC_CATE_READ: DOCC_CATE_READ,
|
|
33624
34293
|
DOCC_DOCC_READ: DOCC_DOCC_READ,
|
|
34294
|
+
DOCC_SPECIALITY: DOCC_SPECIALITY,
|
|
34295
|
+
DOCC_ENCOUNTER: DOCC_ENCOUNTER,
|
|
34296
|
+
DOCC_PRACTITIONER: DOCC_PRACTITIONER,
|
|
33625
34297
|
DOCC_READ: DOCC_READ,
|
|
33626
|
-
DOCC_SINGLE_READ: DOCC_SINGLE_READ
|
|
34298
|
+
DOCC_SINGLE_READ: DOCC_SINGLE_READ,
|
|
34299
|
+
DOCC_AGAINST_CATEGORY: DOCC_AGAINST_CATEGORY,
|
|
34300
|
+
DOCC_AGAINST_ENCOUNTER: DOCC_AGAINST_ENCOUNTER,
|
|
34301
|
+
DOCC_AGAINST_SPECIALITY: DOCC_AGAINST_SPECIALITY,
|
|
34302
|
+
DOCC_AGAINST_DOCTYPE: DOCC_AGAINST_DOCTYPE,
|
|
34303
|
+
PRACTITIONER_AGAINST_CATEGORY: PRACTITIONER_AGAINST_CATEGORY
|
|
33627
34304
|
};
|
|
33628
34305
|
var DoccSlice$1 = DoccSlice.reducer;
|
|
33629
34306
|
|
|
@@ -33704,7 +34381,7 @@ var clinicInfoActions = {
|
|
|
33704
34381
|
};
|
|
33705
34382
|
var clinicInfoSlice$1 = clinicInfoSlice.reducer;
|
|
33706
34383
|
|
|
33707
|
-
var queries$
|
|
34384
|
+
var queries$9 = {
|
|
33708
34385
|
getPractioner: function getPractioner() {
|
|
33709
34386
|
var obj = {
|
|
33710
34387
|
db_name: dbName,
|
|
@@ -33876,9 +34553,9 @@ var config$2 = [{
|
|
|
33876
34553
|
|
|
33877
34554
|
if (Array.isArray(data.result)) {
|
|
33878
34555
|
data.result.forEach(function (d) {
|
|
33879
|
-
checkinTriage.push(Number(d.differenceCheckedintoTriage).toFixed(1));
|
|
33880
|
-
triageConsultation.push(Number(d.differenceTriagetoInprogress).toFixed(1));
|
|
33881
|
-
overall.push(Number(d.Total).toFixed(1));
|
|
34556
|
+
checkinTriage.push(Number(Number(d.differenceCheckedintoTriage).toFixed(1)));
|
|
34557
|
+
triageConsultation.push(Number(Number(d.differenceTriagetoInprogress).toFixed(1)));
|
|
34558
|
+
overall.push(Number(Number(d.Total).toFixed(1)));
|
|
33882
34559
|
});
|
|
33883
34560
|
}
|
|
33884
34561
|
|
|
@@ -33929,7 +34606,7 @@ var getAverage = function getAverage() {
|
|
|
33929
34606
|
return a + b;
|
|
33930
34607
|
}, 0);
|
|
33931
34608
|
var avg = sum / arr.length;
|
|
33932
|
-
return avg;
|
|
34609
|
+
return avg.toFixed(2);
|
|
33933
34610
|
};
|
|
33934
34611
|
|
|
33935
34612
|
var actionInfo$2 = {};
|
|
@@ -33966,7 +34643,7 @@ config$2.forEach(function (c) {
|
|
|
33966
34643
|
|
|
33967
34644
|
case 4:
|
|
33968
34645
|
_context.prev = 4;
|
|
33969
|
-
body = queries$
|
|
34646
|
+
body = queries$9[c.queryName || c.sliceName](c.makePayload ? c.makePayload(payload) : payload);
|
|
33970
34647
|
_context.next = 8;
|
|
33971
34648
|
return fetchData$1({
|
|
33972
34649
|
body: JSON.stringify(body)
|
|
@@ -34241,6 +34918,405 @@ var highPriorityActions = {
|
|
|
34241
34918
|
};
|
|
34242
34919
|
var highPriorityApiSlice$1 = highPriorityApiSlice.reducer;
|
|
34243
34920
|
|
|
34921
|
+
var query = {
|
|
34922
|
+
getAppointments: function getAppointments(data) {
|
|
34923
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService,Appointment\",\n \"filter\": {\n \"HealthcareService\": \"HealthcareService.OrgID == 2\",\n \"Appointment\": \"Appointment.HealthcareServiceID[*] ANY == HealthcareService.id && Appointment.start >= 1624725000 && Appointment.end <= 1624726800\"\n },\n \"return_fields\": \"merge(Appointment,{HealthcareServiceID:HealthcareService},{SpecialtyID: (for c in CodeableConceptMaster filter c.id IN Appointment.SpecialtyID return merge(c,{coding:(for cod in CodingMaster filter cod._id in c.coding return cod.display)}))},{PersonID:(for p in Person filter p.Id IN Appointment.PersonID return document(p.name))},{practitionerID: (for q in Practitioner filter q.id IN Appointment.practitionerID return document(q.name))})\"\n }");
|
|
34924
|
+
},
|
|
34925
|
+
getFirstVisits: function getFirstVisits(data) {
|
|
34926
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService,Appointment\",\n \"filter\": {\n \"HealthcareService\": \"HealthcareService.OrgID == 2\",\n \"Appointment\": \"Appointment.HealthcareServiceID[*] ANY == HealthcareService.id && Appointment.start >= 1624725000 && Appointment.end <= 1624726800 && Appointment.appointmentType == 'first visit'\"\n },\n \"return_fields\": \"merge(Appointment,{HealthcareServiceID:HealthcareService},{SpecialtyID: (for c in CodeableConceptMaster filter c.id IN Appointment.SpecialtyID return merge(c,{coding:(for cod in CodingMaster filter cod._id in c.coding return cod.display)}))},{PersonID:(for p in Person filter p.Id IN Appointment.PersonID return document(p.name))},{practitionerID: (for q in Practitioner filter q.id IN Appointment.practitionerID return document(q.name))})\"\n }\n ");
|
|
34927
|
+
},
|
|
34928
|
+
getOtherVisits: function getOtherVisits(data) {
|
|
34929
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService,Appointment\",\n \"filter\": {\n \"HealthcareService\": \"HealthcareService.OrgID == 2\",\n \"Appointment\": \"Appointment.HealthcareServiceID[*] ANY == HealthcareService.id && Appointment.start >= 1624725000 && Appointment.end <= 1624726800 && Appointment.appointmentType != 'walkin' && Appointment.appointmentType != 'first visit' && Appointment.appointmentType != 'new patient'\"\n },\n \"return_fields\": \"merge(Appointment,{HealthcareServiceID:HealthcareService},{SpecialtyID: (for c in CodeableConceptMaster filter c.id IN Appointment.SpecialtyID return merge(c,{coding:(for cod in CodingMaster filter cod._id in c.coding return cod.display)}))},{PersonID:(for p in Person filter p.Id IN Appointment.PersonID return document(p.name))},{practitionerID: (for q in Practitioner filter q.id IN Appointment.practitionerID return document(q.name))})\"\n }\n ");
|
|
34930
|
+
},
|
|
34931
|
+
getWalkIns: function getWalkIns(data) {
|
|
34932
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService,Appointment\",\n \"filter\": {\n \"HealthcareService\": \"HealthcareService.OrgID == 2\",\n \"Appointment\": \"Appointment.HealthcareServiceID[*] ANY == HealthcareService.id && Appointment.start >= 1624725000 && Appointment.end <= 1624726800 && Appointment.appointmentType == 'walkin'\"\n },\n \"return_fields\": \"merge(Appointment,{HealthcareServiceID:HealthcareService},{SpecialtyID: (for c in CodeableConceptMaster filter c.id IN Appointment.SpecialtyID return merge(c,{coding:(for cod in CodingMaster filter cod._id in c.coding return cod.display)}))},{PersonID:(for p in Person filter p.Id IN Appointment.PersonID return document(p.name))},{practitionerID: (for q in Practitioner filter q.id IN Appointment.practitionerID return document(q.name))})\"\n }\n ");
|
|
34933
|
+
},
|
|
34934
|
+
getNewPatients: function getNewPatients(data) {
|
|
34935
|
+
return "\n {\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"HealthcareService,Appointment\",\n \"filter\": {\n \"HealthcareService\": \"HealthcareService.OrgID == 2\",\n \"Appointment\": \"Appointment.HealthcareServiceID[*] ANY == HealthcareService.id && Appointment.start >= 1624725000 && Appointment.end <= 1624726800 && Appointment.appointmentType == 'new patient'\"\n },\n \"return_fields\": \"merge(Appointment,{HealthcareServiceID:HealthcareService},{SpecialtyID: (for c in CodeableConceptMaster filter c.id IN Appointment.SpecialtyID return merge(c,{coding:(for cod in CodingMaster filter cod._id in c.coding return cod.display)}))},{PersonID:(for p in Person filter p.Id IN Appointment.PersonID return document(p.name))},{practitionerID: (for q in Practitioner filter q.id IN Appointment.practitionerID return document(q.name))})\"\n }\n ");
|
|
34936
|
+
}
|
|
34937
|
+
};
|
|
34938
|
+
|
|
34939
|
+
var _extraReducers$y;
|
|
34940
|
+
var GET_APPOINTMENTS = createAsyncThunk("dashboardComponentApiSlice/getAppointments", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
34941
|
+
var payload,
|
|
34942
|
+
_ref2,
|
|
34943
|
+
rejectWithValue,
|
|
34944
|
+
_data$result,
|
|
34945
|
+
data,
|
|
34946
|
+
returnedData,
|
|
34947
|
+
_args = arguments;
|
|
34948
|
+
|
|
34949
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34950
|
+
while (1) {
|
|
34951
|
+
switch (_context.prev = _context.next) {
|
|
34952
|
+
case 0:
|
|
34953
|
+
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
34954
|
+
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
34955
|
+
_context.prev = 2;
|
|
34956
|
+
_context.next = 5;
|
|
34957
|
+
return fetchData$1({
|
|
34958
|
+
body: query.getAppointments()
|
|
34959
|
+
}, __readDocumentUrl__);
|
|
34960
|
+
|
|
34961
|
+
case 5:
|
|
34962
|
+
data = _context.sent;
|
|
34963
|
+
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (_) {
|
|
34964
|
+
var _$PersonID, _$PersonID$, _$PersonID$$, _$SpecialtyID$;
|
|
34965
|
+
|
|
34966
|
+
return {
|
|
34967
|
+
"img": 'https://www.fillmurray.com/640/360',
|
|
34968
|
+
"name": _ === null || _ === void 0 ? void 0 : (_$PersonID = _.PersonID) === null || _$PersonID === void 0 ? void 0 : (_$PersonID$ = _$PersonID[0]) === null || _$PersonID$ === void 0 ? void 0 : (_$PersonID$$ = _$PersonID$[0]) === null || _$PersonID$$ === void 0 ? void 0 : _$PersonID$$.text,
|
|
34969
|
+
"mrn": 'MRN',
|
|
34970
|
+
"date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
|
|
34971
|
+
"time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
|
|
34972
|
+
"speciality": _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$ = _.SpecialtyID[0]) === null || _$SpecialtyID$ === void 0 ? void 0 : _$SpecialtyID$.text,
|
|
34973
|
+
"clinic": 'Clinic',
|
|
34974
|
+
"dob": 'Dob',
|
|
34975
|
+
"contact": 'Contact',
|
|
34976
|
+
"visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
|
|
34977
|
+
"appointmentStatus": 'Status',
|
|
34978
|
+
"Register Visit": true,
|
|
34979
|
+
"Modify Appointment": true,
|
|
34980
|
+
"Cancel Appointment": true,
|
|
34981
|
+
"View Profile": true
|
|
34982
|
+
};
|
|
34983
|
+
}) : [];
|
|
34984
|
+
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34985
|
+
data: returnedData
|
|
34986
|
+
}));
|
|
34987
|
+
|
|
34988
|
+
case 10:
|
|
34989
|
+
_context.prev = 10;
|
|
34990
|
+
_context.t0 = _context["catch"](2);
|
|
34991
|
+
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34992
|
+
message: _context.t0.message
|
|
34993
|
+
})));
|
|
34994
|
+
|
|
34995
|
+
case 13:
|
|
34996
|
+
case "end":
|
|
34997
|
+
return _context.stop();
|
|
34998
|
+
}
|
|
34999
|
+
}
|
|
35000
|
+
}, _callee, null, [[2, 10]]);
|
|
35001
|
+
})));
|
|
35002
|
+
var GET_FIRST_VISITS = createAsyncThunk("dashboardComponentApiSlice/getFirstVisits", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
35003
|
+
var payload,
|
|
35004
|
+
_ref4,
|
|
35005
|
+
rejectWithValue,
|
|
35006
|
+
_data$result2,
|
|
35007
|
+
data,
|
|
35008
|
+
returnedData,
|
|
35009
|
+
_args2 = arguments;
|
|
35010
|
+
|
|
35011
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
35012
|
+
while (1) {
|
|
35013
|
+
switch (_context2.prev = _context2.next) {
|
|
35014
|
+
case 0:
|
|
35015
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
35016
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
35017
|
+
_context2.prev = 2;
|
|
35018
|
+
_context2.next = 5;
|
|
35019
|
+
return fetchData$1({
|
|
35020
|
+
body: query.getFirstVisits()
|
|
35021
|
+
}, __readDocumentUrl__);
|
|
35022
|
+
|
|
35023
|
+
case 5:
|
|
35024
|
+
data = _context2.sent;
|
|
35025
|
+
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : _data$result2.map(function (_) {
|
|
35026
|
+
var _$PersonID2, _$PersonID2$, _$PersonID2$$, _$SpecialtyID$2;
|
|
35027
|
+
|
|
35028
|
+
return {
|
|
35029
|
+
"img": 'https://www.fillmurray.com/640/360',
|
|
35030
|
+
"name": _ === null || _ === void 0 ? void 0 : (_$PersonID2 = _.PersonID) === null || _$PersonID2 === void 0 ? void 0 : (_$PersonID2$ = _$PersonID2[0]) === null || _$PersonID2$ === void 0 ? void 0 : (_$PersonID2$$ = _$PersonID2$[0]) === null || _$PersonID2$$ === void 0 ? void 0 : _$PersonID2$$.text,
|
|
35031
|
+
"mrn": 'MRN',
|
|
35032
|
+
"date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
|
|
35033
|
+
"time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
|
|
35034
|
+
"speciality": _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$2 = _.SpecialtyID[0]) === null || _$SpecialtyID$2 === void 0 ? void 0 : _$SpecialtyID$2.text,
|
|
35035
|
+
"clinic": 'Clinic',
|
|
35036
|
+
"dob": 'Dob',
|
|
35037
|
+
"contact": 'Contact',
|
|
35038
|
+
"visitType": _ === null || _ === void 0 ? void 0 : _.appointmentType,
|
|
35039
|
+
"appointmentStatus": 'Status',
|
|
35040
|
+
"Register Visit": true,
|
|
35041
|
+
"Modify Appointment": true,
|
|
35042
|
+
"Cancel Appointment": true,
|
|
35043
|
+
"View Profile": true
|
|
35044
|
+
};
|
|
35045
|
+
}) : [];
|
|
35046
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35047
|
+
data: returnedData
|
|
35048
|
+
}));
|
|
35049
|
+
|
|
35050
|
+
case 10:
|
|
35051
|
+
_context2.prev = 10;
|
|
35052
|
+
_context2.t0 = _context2["catch"](2);
|
|
35053
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35054
|
+
message: _context2.t0.message
|
|
35055
|
+
})));
|
|
35056
|
+
|
|
35057
|
+
case 13:
|
|
35058
|
+
case "end":
|
|
35059
|
+
return _context2.stop();
|
|
35060
|
+
}
|
|
35061
|
+
}
|
|
35062
|
+
}, _callee2, null, [[2, 10]]);
|
|
35063
|
+
})));
|
|
35064
|
+
var GET_OTHER_VISITS = createAsyncThunk("dashboardComponentApiSlice/getOtherVisits", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
35065
|
+
var payload,
|
|
35066
|
+
_ref6,
|
|
35067
|
+
rejectWithValue,
|
|
35068
|
+
_data$result3,
|
|
35069
|
+
data,
|
|
35070
|
+
returnedData,
|
|
35071
|
+
_args3 = arguments;
|
|
35072
|
+
|
|
35073
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
35074
|
+
while (1) {
|
|
35075
|
+
switch (_context3.prev = _context3.next) {
|
|
35076
|
+
case 0:
|
|
35077
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
35078
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
35079
|
+
_context3.prev = 2;
|
|
35080
|
+
_context3.next = 5;
|
|
35081
|
+
return fetchData$1({
|
|
35082
|
+
body: query.getOtherVisits()
|
|
35083
|
+
}, __readDocumentUrl__);
|
|
35084
|
+
|
|
35085
|
+
case 5:
|
|
35086
|
+
data = _context3.sent;
|
|
35087
|
+
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : _data$result3.map(function (_) {
|
|
35088
|
+
var _$PersonID3, _$PersonID3$, _$PersonID3$$, _$SpecialtyID$3, _$appointmentType;
|
|
35089
|
+
|
|
35090
|
+
return {
|
|
35091
|
+
"img": 'https://www.fillmurray.com/640/360',
|
|
35092
|
+
"name": _ === null || _ === void 0 ? void 0 : (_$PersonID3 = _.PersonID) === null || _$PersonID3 === void 0 ? void 0 : (_$PersonID3$ = _$PersonID3[0]) === null || _$PersonID3$ === void 0 ? void 0 : (_$PersonID3$$ = _$PersonID3$[0]) === null || _$PersonID3$$ === void 0 ? void 0 : _$PersonID3$$.text,
|
|
35093
|
+
"mrn": 'MRN',
|
|
35094
|
+
"date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
|
|
35095
|
+
"time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
|
|
35096
|
+
"speciality": _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$3 = _.SpecialtyID[0]) === null || _$SpecialtyID$3 === void 0 ? void 0 : _$SpecialtyID$3.text,
|
|
35097
|
+
"clinic": 'Clinic',
|
|
35098
|
+
"dob": 'Dob',
|
|
35099
|
+
"contact": 'Contact',
|
|
35100
|
+
"visitType": (_$appointmentType = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType !== void 0 ? _$appointmentType : '',
|
|
35101
|
+
"appointmentStatus": 'Status',
|
|
35102
|
+
"Register Visit": true,
|
|
35103
|
+
"Modify Appointment": true,
|
|
35104
|
+
"Cancel Appointment": true,
|
|
35105
|
+
"View Profile": true
|
|
35106
|
+
};
|
|
35107
|
+
}) : [];
|
|
35108
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35109
|
+
data: returnedData
|
|
35110
|
+
}));
|
|
35111
|
+
|
|
35112
|
+
case 10:
|
|
35113
|
+
_context3.prev = 10;
|
|
35114
|
+
_context3.t0 = _context3["catch"](2);
|
|
35115
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35116
|
+
message: _context3.t0.message
|
|
35117
|
+
})));
|
|
35118
|
+
|
|
35119
|
+
case 13:
|
|
35120
|
+
case "end":
|
|
35121
|
+
return _context3.stop();
|
|
35122
|
+
}
|
|
35123
|
+
}
|
|
35124
|
+
}, _callee3, null, [[2, 10]]);
|
|
35125
|
+
})));
|
|
35126
|
+
var GET_WALK_INS = createAsyncThunk("dashboardComponentApiSlice/getWalkIns", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
35127
|
+
var payload,
|
|
35128
|
+
_ref8,
|
|
35129
|
+
rejectWithValue,
|
|
35130
|
+
_data$result4,
|
|
35131
|
+
data,
|
|
35132
|
+
returnedData,
|
|
35133
|
+
_args4 = arguments;
|
|
35134
|
+
|
|
35135
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
35136
|
+
while (1) {
|
|
35137
|
+
switch (_context4.prev = _context4.next) {
|
|
35138
|
+
case 0:
|
|
35139
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
35140
|
+
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
35141
|
+
_context4.prev = 2;
|
|
35142
|
+
_context4.next = 5;
|
|
35143
|
+
return fetchData$1({
|
|
35144
|
+
body: query.getWalkIns()
|
|
35145
|
+
}, __readDocumentUrl__);
|
|
35146
|
+
|
|
35147
|
+
case 5:
|
|
35148
|
+
data = _context4.sent;
|
|
35149
|
+
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : _data$result4.map(function (_) {
|
|
35150
|
+
var _$PersonID4, _$PersonID4$, _$PersonID4$$, _$SpecialtyID$4, _$appointmentType2;
|
|
35151
|
+
|
|
35152
|
+
return {
|
|
35153
|
+
"img": 'https://www.fillmurray.com/640/360',
|
|
35154
|
+
"name": _ === null || _ === void 0 ? void 0 : (_$PersonID4 = _.PersonID) === null || _$PersonID4 === void 0 ? void 0 : (_$PersonID4$ = _$PersonID4[0]) === null || _$PersonID4$ === void 0 ? void 0 : (_$PersonID4$$ = _$PersonID4$[0]) === null || _$PersonID4$$ === void 0 ? void 0 : _$PersonID4$$.text,
|
|
35155
|
+
"mrn": 'MRN',
|
|
35156
|
+
"date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
|
|
35157
|
+
"time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
|
|
35158
|
+
"speciality": _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$4 = _.SpecialtyID[0]) === null || _$SpecialtyID$4 === void 0 ? void 0 : _$SpecialtyID$4.text,
|
|
35159
|
+
"clinic": 'Clinic',
|
|
35160
|
+
"dob": 'Dob',
|
|
35161
|
+
"contact": 'Contact',
|
|
35162
|
+
"visitType": (_$appointmentType2 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType2 !== void 0 ? _$appointmentType2 : '',
|
|
35163
|
+
"appointmentStatus": 'Status',
|
|
35164
|
+
"Register Visit": true,
|
|
35165
|
+
"Modify Appointment": true,
|
|
35166
|
+
"Cancel Appointment": true,
|
|
35167
|
+
"View Profile": true
|
|
35168
|
+
};
|
|
35169
|
+
}) : [];
|
|
35170
|
+
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35171
|
+
data: returnedData
|
|
35172
|
+
}));
|
|
35173
|
+
|
|
35174
|
+
case 10:
|
|
35175
|
+
_context4.prev = 10;
|
|
35176
|
+
_context4.t0 = _context4["catch"](2);
|
|
35177
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35178
|
+
message: _context4.t0.message
|
|
35179
|
+
})));
|
|
35180
|
+
|
|
35181
|
+
case 13:
|
|
35182
|
+
case "end":
|
|
35183
|
+
return _context4.stop();
|
|
35184
|
+
}
|
|
35185
|
+
}
|
|
35186
|
+
}, _callee4, null, [[2, 10]]);
|
|
35187
|
+
})));
|
|
35188
|
+
var GET_NEW_PATIENTS = createAsyncThunk("dashboardComponentApiSlice/getNewPatients", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
35189
|
+
var payload,
|
|
35190
|
+
_ref10,
|
|
35191
|
+
rejectWithValue,
|
|
35192
|
+
_data$result5,
|
|
35193
|
+
data,
|
|
35194
|
+
returnedData,
|
|
35195
|
+
_args5 = arguments;
|
|
35196
|
+
|
|
35197
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
35198
|
+
while (1) {
|
|
35199
|
+
switch (_context5.prev = _context5.next) {
|
|
35200
|
+
case 0:
|
|
35201
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
35202
|
+
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
35203
|
+
_context5.prev = 2;
|
|
35204
|
+
_context5.next = 5;
|
|
35205
|
+
return fetchData$1({
|
|
35206
|
+
body: query.getNewPatients()
|
|
35207
|
+
}, __readDocumentUrl__);
|
|
35208
|
+
|
|
35209
|
+
case 5:
|
|
35210
|
+
data = _context5.sent;
|
|
35211
|
+
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result5 = data.result) === null || _data$result5 === void 0 ? void 0 : _data$result5.map(function (_) {
|
|
35212
|
+
var _$PersonID5, _$PersonID5$, _$PersonID5$$, _$SpecialtyID$5, _$appointmentType3;
|
|
35213
|
+
|
|
35214
|
+
return {
|
|
35215
|
+
"img": 'https://www.fillmurray.com/640/360',
|
|
35216
|
+
"name": _ === null || _ === void 0 ? void 0 : (_$PersonID5 = _.PersonID) === null || _$PersonID5 === void 0 ? void 0 : (_$PersonID5$ = _$PersonID5[0]) === null || _$PersonID5$ === void 0 ? void 0 : (_$PersonID5$$ = _$PersonID5$[0]) === null || _$PersonID5$$ === void 0 ? void 0 : _$PersonID5$$.text,
|
|
35217
|
+
"mrn": 'MRN',
|
|
35218
|
+
"date": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('DD MMM,YYYY') : '',
|
|
35219
|
+
"time": (_ === null || _ === void 0 ? void 0 : _.start) ? moment.unix(_ === null || _ === void 0 ? void 0 : _.start).format('hh:mm A') : '',
|
|
35220
|
+
"speciality": _ === null || _ === void 0 ? void 0 : (_$SpecialtyID$5 = _.SpecialtyID[0]) === null || _$SpecialtyID$5 === void 0 ? void 0 : _$SpecialtyID$5.text,
|
|
35221
|
+
"clinic": 'Clinic',
|
|
35222
|
+
"dob": 'Dob',
|
|
35223
|
+
"contact": 'Contact',
|
|
35224
|
+
"visitType": (_$appointmentType3 = _ === null || _ === void 0 ? void 0 : _.appointmentType) !== null && _$appointmentType3 !== void 0 ? _$appointmentType3 : '',
|
|
35225
|
+
"appointmentStatus": 'Status',
|
|
35226
|
+
"Register Visit": true,
|
|
35227
|
+
"Modify Appointment": true,
|
|
35228
|
+
"Cancel Appointment": true,
|
|
35229
|
+
"View Profile": true
|
|
35230
|
+
};
|
|
35231
|
+
}) : [];
|
|
35232
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35233
|
+
data: returnedData
|
|
35234
|
+
}));
|
|
35235
|
+
|
|
35236
|
+
case 10:
|
|
35237
|
+
_context5.prev = 10;
|
|
35238
|
+
_context5.t0 = _context5["catch"](2);
|
|
35239
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35240
|
+
message: _context5.t0.message
|
|
35241
|
+
})));
|
|
35242
|
+
|
|
35243
|
+
case 13:
|
|
35244
|
+
case "end":
|
|
35245
|
+
return _context5.stop();
|
|
35246
|
+
}
|
|
35247
|
+
}
|
|
35248
|
+
}, _callee5, null, [[2, 10]]);
|
|
35249
|
+
})));
|
|
35250
|
+
var dashboardComponentApiSlice = createSlice({
|
|
35251
|
+
name: "dashboardComponentApiSlice",
|
|
35252
|
+
initialState: {
|
|
35253
|
+
appointments: _objectSpread2({}, defaultState.Info),
|
|
35254
|
+
firstVisits: _objectSpread2({}, defaultState.Info),
|
|
35255
|
+
otherVisits: _objectSpread2({}, defaultState.Info),
|
|
35256
|
+
walkIns: _objectSpread2({}, defaultState.Info),
|
|
35257
|
+
newPatients: _objectSpread2({}, defaultState.Info)
|
|
35258
|
+
},
|
|
35259
|
+
extraReducers: (_extraReducers$y = {}, _defineProperty(_extraReducers$y, GET_APPOINTMENTS.fulfilled, function (state, action) {
|
|
35260
|
+
var _state$appointments;
|
|
35261
|
+
|
|
35262
|
+
state.appointments.loading = false, state.appointments.error = false, (_state$appointments = state.appointments = action.payload) !== null && _state$appointments !== void 0 ? _state$appointments : {};
|
|
35263
|
+
}), _defineProperty(_extraReducers$y, GET_APPOINTMENTS.pending, function (state, action) {
|
|
35264
|
+
state.appointments.loading = true, state.appointments.error = false, state.appointments.loading = true;
|
|
35265
|
+
}), _defineProperty(_extraReducers$y, GET_APPOINTMENTS.rejected, function (state, action) {
|
|
35266
|
+
var _action$payload;
|
|
35267
|
+
|
|
35268
|
+
state.appointments.loading = false, state.appointments.error = true, state.appointments = (_action$payload = action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
35269
|
+
}), _defineProperty(_extraReducers$y, GET_FIRST_VISITS.fulfilled, function (state, action) {
|
|
35270
|
+
var _state$firstVisits;
|
|
35271
|
+
|
|
35272
|
+
state.firstVisits.loading = false, state.firstVisits.error = false, (_state$firstVisits = state.firstVisits = action.payload) !== null && _state$firstVisits !== void 0 ? _state$firstVisits : {};
|
|
35273
|
+
}), _defineProperty(_extraReducers$y, GET_FIRST_VISITS.pending, function (state, action) {
|
|
35274
|
+
state.firstVisits.loading = true, state.firstVisits.error = false, state.firstVisits.loading = true;
|
|
35275
|
+
}), _defineProperty(_extraReducers$y, GET_FIRST_VISITS.rejected, function (state, action) {
|
|
35276
|
+
var _action$payload2;
|
|
35277
|
+
|
|
35278
|
+
state.firstVisits.loading = false, state.firstVisits.error = true, state.firstVisits = (_action$payload2 = action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
35279
|
+
}), _defineProperty(_extraReducers$y, GET_OTHER_VISITS.fulfilled, function (state, action) {
|
|
35280
|
+
var _state$otherVisits;
|
|
35281
|
+
|
|
35282
|
+
state.otherVisits.loading = false, state.otherVisits.error = false, (_state$otherVisits = state.otherVisits = action.payload) !== null && _state$otherVisits !== void 0 ? _state$otherVisits : {};
|
|
35283
|
+
}), _defineProperty(_extraReducers$y, GET_OTHER_VISITS.pending, function (state, action) {
|
|
35284
|
+
state.otherVisits.loading = true, state.otherVisits.error = false, state.otherVisits.loading = true;
|
|
35285
|
+
}), _defineProperty(_extraReducers$y, GET_OTHER_VISITS.rejected, function (state, action) {
|
|
35286
|
+
var _action$payload3;
|
|
35287
|
+
|
|
35288
|
+
state.otherVisits.loading = false, state.otherVisits.error = true, state.otherVisits = (_action$payload3 = action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
35289
|
+
}), _defineProperty(_extraReducers$y, GET_WALK_INS.fulfilled, function (state, action) {
|
|
35290
|
+
var _state$walkIns;
|
|
35291
|
+
|
|
35292
|
+
state.walkIns.loading = false, state.walkIns.error = false, (_state$walkIns = state.walkIns = action.payload) !== null && _state$walkIns !== void 0 ? _state$walkIns : {};
|
|
35293
|
+
}), _defineProperty(_extraReducers$y, GET_WALK_INS.pending, function (state, action) {
|
|
35294
|
+
state.walkIns.loading = true, state.walkIns.error = false, state.walkIns.loading = true;
|
|
35295
|
+
}), _defineProperty(_extraReducers$y, GET_WALK_INS.rejected, function (state, action) {
|
|
35296
|
+
var _action$payload4;
|
|
35297
|
+
|
|
35298
|
+
state.walkIns.loading = false, state.walkIns.error = true, state.walkIns = (_action$payload4 = action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
35299
|
+
}), _defineProperty(_extraReducers$y, GET_NEW_PATIENTS.fulfilled, function (state, action) {
|
|
35300
|
+
var _state$newPatients;
|
|
35301
|
+
|
|
35302
|
+
state.newPatients.loading = false, state.newPatients.error = false, (_state$newPatients = state.newPatients = action.payload) !== null && _state$newPatients !== void 0 ? _state$newPatients : {};
|
|
35303
|
+
}), _defineProperty(_extraReducers$y, GET_NEW_PATIENTS.pending, function (state, action) {
|
|
35304
|
+
state.newPatients.loading = true, state.newPatients.error = false, state.newPatients.loading = true;
|
|
35305
|
+
}), _defineProperty(_extraReducers$y, GET_NEW_PATIENTS.rejected, function (state, action) {
|
|
35306
|
+
var _action$payload5;
|
|
35307
|
+
|
|
35308
|
+
state.newPatients.loading = false, state.newPatients.error = true, state.newPatients = (_action$payload5 = action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
35309
|
+
}), _extraReducers$y)
|
|
35310
|
+
});
|
|
35311
|
+
var dashboardComponentApiActions = {
|
|
35312
|
+
GET_APPOINTMENTS: GET_APPOINTMENTS,
|
|
35313
|
+
GET_FIRST_VISITS: GET_FIRST_VISITS,
|
|
35314
|
+
GET_OTHER_VISITS: GET_OTHER_VISITS,
|
|
35315
|
+
GET_WALK_INS: GET_WALK_INS,
|
|
35316
|
+
GET_NEW_PATIENTS: GET_NEW_PATIENTS
|
|
35317
|
+
};
|
|
35318
|
+
var dashboardComponentApiSlice$1 = dashboardComponentApiSlice.reducer;
|
|
35319
|
+
|
|
34244
35320
|
var index = combineReducers({
|
|
34245
35321
|
authSlice: authSlice$1,
|
|
34246
35322
|
fuzzySearchReducer: fuzzySearchReducer$1,
|
|
@@ -34278,7 +35354,8 @@ var index = combineReducers({
|
|
|
34278
35354
|
DoccSlice: DoccSlice$1,
|
|
34279
35355
|
clinicInfoSlice: clinicInfoSlice$1,
|
|
34280
35356
|
avgTimeSlice: avgTimeSlice$1,
|
|
34281
|
-
highPriorityApiSlice: highPriorityApiSlice$1
|
|
35357
|
+
highPriorityApiSlice: highPriorityApiSlice$1,
|
|
35358
|
+
dashboardComponentApiSlice: dashboardComponentApiSlice$1
|
|
34282
35359
|
});
|
|
34283
35360
|
|
|
34284
35361
|
var CC_Actions = _objectSpread2({}, chiefCompilenceMastersActions);
|
|
@@ -34295,7 +35372,9 @@ var RadiologyActions = _objectSpread2({}, RadiologyMastersActions);
|
|
|
34295
35372
|
|
|
34296
35373
|
var consultActions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, CC_Actions), diagnosisActions), vitalsActions), A_Actions), LabOrderActions), MedicationActions), TreatmentActions), RadiologyActions);
|
|
34297
35374
|
|
|
34298
|
-
var
|
|
35375
|
+
var dashboardComponentMasterActions = _objectSpread2({}, dashboardComponentApiActions);
|
|
35376
|
+
|
|
35377
|
+
var actions = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, authActions), fuzzySearchActions), patientActions), appointmentActions), appointmentResponseActions), relatedPersonActions), practitionerActions), docterListingActions), searchApiActions), serviceApiActions), slotApiActions), scheduleApiActions), personApiActions), getUserInfoActions), oraganizationRegistrationActions), organizAtionauthActions), oraganizationRegisterPatientActions), dashboardApiActions), visitStatsApiActions), consultActions), radOrderActions), signOffActions), VisitActions), emailsendActions), siginInActions), DoccActions), clinicInfoActions), avgTimeActions), highPriorityActions), dashboardComponentMasterActions);
|
|
34299
35378
|
|
|
34300
35379
|
exports.actions = actions;
|
|
34301
35380
|
exports.rootReducer = index;
|