primarycare-binder 1.1.7 → 1.1.8
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 +526 -189
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -24587,10 +24587,10 @@ var queries$7 = {
|
|
|
24587
24587
|
// "return_fields": "CA_AllergyIntolerance"
|
|
24588
24588
|
// }
|
|
24589
24589
|
return {
|
|
24590
|
-
db_name:
|
|
24590
|
+
db_name: dbName,
|
|
24591
24591
|
entity: "CA_AllergyIntolerance",
|
|
24592
24592
|
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)}))}))}))})"
|
|
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)}))}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24594
24594
|
};
|
|
24595
24595
|
},
|
|
24596
24596
|
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 +24612,7 @@ var queries$7 = {
|
|
|
24612
24612
|
filter: {
|
|
24613
24613
|
CA_AllergyIntolerance: "CA_AllergyIntolerance.patient_id=='".concat(patientId, "'")
|
|
24614
24614
|
},
|
|
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)}))}))})"
|
|
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)}))}))},{code:keep(document(CA_AllergyIntolerance.code),'_id','longdesc','id','code','_key')})"
|
|
24616
24616
|
};
|
|
24617
24617
|
}
|
|
24618
24618
|
};
|
|
@@ -24786,7 +24786,7 @@ var generateJSON$3 = function generateJSON(data) {
|
|
|
24786
24786
|
|
|
24787
24787
|
var generateResJson$4 = function generateResJson(dataList, state) {
|
|
24788
24788
|
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;
|
|
24789
|
+
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
24790
|
|
|
24791
24791
|
// let clicnicalstatushistory = val?.clicnicalstatushistory?.map(val => {
|
|
24792
24792
|
// return {
|
|
@@ -24796,7 +24796,10 @@ var generateResJson$4 = function generateResJson(dataList, state) {
|
|
|
24796
24796
|
// }
|
|
24797
24797
|
// })
|
|
24798
24798
|
return {
|
|
24799
|
-
"allergenCode":
|
|
24799
|
+
"allergenCode": {
|
|
24800
|
+
label: data === null || data === void 0 ? void 0 : (_data$code = data.code) === null || _data$code === void 0 ? void 0 : _data$code.longdesc,
|
|
24801
|
+
value: data === null || data === void 0 ? void 0 : (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2._id
|
|
24802
|
+
},
|
|
24800
24803
|
"asserted": (_data$category = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category !== void 0 ? _data$category : null,
|
|
24801
24804
|
"category": (_data$category2 = data === null || data === void 0 ? void 0 : data.category) !== null && _data$category2 !== void 0 ? _data$category2 : null,
|
|
24802
24805
|
"clinicalStatus": (_data$clinicalstatus = data === null || data === void 0 ? void 0 : data.clinicalstatus) !== null && _data$clinicalstatus !== void 0 ? _data$clinicalstatus : null,
|
|
@@ -25979,7 +25982,7 @@ var queries$6 = {
|
|
|
25979
25982
|
db_name: "primarycare",
|
|
25980
25983
|
entity: "CA_OrderLine",
|
|
25981
25984
|
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}`,
|
|
25985
|
+
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
25986
|
// entity: "CA_OrderLine",
|
|
25984
25987
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=="${order_id}" && CA_OrderLine.activestatus==true`,
|
|
25985
25988
|
// filter: `CA_OrderLine.encounter_Id=="${encounter_id}" && CA_OrderLine.Oltype=='LAB' && CA_OrderLine.parentOrderId=='' && CA_OrderLine.activestatus==true`,
|
|
@@ -26056,7 +26059,7 @@ var queries$6 = {
|
|
|
26056
26059
|
|
|
26057
26060
|
var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
26058
26061
|
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$
|
|
26062
|
+
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
26063
|
|
|
26061
26064
|
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
26065
|
return {
|
|
@@ -26149,7 +26152,8 @@ var generateResJson$3 = function generateResJson(dataList, arr) {
|
|
|
26149
26152
|
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
26153
|
orderBy: {
|
|
26151
26154
|
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
|
-
|
|
26155
|
+
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,
|
|
26156
|
+
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
26157
|
}
|
|
26154
26158
|
},
|
|
26155
26159
|
indication: {
|
|
@@ -26231,7 +26235,7 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26231
26235
|
return el != null;
|
|
26232
26236
|
});
|
|
26233
26237
|
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$
|
|
26238
|
+
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
26239
|
|
|
26236
26240
|
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
26241
|
return {
|
|
@@ -26310,20 +26314,21 @@ var RecurrentgenerateResJson$2 = function RecurrentgenerateResJson(dataList, arr
|
|
|
26310
26314
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
26311
26315
|
requestorDetails: {
|
|
26312
26316
|
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$
|
|
26317
|
+
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,
|
|
26318
|
+
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,
|
|
26319
|
+
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
26320
|
},
|
|
26317
26321
|
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$
|
|
26322
|
+
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 : "",
|
|
26323
|
+
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 : "",
|
|
26324
|
+
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,
|
|
26325
|
+
_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
26326
|
},
|
|
26323
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
26327
|
+
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
26328
|
orderBy: {
|
|
26325
|
-
value: val === null || val === void 0 ? void 0 : (_val$
|
|
26326
|
-
|
|
26329
|
+
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,
|
|
26330
|
+
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,
|
|
26331
|
+
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
26332
|
}
|
|
26328
26333
|
},
|
|
26329
26334
|
indication: {
|
|
@@ -27717,12 +27722,13 @@ var LABORDER_ORGANIZATION = createAsyncThunk("LabOrderApiSlice/laborder_orgnniza
|
|
|
27717
27722
|
data3 = _context23.sent;
|
|
27718
27723
|
arr3 = [];
|
|
27719
27724
|
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;
|
|
27725
|
+
var _val$shortdesc, _val$shortdesc2, _val$_id6, _val$locationID;
|
|
27721
27726
|
|
|
27722
27727
|
arr3.push({
|
|
27723
27728
|
label: (_val$shortdesc = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc !== void 0 ? _val$shortdesc : "",
|
|
27724
27729
|
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 : ""
|
|
27730
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
27731
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
27726
27732
|
});
|
|
27727
27733
|
});
|
|
27728
27734
|
_context23.next = 26;
|
|
@@ -27794,7 +27800,7 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27794
27800
|
data2 = _context24.sent;
|
|
27795
27801
|
arr2 = [];
|
|
27796
27802
|
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;
|
|
27803
|
+
var _val$name2, _val$_id7, _val$practitioner_id;
|
|
27798
27804
|
|
|
27799
27805
|
// if (
|
|
27800
27806
|
// val.name[0]?.prefix[0]?.coding.display +
|
|
@@ -27803,7 +27809,8 @@ var ORDER_TYPE_REQ_DETAILS_LAB = createAsyncThunk("LabOrderApiSlice/order_type_r
|
|
|
27803
27809
|
// ) {
|
|
27804
27810
|
arr2.push({
|
|
27805
27811
|
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 : ""
|
|
27812
|
+
value: (_val$_id7 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id7 !== void 0 ? _val$_id7 : "",
|
|
27813
|
+
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
27814
|
}); // }
|
|
27808
27815
|
});
|
|
27809
27816
|
return _context24.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
@@ -28569,7 +28576,7 @@ var LabOrderApiSlice$1 = LabOrderApiSlice.reducer;
|
|
|
28569
28576
|
|
|
28570
28577
|
var queries$5 = {
|
|
28571
28578
|
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 }"),
|
|
28579
|
+
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
28580
|
getMedications: function getMedications(id) {
|
|
28574
28581
|
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
28582
|
},
|
|
@@ -28640,6 +28647,25 @@ var queries$5 = {
|
|
|
28640
28647
|
// }
|
|
28641
28648
|
// ]
|
|
28642
28649
|
|
|
28650
|
+
var codeQuery = {
|
|
28651
|
+
AllergyCodes: function AllergyCodes(list) {
|
|
28652
|
+
return {
|
|
28653
|
+
db_name: dbName,
|
|
28654
|
+
entity: "CA_AllergyIntolerance",
|
|
28655
|
+
filter: "CA_AllergyIntolerance.encounter_id=='".concat(list, "' && CA_AllergyIntolerance.activestatus==true"),
|
|
28656
|
+
"return_fields": "{code:document(CA_AllergyIntolerance.code)}"
|
|
28657
|
+
};
|
|
28658
|
+
},
|
|
28659
|
+
DrugCodes: function DrugCodes(list) {
|
|
28660
|
+
return {
|
|
28661
|
+
db_name: dbName,
|
|
28662
|
+
entity: "CA_Diagnosis",
|
|
28663
|
+
filter: "CA_Diagnosis.encounter_id=='".concat(list, "' && CA_Diagnosis.activestatus==true"),
|
|
28664
|
+
return_fields: "{diagcode:document(CA_Diagnosis.diagcode)}"
|
|
28665
|
+
};
|
|
28666
|
+
}
|
|
28667
|
+
};
|
|
28668
|
+
|
|
28643
28669
|
var _extraReducers$g;
|
|
28644
28670
|
var DRUGTYPE_MASTER = createAsyncThunk("MedicationMastersSlice/drugType_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
28645
28671
|
var payload,
|
|
@@ -28715,7 +28741,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28715
28741
|
data = _context2.sent;
|
|
28716
28742
|
arr = [];
|
|
28717
28743
|
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;
|
|
28744
|
+
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid;
|
|
28719
28745
|
|
|
28720
28746
|
var json = {
|
|
28721
28747
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
@@ -28727,7 +28753,8 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
28727
28753
|
drugType: val === null || val === void 0 ? void 0 : (_val$DrugType = val.DrugType) === null || _val$DrugType === void 0 ? void 0 : _val$DrugType.drugtype,
|
|
28728
28754
|
drugTypeLong: val === null || val === void 0 ? void 0 : (_val$DrugType2 = val.DrugType) === null || _val$DrugType2 === void 0 ? void 0 : _val$DrugType2.longdesc,
|
|
28729
28755
|
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
|
|
28756
|
+
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id,
|
|
28757
|
+
drugroutegenid: (_val$drugroutegenid = val === null || val === void 0 ? void 0 : val.drugroutegenid) !== null && _val$drugroutegenid !== void 0 ? _val$drugroutegenid : "" // formValue
|
|
28731
28758
|
|
|
28732
28759
|
};
|
|
28733
28760
|
arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
|
|
@@ -30583,18 +30610,13 @@ var MedicationMastersActions = {
|
|
|
30583
30610
|
var MedicationMastersSlice$1 = MedicationMastersSlice.reducer;
|
|
30584
30611
|
|
|
30585
30612
|
var _extraReducers$f;
|
|
30586
|
-
var
|
|
30613
|
+
var ALERT_CODES = createAsyncThunk("medicationsSlice/alert_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
30587
30614
|
var payload,
|
|
30588
30615
|
_ref2,
|
|
30589
30616
|
rejectWithValue,
|
|
30590
|
-
_data$Result,
|
|
30591
|
-
_data$Result$,
|
|
30592
|
-
_data$Result$$propert,
|
|
30593
|
-
_data$Result$$propert2,
|
|
30594
30617
|
list,
|
|
30595
|
-
orgData,
|
|
30596
|
-
body,
|
|
30597
30618
|
data,
|
|
30619
|
+
code,
|
|
30598
30620
|
_args = arguments;
|
|
30599
30621
|
|
|
30600
30622
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -30604,44 +30626,143 @@ var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#_
|
|
|
30604
30626
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
30605
30627
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
30606
30628
|
_context.prev = 2;
|
|
30607
|
-
list = payload;
|
|
30629
|
+
list = payload.list;
|
|
30608
30630
|
_context.next = 6;
|
|
30631
|
+
return fetchData$3({
|
|
30632
|
+
body: JSON.stringify(codeQuery.AllergyCodes(list))
|
|
30633
|
+
}, __readDocumentUrl__);
|
|
30634
|
+
|
|
30635
|
+
case 6:
|
|
30636
|
+
data = _context.sent;
|
|
30637
|
+
code = data.result.map(function (val) {
|
|
30638
|
+
return {
|
|
30639
|
+
codes: val.code.code
|
|
30640
|
+
};
|
|
30641
|
+
});
|
|
30642
|
+
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30643
|
+
data: code
|
|
30644
|
+
}));
|
|
30645
|
+
|
|
30646
|
+
case 11:
|
|
30647
|
+
_context.prev = 11;
|
|
30648
|
+
_context.t0 = _context["catch"](2);
|
|
30649
|
+
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30650
|
+
message: _context.t0.message
|
|
30651
|
+
})));
|
|
30652
|
+
|
|
30653
|
+
case 14:
|
|
30654
|
+
case "end":
|
|
30655
|
+
return _context.stop();
|
|
30656
|
+
}
|
|
30657
|
+
}
|
|
30658
|
+
}, _callee, null, [[2, 11]]);
|
|
30659
|
+
})));
|
|
30660
|
+
var DRUG_CODES = createAsyncThunk("medicationsSlice/drug_codes", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
30661
|
+
var payload,
|
|
30662
|
+
_ref4,
|
|
30663
|
+
rejectWithValue,
|
|
30664
|
+
list,
|
|
30665
|
+
data,
|
|
30666
|
+
code,
|
|
30667
|
+
_args2 = arguments;
|
|
30668
|
+
|
|
30669
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
30670
|
+
while (1) {
|
|
30671
|
+
switch (_context2.prev = _context2.next) {
|
|
30672
|
+
case 0:
|
|
30673
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
30674
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
30675
|
+
_context2.prev = 2;
|
|
30676
|
+
list = payload.list;
|
|
30677
|
+
_context2.next = 6;
|
|
30678
|
+
return fetchData$3({
|
|
30679
|
+
body: JSON.stringify(codeQuery.DrugCodes(list))
|
|
30680
|
+
}, __readDocumentUrl__);
|
|
30681
|
+
|
|
30682
|
+
case 6:
|
|
30683
|
+
data = _context2.sent;
|
|
30684
|
+
code = data.result.map(function (val) {
|
|
30685
|
+
return {
|
|
30686
|
+
codes: val.diagcode.icdcode
|
|
30687
|
+
};
|
|
30688
|
+
});
|
|
30689
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
30690
|
+
data: code
|
|
30691
|
+
}));
|
|
30692
|
+
|
|
30693
|
+
case 11:
|
|
30694
|
+
_context2.prev = 11;
|
|
30695
|
+
_context2.t0 = _context2["catch"](2);
|
|
30696
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30697
|
+
message: _context2.t0.message
|
|
30698
|
+
})));
|
|
30699
|
+
|
|
30700
|
+
case 14:
|
|
30701
|
+
case "end":
|
|
30702
|
+
return _context2.stop();
|
|
30703
|
+
}
|
|
30704
|
+
}
|
|
30705
|
+
}, _callee2, null, [[2, 11]]);
|
|
30706
|
+
})));
|
|
30707
|
+
var SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/save_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
30708
|
+
var payload,
|
|
30709
|
+
_ref6,
|
|
30710
|
+
rejectWithValue,
|
|
30711
|
+
_data$Result,
|
|
30712
|
+
_data$Result$,
|
|
30713
|
+
_data$Result$$propert,
|
|
30714
|
+
_data$Result$$propert2,
|
|
30715
|
+
list,
|
|
30716
|
+
orgData,
|
|
30717
|
+
body,
|
|
30718
|
+
data,
|
|
30719
|
+
_args3 = arguments;
|
|
30720
|
+
|
|
30721
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
30722
|
+
while (1) {
|
|
30723
|
+
switch (_context3.prev = _context3.next) {
|
|
30724
|
+
case 0:
|
|
30725
|
+
payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
30726
|
+
_ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
|
|
30727
|
+
_context3.prev = 2;
|
|
30728
|
+
list = payload;
|
|
30729
|
+
_context3.next = 6;
|
|
30609
30730
|
return fetchData$3({
|
|
30610
30731
|
body: queries$5.getOrganizationId(payload.orgId)
|
|
30611
30732
|
}, __readDocumentUrl__);
|
|
30612
30733
|
|
|
30613
30734
|
case 6:
|
|
30614
|
-
orgData =
|
|
30735
|
+
orgData = _context3.sent;
|
|
30615
30736
|
body = generateJSON$4(list, orgData.result[0]);
|
|
30616
|
-
|
|
30737
|
+
_context3.next = 10;
|
|
30617
30738
|
return fetchData$3({
|
|
30618
30739
|
body: JSON.stringify(body)
|
|
30619
30740
|
}, __uspsertUrl__);
|
|
30620
30741
|
|
|
30621
30742
|
case 10:
|
|
30622
|
-
data =
|
|
30623
|
-
return
|
|
30743
|
+
data = _context3.sent;
|
|
30744
|
+
return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30624
30745
|
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
30746
|
}));
|
|
30626
30747
|
|
|
30627
30748
|
case 14:
|
|
30628
|
-
|
|
30629
|
-
|
|
30630
|
-
console.log(
|
|
30631
|
-
return
|
|
30632
|
-
message:
|
|
30749
|
+
_context3.prev = 14;
|
|
30750
|
+
_context3.t0 = _context3["catch"](2);
|
|
30751
|
+
console.log(_context3.t0);
|
|
30752
|
+
return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30753
|
+
message: _context3.t0.message
|
|
30633
30754
|
})));
|
|
30634
30755
|
|
|
30635
30756
|
case 18:
|
|
30636
30757
|
case "end":
|
|
30637
|
-
return
|
|
30758
|
+
return _context3.stop();
|
|
30638
30759
|
}
|
|
30639
30760
|
}
|
|
30640
|
-
},
|
|
30761
|
+
}, _callee3, null, [[2, 14]]);
|
|
30641
30762
|
})));
|
|
30642
|
-
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30763
|
+
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
30643
30764
|
var payload,
|
|
30644
|
-
|
|
30765
|
+
_ref8,
|
|
30645
30766
|
rejectWithValue,
|
|
30646
30767
|
_list$status,
|
|
30647
30768
|
_data$Result2,
|
|
@@ -30651,15 +30772,15 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30651
30772
|
list,
|
|
30652
30773
|
body,
|
|
30653
30774
|
data,
|
|
30654
|
-
|
|
30775
|
+
_args4 = arguments;
|
|
30655
30776
|
|
|
30656
|
-
return regeneratorRuntime.wrap(function
|
|
30777
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
30657
30778
|
while (1) {
|
|
30658
|
-
switch (
|
|
30779
|
+
switch (_context4.prev = _context4.next) {
|
|
30659
30780
|
case 0:
|
|
30660
|
-
payload =
|
|
30661
|
-
|
|
30662
|
-
|
|
30781
|
+
payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
|
|
30782
|
+
_ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
|
|
30783
|
+
_context4.prev = 2;
|
|
30663
30784
|
list = payload; // const states = getState();
|
|
30664
30785
|
|
|
30665
30786
|
body = [{
|
|
@@ -30683,76 +30804,76 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
30683
30804
|
// ))
|
|
30684
30805
|
// }
|
|
30685
30806
|
|
|
30686
|
-
|
|
30807
|
+
_context4.next = 7;
|
|
30687
30808
|
return fetchData$3({
|
|
30688
30809
|
body: JSON.stringify(body)
|
|
30689
30810
|
}, __update__);
|
|
30690
30811
|
|
|
30691
30812
|
case 7:
|
|
30692
|
-
data =
|
|
30693
|
-
return
|
|
30813
|
+
data = _context4.sent;
|
|
30814
|
+
return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30694
30815
|
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
30816
|
}));
|
|
30696
30817
|
|
|
30697
30818
|
case 11:
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
console.log(
|
|
30701
|
-
return
|
|
30702
|
-
message:
|
|
30819
|
+
_context4.prev = 11;
|
|
30820
|
+
_context4.t0 = _context4["catch"](2);
|
|
30821
|
+
console.log(_context4.t0);
|
|
30822
|
+
return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30823
|
+
message: _context4.t0.message
|
|
30703
30824
|
})));
|
|
30704
30825
|
|
|
30705
30826
|
case 15:
|
|
30706
30827
|
case "end":
|
|
30707
|
-
return
|
|
30828
|
+
return _context4.stop();
|
|
30708
30829
|
}
|
|
30709
30830
|
}
|
|
30710
|
-
},
|
|
30831
|
+
}, _callee4, null, [[2, 11]]);
|
|
30711
30832
|
})));
|
|
30712
|
-
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30833
|
+
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
30713
30834
|
var payload,
|
|
30714
|
-
|
|
30835
|
+
_ref10,
|
|
30715
30836
|
rejectWithValue,
|
|
30716
30837
|
id,
|
|
30717
30838
|
data,
|
|
30718
|
-
|
|
30839
|
+
_args5 = arguments;
|
|
30719
30840
|
|
|
30720
|
-
return regeneratorRuntime.wrap(function
|
|
30841
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
30721
30842
|
while (1) {
|
|
30722
|
-
switch (
|
|
30843
|
+
switch (_context5.prev = _context5.next) {
|
|
30723
30844
|
case 0:
|
|
30724
|
-
payload =
|
|
30725
|
-
|
|
30726
|
-
|
|
30845
|
+
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
30846
|
+
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
30847
|
+
_context5.prev = 2;
|
|
30727
30848
|
id = payload.id;
|
|
30728
|
-
|
|
30849
|
+
_context5.next = 6;
|
|
30729
30850
|
return fetchData$3({
|
|
30730
30851
|
body: queries$5.getMedications(id)
|
|
30731
30852
|
}, __readDocumentUrl__);
|
|
30732
30853
|
|
|
30733
30854
|
case 6:
|
|
30734
|
-
data =
|
|
30735
|
-
return
|
|
30855
|
+
data = _context5.sent;
|
|
30856
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30736
30857
|
data: data === null || data === void 0 ? void 0 : data.result
|
|
30737
30858
|
}));
|
|
30738
30859
|
|
|
30739
30860
|
case 10:
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
return
|
|
30743
|
-
message:
|
|
30861
|
+
_context5.prev = 10;
|
|
30862
|
+
_context5.t0 = _context5["catch"](2);
|
|
30863
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30864
|
+
message: _context5.t0.message
|
|
30744
30865
|
})));
|
|
30745
30866
|
|
|
30746
30867
|
case 13:
|
|
30747
30868
|
case "end":
|
|
30748
|
-
return
|
|
30869
|
+
return _context5.stop();
|
|
30749
30870
|
}
|
|
30750
30871
|
}
|
|
30751
|
-
},
|
|
30872
|
+
}, _callee5, null, [[2, 10]]);
|
|
30752
30873
|
})));
|
|
30753
|
-
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
30874
|
+
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
30754
30875
|
var payload,
|
|
30755
|
-
|
|
30876
|
+
_ref12,
|
|
30756
30877
|
rejectWithValue,
|
|
30757
30878
|
getState,
|
|
30758
30879
|
personId,
|
|
@@ -30765,15 +30886,15 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30765
30886
|
arr,
|
|
30766
30887
|
data,
|
|
30767
30888
|
PH_PresWorkflowStatusTrx,
|
|
30768
|
-
|
|
30889
|
+
_args6 = arguments;
|
|
30769
30890
|
|
|
30770
|
-
return regeneratorRuntime.wrap(function
|
|
30891
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
30771
30892
|
while (1) {
|
|
30772
|
-
switch (
|
|
30893
|
+
switch (_context6.prev = _context6.next) {
|
|
30773
30894
|
case 0:
|
|
30774
|
-
payload =
|
|
30775
|
-
|
|
30776
|
-
|
|
30895
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
30896
|
+
_ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue, getState = _ref12.getState;
|
|
30897
|
+
_context6.prev = 2;
|
|
30777
30898
|
personId = payload.personId;
|
|
30778
30899
|
states = getState();
|
|
30779
30900
|
flowStatus = states.MedicationMastersSlice.workflow_status_masters.data.filter(function (val) {
|
|
@@ -30810,39 +30931,39 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
30810
30931
|
}
|
|
30811
30932
|
};
|
|
30812
30933
|
});
|
|
30813
|
-
|
|
30934
|
+
_context6.next = 13;
|
|
30814
30935
|
return fetchData$3({
|
|
30815
30936
|
body: JSON.stringify(arr)
|
|
30816
30937
|
}, __update__);
|
|
30817
30938
|
|
|
30818
30939
|
case 13:
|
|
30819
|
-
data =
|
|
30820
|
-
|
|
30940
|
+
data = _context6.sent;
|
|
30941
|
+
_context6.next = 16;
|
|
30821
30942
|
return fetchData$3({
|
|
30822
30943
|
body: JSON.stringify(flowStatusList)
|
|
30823
30944
|
}, __uspsertUrl__);
|
|
30824
30945
|
|
|
30825
30946
|
case 16:
|
|
30826
|
-
PH_PresWorkflowStatusTrx =
|
|
30827
|
-
return
|
|
30947
|
+
PH_PresWorkflowStatusTrx = _context6.sent;
|
|
30948
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
30828
30949
|
data: data,
|
|
30829
30950
|
PH_PresWorkflowStatusTrx: PH_PresWorkflowStatusTrx
|
|
30830
30951
|
}));
|
|
30831
30952
|
|
|
30832
30953
|
case 20:
|
|
30833
|
-
|
|
30834
|
-
|
|
30835
|
-
console.log(
|
|
30836
|
-
return
|
|
30837
|
-
message:
|
|
30954
|
+
_context6.prev = 20;
|
|
30955
|
+
_context6.t0 = _context6["catch"](2);
|
|
30956
|
+
console.log(_context6.t0);
|
|
30957
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
30958
|
+
message: _context6.t0.message
|
|
30838
30959
|
})));
|
|
30839
30960
|
|
|
30840
30961
|
case 24:
|
|
30841
30962
|
case "end":
|
|
30842
|
-
return
|
|
30963
|
+
return _context6.stop();
|
|
30843
30964
|
}
|
|
30844
30965
|
}
|
|
30845
|
-
},
|
|
30966
|
+
}, _callee6, null, [[2, 20]]);
|
|
30846
30967
|
})));
|
|
30847
30968
|
var medicationsSlice = createSlice({
|
|
30848
30969
|
name: "medicationsSlice",
|
|
@@ -30850,55 +30971,79 @@ var medicationsSlice = createSlice({
|
|
|
30850
30971
|
save_medication: _objectSpread2({}, defaultState.Info),
|
|
30851
30972
|
update_medication: _objectSpread2({}, defaultState.Info),
|
|
30852
30973
|
update_workflow_status: _objectSpread2({}, defaultState.Info),
|
|
30853
|
-
medication_list: _objectSpread2({}, defaultState.List)
|
|
30974
|
+
medication_list: _objectSpread2({}, defaultState.List),
|
|
30975
|
+
alert_codes: _objectSpread2({}, defaultState.list),
|
|
30976
|
+
drug_codes: _objectSpread2({}, defaultState.list)
|
|
30854
30977
|
},
|
|
30855
|
-
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f,
|
|
30978
|
+
extraReducers: (_extraReducers$f = {}, _defineProperty(_extraReducers$f, ALERT_CODES.fulfilled, function (state, action) {
|
|
30856
30979
|
var _action$payload;
|
|
30857
30980
|
|
|
30858
|
-
state.
|
|
30981
|
+
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 : {};
|
|
30982
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.pending, function (state, action) {
|
|
30983
|
+
state.alert_codes.error = false, state.alert_codes.loading = true;
|
|
30984
|
+
}), _defineProperty(_extraReducers$f, ALERT_CODES.rejected, function (state, action) {
|
|
30985
|
+
var _action$payload2;
|
|
30986
|
+
|
|
30987
|
+
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 : {};
|
|
30988
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.fulfilled, function (state, action) {
|
|
30989
|
+
var _action$payload3;
|
|
30990
|
+
|
|
30991
|
+
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 : {};
|
|
30992
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.pending, function (state, action) {
|
|
30993
|
+
state.drug_codes.error = false, state.drug_codes.loading = true;
|
|
30994
|
+
}), _defineProperty(_extraReducers$f, DRUG_CODES.rejected, function (state, action) {
|
|
30995
|
+
var _action$payload4;
|
|
30996
|
+
|
|
30997
|
+
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 : {};
|
|
30998
|
+
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.fulfilled, function (state, action) {
|
|
30999
|
+
var _action$payload5;
|
|
31000
|
+
|
|
31001
|
+
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
31002
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.pending, function (state, action) {
|
|
30860
31003
|
state.save_medication.error = false, state.save_medication.loading = true;
|
|
30861
31004
|
}), _defineProperty(_extraReducers$f, SAVE_MEDICATIONS.rejected, function (state, action) {
|
|
30862
|
-
var _action$
|
|
31005
|
+
var _action$payload6;
|
|
30863
31006
|
|
|
30864
|
-
state.save_medication.loading = false, state.save_medication.error = true, state.save_medication = (_action$
|
|
31007
|
+
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
31008
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.fulfilled, function (state, action) {
|
|
30866
|
-
var _action$
|
|
31009
|
+
var _action$payload7;
|
|
30867
31010
|
|
|
30868
|
-
state.update_medication.loading = false, state.update_medication.error = false, state.update_medication = (_action$
|
|
31011
|
+
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
31012
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.pending, function (state, action) {
|
|
30870
31013
|
state.update_medication.error = false, state.update_medication.loading = true;
|
|
30871
31014
|
}), _defineProperty(_extraReducers$f, UPDATE_MEDICATIONS.rejected, function (state, action) {
|
|
30872
|
-
var _action$
|
|
31015
|
+
var _action$payload8;
|
|
30873
31016
|
|
|
30874
|
-
state.update_medication.loading = false, state.update_medication.error = true, state.update_medication = (_action$
|
|
31017
|
+
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
31018
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.fulfilled, function (state, action) {
|
|
30876
|
-
var _action$
|
|
31019
|
+
var _action$payload9;
|
|
30877
31020
|
|
|
30878
|
-
state.medication_list.loading = false, state.medication_list.error = false, state.medication_list = (_action$
|
|
31021
|
+
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
31022
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.pending, function (state, action) {
|
|
30880
31023
|
state.medication_list.error = false, state.medication_list.loading = true;
|
|
30881
31024
|
}), _defineProperty(_extraReducers$f, GET_MEDICATIONS.rejected, function (state, action) {
|
|
30882
|
-
var _action$
|
|
31025
|
+
var _action$payload10;
|
|
30883
31026
|
|
|
30884
|
-
state.medication_list.loading = false, state.medication_list.error = true, state.medication_list = (_action$
|
|
31027
|
+
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
31028
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.fulfilled, function (state, action) {
|
|
30886
|
-
var _action$
|
|
31029
|
+
var _action$payload11;
|
|
30887
31030
|
|
|
30888
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = false, state.update_workflow_status = (_action$
|
|
31031
|
+
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
31032
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.pending, function (state, action) {
|
|
30890
31033
|
state.update_workflow_status.error = false, state.update_workflow_status.loading = true;
|
|
30891
31034
|
}), _defineProperty(_extraReducers$f, UPDATE_ALL_WORKFLOW_STATUS.rejected, function (state, action) {
|
|
30892
|
-
var _action$
|
|
31035
|
+
var _action$payload12;
|
|
30893
31036
|
|
|
30894
|
-
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$
|
|
31037
|
+
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
31038
|
}), _extraReducers$f)
|
|
30896
31039
|
});
|
|
30897
31040
|
var medicationsActions = {
|
|
30898
31041
|
SAVE_MEDICATIONS: SAVE_MEDICATIONS,
|
|
30899
31042
|
GET_MEDICATIONS: GET_MEDICATIONS,
|
|
30900
31043
|
UPDATE_MEDICATIONS: UPDATE_MEDICATIONS,
|
|
30901
|
-
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS
|
|
31044
|
+
UPDATE_ALL_WORKFLOW_STATUS: UPDATE_ALL_WORKFLOW_STATUS,
|
|
31045
|
+
ALERT_CODES: ALERT_CODES,
|
|
31046
|
+
DRUG_CODES: DRUG_CODES
|
|
30902
31047
|
};
|
|
30903
31048
|
var medicationsSlice$1 = medicationsSlice.reducer;
|
|
30904
31049
|
|
|
@@ -30933,7 +31078,7 @@ var queries$4 = {
|
|
|
30933
31078
|
db_name: "primarycare",
|
|
30934
31079
|
entity: "CA_OrderLine",
|
|
30935
31080
|
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)}))})"
|
|
31081
|
+
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
31082
|
};
|
|
30938
31083
|
},
|
|
30939
31084
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -31213,7 +31358,7 @@ var generateJSON$1 = function generateJSON(dataList) {
|
|
|
31213
31358
|
|
|
31214
31359
|
var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
31215
31360
|
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$
|
|
31361
|
+
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
31362
|
|
|
31218
31363
|
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
31364
|
return {
|
|
@@ -31309,8 +31454,9 @@ var generateResJson$2 = function generateResJson(dataList, arr) {
|
|
|
31309
31454
|
},
|
|
31310
31455
|
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
31456
|
orderBy: {
|
|
31312
|
-
|
|
31313
|
-
|
|
31457
|
+
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,
|
|
31458
|
+
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,
|
|
31459
|
+
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
31460
|
}
|
|
31315
31461
|
},
|
|
31316
31462
|
indication: {
|
|
@@ -31366,7 +31512,7 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31366
31512
|
return el != null;
|
|
31367
31513
|
});
|
|
31368
31514
|
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$
|
|
31515
|
+
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
31516
|
|
|
31371
31517
|
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
31518
|
return {
|
|
@@ -31445,20 +31591,21 @@ var RecurrentgenerateResJson$1 = function RecurrentgenerateResJson(dataList, arr
|
|
|
31445
31591
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
31446
31592
|
requestorDetails: {
|
|
31447
31593
|
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$
|
|
31594
|
+
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,
|
|
31595
|
+
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,
|
|
31596
|
+
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
31597
|
},
|
|
31452
31598
|
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$
|
|
31599
|
+
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 : "",
|
|
31600
|
+
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 : "",
|
|
31601
|
+
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,
|
|
31602
|
+
_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
31603
|
},
|
|
31458
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
31604
|
+
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
31605
|
orderBy: {
|
|
31460
|
-
|
|
31461
|
-
|
|
31606
|
+
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,
|
|
31607
|
+
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,
|
|
31608
|
+
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
31609
|
}
|
|
31463
31610
|
},
|
|
31464
31611
|
indication: {
|
|
@@ -32296,12 +32443,13 @@ var TREATMENT_ORGANIZATION = createAsyncThunk("TreatmentSlice/getorderorganizati
|
|
|
32296
32443
|
data3 = _context14.sent;
|
|
32297
32444
|
arr3 = [];
|
|
32298
32445
|
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;
|
|
32446
|
+
var _val$shortdesc4, _val$shortdesc5, _val$_id6, _val$locationID;
|
|
32300
32447
|
|
|
32301
32448
|
arr3.push({
|
|
32302
32449
|
label: (_val$shortdesc4 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc4 !== void 0 ? _val$shortdesc4 : "",
|
|
32303
32450
|
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 : ""
|
|
32451
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
32452
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
32305
32453
|
});
|
|
32306
32454
|
});
|
|
32307
32455
|
_context14.next = 26;
|
|
@@ -32845,7 +32993,7 @@ var queries$3 = (_queries = {
|
|
|
32845
32993
|
db_name: "primarycare",
|
|
32846
32994
|
entity: "CA_OrderLine",
|
|
32847
32995
|
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)}))})"
|
|
32996
|
+
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
32997
|
};
|
|
32850
32998
|
},
|
|
32851
32999
|
treatment_delete: function treatment_delete(id) {
|
|
@@ -33127,7 +33275,7 @@ var generateJSON = function generateJSON(dataList) {
|
|
|
33127
33275
|
|
|
33128
33276
|
var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
33129
33277
|
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$
|
|
33278
|
+
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
33279
|
|
|
33132
33280
|
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
33281
|
return {
|
|
@@ -33223,8 +33371,9 @@ var generateResJson$1 = function generateResJson(dataList, arr) {
|
|
|
33223
33371
|
},
|
|
33224
33372
|
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
33373
|
orderBy: {
|
|
33226
|
-
|
|
33227
|
-
|
|
33374
|
+
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,
|
|
33375
|
+
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,
|
|
33376
|
+
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
33377
|
}
|
|
33229
33378
|
},
|
|
33230
33379
|
indication: {
|
|
@@ -33280,7 +33429,7 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33280
33429
|
return el != null;
|
|
33281
33430
|
});
|
|
33282
33431
|
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$
|
|
33432
|
+
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
33433
|
|
|
33285
33434
|
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
33435
|
return {
|
|
@@ -33363,20 +33512,21 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
33363
33512
|
qty: JSON.stringify(val === null || val === void 0 ? void 0 : val.orderQty),
|
|
33364
33513
|
requestorDetails: {
|
|
33365
33514
|
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$
|
|
33515
|
+
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,
|
|
33516
|
+
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,
|
|
33517
|
+
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
33518
|
},
|
|
33370
33519
|
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$
|
|
33520
|
+
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 : "",
|
|
33521
|
+
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 : "",
|
|
33522
|
+
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,
|
|
33523
|
+
_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
33524
|
},
|
|
33376
|
-
practitionerId: val === null || val === void 0 ? void 0 : (_val$
|
|
33525
|
+
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
33526
|
orderBy: {
|
|
33378
|
-
|
|
33379
|
-
|
|
33527
|
+
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,
|
|
33528
|
+
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,
|
|
33529
|
+
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
33530
|
}
|
|
33381
33531
|
},
|
|
33382
33532
|
indication: {
|
|
@@ -34276,12 +34426,13 @@ var RAD_ORGANIZATION = createAsyncThunk("RadiologySlice/getorderorganization", /
|
|
|
34276
34426
|
data3 = _context15.sent;
|
|
34277
34427
|
arr3 = [];
|
|
34278
34428
|
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;
|
|
34429
|
+
var _val$shortdesc5, _val$shortdesc6, _val$_id6, _val$locationID;
|
|
34280
34430
|
|
|
34281
34431
|
arr3.push({
|
|
34282
34432
|
label: (_val$shortdesc5 = val === null || val === void 0 ? void 0 : val.shortdesc) !== null && _val$shortdesc5 !== void 0 ? _val$shortdesc5 : "",
|
|
34283
34433
|
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 : ""
|
|
34434
|
+
id: (_val$_id6 = val === null || val === void 0 ? void 0 : val._id) !== null && _val$_id6 !== void 0 ? _val$_id6 : "",
|
|
34435
|
+
locationID: (_val$locationID = val === null || val === void 0 ? void 0 : val.locationID) !== null && _val$locationID !== void 0 ? _val$locationID : ""
|
|
34285
34436
|
});
|
|
34286
34437
|
});
|
|
34287
34438
|
_context15.next = 26;
|
|
@@ -38605,50 +38756,173 @@ var appointmentStatsApiActions = {
|
|
|
38605
38756
|
var dashboardComponentApiSlice = appointmentStatsApiSlice.reducer;
|
|
38606
38757
|
|
|
38607
38758
|
var alertInteractionsQuery = {
|
|
38608
|
-
alertInteractions: function alertInteractions() {
|
|
38759
|
+
alertInteractions: function alertInteractions(alertList) {
|
|
38760
|
+
var _alertList$creatinine, _alertList$creatinine2, _alertList$drugCodes, _alertList$diseaseCod, _alertList$allergyCod;
|
|
38761
|
+
|
|
38609
38762
|
return {
|
|
38610
|
-
"Patient": {
|
|
38611
|
-
|
|
38612
|
-
|
|
38613
|
-
|
|
38614
|
-
|
|
38615
|
-
|
|
38616
|
-
|
|
38617
|
-
|
|
38763
|
+
// "Patient": {
|
|
38764
|
+
// "Age": 25,
|
|
38765
|
+
// "PatientName": "Fraklin Stephen",
|
|
38766
|
+
// "Weight": 5450,
|
|
38767
|
+
// "Height": 50,
|
|
38768
|
+
// "CreatinineClearance": {
|
|
38769
|
+
// "Value": 67,
|
|
38770
|
+
// "UOM": "MG/DAY"
|
|
38771
|
+
// },
|
|
38772
|
+
// "GestationalBirthAge": 22
|
|
38773
|
+
// },
|
|
38774
|
+
// "DrugCodes": [
|
|
38775
|
+
// 1049997,
|
|
38776
|
+
// 1052518,
|
|
38777
|
+
// 1052594,
|
|
38778
|
+
// 1052598,
|
|
38779
|
+
// 1050231,
|
|
38780
|
+
// 1048580,
|
|
38781
|
+
// 1066660,
|
|
38782
|
+
// 1049125,
|
|
38783
|
+
// 1050215,
|
|
38784
|
+
// 1048649,
|
|
38785
|
+
// 1054917,
|
|
38786
|
+
// 1051477
|
|
38787
|
+
// ],
|
|
38788
|
+
// "DiseaseCodes": [
|
|
38789
|
+
// "346",
|
|
38790
|
+
// "G43.909",
|
|
38791
|
+
// "D64.3",
|
|
38792
|
+
// "1052614"
|
|
38793
|
+
// ],
|
|
38794
|
+
// "AllergyCodes": [
|
|
38795
|
+
// 83,
|
|
38796
|
+
// 281,
|
|
38797
|
+
// 306,
|
|
38798
|
+
// 476,
|
|
38799
|
+
// 543,
|
|
38800
|
+
// 568,
|
|
38801
|
+
// 571,
|
|
38802
|
+
// 572,
|
|
38803
|
+
// 590,
|
|
38804
|
+
// 592,
|
|
38805
|
+
// 593,
|
|
38806
|
+
// 2715,
|
|
38807
|
+
// 2755,
|
|
38808
|
+
// 900028,
|
|
38809
|
+
// 1088
|
|
38810
|
+
// ],
|
|
38811
|
+
// "Doses": [
|
|
38812
|
+
// {
|
|
38813
|
+
// "DrugName": "Amoxlin 450 mg",
|
|
38814
|
+
// "GCNSEQNO": 8997,
|
|
38815
|
+
// "ICDCode": "A181",
|
|
38816
|
+
// "DoseTypeIndicator": "02",
|
|
38817
|
+
// "Route": "064",
|
|
38818
|
+
// "Dose": {
|
|
38819
|
+
// "Value": 0.125,
|
|
38820
|
+
// "UOM": "G/DAY"
|
|
38821
|
+
// },
|
|
38822
|
+
// "Frequency": {
|
|
38823
|
+
// "Code": "QD"
|
|
38824
|
+
// },
|
|
38825
|
+
// "Duration": {
|
|
38826
|
+
// "Value": 1
|
|
38827
|
+
// }
|
|
38828
|
+
// },
|
|
38829
|
+
// {
|
|
38830
|
+
// "DrugName": "sghd",
|
|
38831
|
+
// "GCNSEQNO": 8997,
|
|
38832
|
+
// "ICDCode": "sdf",
|
|
38833
|
+
// "DoseTypeIndicator": "02",
|
|
38834
|
+
// "Route": "sd",
|
|
38835
|
+
// "Dose": {
|
|
38836
|
+
// "Value": 0.125,
|
|
38837
|
+
// "UOM": "G/DAY"
|
|
38838
|
+
// },
|
|
38839
|
+
// "Frequency": {
|
|
38840
|
+
// "Code": "QD"
|
|
38841
|
+
// },
|
|
38842
|
+
// "Duration": {
|
|
38843
|
+
// "Value": 1
|
|
38844
|
+
// }
|
|
38845
|
+
// }
|
|
38846
|
+
// ]
|
|
38847
|
+
Patient: {
|
|
38848
|
+
Age: alertList === null || alertList === void 0 ? void 0 : alertList.age,
|
|
38849
|
+
PatientName: alertList === null || alertList === void 0 ? void 0 : alertList.patientName,
|
|
38850
|
+
Weight: alertList === null || alertList === void 0 ? void 0 : alertList.weight,
|
|
38851
|
+
Height: alertList === null || alertList === void 0 ? void 0 : alertList.height,
|
|
38852
|
+
CreatinineClearance: {
|
|
38853
|
+
Value: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine = alertList.creatinineClearance) === null || _alertList$creatinine === void 0 ? void 0 : _alertList$creatinine.Value,
|
|
38854
|
+
UOM: alertList === null || alertList === void 0 ? void 0 : (_alertList$creatinine2 = alertList.creatinineClearance) === null || _alertList$creatinine2 === void 0 ? void 0 : _alertList$creatinine2.UOM
|
|
38618
38855
|
},
|
|
38619
|
-
|
|
38856
|
+
GestationalBirthAge: alertList === null || alertList === void 0 ? void 0 : alertList.age
|
|
38620
38857
|
},
|
|
38621
|
-
|
|
38622
|
-
|
|
38623
|
-
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38627
|
-
|
|
38628
|
-
|
|
38629
|
-
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38858
|
+
DrugCodes: (_alertList$drugCodes = alertList === null || alertList === void 0 ? void 0 : alertList.drugCodes) !== null && _alertList$drugCodes !== void 0 ? _alertList$drugCodes : [],
|
|
38859
|
+
DiseaseCodes: (_alertList$diseaseCod = alertList === null || alertList === void 0 ? void 0 : alertList.diseaseCodes) !== null && _alertList$diseaseCod !== void 0 ? _alertList$diseaseCod : [],
|
|
38860
|
+
AllergyCodes: (_alertList$allergyCod = alertList === null || alertList === void 0 ? void 0 : alertList.allergyCodes) !== null && _alertList$allergyCod !== void 0 ? _alertList$allergyCod : [],
|
|
38861
|
+
Doses: [{
|
|
38862
|
+
DrugName: "Amoxlin 450 mg",
|
|
38863
|
+
GCNSEQNO: 8997,
|
|
38864
|
+
ICDCode: "A181",
|
|
38865
|
+
DoseTypeIndicator: "02",
|
|
38866
|
+
Route: "064",
|
|
38867
|
+
Dose: {
|
|
38868
|
+
Value: 0.125,
|
|
38869
|
+
UOM: "G/DAY"
|
|
38633
38870
|
},
|
|
38634
|
-
|
|
38635
|
-
|
|
38871
|
+
Frequency: {
|
|
38872
|
+
Code: "QD"
|
|
38636
38873
|
},
|
|
38637
|
-
|
|
38638
|
-
|
|
38874
|
+
Duration: {
|
|
38875
|
+
Value: 1
|
|
38639
38876
|
}
|
|
38640
38877
|
}]
|
|
38641
38878
|
};
|
|
38642
38879
|
}
|
|
38643
38880
|
};
|
|
38881
|
+
var alertIntractionUpsert = {
|
|
38882
|
+
UpsertAlertInterations: function UpsertAlertInterations(data) {
|
|
38883
|
+
var _data$presType, _data$alerts, _data$alerts2, _data$addForm, _data$addForm$reason, _data$addForm2, _data$addForm3, _data$addForm3$reason;
|
|
38884
|
+
|
|
38885
|
+
return [{
|
|
38886
|
+
db_name: dbName,
|
|
38887
|
+
entity: "PH_OrderLineAlertLogs",
|
|
38888
|
+
is_metadata: true,
|
|
38889
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
|
|
38890
|
+
doc: {
|
|
38891
|
+
id: 0,
|
|
38892
|
+
orgEntityType: data === null || data === void 0 ? void 0 : data.orgEntityType,
|
|
38893
|
+
org_Id: data === null || data === void 0 ? void 0 : data.orgId,
|
|
38894
|
+
patient_Id: data === null || data === void 0 ? void 0 : data.patientid,
|
|
38895
|
+
encountertype: data === null || data === void 0 ? void 0 : data.encountertype,
|
|
38896
|
+
encounter_Id: data === null || data === void 0 ? void 0 : data.encounterid,
|
|
38897
|
+
presType: data === null || data === void 0 ? void 0 : (_data$presType = data.presType) === null || _data$presType === void 0 ? void 0 : _data$presType.Value,
|
|
38898
|
+
rxId: "string",
|
|
38899
|
+
rxDate: data === null || data === void 0 ? void 0 : data.rxDate,
|
|
38900
|
+
interactionMessage: [{
|
|
38901
|
+
seqNo: 1,
|
|
38902
|
+
reactionCode: data === null || data === void 0 ? void 0 : (_data$alerts = data.alerts) === null || _data$alerts === void 0 ? void 0 : _data$alerts.map(function (val) {
|
|
38903
|
+
return val.RELATED_HIC_SEQN;
|
|
38904
|
+
}),
|
|
38905
|
+
alertMessage: data === null || data === void 0 ? void 0 : (_data$alerts2 = data.alerts) === null || _data$alerts2 === void 0 ? void 0 : _data$alerts2.map(function (val) {
|
|
38906
|
+
return val.Message;
|
|
38907
|
+
}),
|
|
38908
|
+
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,
|
|
38909
|
+
overrideNotes: data === null || data === void 0 ? void 0 : (_data$addForm2 = data.addForm) === null || _data$addForm2 === void 0 ? void 0 : _data$addForm2.Others,
|
|
38910
|
+
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
|
|
38911
|
+
}]
|
|
38912
|
+
}
|
|
38913
|
+
}];
|
|
38914
|
+
}
|
|
38915
|
+
};
|
|
38644
38916
|
|
|
38645
38917
|
var _extraReducers$5;
|
|
38646
38918
|
var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntractions", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
38647
38919
|
var payload,
|
|
38648
38920
|
_ref2,
|
|
38649
38921
|
rejectWithValue,
|
|
38922
|
+
alertList,
|
|
38650
38923
|
queriesjson,
|
|
38651
38924
|
res,
|
|
38925
|
+
alertInteratcion,
|
|
38652
38926
|
_args = arguments;
|
|
38653
38927
|
|
|
38654
38928
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -38658,10 +38932,8 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38658
38932
|
payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
38659
38933
|
_ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
|
|
38660
38934
|
_context.prev = 2;
|
|
38661
|
-
|
|
38662
|
-
|
|
38663
|
-
|
|
38664
|
-
queriesjson = alertInteractionsQuery.alertInteractions();
|
|
38935
|
+
alertList = payload.alertList;
|
|
38936
|
+
queriesjson = alertInteractionsQuery.alertInteractions(alertList);
|
|
38665
38937
|
_context.next = 7;
|
|
38666
38938
|
return fetchData$3({
|
|
38667
38939
|
body: JSON.stringify(queriesjson)
|
|
@@ -38669,28 +38941,82 @@ var ALERT_INTERACTIONS = createAsyncThunk("alertIntractionsSlice/alertIntraction
|
|
|
38669
38941
|
|
|
38670
38942
|
case 7:
|
|
38671
38943
|
res = _context.sent;
|
|
38944
|
+
alertInteratcion = res.result.find(function (val) {
|
|
38945
|
+
var keys = Object.keys(val);
|
|
38946
|
+
|
|
38947
|
+
if (keys.includes("Drug-AllergyIngredient-Interaction")) {
|
|
38948
|
+
return true;
|
|
38949
|
+
}
|
|
38950
|
+
|
|
38951
|
+
return false;
|
|
38952
|
+
});
|
|
38672
38953
|
return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
38673
|
-
data:
|
|
38954
|
+
data: alertInteratcion
|
|
38674
38955
|
}));
|
|
38675
38956
|
|
|
38676
|
-
case
|
|
38677
|
-
_context.prev =
|
|
38957
|
+
case 12:
|
|
38958
|
+
_context.prev = 12;
|
|
38678
38959
|
_context.t0 = _context["catch"](2);
|
|
38679
38960
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
38680
38961
|
message: _context.t0.message
|
|
38681
38962
|
})));
|
|
38682
38963
|
|
|
38683
|
-
case
|
|
38964
|
+
case 15:
|
|
38684
38965
|
case "end":
|
|
38685
38966
|
return _context.stop();
|
|
38686
38967
|
}
|
|
38687
38968
|
}
|
|
38688
|
-
}, _callee, null, [[2,
|
|
38969
|
+
}, _callee, null, [[2, 12]]);
|
|
38970
|
+
})));
|
|
38971
|
+
var ALERT_INTERACTIONS_UPERT = createAsyncThunk("alertIntractionsSlice/alertInteraction_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
38972
|
+
var payload,
|
|
38973
|
+
_ref4,
|
|
38974
|
+
rejectWithValue,
|
|
38975
|
+
list,
|
|
38976
|
+
queriesjson,
|
|
38977
|
+
res,
|
|
38978
|
+
_args2 = arguments;
|
|
38979
|
+
|
|
38980
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
38981
|
+
while (1) {
|
|
38982
|
+
switch (_context2.prev = _context2.next) {
|
|
38983
|
+
case 0:
|
|
38984
|
+
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
38985
|
+
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
38986
|
+
_context2.prev = 2;
|
|
38987
|
+
list = payload.list;
|
|
38988
|
+
queriesjson = alertIntractionUpsert.UpsertAlertInterations(list);
|
|
38989
|
+
_context2.next = 7;
|
|
38990
|
+
return fetchData$3({
|
|
38991
|
+
body: JSON.stringify(queriesjson)
|
|
38992
|
+
}, __uspsertUrl__);
|
|
38993
|
+
|
|
38994
|
+
case 7:
|
|
38995
|
+
res = _context2.sent;
|
|
38996
|
+
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
38997
|
+
data: res
|
|
38998
|
+
}));
|
|
38999
|
+
|
|
39000
|
+
case 11:
|
|
39001
|
+
_context2.prev = 11;
|
|
39002
|
+
_context2.t0 = _context2["catch"](2);
|
|
39003
|
+
debugger;
|
|
39004
|
+
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39005
|
+
message: _context2.t0.message
|
|
39006
|
+
})));
|
|
39007
|
+
|
|
39008
|
+
case 15:
|
|
39009
|
+
case "end":
|
|
39010
|
+
return _context2.stop();
|
|
39011
|
+
}
|
|
39012
|
+
}
|
|
39013
|
+
}, _callee2, null, [[2, 11]]);
|
|
38689
39014
|
})));
|
|
38690
39015
|
var alertIntractionsSlice = createSlice({
|
|
38691
39016
|
name: "alertIntractionsSlice",
|
|
38692
39017
|
initialState: {
|
|
38693
|
-
alert_interactions: _objectSpread2({}, defaultState.Info)
|
|
39018
|
+
alert_interactions: _objectSpread2({}, defaultState.Info),
|
|
39019
|
+
alertInteraction_upsert: _objectSpread2({}, defaultState.Info)
|
|
38694
39020
|
},
|
|
38695
39021
|
extraReducers: (_extraReducers$5 = {}, _defineProperty(_extraReducers$5, ALERT_INTERACTIONS.fulfilled, function (state, action) {
|
|
38696
39022
|
var _action$payload;
|
|
@@ -38702,10 +39028,21 @@ var alertIntractionsSlice = createSlice({
|
|
|
38702
39028
|
var _action$payload2;
|
|
38703
39029
|
|
|
38704
39030
|
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 : {};
|
|
39031
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.fulfilled, function (state, action) {
|
|
39032
|
+
var _action$payload3;
|
|
39033
|
+
|
|
39034
|
+
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 : {};
|
|
39035
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.pending, function (state, action) {
|
|
39036
|
+
state.alertInteraction_upsert.error = false, state.alertInteraction_upsert.loading = true;
|
|
39037
|
+
}), _defineProperty(_extraReducers$5, ALERT_INTERACTIONS_UPERT.rejected, function (state, action) {
|
|
39038
|
+
var _action$payload4;
|
|
39039
|
+
|
|
39040
|
+
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 : {};
|
|
38705
39041
|
}), _extraReducers$5)
|
|
38706
39042
|
});
|
|
38707
39043
|
var alertIntractionActions = {
|
|
38708
|
-
ALERT_INTERACTIONS: ALERT_INTERACTIONS
|
|
39044
|
+
ALERT_INTERACTIONS: ALERT_INTERACTIONS,
|
|
39045
|
+
ALERT_INTERACTIONS_UPERT: ALERT_INTERACTIONS_UPERT
|
|
38709
39046
|
};
|
|
38710
39047
|
var alertIntractionsSlice$1 = alertIntractionsSlice.reducer;
|
|
38711
39048
|
|