primarycare-binder 1.1.124 → 1.1.126
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 +488 -163
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8112,7 +8112,7 @@ var queries$b = {
|
|
|
8112
8112
|
},
|
|
8113
8113
|
getPatientByMRN: {
|
|
8114
8114
|
query: function query(id) {
|
|
8115
|
-
return "Patient.alias=='".concat(id, "' && Person.Id==Patient.personID LET name=(FOR nam IN Person.name LET period=(FOR per IN TO_ARRAY(DOCUMENT(nam).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(nam),{period:period},{use:document(TO_ARRAY(DOCUMENT(nam).use))},{suffix:document(TO_ARRAY(DOCUMENT(nam).suffix))},{prefix:document(TO_ARRAY(DOCUMENT(nam).prefix))})) LET telecom=(FOR tel IN Person.telecom LET period=(FOR per IN TO_ARRAY(DOCUMENT(tel).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(tel),{period:period})) LET photo=(FOR pht IN Person.photo RETURN DOCUMENT(pht))");
|
|
8115
|
+
return "Patient.alias=='".concat(id, "' && Person.Id==Patient.personID LET name=(FOR nam IN Person.name LET period=(FOR per IN TO_ARRAY(DOCUMENT(nam).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(nam),{period:period},{use:document(TO_ARRAY(DOCUMENT(nam).use))},{suffix:document(TO_ARRAY(DOCUMENT(nam).suffix))},{prefix:document(TO_ARRAY(DOCUMENT(nam).prefix))})) LET telecom=(FOR tel IN Person.telecom LET period=(FOR per IN TO_ARRAY(DOCUMENT(tel).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(tel),{period:period})) LET photo=(FOR pht IN TO_ARRAY(Person.photo) RETURN DOCUMENT(pht))");
|
|
8116
8116
|
},
|
|
8117
8117
|
returnFields: "MERGE(Person,{name:name,telecom:telecom,photo:photo,Patient:merge(Patient,{name:(for na in document(Patient.name) return merge(na,{use:document(na.use)},{prefix:document(na.prefix)},{suffix:document(na.suffix)}))},{photo:document(Patient.photo)})})"
|
|
8118
8118
|
},
|
|
@@ -8363,7 +8363,9 @@ var __ruleBuilderUrl__ = "".concat(process.env.REACT_APP_RULE_BUILDER_URL, "/mul
|
|
|
8363
8363
|
var __OrderlinewithQueue__ = "".concat(process.env.REACT_APP_NIFI_CLMM_API, "/api/v1/upsert/OrderlinewithQueue");
|
|
8364
8364
|
var __GetOrderStartDate__ = "".concat(process.env.REACT_APP_CLMM_NIFI_API, "/api/ScheduleGeneration/GetOrderStartDate"); // export const __GetOrderStartDate__ = `https://apiclmm.dev.ainqaplatform.in/api/ScheduleGeneration/GetOrderStartDate`;
|
|
8365
8365
|
|
|
8366
|
-
var __Soft_Delete__ = "".concat(process.env.REACT_APP_SOFT_DELETE, "/api/soft_delete");
|
|
8366
|
+
var __Soft_Delete__ = "".concat(process.env.REACT_APP_SOFT_DELETE, "/api/soft_delete");
|
|
8367
|
+
var __allergyInteraction__ = "".concat(process.env.REACT_APP_COMMON_NIFI_API, "/api/v1/clinicalscreening");
|
|
8368
|
+
var __drugDuplication__ = "".concat(process.env.REACT_APP_COMMON_NIFI_API, "/api/v1/drugDuplicationAlert"); // export const __ruleBuilderUrl__ = `http://164.52.210.54:9090/multi/rule-validate`;
|
|
8367
8369
|
|
|
8368
8370
|
var __seqNoGenerator__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/generate_sequence");
|
|
8369
8371
|
var __insertRCMurl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, "/api/v1/insertCAOrderInRCMPatTrx");
|
|
@@ -10679,7 +10681,7 @@ var PATIENT_DETAILS_READ = createAsyncThunk("patientReducer/readPatientDetails",
|
|
|
10679
10681
|
db_name: dbName,
|
|
10680
10682
|
entity: "Patient",
|
|
10681
10683
|
filter: "Patient._key=='".concat(key, "' && Patient.activestatus==true"),
|
|
10682
|
-
return_fields: "merge(Patient,{telecom:(for doc in ContactPointMaster filter doc._id in Patient.telecom return merge(doc,{system:(document(doc.system)),use:(document(doc.use)),valueprefix:(document(doc.valueprefix)),rank:(document(doc.rank))}))},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))},{gender:document(Patient.gender)},{address:(for doc in AddressMaster filter doc._id in Patient.address return merge(doc,{use:(document(doc.use)),city:(document(doc.city)),country:(document(doc.
|
|
10684
|
+
return_fields: "merge(Patient,{telecom:(for doc in ContactPointMaster filter doc._id in Patient.telecom return merge(doc,{system:(document(doc.system)),use:(document(doc.use)),valueprefix:(document(doc.valueprefix)),rank:(document(doc.rank))}))},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))},{gender:document(Patient.gender)},{address:(for doc in AddressMaster filter doc._id in Patient.address return merge(doc,{use:(document(doc.use)),city:(document(doc.city)),country:(document(doc.country)),district:(document(doc.district)), Type:(document(doc.Type)),postalCode:(document(doc.postalCode)),state:(document(doc.state))}))},{maritalstatus:document(Patient.maritalstatus)},{photo:document(Patient.photo)},{OrgID:document(Patient.OrgID)},{nationality:document(Patient.nationality)},{activereason:document(Patient.activereason)},{isdeceased:document(Patient.isdeceased)},{deceasedreason:document(Patient.deceasedreason)},{identifier:(for doc in IdentifierMaster filter doc._id in Patient.identifier return merge(doc,{user:(document(doc.user)), assigner:(document(doc.assigner)), period: (document(doc.period))}))},{communicationLanguage:document(Patient.communicationLanguage)},{birthGendercode:document(Patient.birthGendercode)},{citizenshipCode:document(Patient.citizenshipCode)},{disabilityCode:document(Patient.disabilityCode)},{genderIdentitycode:document(Patient.genderIdentitycode)},{religionCode:document(Patient.religionCode)},{raceCode:document(Patient.raceCode)},{ethinicityCode:document(Patient.ethinicityCode)},{patientTypecode:document(Patient.patientTypecode)},{bloodGroup:document(Patient.bloodGroup)},{attachment:document(Patient.attachment)},{age_type:document(Patient.age_type)},{primarycare_Prac:document(Patient.primarycare_Prac)},{specialArng_code:document(Patient.specialArng_code)},{specialCourtesy_code: document(Patient.specialCourtesy_code)})"
|
|
10683
10685
|
};
|
|
10684
10686
|
_context5.next = 7;
|
|
10685
10687
|
return fetchData$3({
|
|
@@ -18076,8 +18078,13 @@ var READ_PATIENT = createAsyncThunk("personApiSlice/deletePerson", /*#__PURE__*/
|
|
|
18076
18078
|
body = {
|
|
18077
18079
|
db_name: dbName,
|
|
18078
18080
|
entity: "Patient,Person",
|
|
18079
|
-
filter:
|
|
18080
|
-
|
|
18081
|
+
filter: {
|
|
18082
|
+
"Patient": "Patient.alias=='".concat(mrnnumber, "' && Patient.activestatus==true"),
|
|
18083
|
+
"Person": "Person.Id==Patient.personID && Person.activestatus==true LET name=(FOR nam IN Person.name LET period=(FOR per IN TO_ARRAY(DOCUMENT(nam).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(nam),{period:period},{use:document(TO_ARRAY(DOCUMENT(nam).use))},{suffix:document(TO_ARRAY(DOCUMENT(nam).suffix))},{prefix:document(TO_ARRAY(DOCUMENT(nam).prefix))})) LET telecom=(FOR tel IN to_Array(Person.telecom) LET period=(FOR per IN TO_ARRAY(DOCUMENT(tel).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(tel),{period:period})) LET photo=(FOR pht IN TO_ARRAY(Person.photo) RETURN DOCUMENT(pht))"
|
|
18084
|
+
},
|
|
18085
|
+
// queries["getPatientByMRN"].query(mrnnumber),
|
|
18086
|
+
return_fields: "MERGE(Person,{name:name,telecom:telecom,photo:photo,Patient:merge(Patient,{name:(for na in document(Patient.name) return merge(na,{use:document(na.use)},{prefix:document(na.prefix)},{suffix:document(na.suffix)}))},{photo:document(Patient.photo)})})" // queries["getPatientByMRN"].returnFields,
|
|
18087
|
+
|
|
18081
18088
|
};
|
|
18082
18089
|
_context9.next = 7;
|
|
18083
18090
|
return fetchData$3({
|
|
@@ -19862,13 +19869,14 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19862
19869
|
debugger;
|
|
19863
19870
|
body = {
|
|
19864
19871
|
db_name: dbName,
|
|
19865
|
-
entity: "Person",
|
|
19866
|
-
filter:
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
}),
|
|
19871
|
-
return_fields: queries
|
|
19872
|
+
entity: "Person,Patient",
|
|
19873
|
+
filter: {
|
|
19874
|
+
"Person": "(LIKE(DOCUMENT(Person.name)[0].text,'%".concat(firstName, "%',true) || LIKE(DOCUMENT(Person.name)[0].given,'%").concat(secondName, "%',true) || LIKE(DOCUMENT(Person.name)[0].family,'%").concat(thirdName, "%',true)) && Person.activestatus == true"),
|
|
19875
|
+
"Patient": "Patient.personID==Person.Id && Patient.activestatus==true"
|
|
19876
|
+
},
|
|
19877
|
+
return_fields: "{prefix: document(DOCUMENT(Person.name)[*].prefix),gender: Person.gender,birthDate: Person.birthDay,suffix: document(DOCUMENT(Person.name)[*].suffix), nameObj:(for HumanNameMaster in HumanNameMaster filter HumanNameMaster._id in Person.name && HumanNameMaster.activestatus==true return merge(HumanNameMaster,{prefix:document(HumanNameMaster.prefix)},{suffix:document(HumanNameMaster.suffix)},{period:document(HumanNameMaster.period)},{use:document(HumanNameMaster.use)}) ) , name: DOCUMENT(Person.name)[*].text, personId: Person.Id,patientDetail: (for pat in Patient FILTER pat.personID == Person.Id RETURN merge(pat,{name:(for nam in HumanNameMaster filter nam._id in pat.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{photo:document(pat.photo)})),telecom: Document(Person.telecom),photo:document(Person.photo)}" //filter: queries["codablemasterGetPatientname"].query({firstName,secondName,thirdName}),
|
|
19878
|
+
//return_fields: queries["codablemasterGetPatientname"].returnFields,
|
|
19879
|
+
|
|
19872
19880
|
};
|
|
19873
19881
|
_context20.next = 11;
|
|
19874
19882
|
return fetchData$3({
|
|
@@ -24140,7 +24148,7 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
|
|
|
24140
24148
|
debugger;
|
|
24141
24149
|
arr = [];
|
|
24142
24150
|
data.result.map(function (val) {
|
|
24143
|
-
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$
|
|
24151
|
+
var _val$Patient, _val$Patient$, _val$Patient$$communi, _val$_id, _val$_id$split, _val$practitioner_det, _val$practitioner_det2, _val$practitioner_det3, _val$Patient2, _val$Patient2$, _val$Patient2$$name, _val$Patient3, _val$Patient3$, _val$Patient4, _val$Patient4$, _val$Patient5, _val$Patient5$, _val$Patient6, _val$Patient6$, _val$Patient6$$gender, _val$Patient7, _val$Patient7$, _val$Patient$0$pident, _val$Patient8, _val$Patient8$, _val$Patient8$$pident, _val$Patient8$$pident2, _lang, _val$Patient9, _val$Patient9$, _val$Patient9$$person, _val$Patient9$$person2, _val$Patient9$$person3, _val$Patient9$$person4, _val$Patient10, _val$Patient10$, _val$Patient10$$photo, _val$Patient10$$photo2, _val$practitioner_det4, _val$practitioner_det5, _val$practitioner_det6;
|
|
24144
24152
|
|
|
24145
24153
|
var lang = val === null || val === void 0 ? void 0 : (_val$Patient = val.Patient) === null || _val$Patient === void 0 ? void 0 : (_val$Patient$ = _val$Patient[0]) === null || _val$Patient$ === void 0 ? void 0 : (_val$Patient$$communi = _val$Patient$.communicationLanguage) === null || _val$Patient$$communi === void 0 ? void 0 : _val$Patient$$communi.map(function (val) {
|
|
24146
24154
|
return val.display;
|
|
@@ -24151,7 +24159,8 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
|
|
|
24151
24159
|
id: "EN-" + (val === null || val === void 0 ? void 0 : (_val$_id = val._id) === null || _val$_id === void 0 ? void 0 : (_val$_id$split = _val$_id.split("/")) === null || _val$_id$split === void 0 ? void 0 : _val$_id$split[1]),
|
|
24152
24160
|
eId: val === null || val === void 0 ? void 0 : val._id,
|
|
24153
24161
|
type: val === null || val === void 0 ? void 0 : val.visit_type,
|
|
24154
|
-
speciality:
|
|
24162
|
+
// speciality: val.practitioner_details?.[0]?.speciality?.coding?.[0]?.display || "",
|
|
24163
|
+
speciality: ((_val$practitioner_det = val.practitioner_details) === null || _val$practitioner_det === void 0 ? void 0 : (_val$practitioner_det2 = _val$practitioner_det[0]) === null || _val$practitioner_det2 === void 0 ? void 0 : (_val$practitioner_det3 = _val$practitioner_det2.speciality) === null || _val$practitioner_det3 === void 0 ? void 0 : _val$practitioner_det3.display) || "",
|
|
24155
24164
|
createdAt: val.createddate,
|
|
24156
24165
|
// name: val?.Patient?.[0]?.name?.[0]?.text ?? "",
|
|
24157
24166
|
name: makeName$1(val === null || val === void 0 ? void 0 : (_val$Patient2 = val.Patient) === null || _val$Patient2 === void 0 ? void 0 : (_val$Patient2$ = _val$Patient2[0]) === null || _val$Patient2$ === void 0 ? void 0 : (_val$Patient2$$name = _val$Patient2$.name) === null || _val$Patient2$$name === void 0 ? void 0 : _val$Patient2$$name[0]),
|
|
@@ -24163,7 +24172,7 @@ var GET_ENCOUNTER = createAsyncThunk("chiefCompilenceMastersSlice/encounter", /*
|
|
|
24163
24172
|
pidentifier: (_val$Patient$0$pident = val === null || val === void 0 ? void 0 : (_val$Patient8 = val.Patient) === null || _val$Patient8 === void 0 ? void 0 : (_val$Patient8$ = _val$Patient8[0]) === null || _val$Patient8$ === void 0 ? void 0 : (_val$Patient8$$pident = _val$Patient8$.pidentifier) === null || _val$Patient8$$pident === void 0 ? void 0 : (_val$Patient8$$pident2 = _val$Patient8$$pident[0]) === null || _val$Patient8$$pident2 === void 0 ? void 0 : _val$Patient8$$pident2.value) !== null && _val$Patient$0$pident !== void 0 ? _val$Patient$0$pident : "",
|
|
24164
24173
|
lang: (_lang = lang) === null || _lang === void 0 ? void 0 : _lang.join(", "),
|
|
24165
24174
|
img: getImgUrl(val === null || val === void 0 ? void 0 : (_val$Patient9 = val.Patient) === null || _val$Patient9 === void 0 ? void 0 : (_val$Patient9$ = _val$Patient9[0]) === null || _val$Patient9$ === void 0 ? void 0 : (_val$Patient9$$person = _val$Patient9$.personInfo) === null || _val$Patient9$$person === void 0 ? void 0 : (_val$Patient9$$person2 = _val$Patient9$$person[0]) === null || _val$Patient9$$person2 === void 0 ? void 0 : (_val$Patient9$$person3 = _val$Patient9$$person2.photo) === null || _val$Patient9$$person3 === void 0 ? void 0 : (_val$Patient9$$person4 = _val$Patient9$$person3[0]) === null || _val$Patient9$$person4 === void 0 ? void 0 : _val$Patient9$$person4.fileid) || getImgUrl(val === null || val === void 0 ? void 0 : (_val$Patient10 = val.Patient) === null || _val$Patient10 === void 0 ? void 0 : (_val$Patient10$ = _val$Patient10[0]) === null || _val$Patient10$ === void 0 ? void 0 : (_val$Patient10$$photo = _val$Patient10$.photo) === null || _val$Patient10$$photo === void 0 ? void 0 : (_val$Patient10$$photo2 = _val$Patient10$$photo[0]) === null || _val$Patient10$$photo2 === void 0 ? void 0 : _val$Patient10$$photo2.fileid),
|
|
24166
|
-
facilityName: (_val$
|
|
24175
|
+
facilityName: (_val$practitioner_det4 = (_val$practitioner_det5 = val.practitioner_details) === null || _val$practitioner_det5 === void 0 ? void 0 : (_val$practitioner_det6 = _val$practitioner_det5[0]) === null || _val$practitioner_det6 === void 0 ? void 0 : _val$practitioner_det6.clinic) !== null && _val$practitioner_det4 !== void 0 ? _val$practitioner_det4 : ""
|
|
24167
24176
|
}));
|
|
24168
24177
|
});
|
|
24169
24178
|
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
@@ -25896,11 +25905,64 @@ var generateJSON$6 = function generateJSON(payload, orgId) {
|
|
|
25896
25905
|
"FreqDetls": []
|
|
25897
25906
|
}
|
|
25898
25907
|
})];
|
|
25908
|
+
}; //to generate Alert payload
|
|
25909
|
+
|
|
25910
|
+
var generateAlertPayload = function generateAlertPayload(data, roleid, practitionerid) {
|
|
25911
|
+
var _OverAllAlerts;
|
|
25912
|
+
|
|
25913
|
+
var AlertTypes = [];
|
|
25914
|
+
data.forEach(function (val) {
|
|
25915
|
+
AlertTypes = [].concat(_toConsumableArray(AlertTypes), _toConsumableArray(Object.keys(val)));
|
|
25916
|
+
});
|
|
25917
|
+
var OverAllAlerts = [];
|
|
25918
|
+
data.forEach(function (val, i) {
|
|
25919
|
+
OverAllAlerts = [].concat(_toConsumableArray(OverAllAlerts), _toConsumableArray(val[AlertTypes[i]]));
|
|
25920
|
+
});
|
|
25921
|
+
return (_OverAllAlerts = OverAllAlerts) === null || _OverAllAlerts === void 0 ? void 0 : _OverAllAlerts.map(function (val, i) {
|
|
25922
|
+
var _val$orderLineId, _ref, _val$Message, _ref2, _val$IAMTEXTN, _val$overridedetails, _val$overridedetails$, _val$overridedetails2;
|
|
25923
|
+
|
|
25924
|
+
var filter = {};
|
|
25925
|
+
|
|
25926
|
+
if (val._key) {
|
|
25927
|
+
filter = {
|
|
25928
|
+
filter: {
|
|
25929
|
+
_key: val === null || val === void 0 ? void 0 : val._key
|
|
25930
|
+
}
|
|
25931
|
+
};
|
|
25932
|
+
}
|
|
25933
|
+
|
|
25934
|
+
return _objectSpread2(_objectSpread2({
|
|
25935
|
+
db_name: dbName,
|
|
25936
|
+
entity: "PH_OrderLineAlertLogs",
|
|
25937
|
+
is_metadata: true,
|
|
25938
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
25939
|
+
}, filter), {}, {
|
|
25940
|
+
doc: {
|
|
25941
|
+
orderlineid: (_val$orderLineId = val === null || val === void 0 ? void 0 : val.orderLineId) !== null && _val$orderLineId !== void 0 ? _val$orderLineId : "",
|
|
25942
|
+
seqno: i,
|
|
25943
|
+
reactiontypecode: val === null || val === void 0 ? void 0 : val.alertType,
|
|
25944
|
+
alerttitle: (_ref = (_val$Message = val === null || val === void 0 ? void 0 : val.Message) !== null && _val$Message !== void 0 ? _val$Message : val === null || val === void 0 ? void 0 : val.alerttitle) !== null && _ref !== void 0 ? _ref : "",
|
|
25945
|
+
alertmessage: (_ref2 = (_val$IAMTEXTN = val === null || val === void 0 ? void 0 : val.IAMTEXTN) !== null && _val$IAMTEXTN !== void 0 ? _val$IAMTEXTN : val === null || val === void 0 ? void 0 : val.alertmessage) !== null && _ref2 !== void 0 ? _ref2 : "",
|
|
25946
|
+
overridedetails: (val === null || val === void 0 ? void 0 : (_val$overridedetails = val.overridedetails) === null || _val$overridedetails === void 0 ? void 0 : _val$overridedetails.length) > 0 ? [_objectSpread2(_objectSpread2({}, (_val$overridedetails$ = (_val$overridedetails2 = val.overridedetails) === null || _val$overridedetails2 === void 0 ? void 0 : _val$overridedetails2[0]) !== null && _val$overridedetails$ !== void 0 ? _val$overridedetails$ : {}), {}, {
|
|
25947
|
+
// overridereasoncode: "",
|
|
25948
|
+
// overridenotes: "",
|
|
25949
|
+
overridebyid: practitionerid !== null && practitionerid !== void 0 ? practitionerid : "",
|
|
25950
|
+
overrideroleid: roleid !== null && roleid !== void 0 ? roleid : ""
|
|
25951
|
+
})] : []
|
|
25952
|
+
}
|
|
25953
|
+
});
|
|
25954
|
+
});
|
|
25899
25955
|
};
|
|
25900
25956
|
var generate_NIFI_JSON = function generate_NIFI_JSON(payload) {
|
|
25901
|
-
var _payload$ORGID, _payload$patientid2, _payload$encountertyp2, _payload$encounterid2, _payload$prescription3, _payload$Prescription2, _payload$name$drugTyp2, _payload$name4, _payload$presNature$v2, _payload$presNature2, _payload$presMode$val2, _payload$presMode2, _payload$priority$val2, _payload$priority2, _payload$status2, _payload$statusreason2, _payload$intent2, _payload$orderPrivile2, _payload$privilegeAle2, _payload$workFlowStat2, _payload$name$value2, _payload$name5, _payload$formCode2, _payload$DefaultRoute3, _payload$DefaultRoute4, _payload$dosageTypeIn2, _payload$unitValue$va2, _payload$unitValue2, _payload$drug_categor3, _payload$drug_categor4, _payload$dispensing_p3, _payload$dispensing_p4, _payload$IVDosageDura3, _payload$IVDosageDura4, _payload$unitsTypes$v2, _payload$unitsTypes2, _payload$ivInfusionRa3, _payload$ivInfusionRa4, _payload$doseOption$v2, _payload$doseOption2, _payload$name$nameLab2, _payload$name6, _payload$orderStartDa, _payload$orderEndDate, _payload$indication$v2, _payload$indication2, _payload$patientInstr4, _payload$patientInstr5, _payload$patientInstr6, _payload$notes2, _payload$parentPresId2, _payload$presGroupRef2, _payload$noofRefillsA2, _payload$initialDispe2, _payload$refillDispen2, _payload$maxRefillDis2, _payload$pendingRefil2, _payload$prescription4, _payload$substitution3, _payload$substitution4, _payload$substituteRe2, _payload$broughtFromH2, _payload$IVIngredient2, _payload$statusperiod2, _payload$unitsTypes$F, _payload$unitsTypes3;
|
|
25957
|
+
var _payload$alertData, _payload$ORGID, _payload$patientid2, _payload$encountertyp2, _payload$encounterid2, _payload$prescription3, _payload$Prescription2, _payload$name$drugTyp2, _payload$name4, _payload$presNature$v2, _payload$presNature2, _payload$presMode$val2, _payload$presMode2, _payload$priority$val2, _payload$priority2, _payload$status2, _payload$statusreason2, _payload$intent2, _payload$orderPrivile2, _payload$privilegeAle2, _payload$workFlowStat2, _payload$name$value2, _payload$name5, _payload$formCode2, _payload$DefaultRoute3, _payload$DefaultRoute4, _payload$dosageTypeIn2, _payload$unitValue$va2, _payload$unitValue2, _payload$drug_categor3, _payload$drug_categor4, _payload$dispensing_p3, _payload$dispensing_p4, _payload$IVDosageDura3, _payload$IVDosageDura4, _payload$unitsTypes$v2, _payload$unitsTypes2, _payload$ivInfusionRa3, _payload$ivInfusionRa4, _payload$doseOption$v2, _payload$doseOption2, _payload$name$nameLab2, _payload$name6, _payload$orderStartDa, _payload$orderEndDate, _payload$indication$v2, _payload$indication2, _payload$patientInstr4, _payload$patientInstr5, _payload$patientInstr6, _payload$notes2, _payload$parentPresId2, _payload$presGroupRef2, _payload$noofRefillsA2, _payload$initialDispe2, _payload$refillDispen2, _payload$maxRefillDis2, _payload$pendingRefil2, _payload$prescription4, _payload$substitution3, _payload$substitution4, _payload$substituteRe2, _payload$broughtFromH2, _payload$IVIngredient2, _payload$statusperiod2, _payload$unitsTypes$F, _payload$unitsTypes3;
|
|
25902
25958
|
|
|
25903
25959
|
debugger;
|
|
25960
|
+
var getAlertPayload = [];
|
|
25961
|
+
|
|
25962
|
+
if ((payload === null || payload === void 0 ? void 0 : (_payload$alertData = payload.alertData) === null || _payload$alertData === void 0 ? void 0 : _payload$alertData.length) > 0) {
|
|
25963
|
+
getAlertPayload = generateAlertPayload(payload === null || payload === void 0 ? void 0 : payload.alertData, payload === null || payload === void 0 ? void 0 : payload.roleid, payload === null || payload === void 0 ? void 0 : payload.practitionerid);
|
|
25964
|
+
}
|
|
25965
|
+
|
|
25904
25966
|
return [{
|
|
25905
25967
|
"db_name": dbName,
|
|
25906
25968
|
"entity": "PH_OrderLine",
|
|
@@ -26031,7 +26093,7 @@ var generate_NIFI_JSON = function generate_NIFI_JSON(payload) {
|
|
|
26031
26093
|
"FreqDetls": (_payload$unitsTypes$F = payload === null || payload === void 0 ? void 0 : (_payload$unitsTypes3 = payload.unitsTypes) === null || _payload$unitsTypes3 === void 0 ? void 0 : _payload$unitsTypes3.FreqDetls) !== null && _payload$unitsTypes$F !== void 0 ? _payload$unitsTypes$F : [],
|
|
26032
26094
|
"nextrefilldate": 0
|
|
26033
26095
|
}
|
|
26034
|
-
}];
|
|
26096
|
+
}].concat(_toConsumableArray(getAlertPayload));
|
|
26035
26097
|
};
|
|
26036
26098
|
|
|
26037
26099
|
var getuseAsSlidingScaleDose$1 = function getuseAsSlidingScaleDose(list) {
|
|
@@ -32424,6 +32486,23 @@ var LabOrderActions = {
|
|
|
32424
32486
|
var LabOrderApiSlice$1 = LabOrderApiSlice.reducer;
|
|
32425
32487
|
|
|
32426
32488
|
var queries$5 = {
|
|
32489
|
+
get_ordered_status: function get_ordered_status() {
|
|
32490
|
+
return {
|
|
32491
|
+
db_name: dbName,
|
|
32492
|
+
entity: "CodingMaster",
|
|
32493
|
+
filter: "CodingMaster.Type=='MEDRECORDSTATUS' && CodingMaster.display == 'ordered' && CodingMaster.activestatus==true && CodingMaster.status==true",
|
|
32494
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type')"
|
|
32495
|
+
};
|
|
32496
|
+
},
|
|
32497
|
+
getAlertCode: function getAlertCode(patientId) {
|
|
32498
|
+
return {
|
|
32499
|
+
db_name: dbName,
|
|
32500
|
+
queryid: "6385b198-8765-49b3-a5f4-0faac3e30fdd",
|
|
32501
|
+
filter: {
|
|
32502
|
+
patientID: patientId
|
|
32503
|
+
}
|
|
32504
|
+
};
|
|
32505
|
+
},
|
|
32427
32506
|
drugType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugType\",\n \"return_fields\": \"DrugType\"\n }"),
|
|
32428
32507
|
// drugMaster: `{
|
|
32429
32508
|
// "db_name": "${dbName}",
|
|
@@ -32435,11 +32514,11 @@ var queries$5 = {
|
|
|
32435
32514
|
// "return_fields": "MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})"
|
|
32436
32515
|
// }`,
|
|
32437
32516
|
drugMaster: function drugMaster(input_text) {
|
|
32438
|
-
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"filter\":\"(like(DrugMaster.ShortDesc,'%").concat(input_text, "%',true) || like(DrugMaster.LongDesc,'%").concat(input_text, "%',true) || like(DrugMaster.DrugCode,'%").concat(input_text, "%',true)) && DrugMaster.activestatus==true\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode),FrequencyRules:(for freq in TO_ARRAY(DrugMaster.FrequencyRules) return merge(document(freq),{freqcode:merge(document(document(freq).freqcode),{scheduleline:document(document(document(freq).freqcode).scheduleline)}),doseUOM:document(document(freq).doseUOM),durnUOM:document(document(freq).durnUOM),InfuseRateUom:document(document(freq).InfuseRateUom),InfuseOverDurType:document(document(freq).InfuseOverDurType)}))})\"\n }");
|
|
32517
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugMaster\",\n \"filter\":\"(like(DrugMaster.ShortDesc,'%").concat(input_text, "%',true) || like(DrugMaster.LongDesc,'%").concat(input_text, "%',true) || like(DrugMaster.DrugCode,'%").concat(input_text, "%',true)) && DrugMaster.activestatus==true && DrugMaster.status==true\",\n \"limit\":{\n \"count\":100,\n \"offset\":0\n },\n \"return_fields\": \"MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode),FrequencyRules:(for freq in TO_ARRAY(DrugMaster.FrequencyRules) return merge(document(freq),{freqcode:merge(document(document(freq).freqcode),{scheduleline:document(document(document(freq).freqcode).scheduleline)}),doseUOM:document(document(freq).doseUOM),durnUOM:document(document(freq).durnUOM),InfuseRateUom:document(document(freq).InfuseRateUom),InfuseOverDurType:document(document(freq).InfuseOverDurType)})),aliasDtls:(for ald in DrugMaster.aliasDtls return merge(ald,{aliasType:document(ald.aliasType)}))})\"\n }");
|
|
32439
32518
|
},
|
|
32440
32519
|
// "return_fields": "MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})"
|
|
32441
32520
|
getMedications: function getMedications(id) {
|
|
32442
|
-
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 }");
|
|
32521
|
+
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"filter\": \"PH_OrderLine.patient_Id=='").concat(id, "' && PH_OrderLine.activestatus == true\",\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 }");
|
|
32443
32522
|
},
|
|
32444
32523
|
// "return_fields": "MERGE(PH_OrderLine, { patient_Id:(FOR pname IN DOCUMENT(PH_OrderLine.patient_Id).name RETURN MERGE(DOCUMENT(PH_OrderLine.patient_Id), { name:DOCUMENT(pname), telecom:(FOR ptel IN DOCUMENT(PH_OrderLine.patient_Id).telecom RETURN DOCUMENT(ptel)), martialStatus:(FOR mstatus IN DOCUMENT(PH_OrderLine.patient_Id).martialStatus RETURN DOCUMENT(mstatus)) } ) ) ,org_Id:MERGE(DOCUMENT(PH_OrderLine.org_Id), { telecom:(FOR otel IN DOCUMENT(PH_OrderLine.org_Id).telecom RETURN DOCUMENT(otel) ), address:(FOR oadd IN 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)}))})) } ) "
|
|
32445
32524
|
getOrganizationId: function getOrganizationId(id) {
|
|
@@ -32633,6 +32712,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
32633
32712
|
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid, _val$LongDesc, _val$DrugCategory, _val$DefaultRouteCode, _val$FrequencyRules$, _val$FrequencyRules, _val$FrequencyRules$2, _val$FrequencyRules$3, _val$FrequencyRules2, _val$FrequencyRules2$, _val$FrequencyRules3, _val$FrequencyRules3$, _val$FrequencyRules3$2, _val$FrequencyRules4, _val$FrequencyRules4$, _val$FrequencyRules4$2, _val$FrequencyRules5, _val$FrequencyRules5$, _val$FrequencyRules5$2, _val$FrequencyRules6, _val$FrequencyRules6$, _val$FrequencyRules6$2, _val$FrequencyRules7, _val$FrequencyRules7$, _val$FrequencyRules7$2, _val$FrequencyRules8, _val$FrequencyRules8$, _val$FrequencyRules8$2, _val$FrequencyRules9, _val$FrequencyRules9$, _val$FrequencyRules9$2, _val$FrequencyRules10, _val$FrequencyRules11, _val$FrequencyRules12, _val$FrequencyRules13, _val$FrequencyRules14, _val$FrequencyRules15, _val$FrequencyRules16, _val$FrequencyRules17, _val$FrequencyRules18, _val$FrequencyRules19, _val$FrequencyRules20, _val$FrequencyRules21, _val$FrequencyRules22, _val$FrequencyRules23, _val$FrequencyRules24, _val$FrequencyRules25, _val$FrequencyRules26, _val$FrequencyRules27, _val$FrequencyRules28, _val$FrequencyRules29, _val$FrequencyRules30, _val$FrequencyRules31, _val$FrequencyRules32, _val$FrequencyRules33, _val$FrequencyRules$4, _val$FrequencyRules34, _val$FrequencyRules35, _val$FrequencyRules36, _val$FrequencyRules37, _val$FrequencyRules38, _val$FrequencyRules39, _val$FrequencyRules$5, _val$FrequencyRules40, _val$FrequencyRules41, _val$FrequencyRules42, _val$FrequencyRules43, _val$FrequencyRules44, _val$FrequencyRules45;
|
|
32634
32713
|
|
|
32635
32714
|
var json = {
|
|
32715
|
+
result: val,
|
|
32636
32716
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
32637
32717
|
id: val === null || val === void 0 ? void 0 : val.id,
|
|
32638
32718
|
FormCode: val === null || val === void 0 ? void 0 : (_val$FormCode = val.FormCode) === null || _val$FormCode === void 0 ? void 0 : _val$FormCode._id,
|
|
@@ -34108,7 +34188,7 @@ var DELETEMEDICATION_MASTER = createAsyncThunk("MedicationMastersSlice/DeleteMed
|
|
|
34108
34188
|
_context30.next = 5;
|
|
34109
34189
|
return fetchData$3({
|
|
34110
34190
|
body: queries$5.DeleteMedication(payload.id)
|
|
34111
|
-
},
|
|
34191
|
+
}, __Soft_Delete__);
|
|
34112
34192
|
|
|
34113
34193
|
case 5:
|
|
34114
34194
|
data = _context30.sent;
|
|
@@ -34771,9 +34851,205 @@ var SAVE_NIFI_MEDICATIONS = createAsyncThunk("medicationsSlice/save_nifi_medicat
|
|
|
34771
34851
|
}
|
|
34772
34852
|
}, _callee4, null, [[2, 13]]);
|
|
34773
34853
|
})));
|
|
34774
|
-
var
|
|
34854
|
+
var GET_ALERT_CODES = createAsyncThunk("medicationsSlice/get_alert_codes", /*#__PURE__*/function () {
|
|
34855
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref9, _ref10) {
|
|
34856
|
+
var patientId, rejectWithValue, _data$, _data$$SavedDrugCodes, _data$$SavedDrugCodes2, _data$2, _data$2$SavedAllergyC, _data$2$SavedAllergyC2, _data$3, data, profileDrugCode, allergyCode, object;
|
|
34857
|
+
|
|
34858
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
34859
|
+
while (1) {
|
|
34860
|
+
switch (_context5.prev = _context5.next) {
|
|
34861
|
+
case 0:
|
|
34862
|
+
patientId = _ref9.patientId;
|
|
34863
|
+
rejectWithValue = _ref10.rejectWithValue;
|
|
34864
|
+
_context5.prev = 2;
|
|
34865
|
+
_context5.next = 5;
|
|
34866
|
+
return fetchData$3({
|
|
34867
|
+
body: JSON.stringify(queries$5.getAlertCode(patientId))
|
|
34868
|
+
}, __baseUrl__);
|
|
34869
|
+
|
|
34870
|
+
case 5:
|
|
34871
|
+
data = _context5.sent;
|
|
34872
|
+
//converting profile code to number then removing the NaN
|
|
34873
|
+
profileDrugCode = data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$SavedDrugCodes = _data$.SavedDrugCodes) === null || _data$$SavedDrugCodes === void 0 ? void 0 : (_data$$SavedDrugCodes2 = _data$$SavedDrugCodes.map(function (val) {
|
|
34874
|
+
return parseInt(val);
|
|
34875
|
+
})) === null || _data$$SavedDrugCodes2 === void 0 ? void 0 : _data$$SavedDrugCodes2.filter(function (val) {
|
|
34876
|
+
return !Number.isNaN(val);
|
|
34877
|
+
}); //converting allergy code to number then removing the NaN
|
|
34878
|
+
|
|
34879
|
+
allergyCode = data === null || data === void 0 ? void 0 : (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$SavedAllergyC = _data$2.SavedAllergyCodes) === null || _data$2$SavedAllergyC === void 0 ? void 0 : (_data$2$SavedAllergyC2 = _data$2$SavedAllergyC.map(function (val) {
|
|
34880
|
+
return parseInt(val);
|
|
34881
|
+
})) === null || _data$2$SavedAllergyC2 === void 0 ? void 0 : _data$2$SavedAllergyC2.filter(function (val) {
|
|
34882
|
+
return !Number.isNaN(val);
|
|
34883
|
+
});
|
|
34884
|
+
object = {
|
|
34885
|
+
ProfileDrugCodes: _toConsumableArray(new Set(profileDrugCode)),
|
|
34886
|
+
//removing duplicate values
|
|
34887
|
+
DiseaseCodes: _toConsumableArray(data === null || data === void 0 ? void 0 : (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : _data$3.SavedDiseaseCodes),
|
|
34888
|
+
AllergyCodes: _toConsumableArray(new Set(allergyCode)) //removing duplicate values
|
|
34889
|
+
|
|
34890
|
+
};
|
|
34891
|
+
return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
34892
|
+
data: object
|
|
34893
|
+
}));
|
|
34894
|
+
|
|
34895
|
+
case 12:
|
|
34896
|
+
_context5.prev = 12;
|
|
34897
|
+
_context5.t0 = _context5["catch"](2);
|
|
34898
|
+
return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34899
|
+
message: _context5.t0.message
|
|
34900
|
+
})));
|
|
34901
|
+
|
|
34902
|
+
case 15:
|
|
34903
|
+
case "end":
|
|
34904
|
+
return _context5.stop();
|
|
34905
|
+
}
|
|
34906
|
+
}
|
|
34907
|
+
}, _callee5, null, [[2, 12]]);
|
|
34908
|
+
}));
|
|
34909
|
+
|
|
34910
|
+
return function (_x, _x2) {
|
|
34911
|
+
return _ref11.apply(this, arguments);
|
|
34912
|
+
};
|
|
34913
|
+
}());
|
|
34914
|
+
var GET_DRUG_DUPLICATION = createAsyncThunk("medicationsSlice/get_drug_duplication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
34775
34915
|
var payload,
|
|
34776
|
-
|
|
34916
|
+
_ref13,
|
|
34917
|
+
rejectWithValue,
|
|
34918
|
+
_list4,
|
|
34919
|
+
data,
|
|
34920
|
+
_args6 = arguments;
|
|
34921
|
+
|
|
34922
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
34923
|
+
while (1) {
|
|
34924
|
+
switch (_context6.prev = _context6.next) {
|
|
34925
|
+
case 0:
|
|
34926
|
+
payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
|
34927
|
+
_ref13 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
|
|
34928
|
+
_context6.prev = 2;
|
|
34929
|
+
_list4 = payload.list;
|
|
34930
|
+
_context6.next = 6;
|
|
34931
|
+
return fetchData$3({
|
|
34932
|
+
body: JSON.stringify(_list4)
|
|
34933
|
+
}, __drugDuplication__);
|
|
34934
|
+
|
|
34935
|
+
case 6:
|
|
34936
|
+
data = _context6.sent;
|
|
34937
|
+
return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34938
|
+
data: data === null || data === void 0 ? void 0 : data.result
|
|
34939
|
+
}));
|
|
34940
|
+
|
|
34941
|
+
case 10:
|
|
34942
|
+
_context6.prev = 10;
|
|
34943
|
+
_context6.t0 = _context6["catch"](2);
|
|
34944
|
+
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34945
|
+
message: _context6.t0.message
|
|
34946
|
+
})));
|
|
34947
|
+
|
|
34948
|
+
case 13:
|
|
34949
|
+
case "end":
|
|
34950
|
+
return _context6.stop();
|
|
34951
|
+
}
|
|
34952
|
+
}
|
|
34953
|
+
}, _callee6, null, [[2, 10]]);
|
|
34954
|
+
})));
|
|
34955
|
+
var GET_ALLERGY_INTERACTION = createAsyncThunk("medicationsSlice/get_allergy_interaction", /*#__PURE__*/function () {
|
|
34956
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref14, _ref15) {
|
|
34957
|
+
var payload, rejectWithValue, getState, _state$medicationsSli, _state$medicationsSli2, _state$medicationsSli3, state, data, arr, _state$medicationsSli4, _state$medicationsSli5;
|
|
34958
|
+
|
|
34959
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
34960
|
+
while (1) {
|
|
34961
|
+
switch (_context7.prev = _context7.next) {
|
|
34962
|
+
case 0:
|
|
34963
|
+
payload = _ref14.payload;
|
|
34964
|
+
rejectWithValue = _ref15.rejectWithValue, getState = _ref15.getState;
|
|
34965
|
+
_context7.prev = 2;
|
|
34966
|
+
debugger;
|
|
34967
|
+
state = getState();
|
|
34968
|
+
_context7.next = 7;
|
|
34969
|
+
return fetchData$3({
|
|
34970
|
+
body: JSON.stringify(payload)
|
|
34971
|
+
}, __allergyInteraction__);
|
|
34972
|
+
|
|
34973
|
+
case 7:
|
|
34974
|
+
data = _context7.sent;
|
|
34975
|
+
arr = [];
|
|
34976
|
+
arr = data === null || data === void 0 ? void 0 : data.result;
|
|
34977
|
+
|
|
34978
|
+
if ((state === null || state === void 0 ? void 0 : (_state$medicationsSli = state.medicationsSlice) === null || _state$medicationsSli === void 0 ? void 0 : (_state$medicationsSli2 = _state$medicationsSli.get_drug_duplication) === null || _state$medicationsSli2 === void 0 ? void 0 : (_state$medicationsSli3 = _state$medicationsSli2.data) === null || _state$medicationsSli3 === void 0 ? void 0 : _state$medicationsSli3.length) > 0) {
|
|
34979
|
+
arr.push({
|
|
34980
|
+
"Drug-Duplication-Alert": state === null || state === void 0 ? void 0 : (_state$medicationsSli4 = state.medicationsSlice) === null || _state$medicationsSli4 === void 0 ? void 0 : (_state$medicationsSli5 = _state$medicationsSli4.get_drug_duplication) === null || _state$medicationsSli5 === void 0 ? void 0 : _state$medicationsSli5.data
|
|
34981
|
+
});
|
|
34982
|
+
}
|
|
34983
|
+
|
|
34984
|
+
debugger;
|
|
34985
|
+
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34986
|
+
data: arr
|
|
34987
|
+
}));
|
|
34988
|
+
|
|
34989
|
+
case 15:
|
|
34990
|
+
_context7.prev = 15;
|
|
34991
|
+
_context7.t0 = _context7["catch"](2);
|
|
34992
|
+
return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
34993
|
+
message: _context7.t0.message
|
|
34994
|
+
})));
|
|
34995
|
+
|
|
34996
|
+
case 18:
|
|
34997
|
+
case "end":
|
|
34998
|
+
return _context7.stop();
|
|
34999
|
+
}
|
|
35000
|
+
}
|
|
35001
|
+
}, _callee7, null, [[2, 15]]);
|
|
35002
|
+
}));
|
|
35003
|
+
|
|
35004
|
+
return function (_x3, _x4) {
|
|
35005
|
+
return _ref16.apply(this, arguments);
|
|
35006
|
+
};
|
|
35007
|
+
}());
|
|
35008
|
+
var GET_ORDERED_STATUS_ID = createAsyncThunk("medicationsSlice/get_ordered_status_id", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
35009
|
+
var payload,
|
|
35010
|
+
_ref18,
|
|
35011
|
+
rejectWithValue,
|
|
35012
|
+
data,
|
|
35013
|
+
_args8 = arguments;
|
|
35014
|
+
|
|
35015
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
35016
|
+
while (1) {
|
|
35017
|
+
switch (_context8.prev = _context8.next) {
|
|
35018
|
+
case 0:
|
|
35019
|
+
payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
|
|
35020
|
+
_ref18 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
|
|
35021
|
+
_context8.prev = 2;
|
|
35022
|
+
debugger;
|
|
35023
|
+
_context8.next = 6;
|
|
35024
|
+
return fetchData$3({
|
|
35025
|
+
body: JSON.stringify(queries$5.get_ordered_status())
|
|
35026
|
+
}, __readDocumentUrl__);
|
|
35027
|
+
|
|
35028
|
+
case 6:
|
|
35029
|
+
data = _context8.sent;
|
|
35030
|
+
debugger;
|
|
35031
|
+
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35032
|
+
data: data
|
|
35033
|
+
}));
|
|
35034
|
+
|
|
35035
|
+
case 11:
|
|
35036
|
+
_context8.prev = 11;
|
|
35037
|
+
_context8.t0 = _context8["catch"](2);
|
|
35038
|
+
console.log(_context8.t0);
|
|
35039
|
+
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35040
|
+
message: _context8.t0.message
|
|
35041
|
+
})));
|
|
35042
|
+
|
|
35043
|
+
case 15:
|
|
35044
|
+
case "end":
|
|
35045
|
+
return _context8.stop();
|
|
35046
|
+
}
|
|
35047
|
+
}
|
|
35048
|
+
}, _callee8, null, [[2, 11]]);
|
|
35049
|
+
})));
|
|
35050
|
+
var BULK_SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/bulk_save_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
35051
|
+
var payload,
|
|
35052
|
+
_ref20,
|
|
34777
35053
|
rejectWithValue,
|
|
34778
35054
|
getState,
|
|
34779
35055
|
_data$Result4,
|
|
@@ -34784,15 +35060,15 @@ var BULK_SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/bulk_save_medicat
|
|
|
34784
35060
|
drugCode,
|
|
34785
35061
|
dataJson,
|
|
34786
35062
|
data,
|
|
34787
|
-
|
|
35063
|
+
_args9 = arguments;
|
|
34788
35064
|
|
|
34789
|
-
return regeneratorRuntime.wrap(function
|
|
35065
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
34790
35066
|
while (1) {
|
|
34791
|
-
switch (
|
|
35067
|
+
switch (_context9.prev = _context9.next) {
|
|
34792
35068
|
case 0:
|
|
34793
|
-
payload =
|
|
34794
|
-
|
|
34795
|
-
|
|
35069
|
+
payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
35070
|
+
_ref20 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref20.rejectWithValue, getState = _ref20.getState;
|
|
35071
|
+
_context9.prev = 2;
|
|
34796
35072
|
_key = payload._key, drugCode = payload.drugCode;
|
|
34797
35073
|
dataJson = [{
|
|
34798
35074
|
"db_name": dbName,
|
|
@@ -34807,64 +35083,64 @@ var BULK_SAVE_MEDICATIONS = createAsyncThunk("medicationsSlice/bulk_save_medicat
|
|
|
34807
35083
|
"drugCode": drugCode !== null && drugCode !== void 0 ? drugCode : ''
|
|
34808
35084
|
}
|
|
34809
35085
|
}];
|
|
34810
|
-
|
|
35086
|
+
_context9.next = 7;
|
|
34811
35087
|
return fetchData$3({
|
|
34812
35088
|
body: JSON.stringify(dataJson)
|
|
34813
35089
|
}, __OrderlinewithQueue__);
|
|
34814
35090
|
|
|
34815
35091
|
case 7:
|
|
34816
|
-
data =
|
|
34817
|
-
return
|
|
35092
|
+
data = _context9.sent;
|
|
35093
|
+
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34818
35094
|
data: list.isAdd ? !(data === null || data === void 0 ? void 0 : data.error) : data === null || data === void 0 ? void 0 : (_data$Result4 = data.Result) === null || _data$Result4 === void 0 ? void 0 : (_data$Result4$ = _data$Result4[0]) === null || _data$Result4$ === void 0 ? void 0 : (_data$Result4$$proper = _data$Result4$.properties) === null || _data$Result4$$proper === void 0 ? void 0 : (_data$Result4$$proper2 = _data$Result4$$proper.doc) === null || _data$Result4$$proper2 === void 0 ? void 0 : _data$Result4$$proper2._id
|
|
34819
35095
|
}));
|
|
34820
35096
|
|
|
34821
35097
|
case 11:
|
|
34822
|
-
|
|
34823
|
-
|
|
34824
|
-
console.log(
|
|
34825
|
-
return
|
|
34826
|
-
message:
|
|
35098
|
+
_context9.prev = 11;
|
|
35099
|
+
_context9.t0 = _context9["catch"](2);
|
|
35100
|
+
console.log(_context9.t0);
|
|
35101
|
+
return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35102
|
+
message: _context9.t0.message
|
|
34827
35103
|
})));
|
|
34828
35104
|
|
|
34829
35105
|
case 15:
|
|
34830
35106
|
case "end":
|
|
34831
|
-
return
|
|
35107
|
+
return _context9.stop();
|
|
34832
35108
|
}
|
|
34833
35109
|
}
|
|
34834
|
-
},
|
|
35110
|
+
}, _callee9, null, [[2, 11]]);
|
|
34835
35111
|
})));
|
|
34836
|
-
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35112
|
+
var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
34837
35113
|
var payload,
|
|
34838
|
-
|
|
35114
|
+
_ref22,
|
|
34839
35115
|
rejectWithValue,
|
|
34840
|
-
|
|
35116
|
+
_list5$status,
|
|
34841
35117
|
_data$Result5,
|
|
34842
35118
|
_data$Result5$,
|
|
34843
35119
|
_data$Result5$$proper,
|
|
34844
35120
|
_data$Result5$$proper2,
|
|
34845
|
-
|
|
35121
|
+
_list5,
|
|
34846
35122
|
body,
|
|
34847
35123
|
data,
|
|
34848
|
-
|
|
35124
|
+
_args10 = arguments;
|
|
34849
35125
|
|
|
34850
|
-
return regeneratorRuntime.wrap(function
|
|
35126
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
34851
35127
|
while (1) {
|
|
34852
|
-
switch (
|
|
35128
|
+
switch (_context10.prev = _context10.next) {
|
|
34853
35129
|
case 0:
|
|
34854
|
-
payload =
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
|
|
35130
|
+
payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
|
|
35131
|
+
_ref22 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
|
|
35132
|
+
_context10.prev = 2;
|
|
35133
|
+
_list5 = payload; // const states = getState();
|
|
34858
35134
|
|
|
34859
35135
|
body = [{
|
|
34860
35136
|
db_name: dbName,
|
|
34861
35137
|
entity: "PH_OrderLine",
|
|
34862
|
-
filter: "PH_OrderLine._id=='".concat(
|
|
35138
|
+
filter: "PH_OrderLine._id=='".concat(_list5.id, "'"),
|
|
34863
35139
|
doc: {
|
|
34864
|
-
status: (
|
|
34865
|
-
statusreason:
|
|
34866
|
-
statusperiod:
|
|
34867
|
-
statushistory:
|
|
35140
|
+
status: (_list5$status = _list5.status) === null || _list5$status === void 0 ? void 0 : _list5$status.value,
|
|
35141
|
+
statusreason: _list5.statusReason,
|
|
35142
|
+
statusperiod: _list5.statusperiod,
|
|
35143
|
+
statushistory: _list5.statushistory
|
|
34868
35144
|
}
|
|
34869
35145
|
}]; // if (list.status?.label === "Complete") {
|
|
34870
35146
|
// let flowStatusList = [];
|
|
@@ -34877,76 +35153,76 @@ var UPDATE_MEDICATIONS = createAsyncThunk("medicationsSlice/update_medication",
|
|
|
34877
35153
|
// ))
|
|
34878
35154
|
// }
|
|
34879
35155
|
|
|
34880
|
-
|
|
35156
|
+
_context10.next = 7;
|
|
34881
35157
|
return fetchData$3({
|
|
34882
35158
|
body: JSON.stringify(body)
|
|
34883
35159
|
}, __update__);
|
|
34884
35160
|
|
|
34885
35161
|
case 7:
|
|
34886
|
-
data =
|
|
34887
|
-
return
|
|
35162
|
+
data = _context10.sent;
|
|
35163
|
+
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34888
35164
|
data: data === null || data === void 0 ? void 0 : (_data$Result5 = data.Result) === null || _data$Result5 === void 0 ? void 0 : (_data$Result5$ = _data$Result5[0]) === null || _data$Result5$ === void 0 ? void 0 : (_data$Result5$$proper = _data$Result5$.properties) === null || _data$Result5$$proper === void 0 ? void 0 : (_data$Result5$$proper2 = _data$Result5$$proper.doc) === null || _data$Result5$$proper2 === void 0 ? void 0 : _data$Result5$$proper2._id
|
|
34889
35165
|
}));
|
|
34890
35166
|
|
|
34891
35167
|
case 11:
|
|
34892
|
-
|
|
34893
|
-
|
|
34894
|
-
console.log(
|
|
34895
|
-
return
|
|
34896
|
-
message:
|
|
35168
|
+
_context10.prev = 11;
|
|
35169
|
+
_context10.t0 = _context10["catch"](2);
|
|
35170
|
+
console.log(_context10.t0);
|
|
35171
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35172
|
+
message: _context10.t0.message
|
|
34897
35173
|
})));
|
|
34898
35174
|
|
|
34899
35175
|
case 15:
|
|
34900
35176
|
case "end":
|
|
34901
|
-
return
|
|
35177
|
+
return _context10.stop();
|
|
34902
35178
|
}
|
|
34903
35179
|
}
|
|
34904
|
-
},
|
|
35180
|
+
}, _callee10, null, [[2, 11]]);
|
|
34905
35181
|
})));
|
|
34906
|
-
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35182
|
+
var GET_MEDICATIONS = createAsyncThunk("medicationsSlice/medication_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
34907
35183
|
var payload,
|
|
34908
|
-
|
|
35184
|
+
_ref24,
|
|
34909
35185
|
rejectWithValue,
|
|
34910
35186
|
id,
|
|
34911
35187
|
data,
|
|
34912
|
-
|
|
35188
|
+
_args11 = arguments;
|
|
34913
35189
|
|
|
34914
|
-
return regeneratorRuntime.wrap(function
|
|
35190
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
34915
35191
|
while (1) {
|
|
34916
|
-
switch (
|
|
35192
|
+
switch (_context11.prev = _context11.next) {
|
|
34917
35193
|
case 0:
|
|
34918
|
-
payload =
|
|
34919
|
-
|
|
34920
|
-
|
|
35194
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
35195
|
+
_ref24 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
|
|
35196
|
+
_context11.prev = 2;
|
|
34921
35197
|
id = payload.id;
|
|
34922
|
-
|
|
35198
|
+
_context11.next = 6;
|
|
34923
35199
|
return fetchData$3({
|
|
34924
35200
|
body: queries$5.getMedications(id)
|
|
34925
35201
|
}, __readDocumentUrl__);
|
|
34926
35202
|
|
|
34927
35203
|
case 6:
|
|
34928
|
-
data =
|
|
34929
|
-
return
|
|
35204
|
+
data = _context11.sent;
|
|
35205
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
34930
35206
|
data: data === null || data === void 0 ? void 0 : data.result
|
|
34931
35207
|
}));
|
|
34932
35208
|
|
|
34933
35209
|
case 10:
|
|
34934
|
-
|
|
34935
|
-
|
|
34936
|
-
return
|
|
34937
|
-
message:
|
|
35210
|
+
_context11.prev = 10;
|
|
35211
|
+
_context11.t0 = _context11["catch"](2);
|
|
35212
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35213
|
+
message: _context11.t0.message
|
|
34938
35214
|
})));
|
|
34939
35215
|
|
|
34940
35216
|
case 13:
|
|
34941
35217
|
case "end":
|
|
34942
|
-
return
|
|
35218
|
+
return _context11.stop();
|
|
34943
35219
|
}
|
|
34944
35220
|
}
|
|
34945
|
-
},
|
|
35221
|
+
}, _callee11, null, [[2, 10]]);
|
|
34946
35222
|
})));
|
|
34947
|
-
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35223
|
+
var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workflow_status", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
34948
35224
|
var payload,
|
|
34949
|
-
|
|
35225
|
+
_ref26,
|
|
34950
35226
|
rejectWithValue,
|
|
34951
35227
|
getState,
|
|
34952
35228
|
personId,
|
|
@@ -34959,15 +35235,15 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
34959
35235
|
arr,
|
|
34960
35236
|
data,
|
|
34961
35237
|
PH_PresWorkflowStatusTrx,
|
|
34962
|
-
|
|
35238
|
+
_args12 = arguments;
|
|
34963
35239
|
|
|
34964
|
-
return regeneratorRuntime.wrap(function
|
|
35240
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
34965
35241
|
while (1) {
|
|
34966
|
-
switch (
|
|
35242
|
+
switch (_context12.prev = _context12.next) {
|
|
34967
35243
|
case 0:
|
|
34968
|
-
payload =
|
|
34969
|
-
|
|
34970
|
-
|
|
35244
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
35245
|
+
_ref26 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref26.rejectWithValue, getState = _ref26.getState;
|
|
35246
|
+
_context12.prev = 2;
|
|
34971
35247
|
personId = payload.personId;
|
|
34972
35248
|
states = getState();
|
|
34973
35249
|
flowStatus = states.MedicationMastersSlice.workflow_status_masters.data.filter(function (val) {
|
|
@@ -35004,164 +35280,164 @@ var UPDATE_ALL_WORKFLOW_STATUS = createAsyncThunk("medicationsSlice/update_workf
|
|
|
35004
35280
|
}
|
|
35005
35281
|
};
|
|
35006
35282
|
});
|
|
35007
|
-
|
|
35283
|
+
_context12.next = 13;
|
|
35008
35284
|
return fetchData$3({
|
|
35009
35285
|
body: JSON.stringify(arr)
|
|
35010
35286
|
}, __update__);
|
|
35011
35287
|
|
|
35012
35288
|
case 13:
|
|
35013
|
-
data =
|
|
35014
|
-
|
|
35289
|
+
data = _context12.sent;
|
|
35290
|
+
_context12.next = 16;
|
|
35015
35291
|
return fetchData$3({
|
|
35016
35292
|
body: JSON.stringify(flowStatusList)
|
|
35017
35293
|
}, __uspsertUrl__);
|
|
35018
35294
|
|
|
35019
35295
|
case 16:
|
|
35020
|
-
PH_PresWorkflowStatusTrx =
|
|
35021
|
-
return
|
|
35296
|
+
PH_PresWorkflowStatusTrx = _context12.sent;
|
|
35297
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35022
35298
|
data: data,
|
|
35023
35299
|
PH_PresWorkflowStatusTrx: PH_PresWorkflowStatusTrx
|
|
35024
35300
|
}));
|
|
35025
35301
|
|
|
35026
35302
|
case 20:
|
|
35027
|
-
|
|
35028
|
-
|
|
35029
|
-
console.log(
|
|
35030
|
-
return
|
|
35031
|
-
message:
|
|
35303
|
+
_context12.prev = 20;
|
|
35304
|
+
_context12.t0 = _context12["catch"](2);
|
|
35305
|
+
console.log(_context12.t0);
|
|
35306
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35307
|
+
message: _context12.t0.message
|
|
35032
35308
|
})));
|
|
35033
35309
|
|
|
35034
35310
|
case 24:
|
|
35035
35311
|
case "end":
|
|
35036
|
-
return
|
|
35312
|
+
return _context12.stop();
|
|
35037
35313
|
}
|
|
35038
35314
|
}
|
|
35039
|
-
},
|
|
35315
|
+
}, _callee12, null, [[2, 20]]);
|
|
35040
35316
|
})));
|
|
35041
|
-
var PATIENT_BANNER = createAsyncThunk("medicationsSlice/patient_banner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35317
|
+
var PATIENT_BANNER = createAsyncThunk("medicationsSlice/patient_banner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
35042
35318
|
var payload,
|
|
35043
|
-
|
|
35319
|
+
_ref28,
|
|
35044
35320
|
rejectWithValue,
|
|
35045
35321
|
id,
|
|
35046
35322
|
data,
|
|
35047
|
-
|
|
35323
|
+
_args13 = arguments;
|
|
35048
35324
|
|
|
35049
|
-
return regeneratorRuntime.wrap(function
|
|
35325
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
35050
35326
|
while (1) {
|
|
35051
|
-
switch (
|
|
35327
|
+
switch (_context13.prev = _context13.next) {
|
|
35052
35328
|
case 0:
|
|
35053
|
-
payload =
|
|
35054
|
-
|
|
35055
|
-
|
|
35329
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
35330
|
+
_ref28 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
35331
|
+
_context13.prev = 2;
|
|
35056
35332
|
id = payload.id;
|
|
35057
|
-
|
|
35333
|
+
_context13.next = 6;
|
|
35058
35334
|
return fetchData$3({
|
|
35059
35335
|
body: JSON.stringify(queries$5.PharmacyFramework_Patientbanner(id))
|
|
35060
35336
|
}, __readDocumentUrl__);
|
|
35061
35337
|
|
|
35062
35338
|
case 6:
|
|
35063
|
-
data =
|
|
35064
|
-
return
|
|
35339
|
+
data = _context13.sent;
|
|
35340
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35065
35341
|
data: data.result
|
|
35066
35342
|
}));
|
|
35067
35343
|
|
|
35068
35344
|
case 10:
|
|
35069
|
-
|
|
35070
|
-
|
|
35071
|
-
return
|
|
35072
|
-
message:
|
|
35345
|
+
_context13.prev = 10;
|
|
35346
|
+
_context13.t0 = _context13["catch"](2);
|
|
35347
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35348
|
+
message: _context13.t0.message
|
|
35073
35349
|
})));
|
|
35074
35350
|
|
|
35075
35351
|
case 13:
|
|
35076
35352
|
case "end":
|
|
35077
|
-
return
|
|
35353
|
+
return _context13.stop();
|
|
35078
35354
|
}
|
|
35079
35355
|
}
|
|
35080
|
-
},
|
|
35356
|
+
}, _callee13, null, [[2, 10]]);
|
|
35081
35357
|
})));
|
|
35082
|
-
var ENCOUNTER_BANNER = createAsyncThunk("medicationsSlice/Encounterbanner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35358
|
+
var ENCOUNTER_BANNER = createAsyncThunk("medicationsSlice/Encounterbanner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
35083
35359
|
var payload,
|
|
35084
|
-
|
|
35360
|
+
_ref30,
|
|
35085
35361
|
rejectWithValue,
|
|
35086
35362
|
getState,
|
|
35087
35363
|
patientId,
|
|
35088
35364
|
facilityId,
|
|
35089
35365
|
data,
|
|
35090
|
-
|
|
35366
|
+
_args14 = arguments;
|
|
35091
35367
|
|
|
35092
|
-
return regeneratorRuntime.wrap(function
|
|
35368
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
35093
35369
|
while (1) {
|
|
35094
|
-
switch (
|
|
35370
|
+
switch (_context14.prev = _context14.next) {
|
|
35095
35371
|
case 0:
|
|
35096
|
-
payload =
|
|
35097
|
-
|
|
35098
|
-
|
|
35372
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
35373
|
+
_ref30 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref30.rejectWithValue, getState = _ref30.getState;
|
|
35374
|
+
_context14.prev = 2;
|
|
35099
35375
|
patientId = payload.patientId, facilityId = payload.facilityId;
|
|
35100
|
-
|
|
35376
|
+
_context14.next = 6;
|
|
35101
35377
|
return fetchData$3({
|
|
35102
35378
|
body: JSON.stringify(queries$5.PharmacyFramework_Encounterbanner(patientId, facilityId))
|
|
35103
35379
|
}, __readDocumentUrl__);
|
|
35104
35380
|
|
|
35105
35381
|
case 6:
|
|
35106
|
-
data =
|
|
35107
|
-
return
|
|
35382
|
+
data = _context14.sent;
|
|
35383
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35108
35384
|
data: data.result
|
|
35109
35385
|
}));
|
|
35110
35386
|
|
|
35111
35387
|
case 10:
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
return
|
|
35115
|
-
message:
|
|
35388
|
+
_context14.prev = 10;
|
|
35389
|
+
_context14.t0 = _context14["catch"](2);
|
|
35390
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35391
|
+
message: _context14.t0.message
|
|
35116
35392
|
})));
|
|
35117
35393
|
|
|
35118
35394
|
case 13:
|
|
35119
35395
|
case "end":
|
|
35120
|
-
return
|
|
35396
|
+
return _context14.stop();
|
|
35121
35397
|
}
|
|
35122
35398
|
}
|
|
35123
|
-
},
|
|
35399
|
+
}, _callee14, null, [[2, 10]]);
|
|
35124
35400
|
})));
|
|
35125
|
-
var GET_ORDER_DATE = createAsyncThunk("medicationsSlice/get_orderDate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
35401
|
+
var GET_ORDER_DATE = createAsyncThunk("medicationsSlice/get_orderDate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
35126
35402
|
var payload,
|
|
35127
|
-
|
|
35403
|
+
_ref32,
|
|
35128
35404
|
rejectWithValue,
|
|
35129
|
-
|
|
35405
|
+
_list6,
|
|
35130
35406
|
data,
|
|
35131
|
-
|
|
35407
|
+
_args15 = arguments;
|
|
35132
35408
|
|
|
35133
|
-
return regeneratorRuntime.wrap(function
|
|
35409
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
35134
35410
|
while (1) {
|
|
35135
|
-
switch (
|
|
35411
|
+
switch (_context15.prev = _context15.next) {
|
|
35136
35412
|
case 0:
|
|
35137
|
-
payload =
|
|
35138
|
-
|
|
35139
|
-
|
|
35140
|
-
|
|
35141
|
-
|
|
35413
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
35414
|
+
_ref32 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
35415
|
+
_context15.prev = 2;
|
|
35416
|
+
_list6 = payload;
|
|
35417
|
+
_context15.next = 6;
|
|
35142
35418
|
return fetchData$3({
|
|
35143
|
-
body: JSON.stringify(
|
|
35419
|
+
body: JSON.stringify(_list6)
|
|
35144
35420
|
}, __GetOrderStartDate__);
|
|
35145
35421
|
|
|
35146
35422
|
case 6:
|
|
35147
|
-
data =
|
|
35148
|
-
return
|
|
35423
|
+
data = _context15.sent;
|
|
35424
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
35149
35425
|
data: data
|
|
35150
35426
|
}));
|
|
35151
35427
|
|
|
35152
35428
|
case 10:
|
|
35153
|
-
|
|
35154
|
-
|
|
35155
|
-
return
|
|
35156
|
-
message:
|
|
35429
|
+
_context15.prev = 10;
|
|
35430
|
+
_context15.t0 = _context15["catch"](2);
|
|
35431
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
35432
|
+
message: _context15.t0.message
|
|
35157
35433
|
})));
|
|
35158
35434
|
|
|
35159
35435
|
case 13:
|
|
35160
35436
|
case "end":
|
|
35161
|
-
return
|
|
35437
|
+
return _context15.stop();
|
|
35162
35438
|
}
|
|
35163
35439
|
}
|
|
35164
|
-
},
|
|
35440
|
+
}, _callee15, null, [[2, 10]]);
|
|
35165
35441
|
})));
|
|
35166
35442
|
var medicationsSlice = createSlice({
|
|
35167
35443
|
name: "medicationsSlice",
|
|
@@ -35176,7 +35452,11 @@ var medicationsSlice = createSlice({
|
|
|
35176
35452
|
alert_codes: _objectSpread2({}, defaultState.list),
|
|
35177
35453
|
drug_codes: _objectSpread2({}, defaultState.list),
|
|
35178
35454
|
patientBanner: _objectSpread2({}, defaultState.List),
|
|
35179
|
-
Encounterbanner: _objectSpread2({}, defaultState.List)
|
|
35455
|
+
Encounterbanner: _objectSpread2({}, defaultState.List),
|
|
35456
|
+
get_ordered_status_id: _objectSpread2({}, defaultState.List),
|
|
35457
|
+
get_alert_codes: _objectSpread2({}, defaultState.Info),
|
|
35458
|
+
get_drug_duplication: _objectSpread2({}, defaultState.List),
|
|
35459
|
+
get_allergy_interaction: _objectSpread2({}, defaultState.List)
|
|
35180
35460
|
},
|
|
35181
35461
|
extraReducers: (_extraReducers$h = {}, _defineProperty(_extraReducers$h, GET_ORDER_DATE.fulfilled, function (state, action) {
|
|
35182
35462
|
var _action$payload;
|
|
@@ -35278,16 +35558,56 @@ var medicationsSlice = createSlice({
|
|
|
35278
35558
|
var _action$payload20;
|
|
35279
35559
|
|
|
35280
35560
|
state.update_workflow_status.loading = false, state.update_workflow_status.error = true, state.update_workflow_status = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
|
|
35281
|
-
}), _defineProperty(_extraReducers$h,
|
|
35561
|
+
}), _defineProperty(_extraReducers$h, GET_ORDERED_STATUS_ID.fulfilled, function (state, action) {
|
|
35282
35562
|
var _action$payload21;
|
|
35283
35563
|
|
|
35284
|
-
state.
|
|
35564
|
+
state.get_ordered_status_id.loading = false, state.get_ordered_status_id.error = false, state.get_ordered_status_id = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
|
|
35565
|
+
}), _defineProperty(_extraReducers$h, GET_ORDERED_STATUS_ID.pending, function (state, action) {
|
|
35566
|
+
state.get_ordered_status_id.error = false, state.get_ordered_status_id.loading = true;
|
|
35567
|
+
}), _defineProperty(_extraReducers$h, GET_ORDERED_STATUS_ID.rejected, function (state, action) {
|
|
35568
|
+
var _action$payload22;
|
|
35569
|
+
|
|
35570
|
+
state.get_ordered_status_id.loading = false, state.get_ordered_status_id.error = true, state.get_ordered_status_id = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
|
|
35571
|
+
}), _defineProperty(_extraReducers$h, GET_ALERT_CODES.fulfilled, function (state, action) {
|
|
35572
|
+
var _action$payload23;
|
|
35573
|
+
|
|
35574
|
+
state.get_alert_codes.loading = false, state.get_alert_codes.error = false, state.get_alert_codes = (_action$payload23 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload23 !== void 0 ? _action$payload23 : {};
|
|
35575
|
+
}), _defineProperty(_extraReducers$h, GET_ALERT_CODES.pending, function (state, action) {
|
|
35576
|
+
state.get_alert_codes.error = false, state.get_alert_codes.loading = true;
|
|
35577
|
+
}), _defineProperty(_extraReducers$h, GET_ALERT_CODES.rejected, function (state, action) {
|
|
35578
|
+
var _action$payload24;
|
|
35579
|
+
|
|
35580
|
+
state.get_alert_codes.loading = false, state.get_alert_codes.error = true, state.get_alert_codes = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : {};
|
|
35581
|
+
}), _defineProperty(_extraReducers$h, GET_DRUG_DUPLICATION.fulfilled, function (state, action) {
|
|
35582
|
+
var _action$payload25;
|
|
35583
|
+
|
|
35584
|
+
state.get_drug_duplication.loading = false, state.get_drug_duplication.error = false, state.get_drug_duplication = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : {};
|
|
35585
|
+
}), _defineProperty(_extraReducers$h, GET_DRUG_DUPLICATION.pending, function (state, action) {
|
|
35586
|
+
state.get_drug_duplication.error = false, state.get_drug_duplication.loading = true;
|
|
35587
|
+
}), _defineProperty(_extraReducers$h, GET_DRUG_DUPLICATION.rejected, function (state, action) {
|
|
35588
|
+
var _action$payload26;
|
|
35589
|
+
|
|
35590
|
+
state.get_drug_duplication.loading = false, state.get_drug_duplication.error = true, state.get_drug_duplication = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : {};
|
|
35591
|
+
}), _defineProperty(_extraReducers$h, GET_ALLERGY_INTERACTION.fulfilled, function (state, action) {
|
|
35592
|
+
var _action$payload27;
|
|
35593
|
+
|
|
35594
|
+
state.get_allergy_interaction.loading = false, state.get_allergy_interaction.error = false, state.get_allergy_interaction = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : {};
|
|
35595
|
+
}), _defineProperty(_extraReducers$h, GET_ALLERGY_INTERACTION.pending, function (state, action) {
|
|
35596
|
+
state.get_allergy_interaction.error = false, state.get_allergy_interaction.loading = true;
|
|
35597
|
+
}), _defineProperty(_extraReducers$h, GET_ALLERGY_INTERACTION.rejected, function (state, action) {
|
|
35598
|
+
var _action$payload28;
|
|
35599
|
+
|
|
35600
|
+
state.get_allergy_interaction.loading = false, state.get_allergy_interaction.error = true, state.get_allergy_interaction = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : {};
|
|
35601
|
+
}), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.fulfilled, function (state, action) {
|
|
35602
|
+
var _action$payload29;
|
|
35603
|
+
|
|
35604
|
+
state.Encounterbanner = (_action$payload29 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload29 !== void 0 ? _action$payload29 : {};
|
|
35285
35605
|
}), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.pending, function (state, action) {
|
|
35286
35606
|
state.Encounterbanner.loading = true;
|
|
35287
35607
|
}), _defineProperty(_extraReducers$h, ENCOUNTER_BANNER.rejected, function (state, action) {
|
|
35288
|
-
var _action$
|
|
35608
|
+
var _action$payload30;
|
|
35289
35609
|
|
|
35290
|
-
state.Encounterbanner = (_action$
|
|
35610
|
+
state.Encounterbanner = (_action$payload30 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload30 !== void 0 ? _action$payload30 : {};
|
|
35291
35611
|
}), _extraReducers$h)
|
|
35292
35612
|
});
|
|
35293
35613
|
var medicationsActions = {
|
|
@@ -35301,7 +35621,11 @@ var medicationsActions = {
|
|
|
35301
35621
|
PATIENT_BANNER: PATIENT_BANNER,
|
|
35302
35622
|
ENCOUNTER_BANNER: ENCOUNTER_BANNER,
|
|
35303
35623
|
GET_ORDER_DATE: GET_ORDER_DATE,
|
|
35304
|
-
SAVE_NIFI_MEDICATIONS: SAVE_NIFI_MEDICATIONS
|
|
35624
|
+
SAVE_NIFI_MEDICATIONS: SAVE_NIFI_MEDICATIONS,
|
|
35625
|
+
GET_ORDERED_STATUS_ID: GET_ORDERED_STATUS_ID,
|
|
35626
|
+
GET_ALERT_CODES: GET_ALERT_CODES,
|
|
35627
|
+
GET_ALLERGY_INTERACTION: GET_ALLERGY_INTERACTION,
|
|
35628
|
+
GET_DRUG_DUPLICATION: GET_DRUG_DUPLICATION
|
|
35305
35629
|
};
|
|
35306
35630
|
var medicationsSlice$1 = medicationsSlice.reducer;
|
|
35307
35631
|
|
|
@@ -37867,7 +38191,7 @@ var RecurrentgenerateResJson = function RecurrentgenerateResJson(dataList, arr)
|
|
|
37867
38191
|
|
|
37868
38192
|
var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
37869
38193
|
var payload = dataList.map(function (data, i) {
|
|
37870
|
-
var _data$orderCatalog, _data$occuranceEndDat, _data$orderQty, _data$status, _data$reasonCode, _data$indications, _data$notes, _data$attribute$view, _data$attribute, _data$attribute$bedSi, _data$attribute2, _data$attribute$contr, _data$attribute3, _data$statusreason, _data$accessionNum;
|
|
38194
|
+
var _data$orderCatalog, _data$occuranceEndDat, _data$orderQty, _data$status, _data$orderQty2, _data$reasonCode, _data$indications, _data$notes, _data$attribute$view, _data$attribute, _data$attribute$bedSi, _data$attribute2, _data$attribute$contr, _data$attribute3, _data$statusreason, _data$accessionNum;
|
|
37871
38195
|
|
|
37872
38196
|
var extraJson = {};
|
|
37873
38197
|
var filter = {};
|
|
@@ -37916,7 +38240,8 @@ var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
|
37916
38240
|
status: (_data$status = data === null || data === void 0 ? void 0 : data.status) !== null && _data$status !== void 0 ? _data$status : "",
|
|
37917
38241
|
intent: "",
|
|
37918
38242
|
workflowStatus: "",
|
|
37919
|
-
billQty: 0,
|
|
38243
|
+
// billQty: 0,
|
|
38244
|
+
billQty: (_data$orderQty2 = data === null || data === void 0 ? void 0 : data.orderQty) !== null && _data$orderQty2 !== void 0 ? _data$orderQty2 : 0,
|
|
37920
38245
|
orderPrivilegeLevel: 0,
|
|
37921
38246
|
apptDate: !edit ? getActualDate(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId,
|
|
37922
38247
|
apptRefNum: "",
|