primarycare-binder 1.1.27 → 1.1.31
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 +61 -36
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9535,28 +9535,44 @@ var getImgUrl = function getImgUrl(fileId) {
|
|
|
9535
9535
|
};
|
|
9536
9536
|
|
|
9537
9537
|
var getUtcTime = function getUtcTime(date) {
|
|
9538
|
-
var a = null;
|
|
9539
|
-
|
|
9540
9538
|
if (date) {
|
|
9541
|
-
|
|
9539
|
+
return moment.utc(date).unix();
|
|
9542
9540
|
} else {
|
|
9543
|
-
|
|
9541
|
+
return moment.utc().unix();
|
|
9544
9542
|
}
|
|
9545
|
-
|
|
9546
|
-
a = a.toUTCString();
|
|
9547
|
-
return new Date(a).getTime();
|
|
9548
9543
|
};
|
|
9549
9544
|
|
|
9550
9545
|
var utcTOLocal$1 = function utcTOLocal(date, format) {
|
|
9551
|
-
var Ndate = new Date(
|
|
9552
|
-
var fmt = format ? format : "DD-MM-YYYY";
|
|
9546
|
+
var Ndate = new Date();
|
|
9553
9547
|
|
|
9554
|
-
if (
|
|
9555
|
-
|
|
9548
|
+
if (typeof date === "number") {
|
|
9549
|
+
Ndate = moment.unix(date);
|
|
9556
9550
|
} else {
|
|
9557
|
-
|
|
9551
|
+
Ndate = moment(date);
|
|
9558
9552
|
}
|
|
9559
|
-
|
|
9553
|
+
|
|
9554
|
+
var fmt = format ? format : "DD-MM-YYYY";
|
|
9555
|
+
return moment.utc(Ndate).local().format(fmt);
|
|
9556
|
+
}; // const getUtcTime = (date) => {
|
|
9557
|
+
// let a = null
|
|
9558
|
+
// if (date) {
|
|
9559
|
+
// a = new Date(date)
|
|
9560
|
+
// } else {
|
|
9561
|
+
// a = new Date()
|
|
9562
|
+
// }
|
|
9563
|
+
// a = a.toUTCString()
|
|
9564
|
+
// return ((new Date(a).getTime())/1000)
|
|
9565
|
+
// };
|
|
9566
|
+
// const utcTOLocal = (date, format) => {
|
|
9567
|
+
// let Ndate = new Date(date * 1000);
|
|
9568
|
+
// let fmt = format ? format : "DD-MM-YYYY"
|
|
9569
|
+
// if (format) {
|
|
9570
|
+
// return moment(Ndate).format(fmt);
|
|
9571
|
+
// } else {
|
|
9572
|
+
// return moment(Ndate)
|
|
9573
|
+
// }
|
|
9574
|
+
// };
|
|
9575
|
+
|
|
9560
9576
|
|
|
9561
9577
|
var deg2rad = function deg2rad(deg) {
|
|
9562
9578
|
return deg * (Math.PI / 180);
|
|
@@ -9695,20 +9711,24 @@ var getLatLong = /*#__PURE__*/function () {
|
|
|
9695
9711
|
|
|
9696
9712
|
|
|
9697
9713
|
var getAge = function getAge(date) {
|
|
9698
|
-
|
|
9714
|
+
if (date) {
|
|
9715
|
+
var yearDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'years', false);
|
|
9699
9716
|
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9717
|
+
if (yearDiff > 0) {
|
|
9718
|
+
return yearDiff + ' Y';
|
|
9719
|
+
}
|
|
9703
9720
|
|
|
9704
|
-
|
|
9721
|
+
var monthDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'months', false);
|
|
9705
9722
|
|
|
9706
|
-
|
|
9707
|
-
|
|
9723
|
+
if (monthDiff > 0) {
|
|
9724
|
+
return monthDiff + ' M';
|
|
9725
|
+
}
|
|
9726
|
+
|
|
9727
|
+
var dayDiff = moment().diff(moment(date, 'DD/MM/YYYY'), 'days', false);
|
|
9728
|
+
return dayDiff + ' D';
|
|
9708
9729
|
}
|
|
9709
9730
|
|
|
9710
|
-
|
|
9711
|
-
return dayDiff + ' D';
|
|
9731
|
+
return "";
|
|
9712
9732
|
};
|
|
9713
9733
|
|
|
9714
9734
|
var _extraReducers$D;
|
|
@@ -10097,13 +10117,20 @@ var PATIENT_DETAILS_READ = createAsyncThunk("patientReducer/readPatientDetails",
|
|
|
10097
10117
|
payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
|
|
10098
10118
|
_ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
|
|
10099
10119
|
_context5.prev = 2;
|
|
10100
|
-
_payload$key = payload.key, key = _payload$key === void 0 ? "" : _payload$key;
|
|
10120
|
+
_payload$key = payload.key, key = _payload$key === void 0 ? "" : _payload$key; // const read_p = {
|
|
10121
|
+
// // "db_name": db_name,
|
|
10122
|
+
// db_name: "primarycare",
|
|
10123
|
+
// entity: "Patient",
|
|
10124
|
+
// filter: `Patient._key=='${key}' && Patient.activestatus==true`,
|
|
10125
|
+
// return_fields:
|
|
10126
|
+
// "merge(Patient,{telecom:(for doc in ContactPointMaster filter doc._id in Patient.telecom return merge(doc,{system:(document(doc.system)),use:(document(doc.use)),valueprefix:(document(doc.valueprefix)),rank:(document(doc.rank))}))},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))},{gender:document(Patient.gender)},{address:(for doc in AddressMaster filter doc._id in Patient.address return merge(doc,{use:(document(doc.use)),city:(document(doc.city)),country:(document(doc.city)),district:(document(doc.district)), Type:(document(doc.Type)),postalCode:(document(doc.postalCode)),state:(document(doc.state))}))},{maritalstatus:document(Patient.maritalstatus)},{photo:document(Patient.photo)},{OrgID:document(Patient.OrgID)},{nationality:document(Patient.nationality)},{activereason:document(Patient.activereason)},{isdeceased:document(Patient.isdeceased)},{deceasedreason:document(Patient.deceasedreason)},{identifier:(for doc in IdentifierMaster filter doc._id in Patient.identifier return merge(doc,{user:(document(doc.user)), assigner:(document(doc.assigner)), period: (document(doc.period))}))},{communicationLanguage:document(Patient.communicationLanguage)},{birthGendercode:document(Patient.birthGendercode)},{citizenshipCode:document(Patient.citizenshipCode)},{disabilityCode:document(Patient.disabilityCode)},{genderIdentitycode:document(Patient.genderIdentitycode)},{religionCode:document(Patient.religionCode)},{raceCode:document(Patient.raceCode)},{ethinicityCode:document(Patient.ethinicityCode)},{patientTypecode:document(Patient.patientTypecode)},{bloodGroup:document(Patient.bloodGroup)},{attachment:document(Patient.attachment)},{age_type:document(Patient.age_type)},{primarycare_Prac:document(Patient.primarycare_Prac)})",
|
|
10127
|
+
// };
|
|
10128
|
+
|
|
10101
10129
|
read_p = {
|
|
10102
|
-
|
|
10103
|
-
db_name: "primarycare",
|
|
10130
|
+
db_name: dbName,
|
|
10104
10131
|
entity: "Patient",
|
|
10105
10132
|
filter: "Patient._key=='".concat(key, "' && Patient.activestatus==true"),
|
|
10106
|
-
return_fields: "merge(Patient,{telecom:(for doc in ContactPointMaster filter doc._id in Patient.telecom return merge(doc,{system:(document(doc.system)),use:(document(doc.use)),valueprefix:(document(doc.valueprefix)),rank:(document(doc.rank))}))},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))},{gender:document(Patient.gender)},{address:(for doc in AddressMaster filter doc._id in Patient.address return merge(doc,{use:(document(doc.use)),city:(document(doc.city)),country:(document(doc.city)),district:(document(doc.district)), Type:(document(doc.Type)),postalCode:(document(doc.postalCode)),state:(document(doc.state))}))},{maritalstatus:document(Patient.maritalstatus)},{photo:document(Patient.photo)},{OrgID:document(Patient.OrgID)},{nationality:document(Patient.nationality)},{activereason:document(Patient.activereason)},{isdeceased:document(Patient.isdeceased)},{deceasedreason:document(Patient.deceasedreason)},{identifier:(for doc in IdentifierMaster filter doc._id in Patient.identifier return merge(doc,{user:(document(doc.user)), assigner:(document(doc.assigner)), period: (document(doc.period))}))},{communicationLanguage:document(Patient.communicationLanguage)},{birthGendercode:document(Patient.birthGendercode)},{citizenshipCode:document(Patient.citizenshipCode)},{disabilityCode:document(Patient.disabilityCode)},{genderIdentitycode:document(Patient.genderIdentitycode)},{religionCode:document(Patient.religionCode)},{raceCode:document(Patient.raceCode)},{ethinicityCode:document(Patient.ethinicityCode)},{patientTypecode:document(Patient.patientTypecode)},{bloodGroup:document(Patient.bloodGroup)},{attachment:document(Patient.attachment)},{age_type:document(Patient.age_type)},{primarycare_Prac:document(Patient.primarycare_Prac)})"
|
|
10133
|
+
return_fields: "merge(Patient,{telecom:(for doc in ContactPointMaster filter doc._id in Patient.telecom return merge(doc,{system:(document(doc.system)),use:(document(doc.use)),valueprefix:(document(doc.valueprefix)),rank:(document(doc.rank))}))},{name:(for doc in HumanNameMaster filter doc._id in Patient.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))}))},{gender:document(Patient.gender)},{address:(for doc in AddressMaster filter doc._id in Patient.address return merge(doc,{use:(document(doc.use)),city:(document(doc.city)),country:(document(doc.city)),district:(document(doc.district)), Type:(document(doc.Type)),postalCode:(document(doc.postalCode)),state:(document(doc.state))}))},{maritalstatus:document(Patient.maritalstatus)},{photo:document(Patient.photo)},{OrgID:document(Patient.OrgID)},{nationality:document(Patient.nationality)},{activereason:document(Patient.activereason)},{isdeceased:document(Patient.isdeceased)},{deceasedreason:document(Patient.deceasedreason)},{identifier:(for doc in IdentifierMaster filter doc._id in Patient.identifier return merge(doc,{user:(document(doc.user)), assigner:(document(doc.assigner)), period: (document(doc.period))}))},{communicationLanguage:document(Patient.communicationLanguage)},{birthGendercode:document(Patient.birthGendercode)},{citizenshipCode:document(Patient.citizenshipCode)},{disabilityCode:document(Patient.disabilityCode)},{genderIdentitycode:document(Patient.genderIdentitycode)},{religionCode:document(Patient.religionCode)},{raceCode:document(Patient.raceCode)},{ethinicityCode:document(Patient.ethinicityCode)},{patientTypecode:document(Patient.patientTypecode)},{bloodGroup:document(Patient.bloodGroup)},{attachment:document(Patient.attachment)},{age_type:document(Patient.age_type)},{primarycare_Prac:document(Patient.primarycare_Prac)},{specialArng_code:document(Patient.specialArng_code)},{specialCourtesy_code: document(Patient.specialCourtesy_code)})"
|
|
10107
10134
|
};
|
|
10108
10135
|
_context5.next = 7;
|
|
10109
10136
|
return fetchData$3({
|
|
@@ -11296,7 +11323,7 @@ var ALL_APPOINTMENTS = createAsyncThunk("appointmentReducer/allAppointments", /*
|
|
|
11296
11323
|
}
|
|
11297
11324
|
});
|
|
11298
11325
|
(_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : (_data$3$upcoming_appo = _data$3.upcoming_appointment) === null || _data$3$upcoming_appo === void 0 ? void 0 : (_data$3$upcoming_appo2 = _data$3$upcoming_appo.forEach) === null || _data$3$upcoming_appo2 === void 0 ? void 0 : _data$3$upcoming_appo2.call(_data$3$upcoming_appo, function (v) {
|
|
11299
|
-
if (assemble && moment(utcTOLocal$1(v === null || v === void 0 ? void 0 : v.start)
|
|
11326
|
+
if (assemble && moment(utcTOLocal$1(v === null || v === void 0 ? void 0 : v.start), "DD-MM-YYYY").startOf("day").diff(moment().startOf("day"), "days") === 0 && (v.comment === "completed_assemble" || v.comment === "onhold_nurse" || v.comment === "completed_nurse" || v.comment === "onhold_doctor")) {
|
|
11300
11327
|
returnData.currentVisist.push(v);
|
|
11301
11328
|
} else {
|
|
11302
11329
|
returnData.upcomingAppointment.push(v);
|
|
@@ -14900,7 +14927,7 @@ var MASTER_SEARCH = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*
|
|
|
14900
14927
|
data: enc,
|
|
14901
14928
|
coding: {
|
|
14902
14929
|
_id: enc._id,
|
|
14903
|
-
display: enc.
|
|
14930
|
+
display: enc.encTypeDesc
|
|
14904
14931
|
}
|
|
14905
14932
|
};
|
|
14906
14933
|
});
|
|
@@ -40438,7 +40465,6 @@ var AVC_LOGIN = createAsyncThunk("avcMeetApiSlice/avc_info", /*#__PURE__*/_async
|
|
|
40438
40465
|
_data$PersonID$0$gend,
|
|
40439
40466
|
_data$PersonID4,
|
|
40440
40467
|
_data$PersonID4$,
|
|
40441
|
-
_data$PersonID4$$gend,
|
|
40442
40468
|
_data$PersonID$0$alia,
|
|
40443
40469
|
_data$PersonID5,
|
|
40444
40470
|
_data$PersonID5$,
|
|
@@ -40470,7 +40496,6 @@ var AVC_LOGIN = createAsyncThunk("avcMeetApiSlice/avc_info", /*#__PURE__*/_async
|
|
|
40470
40496
|
case 6:
|
|
40471
40497
|
resp = _context.sent;
|
|
40472
40498
|
data = (resp === null || resp === void 0 ? void 0 : (_resp$result = resp.result) === null || _resp$result === void 0 ? void 0 : _resp$result[0]) || [];
|
|
40473
|
-
debugger;
|
|
40474
40499
|
res_data = {
|
|
40475
40500
|
date: (_data$start = data === null || data === void 0 ? void 0 : data.start) !== null && _data$start !== void 0 ? _data$start : "",
|
|
40476
40501
|
app_id: (_data$appno = data === null || data === void 0 ? void 0 : data.appno) !== null && _data$appno !== void 0 ? _data$appno : "",
|
|
@@ -40493,8 +40518,8 @@ var AVC_LOGIN = createAsyncThunk("avcMeetApiSlice/avc_info", /*#__PURE__*/_async
|
|
|
40493
40518
|
},
|
|
40494
40519
|
personID: {
|
|
40495
40520
|
name: (data === null || data === void 0 ? void 0 : (_data$PersonID = data.PersonID) === null || _data$PersonID === void 0 ? void 0 : (_data$PersonID$ = _data$PersonID[0]) === null || _data$PersonID$ === void 0 ? void 0 : (_data$PersonID$$name = _data$PersonID$.name) === null || _data$PersonID$$name === void 0 ? void 0 : (_data$PersonID$$name$ = _data$PersonID$$name[0]) === null || _data$PersonID$$name$ === void 0 ? void 0 : _data$PersonID$$name$.text) ? data === null || data === void 0 ? void 0 : (_data$PersonID2 = data.PersonID) === null || _data$PersonID2 === void 0 ? void 0 : (_data$PersonID2$ = _data$PersonID2[0]) === null || _data$PersonID2$ === void 0 ? void 0 : (_data$PersonID2$$name = _data$PersonID2$.name) === null || _data$PersonID2$$name === void 0 ? void 0 : (_data$PersonID2$$name2 = _data$PersonID2$$name[0]) === null || _data$PersonID2$$name2 === void 0 ? void 0 : _data$PersonID2$$name2.text : "-",
|
|
40496
|
-
age: getAge(data === null || data === void 0 ? void 0 : (_data$PersonID3 = data.PersonID) === null || _data$PersonID3 === void 0 ? void 0 : (_data$PersonID3$ = _data$PersonID3[0]) === null || _data$PersonID3$ === void 0 ? void 0 : _data$PersonID3$.
|
|
40497
|
-
gander: (_data$PersonID$0$gend = data === null || data === void 0 ? void 0 : (_data$PersonID4 = data.PersonID) === null || _data$PersonID4 === void 0 ? void 0 : (_data$PersonID4$ = _data$PersonID4[0]) === null || _data$PersonID4$ === void 0 ? void 0 :
|
|
40521
|
+
age: getAge(data === null || data === void 0 ? void 0 : (_data$PersonID3 = data.PersonID) === null || _data$PersonID3 === void 0 ? void 0 : (_data$PersonID3$ = _data$PersonID3[0]) === null || _data$PersonID3$ === void 0 ? void 0 : _data$PersonID3$.birthDay),
|
|
40522
|
+
gander: (_data$PersonID$0$gend = data === null || data === void 0 ? void 0 : (_data$PersonID4 = data.PersonID) === null || _data$PersonID4 === void 0 ? void 0 : (_data$PersonID4$ = _data$PersonID4[0]) === null || _data$PersonID4$ === void 0 ? void 0 : _data$PersonID4$.gender) !== null && _data$PersonID$0$gend !== void 0 ? _data$PersonID$0$gend : "",
|
|
40498
40523
|
id: (_data$PersonID$0$alia = data === null || data === void 0 ? void 0 : (_data$PersonID5 = data.PersonID) === null || _data$PersonID5 === void 0 ? void 0 : (_data$PersonID5$ = _data$PersonID5[0]) === null || _data$PersonID5$ === void 0 ? void 0 : _data$PersonID5$.alias) !== null && _data$PersonID$0$alia !== void 0 ? _data$PersonID$0$alia : "",
|
|
40499
40524
|
mobile: (_data$PersonID$0$tele = data === null || data === void 0 ? void 0 : (_data$PersonID6 = data.PersonID) === null || _data$PersonID6 === void 0 ? void 0 : (_data$PersonID6$ = _data$PersonID6[0]) === null || _data$PersonID6$ === void 0 ? void 0 : (_data$PersonID6$$tele = _data$PersonID6$.telecom) === null || _data$PersonID6$$tele === void 0 ? void 0 : (_data$PersonID6$$tele2 = _data$PersonID6$$tele[0]) === null || _data$PersonID6$$tele2 === void 0 ? void 0 : _data$PersonID6$$tele2.value) !== null && _data$PersonID$0$tele !== void 0 ? _data$PersonID$0$tele : ""
|
|
40500
40525
|
},
|
|
@@ -40504,19 +40529,19 @@ var AVC_LOGIN = createAsyncThunk("avcMeetApiSlice/avc_info", /*#__PURE__*/_async
|
|
|
40504
40529
|
data: res_data
|
|
40505
40530
|
}));
|
|
40506
40531
|
|
|
40507
|
-
case
|
|
40508
|
-
_context.prev =
|
|
40532
|
+
case 12:
|
|
40533
|
+
_context.prev = 12;
|
|
40509
40534
|
_context.t0 = _context["catch"](2);
|
|
40510
40535
|
return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
40511
40536
|
message: _context.t0.message
|
|
40512
40537
|
})));
|
|
40513
40538
|
|
|
40514
|
-
case
|
|
40539
|
+
case 15:
|
|
40515
40540
|
case "end":
|
|
40516
40541
|
return _context.stop();
|
|
40517
40542
|
}
|
|
40518
40543
|
}
|
|
40519
|
-
}, _callee, null, [[2,
|
|
40544
|
+
}, _callee, null, [[2, 12]]);
|
|
40520
40545
|
})));
|
|
40521
40546
|
var AVC_FORM_INSERT = createAsyncThunk("avcMeetApiSlice/avc_form", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
40522
40547
|
var payload,
|