primarycare-binder 1.1.6 → 1.1.10
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 +650 -223
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -20973,8 +20973,14 @@ var queries$9 = {
|
|
|
20973
20973
|
deleteCC: function deleteCC(id) {
|
|
20974
20974
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CA_ChiefComplaints\",\n \"filter\": \"CA_ChiefComplaints._id =='").concat(id, "'\"\n }");
|
|
20975
20975
|
},
|
|
20976
|
+
// encounterDetails: (encounterId) => `{
|
|
20977
|
+
// "db_name": "${dbName}",
|
|
20978
|
+
// "entity": "Encounter",
|
|
20979
|
+
// "filter": "Encounter.id == ${encounterId}",
|
|
20980
|
+
// "return_fields": "MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender})) })"
|
|
20981
|
+
// }`,
|
|
20976
20982
|
encounterDetails: function encounterDetails(encounterId) {
|
|
20977
|
-
return "{\n \"db_name\": \"
|
|
20983
|
+
return "{\n \"db_name\": \"primarycare\",\n \"entity\": \"Encounter\",\n \"filter\": \"Encounter.id == ".concat(encounterId, "\",\n \"return_fields\": \"MERGE(Encounter, {practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:MERGE(DOCUMENT(practdet.speciality),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(practdet.speciality).coding) RETURN DOCUMENT(cod))})})),Patient: (for p in Patient filter p.id == Encounter.patient_id let hname = (FOR hn IN HumanNameMaster filter hn._id in p.name RETURN merge(hn,{prefix:document(hn.prefix)},{suffix:document(hn.suffix)},{use:document(hn.use)})) let gender = document(p.gender) let pidentifier = (FOR hn IN p.identifier RETURN DOCUMENT(hn)) return MERGE(p, {name: hname, pidentifier,gender,communicationLanguage:document(p.communicationLanguage)})) })\"\n }");
|
|
20978
20984
|
}
|
|
20979
20985
|
};
|
|
20980
20986
|
|
|
@@ -21678,10 +21684,10 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
|
|
|
21678
21684
|
data = _context12.sent;
|
|
21679
21685
|
arr = [];
|
|
21680
21686
|
data.result.map(function (val) {
|
|
21681
|
-
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$
|
|
21687
|
+
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$practitioner_det4, _val$practitioner_det5, _ref25, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient2$$name$, _val$Patient2$$name$$, _val$Patient3, _val$Patient3$, _val$Patient3$$name, _val$Patient3$$name$, _val$Patient4, _val$Patient4$, _val$Patient4$$name, _val$Patient4$$name$, _val$Patient5, _val$Patient5$, _val$Patient5$$name, _val$Patient5$$name$, _val$Patient5$$name$$, _val$Patient6, _val$Patient6$, _val$Patient7, _val$Patient7$, _val$Patient8, _val$Patient8$, _val$Patient8$$gender, _val$Patient9, _val$Patient9$, _val$Patient$0$pident, _val$Patient10, _val$Patient10$, _val$Patient10$$piden, _val$Patient10$$piden2, _lang, _val$practitioner_det6, _val$practitioner_det7, _val$practitioner_det8;
|
|
21682
21688
|
|
|
21683
|
-
var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.
|
|
21684
|
-
return val.
|
|
21689
|
+
var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.communicationLanguage) === null || _val$Patient$$communi === void 0 ? void 0 : _val$Patient$$communi.map(function (val) {
|
|
21690
|
+
return val.display;
|
|
21685
21691
|
});
|
|
21686
21692
|
lang = lang ? lang : null;
|
|
21687
21693
|
arr.push({
|
|
@@ -24215,6 +24221,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24215
24221
|
body1,
|
|
24216
24222
|
data1,
|
|
24217
24223
|
vitelsJson,
|
|
24224
|
+
newObservations,
|
|
24218
24225
|
adjArray,
|
|
24219
24226
|
extraArr,
|
|
24220
24227
|
_args3 = arguments;
|
|
@@ -24306,7 +24313,11 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24306
24313
|
vitelsJson = [];
|
|
24307
24314
|
|
|
24308
24315
|
if (Array.isArray(data1[0].Observations)) {
|
|
24309
|
-
|
|
24316
|
+
newObservations = data1[0].Observations;
|
|
24317
|
+
newObservations.sort(function (a, b) {
|
|
24318
|
+
return Number(a.obsseq) - Number(b.obsseq);
|
|
24319
|
+
});
|
|
24320
|
+
vitelsJson = newObservations.map(function (val) {
|
|
24310
24321
|
var _val$obscode, _val$obscode2;
|
|
24311
24322
|
|
|
24312
24323
|
if ((val === null || val === void 0 ? void 0 : (_val$obscode = val.obscode) === null || _val$obscode === void 0 ? void 0 : _val$obscode.VitalsCodesReferenceRanges.length) > 0 && (val === null || val === void 0 ? void 0 : (_val$obscode2 = val.obscode) === null || _val$obscode2 === void 0 ? void 0 : _val$obscode2.vitalscode)) {
|
|
@@ -24319,7 +24330,9 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24319
24330
|
return element !== undefined;
|
|
24320
24331
|
});
|
|
24321
24332
|
adjArray = vitelsJson.filter(function (val, i) {
|
|
24322
|
-
|
|
24333
|
+
var _val$vitalscode, _val$vitalscode$toUpp, _val$vitalscode2, _val$vitalscode2$toUp;
|
|
24334
|
+
|
|
24335
|
+
return ((_val$vitalscode = val.vitalscode) === null || _val$vitalscode === void 0 ? void 0 : (_val$vitalscode$toUpp = _val$vitalscode.toUpperCase) === null || _val$vitalscode$toUpp === void 0 ? void 0 : _val$vitalscode$toUpp.call(_val$vitalscode)) === "HEIGHT" || ((_val$vitalscode2 = val.vitalscode) === null || _val$vitalscode2 === void 0 ? void 0 : (_val$vitalscode2$toUp = _val$vitalscode2.toUpperCase) === null || _val$vitalscode2$toUp === void 0 ? void 0 : _val$vitalscode2$toUp.call(_val$vitalscode2)) === "WEIGHT";
|
|
24323
24336
|
});
|
|
24324
24337
|
extraArr = [_objectSpread2(_objectSpread2({}, adjArray[0]), {}, {
|
|
24325
24338
|
vitalscode: "BMI",
|
|
@@ -24337,7 +24350,7 @@ var GET_VITALS_JSON = createAsyncThunk("VitalsApiSlice/getvitalsjson", /*#__PURE
|
|
|
24337
24350
|
disabled: true
|
|
24338
24351
|
})];
|
|
24339
24352
|
|
|
24340
|
-
if (adjArray) {
|
|
24353
|
+
if (adjArray.length === 2) {
|
|
24341
24354
|
vitelsJson = vitelsJson.concat(extraArr);
|
|
24342
24355
|
}
|
|
24343
24356
|
|
|
@@ -24587,10 +24600,10 @@ var queries$7 = {
|
|
|
24587
24600
|
// "return_fields": "CA_AllergyIntolerance"
|
|
24588
24601
|
// }
|
|
24589
24602
|
return {
|
|
24590
|
-
db_name:
|
|
24603
|
+
db_name: dbName,
|
|
24591
24604
|
entity: "CA_AllergyIntolerance",
|
|
24592
24605
|
filter: "CA_AllergyIntolerance.encounter_id=='".concat(encounter_id, "'"),
|
|
24593
|
-
return_fields: " MERGE(CA_AllergyIntolerance,{statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{practitioner_id:(for prac in Practitioner filter prac._id == CA_AllergyIntolerance.practitioner_id return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for us in CodeableConceptMaster filter us._id == nam.use return merge(us,{coding:document(us.coding)}))},{prefix:(for pre in CodeableConceptMaster filter pre._id == nam.prefix return merge(pre,{coding:document(pre.coding)}))},{suffix:(for suf in CodeableConceptMaster filter suf._id == nam.suffix return merge(suf,{coding:document(suf.coding)}))}))}))})"
|
|
24606
|
+
return_fields: " MERGE(CA_AllergyIntolerance,{statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{practitioner_id:(for prac in Practitioner filter prac._id == CA_AllergyIntolerance.practitioner_id return merge(prac,{name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for us in CodeableConceptMaster filter us._id == nam.use return merge(us,{coding:document(us.coding)}))},{prefix:(for pre in CodeableConceptMaster filter pre._id == nam.prefix return merge(pre,{coding:document(pre.coding)}))},{suffix:(for suf in CodeableConceptMaster filter suf._id == nam.suffix return merge(suf,{coding:document(suf.coding)}))}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24594
24607
|
};
|
|
24595
24608
|
},
|
|
24596
24609
|
reactionMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='ALREACTIONCODE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
@@ -24612,7 +24625,7 @@ var queries$7 = {
|
|
|
24612
24625
|
filter: {
|
|
24613
24626
|
CA_AllergyIntolerance: "CA_AllergyIntolerance.patient_id=='".concat(patientId, "'")
|
|
24614
24627
|
},
|
|
24615
|
-
return_fields: " MERGE(CA_AllergyIntolerance, {practitioner_id: (FOR hn IN TO_ARRAY(DOCUMENT(CA_AllergyIntolerance.practitioner_id).name) RETURN MERGE(DOCUMENT(CA_AllergyIntolerance.practitioner_id), {name:DOCUMENT(hn)})) }, {statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))})"
|
|
24628
|
+
return_fields: " MERGE(CA_AllergyIntolerance, {practitioner_id: (FOR hn IN TO_ARRAY(DOCUMENT(CA_AllergyIntolerance.practitioner_id).name) RETURN MERGE(DOCUMENT(CA_AllergyIntolerance.practitioner_id), {name:DOCUMENT(hn)})) }, {statushistory: (FOR sths IN TO_ARRAY(CA_AllergyIntolerance.statushistory) RETURN MERGE(sths,{PersonID:(FOR hn IN DOCUMENT(sths.PersonID).name RETURN MERGE(DOCUMENT(sths.PersonID),{name:DOCUMENT(hn)}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24616
24629
|
};
|
|
24617
24630
|
}
|
|
24618
24631
|
};
|
|
@@ -24786,7 +24799,7 @@ var generateJSON$3 = function generateJSON(data) {
|
|
|
24786
24799
|
|
|
24787
24800
|
var generateResJson$4 = function generateResJson(dataList, state) {
|
|
24788
24801
|
var list = dataList.map(function (data) {
|
|
24789
|
-
var _data$code, _data$category, _data$category2, _data$clinicalstatus, _data$lastoccurrence, _data$lastoccurrence$, _data$lastoccurrence2, _data$lastoccurrence3, _data$lastoccurrence4, _data$lastoccurrence5, _data$lastoccurrence6, _data$lastoccurrence7, _data$lastoccurrence8, _data$lastoccurrence9, _data$lastoccurrence10, _data$lastoccurrence11, _data$lastoccurrence12, _data$lastoccurrence13, _data$lastoccurrence14, _data$lastoccurrence15, _data$lastoccurrence16, _data$lastoccurrence17, _data$lastoccurrence18, _data$lastoccurrence19, _data$lastoccurrence20, _data$lastoccurrence21, _data$note, _data$onset, _data$onset$, _data$onset2, _data$onset2$, _data$onset3, _data$onset3$, _data$onset4, _data$onset4$, _data$onset5, _data$onset5$, _data$onset6, _data$onset6$, _data$onset7, _data$onset7$, _data$onset8, _data$onset8$, _data$onset9, _data$onset9$, _data$onset10, _data$onset10$, _data$onset11, _data$onset11$, _data$relationName, _data$criticality, _data$type, _data$verificationsta, _data$reaction, _data$createddate;
|
|
24802
|
+
var _data$code, _data$code2, _data$category, _data$category2, _data$clinicalstatus, _data$lastoccurrence, _data$lastoccurrence$, _data$lastoccurrence2, _data$lastoccurrence3, _data$lastoccurrence4, _data$lastoccurrence5, _data$lastoccurrence6, _data$lastoccurrence7, _data$lastoccurrence8, _data$lastoccurrence9, _data$lastoccurrence10, _data$lastoccurrence11, _data$lastoccurrence12, _data$lastoccurrence13, _data$lastoccurrence14, _data$lastoccurrence15, _data$lastoccurrence16, _data$lastoccurrence17, _data$lastoccurrence18, _data$lastoccurrence19, _data$lastoccurrence20, _data$lastoccurrence21, _data$note, _data$onset, _data$onset$, _data$onset2, _data$onset2$, _data$onset3, _data$onset3$, _data$onset4, _data$onset4$, _data$onset5, _data$onset5$, _data$onset6, _data$onset6$, _data$onset7, _data$onset7$, _data$onset8, _data$onset8$, _data$onset9, _data$onset9$, _data$onset10, _data$onset10$, _data$onset11, _data$onset11$, _data$relationName, _data$criticality, _data$type, _data$verificationsta, _data$reaction, _data$createddate;
|
|
24790
24803
|
|
|
24791
24804
|
// let clicnicalstatushistory = val?.clicnicalstatushistory?.map(val => {
|
|
24792
24805
|
// return {
|
|
@@ -24796,7 +24809,10 @@ var generateResJson$4 = function generateResJson(dataList, state) {
|
|
|
24796
24809
|
// }
|
|
24797
24810
|
// })
|
|
24798
24811
|
return {
|
|
24799
|
-
"allergenCode":
|
|
24812
|
+
"allergenCode": {
|
|
24813
|
+
label: data === null || data === void 0 ? void 0 : (_data$code = data.code) === null || _data$code === void 0 ? void 0 : _data$code.longdesc,
|
|
24814
|
+
value: data === null || data === void 0 ? void 0 : (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2._id
|
|
24815
|
+
},
|
|
24800
24816
|
"asserted": (_data$category = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category !== void 0 ? _data$category : null,
|
|
24801
24817
|
"category": (_data$category2 = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category2 !== void 0 ? _data$category2 : null,
|
|
24802
24818
|
"clinicalStatus": (_data$clinicalstatus = data === null || data === void 0 ? void 0 : data.clinicalstatus) !== null && _data$clinicalstatus !== void 0 ? _data$clinicalstatus : null,
|
|
@@ -25979,7 +25995,7 @@ var queries$6 = {
|
|
|
25979
25995
|
db_name: "primarycare",
|
|
25980
25996
|
entity: "CA_OrderLine",
|
|
25981
25997
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
25982
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})" // db_name: `${dbName}`,
|
|
25998
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})" // db_name: `${dbName}`,
|
|
25983
25999
|
// entity: "CA_OrderLine",
|
|
25984
26000
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=="${order_id}" && CA_OrderLine.activestatus==true`,
|
|
25985
26001
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true`,
|
|
@@ -26056,7 +26072,7 @@ var queries$6 = {
|
|
|
26056
26072
|
|
|
26057
26073
|
var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
26058
26074
|
var list = dataList.map(function (val) {
|
|
26059
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
26075
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$specimenRelated$, _val$specimenRelated$2, _val$specimenRelated$3, _val$specimenRelated$4, _val$specimenRelated$5, _val$specimenRelated$6, _val$specimenRelated$7, _val$specimenRelated$8, _val$specimenRelated$9, _val$specimenRelated$10, _val$specimenRelated$11, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
26060
26076
|
|
|
26061
26077
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
26062
26078
|
return {
|
|
@@ -26149,7 +26165,8 @@ var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
|
26149
26165
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
26150
26166
|
orderBy: {
|
|
26151
26167
|
value: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.id,
|
|
26152
|
-
|
|
26168
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.practitioner_id,
|
|
26169
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
26153
26170
|
}
|
|
26154
26171
|
},
|
|
26155
26172
|
indication: {
|
|
@@ -26231,7 +26248,7 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26231
26248
|
return el != null;
|
|
26232
26249
|
});
|
|
26233
26250
|
var list = dataList.map(function (val) {
|
|
26234
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
26251
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$specimenRelated, _val$specimenRelated$12, _val$specimenRelated2, _val$specimenRelated3, _val$specimenRelated4, _val$specimenRelated5, _val$specimenRelated6, _val$specimenRelated7, _val$specimenRelated8, _val$specimenRelated9, _val$specimenRelated10, _val$specimenRelated11, _val$specimenRelated12, _val$specimenRelated13, _val$specimenRelated14, _val$specimenRelated15, _val$specimenRelated16, _val$specimenRelated17, _val$specimenRelated18, _val$specimenRelated19, _val$specimenRelated20, _val$specimenRelated21, _val$specimenRelated22, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
26235
26252
|
|
|
26236
26253
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
26237
26254
|
return {
|
|
@@ -26310,20 +26327,21 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26310
26327
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
26311
26328
|
requestorDetails: {
|
|
26312
26329
|
organization: {
|
|
26313
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
26314
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
26315
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
26330
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
26331
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
26332
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
26316
26333
|
},
|
|
26317
26334
|
practitionerRole: {
|
|
26318
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
26319
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
26320
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
26321
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
26335
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
26336
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
26337
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
26338
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
26322
26339
|
},
|
|
26323
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
26340
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
26324
26341
|
orderBy: {
|
|
26325
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
26326
|
-
|
|
26342
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.id,
|
|
26343
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.practitioner_id,
|
|
26344
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
26327
26345
|
}
|
|
26328
26346
|
},
|
|
26329
26347
|
indication: {
|
|
@@ -27717,12 +27735,13 @@ var LABORDER_ORGANIZATION = createAsyncThunk("LabOrderApiSlice/laborder_orgnniza
|
|
|
27717
27735
|
data3 = _context23.sent;
|
|
27718
27736
|
arr3 = [];
|
|
27719
27737
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
27720
|
-
var _val$shortdesc, _val$shortdesc2, _val$_id6;
|
|
27738
|
+
var _val$shortdesc, _val$shortdesc2, _val$_id6, _val$locationID;
|
|
27721
27739
|
|
|
27722
27740
|
arr3.push({
|
|
27723
27741
|
label: (_val$shortdesc = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc !== void 0 ? _val$shortdesc : "",
|
|
27724
27742
|
value: (_val$shortdesc2 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc2 !== void 0 ? _val$shortdesc2 : "",
|
|
27725
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
27743
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
27744
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
27726
27745
|
});
|
|
27727
27746
|
});
|
|
27728
27747
|
_context23.next = 26;
|
|
@@ -27794,7 +27813,7 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27794
27813
|
data2 = _context24.sent;
|
|
27795
27814
|
arr2 = [];
|
|
27796
27815
|
data2 === null || data2 === void 0 ? void 0 : (_data2$result2 = data2.result) === null || _data2$result2 === void 0 ? void 0 : _data2$result2.map(function (val) {
|
|
27797
|
-
var _val$name2, _val$_id7;
|
|
27816
|
+
var _val$name2, _val$_id7, _val$practitioner_id;
|
|
27798
27817
|
|
|
27799
27818
|
// if (
|
|
27800
27819
|
// val.name[0]?.prefix[0]?.coding.display +
|
|
@@ -27803,7 +27822,8 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27803
27822
|
// ) {
|
|
27804
27823
|
arr2.push({
|
|
27805
27824
|
label: makeName((val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : _val$name2[0]) || {}),
|
|
27806
|
-
value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : ""
|
|
27825
|
+
value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : "",
|
|
27826
|
+
practitioner_id: (_val$practitioner_id = val === null || val === void 0 ? void 0 : val.practitioner_id) !== null && _val$practitioner_id !== void 0 ? _val$practitioner_id : ""
|
|
27807
27827
|
}); // }
|
|
27808
27828
|
});
|
|
27809
27829
|
return _context24.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
@@ -28569,7 +28589,7 @@ var LabOrderApiSlice$1 = LabOrderApiSlice.reducer;
|
|
|
28569
28589
|
|
|
28570
28590
|
var queries$5 = {
|
|
28571
28591
|
drugType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugType\",\n \"return_fields\": \"DrugType\"\n }"),
|
|
28572
|
-
drugMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})\"\n }"),
|
|
28592
|
+
drugMaster: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n \n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})\"\n }"),
|
|
28573
28593
|
getMedications: function getMedications(id) {
|
|
28574
28594
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"filter\": \"PH_OrderLine.patient_Id=='").concat(id, "'\",\n \"entity\": \"PH_OrderLine\",\n \"return_fields\": \"MERGE(PH_OrderLine, { patient_Id:(FOR pname IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).name) RETURN MERGE(DOCUMENT(PH_OrderLine.patient_Id), { name:DOCUMENT(pname), telecom:(FOR ptel IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).telecom) RETURN DOCUMENT(ptel)), martialStatus:(FOR mstatus IN TO_ARRAY(DOCUMENT(PH_OrderLine.patient_Id).martialStatus) RETURN DOCUMENT(mstatus)) } ) ) ,org_Id:MERGE(DOCUMENT(PH_OrderLine.org_Id), { telecom:(FOR otel IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).telecom) RETURN DOCUMENT(otel) ), address:(FOR oadd IN TO_ARRAY(DOCUMENT(PH_OrderLine.org_Id).address) RETURN DOCUMENT(oadd) ) }) ,encounter_Id:DOCUMENT(PH_OrderLine.encounter_Id) ,dosageDurationUOM:DOCUMENT(PH_OrderLine.dosageDurationUOM) ,dosageFreqCode:DOCUMENT(PH_OrderLine.dosageFreqCode) ,dosageUOM:DOCUMENT(PH_OrderLine.dosageUOM) ,drugCode:DOCUMENT(PH_OrderLine.drugCode) ,drugType:DOCUMENT(PH_OrderLine.drugType) , createdby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.createdby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.createdby),{name:DOCUMENT(hn)})) , updatedby:(FOR hn IN TO_ARRAY(DOCUMENT(PH_OrderLine.updatedby).name) RETURN MERGE(DOCUMENT(PH_OrderLine.updatedby),{name:DOCUMENT(hn)})) , statushistory:(FOR sth IN TO_ARRAY(PH_OrderLine.statushistory) RETURN MERGE(sth,{PersonID:(FOR hn IN TO_ARRAY(DOCUMENT(sth.PersonID).name) RETURN MERGE(DOCUMENT(sth.PersonID),{name:DOCUMENT(hn)}))})) } )\"\n }");
|
|
28575
28595
|
},
|
|
@@ -28640,6 +28660,25 @@ var queries$5 = {
|
|
|
28640
28660
|
// }
|
|
28641
28661
|
// ]
|
|
28642
28662
|
|
|
28663
|
+
var codeQuery = {
|
|
28664
|
+
AllergyCodes: function AllergyCodes(list) {
|
|
28665
|
+
return {
|
|
28666
|
+
db_name: dbName,
|
|
28667
|
+
entity: "CA_AllergyIntolerance",
|
|
28668
|
+
filter: "CA_AllergyIntolerance.encounter_id=='".concat(list, "' && CA_AllergyIntolerance.activestatus==true"),
|
|
28669
|
+
"return_fields": "{code:document(CA_AllergyIntolerance.code)}"
|
|
28670
|
+
};
|
|
28671
|
+
},
|
|
28672
|
+
DrugCodes: function DrugCodes(list) {
|
|
28673
|
+
return {
|
|
28674
|
+
db_name: dbName,
|
|
28675
|
+
entity: "CA_Diagnosis",
|
|
28676
|
+
filter: "CA_Diagnosis.encounter_id=='".concat(list, "' && CA_Diagnosis.activestatus==true"),
|
|
28677
|
+
return_fields: "{diagcode:document(CA_Diagnosis.diagcode)}"
|
|
28678
|
+
};
|
|
28679
|
+
}
|
|
28680
|
+
};
|
|
28681
|
+
|
|
28643
28682
|
var _extraReducers$g;
|
|
28644
28683
|
var DRUGTYPE_MASTER = createAsyncThunk("MedicationMastersSlice/drugType_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
28645
28684
|
var payload,
|
|
@@ -28715,7 +28754,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28715
28754
|
data = _context2.sent;
|
|
28716
28755
|
arr = [];
|
|
28717
28756
|
data.result.map(function (val) {
|
|
28718
|
-
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4;
|
|
28757
|
+
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid;
|
|
28719
28758
|
|
|
28720
28759
|
var json = {
|
|
28721
28760
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
@@ -28727,7 +28766,8 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28727
28766
|
drugType: val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.drugtype,
|
|
28728
28767
|
drugTypeLong: val === null || val === void 0 ? void 0 : (_val$DrugType2 = val.DrugType) === null || _val$DrugType2 === void 0 ? void 0 : _val$DrugType2.longdesc,
|
|
28729
28768
|
drugTypeShort: val === null || val === void 0 ? void 0 : (_val$DrugType3 = val.DrugType) === null || _val$DrugType3 === void 0 ? void 0 : _val$DrugType3.shortdesc,
|
|
28730
|
-
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id
|
|
28769
|
+
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id,
|
|
28770
|
+
drugroutegenid: (_val$drugroutegenid = val === null || val === void 0 ? void 0 : val.drugroutegenid) !== null && _val$drugroutegenid !== void 0 ? _val$drugroutegenid : "" // formValue
|
|
28731
28771
|
|
|
28732
28772
|
};
|
|
28733
28773
|
arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
|
|
@@ -30583,18 +30623,13 @@ var MedicationMastersActions = {
|
|
|
30583
30623
|
var MedicationMastersSlice$1 = MedicationMastersSlice.reducer;
|
|
30584
30624
|
|
|
30585
30625
|
var _extraReducers$f;
|
|
30586
|
-
var
|
|
30626
|
+
var ALERT_CODES = createAsyncThunk("medicationsSlice/alert_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
30587
30627
|
var payload,
|
|
30588
30628
|
_ref2,
|
|
30589
30629
|
rejectWithValue,
|
|
30590
|
-
_data$Result,
|
|
30591
|
-
_data$Result$,
|
|
30592
|
-
_data$Result$$propert,
|
|
30593
|
-
_data$Result$$propert2,
|
|
30594
30630
|
list,
|
|
30595
|
-
orgData,
|
|
30596
|
-
body,
|
|
30597
30631
|
data,
|
|
30632
|
+
code,
|
|
30598
30633
|
_args = arguments;
|
|
30599
30634
|
|
|
30600
30635
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -30604,44 +30639,143 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
|
|
|
30604
30639
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
30605
30640
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
30606
30641
|
_context.prev = 2;
|
|
30607
|
-
list = payload;
|
|
30642
|
+
list = payload.list;
|
|
30608
30643
|
_context.next = 6;
|
|
30644
|
+
return fetchData$3({
|
|
30645
|
+
body: JSON.stringify(codeQuery.AllergyCodes(list))
|
|
30646
|
+
}, __readDocumentUrl__);
|
|
30647
|
+
|
|
30648
|
+
case 6:
|
|
30649
|
+
data = _context.sent;
|
|
30650
|
+
code = data.result.map(function (val) {
|
|
30651
|
+
return {
|
|
30652
|
+
codes: val.code.code
|
|
30653
|
+
};
|
|
30654
|
+
});
|
|
30655
|
+
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30656
|
+
data: code
|
|
30657
|
+
}));
|
|
30658
|
+
|
|
30659
|
+
case 11:
|
|
30660
|
+
_context.prev = 11;
|
|
30661
|
+
_context.t0 = _context["catch"](2);
|
|
30662
|
+
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30663
|
+
message: _context.t0.message
|
|
30664
|
+
})));
|
|
30665
|
+
|
|
30666
|
+
case 14:
|
|
30667
|
+
case "end":
|
|
30668
|
+
return _context.stop();
|
|
30669
|
+
}
|
|
30670
|
+
}
|
|
30671
|
+
}, _callee, null, [[2, 11]]);
|
|
30672
|
+
})));
|
|
30673
|
+
var DRUG_CODES = createAsyncThunk("medicationsSlice/drug_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
30674
|
+
var payload,
|
|
30675
|
+
_ref4,
|
|
30676
|
+
rejectWithValue,
|
|
30677
|
+
list,
|
|
30678
|
+
data,
|
|
30679
|
+
code,
|
|
30680
|
+
_args2 = arguments;
|
|
30681
|
+
|
|
30682
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
30683
|
+
while (1) {
|
|
30684
|
+
switch (_context2.prev = _context2.next) {
|
|
30685
|
+
case 0:
|
|
30686
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
30687
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
30688
|
+
_context2.prev = 2;
|
|
30689
|
+
list = payload.list;
|
|
30690
|
+
_context2.next = 6;
|
|
30691
|
+
return fetchData$3({
|
|
30692
|
+
body: JSON.stringify(codeQuery.DrugCodes(list))
|
|
30693
|
+
}, __readDocumentUrl__);
|
|
30694
|
+
|
|
30695
|
+
case 6:
|
|
30696
|
+
data = _context2.sent;
|
|
30697
|
+
code = data.result.map(function (val) {
|
|
30698
|
+
return {
|
|
30699
|
+
codes: val.diagcode.icdcode
|
|
30700
|
+
};
|
|
30701
|
+
});
|
|
30702
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30703
|
+
data: code
|
|
30704
|
+
}));
|
|
30705
|
+
|
|
30706
|
+
case 11:
|
|
30707
|
+
_context2.prev = 11;
|
|
30708
|
+
_context2.t0 = _context2["catch"](2);
|
|
30709
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30710
|
+
message: _context2.t0.message
|
|
30711
|
+
})));
|
|
30712
|
+
|
|
30713
|
+
case 14:
|
|
30714
|
+
case "end":
|
|
30715
|
+
return _context2.stop();
|
|
30716
|
+
}
|
|
30717
|
+
}
|
|
30718
|
+
}, _callee2, null, [[2, 11]]);
|
|
30719
|
+
})));
|
|
30720
|
+
var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
30721
|
+
var payload,
|
|
30722
|
+
_ref6,
|
|
30723
|
+
rejectWithValue,
|
|
30724
|
+
_data$Result,
|
|
30725
|
+
_data$Result$,
|
|
30726
|
+
_data$Result$$propert,
|
|
30727
|
+
_data$Result$$propert2,
|
|
30728
|
+
list,
|
|
30729
|
+
orgData,
|
|
30730
|
+
body,
|
|
30731
|
+
data,
|
|
30732
|
+
_args3 = arguments;
|
|
30733
|
+
|
|
30734
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
30735
|
+
while (1) {
|
|
30736
|
+
switch (_context3.prev = _context3.next) {
|
|
30737
|
+
case 0:
|
|
30738
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
30739
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
30740
|
+
_context3.prev = 2;
|
|
30741
|
+
list = payload;
|
|
30742
|
+
_context3.next = 6;
|
|
30609
30743
|
return fetchData$3({
|
|
30610
30744
|
body: queries$5.getOrganizationId(payload.orgId)
|
|
30611
30745
|
}, __readDocumentUrl__);
|
|
30612
30746
|
|
|
30613
30747
|
case 6:
|
|
30614
|
-
orgData =
|
|
30748
|
+
orgData = _context3.sent;
|
|
30615
30749
|
body = generateJSON$4(list, orgData.result[0]);
|
|
30616
|
-
|
|
30750
|
+
_context3.next = 10;
|
|
30617
30751
|
return fetchData$3({
|
|
30618
30752
|
body: JSON.stringify(body)
|
|
30619
30753
|
}, __uspsertUrl__);
|
|
30620
30754
|
|
|
30621
30755
|
case 10:
|
|
30622
|
-
data =
|
|
30623
|
-
return
|
|
30756
|
+
data = _context3.sent;
|
|
30757
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30624
30758
|
data: data === null || data === void 0 ? void 0 : (_data$Result = data.Result) === null || _data$Result === void 0 ? void 0 : (_data$Result$ = _data$Result[0]) === null || _data$Result$ === void 0 ? void 0 : (_data$Result$$propert = _data$Result$.properties) === null || _data$Result$$propert === void 0 ? void 0 : (_data$Result$$propert2 = _data$Result$$propert.doc) === null || _data$Result$$propert2 === void 0 ? void 0 : _data$Result$$propert2._id
|
|
30625
30759
|
}));
|
|
30626
30760
|
|
|
30627
30761
|
case 14:
|
|
30628
|
-
|
|
30629
|
-
|
|
30630
|
-
console.log(
|
|
30631
|
-
return
|
|
30632
|
-
message:
|
|
30762
|
+
_context3.prev = 14;
|
|
30763
|
+
_context3.t0 = _context3["catch"](2);
|
|
30764
|
+
console.log(_context3.t0);
|
|
30765
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30766
|
+
message: _context3.t0.message
|
|
30633
30767
|
})));
|
|
30634
30768
|
|
|
30635
30769
|
case 18:
|
|
30636
30770
|
case "end":
|
|
30637
|
-
return
|
|
30771
|
+
return _context3.stop();
|
|
30638
30772
|
}
|
|
30639
30773
|
}
|
|
30640
|
-
},
|
|
30774
|
+
}, _callee3, null, [[2, 14]]);
|
|
30641
30775
|
})));
|
|
30642
|
-
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30776
|
+
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
30643
30777
|
var payload,
|
|
30644
|
-
|
|
30778
|
+
_ref8,
|
|
30645
30779
|
rejectWithValue,
|
|
30646
30780
|
_list$status,
|
|
30647
30781
|
_data$Result2,
|
|
@@ -30651,15 +30785,15 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30651
30785
|
list,
|
|
30652
30786
|
body,
|
|
30653
30787
|
data,
|
|
30654
|
-
|
|
30788
|
+
_args4 = arguments;
|
|
30655
30789
|
|
|
30656
|
-
return regeneratorRuntime.wrap(function
|
|
30790
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
30657
30791
|
while (1) {
|
|
30658
|
-
switch (
|
|
30792
|
+
switch (_context4.prev = _context4.next) {
|
|
30659
30793
|
case 0:
|
|
30660
|
-
payload =
|
|
30661
|
-
|
|
30662
|
-
|
|
30794
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
30795
|
+
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
30796
|
+
_context4.prev = 2;
|
|
30663
30797
|
list = payload; // const states = getState();
|
|
30664
30798
|
|
|
30665
30799
|
body = [{
|
|
@@ -30683,76 +30817,76 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30683
30817
|
// ))
|
|
30684
30818
|
// }
|
|
30685
30819
|
|
|
30686
|
-
|
|
30820
|
+
_context4.next = 7;
|
|
30687
30821
|
return fetchData$3({
|
|
30688
30822
|
body: JSON.stringify(body)
|
|
30689
30823
|
}, __update__);
|
|
30690
30824
|
|
|
30691
30825
|
case 7:
|
|
30692
|
-
data =
|
|
30693
|
-
return
|
|
30826
|
+
data = _context4.sent;
|
|
30827
|
+
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30694
30828
|
data: data === null || data === void 0 ? void 0 : (_data$Result2 = data.Result) === null || _data$Result2 === void 0 ? void 0 : (_data$Result2$ = _data$Result2[0]) === null || _data$Result2$ === void 0 ? void 0 : (_data$Result2$$proper = _data$Result2$.properties) === null || _data$Result2$$proper === void 0 ? void 0 : (_data$Result2$$proper2 = _data$Result2$$proper.doc) === null || _data$Result2$$proper2 === void 0 ? void 0 : _data$Result2$$proper2._id
|
|
30695
30829
|
}));
|
|
30696
30830
|
|
|
30697
30831
|
case 11:
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
console.log(
|
|
30701
|
-
return
|
|
30702
|
-
message:
|
|
30832
|
+
_context4.prev = 11;
|
|
30833
|
+
_context4.t0 = _context4["catch"](2);
|
|
30834
|
+
console.log(_context4.t0);
|
|
30835
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30836
|
+
message: _context4.t0.message
|
|
30703
30837
|
})));
|
|
30704
30838
|
|
|
30705
30839
|
case 15:
|
|
30706
30840
|
case "end":
|
|
30707
|
-
return
|
|
30841
|
+
return _context4.stop();
|
|
30708
30842
|
}
|
|
30709
30843
|
}
|
|
30710
|
-
},
|
|
30844
|
+
}, _callee4, null, [[2, 11]]);
|
|
30711
30845
|
})));
|
|
30712
|
-
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30846
|
+
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
30713
30847
|
var payload,
|
|
30714
|
-
|
|
30848
|
+
_ref10,
|
|
30715
30849
|
rejectWithValue,
|
|
30716
30850
|
id,
|
|
30717
30851
|
data,
|
|
30718
|
-
|
|
30852
|
+
_args5 = arguments;
|
|
30719
30853
|
|
|
30720
|
-
return regeneratorRuntime.wrap(function
|
|
30854
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
30721
30855
|
while (1) {
|
|
30722
|
-
switch (
|
|
30856
|
+
switch (_context5.prev = _context5.next) {
|
|
30723
30857
|
case 0:
|
|
30724
|
-
payload =
|
|
30725
|
-
|
|
30726
|
-
|
|
30858
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
30859
|
+
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
30860
|
+
_context5.prev = 2;
|
|
30727
30861
|
id = payload.id;
|
|
30728
|
-
|
|
30862
|
+
_context5.next = 6;
|
|
30729
30863
|
return fetchData$3({
|
|
30730
30864
|
body: queries$5.getMedications(id)
|
|
30731
30865
|
}, __readDocumentUrl__);
|
|
30732
30866
|
|
|
30733
30867
|
case 6:
|
|
30734
|
-
data =
|
|
30735
|
-
return
|
|
30868
|
+
data = _context5.sent;
|
|
30869
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30736
30870
|
data: data === null || data === void 0 ? void 0 : data.result
|
|
30737
30871
|
}));
|
|
30738
30872
|
|
|
30739
30873
|
case 10:
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
return
|
|
30743
|
-
message:
|
|
30874
|
+
_context5.prev = 10;
|
|
30875
|
+
_context5.t0 = _context5["catch"](2);
|
|
30876
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30877
|
+
message: _context5.t0.message
|
|
30744
30878
|
})));
|
|
30745
30879
|
|
|
30746
30880
|
case 13:
|
|
30747
30881
|
case "end":
|
|
30748
|
-
return
|
|
30882
|
+
return _context5.stop();
|
|
30749
30883
|
}
|
|
30750
30884
|
}
|
|
30751
|
-
},
|
|
30885
|
+
}, _callee5, null, [[2, 10]]);
|
|
30752
30886
|
})));
|
|
30753
|
-
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30887
|
+
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
30754
30888
|
var payload,
|
|
30755
|
-
|
|
30889
|
+
_ref12,
|
|
30756
30890
|
rejectWithValue,
|
|
30757
30891
|
getState,
|
|
30758
30892
|
personId,
|
|
@@ -30765,15 +30899,15 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30765
30899
|
arr,
|
|
30766
30900
|
data,
|
|
30767
30901
|
PH_PresWorkflowStatusTrx,
|
|
30768
|
-
|
|
30902
|
+
_args6 = arguments;
|
|
30769
30903
|
|
|
30770
|
-
return regeneratorRuntime.wrap(function
|
|
30904
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
30771
30905
|
while (1) {
|
|
30772
|
-
switch (
|
|
30906
|
+
switch (_context6.prev = _context6.next) {
|
|
30773
30907
|
case 0:
|
|
30774
|
-
payload =
|
|
30775
|
-
|
|
30776
|
-
|
|
30908
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
30909
|
+
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue, getState = _ref12.getState;
|
|
30910
|
+
_context6.prev = 2;
|
|
30777
30911
|
personId = payload.personId;
|
|
30778
30912
|
states = getState();
|
|
30779
30913
|
flowStatus = states.MedicationMastersSlice.workflow_status_masters.data.filter(function (val) {
|
|
@@ -30810,39 +30944,39 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30810
30944
|
}
|
|
30811
30945
|
};
|
|
30812
30946
|
});
|
|
30813
|
-
|
|
30947
|
+
_context6.next = 13;
|
|
30814
30948
|
return fetchData$3({
|
|
30815
30949
|
body: JSON.stringify(arr)
|
|
30816
30950
|
}, __update__);
|
|
30817
30951
|
|
|
30818
30952
|
case 13:
|
|
30819
|
-
data =
|
|
30820
|
-
|
|
30953
|
+
data = _context6.sent;
|
|
30954
|
+
_context6.next = 16;
|
|
30821
30955
|
return fetchData$3({
|
|
30822
30956
|
body: JSON.stringify(flowStatusList)
|
|
30823
30957
|
}, __uspsertUrl__);
|
|
30824
30958
|
|
|
30825
30959
|
case 16:
|
|
30826
|
-
PH_PresWorkflowStatusTrx =
|
|
30827
|
-
return
|
|
30960
|
+
PH_PresWorkflowStatusTrx = _context6.sent;
|
|
30961
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30828
30962
|
data: data,
|
|
30829
30963
|
PH_PresWorkflowStatusTrx: PH_PresWorkflowStatusTrx
|
|
30830
30964
|
}));
|
|
30831
30965
|
|
|
30832
30966
|
case 20:
|
|
30833
|
-
|
|
30834
|
-
|
|
30835
|
-
console.log(
|
|
30836
|
-
return
|
|
30837
|
-
message:
|
|
30967
|
+
_context6.prev = 20;
|
|
30968
|
+
_context6.t0 = _context6["catch"](2);
|
|
30969
|
+
console.log(_context6.t0);
|
|
30970
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30971
|
+
message: _context6.t0.message
|
|
30838
30972
|
})));
|
|
30839
30973
|
|
|
30840
30974
|
case 24:
|
|
30841
30975
|
case "end":
|
|
30842
|
-
return
|
|
30976
|
+
return _context6.stop();
|
|
30843
30977
|
}
|
|
30844
30978
|
}
|
|
30845
|
-
},
|
|
30979
|
+
}, _callee6, null, [[2, 20]]);
|
|
30846
30980
|
})));
|
|
30847
30981
|
var medicationsSlice = createSlice({
|
|
30848
30982
|
name: "medicationsSlice",
|
|
@@ -30850,55 +30984,79 @@ var medicationsSlice = createSlice({
|
|
|
30850
30984
|
save_medication: _objectSpread2({}, defaultState.Info),
|
|
30851
30985
|
update_medication: _objectSpread2({}, defaultState.Info),
|
|
30852
30986
|
update_workflow_status: _objectSpread2({}, defaultState.Info),
|
|
30853
|
-
medication_list: _objectSpread2({}, defaultState.List)
|
|
30987
|
+
medication_list: _objectSpread2({}, defaultState.List),
|
|
30988
|
+
alert_codes: _objectSpread2({}, defaultState.list),
|
|
30989
|
+
drug_codes: _objectSpread2({}, defaultState.list)
|
|
30854
30990
|
},
|
|
30855
|
-
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f,
|
|
30991
|
+
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f, ALERT_CODES.fulfilled, function (state, action) {
|
|
30856
30992
|
var _action$payload;
|
|
30857
30993
|
|
|
30858
|
-
state.
|
|
30994
|
+
state.alert_codes.loading = false, state.alert_codes.error = false, state.alert_codes = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
30995
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.pending, function (state, action) {
|
|
30996
|
+
state.alert_codes.error = false, state.alert_codes.loading = true;
|
|
30997
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.rejected, function (state, action) {
|
|
30998
|
+
var _action$payload2;
|
|
30999
|
+
|
|
31000
|
+
state.alert_codes.loading = false, state.alert_codes.error = true, state.alert_codes = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
31001
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.fulfilled, function (state, action) {
|
|
31002
|
+
var _action$payload3;
|
|
31003
|
+
|
|
31004
|
+
state.drug_codes.loading = false, state.drug_codes.error = false, state.drug_codes = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
31005
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.pending, function (state, action) {
|
|
31006
|
+
state.drug_codes.error = false, state.drug_codes.loading = true;
|
|
31007
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.rejected, function (state, action) {
|
|
31008
|
+
var _action$payload4;
|
|
31009
|
+
|
|
31010
|
+
state.drug_codes.loading = false, state.drug_codes.error = true, state.drug_codes = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
31011
|
+
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.fulfilled, function (state, action) {
|
|
31012
|
+
var _action$payload5;
|
|
31013
|
+
|
|
31014
|
+
state.save_medication.loading = false, state.save_medication.error = false, state.save_medication = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
30859
31015
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.pending, function (state, action) {
|
|
30860
31016
|
state.save_medication.error = false, state.save_medication.loading = true;
|
|
30861
31017
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.rejected, function (state, action) {
|
|
30862
|
-
var _action$
|
|
31018
|
+
var _action$payload6;
|
|
30863
31019
|
|
|
30864
|
-
state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$
|
|
31020
|
+
state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
30865
31021
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.fulfilled, function (state, action) {
|
|
30866
|
-
var _action$
|
|
31022
|
+
var _action$payload7;
|
|
30867
31023
|
|
|
30868
|
-
state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$
|
|
31024
|
+
state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
|
|
30869
31025
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.pending, function (state, action) {
|
|
30870
31026
|
state.update_medication.error = false, state.update_medication.loading = true;
|
|
30871
31027
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.rejected, function (state, action) {
|
|
30872
|
-
var _action$
|
|
31028
|
+
var _action$payload8;
|
|
30873
31029
|
|
|
30874
|
-
state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$
|
|
31030
|
+
state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
30875
31031
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.fulfilled, function (state, action) {
|
|
30876
|
-
var _action$
|
|
31032
|
+
var _action$payload9;
|
|
30877
31033
|
|
|
30878
|
-
state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$
|
|
31034
|
+
state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
30879
31035
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.pending, function (state, action) {
|
|
30880
31036
|
state.medication_list.error = false, state.medication_list.loading = true;
|
|
30881
31037
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.rejected, function (state, action) {
|
|
30882
|
-
var _action$
|
|
31038
|
+
var _action$payload10;
|
|
30883
31039
|
|
|
30884
|
-
state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$
|
|
31040
|
+
state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
30885
31041
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.fulfilled, function (state, action) {
|
|
30886
|
-
var _action$
|
|
31042
|
+
var _action$payload11;
|
|
30887
31043
|
|
|
30888
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$
|
|
31044
|
+
state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
30889
31045
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.pending, function (state, action) {
|
|
30890
31046
|
state.update_workflow_status.error = false, state.update_workflow_status.loading = true;
|
|
30891
31047
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.rejected, function (state, action) {
|
|
30892
|
-
var _action$
|
|
31048
|
+
var _action$payload12;
|
|
30893
31049
|
|
|
30894
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$
|
|
31050
|
+
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
30895
31051
|
}), _extraReducers$f)
|
|
30896
31052
|
});
|
|
30897
31053
|
var medicationsActions = {
|
|
30898
31054
|
SAVE_MEDICATIONS: SAVE_MEDICATIONS,
|
|
30899
31055
|
GET_MEDICATIONS: GET_MEDICATIONS,
|
|
30900
31056
|
UPDATE_MEDICATIONS: UPDATE_MEDICATIONS,
|
|
30901
|
-
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS
|
|
31057
|
+
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS,
|
|
31058
|
+
ALERT_CODES: ALERT_CODES,
|
|
31059
|
+
DRUG_CODES: DRUG_CODES
|
|
30902
31060
|
};
|
|
30903
31061
|
var medicationsSlice$1 = medicationsSlice.reducer;
|
|
30904
31062
|
|
|
@@ -30933,7 +31091,7 @@ var queries$4 = {
|
|
|
30933
31091
|
db_name: "primarycare",
|
|
30934
31092
|
entity: "CA_OrderLine",
|
|
30935
31093
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='TREAT' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
30936
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
31094
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
30937
31095
|
};
|
|
30938
31096
|
},
|
|
30939
31097
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -31213,7 +31371,7 @@ var generateJSON$1 = function generateJSON(dataList) {
|
|
|
31213
31371
|
|
|
31214
31372
|
var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
31215
31373
|
var list = dataList.map(function (val) {
|
|
31216
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
31374
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
31217
31375
|
|
|
31218
31376
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
31219
31377
|
return {
|
|
@@ -31309,8 +31467,9 @@ var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
|
31309
31467
|
},
|
|
31310
31468
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
31311
31469
|
orderBy: {
|
|
31312
|
-
|
|
31313
|
-
|
|
31470
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
|
|
31471
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
|
|
31472
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
31314
31473
|
}
|
|
31315
31474
|
},
|
|
31316
31475
|
indication: {
|
|
@@ -31366,7 +31525,7 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31366
31525
|
return el != null;
|
|
31367
31526
|
});
|
|
31368
31527
|
var list = dataList.map(function (val) {
|
|
31369
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
31528
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
31370
31529
|
|
|
31371
31530
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
31372
31531
|
return {
|
|
@@ -31445,20 +31604,21 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31445
31604
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
31446
31605
|
requestorDetails: {
|
|
31447
31606
|
organization: {
|
|
31448
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
31449
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
31450
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
31607
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
31608
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
31609
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
31451
31610
|
},
|
|
31452
31611
|
practitionerRole: {
|
|
31453
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
31454
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
31455
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
31456
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
31612
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
31613
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
31614
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
31615
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
31457
31616
|
},
|
|
31458
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
31617
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
31459
31618
|
orderBy: {
|
|
31460
|
-
|
|
31461
|
-
|
|
31619
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
|
|
31620
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
|
|
31621
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
31462
31622
|
}
|
|
31463
31623
|
},
|
|
31464
31624
|
indication: {
|
|
@@ -32296,12 +32456,13 @@ var TREATMENT_ORGANIZATION = createAsyncThunk("TreatmentSlice/getorderorganizati
|
|
|
32296
32456
|
data3 = _context14.sent;
|
|
32297
32457
|
arr3 = [];
|
|
32298
32458
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
32299
|
-
var _val$shortdesc4, _val$shortdesc5, _val$_id6;
|
|
32459
|
+
var _val$shortdesc4, _val$shortdesc5, _val$_id6, _val$locationID;
|
|
32300
32460
|
|
|
32301
32461
|
arr3.push({
|
|
32302
32462
|
label: (_val$shortdesc4 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc4 !== void 0 ? _val$shortdesc4 : "",
|
|
32303
32463
|
value: (_val$shortdesc5 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc5 !== void 0 ? _val$shortdesc5 : "",
|
|
32304
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
32464
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
32465
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
32305
32466
|
});
|
|
32306
32467
|
});
|
|
32307
32468
|
_context14.next = 26;
|
|
@@ -32845,7 +33006,7 @@ var queries$3 = (_queries = {
|
|
|
32845
33006
|
db_name: "primarycare",
|
|
32846
33007
|
entity: "CA_OrderLine",
|
|
32847
33008
|
filter: "CA_OrderLine.encounter_Id==\"".concat(encounter_id, "\" && CA_OrderLine.Oltype=='RAD' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true"),
|
|
32848
|
-
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
33009
|
+
return_fields: "MERGE(CA_OrderLine,{childRecurrent:(for doc in CA_OrderLine_CA_OrderLine_E filter doc._to == CA_OrderLine._id RETURN MERGE(DOCUMENT(doc._from),{Requestor:(for req in TO_ARRAY(DOCUMENT(doc._from).Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})),org_Id:DOCUMENT(CA_OrderLine.org_Id),Requestor:(for req in TO_ARRAY(CA_OrderLine.Requestor) return merge(req,{organization:(document(req.organization)),practId:(for prac in Practitioner filter prac._id==req.practId return {practitioner_id: prac.practitioner_id, id:prac._id,name:(for nam in HumanNameMaster filter nam._id in prac.name return merge(nam,{use:(for cod in CodeableConceptMaster filter cod._id == nam.use return document(cod.coding)[*].display),prefix:(for cod in CodeableConceptMaster filter cod._id == nam.prefix return document(cod.coding)[*].display),suffix:(for cod in CodeableConceptMaster filter cod._id == nam.suffix return document(cod.coding)[*].display)}))}),practRole:document(req.practRole)}))})"
|
|
32849
33010
|
};
|
|
32850
33011
|
},
|
|
32851
33012
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -33127,7 +33288,7 @@ var generateJSON = function generateJSON(dataList) {
|
|
|
33127
33288
|
|
|
33128
33289
|
var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
33129
33290
|
var list = dataList.map(function (val) {
|
|
33130
|
-
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$
|
|
33291
|
+
var _val$diagnosis, _val$performer, _val$recurrent, _val$recurrent$, _val$priority, _val$OrderNature, _moment$unix$format, _val$recurrent2, _val$recurrent2$, _moment$unix$format2, _val$recurrent3, _val$recurrent3$, _JSON$stringify, _val$recurrent4, _val$recurrent4$, _val$recurrent$0$ever, _val$recurrent5, _val$recurrent5$, _val$recurrent$0$ever2, _val$recurrent6, _val$recurrent6$, _moment$unix$format3, _val$recurrent7, _val$recurrent7$, _JSON$stringify2, _val$recurrent8, _val$recurrent8$, _val$recurrent9, _val$recurrent9$, _moment$unix$format4, _val$recurrent10, _val$recurrent10$, _moment$unix$format5, _val$Requestor, _val$Requestor$, _val$Requestor$$organ, _val$Requestor2, _val$Requestor2$, _val$Requestor2$$orga, _val$Requestor3, _val$Requestor3$, _val$Requestor3$$orga, _val$Requestor$0$prac, _val$Requestor4, _val$Requestor4$, _val$Requestor4$$prac, _val$Requestor$0$prac2, _val$Requestor5, _val$Requestor5$, _val$Requestor5$$prac, _val$Requestor6, _val$Requestor6$, _val$Requestor6$$prac, _val$Requestor7, _val$Requestor7$, _val$Requestor7$$prac, _val$Requestor8, _val$Requestor8$, _val$Requestor8$$prac, _val$Requestor8$$prac2, _val$Requestor8$$prac3, _val$Requestor9, _val$Requestor9$, _val$Requestor9$$prac, _val$Requestor9$$prac2, _val$Requestor10, _val$Requestor10$, _val$Requestor10$$pra, _val$Requestor10$$pra2, _val$Requestor11, _val$Requestor11$, _val$Requestor11$$pra, _val$Requestor11$$pra2, _val$Requestor11$$pra3, _val$patientInstructi, _val$patientInstructi2, _val$patientInstructi3, _val$patientInstructi4, _val$patientInstructi5, _val$patientInstructi6, _val$patientInstructi7, _val$patientInstructi8, _val$preparatoryInstr, _val$preparatoryInstr2, _val$preparatoryInstr3, _val$preparatoryInstr4, _val$preparatoryInstr5, _val$preparatoryInstr6, _val$preparatoryInstr7, _val$preparatoryInstr8, _val$departmentalInst, _val$departmentalInst2, _val$departmentalInst3, _val$departmentalInst4, _val$departmentalInst5, _val$departmentalInst6, _val$departmentalInst7, _val$departmentalInst8, _val$attribute, _val$attribute$, _val$attribute2, _val$attribute2$, _val$attribute$0$bedS, _val$attribute3, _val$attribute3$, _val$attribute$0$cont, _val$attribute4, _val$attribute4$, _val$createddate, _val$changeStatus, _val$changeStatus2, _val$changeStatus3, _val$statushistory, _val$statusreason, _val$accessionNum;
|
|
33131
33292
|
|
|
33132
33293
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis = val.diagnosis) === null || _val$diagnosis === void 0 ? void 0 : _val$diagnosis.map(function (v) {
|
|
33133
33294
|
return {
|
|
@@ -33223,8 +33384,9 @@ var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
|
33223
33384
|
},
|
|
33224
33385
|
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor8 = val.Requestor) === null || _val$Requestor8 === void 0 ? void 0 : (_val$Requestor8$ = _val$Requestor8[0]) === null || _val$Requestor8$ === void 0 ? void 0 : (_val$Requestor8$$prac = _val$Requestor8$.practId) === null || _val$Requestor8$$prac === void 0 ? void 0 : (_val$Requestor8$$prac2 = _val$Requestor8$$prac[0]) === null || _val$Requestor8$$prac2 === void 0 ? void 0 : (_val$Requestor8$$prac3 = _val$Requestor8$$prac2.name) === null || _val$Requestor8$$prac3 === void 0 ? void 0 : _val$Requestor8$$prac3[0],
|
|
33225
33386
|
orderBy: {
|
|
33226
|
-
|
|
33227
|
-
|
|
33387
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor9 = val.Requestor) === null || _val$Requestor9 === void 0 ? void 0 : (_val$Requestor9$ = _val$Requestor9[0]) === null || _val$Requestor9$ === void 0 ? void 0 : (_val$Requestor9$$prac = _val$Requestor9$.practId) === null || _val$Requestor9$$prac === void 0 ? void 0 : (_val$Requestor9$$prac2 = _val$Requestor9$$prac[0]) === null || _val$Requestor9$$prac2 === void 0 ? void 0 : _val$Requestor9$$prac2.practitioner_id,
|
|
33388
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor10 = val.Requestor) === null || _val$Requestor10 === void 0 ? void 0 : (_val$Requestor10$ = _val$Requestor10[0]) === null || _val$Requestor10$ === void 0 ? void 0 : (_val$Requestor10$$pra = _val$Requestor10$.practId) === null || _val$Requestor10$$pra === void 0 ? void 0 : (_val$Requestor10$$pra2 = _val$Requestor10$$pra[0]) === null || _val$Requestor10$$pra2 === void 0 ? void 0 : _val$Requestor10$$pra2.id,
|
|
33389
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor11 = val.Requestor) === null || _val$Requestor11 === void 0 ? void 0 : (_val$Requestor11$ = _val$Requestor11[0]) === null || _val$Requestor11$ === void 0 ? void 0 : (_val$Requestor11$$pra = _val$Requestor11$.practId) === null || _val$Requestor11$$pra === void 0 ? void 0 : (_val$Requestor11$$pra2 = _val$Requestor11$$pra[0]) === null || _val$Requestor11$$pra2 === void 0 ? void 0 : (_val$Requestor11$$pra3 = _val$Requestor11$$pra2.name) === null || _val$Requestor11$$pra3 === void 0 ? void 0 : _val$Requestor11$$pra3[0]) || {})
|
|
33228
33390
|
}
|
|
33229
33391
|
},
|
|
33230
33392
|
indication: {
|
|
@@ -33280,7 +33442,7 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33280
33442
|
return el != null;
|
|
33281
33443
|
});
|
|
33282
33444
|
var list = dataList.map(function (val) {
|
|
33283
|
-
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$
|
|
33445
|
+
var _val$diagnosis2, _val$performer2, _val$recurrent11, _val$recurrent11$, _val$priority2, _val$OrderNature2, _moment$unix$format6, _JSON$stringify3, _val$recurrent12, _val$recurrent12$, _val$recurrent$0$ever3, _val$recurrent13, _val$recurrent13$, _val$recurrent$0$ever4, _val$recurrent14, _val$recurrent14$, _moment$unix$format7, _val$recurrent15, _val$recurrent15$, _JSON$stringify4, _val$recurrent16, _val$recurrent16$, _val$recurrent17, _val$recurrent17$, _moment$unix$format8, _val$recurrent18, _val$recurrent18$, _moment$unix$format9, _val$Requestor12, _val$Requestor12$, _val$Requestor12$$org, _val$Requestor13, _val$Requestor13$, _val$Requestor13$$org, _val$Requestor14, _val$Requestor14$, _val$Requestor14$$org, _val$Requestor$0$prac3, _val$Requestor15, _val$Requestor15$, _val$Requestor15$$pra, _val$Requestor$0$prac4, _val$Requestor16, _val$Requestor16$, _val$Requestor16$$pra, _val$Requestor17, _val$Requestor17$, _val$Requestor17$$pra, _val$Requestor18, _val$Requestor18$, _val$Requestor18$$pra, _val$Requestor19, _val$Requestor19$, _val$Requestor19$$pra, _val$Requestor19$$pra2, _val$Requestor19$$pra3, _val$Requestor20, _val$Requestor20$, _val$Requestor20$$pra, _val$Requestor20$$pra2, _val$Requestor21, _val$Requestor21$, _val$Requestor21$$pra, _val$Requestor21$$pra2, _val$Requestor22, _val$Requestor22$, _val$Requestor22$$pra, _val$Requestor22$$pra2, _val$Requestor22$$pra3, _val$patientInstructi9, _val$patientInstructi10, _val$patientInstructi11, _val$patientInstructi12, _val$patientInstructi13, _val$patientInstructi14, _val$patientInstructi15, _val$patientInstructi16, _val$preparatoryInstr9, _val$preparatoryInstr10, _val$preparatoryInstr11, _val$preparatoryInstr12, _val$preparatoryInstr13, _val$preparatoryInstr14, _val$preparatoryInstr15, _val$preparatoryInstr16, _val$departmentalInst9, _val$departmentalInst10, _val$departmentalInst11, _val$departmentalInst12, _val$departmentalInst13, _val$departmentalInst14, _val$departmentalInst15, _val$departmentalInst16, _val$attribute5, _val$attribute5$, _val$attribute6, _val$attribute6$, _val$attribute$0$bedS2, _val$attribute7, _val$attribute7$, _val$attribute$0$cont2, _val$attribute8, _val$attribute8$, _val$createddate2, _val$changeStatus4, _val$changeStatus5, _val$changeStatus6, _val$statushistory2, _val$statusreason2, _val$accessionNum2;
|
|
33284
33446
|
|
|
33285
33447
|
var diagnosisData = val === null || val === void 0 ? void 0 : (_val$diagnosis2 = val.diagnosis) === null || _val$diagnosis2 === void 0 ? void 0 : _val$diagnosis2.map(function (v) {
|
|
33286
33448
|
return {
|
|
@@ -33363,20 +33525,21 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33363
33525
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
33364
33526
|
requestorDetails: {
|
|
33365
33527
|
organization: {
|
|
33366
|
-
label: val === null || val === void 0 ? void 0 : (_val$
|
|
33367
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
33368
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
33528
|
+
label: val === null || val === void 0 ? void 0 : (_val$Requestor12 = val.Requestor) === null || _val$Requestor12 === void 0 ? void 0 : (_val$Requestor12$ = _val$Requestor12[0]) === null || _val$Requestor12$ === void 0 ? void 0 : (_val$Requestor12$$org = _val$Requestor12$.organization) === null || _val$Requestor12$$org === void 0 ? void 0 : _val$Requestor12$$org._id,
|
|
33529
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor13 = val.Requestor) === null || _val$Requestor13 === void 0 ? void 0 : (_val$Requestor13$ = _val$Requestor13[0]) === null || _val$Requestor13$ === void 0 ? void 0 : (_val$Requestor13$$org = _val$Requestor13$.organization) === null || _val$Requestor13$$org === void 0 ? void 0 : _val$Requestor13$$org.name,
|
|
33530
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor14 = val.Requestor) === null || _val$Requestor14 === void 0 ? void 0 : (_val$Requestor14$ = _val$Requestor14[0]) === null || _val$Requestor14$ === void 0 ? void 0 : (_val$Requestor14$$org = _val$Requestor14$.organization) === null || _val$Requestor14$$org === void 0 ? void 0 : _val$Requestor14$$org.id
|
|
33369
33531
|
},
|
|
33370
33532
|
practitionerRole: {
|
|
33371
|
-
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$
|
|
33372
|
-
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$
|
|
33373
|
-
id: val === null || val === void 0 ? void 0 : (_val$
|
|
33374
|
-
_id: val === null || val === void 0 ? void 0 : (_val$
|
|
33533
|
+
label: (_val$Requestor$0$prac3 = val === null || val === void 0 ? void 0 : (_val$Requestor15 = val.Requestor) === null || _val$Requestor15 === void 0 ? void 0 : (_val$Requestor15$ = _val$Requestor15[0]) === null || _val$Requestor15$ === void 0 ? void 0 : (_val$Requestor15$$pra = _val$Requestor15$.practRole) === null || _val$Requestor15$$pra === void 0 ? void 0 : _val$Requestor15$$pra.display) !== null && _val$Requestor$0$prac3 !== void 0 ? _val$Requestor$0$prac3 : "",
|
|
33534
|
+
value: (_val$Requestor$0$prac4 = val === null || val === void 0 ? void 0 : (_val$Requestor16 = val.Requestor) === null || _val$Requestor16 === void 0 ? void 0 : (_val$Requestor16$ = _val$Requestor16[0]) === null || _val$Requestor16$ === void 0 ? void 0 : (_val$Requestor16$$pra = _val$Requestor16$.practRole) === null || _val$Requestor16$$pra === void 0 ? void 0 : _val$Requestor16$$pra.display) !== null && _val$Requestor$0$prac4 !== void 0 ? _val$Requestor$0$prac4 : "",
|
|
33535
|
+
id: val === null || val === void 0 ? void 0 : (_val$Requestor17 = val.Requestor) === null || _val$Requestor17 === void 0 ? void 0 : (_val$Requestor17$ = _val$Requestor17[0]) === null || _val$Requestor17$ === void 0 ? void 0 : (_val$Requestor17$$pra = _val$Requestor17$.practRole) === null || _val$Requestor17$$pra === void 0 ? void 0 : _val$Requestor17$$pra.id,
|
|
33536
|
+
_id: val === null || val === void 0 ? void 0 : (_val$Requestor18 = val.Requestor) === null || _val$Requestor18 === void 0 ? void 0 : (_val$Requestor18$ = _val$Requestor18[0]) === null || _val$Requestor18$ === void 0 ? void 0 : (_val$Requestor18$$pra = _val$Requestor18$.practRole) === null || _val$Requestor18$$pra === void 0 ? void 0 : _val$Requestor18$$pra._id
|
|
33375
33537
|
},
|
|
33376
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
33538
|
+
practitionerId: val === null || val === void 0 ? void 0 : (_val$Requestor19 = val.Requestor) === null || _val$Requestor19 === void 0 ? void 0 : (_val$Requestor19$ = _val$Requestor19[0]) === null || _val$Requestor19$ === void 0 ? void 0 : (_val$Requestor19$$pra = _val$Requestor19$.practId) === null || _val$Requestor19$$pra === void 0 ? void 0 : (_val$Requestor19$$pra2 = _val$Requestor19$$pra[0]) === null || _val$Requestor19$$pra2 === void 0 ? void 0 : (_val$Requestor19$$pra3 = _val$Requestor19$$pra2.name) === null || _val$Requestor19$$pra3 === void 0 ? void 0 : _val$Requestor19$$pra3[0],
|
|
33377
33539
|
orderBy: {
|
|
33378
|
-
|
|
33379
|
-
|
|
33540
|
+
practitioner_id: val === null || val === void 0 ? void 0 : (_val$Requestor20 = val.Requestor) === null || _val$Requestor20 === void 0 ? void 0 : (_val$Requestor20$ = _val$Requestor20[0]) === null || _val$Requestor20$ === void 0 ? void 0 : (_val$Requestor20$$pra = _val$Requestor20$.practId) === null || _val$Requestor20$$pra === void 0 ? void 0 : (_val$Requestor20$$pra2 = _val$Requestor20$$pra[0]) === null || _val$Requestor20$$pra2 === void 0 ? void 0 : _val$Requestor20$$pra2.practitioner_id,
|
|
33541
|
+
value: val === null || val === void 0 ? void 0 : (_val$Requestor21 = val.Requestor) === null || _val$Requestor21 === void 0 ? void 0 : (_val$Requestor21$ = _val$Requestor21[0]) === null || _val$Requestor21$ === void 0 ? void 0 : (_val$Requestor21$$pra = _val$Requestor21$.practId) === null || _val$Requestor21$$pra === void 0 ? void 0 : (_val$Requestor21$$pra2 = _val$Requestor21$$pra[0]) === null || _val$Requestor21$$pra2 === void 0 ? void 0 : _val$Requestor21$$pra2.id,
|
|
33542
|
+
label: makeName((val === null || val === void 0 ? void 0 : (_val$Requestor22 = val.Requestor) === null || _val$Requestor22 === void 0 ? void 0 : (_val$Requestor22$ = _val$Requestor22[0]) === null || _val$Requestor22$ === void 0 ? void 0 : (_val$Requestor22$$pra = _val$Requestor22$.practId) === null || _val$Requestor22$$pra === void 0 ? void 0 : (_val$Requestor22$$pra2 = _val$Requestor22$$pra[0]) === null || _val$Requestor22$$pra2 === void 0 ? void 0 : (_val$Requestor22$$pra3 = _val$Requestor22$$pra2.name) === null || _val$Requestor22$$pra3 === void 0 ? void 0 : _val$Requestor22$$pra3[0]) || {})
|
|
33380
33543
|
}
|
|
33381
33544
|
},
|
|
33382
33545
|
indication: {
|
|
@@ -34276,12 +34439,13 @@ var RAD_ORGANIZATION = createAsyncThunk("RadiologySlice/getorderorganization", /
|
|
|
34276
34439
|
data3 = _context15.sent;
|
|
34277
34440
|
arr3 = [];
|
|
34278
34441
|
data3 === null || data3 === void 0 ? void 0 : (_data3$result = data3.result) === null || _data3$result === void 0 ? void 0 : _data3$result.map(function (val) {
|
|
34279
|
-
var _val$shortdesc5, _val$shortdesc6, _val$_id6;
|
|
34442
|
+
var _val$shortdesc5, _val$shortdesc6, _val$_id6, _val$locationID;
|
|
34280
34443
|
|
|
34281
34444
|
arr3.push({
|
|
34282
34445
|
label: (_val$shortdesc5 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc5 !== void 0 ? _val$shortdesc5 : "",
|
|
34283
34446
|
value: (_val$shortdesc6 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc6 !== void 0 ? _val$shortdesc6 : "",
|
|
34284
|
-
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : ""
|
|
34447
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
34448
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
34285
34449
|
});
|
|
34286
34450
|
});
|
|
34287
34451
|
_context15.next = 26;
|
|
@@ -36673,43 +36837,45 @@ var queries$1 = {
|
|
|
36673
36837
|
},
|
|
36674
36838
|
getChartTime: function getChartTime(_ref) {
|
|
36675
36839
|
var id = _ref.id,
|
|
36676
|
-
|
|
36677
|
-
end = _ref.end,
|
|
36840
|
+
date = _ref.date,
|
|
36678
36841
|
type = _ref.type;
|
|
36679
36842
|
|
|
36680
36843
|
if (type === "Specialty") {
|
|
36681
36844
|
return {
|
|
36682
36845
|
db_name: dbName,
|
|
36683
|
-
|
|
36846
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36684
36847
|
filter: {
|
|
36685
|
-
|
|
36686
|
-
|
|
36687
|
-
|
|
36688
|
-
|
|
36848
|
+
speciality: id,
|
|
36849
|
+
orgid: "",
|
|
36850
|
+
practid: "",
|
|
36851
|
+
date: date
|
|
36852
|
+
}
|
|
36689
36853
|
};
|
|
36690
36854
|
}
|
|
36691
36855
|
|
|
36692
36856
|
if (type === "Clinic") {
|
|
36693
36857
|
return {
|
|
36694
36858
|
db_name: dbName,
|
|
36695
|
-
|
|
36859
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36696
36860
|
filter: {
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36861
|
+
speciality: "",
|
|
36862
|
+
orgid: id,
|
|
36863
|
+
practid: "",
|
|
36864
|
+
date: date
|
|
36865
|
+
}
|
|
36701
36866
|
};
|
|
36702
36867
|
}
|
|
36703
36868
|
|
|
36704
36869
|
if (type === "Practitioner") {
|
|
36705
36870
|
return {
|
|
36706
36871
|
db_name: dbName,
|
|
36707
|
-
|
|
36872
|
+
queryid: "bcf60a17-edcf-4657-9265-c2ba8068a7f8",
|
|
36708
36873
|
filter: {
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
|
|
36712
|
-
|
|
36874
|
+
speciality: "",
|
|
36875
|
+
orgid: "",
|
|
36876
|
+
practid: id,
|
|
36877
|
+
date: date
|
|
36878
|
+
}
|
|
36713
36879
|
};
|
|
36714
36880
|
}
|
|
36715
36881
|
}
|
|
@@ -36734,7 +36900,7 @@ var config$1 = [{
|
|
|
36734
36900
|
return {
|
|
36735
36901
|
_id: _id,
|
|
36736
36902
|
id: id,
|
|
36737
|
-
value:
|
|
36903
|
+
value: _id,
|
|
36738
36904
|
label: makeName((name === null || name === void 0 ? void 0 : name[0]) || {}),
|
|
36739
36905
|
_key: _key
|
|
36740
36906
|
};
|
|
@@ -36806,18 +36972,20 @@ var config$1 = [{
|
|
|
36806
36972
|
sliceName: "updateWaitingTimeChart",
|
|
36807
36973
|
queryName: "getChartTime",
|
|
36808
36974
|
type: "List",
|
|
36809
|
-
url:
|
|
36810
|
-
makeReturnData: function makeReturnData(data) {
|
|
36975
|
+
url: __baseUrl__,
|
|
36976
|
+
makeReturnData: function makeReturnData(data, payload) {
|
|
36977
|
+
var _payload$date;
|
|
36978
|
+
|
|
36811
36979
|
var arrivalCheckin = [];
|
|
36812
36980
|
var checkinTriage = [];
|
|
36813
36981
|
var triageConsultation = [];
|
|
36814
36982
|
var overall = [];
|
|
36815
36983
|
|
|
36816
|
-
if (Array.isArray(data
|
|
36817
|
-
data.
|
|
36818
|
-
checkinTriage.push(
|
|
36819
|
-
triageConsultation.push(
|
|
36820
|
-
overall.push(
|
|
36984
|
+
if (Array.isArray(data)) {
|
|
36985
|
+
data.forEach(function (d) {
|
|
36986
|
+
checkinTriage.push(d.diffbetweenchekintotriage);
|
|
36987
|
+
triageConsultation.push(d.diffbetweentriagedtofinished);
|
|
36988
|
+
overall.push(d.Overallwaitingtime);
|
|
36821
36989
|
});
|
|
36822
36990
|
}
|
|
36823
36991
|
|
|
@@ -36851,7 +37019,9 @@ var config$1 = [{
|
|
|
36851
37019
|
period: "Mins"
|
|
36852
37020
|
}];
|
|
36853
37021
|
return {
|
|
36854
|
-
labels:
|
|
37022
|
+
labels: (_payload$date = payload.date) === null || _payload$date === void 0 ? void 0 : _payload$date.map(function (v) {
|
|
37023
|
+
return moment.unix(v.start).format("hh A");
|
|
37024
|
+
}),
|
|
36855
37025
|
datasets: datasets
|
|
36856
37026
|
};
|
|
36857
37027
|
}
|
|
@@ -36913,7 +37083,7 @@ config$1.forEach(function (c) {
|
|
|
36913
37083
|
|
|
36914
37084
|
case 8:
|
|
36915
37085
|
data = _context.sent;
|
|
36916
|
-
returnData = c.makeReturnData ? c.makeReturnData(data) : data;
|
|
37086
|
+
returnData = c.makeReturnData ? c.makeReturnData(data, payload) : data;
|
|
36917
37087
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState[c.type]), {}, {
|
|
36918
37088
|
data: returnData
|
|
36919
37089
|
}));
|
|
@@ -38599,50 +38769,179 @@ var appointmentStatsApiActions = {
|
|
|
38599
38769
|
var dashboardComponentApiSlice = appointmentStatsApiSlice.reducer;
|
|
38600
38770
|
|
|
38601
38771
|
var alertInteractionsQuery = {
|
|
38602
|
-
alertInteractions: function alertInteractions() {
|
|
38772
|
+
alertInteractions: function alertInteractions(alertList) {
|
|
38773
|
+
var _alertList$creatinine, _alertList$creatinine2, _alertList$drugCodes, _alertList$diseaseCod, _alertList$allergyCod;
|
|
38774
|
+
|
|
38603
38775
|
return {
|
|
38604
|
-
"Patient": {
|
|
38605
|
-
|
|
38606
|
-
|
|
38607
|
-
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
|
|
38776
|
+
// "Patient": {
|
|
38777
|
+
// "Age": 25,
|
|
38778
|
+
// "PatientName": "Fraklin Stephen",
|
|
38779
|
+
// "Weight": 5450,
|
|
38780
|
+
// "Height": 50,
|
|
38781
|
+
// "CreatinineClearance": {
|
|
38782
|
+
// "Value": 67,
|
|
38783
|
+
// "UOM": "MG/DAY"
|
|
38784
|
+
// },
|
|
38785
|
+
// "GestationalBirthAge": 22
|
|
38786
|
+
// },
|
|
38787
|
+
// "DrugCodes": [
|
|
38788
|
+
// 1049997,
|
|
38789
|
+
// 1052518,
|
|
38790
|
+
// 1052594,
|
|
38791
|
+
// 1052598,
|
|
38792
|
+
// 1050231,
|
|
38793
|
+
// 1048580,
|
|
38794
|
+
// 1066660,
|
|
38795
|
+
// 1049125,
|
|
38796
|
+
// 1050215,
|
|
38797
|
+
// 1048649,
|
|
38798
|
+
// 1054917,
|
|
38799
|
+
// 1051477
|
|
38800
|
+
// ],
|
|
38801
|
+
// "DiseaseCodes": [
|
|
38802
|
+
// "346",
|
|
38803
|
+
// "G43.909",
|
|
38804
|
+
// "D64.3",
|
|
38805
|
+
// "1052614"
|
|
38806
|
+
// ],
|
|
38807
|
+
// "AllergyCodes": [
|
|
38808
|
+
// 83,
|
|
38809
|
+
// 281,
|
|
38810
|
+
// 306,
|
|
38811
|
+
// 476,
|
|
38812
|
+
// 543,
|
|
38813
|
+
// 568,
|
|
38814
|
+
// 571,
|
|
38815
|
+
// 572,
|
|
38816
|
+
// 590,
|
|
38817
|
+
// 592,
|
|
38818
|
+
// 593,
|
|
38819
|
+
// 2715,
|
|
38820
|
+
// 2755,
|
|
38821
|
+
// 900028,
|
|
38822
|
+
// 1088
|
|
38823
|
+
// ],
|
|
38824
|
+
// "Doses": [
|
|
38825
|
+
// {
|
|
38826
|
+
// "DrugName": "Amoxlin 450 mg",
|
|
38827
|
+
// "GCNSEQNO": 8997,
|
|
38828
|
+
// "ICDCode": "A181",
|
|
38829
|
+
// "DoseTypeIndicator": "02",
|
|
38830
|
+
// "Route": "064",
|
|
38831
|
+
// "Dose": {
|
|
38832
|
+
// "Value": 0.125,
|
|
38833
|
+
// "UOM": "G/DAY"
|
|
38834
|
+
// },
|
|
38835
|
+
// "Frequency": {
|
|
38836
|
+
// "Code": "QD"
|
|
38837
|
+
// },
|
|
38838
|
+
// "Duration": {
|
|
38839
|
+
// "Value": 1
|
|
38840
|
+
// }
|
|
38841
|
+
// },
|
|
38842
|
+
// {
|
|
38843
|
+
// "DrugName": "sghd",
|
|
38844
|
+
// "GCNSEQNO": 8997,
|
|
38845
|
+
// "ICDCode": "sdf",
|
|
38846
|
+
// "DoseTypeIndicator": "02",
|
|
38847
|
+
// "Route": "sd",
|
|
38848
|
+
// "Dose": {
|
|
38849
|
+
// "Value": 0.125,
|
|
38850
|
+
// "UOM": "G/DAY"
|
|
38851
|
+
// },
|
|
38852
|
+
// "Frequency": {
|
|
38853
|
+
// "Code": "QD"
|
|
38854
|
+
// },
|
|
38855
|
+
// "Duration": {
|
|
38856
|
+
// "Value": 1
|
|
38857
|
+
// }
|
|
38858
|
+
// }
|
|
38859
|
+
// ]
|
|
38860
|
+
Patient: {
|
|
38861
|
+
Age: alertList === null || alertList === void 0 ? void 0 : alertList.age,
|
|
38862
|
+
PatientName: alertList === null || alertList === void 0 ? void 0 : alertList.patientName,
|
|
38863
|
+
Weight: alertList === null || alertList === void 0 ? void 0 : alertList.weight,
|
|
38864
|
+
Height: alertList === null || alertList === void 0 ? void 0 : alertList.height,
|
|
38865
|
+
CreatinineClearance: {
|
|
38866
|
+
Value: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine = alertList.creatinineClearance) === null || _alertList$creatinine === void 0 ? void 0 : _alertList$creatinine.Value,
|
|
38867
|
+
UOM: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine2 = alertList.creatinineClearance) === null || _alertList$creatinine2 === void 0 ? void 0 : _alertList$creatinine2.UOM
|
|
38612
38868
|
},
|
|
38613
|
-
|
|
38869
|
+
GestationalBirthAge: alertList === null || alertList === void 0 ? void 0 : alertList.age
|
|
38614
38870
|
},
|
|
38615
|
-
|
|
38616
|
-
|
|
38617
|
-
|
|
38618
|
-
|
|
38619
|
-
|
|
38620
|
-
|
|
38621
|
-
|
|
38622
|
-
|
|
38623
|
-
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38871
|
+
DrugCodes: (_alertList$drugCodes = alertList === null || alertList === void 0 ? void 0 : alertList.drugCodes) !== null && _alertList$drugCodes !== void 0 ? _alertList$drugCodes : [],
|
|
38872
|
+
DiseaseCodes: (_alertList$diseaseCod = alertList === null || alertList === void 0 ? void 0 : alertList.diseaseCodes) !== null && _alertList$diseaseCod !== void 0 ? _alertList$diseaseCod : [],
|
|
38873
|
+
AllergyCodes: (_alertList$allergyCod = alertList === null || alertList === void 0 ? void 0 : alertList.allergyCodes) !== null && _alertList$allergyCod !== void 0 ? _alertList$allergyCod : [],
|
|
38874
|
+
Doses: [{
|
|
38875
|
+
DrugName: "Amoxlin 450 mg",
|
|
38876
|
+
GCNSEQNO: 8997,
|
|
38877
|
+
ICDCode: "A181",
|
|
38878
|
+
DoseTypeIndicator: "02",
|
|
38879
|
+
Route: "064",
|
|
38880
|
+
Dose: {
|
|
38881
|
+
Value: 0.125,
|
|
38882
|
+
UOM: "G/DAY"
|
|
38627
38883
|
},
|
|
38628
|
-
|
|
38629
|
-
|
|
38884
|
+
Frequency: {
|
|
38885
|
+
Code: "QD"
|
|
38630
38886
|
},
|
|
38631
|
-
|
|
38632
|
-
|
|
38887
|
+
Duration: {
|
|
38888
|
+
Value: 1
|
|
38633
38889
|
}
|
|
38634
38890
|
}]
|
|
38635
38891
|
};
|
|
38636
38892
|
}
|
|
38637
38893
|
};
|
|
38894
|
+
var alertIntractionUpsert = {
|
|
38895
|
+
UpsertAlertInterations: function UpsertAlertInterations(data) {
|
|
38896
|
+
var _data$presType, _data$alerts, _data$alerts$, _data$addForm, _data$addForm$reason, _data$addForm2, _data$addForm3, _data$addForm3$reason;
|
|
38897
|
+
|
|
38898
|
+
return [{
|
|
38899
|
+
db_name: dbName,
|
|
38900
|
+
entity: "PH_OrderLineAlertLogs",
|
|
38901
|
+
is_metadata: true,
|
|
38902
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
38903
|
+
doc: {
|
|
38904
|
+
id: 0,
|
|
38905
|
+
orgEntityType: data === null || data === void 0 ? void 0 : data.orgEntityType,
|
|
38906
|
+
org_Id: data === null || data === void 0 ? void 0 : data.orgId,
|
|
38907
|
+
patient_Id: data === null || data === void 0 ? void 0 : data.patientid,
|
|
38908
|
+
encountertype: data === null || data === void 0 ? void 0 : data.encountertype,
|
|
38909
|
+
encounter_Id: data === null || data === void 0 ? void 0 : data.encounterid,
|
|
38910
|
+
presType: data === null || data === void 0 ? void 0 : (_data$presType = data.presType) === null || _data$presType === void 0 ? void 0 : _data$presType.Value,
|
|
38911
|
+
rxId: "",
|
|
38912
|
+
rxDate: data === null || data === void 0 ? void 0 : data.rxDate,
|
|
38913
|
+
interactionMessage: [{
|
|
38914
|
+
seqNo: 1,
|
|
38915
|
+
reactionCode: data === null || data === void 0 ? void 0 : data.alertReasonCode,
|
|
38916
|
+
alertMessage: data === null || data === void 0 ? void 0 : (_data$alerts = data.alerts) === null || _data$alerts === void 0 ? void 0 : (_data$alerts$ = _data$alerts[0]) === null || _data$alerts$ === void 0 ? void 0 : _data$alerts$.Message,
|
|
38917
|
+
overrideReasonCode: data === null || data === void 0 ? void 0 : (_data$addForm = data.addForm) === null || _data$addForm === void 0 ? void 0 : (_data$addForm$reason = _data$addForm.reason) === null || _data$addForm$reason === void 0 ? void 0 : _data$addForm$reason.label,
|
|
38918
|
+
overrideNotes: data === null || data === void 0 ? void 0 : (_data$addForm2 = data.addForm) === null || _data$addForm2 === void 0 ? void 0 : _data$addForm2.Others,
|
|
38919
|
+
overrideById: data === null || data === void 0 ? void 0 : (_data$addForm3 = data.addForm) === null || _data$addForm3 === void 0 ? void 0 : (_data$addForm3$reason = _data$addForm3.reason) === null || _data$addForm3$reason === void 0 ? void 0 : _data$addForm3$reason.label
|
|
38920
|
+
}]
|
|
38921
|
+
}
|
|
38922
|
+
}];
|
|
38923
|
+
}
|
|
38924
|
+
};
|
|
38925
|
+
var reasonTypeCode = {
|
|
38926
|
+
reasonTypeCodeRead: function reasonTypeCodeRead(display) {
|
|
38927
|
+
return {
|
|
38928
|
+
db_name: dbName,
|
|
38929
|
+
entity: "CodingMaster",
|
|
38930
|
+
filter: "CodingMaster.Type=='REACTIONTYPE' && CodingMaster.activestatus==true && CodingMaster.status==true and lower(CodingMaster.display)==lower('".concat(display, "')"),
|
|
38931
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type','status')"
|
|
38932
|
+
};
|
|
38933
|
+
}
|
|
38934
|
+
};
|
|
38638
38935
|
|
|
38639
38936
|
var _extraReducers$5;
|
|
38640
38937
|
var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntractions", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
38641
38938
|
var payload,
|
|
38642
38939
|
_ref2,
|
|
38643
38940
|
rejectWithValue,
|
|
38941
|
+
alertList,
|
|
38644
38942
|
queriesjson,
|
|
38645
38943
|
res,
|
|
38944
|
+
alertInteratcion,
|
|
38646
38945
|
_args = arguments;
|
|
38647
38946
|
|
|
38648
38947
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -38652,10 +38951,8 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38652
38951
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
38653
38952
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
38654
38953
|
_context.prev = 2;
|
|
38655
|
-
|
|
38656
|
-
|
|
38657
|
-
|
|
38658
|
-
queriesjson = alertInteractionsQuery.alertInteractions();
|
|
38954
|
+
alertList = payload.alertList;
|
|
38955
|
+
queriesjson = alertInteractionsQuery.alertInteractions(alertList);
|
|
38659
38956
|
_context.next = 7;
|
|
38660
38957
|
return fetchData$3({
|
|
38661
38958
|
body: JSON.stringify(queriesjson)
|
|
@@ -38663,28 +38960,136 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38663
38960
|
|
|
38664
38961
|
case 7:
|
|
38665
38962
|
res = _context.sent;
|
|
38963
|
+
alertInteratcion = res.result.find(function (val) {
|
|
38964
|
+
var keys = Object.keys(val);
|
|
38965
|
+
|
|
38966
|
+
if (keys.includes("Drug-AllergyIngredient-Interaction")) {
|
|
38967
|
+
return true;
|
|
38968
|
+
}
|
|
38969
|
+
|
|
38970
|
+
return false;
|
|
38971
|
+
});
|
|
38666
38972
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
38667
|
-
data:
|
|
38973
|
+
data: alertInteratcion
|
|
38668
38974
|
}));
|
|
38669
38975
|
|
|
38670
|
-
case
|
|
38671
|
-
_context.prev =
|
|
38976
|
+
case 12:
|
|
38977
|
+
_context.prev = 12;
|
|
38672
38978
|
_context.t0 = _context["catch"](2);
|
|
38673
38979
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
38674
38980
|
message: _context.t0.message
|
|
38675
38981
|
})));
|
|
38676
38982
|
|
|
38677
|
-
case
|
|
38983
|
+
case 15:
|
|
38678
38984
|
case "end":
|
|
38679
38985
|
return _context.stop();
|
|
38680
38986
|
}
|
|
38681
38987
|
}
|
|
38682
|
-
}, _callee, null, [[2,
|
|
38988
|
+
}, _callee, null, [[2, 12]]);
|
|
38989
|
+
})));
|
|
38990
|
+
var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInteraction_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
38991
|
+
var payload,
|
|
38992
|
+
_ref4,
|
|
38993
|
+
rejectWithValue,
|
|
38994
|
+
list,
|
|
38995
|
+
queriesjson,
|
|
38996
|
+
res,
|
|
38997
|
+
_args2 = arguments;
|
|
38998
|
+
|
|
38999
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
39000
|
+
while (1) {
|
|
39001
|
+
switch (_context2.prev = _context2.next) {
|
|
39002
|
+
case 0:
|
|
39003
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
39004
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
39005
|
+
_context2.prev = 2;
|
|
39006
|
+
list = payload.list;
|
|
39007
|
+
queriesjson = alertIntractionUpsert.UpsertAlertInterations(list);
|
|
39008
|
+
_context2.next = 7;
|
|
39009
|
+
return fetchData$3({
|
|
39010
|
+
body: JSON.stringify(queriesjson)
|
|
39011
|
+
}, __uspsertUrl__);
|
|
39012
|
+
|
|
39013
|
+
case 7:
|
|
39014
|
+
res = _context2.sent;
|
|
39015
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
39016
|
+
data: res
|
|
39017
|
+
}));
|
|
39018
|
+
|
|
39019
|
+
case 11:
|
|
39020
|
+
_context2.prev = 11;
|
|
39021
|
+
_context2.t0 = _context2["catch"](2);
|
|
39022
|
+
debugger;
|
|
39023
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39024
|
+
message: _context2.t0.message
|
|
39025
|
+
})));
|
|
39026
|
+
|
|
39027
|
+
case 15:
|
|
39028
|
+
case "end":
|
|
39029
|
+
return _context2.stop();
|
|
39030
|
+
}
|
|
39031
|
+
}
|
|
39032
|
+
}, _callee2, null, [[2, 11]]);
|
|
39033
|
+
})));
|
|
39034
|
+
var REASON_TYPE_CODE_READ = createAsyncThunk("alertIntractionsSlice/reason_type_code", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
39035
|
+
var payload,
|
|
39036
|
+
_ref6,
|
|
39037
|
+
rejectWithValue,
|
|
39038
|
+
list,
|
|
39039
|
+
display,
|
|
39040
|
+
queriesjson,
|
|
39041
|
+
res,
|
|
39042
|
+
_args3 = arguments;
|
|
39043
|
+
|
|
39044
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
39045
|
+
while (1) {
|
|
39046
|
+
switch (_context3.prev = _context3.next) {
|
|
39047
|
+
case 0:
|
|
39048
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
39049
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
39050
|
+
_context3.prev = 2;
|
|
39051
|
+
list = payload.list;
|
|
39052
|
+
|
|
39053
|
+
if (list === "Drug-AllergyIngredient-Interaction") {
|
|
39054
|
+
display = "Drug-to-Allergy Interaction";
|
|
39055
|
+
} else if (list === "Drug-Drug-Interaction") {
|
|
39056
|
+
display = "Drug-to-Drug Interaction";
|
|
39057
|
+
} else if (list === "Drug-Disease-Interaction") {
|
|
39058
|
+
display = "Drug-to-Disease Interaction";
|
|
39059
|
+
}
|
|
39060
|
+
|
|
39061
|
+
queriesjson = reasonTypeCode.reasonTypeCodeRead(display);
|
|
39062
|
+
_context3.next = 8;
|
|
39063
|
+
return fetchData$3({
|
|
39064
|
+
body: JSON.stringify(queriesjson)
|
|
39065
|
+
}, __readDocumentUrl__);
|
|
39066
|
+
|
|
39067
|
+
case 8:
|
|
39068
|
+
res = _context3.sent;
|
|
39069
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
39070
|
+
data: res
|
|
39071
|
+
}));
|
|
39072
|
+
|
|
39073
|
+
case 12:
|
|
39074
|
+
_context3.prev = 12;
|
|
39075
|
+
_context3.t0 = _context3["catch"](2);
|
|
39076
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39077
|
+
message: _context3.t0.message
|
|
39078
|
+
})));
|
|
39079
|
+
|
|
39080
|
+
case 15:
|
|
39081
|
+
case "end":
|
|
39082
|
+
return _context3.stop();
|
|
39083
|
+
}
|
|
39084
|
+
}
|
|
39085
|
+
}, _callee3, null, [[2, 12]]);
|
|
38683
39086
|
})));
|
|
38684
39087
|
var alertIntractionsSlice = createSlice({
|
|
38685
39088
|
name: "alertIntractionsSlice",
|
|
38686
39089
|
initialState: {
|
|
38687
|
-
alert_interactions: _objectSpread2({}, defaultState.Info)
|
|
39090
|
+
alert_interactions: _objectSpread2({}, defaultState.Info),
|
|
39091
|
+
alertInteraction_upsert: _objectSpread2({}, defaultState.Info),
|
|
39092
|
+
reason_type_code: _objectSpread2({}, defaultState.Info)
|
|
38688
39093
|
},
|
|
38689
39094
|
extraReducers: (_extraReducers$5 = {}, _defineProperty(_extraReducers$5, ALERT_INTERACTIONS.fulfilled, function (state, action) {
|
|
38690
39095
|
var _action$payload;
|
|
@@ -38696,10 +39101,32 @@ var alertIntractionsSlice = createSlice({
|
|
|
38696
39101
|
var _action$payload2;
|
|
38697
39102
|
|
|
38698
39103
|
state.alert_interactions.loading = false, state.alert_interactions.error = true, state.alert_interactions = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
39104
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.fulfilled, function (state, action) {
|
|
39105
|
+
var _action$payload3;
|
|
39106
|
+
|
|
39107
|
+
state.alertInteraction_upsert.loading = false, state.alertInteraction_upsert.error = false, state.alertInteraction_upsert = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
39108
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.pending, function (state, action) {
|
|
39109
|
+
state.alertInteraction_upsert.error = false, state.alertInteraction_upsert.loading = true;
|
|
39110
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.rejected, function (state, action) {
|
|
39111
|
+
var _action$payload4;
|
|
39112
|
+
|
|
39113
|
+
state.alertInteraction_upsert.loading = false, state.alertInteraction_upsert.error = true, state.alertInteraction_upsert = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
39114
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.fulfilled, function (state, action) {
|
|
39115
|
+
var _action$payload5;
|
|
39116
|
+
|
|
39117
|
+
state.reason_type_code.loading = false, state.reason_type_code.error = false, state.reason_type_code = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
39118
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.pending, function (state, action) {
|
|
39119
|
+
state.reason_type_code.error = false, state.reason_type_code.loading = true;
|
|
39120
|
+
}), _defineProperty(_extraReducers$5, REASON_TYPE_CODE_READ.rejected, function (state, action) {
|
|
39121
|
+
var _action$payload6;
|
|
39122
|
+
|
|
39123
|
+
state.reason_type_code.loading = false, state.reason_type_code.error = true, state.reason_type_code = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
38699
39124
|
}), _extraReducers$5)
|
|
38700
39125
|
});
|
|
38701
39126
|
var alertIntractionActions = {
|
|
38702
|
-
ALERT_INTERACTIONS: ALERT_INTERACTIONS
|
|
39127
|
+
ALERT_INTERACTIONS: ALERT_INTERACTIONS,
|
|
39128
|
+
ALERT_INTERACTIONS_UPERT: ALERT_INTERACTIONS_UPERT,
|
|
39129
|
+
REASON_TYPE_CODE_READ: REASON_TYPE_CODE_READ
|
|
38703
39130
|
};
|
|
38704
39131
|
var alertIntractionsSlice$1 = alertIntractionsSlice.reducer;
|
|
38705
39132
|
|