primarycare-binder 1.1.108 → 1.1.111
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 +70 -20
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8180,7 +8180,8 @@ var queries$b = {
|
|
|
8180
8180
|
thirdName = _ref2.thirdName;
|
|
8181
8181
|
return "(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");
|
|
8182
8182
|
},
|
|
8183
|
-
returnFields: "{prefix: DOCUMENT(Person.name)[*].prefix,gender: Person.gender,birthDate: Person.birthDay,suffix: DOCUMENT(Person.name)[*].suffix, nameObj: DOCUMENT(Person.name)[*], 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)}"
|
|
8183
|
+
returnFields: // "{prefix: DOCUMENT(Person.name)[*].prefix,gender: Person.gender,birthDate: Person.birthDay,suffix: DOCUMENT(Person.name)[*].suffix, nameObj: DOCUMENT(Person.name)[*], 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)}",
|
|
8184
|
+
"{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)}"
|
|
8184
8185
|
},
|
|
8185
8186
|
specialityAgainstPractitioner: {
|
|
8186
8187
|
query: function query() {
|
|
@@ -11847,13 +11848,35 @@ var ALL_APPOINTMENTS = createAsyncThunk("appointmentReducer/allAppointments", /*
|
|
|
11847
11848
|
followUpAppointment: [],
|
|
11848
11849
|
currentVisist: []
|
|
11849
11850
|
};
|
|
11851
|
+
console.clear();
|
|
11850
11852
|
(_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$past_appointm = _data$2.past_appointment) === null || _data$2$past_appointm === void 0 ? void 0 : (_data$2$past_appointm2 = _data$2$past_appointm.forEach) === null || _data$2$past_appointm2 === void 0 ? void 0 : _data$2$past_appointm2.call(_data$2$past_appointm, function (v) {
|
|
11851
11853
|
if (assemble && moment$1(utcTOLocal$1(v === null || v === void 0 ? void 0 : v.start) * 1000).startOf("day").diff(moment$1().startOf("day"), "days") === 0 && (v.comment === "completed_assemble" || v.comment === "onhold_nurse" || v.comment === "completed_nurse" || v.comment === "onhold_doctor")) {
|
|
11852
11854
|
returnData.currentVisist.push(v);
|
|
11853
11855
|
} else {
|
|
11854
|
-
|
|
11856
|
+
console.log(utcTOLocal$1(v.start));
|
|
11857
|
+
var type_ = timeLine_(v.start);
|
|
11858
|
+
console.log("type_", type_); //debugger
|
|
11855
11859
|
|
|
11856
|
-
if (type_ === "
|
|
11860
|
+
if (type_ === "TODAY" && v.appstatus === "cancelled") {
|
|
11861
|
+
returnData.pastAppointmentThisWeek.push(v);
|
|
11862
|
+
returnData.pastAppointment.push(v);
|
|
11863
|
+
} else if (type_ === "THIS_WEEK" && v.appstatus === "cancelled") {
|
|
11864
|
+
returnData.pastAppointmentThisWeek.push(v);
|
|
11865
|
+
returnData.pastAppointment.push(v);
|
|
11866
|
+
} else if (type_ === "LAST_WEEK" && v.appstatus === "cancelled") {
|
|
11867
|
+
returnData.pastAppointmentLastWeek.push(v);
|
|
11868
|
+
returnData.pastAppointment.push(v);
|
|
11869
|
+
} else if (type_ === "THIS_MONTH" && v.appstatus === "cancelled") {
|
|
11870
|
+
returnData.pastAppointmentThisMonth.push(v);
|
|
11871
|
+
returnData.pastAppointment.push(v);
|
|
11872
|
+
} else if (type_ === "LAST_MONTH" && v.appstatus === "cancelled") {
|
|
11873
|
+
returnData.pastAppointmentLastMonth.push(v);
|
|
11874
|
+
returnData.pastAppointment.push(v);
|
|
11875
|
+
} else if (type_ === "TODAY") {
|
|
11876
|
+
returnData.currentVisist.push(v);
|
|
11877
|
+
} else if (type_ === "NEXT_WEEK") {
|
|
11878
|
+
returnData.currentVisist.push(v); // returnData.pastAppointment.push(v);
|
|
11879
|
+
} else if (type_ === "THIS_WEEK") {
|
|
11857
11880
|
returnData.pastAppointmentThisWeek.push(v);
|
|
11858
11881
|
returnData.pastAppointment.push(v);
|
|
11859
11882
|
} else if (type_ === "LAST_WEEK") {
|
|
@@ -11900,19 +11923,19 @@ var ALL_APPOINTMENTS = createAsyncThunk("appointmentReducer/allAppointments", /*
|
|
|
11900
11923
|
data: returnData
|
|
11901
11924
|
}));
|
|
11902
11925
|
|
|
11903
|
-
case
|
|
11904
|
-
_context6.prev =
|
|
11926
|
+
case 15:
|
|
11927
|
+
_context6.prev = 15;
|
|
11905
11928
|
_context6.t0 = _context6["catch"](2);
|
|
11906
11929
|
return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
11907
11930
|
message: _context6.t0.message
|
|
11908
11931
|
})));
|
|
11909
11932
|
|
|
11910
|
-
case
|
|
11933
|
+
case 18:
|
|
11911
11934
|
case "end":
|
|
11912
11935
|
return _context6.stop();
|
|
11913
11936
|
}
|
|
11914
11937
|
}
|
|
11915
|
-
}, _callee6, null, [[2,
|
|
11938
|
+
}, _callee6, null, [[2, 15]]);
|
|
11916
11939
|
}))); // end
|
|
11917
11940
|
// GET__FOLLOW_UP_APPOINTMENT
|
|
11918
11941
|
|
|
@@ -18449,6 +18472,7 @@ var ORGANIZATION_VISIT_REGISTRATION = createAsyncThunk("OrganizationRegisterPati
|
|
|
18449
18472
|
rejectWithValue,
|
|
18450
18473
|
payloaddata,
|
|
18451
18474
|
enId,
|
|
18475
|
+
encounterId,
|
|
18452
18476
|
body,
|
|
18453
18477
|
data,
|
|
18454
18478
|
_args2 = arguments;
|
|
@@ -18461,7 +18485,7 @@ var ORGANIZATION_VISIT_REGISTRATION = createAsyncThunk("OrganizationRegisterPati
|
|
|
18461
18485
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
18462
18486
|
debugger;
|
|
18463
18487
|
_context2.prev = 3;
|
|
18464
|
-
payloaddata = payload.payloaddata, enId = payload.enId;
|
|
18488
|
+
payloaddata = payload.payloaddata, enId = payload.enId, encounterId = payload.encounterId;
|
|
18465
18489
|
|
|
18466
18490
|
if (enId) {
|
|
18467
18491
|
body = [_objectSpread2({
|
|
@@ -18473,6 +18497,16 @@ var ORGANIZATION_VISIT_REGISTRATION = createAsyncThunk("OrganizationRegisterPati
|
|
|
18473
18497
|
},
|
|
18474
18498
|
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18475
18499
|
}, payloaddata)];
|
|
18500
|
+
} else if (encounterId) {
|
|
18501
|
+
body = [_objectSpread2({
|
|
18502
|
+
db_name: dbName,
|
|
18503
|
+
entity: "Encounter",
|
|
18504
|
+
is_metadata: true,
|
|
18505
|
+
filter: {
|
|
18506
|
+
_key: "".concat(encounterId)
|
|
18507
|
+
},
|
|
18508
|
+
metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd"
|
|
18509
|
+
}, payloaddata)];
|
|
18476
18510
|
} else {
|
|
18477
18511
|
body = [_objectSpread2({
|
|
18478
18512
|
db_name: dbName,
|
|
@@ -31567,7 +31601,18 @@ var LabOrderApiSlice$1 = LabOrderApiSlice.reducer;
|
|
|
31567
31601
|
|
|
31568
31602
|
var queries$5 = {
|
|
31569
31603
|
drugType: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"DrugType\",\n \"return_fields\": \"DrugType\"\n }"),
|
|
31570
|
-
drugMaster:
|
|
31604
|
+
// drugMaster: `{
|
|
31605
|
+
// "db_name": "${dbName}",
|
|
31606
|
+
// "entity": "DrugMaster",
|
|
31607
|
+
// "limit":{
|
|
31608
|
+
// "count":100,
|
|
31609
|
+
// "offset":0
|
|
31610
|
+
// },
|
|
31611
|
+
// "return_fields": "MERGE(DrugMaster,{DrugType:DOCUMENT(DrugMaster.DrugType),FormCode:DOCUMENT(DrugMaster.FormCode)})"
|
|
31612
|
+
// }`,
|
|
31613
|
+
drugMaster: function drugMaster(input_text) {
|
|
31614
|
+
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)})\"\n }");
|
|
31615
|
+
},
|
|
31571
31616
|
getMedications: function getMedications(id) {
|
|
31572
31617
|
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 }");
|
|
31573
31618
|
},
|
|
@@ -31718,6 +31763,7 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
31718
31763
|
var payload,
|
|
31719
31764
|
_ref4,
|
|
31720
31765
|
rejectWithValue,
|
|
31766
|
+
input_text,
|
|
31721
31767
|
data,
|
|
31722
31768
|
arr,
|
|
31723
31769
|
_args2 = arguments;
|
|
@@ -31729,16 +31775,17 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
31729
31775
|
payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
31730
31776
|
_ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
|
|
31731
31777
|
_context2.prev = 2;
|
|
31732
|
-
|
|
31778
|
+
input_text = payload.input_text;
|
|
31779
|
+
_context2.next = 6;
|
|
31733
31780
|
return fetchData$3({
|
|
31734
|
-
body: queries$5.drugMaster
|
|
31781
|
+
body: queries$5.drugMaster(input_text)
|
|
31735
31782
|
}, __readDocumentUrl__);
|
|
31736
31783
|
|
|
31737
|
-
case
|
|
31784
|
+
case 6:
|
|
31738
31785
|
data = _context2.sent;
|
|
31739
31786
|
arr = [];
|
|
31740
31787
|
data.result.map(function (val) {
|
|
31741
|
-
var _val$FormCode, _val$FormCode2, _val$StrengthValuesPo, _val$StrengthValuesPo2, _val$StrengthValuesPo3, _val$StrengthValuesPo4, _val$DrugType, _val$DrugType2, _val$DrugType3, _val$DrugType4, _val$drugroutegenid;
|
|
31788
|
+
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;
|
|
31742
31789
|
|
|
31743
31790
|
var json = {
|
|
31744
31791
|
value: val === null || val === void 0 ? void 0 : val._id,
|
|
@@ -31751,12 +31798,15 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
31751
31798
|
drugTypeLong: val === null || val === void 0 ? void 0 : (_val$DrugType2 = val.DrugType) === null || _val$DrugType2 === void 0 ? void 0 : _val$DrugType2.longdesc,
|
|
31752
31799
|
drugTypeShort: val === null || val === void 0 ? void 0 : (_val$DrugType3 = val.DrugType) === null || _val$DrugType3 === void 0 ? void 0 : _val$DrugType3.shortdesc,
|
|
31753
31800
|
drugTypeId: val === null || val === void 0 ? void 0 : (_val$DrugType4 = val.DrugType) === null || _val$DrugType4 === void 0 ? void 0 : _val$DrugType4._id,
|
|
31754
|
-
drugroutegenid: (_val$drugroutegenid = val === null || val === void 0 ? void 0 : val.drugroutegenid) !== null && _val$drugroutegenid !== void 0 ? _val$drugroutegenid : ""
|
|
31801
|
+
drugroutegenid: (_val$drugroutegenid = val === null || val === void 0 ? void 0 : val.drugroutegenid) !== null && _val$drugroutegenid !== void 0 ? _val$drugroutegenid : "",
|
|
31802
|
+
LongDesc_: (_val$LongDesc = val === null || val === void 0 ? void 0 : val.LongDesc) !== null && _val$LongDesc !== void 0 ? _val$LongDesc : "",
|
|
31803
|
+
DrugCode_: val === null || val === void 0 ? void 0 : val.DrugCode // formValue
|
|
31755
31804
|
|
|
31756
31805
|
};
|
|
31757
31806
|
arr.push(_objectSpread2(_objectSpread2({}, json), {}, {
|
|
31758
|
-
name: val.ShortDesc,
|
|
31759
|
-
label: val.
|
|
31807
|
+
name: val === null || val === void 0 ? void 0 : val.ShortDesc,
|
|
31808
|
+
label: (val === null || val === void 0 ? void 0 : val.DrugCode) + " - " + (val === null || val === void 0 ? void 0 : val.ShortDesc) + " - " + (val === null || val === void 0 ? void 0 : val.LongDesc) // label: val?.ShortDesc
|
|
31809
|
+
// label: `${val.ShortDesc ?? ""} - ${json.StrengthValues} ${json.StrengthUOM}`,
|
|
31760
31810
|
|
|
31761
31811
|
}));
|
|
31762
31812
|
});
|
|
@@ -31764,19 +31814,19 @@ var DRUGMASTER_MASTER = createAsyncThunk("MedicationMastersSlice/drugMaster_mast
|
|
|
31764
31814
|
data: arr
|
|
31765
31815
|
}));
|
|
31766
31816
|
|
|
31767
|
-
case
|
|
31768
|
-
_context2.prev =
|
|
31817
|
+
case 12:
|
|
31818
|
+
_context2.prev = 12;
|
|
31769
31819
|
_context2.t0 = _context2["catch"](2);
|
|
31770
31820
|
return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
31771
31821
|
message: _context2.t0.message
|
|
31772
31822
|
})));
|
|
31773
31823
|
|
|
31774
|
-
case
|
|
31824
|
+
case 15:
|
|
31775
31825
|
case "end":
|
|
31776
31826
|
return _context2.stop();
|
|
31777
31827
|
}
|
|
31778
31828
|
}
|
|
31779
|
-
}, _callee2, null, [[2,
|
|
31829
|
+
}, _callee2, null, [[2, 12]]);
|
|
31780
31830
|
})));
|
|
31781
31831
|
var STRENGTH_MASTER = createAsyncThunk("MedicationMastersSlice/strength_masters", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
31782
31832
|
var payload,
|