primarycare-binder 1.1.114 → 1.1.117
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 +482 -232
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8073,7 +8073,7 @@ var queries$b = {
|
|
|
8073
8073
|
db_name: "".concat(dbName),
|
|
8074
8074
|
entity: "Encounter",
|
|
8075
8075
|
filter: "Encounter.activestatus==true && Encounter._id=='".concat(encounter_id, "'"),
|
|
8076
|
-
return_fields: "MERGE(Encounter,{reasonReference: Document(Encounter.reasonReference),practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:DOCUMENT(practdet.speciality)}))},{identifier: ( FOR IdentifierMaster IN IdentifierMaster FILTER IdentifierMaster._id in Encounter.identifier return merge(IdentifierMaster,{period:document(IdentifierMaster.period)}))},{statushistory:(for sat in TO_ARRAY(Encounter.statushistory) return merge(sat,{period:document(sat.period)}))})"
|
|
8076
|
+
return_fields: "MERGE(Encounter,{reasonReference: Document(Encounter.reasonReference),practitioner_details:(FOR practdet IN TO_ARRAY(Encounter.practitioner_details) RETURN MERGE(practdet,{speciality:DOCUMENT(practdet.speciality)}))},{identifier: ( FOR IdentifierMaster IN IdentifierMaster FILTER IdentifierMaster._id in Encounter.identifier return merge(IdentifierMaster,{period:document(IdentifierMaster.period)}))},{statushistory:(for sat in TO_ARRAY(Encounter.statushistory) return merge(sat,{period:document(sat.period)}))},{type:document(Encounter.type)},{class:document(Encounter.class)})"
|
|
8077
8077
|
};
|
|
8078
8078
|
},
|
|
8079
8079
|
get_apo_read: function get_apo_read(appointmentId) {
|
|
@@ -8146,6 +8146,18 @@ var queries$b = {
|
|
|
8146
8146
|
},
|
|
8147
8147
|
returnFields: "MERGE(Practitioner,{name:(for doc in HumanNameMaster filter doc._id in Practitioner.name return merge(doc,{use:document(doc.use),prefix:document(doc.prefix),suffix:document(doc.suffix)})),practitioner_type:document(document(Practitioner.practitioner_type).coding[0]).display})"
|
|
8148
8148
|
},
|
|
8149
|
+
codablemasterPractitionerType: {
|
|
8150
|
+
query: function query(OrgID) {
|
|
8151
|
+
return "(document(Practitioner.practitioner_role)[*].SpecialtyID any == '".concat(OrgID, "' || first(document(document(Practitioner.practitioner_role)[*].SpecialtyID)[*].coding) any == '").concat(OrgID, "' ) && Practitioner.activestatus==true && Practitioner.active == true");
|
|
8152
|
+
},
|
|
8153
|
+
returnFields: "distinct {practitioner_type:contains(Practitioner.practitioner_type,'CodeableConceptMaster')?document(document(Practitioner.practitioner_type).coding):document(Practitioner.practitioner_type)}"
|
|
8154
|
+
},
|
|
8155
|
+
codablemasterPractitionerName: {
|
|
8156
|
+
query: function query(specialityID, practitionerType) {
|
|
8157
|
+
return "(document(Practitioner.practitioner_role)[*].SpecialtyID any == '".concat(specialityID, "' || first(document(document(Practitioner.practitioner_role)[*].SpecialtyID)[*].coding) any == '").concat(specialityID, "' ) && (document(Practitioner.practitioner_type).coding any=='").concat(practitionerType, "' || Practitioner.practitioner_type=='").concat(practitionerType, "') && Practitioner.activestatus==true && Practitioner.active == true");
|
|
8158
|
+
},
|
|
8159
|
+
returnFields: "merge(Practitioner,{name:(for hm in HumanNameMaster filter hm._id in Practitioner.name return merge(hm,{use:(for cod in CodeableConceptMaster filter cod._id== hm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id == hm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id == hm.suffix return document(cod.coding))}))})"
|
|
8160
|
+
},
|
|
8149
8161
|
codablemasterGetFinancial: {
|
|
8150
8162
|
query: function query(patientId) {
|
|
8151
8163
|
return "Account.guarantor[0].patient_id==".concat(patientId);
|
|
@@ -8423,6 +8435,24 @@ var makeName = function makeName() {
|
|
|
8423
8435
|
var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$ = suffix[0]) === null || _suffix$ === void 0 ? void 0 : (_suffix$$coding = _suffix$.coding) === null || _suffix$$coding === void 0 ? void 0 : (_suffix$$coding$ = _suffix$$coding[0]) === null || _suffix$$coding$ === void 0 ? void 0 : _suffix$$coding$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding = suffix.coding) === null || _suffix$coding === void 0 ? void 0 : (_suffix$coding$ = _suffix$coding[0]) === null || _suffix$coding$ === void 0 ? void 0 : _suffix$coding$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$2 = suffix[0]) === null || _suffix$2 === void 0 ? void 0 : _suffix$2.display) || (suffix === null || suffix === void 0 ? void 0 : suffix.display) || "";
|
|
8424
8436
|
return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffixVal && suffixVal);
|
|
8425
8437
|
};
|
|
8438
|
+
var makeName_ = function makeName_() {
|
|
8439
|
+
var _prefix$3, _prefix$3$coding, _prefix$3$coding$, _prefix$coding2, _prefix$coding2$, _prefix$4, _suffix$3, _suffix$3$coding, _suffix$3$coding$, _suffix$coding2, _suffix$coding2$, _suffix$4;
|
|
8440
|
+
|
|
8441
|
+
var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8442
|
+
var _nameObj$prefix2 = nameObj.prefix,
|
|
8443
|
+
prefix = _nameObj$prefix2 === void 0 ? "" : _nameObj$prefix2,
|
|
8444
|
+
_nameObj$given2 = nameObj.given,
|
|
8445
|
+
given = _nameObj$given2 === void 0 ? "" : _nameObj$given2,
|
|
8446
|
+
_nameObj$text2 = nameObj.text,
|
|
8447
|
+
text = _nameObj$text2 === void 0 ? "" : _nameObj$text2,
|
|
8448
|
+
_nameObj$suffix2 = nameObj.suffix,
|
|
8449
|
+
suffix = _nameObj$suffix2 === void 0 ? "" : _nameObj$suffix2,
|
|
8450
|
+
_nameObj$family2 = nameObj.family,
|
|
8451
|
+
family = _nameObj$family2 === void 0 ? "" : _nameObj$family2;
|
|
8452
|
+
var prefixVal = (prefix === null || prefix === void 0 ? void 0 : (_prefix$3 = prefix[0]) === null || _prefix$3 === void 0 ? void 0 : (_prefix$3$coding = _prefix$3.coding) === null || _prefix$3$coding === void 0 ? void 0 : (_prefix$3$coding$ = _prefix$3$coding[0]) === null || _prefix$3$coding$ === void 0 ? void 0 : _prefix$3$coding$.display) || (prefix === null || prefix === void 0 ? void 0 : (_prefix$coding2 = prefix.coding) === null || _prefix$coding2 === void 0 ? void 0 : (_prefix$coding2$ = _prefix$coding2[0]) === null || _prefix$coding2$ === void 0 ? void 0 : _prefix$coding2$.display) || (prefix === null || prefix === void 0 ? void 0 : (_prefix$4 = prefix[0]) === null || _prefix$4 === void 0 ? void 0 : _prefix$4.display) || (prefix === null || prefix === void 0 ? void 0 : prefix.display) || "";
|
|
8453
|
+
var suffixVal = (suffix === null || suffix === void 0 ? void 0 : (_suffix$3 = suffix[0]) === null || _suffix$3 === void 0 ? void 0 : (_suffix$3$coding = _suffix$3.coding) === null || _suffix$3$coding === void 0 ? void 0 : (_suffix$3$coding$ = _suffix$3$coding[0]) === null || _suffix$3$coding$ === void 0 ? void 0 : _suffix$3$coding$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$coding2 = suffix.coding) === null || _suffix$coding2 === void 0 ? void 0 : (_suffix$coding2$ = _suffix$coding2[0]) === null || _suffix$coding2$ === void 0 ? void 0 : _suffix$coding2$.display) || (suffix === null || suffix === void 0 ? void 0 : (_suffix$4 = suffix[0]) === null || _suffix$4 === void 0 ? void 0 : _suffix$4.display) || (suffix === null || suffix === void 0 ? void 0 : suffix.display) || "";
|
|
8454
|
+
return "".concat(prefixVal && prefixVal + ".").concat(text && text + " ").concat(given && given + " ").concat(family && family + " ").concat(suffixVal && suffixVal);
|
|
8455
|
+
};
|
|
8426
8456
|
|
|
8427
8457
|
var fetchData$3 = /*#__PURE__*/function () {
|
|
8428
8458
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(input) {
|
|
@@ -12298,6 +12328,8 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
|
|
|
12298
12328
|
isNurse,
|
|
12299
12329
|
_payload$isFrontDesk,
|
|
12300
12330
|
isFrontDesk,
|
|
12331
|
+
_payload$nameOfOrg,
|
|
12332
|
+
nameOfOrg,
|
|
12301
12333
|
body,
|
|
12302
12334
|
data,
|
|
12303
12335
|
returnData,
|
|
@@ -12310,7 +12342,7 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
|
|
|
12310
12342
|
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
12311
12343
|
_ref25 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
|
|
12312
12344
|
_context12.prev = 2;
|
|
12313
|
-
_payload$start2 = payload.start, start = _payload$start2 === void 0 ? 0 : _payload$start2, _payload$end = payload.end, end = _payload$end === void 0 ? 0 : _payload$end, _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? 0 : _payload$OrgID, _payload$login = payload.login, login = _payload$login === void 0 ? 0 : _payload$login, _payload$specialtyId = payload.specialtyId, specialtyId = _payload$specialtyId === void 0 ? 0 : _payload$specialtyId, _payload$isDoctor = payload.isDoctor, isDoctor = _payload$isDoctor === void 0 ? false : _payload$isDoctor, _payload$isNurse = payload.isNurse, isNurse = _payload$isNurse === void 0 ? false : _payload$isNurse, _payload$isFrontDesk = payload.isFrontDesk, isFrontDesk = _payload$isFrontDesk === void 0 ? false : _payload$isFrontDesk;
|
|
12345
|
+
_payload$start2 = payload.start, start = _payload$start2 === void 0 ? 0 : _payload$start2, _payload$end = payload.end, end = _payload$end === void 0 ? 0 : _payload$end, _payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? 0 : _payload$OrgID, _payload$login = payload.login, login = _payload$login === void 0 ? 0 : _payload$login, _payload$specialtyId = payload.specialtyId, specialtyId = _payload$specialtyId === void 0 ? 0 : _payload$specialtyId, _payload$isDoctor = payload.isDoctor, isDoctor = _payload$isDoctor === void 0 ? false : _payload$isDoctor, _payload$isNurse = payload.isNurse, isNurse = _payload$isNurse === void 0 ? false : _payload$isNurse, _payload$isFrontDesk = payload.isFrontDesk, isFrontDesk = _payload$isFrontDesk === void 0 ? false : _payload$isFrontDesk, _payload$nameOfOrg = payload.nameOfOrg, nameOfOrg = _payload$nameOfOrg === void 0 ? "" : _payload$nameOfOrg;
|
|
12314
12346
|
body = isDoctor ? {
|
|
12315
12347
|
db_name: dbName,
|
|
12316
12348
|
queryid: query_ids["appointmentReducer/queueManagementDoctor"],
|
|
@@ -12335,7 +12367,8 @@ var QUEUE_MANAGEMENT = createAsyncThunk("appointmentReducer/queueManagement", /*
|
|
|
12335
12367
|
filter: {
|
|
12336
12368
|
start: start,
|
|
12337
12369
|
end: end,
|
|
12338
|
-
OrgID: OrgID
|
|
12370
|
+
OrgID: OrgID,
|
|
12371
|
+
org_id: nameOfOrg
|
|
12339
12372
|
}
|
|
12340
12373
|
};
|
|
12341
12374
|
_context12.next = 7;
|
|
@@ -18882,7 +18915,54 @@ var GET_FACILITY_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
|
|
|
18882
18915
|
}
|
|
18883
18916
|
}, _callee7, null, [[2, 13]]);
|
|
18884
18917
|
})));
|
|
18885
|
-
|
|
18918
|
+
|
|
18919
|
+
var constructPractitonerType = function constructPractitonerType(data) {
|
|
18920
|
+
debugger;
|
|
18921
|
+
var arr = [];
|
|
18922
|
+
|
|
18923
|
+
if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
18924
|
+
data.map(function (val) {
|
|
18925
|
+
if ((val === null || val === void 0 ? void 0 : val.practitioner_type) !== null) {
|
|
18926
|
+
var _val$practitioner_typ, _val$practitioner_typ2, _val$practitioner_typ3, _val$practitioner_typ4, _val$practitioner_typ5;
|
|
18927
|
+
|
|
18928
|
+
var obj = {
|
|
18929
|
+
label: val === null || val === void 0 ? void 0 : (_val$practitioner_typ = val.practitioner_type) === null || _val$practitioner_typ === void 0 ? void 0 : (_val$practitioner_typ2 = _val$practitioner_typ[0]) === null || _val$practitioner_typ2 === void 0 ? void 0 : _val$practitioner_typ2._id,
|
|
18930
|
+
value: (_val$practitioner_typ3 = val === null || val === void 0 ? void 0 : (_val$practitioner_typ4 = val.practitioner_type) === null || _val$practitioner_typ4 === void 0 ? void 0 : (_val$practitioner_typ5 = _val$practitioner_typ4[0]) === null || _val$practitioner_typ5 === void 0 ? void 0 : _val$practitioner_typ5.display) !== null && _val$practitioner_typ3 !== void 0 ? _val$practitioner_typ3 : ""
|
|
18931
|
+
};
|
|
18932
|
+
arr.push(obj);
|
|
18933
|
+
}
|
|
18934
|
+
});
|
|
18935
|
+
}
|
|
18936
|
+
|
|
18937
|
+
debugger;
|
|
18938
|
+
return arr;
|
|
18939
|
+
};
|
|
18940
|
+
|
|
18941
|
+
var constructPractitonerName = function constructPractitonerName(data) {
|
|
18942
|
+
debugger;
|
|
18943
|
+
var arr = [];
|
|
18944
|
+
|
|
18945
|
+
if (Array.isArray(data) && (data === null || data === void 0 ? void 0 : data.length) > 0) {
|
|
18946
|
+
data.map(function (val) {
|
|
18947
|
+
var _val$name;
|
|
18948
|
+
|
|
18949
|
+
if (Array.isArray(val === null || val === void 0 ? void 0 : val.name) && (val === null || val === void 0 ? void 0 : (_val$name = val.name) === null || _val$name === void 0 ? void 0 : _val$name.length) > 0) {
|
|
18950
|
+
var _val$name2, _val$name2$, _val$name3;
|
|
18951
|
+
|
|
18952
|
+
var obj = {
|
|
18953
|
+
label: val === null || val === void 0 ? void 0 : (_val$name2 = val.name) === null || _val$name2 === void 0 ? void 0 : (_val$name2$ = _val$name2[0]) === null || _val$name2$ === void 0 ? void 0 : _val$name2$._id,
|
|
18954
|
+
value: makeName_(val === null || val === void 0 ? void 0 : (_val$name3 = val.name) === null || _val$name3 === void 0 ? void 0 : _val$name3[0])
|
|
18955
|
+
};
|
|
18956
|
+
arr.push(obj);
|
|
18957
|
+
}
|
|
18958
|
+
});
|
|
18959
|
+
}
|
|
18960
|
+
|
|
18961
|
+
debugger;
|
|
18962
|
+
return arr;
|
|
18963
|
+
};
|
|
18964
|
+
|
|
18965
|
+
var GET_PRACTITIONER_TYPE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerType", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
18886
18966
|
var payload,
|
|
18887
18967
|
_ref16,
|
|
18888
18968
|
rejectWithValue,
|
|
@@ -18903,9 +18983,9 @@ var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
18903
18983
|
_payload$OrgID = payload.OrgID, OrgID = _payload$OrgID === void 0 ? "" : _payload$OrgID;
|
|
18904
18984
|
body = {
|
|
18905
18985
|
db_name: dbName,
|
|
18906
|
-
entity: "Practitioner
|
|
18907
|
-
filter: queries$b["
|
|
18908
|
-
return_fields: queries$b["
|
|
18986
|
+
entity: "Practitioner",
|
|
18987
|
+
filter: queries$b["codablemasterPractitionerType"].query(OrgID),
|
|
18988
|
+
return_fields: queries$b["codablemasterPractitionerType"].returnFields
|
|
18909
18989
|
};
|
|
18910
18990
|
_context8.next = 7;
|
|
18911
18991
|
return fetchData$3({
|
|
@@ -18914,36 +18994,39 @@ var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
18914
18994
|
|
|
18915
18995
|
case 7:
|
|
18916
18996
|
data = _context8.sent;
|
|
18997
|
+
debugger;
|
|
18917
18998
|
returnData = [];
|
|
18918
18999
|
|
|
18919
19000
|
if (Array.isArray(data.result)) {
|
|
18920
|
-
returnData = data.result;
|
|
19001
|
+
returnData = constructPractitonerType(data.result);
|
|
18921
19002
|
}
|
|
18922
19003
|
|
|
18923
19004
|
return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18924
19005
|
data: returnData
|
|
18925
19006
|
}));
|
|
18926
19007
|
|
|
18927
|
-
case
|
|
18928
|
-
_context8.prev =
|
|
19008
|
+
case 14:
|
|
19009
|
+
_context8.prev = 14;
|
|
18929
19010
|
_context8.t0 = _context8["catch"](2);
|
|
18930
19011
|
return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18931
19012
|
message: _context8.t0.message
|
|
18932
19013
|
})));
|
|
18933
19014
|
|
|
18934
|
-
case
|
|
19015
|
+
case 17:
|
|
18935
19016
|
case "end":
|
|
18936
19017
|
return _context8.stop();
|
|
18937
19018
|
}
|
|
18938
19019
|
}
|
|
18939
|
-
}, _callee8, null, [[2,
|
|
19020
|
+
}, _callee8, null, [[2, 14]]);
|
|
18940
19021
|
})));
|
|
18941
|
-
var
|
|
19022
|
+
var GET_PRACTITIONER_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getPractitionerName", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
18942
19023
|
var payload,
|
|
18943
19024
|
_ref18,
|
|
18944
19025
|
rejectWithValue,
|
|
18945
|
-
_payload$
|
|
18946
|
-
|
|
19026
|
+
_payload$specialityID,
|
|
19027
|
+
specialityID,
|
|
19028
|
+
_payload$practitioner,
|
|
19029
|
+
practitionerType,
|
|
18947
19030
|
body,
|
|
18948
19031
|
data,
|
|
18949
19032
|
returnData,
|
|
@@ -18956,12 +19039,12 @@ var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
|
|
|
18956
19039
|
payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
18957
19040
|
_ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
|
|
18958
19041
|
_context9.prev = 2;
|
|
18959
|
-
_payload$
|
|
19042
|
+
_payload$specialityID = payload.specialityID, specialityID = _payload$specialityID === void 0 ? "" : _payload$specialityID, _payload$practitioner = payload.practitionerType, practitionerType = _payload$practitioner === void 0 ? "" : _payload$practitioner;
|
|
18960
19043
|
body = {
|
|
18961
19044
|
db_name: dbName,
|
|
18962
19045
|
entity: "Practitioner",
|
|
18963
|
-
filter: "
|
|
18964
|
-
return_fields: "
|
|
19046
|
+
filter: queries$b["codablemasterPractitionerName"].query(specialityID, practitionerType),
|
|
19047
|
+
return_fields: queries$b["codablemasterPractitionerName"].returnFields
|
|
18965
19048
|
};
|
|
18966
19049
|
_context9.next = 7;
|
|
18967
19050
|
return fetchData$3({
|
|
@@ -18970,35 +19053,36 @@ var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/ge
|
|
|
18970
19053
|
|
|
18971
19054
|
case 7:
|
|
18972
19055
|
data = _context9.sent;
|
|
19056
|
+
debugger;
|
|
18973
19057
|
returnData = [];
|
|
18974
19058
|
|
|
18975
19059
|
if (Array.isArray(data.result)) {
|
|
18976
|
-
returnData = data.result;
|
|
19060
|
+
returnData = constructPractitonerName(data.result);
|
|
18977
19061
|
}
|
|
18978
19062
|
|
|
18979
19063
|
return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18980
19064
|
data: returnData
|
|
18981
19065
|
}));
|
|
18982
19066
|
|
|
18983
|
-
case
|
|
18984
|
-
_context9.prev =
|
|
19067
|
+
case 14:
|
|
19068
|
+
_context9.prev = 14;
|
|
18985
19069
|
_context9.t0 = _context9["catch"](2);
|
|
18986
19070
|
return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18987
19071
|
message: _context9.t0.message
|
|
18988
19072
|
})));
|
|
18989
19073
|
|
|
18990
|
-
case
|
|
19074
|
+
case 17:
|
|
18991
19075
|
case "end":
|
|
18992
19076
|
return _context9.stop();
|
|
18993
19077
|
}
|
|
18994
19078
|
}
|
|
18995
|
-
}, _callee9, null, [[2,
|
|
19079
|
+
}, _callee9, null, [[2, 14]]);
|
|
18996
19080
|
})));
|
|
18997
|
-
var
|
|
19081
|
+
var GET_PRACTITIONER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
18998
19082
|
var payload,
|
|
18999
19083
|
_ref20,
|
|
19000
19084
|
rejectWithValue,
|
|
19001
|
-
_payload$
|
|
19085
|
+
_payload$OrgID2,
|
|
19002
19086
|
OrgID,
|
|
19003
19087
|
body,
|
|
19004
19088
|
data,
|
|
@@ -19012,12 +19096,12 @@ var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlic
|
|
|
19012
19096
|
payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
|
|
19013
19097
|
_ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
|
|
19014
19098
|
_context10.prev = 2;
|
|
19015
|
-
_payload$
|
|
19099
|
+
_payload$OrgID2 = payload.OrgID, OrgID = _payload$OrgID2 === void 0 ? "" : _payload$OrgID2;
|
|
19016
19100
|
body = {
|
|
19017
19101
|
db_name: dbName,
|
|
19018
|
-
entity: "Practitioner,PractitionerRole
|
|
19019
|
-
filter: queries$b["
|
|
19020
|
-
return_fields: queries$b["
|
|
19102
|
+
entity: "Practitioner,PractitionerRole",
|
|
19103
|
+
filter: queries$b["codablemasterPractitioner"].query(OrgID),
|
|
19104
|
+
return_fields: queries$b["codablemasterPractitioner"].returnFields
|
|
19021
19105
|
};
|
|
19022
19106
|
_context10.next = 7;
|
|
19023
19107
|
return fetchData$3({
|
|
@@ -19050,18 +19134,15 @@ var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlic
|
|
|
19050
19134
|
}
|
|
19051
19135
|
}, _callee10, null, [[2, 13]]);
|
|
19052
19136
|
})));
|
|
19053
|
-
var
|
|
19137
|
+
var GET_PRACTITIONERS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitioners", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
19054
19138
|
var payload,
|
|
19055
19139
|
_ref22,
|
|
19056
19140
|
rejectWithValue,
|
|
19057
|
-
_payload$
|
|
19058
|
-
|
|
19141
|
+
_payload$OrgID3,
|
|
19142
|
+
OrgID,
|
|
19059
19143
|
body,
|
|
19060
19144
|
data,
|
|
19061
19145
|
returnData,
|
|
19062
|
-
_data$result$0$specia,
|
|
19063
|
-
_data$result,
|
|
19064
|
-
_data$result$,
|
|
19065
19146
|
_args11 = arguments;
|
|
19066
19147
|
|
|
19067
19148
|
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
@@ -19071,12 +19152,12 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
|
|
|
19071
19152
|
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
19072
19153
|
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
|
|
19073
19154
|
_context11.prev = 2;
|
|
19074
|
-
_payload$
|
|
19155
|
+
_payload$OrgID3 = payload.OrgID, OrgID = _payload$OrgID3 === void 0 ? "" : _payload$OrgID3;
|
|
19075
19156
|
body = {
|
|
19076
19157
|
db_name: dbName,
|
|
19077
|
-
entity: "
|
|
19078
|
-
filter: "
|
|
19079
|
-
return_fields: "{
|
|
19158
|
+
entity: "Practitioner",
|
|
19159
|
+
filter: "document(Practitioner.practitioner_role)[*].SpecialtyID any == '" + OrgID + "'",
|
|
19160
|
+
return_fields: "merge(Practitioner,{name:(let n = document(Practitioner.name)[0] return merge(n, { prefix: (for p in CodeableConceptMaster filter p._id == n.prefix return Document(p.coding)[0])[0], suffix: (for s in CodeableConceptMaster filter s._id == n.suffix return Document(s.coding)[0])[0] }))},{practitioner_role:(for PractitionerRole in PractitionerRole filter Practitioner.practitioner_role any == PractitionerRole._id return merge(PractitionerRole,{role:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == PractitionerRole.role return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))}, {SpecialtyID:(for CodeableConceptMaster in CodeableConceptMaster filter PractitionerRole.SpecialtyID == CodeableConceptMaster._id return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}) ) } ) )}, {practitioner_type:(for CodeableConceptMaster in CodeableConceptMaster filter CodeableConceptMaster._id == Practitioner.practitioner_type return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}))})"
|
|
19080
19161
|
};
|
|
19081
19162
|
_context11.next = 7;
|
|
19082
19163
|
return fetchData$3({
|
|
@@ -19088,7 +19169,7 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
|
|
|
19088
19169
|
returnData = [];
|
|
19089
19170
|
|
|
19090
19171
|
if (Array.isArray(data.result)) {
|
|
19091
|
-
returnData =
|
|
19172
|
+
returnData = data.result;
|
|
19092
19173
|
}
|
|
19093
19174
|
|
|
19094
19175
|
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
@@ -19109,12 +19190,12 @@ var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/
|
|
|
19109
19190
|
}
|
|
19110
19191
|
}, _callee11, null, [[2, 13]]);
|
|
19111
19192
|
})));
|
|
19112
|
-
var
|
|
19193
|
+
var GET_PRACTITIONER_ROLE = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpractitionerRole", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
19113
19194
|
var payload,
|
|
19114
19195
|
_ref24,
|
|
19115
19196
|
rejectWithValue,
|
|
19116
|
-
_payload$
|
|
19117
|
-
|
|
19197
|
+
_payload$OrgID4,
|
|
19198
|
+
OrgID,
|
|
19118
19199
|
body,
|
|
19119
19200
|
data,
|
|
19120
19201
|
returnData,
|
|
@@ -19127,12 +19208,12 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
|
|
|
19127
19208
|
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
19128
19209
|
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
|
|
19129
19210
|
_context12.prev = 2;
|
|
19130
|
-
_payload$
|
|
19211
|
+
_payload$OrgID4 = payload.OrgID, OrgID = _payload$OrgID4 === void 0 ? "" : _payload$OrgID4;
|
|
19131
19212
|
body = {
|
|
19132
19213
|
db_name: dbName,
|
|
19133
|
-
entity: "
|
|
19134
|
-
filter: queries$b["
|
|
19135
|
-
return_fields: queries$b["
|
|
19214
|
+
entity: "Practitioner,PractitionerRole,CodeableConceptMaster",
|
|
19215
|
+
filter: queries$b["codablemasterPractitionerRole"].query(OrgID),
|
|
19216
|
+
return_fields: queries$b["codablemasterPractitionerRole"].returnFields
|
|
19136
19217
|
};
|
|
19137
19218
|
_context12.next = 7;
|
|
19138
19219
|
return fetchData$3({
|
|
@@ -19165,16 +19246,18 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
|
|
|
19165
19246
|
}
|
|
19166
19247
|
}, _callee12, null, [[2, 13]]);
|
|
19167
19248
|
})));
|
|
19168
|
-
var
|
|
19249
|
+
var GET_SPECIALITY_DATA = createAsyncThunk("OrganizationRegisterPatientApiSlice/getspeciality", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
19169
19250
|
var payload,
|
|
19170
19251
|
_ref26,
|
|
19171
19252
|
rejectWithValue,
|
|
19172
|
-
_payload$
|
|
19173
|
-
|
|
19174
|
-
encounterId,
|
|
19253
|
+
_payload$id,
|
|
19254
|
+
id,
|
|
19175
19255
|
body,
|
|
19176
19256
|
data,
|
|
19177
19257
|
returnData,
|
|
19258
|
+
_data$result$0$specia,
|
|
19259
|
+
_data$result,
|
|
19260
|
+
_data$result$,
|
|
19178
19261
|
_args13 = arguments;
|
|
19179
19262
|
|
|
19180
19263
|
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
@@ -19184,13 +19267,12 @@ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice
|
|
|
19184
19267
|
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
19185
19268
|
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
|
|
19186
19269
|
_context13.prev = 2;
|
|
19187
|
-
_payload$
|
|
19270
|
+
_payload$id = payload.id, id = _payload$id === void 0 ? "" : _payload$id;
|
|
19188
19271
|
body = {
|
|
19189
19272
|
db_name: dbName,
|
|
19190
|
-
entity: "
|
|
19191
|
-
filter: "
|
|
19192
|
-
return_fields: "
|
|
19193
|
-
sort: "Encounter.encounterdate desc"
|
|
19273
|
+
entity: "Organization",
|
|
19274
|
+
filter: "Organization.id==".concat(id, " && Organization.activestatus==true"),
|
|
19275
|
+
return_fields: "{specialty:DOCUMENT(Organization.specialtyDetails[*].specialty)}"
|
|
19194
19276
|
};
|
|
19195
19277
|
_context13.next = 7;
|
|
19196
19278
|
return fetchData$3({
|
|
@@ -19202,7 +19284,7 @@ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice
|
|
|
19202
19284
|
returnData = [];
|
|
19203
19285
|
|
|
19204
19286
|
if (Array.isArray(data.result)) {
|
|
19205
|
-
returnData = data.result;
|
|
19287
|
+
returnData = (_data$result$0$specia = (_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$.specialty) !== null && _data$result$0$specia !== void 0 ? _data$result$0$specia : [];
|
|
19206
19288
|
}
|
|
19207
19289
|
|
|
19208
19290
|
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
@@ -19223,10 +19305,124 @@ var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice
|
|
|
19223
19305
|
}
|
|
19224
19306
|
}, _callee13, null, [[2, 13]]);
|
|
19225
19307
|
})));
|
|
19226
|
-
var
|
|
19308
|
+
var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfinancial", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
19227
19309
|
var payload,
|
|
19228
19310
|
_ref28,
|
|
19229
19311
|
rejectWithValue,
|
|
19312
|
+
_payload$patientId2,
|
|
19313
|
+
patientId,
|
|
19314
|
+
body,
|
|
19315
|
+
data,
|
|
19316
|
+
returnData,
|
|
19317
|
+
_args14 = arguments;
|
|
19318
|
+
|
|
19319
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
19320
|
+
while (1) {
|
|
19321
|
+
switch (_context14.prev = _context14.next) {
|
|
19322
|
+
case 0:
|
|
19323
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
19324
|
+
_ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
19325
|
+
_context14.prev = 2;
|
|
19326
|
+
_payload$patientId2 = payload.patientId, patientId = _payload$patientId2 === void 0 ? "" : _payload$patientId2;
|
|
19327
|
+
body = {
|
|
19328
|
+
db_name: dbName,
|
|
19329
|
+
entity: "Account",
|
|
19330
|
+
filter: queries$b["codablemasterGetFinancial"].query(patientId),
|
|
19331
|
+
return_fields: queries$b["codablemasterGetFinancial"].returnFields
|
|
19332
|
+
};
|
|
19333
|
+
_context14.next = 7;
|
|
19334
|
+
return fetchData$3({
|
|
19335
|
+
body: JSON.stringify(body)
|
|
19336
|
+
}, __readDocumentUrl__);
|
|
19337
|
+
|
|
19338
|
+
case 7:
|
|
19339
|
+
data = _context14.sent;
|
|
19340
|
+
returnData = [];
|
|
19341
|
+
|
|
19342
|
+
if (Array.isArray(data.result)) {
|
|
19343
|
+
returnData = data.result;
|
|
19344
|
+
}
|
|
19345
|
+
|
|
19346
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19347
|
+
data: returnData
|
|
19348
|
+
}));
|
|
19349
|
+
|
|
19350
|
+
case 13:
|
|
19351
|
+
_context14.prev = 13;
|
|
19352
|
+
_context14.t0 = _context14["catch"](2);
|
|
19353
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19354
|
+
message: _context14.t0.message
|
|
19355
|
+
})));
|
|
19356
|
+
|
|
19357
|
+
case 16:
|
|
19358
|
+
case "end":
|
|
19359
|
+
return _context14.stop();
|
|
19360
|
+
}
|
|
19361
|
+
}
|
|
19362
|
+
}, _callee14, null, [[2, 13]]);
|
|
19363
|
+
})));
|
|
19364
|
+
var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
19365
|
+
var payload,
|
|
19366
|
+
_ref30,
|
|
19367
|
+
rejectWithValue,
|
|
19368
|
+
_payload$patientId3,
|
|
19369
|
+
patientId,
|
|
19370
|
+
encounterId,
|
|
19371
|
+
body,
|
|
19372
|
+
data,
|
|
19373
|
+
returnData,
|
|
19374
|
+
_args15 = arguments;
|
|
19375
|
+
|
|
19376
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
19377
|
+
while (1) {
|
|
19378
|
+
switch (_context15.prev = _context15.next) {
|
|
19379
|
+
case 0:
|
|
19380
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
19381
|
+
_ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
|
|
19382
|
+
_context15.prev = 2;
|
|
19383
|
+
_payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
|
|
19384
|
+
body = {
|
|
19385
|
+
db_name: dbName,
|
|
19386
|
+
entity: "Encounter",
|
|
19387
|
+
filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
|
|
19388
|
+
return_fields: "merge({id:adqolcEncounter.id},{_id:adqolcEncounter._id},{_key:adqolcEncounter._key},{encounterdate:adqolcEncounter.encounterdate},{encounter_no:adqolcEncounter.encounter_no},{type:document(adqolcEncounter.type)[*].display},{visit_type:adqolcEncounter.visit_type},{location:(for doc in adqolcEncounter.location for loc in LocationMaster filter loc._id == doc.location_id return document(document(loc.locationType).coding))},{Practitioner_id:(for part in adqolcEncounter.participant for practId in Practitioner filter practId.id == part.Practitioner_id return {name:(for doc in HumanNameMaster filter doc._id in practId.name return merge(doc,{use:(document(document(doc.use).coding)),prefix:(document(document(doc.prefix).coding)),suffix:(document(document(doc.suffix).coding))})),communication:document(practId.communication)[*]} )},{PractitionerRole_id:(for part in adqolcEncounter.participant for practRole in PractitionerRole filter practRole.id == part.PractitionerRole_id return document(document(practRole.role).coding) )})",
|
|
19389
|
+
sort: "Encounter.encounterdate desc"
|
|
19390
|
+
};
|
|
19391
|
+
_context15.next = 7;
|
|
19392
|
+
return fetchData$3({
|
|
19393
|
+
body: JSON.stringify(body)
|
|
19394
|
+
}, __readDocumentUrl__);
|
|
19395
|
+
|
|
19396
|
+
case 7:
|
|
19397
|
+
data = _context15.sent;
|
|
19398
|
+
returnData = [];
|
|
19399
|
+
|
|
19400
|
+
if (Array.isArray(data.result)) {
|
|
19401
|
+
returnData = data.result;
|
|
19402
|
+
}
|
|
19403
|
+
|
|
19404
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19405
|
+
data: returnData
|
|
19406
|
+
}));
|
|
19407
|
+
|
|
19408
|
+
case 13:
|
|
19409
|
+
_context15.prev = 13;
|
|
19410
|
+
_context15.t0 = _context15["catch"](2);
|
|
19411
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19412
|
+
message: _context15.t0.message
|
|
19413
|
+
})));
|
|
19414
|
+
|
|
19415
|
+
case 16:
|
|
19416
|
+
case "end":
|
|
19417
|
+
return _context15.stop();
|
|
19418
|
+
}
|
|
19419
|
+
}
|
|
19420
|
+
}, _callee15, null, [[2, 13]]);
|
|
19421
|
+
})));
|
|
19422
|
+
var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
19423
|
+
var payload,
|
|
19424
|
+
_ref32,
|
|
19425
|
+
rejectWithValue,
|
|
19230
19426
|
_payload$patientid,
|
|
19231
19427
|
patientid,
|
|
19232
19428
|
_payload$reffId,
|
|
@@ -19265,15 +19461,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
19265
19461
|
_returnData15,
|
|
19266
19462
|
_returnData15$,
|
|
19267
19463
|
info,
|
|
19268
|
-
|
|
19464
|
+
_args16 = arguments;
|
|
19269
19465
|
|
|
19270
|
-
return regeneratorRuntime.wrap(function
|
|
19466
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
19271
19467
|
while (1) {
|
|
19272
|
-
switch (
|
|
19468
|
+
switch (_context16.prev = _context16.next) {
|
|
19273
19469
|
case 0:
|
|
19274
|
-
payload =
|
|
19275
|
-
|
|
19276
|
-
|
|
19470
|
+
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
19471
|
+
_ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
19472
|
+
_context16.prev = 2;
|
|
19277
19473
|
_payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
|
|
19278
19474
|
body = {
|
|
19279
19475
|
db_name: dbName,
|
|
@@ -19281,13 +19477,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
19281
19477
|
filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
|
|
19282
19478
|
return_fields: queries$b["codablemasterGetReferral"].returnFields
|
|
19283
19479
|
};
|
|
19284
|
-
|
|
19480
|
+
_context16.next = 7;
|
|
19285
19481
|
return fetchData$3({
|
|
19286
19482
|
body: JSON.stringify(body)
|
|
19287
19483
|
}, __readDocumentUrl__);
|
|
19288
19484
|
|
|
19289
19485
|
case 7:
|
|
19290
|
-
data =
|
|
19486
|
+
data = _context16.sent;
|
|
19291
19487
|
returnData = [];
|
|
19292
19488
|
|
|
19293
19489
|
if (Array.isArray(data.result)) {
|
|
@@ -19320,42 +19516,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
19320
19516
|
returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
|
|
19321
19517
|
}
|
|
19322
19518
|
|
|
19323
|
-
return
|
|
19519
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19324
19520
|
data: returnData
|
|
19325
19521
|
}));
|
|
19326
19522
|
|
|
19327
19523
|
case 13:
|
|
19328
|
-
|
|
19329
|
-
|
|
19330
|
-
return
|
|
19331
|
-
message:
|
|
19524
|
+
_context16.prev = 13;
|
|
19525
|
+
_context16.t0 = _context16["catch"](2);
|
|
19526
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19527
|
+
message: _context16.t0.message
|
|
19332
19528
|
})));
|
|
19333
19529
|
|
|
19334
19530
|
case 16:
|
|
19335
19531
|
case "end":
|
|
19336
|
-
return
|
|
19532
|
+
return _context16.stop();
|
|
19337
19533
|
}
|
|
19338
19534
|
}
|
|
19339
|
-
},
|
|
19535
|
+
}, _callee16, null, [[2, 13]]);
|
|
19340
19536
|
})));
|
|
19341
|
-
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
19537
|
+
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
19342
19538
|
var payload,
|
|
19343
|
-
|
|
19539
|
+
_ref34,
|
|
19344
19540
|
rejectWithValue,
|
|
19345
19541
|
_payload$appointmentI,
|
|
19346
19542
|
appointmentId,
|
|
19347
19543
|
body,
|
|
19348
19544
|
data,
|
|
19349
19545
|
returnData,
|
|
19350
|
-
|
|
19546
|
+
_args17 = arguments;
|
|
19351
19547
|
|
|
19352
|
-
return regeneratorRuntime.wrap(function
|
|
19548
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
19353
19549
|
while (1) {
|
|
19354
|
-
switch (
|
|
19550
|
+
switch (_context17.prev = _context17.next) {
|
|
19355
19551
|
case 0:
|
|
19356
|
-
payload =
|
|
19357
|
-
|
|
19358
|
-
|
|
19552
|
+
payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
19553
|
+
_ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
|
|
19554
|
+
_context17.prev = 2;
|
|
19359
19555
|
_payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
|
|
19360
19556
|
body = {
|
|
19361
19557
|
db_name: dbName,
|
|
@@ -19363,40 +19559,40 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
|
|
|
19363
19559
|
filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
|
|
19364
19560
|
return_fields: queries$b["codablemasterGetAppointment"].returnFields
|
|
19365
19561
|
};
|
|
19366
|
-
|
|
19562
|
+
_context17.next = 7;
|
|
19367
19563
|
return fetchData$3({
|
|
19368
19564
|
body: JSON.stringify(body)
|
|
19369
19565
|
}, __readDocumentUrl__);
|
|
19370
19566
|
|
|
19371
19567
|
case 7:
|
|
19372
|
-
data =
|
|
19568
|
+
data = _context17.sent;
|
|
19373
19569
|
returnData = [];
|
|
19374
19570
|
|
|
19375
19571
|
if (Array.isArray(data.result)) {
|
|
19376
19572
|
returnData = data.result;
|
|
19377
19573
|
}
|
|
19378
19574
|
|
|
19379
|
-
return
|
|
19575
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19380
19576
|
data: returnData
|
|
19381
19577
|
}));
|
|
19382
19578
|
|
|
19383
19579
|
case 13:
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
return
|
|
19387
|
-
message:
|
|
19580
|
+
_context17.prev = 13;
|
|
19581
|
+
_context17.t0 = _context17["catch"](2);
|
|
19582
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19583
|
+
message: _context17.t0.message
|
|
19388
19584
|
})));
|
|
19389
19585
|
|
|
19390
19586
|
case 16:
|
|
19391
19587
|
case "end":
|
|
19392
|
-
return
|
|
19588
|
+
return _context17.stop();
|
|
19393
19589
|
}
|
|
19394
19590
|
}
|
|
19395
|
-
},
|
|
19591
|
+
}, _callee17, null, [[2, 13]]);
|
|
19396
19592
|
})));
|
|
19397
|
-
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
19593
|
+
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
19398
19594
|
var payload,
|
|
19399
|
-
|
|
19595
|
+
_ref36,
|
|
19400
19596
|
rejectWithValue,
|
|
19401
19597
|
_patientName$split,
|
|
19402
19598
|
_patientName$split2,
|
|
@@ -19409,15 +19605,15 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19409
19605
|
body,
|
|
19410
19606
|
data,
|
|
19411
19607
|
returnData,
|
|
19412
|
-
|
|
19608
|
+
_args18 = arguments;
|
|
19413
19609
|
|
|
19414
|
-
return regeneratorRuntime.wrap(function
|
|
19610
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
19415
19611
|
while (1) {
|
|
19416
|
-
switch (
|
|
19612
|
+
switch (_context18.prev = _context18.next) {
|
|
19417
19613
|
case 0:
|
|
19418
|
-
payload =
|
|
19419
|
-
|
|
19420
|
-
|
|
19614
|
+
payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
|
|
19615
|
+
_ref36 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
|
|
19616
|
+
_context18.prev = 2;
|
|
19421
19617
|
_payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
|
|
19422
19618
|
firstName = (_patientName$split = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 1)) !== null && _patientName$split !== void 0 ? _patientName$split : "";
|
|
19423
19619
|
secondName = (_patientName$split2 = patientName === null || patientName === void 0 ? void 0 : patientName.split(" ", 2)) !== null && _patientName$split2 !== void 0 ? _patientName$split2 : "";
|
|
@@ -19433,40 +19629,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
19433
19629
|
}),
|
|
19434
19630
|
return_fields: queries$b["codablemasterGetPatientname"].returnFields
|
|
19435
19631
|
};
|
|
19436
|
-
|
|
19632
|
+
_context18.next = 11;
|
|
19437
19633
|
return fetchData$3({
|
|
19438
19634
|
body: JSON.stringify(body)
|
|
19439
19635
|
}, __readDocumentUrl__);
|
|
19440
19636
|
|
|
19441
19637
|
case 11:
|
|
19442
|
-
data =
|
|
19638
|
+
data = _context18.sent;
|
|
19443
19639
|
returnData = [];
|
|
19444
19640
|
|
|
19445
19641
|
if (Array.isArray(data.result)) {
|
|
19446
19642
|
returnData = data.result;
|
|
19447
19643
|
}
|
|
19448
19644
|
|
|
19449
|
-
return
|
|
19645
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19450
19646
|
data: returnData
|
|
19451
19647
|
}));
|
|
19452
19648
|
|
|
19453
19649
|
case 17:
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
return
|
|
19457
|
-
message:
|
|
19650
|
+
_context18.prev = 17;
|
|
19651
|
+
_context18.t0 = _context18["catch"](2);
|
|
19652
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19653
|
+
message: _context18.t0.message
|
|
19458
19654
|
})));
|
|
19459
19655
|
|
|
19460
19656
|
case 20:
|
|
19461
19657
|
case "end":
|
|
19462
|
-
return
|
|
19658
|
+
return _context18.stop();
|
|
19463
19659
|
}
|
|
19464
19660
|
}
|
|
19465
|
-
},
|
|
19661
|
+
}, _callee18, null, [[2, 17]]);
|
|
19466
19662
|
})));
|
|
19467
|
-
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
19663
|
+
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
|
|
19468
19664
|
var payload,
|
|
19469
|
-
|
|
19665
|
+
_ref38,
|
|
19470
19666
|
rejectWithValue,
|
|
19471
19667
|
_payload$idnumber,
|
|
19472
19668
|
idnumber,
|
|
@@ -19474,84 +19670,84 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
|
|
|
19474
19670
|
idsourcecode,
|
|
19475
19671
|
body,
|
|
19476
19672
|
data,
|
|
19477
|
-
|
|
19673
|
+
_args19 = arguments;
|
|
19478
19674
|
|
|
19479
|
-
return regeneratorRuntime.wrap(function
|
|
19675
|
+
return regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
19480
19676
|
while (1) {
|
|
19481
|
-
switch (
|
|
19677
|
+
switch (_context19.prev = _context19.next) {
|
|
19482
19678
|
case 0:
|
|
19483
|
-
payload =
|
|
19484
|
-
|
|
19485
|
-
|
|
19679
|
+
payload = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
|
|
19680
|
+
_ref38 = _args19.length > 1 ? _args19[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
|
|
19681
|
+
_context19.prev = 2;
|
|
19486
19682
|
_payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
|
|
19487
19683
|
body = {
|
|
19488
19684
|
db_name: dbName,
|
|
19489
19685
|
filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
|
|
19490
19686
|
queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
|
|
19491
19687
|
};
|
|
19492
|
-
|
|
19688
|
+
_context19.next = 7;
|
|
19493
19689
|
return fetchData$3({
|
|
19494
19690
|
body: JSON.stringify(body)
|
|
19495
19691
|
}, __baseUrl__);
|
|
19496
19692
|
|
|
19497
19693
|
case 7:
|
|
19498
|
-
data =
|
|
19499
|
-
return
|
|
19694
|
+
data = _context19.sent;
|
|
19695
|
+
return _context19.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19500
19696
|
data: data
|
|
19501
19697
|
}));
|
|
19502
19698
|
|
|
19503
19699
|
case 11:
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
return
|
|
19507
|
-
message:
|
|
19700
|
+
_context19.prev = 11;
|
|
19701
|
+
_context19.t0 = _context19["catch"](2);
|
|
19702
|
+
return _context19.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19703
|
+
message: _context19.t0.message
|
|
19508
19704
|
})));
|
|
19509
19705
|
|
|
19510
19706
|
case 14:
|
|
19511
19707
|
case "end":
|
|
19512
|
-
return
|
|
19708
|
+
return _context19.stop();
|
|
19513
19709
|
}
|
|
19514
19710
|
}
|
|
19515
|
-
},
|
|
19711
|
+
}, _callee19, null, [[2, 11]]);
|
|
19516
19712
|
})));
|
|
19517
|
-
var GET_ENCOUNTER_STATUS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
19713
|
+
var GET_ENCOUNTER_STATUS = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
|
|
19518
19714
|
var payload,
|
|
19519
|
-
|
|
19715
|
+
_ref40,
|
|
19520
19716
|
rejectWithValue,
|
|
19521
19717
|
data,
|
|
19522
|
-
|
|
19718
|
+
_args20 = arguments;
|
|
19523
19719
|
|
|
19524
|
-
return regeneratorRuntime.wrap(function
|
|
19720
|
+
return regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
19525
19721
|
while (1) {
|
|
19526
|
-
switch (
|
|
19722
|
+
switch (_context20.prev = _context20.next) {
|
|
19527
19723
|
case 0:
|
|
19528
|
-
payload =
|
|
19529
|
-
|
|
19530
|
-
|
|
19531
|
-
|
|
19724
|
+
payload = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
|
|
19725
|
+
_ref40 = _args20.length > 1 ? _args20[1] : undefined, rejectWithValue = _ref40.rejectWithValue;
|
|
19726
|
+
_context20.prev = 2;
|
|
19727
|
+
_context20.next = 5;
|
|
19532
19728
|
return fetchData$3({
|
|
19533
19729
|
body: JSON.stringify(registerQuery.statusRead())
|
|
19534
19730
|
}, __readDocumentUrl__);
|
|
19535
19731
|
|
|
19536
19732
|
case 5:
|
|
19537
|
-
data =
|
|
19538
|
-
return
|
|
19733
|
+
data = _context20.sent;
|
|
19734
|
+
return _context20.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
19539
19735
|
data: data.result
|
|
19540
19736
|
}));
|
|
19541
19737
|
|
|
19542
19738
|
case 9:
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
return
|
|
19546
|
-
message:
|
|
19739
|
+
_context20.prev = 9;
|
|
19740
|
+
_context20.t0 = _context20["catch"](2);
|
|
19741
|
+
return _context20.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
19742
|
+
message: _context20.t0.message
|
|
19547
19743
|
})));
|
|
19548
19744
|
|
|
19549
19745
|
case 12:
|
|
19550
19746
|
case "end":
|
|
19551
|
-
return
|
|
19747
|
+
return _context20.stop();
|
|
19552
19748
|
}
|
|
19553
19749
|
}
|
|
19554
|
-
},
|
|
19750
|
+
}, _callee20, null, [[2, 9]]);
|
|
19555
19751
|
})));
|
|
19556
19752
|
var OrganizationRegisterPatientApiSlice = createSlice({
|
|
19557
19753
|
name: "OrganizationRegisterPatientApiSlice",
|
|
@@ -19573,188 +19769,210 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
19573
19769
|
getpatientname: _objectSpread2({}, defaultState.Info),
|
|
19574
19770
|
getpatientid: _objectSpread2({}, defaultState.Info),
|
|
19575
19771
|
getEncounterHeader: _objectSpread2({}, defaultState.Info),
|
|
19576
|
-
getEncounterStatus: _objectSpread2({}, defaultState.Info)
|
|
19772
|
+
getEncounterStatus: _objectSpread2({}, defaultState.Info),
|
|
19773
|
+
getPractitionerType: _objectSpread2({}, defaultState.Info),
|
|
19774
|
+
getPractitionerName: _objectSpread2({}, defaultState.Info)
|
|
19577
19775
|
},
|
|
19578
|
-
extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q,
|
|
19776
|
+
extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PRACTITIONER_TYPE.fulfilled, function (state, action) {
|
|
19579
19777
|
var _action$payload;
|
|
19580
19778
|
|
|
19581
|
-
state.
|
|
19779
|
+
state.getPractitionerType = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
|
|
19780
|
+
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_TYPE.pending, function (state, action) {
|
|
19781
|
+
state.getPractitionerType.loading = true;
|
|
19782
|
+
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_TYPE.rejected, function (state, action) {
|
|
19783
|
+
var _action$payload2;
|
|
19784
|
+
|
|
19785
|
+
state.getPractitionerType = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
|
|
19786
|
+
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_NAME.fulfilled, function (state, action) {
|
|
19787
|
+
var _action$payload3;
|
|
19788
|
+
|
|
19789
|
+
state.getPractitionerName = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
|
|
19790
|
+
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_NAME.pending, function (state, action) {
|
|
19791
|
+
state.getPractitionerName.loading = true;
|
|
19792
|
+
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_NAME.rejected, function (state, action) {
|
|
19793
|
+
var _action$payload4;
|
|
19794
|
+
|
|
19795
|
+
state.getPractitionerName = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
|
|
19796
|
+
}), _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
|
|
19797
|
+
var _action$payload5;
|
|
19798
|
+
|
|
19799
|
+
state.getpatientname = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
|
|
19582
19800
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_NAME.pending, function (state, action) {
|
|
19583
19801
|
state.getpatientname.loading = true;
|
|
19584
19802
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_NAME.rejected, function (state, action) {
|
|
19585
|
-
var _action$
|
|
19803
|
+
var _action$payload6;
|
|
19586
19804
|
|
|
19587
|
-
state.getpatientname = (_action$
|
|
19805
|
+
state.getpatientname = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
|
|
19588
19806
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_APPOINTMENT.fulfilled, function (state, action) {
|
|
19589
|
-
var _action$
|
|
19807
|
+
var _action$payload7;
|
|
19590
19808
|
|
|
19591
|
-
state.getappointment = (_action$
|
|
19809
|
+
state.getappointment = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
|
|
19592
19810
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_APPOINTMENT.pending, function (state, action) {
|
|
19593
19811
|
state.getappointment.loading = true;
|
|
19594
19812
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_APPOINTMENT.rejected, function (state, action) {
|
|
19595
|
-
var _action$
|
|
19813
|
+
var _action$payload8;
|
|
19596
19814
|
|
|
19597
|
-
state.getappointment = (_action$
|
|
19815
|
+
state.getappointment = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
|
|
19598
19816
|
}), _defineProperty(_extraReducers$q, GET_FERERRAL.fulfilled, function (state, action) {
|
|
19599
|
-
var _action$
|
|
19817
|
+
var _action$payload9;
|
|
19600
19818
|
|
|
19601
|
-
state.getreferral = (_action$
|
|
19819
|
+
state.getreferral = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
|
|
19602
19820
|
}), _defineProperty(_extraReducers$q, GET_FERERRAL.pending, function (state, action) {
|
|
19603
19821
|
state.getreferral.loading = true;
|
|
19604
19822
|
}), _defineProperty(_extraReducers$q, GET_FERERRAL.rejected, function (state, action) {
|
|
19605
|
-
var _action$
|
|
19823
|
+
var _action$payload10;
|
|
19606
19824
|
|
|
19607
|
-
state.getreferral = (_action$
|
|
19825
|
+
state.getreferral = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
|
|
19608
19826
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REGISTER_PATIENT.fulfilled, function (state, action) {
|
|
19609
|
-
var _action$
|
|
19827
|
+
var _action$payload11;
|
|
19610
19828
|
|
|
19611
|
-
state.oraganizationRegisterPatient = (_action$
|
|
19829
|
+
state.oraganizationRegisterPatient = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
|
|
19612
19830
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REGISTER_PATIENT.pending, function (state, action) {
|
|
19613
19831
|
state.oraganizationRegisterPatient.loading = true;
|
|
19614
19832
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REGISTER_PATIENT.rejected, function (state, action) {
|
|
19615
|
-
var _action$
|
|
19833
|
+
var _action$payload12;
|
|
19616
19834
|
|
|
19617
|
-
state.oraganizationRegisterPatient = (_action$
|
|
19835
|
+
state.oraganizationRegisterPatient = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
|
|
19618
19836
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_VISIT_REGISTRATION.fulfilled, function (state, action) {
|
|
19619
|
-
var _action$
|
|
19837
|
+
var _action$payload13;
|
|
19620
19838
|
|
|
19621
|
-
state.oraganizationvisitRegister = (_action$
|
|
19839
|
+
state.oraganizationvisitRegister = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
|
|
19622
19840
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_VISIT_REGISTRATION.pending, function (state, action) {
|
|
19623
19841
|
state.oraganizationvisitRegister.loading = true;
|
|
19624
19842
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_VISIT_REGISTRATION.rejected, function (state, action) {
|
|
19625
|
-
var _action$
|
|
19843
|
+
var _action$payload14;
|
|
19626
19844
|
|
|
19627
|
-
state.oraganizationvisitRegister = (_action$
|
|
19845
|
+
state.oraganizationvisitRegister = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
|
|
19628
19846
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REFERRAL_REGISTRATION.fulfilled, function (state, action) {
|
|
19629
|
-
var _action$
|
|
19847
|
+
var _action$payload15;
|
|
19630
19848
|
|
|
19631
|
-
state.oraganizationreferralRegister = (_action$
|
|
19849
|
+
state.oraganizationreferralRegister = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
|
|
19632
19850
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REFERRAL_REGISTRATION.pending, function (state, action) {
|
|
19633
19851
|
state.oraganizationreferralRegister.loading = true;
|
|
19634
19852
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_REFERRAL_REGISTRATION.rejected, function (state, action) {
|
|
19635
|
-
var _action$
|
|
19853
|
+
var _action$payload16;
|
|
19636
19854
|
|
|
19637
|
-
state.oraganizationreferralRegister = (_action$
|
|
19855
|
+
state.oraganizationreferralRegister = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
|
|
19638
19856
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FILTER_BY_PATIENT.fulfilled, function (state, action) {
|
|
19639
|
-
var _action$
|
|
19857
|
+
var _action$payload17;
|
|
19640
19858
|
|
|
19641
|
-
state.oraganizationfilterbypatient = (_action$
|
|
19859
|
+
state.oraganizationfilterbypatient = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
|
|
19642
19860
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FILTER_BY_PATIENT.pending, function (state, action) {
|
|
19643
19861
|
state.oraganizationfilterbypatient.loading = true;
|
|
19644
19862
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FILTER_BY_PATIENT.rejected, function (state, action) {
|
|
19645
|
-
var _action$
|
|
19863
|
+
var _action$payload18;
|
|
19646
19864
|
|
|
19647
|
-
state.oraganizationfilterbypatient = (_action$
|
|
19865
|
+
state.oraganizationfilterbypatient = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
|
|
19648
19866
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FINANCIAL_REGISTRATION.fulfilled, function (state, action) {
|
|
19649
|
-
var _action$
|
|
19867
|
+
var _action$payload19;
|
|
19650
19868
|
|
|
19651
|
-
state.oraganizationfinancialregister = (_action$
|
|
19869
|
+
state.oraganizationfinancialregister = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
|
|
19652
19870
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FINANCIAL_REGISTRATION.pending, function (state, action) {
|
|
19653
19871
|
state.oraganizationfinancialregister.loading = true;
|
|
19654
19872
|
}), _defineProperty(_extraReducers$q, ORGANIZATION_FINANCIAL_REGISTRATION.rejected, function (state, action) {
|
|
19655
|
-
var _action$
|
|
19873
|
+
var _action$payload20;
|
|
19656
19874
|
|
|
19657
|
-
state.oraganizationfinancialregister = (_action$
|
|
19875
|
+
state.oraganizationfinancialregister = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
|
|
19658
19876
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_TYPE.fulfilled, function (state, action) {
|
|
19659
|
-
var _action$
|
|
19877
|
+
var _action$payload21;
|
|
19660
19878
|
|
|
19661
|
-
state.specilitytype = (_action$
|
|
19879
|
+
state.specilitytype = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
|
|
19662
19880
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_TYPE.pending, function (state, action) {
|
|
19663
19881
|
state.specilitytype.loading = true;
|
|
19664
19882
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_TYPE.rejected, function (state, action) {
|
|
19665
|
-
var _action$
|
|
19883
|
+
var _action$payload22;
|
|
19666
19884
|
|
|
19667
|
-
state.specilitytype = (_action$
|
|
19885
|
+
state.specilitytype = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
|
|
19668
19886
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_NAME.fulfilled, function (state, action) {
|
|
19669
|
-
var _action$
|
|
19887
|
+
var _action$payload23;
|
|
19670
19888
|
|
|
19671
|
-
state.specilityname = (_action$
|
|
19889
|
+
state.specilityname = (_action$payload23 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload23 !== void 0 ? _action$payload23 : {};
|
|
19672
19890
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_NAME.pending, function (state, action) {
|
|
19673
19891
|
state.specilityname.loading = true;
|
|
19674
19892
|
}), _defineProperty(_extraReducers$q, GET_FACILITY_NAME.rejected, function (state, action) {
|
|
19675
|
-
var _action$
|
|
19893
|
+
var _action$payload24;
|
|
19676
19894
|
|
|
19677
|
-
state.specilityname = (_action$
|
|
19895
|
+
state.specilityname = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : {};
|
|
19678
19896
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER.fulfilled, function (state, action) {
|
|
19679
|
-
var _action$
|
|
19897
|
+
var _action$payload25;
|
|
19680
19898
|
|
|
19681
|
-
state.practitioner = (_action$
|
|
19899
|
+
state.practitioner = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : {};
|
|
19682
19900
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER.pending, function (state, action) {
|
|
19683
19901
|
state.practitioner.loading = true;
|
|
19684
19902
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER.rejected, function (state, action) {
|
|
19685
|
-
var _action$
|
|
19903
|
+
var _action$payload26;
|
|
19686
19904
|
|
|
19687
|
-
state.practitioner = (_action$
|
|
19905
|
+
state.practitioner = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : {};
|
|
19688
19906
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONERS.fulfilled, function (state, action) {
|
|
19689
|
-
var _action$
|
|
19907
|
+
var _action$payload27;
|
|
19690
19908
|
|
|
19691
|
-
state.practitioners = (_action$
|
|
19909
|
+
state.practitioners = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : {};
|
|
19692
19910
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONERS.pending, function (state, action) {
|
|
19693
19911
|
state.practitioners.loading = true;
|
|
19694
19912
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONERS.rejected, function (state, action) {
|
|
19695
|
-
var _action$
|
|
19913
|
+
var _action$payload28;
|
|
19696
19914
|
|
|
19697
|
-
state.practitioners = (_action$
|
|
19915
|
+
state.practitioners = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : {};
|
|
19698
19916
|
}), _defineProperty(_extraReducers$q, GET_SPECIALITY_DATA.fulfilled, function (state, action) {
|
|
19699
|
-
var _action$
|
|
19917
|
+
var _action$payload29;
|
|
19700
19918
|
|
|
19701
|
-
state.speciality = (_action$
|
|
19919
|
+
state.speciality = (_action$payload29 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload29 !== void 0 ? _action$payload29 : {};
|
|
19702
19920
|
}), _defineProperty(_extraReducers$q, GET_SPECIALITY_DATA.pending, function (state, action) {
|
|
19703
19921
|
state.speciality.loading = true;
|
|
19704
19922
|
}), _defineProperty(_extraReducers$q, GET_SPECIALITY_DATA.rejected, function (state, action) {
|
|
19705
|
-
var _action$
|
|
19923
|
+
var _action$payload30;
|
|
19706
19924
|
|
|
19707
|
-
state.speciality = (_action$
|
|
19925
|
+
state.speciality = (_action$payload30 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload30 !== void 0 ? _action$payload30 : {};
|
|
19708
19926
|
}), _defineProperty(_extraReducers$q, GET_FINANCIAL.fulfilled, function (state, action) {
|
|
19709
|
-
var _action$
|
|
19927
|
+
var _action$payload31;
|
|
19710
19928
|
|
|
19711
|
-
state.getfinancial = (_action$
|
|
19929
|
+
state.getfinancial = (_action$payload31 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload31 !== void 0 ? _action$payload31 : {};
|
|
19712
19930
|
}), _defineProperty(_extraReducers$q, GET_FINANCIAL.pending, function (state, action) {
|
|
19713
19931
|
state.getfinancial.loading = true;
|
|
19714
19932
|
}), _defineProperty(_extraReducers$q, GET_FINANCIAL.rejected, function (state, action) {
|
|
19715
|
-
var _action$
|
|
19933
|
+
var _action$payload32;
|
|
19716
19934
|
|
|
19717
|
-
state.getfinancial = (_action$
|
|
19935
|
+
state.getfinancial = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
|
|
19718
19936
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_ROLE.fulfilled, function (state, action) {
|
|
19719
|
-
var _action$
|
|
19937
|
+
var _action$payload33;
|
|
19720
19938
|
|
|
19721
|
-
state.getpractitionerrole = (_action$
|
|
19939
|
+
state.getpractitionerrole = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
|
|
19722
19940
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_ROLE.pending, function (state, action) {
|
|
19723
19941
|
state.getpractitionerrole.loading = true;
|
|
19724
19942
|
}), _defineProperty(_extraReducers$q, GET_PRACTITIONER_ROLE.rejected, function (state, action) {
|
|
19725
|
-
var _action$
|
|
19943
|
+
var _action$payload34;
|
|
19726
19944
|
|
|
19727
|
-
state.getpractitionerrole = (_action$
|
|
19945
|
+
state.getpractitionerrole = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
|
|
19728
19946
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_TYPEID.fulfilled, function (state, action) {
|
|
19729
|
-
var _action$
|
|
19947
|
+
var _action$payload35;
|
|
19730
19948
|
|
|
19731
|
-
state.getpatientid = (_action$
|
|
19949
|
+
state.getpatientid = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : {};
|
|
19732
19950
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_TYPEID.pending, function (state, action) {
|
|
19733
19951
|
state.getpatientid.loading = true;
|
|
19734
19952
|
}), _defineProperty(_extraReducers$q, GET_PATIENT_TYPEID.rejected, function (state, action) {
|
|
19735
|
-
var _action$
|
|
19953
|
+
var _action$payload36;
|
|
19736
19954
|
|
|
19737
|
-
state.getpatientid = (_action$
|
|
19955
|
+
state.getpatientid = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : {};
|
|
19738
19956
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.fulfilled, function (state, action) {
|
|
19739
|
-
var _action$
|
|
19957
|
+
var _action$payload37;
|
|
19740
19958
|
|
|
19741
|
-
state.getEncounterHeader = (_action$
|
|
19959
|
+
state.getEncounterHeader = (_action$payload37 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload37 !== void 0 ? _action$payload37 : {};
|
|
19742
19960
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.pending, function (state, action) {
|
|
19743
19961
|
state.getEncounterHeader.loading = true;
|
|
19744
19962
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.rejected, function (state, action) {
|
|
19745
|
-
var _action$
|
|
19963
|
+
var _action$payload38;
|
|
19746
19964
|
|
|
19747
|
-
state.getEncounterHeader = (_action$
|
|
19965
|
+
state.getEncounterHeader = (_action$payload38 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload38 !== void 0 ? _action$payload38 : {};
|
|
19748
19966
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.fulfilled, function (state, action) {
|
|
19749
|
-
var _action$
|
|
19967
|
+
var _action$payload39;
|
|
19750
19968
|
|
|
19751
|
-
state.getEncounterStatus = (_action$
|
|
19969
|
+
state.getEncounterStatus = (_action$payload39 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload39 !== void 0 ? _action$payload39 : {};
|
|
19752
19970
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.pending, function (state, action) {
|
|
19753
19971
|
state.getEncounterStatus.loading = true;
|
|
19754
19972
|
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_STATUS.rejected, function (state, action) {
|
|
19755
|
-
var _action$
|
|
19973
|
+
var _action$payload40;
|
|
19756
19974
|
|
|
19757
|
-
state.getEncounterStatus = (_action$
|
|
19975
|
+
state.getEncounterStatus = (_action$payload40 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload40 !== void 0 ? _action$payload40 : {};
|
|
19758
19976
|
}), _extraReducers$q)
|
|
19759
19977
|
});
|
|
19760
19978
|
var oraganizationRegisterPatientActions = {
|
|
@@ -19775,7 +19993,9 @@ var oraganizationRegisterPatientActions = {
|
|
|
19775
19993
|
GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
|
|
19776
19994
|
GET_PRACTITIONERS: GET_PRACTITIONERS,
|
|
19777
19995
|
GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER,
|
|
19778
|
-
GET_ENCOUNTER_STATUS: GET_ENCOUNTER_STATUS
|
|
19996
|
+
GET_ENCOUNTER_STATUS: GET_ENCOUNTER_STATUS,
|
|
19997
|
+
GET_PRACTITIONER_TYPE: GET_PRACTITIONER_TYPE,
|
|
19998
|
+
GET_PRACTITIONER_NAME: GET_PRACTITIONER_NAME
|
|
19779
19999
|
};
|
|
19780
20000
|
var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
|
|
19781
20001
|
|
|
@@ -20225,7 +20445,7 @@ var dashboardQuery = {
|
|
|
20225
20445
|
}
|
|
20226
20446
|
}];
|
|
20227
20447
|
},
|
|
20228
|
-
closeConsultationUpdate: function closeConsultationUpdate(data, status) {
|
|
20448
|
+
closeConsultationUpdate: function closeConsultationUpdate(data, status, statushistory_) {
|
|
20229
20449
|
return [{
|
|
20230
20450
|
db_name: dbName,
|
|
20231
20451
|
entity: "Encounter",
|
|
@@ -20242,11 +20462,7 @@ var dashboardQuery = {
|
|
|
20242
20462
|
followupReqd: data === null || data === void 0 ? void 0 : data.followupReqd,
|
|
20243
20463
|
encounterenddate: (data === null || data === void 0 ? void 0 : data.encounterenddate) ? getUtcTime(data === null || data === void 0 ? void 0 : data.encounterenddate) : null,
|
|
20244
20464
|
status: status,
|
|
20245
|
-
statushistory:
|
|
20246
|
-
status: status,
|
|
20247
|
-
period: data === null || data === void 0 ? void 0 : data.period,
|
|
20248
|
-
reasoncode: ""
|
|
20249
|
-
}] //referralOutRequired: data?.referralOutRequired,
|
|
20465
|
+
statushistory: statushistory_ //referralOutRequired: data?.referralOutRequired,
|
|
20250
20466
|
|
|
20251
20467
|
}
|
|
20252
20468
|
}];
|
|
@@ -21719,7 +21935,7 @@ var generateReadJSON_Reassign = function generateReadJSON_Reassign(data) {
|
|
|
21719
21935
|
};
|
|
21720
21936
|
|
|
21721
21937
|
var generateReadJSON_colseConsultation = function generateReadJSON_colseConsultation(data) {
|
|
21722
|
-
var _data$visit_type, _data$reasonReference, _data$reasonReference2, _data$appointmentId, _data$appointmentId2, _data$appointmentId$c, _data$appointmentId3, _data$appointmentId4, _data$appointmentId4$, _data$appointmentId5, _data$appointmentId6, _data$appointmentId6$, _data$patient_id$0$ph, _data$patient_id, _data$patient_id$, _data$patient_id$$pho, _data$patient_id2, _data$patient_id2$0$n, _data$patient_id$0$ag, _data$patient_id3, _data$patient_id3$, _data$patient_id4, _data$patient_id4$, _data$patient_id4$$ge, _data$patient_id4$$ge2, _data$patient_id5, _data$patient_id5$, _data$patient_id5$$ge, _data$patient_id5$$ge2, _data$patient_id6, _data$patient_id6$, _data$patient_id6$$ge, _data$patient_id6$$ge2, _data$patient_id$0$al, _data$patient_id7, _data$patient_id7$, _data$patient_id$0$te, _data$patient_id8, _data$patient_id8$, _data$patient_id8$$te, _data$patient_id8$$te2, _data$practitioner_de, _data$practitioner_de2, _data$practitioner_de3, _data$practitioner_de4, _data$practitioner_de5, _data$practitioner_de6, _data$practitioner_de7, _data$practitioner_de8, _data$practitioner_de9, _data$practitioner_de10, _data$practitioner_de11, _data$practitioner_de12, _data$practitioner_de13, _data$practitioner_de14, _data$patient_id9, _data$patient_id9$, _data$appointmentId7;
|
|
21938
|
+
var _data$visit_type, _data$reasonReference, _data$reasonReference2, _data$appointmentId, _data$appointmentId2, _data$appointmentId$c, _data$appointmentId3, _data$appointmentId4, _data$appointmentId4$, _data$appointmentId5, _data$appointmentId6, _data$appointmentId6$, _data$patient_id$0$ph, _data$patient_id, _data$patient_id$, _data$patient_id$$pho, _data$patient_id2, _data$patient_id2$0$n, _data$patient_id$0$ag, _data$patient_id3, _data$patient_id3$, _data$patient_id4, _data$patient_id4$, _data$patient_id4$$ge, _data$patient_id4$$ge2, _data$patient_id5, _data$patient_id5$, _data$patient_id5$$ge, _data$patient_id5$$ge2, _data$patient_id6, _data$patient_id6$, _data$patient_id6$$ge, _data$patient_id6$$ge2, _data$patient_id$0$al, _data$patient_id7, _data$patient_id7$, _data$patient_id$0$te, _data$patient_id8, _data$patient_id8$, _data$patient_id8$$te, _data$patient_id8$$te2, _data$practitioner_de, _data$practitioner_de2, _data$practitioner_de3, _data$practitioner_de4, _data$practitioner_de5, _data$practitioner_de6, _data$practitioner_de7, _data$practitioner_de8, _data$practitioner_de9, _data$practitioner_de10, _data$practitioner_de11, _data$practitioner_de12, _data$practitioner_de13, _data$practitioner_de14, _data$patient_id9, _data$patient_id9$, _data$appointmentId7, _data$statushistory;
|
|
21723
21939
|
|
|
21724
21940
|
var json = {
|
|
21725
21941
|
visitType: (_data$visit_type = data === null || data === void 0 ? void 0 : data.visit_type) !== null && _data$visit_type !== void 0 ? _data$visit_type : "",
|
|
@@ -21748,11 +21964,31 @@ var generateReadJSON_colseConsultation = function generateReadJSON_colseConsulta
|
|
|
21748
21964
|
patientId: data === null || data === void 0 ? void 0 : (_data$patient_id9 = data.patient_id) === null || _data$patient_id9 === void 0 ? void 0 : (_data$patient_id9$ = _data$patient_id9[0]) === null || _data$patient_id9$ === void 0 ? void 0 : _data$patient_id9$._id,
|
|
21749
21965
|
appointmentId: data === null || data === void 0 ? void 0 : (_data$appointmentId7 = data.appointmentId) === null || _data$appointmentId7 === void 0 ? void 0 : _data$appointmentId7.id,
|
|
21750
21966
|
followupReqd: (data === null || data === void 0 ? void 0 : data.followupReqd) ? data === null || data === void 0 ? void 0 : data.followupReqd : false,
|
|
21751
|
-
encounterCloseTime: data === null || data === void 0 ? void 0 : data.statushistoryExp
|
|
21967
|
+
encounterCloseTime: data === null || data === void 0 ? void 0 : data.statushistoryExp,
|
|
21968
|
+
statushistory: constructStatusHis((_data$statushistory = data === null || data === void 0 ? void 0 : data.statushistory) !== null && _data$statushistory !== void 0 ? _data$statushistory : [])
|
|
21752
21969
|
};
|
|
21753
21970
|
return json;
|
|
21754
21971
|
};
|
|
21755
21972
|
|
|
21973
|
+
var constructStatusHis = function constructStatusHis(data) {
|
|
21974
|
+
var arr = [];
|
|
21975
|
+
|
|
21976
|
+
if (Array.isArray(data) && data.length > 0) {
|
|
21977
|
+
data.map(function (val) {
|
|
21978
|
+
var _val$period, _val$period$;
|
|
21979
|
+
|
|
21980
|
+
arr.push({
|
|
21981
|
+
period: [{
|
|
21982
|
+
"key": val === null || val === void 0 ? void 0 : (_val$period = val.period) === null || _val$period === void 0 ? void 0 : (_val$period$ = _val$period[0]) === null || _val$period$ === void 0 ? void 0 : _val$period$._key
|
|
21983
|
+
}],
|
|
21984
|
+
status: val === null || val === void 0 ? void 0 : val.status
|
|
21985
|
+
});
|
|
21986
|
+
});
|
|
21987
|
+
}
|
|
21988
|
+
|
|
21989
|
+
return arr;
|
|
21990
|
+
};
|
|
21991
|
+
|
|
21756
21992
|
var constructCloseConsultationParticipantHistory = function constructCloseConsultationParticipantHistory(data) {
|
|
21757
21993
|
var arr = [];
|
|
21758
21994
|
|
|
@@ -22041,7 +22277,19 @@ var REASSIGN_PRACTITIONER_UPDATE = createAsyncThunk("dashboardApiSlice/reassignP
|
|
|
22041
22277
|
}
|
|
22042
22278
|
}
|
|
22043
22279
|
}, _callee27, null, [[2, 10]]);
|
|
22044
|
-
})));
|
|
22280
|
+
})));
|
|
22281
|
+
|
|
22282
|
+
var constructStatusHistory = function constructStatusHistory(data, status) {
|
|
22283
|
+
var statushistory_ = Array.isArray(data === null || data === void 0 ? void 0 : data.statushistory) ? JSON.parse(JSON.stringify(data === null || data === void 0 ? void 0 : data.statushistory)) : [];
|
|
22284
|
+
var obj = {
|
|
22285
|
+
status: status,
|
|
22286
|
+
period: data === null || data === void 0 ? void 0 : data.period_,
|
|
22287
|
+
reasoncode: ""
|
|
22288
|
+
};
|
|
22289
|
+
statushistory_.push(obj);
|
|
22290
|
+
return statushistory_;
|
|
22291
|
+
}; //CLOSE_CONSULTATION_UPDATE
|
|
22292
|
+
|
|
22045
22293
|
|
|
22046
22294
|
var CLOSE_CONSULTATION_UPDATE = createAsyncThunk("dashboardApiSlice/closeConsultationUpdate", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee28() {
|
|
22047
22295
|
var payload,
|
|
@@ -22053,6 +22301,7 @@ var CLOSE_CONSULTATION_UPDATE = createAsyncThunk("dashboardApiSlice/closeConsult
|
|
|
22053
22301
|
data,
|
|
22054
22302
|
encounterCode,
|
|
22055
22303
|
encounterStatus,
|
|
22304
|
+
statusHistor,
|
|
22056
22305
|
data_,
|
|
22057
22306
|
_args28 = arguments;
|
|
22058
22307
|
|
|
@@ -22077,31 +22326,32 @@ var CLOSE_CONSULTATION_UPDATE = createAsyncThunk("dashboardApiSlice/closeConsult
|
|
|
22077
22326
|
case 6:
|
|
22078
22327
|
encounterCode = _context28.sent;
|
|
22079
22328
|
encounterStatus = (_encounterCode$result = encounterCode === null || encounterCode === void 0 ? void 0 : (_encounterCode$result2 = encounterCode.result) === null || _encounterCode$result2 === void 0 ? void 0 : (_encounterCode$result3 = _encounterCode$result2[0]) === null || _encounterCode$result3 === void 0 ? void 0 : _encounterCode$result3._id) !== null && _encounterCode$result !== void 0 ? _encounterCode$result : "";
|
|
22080
|
-
|
|
22329
|
+
statusHistor = constructStatusHistory(data, encounterStatus);
|
|
22330
|
+
_context28.next = 11;
|
|
22081
22331
|
return fetchData$3({
|
|
22082
|
-
body: JSON.stringify(dashboardQuery.closeConsultationUpdate(data, encounterStatus))
|
|
22332
|
+
body: JSON.stringify(dashboardQuery.closeConsultationUpdate(data, encounterStatus, statusHistor))
|
|
22083
22333
|
}, __uspsertUrl__);
|
|
22084
22334
|
|
|
22085
|
-
case
|
|
22335
|
+
case 11:
|
|
22086
22336
|
data_ = _context28.sent;
|
|
22087
22337
|
return _context28.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
22088
22338
|
data: data_
|
|
22089
22339
|
}));
|
|
22090
22340
|
|
|
22091
|
-
case
|
|
22092
|
-
_context28.prev =
|
|
22341
|
+
case 15:
|
|
22342
|
+
_context28.prev = 15;
|
|
22093
22343
|
_context28.t0 = _context28["catch"](2);
|
|
22094
22344
|
alert("error");
|
|
22095
22345
|
return _context28.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
22096
22346
|
message: _context28.t0.message
|
|
22097
22347
|
})));
|
|
22098
22348
|
|
|
22099
|
-
case
|
|
22349
|
+
case 19:
|
|
22100
22350
|
case "end":
|
|
22101
22351
|
return _context28.stop();
|
|
22102
22352
|
}
|
|
22103
22353
|
}
|
|
22104
|
-
}, _callee28, null, [[2,
|
|
22354
|
+
}, _callee28, null, [[2, 15]]);
|
|
22105
22355
|
})));
|
|
22106
22356
|
var dashboardApiSlice = createSlice({
|
|
22107
22357
|
name: "dashboardApiSlice",
|
|
@@ -31698,7 +31948,7 @@ var queries$5 = {
|
|
|
31698
31948
|
return "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"Organization\",\n \"filter\": \"Organization.id == ").concat(id, "\",\n \"return_fields\": \"Organization._id\"\n }");
|
|
31699
31949
|
},
|
|
31700
31950
|
strength: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"RoutedDoseFormStrGen_Drug_Master\",\n \"return_fields\": \"RoutedDoseFormStrGen_Drug_Master\"\n }"),
|
|
31701
|
-
strengthUom: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugUOM\",\n \"filter\":\"DrugUOM.IsDosageStrengthUOM==true\",\n \"return_fields\": \"DrugUOM\"\n }"),
|
|
31951
|
+
strengthUom: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugUOM\",\n \"filter\":\"DrugUOM.IsDosageStrengthUOM==true && DrugUOM.status==true\",\n \"return_fields\": \"DrugUOM\"\n }"),
|
|
31702
31952
|
strengthVolumn: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"RoutedDoseFormStrGen_Drug_Master\",\n \"return_fields\": \"RoutedDoseFormStrGen_Drug_Master\"\n }"),
|
|
31703
31953
|
strengthVolumnUom: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugUOM\",\n \"filter\":\"DrugUOM.IsDosageStrengthUOM==true\",\n \"return_fields\": \"DrugUOM\"\n }"),
|
|
31704
31954
|
DosageTypeIndicator: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='DOSAGETYPEINDICATOR'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|