primarycare-binder 1.1.111 → 1.1.114
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 +274 -160
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -12418,14 +12418,67 @@ var GET_SPECIALITY_ID_BY_PRCTITIONER_ID = createAsyncThunk("appointmentReducer/g
|
|
|
12418
12418
|
}
|
|
12419
12419
|
}
|
|
12420
12420
|
}, _callee13, null, [[2, 12]]);
|
|
12421
|
-
})));
|
|
12422
|
-
|
|
12423
|
-
var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
12421
|
+
})));
|
|
12422
|
+
var CHECK_APPOINTMENT_AGAINST_PATIENT = createAsyncThunk("appointmentReducer/checkAppointmentAgainstPatient", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
12424
12423
|
var payload,
|
|
12425
12424
|
_ref29,
|
|
12426
12425
|
rejectWithValue,
|
|
12426
|
+
_payload$patientId,
|
|
12427
|
+
patientId,
|
|
12427
12428
|
_payload$start3,
|
|
12428
12429
|
start,
|
|
12430
|
+
body,
|
|
12431
|
+
data,
|
|
12432
|
+
_args14 = arguments;
|
|
12433
|
+
|
|
12434
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
12435
|
+
while (1) {
|
|
12436
|
+
switch (_context14.prev = _context14.next) {
|
|
12437
|
+
case 0:
|
|
12438
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
12439
|
+
_ref29 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
|
|
12440
|
+
_context14.prev = 2;
|
|
12441
|
+
_payload$patientId = payload.patientId, patientId = _payload$patientId === void 0 ? 0 : _payload$patientId, _payload$start3 = payload.start, start = _payload$start3 === void 0 ? 0 : _payload$start3;
|
|
12442
|
+
debugger;
|
|
12443
|
+
body = {
|
|
12444
|
+
db_name: dbName,
|
|
12445
|
+
entity: "Appointment",
|
|
12446
|
+
filter: "Appointment.PersonID any ==".concat(patientId, " && Appointment.start ==").concat(start, " && Appointment.activestatus==true"),
|
|
12447
|
+
return_fields: "{_id:Appointment._id,PersonID:Appointment.PersonID,_key:Appointment._key,appno:Appointment.appno,id:Appointment.id,start:Appointment.start,slotID:Appointment.slotID,end:Appointment.end,doctorName:CONCAT(CONTAINS(document(document(Appointment.resourcecode).name)[*].prefix,'CodeableConceptMaster')?first(document(first(document(document(document(Appointment.resourcecode).name)[*].prefix)[*].coding))[*].display):first(document(document(document(Appointment.resourcecode).name)[*].prefix)[*].display),'. ',first(document(document(Appointment.resourcecode).name)[*].text),' ',first(document(document(Appointment.resourcecode).name)[*].given),' ',first(document(document(Appointment.resourcecode).name)[*].family),' ',CONTAINS(document(document(Appointment.resourcecode).name)[*].suffix,'CodeableConceptMaster')?first(document(first(document(document(document(Appointment.resourcecode).name)[*].suffix)[*].coding))[*].display):first(document(document(document(Appointment.resourcecode).name)[*].suffix)[*].display)),allowToBookAppointment:CONTAINS(document(Appointment.resourcecode).name,'HumanNameMaster')?false:true}"
|
|
12448
|
+
};
|
|
12449
|
+
_context14.next = 8;
|
|
12450
|
+
return fetchData$3({
|
|
12451
|
+
body: JSON.stringify(body)
|
|
12452
|
+
}, __readDocumentUrl__);
|
|
12453
|
+
|
|
12454
|
+
case 8:
|
|
12455
|
+
data = _context14.sent;
|
|
12456
|
+
debugger;
|
|
12457
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12458
|
+
data: data
|
|
12459
|
+
}));
|
|
12460
|
+
|
|
12461
|
+
case 13:
|
|
12462
|
+
_context14.prev = 13;
|
|
12463
|
+
_context14.t0 = _context14["catch"](2);
|
|
12464
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12465
|
+
message: _context14.t0.message
|
|
12466
|
+
})));
|
|
12467
|
+
|
|
12468
|
+
case 16:
|
|
12469
|
+
case "end":
|
|
12470
|
+
return _context14.stop();
|
|
12471
|
+
}
|
|
12472
|
+
}
|
|
12473
|
+
}, _callee14, null, [[2, 13]]);
|
|
12474
|
+
}))); // RECCURANCE_APPOINTMENT
|
|
12475
|
+
|
|
12476
|
+
var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
12477
|
+
var payload,
|
|
12478
|
+
_ref31,
|
|
12479
|
+
rejectWithValue,
|
|
12480
|
+
_payload$start4,
|
|
12481
|
+
start,
|
|
12429
12482
|
_payload$practionerid,
|
|
12430
12483
|
practionerid,
|
|
12431
12484
|
_payload$clinicid,
|
|
@@ -12435,16 +12488,16 @@ var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppo
|
|
|
12435
12488
|
queryId,
|
|
12436
12489
|
body,
|
|
12437
12490
|
data,
|
|
12438
|
-
|
|
12491
|
+
_args15 = arguments;
|
|
12439
12492
|
|
|
12440
|
-
return regeneratorRuntime.wrap(function
|
|
12493
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
12441
12494
|
while (1) {
|
|
12442
|
-
switch (
|
|
12495
|
+
switch (_context15.prev = _context15.next) {
|
|
12443
12496
|
case 0:
|
|
12444
|
-
payload =
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
_payload$
|
|
12497
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
12498
|
+
_ref31 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref31.rejectWithValue;
|
|
12499
|
+
_context15.prev = 2;
|
|
12500
|
+
_payload$start4 = payload.start, start = _payload$start4 === void 0 ? [] : _payload$start4, _payload$practionerid = payload.practionerid, practionerid = _payload$practionerid === void 0 ? 0 : _payload$practionerid, _payload$clinicid = payload.clinicid, clinicid = _payload$clinicid === void 0 ? 0 : _payload$clinicid;
|
|
12448
12501
|
date = start.map(function (d) {
|
|
12449
12502
|
var startDate = new Date();
|
|
12450
12503
|
var endDate = new Date();
|
|
@@ -12476,35 +12529,35 @@ var RECCURANCE_APPOINTMENT = createAsyncThunk("appointmentReducer/reccuranceAppo
|
|
|
12476
12529
|
slotdate: getUtcTime(new Date())
|
|
12477
12530
|
})
|
|
12478
12531
|
};
|
|
12479
|
-
|
|
12532
|
+
_context15.next = 11;
|
|
12480
12533
|
return fetchData$3({
|
|
12481
12534
|
body: JSON.stringify(body)
|
|
12482
12535
|
});
|
|
12483
12536
|
|
|
12484
12537
|
case 11:
|
|
12485
|
-
data =
|
|
12486
|
-
return
|
|
12538
|
+
data = _context15.sent;
|
|
12539
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12487
12540
|
data: data
|
|
12488
12541
|
}));
|
|
12489
12542
|
|
|
12490
12543
|
case 15:
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
return
|
|
12494
|
-
message:
|
|
12544
|
+
_context15.prev = 15;
|
|
12545
|
+
_context15.t0 = _context15["catch"](2);
|
|
12546
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12547
|
+
message: _context15.t0.message
|
|
12495
12548
|
})));
|
|
12496
12549
|
|
|
12497
12550
|
case 18:
|
|
12498
12551
|
case "end":
|
|
12499
|
-
return
|
|
12552
|
+
return _context15.stop();
|
|
12500
12553
|
}
|
|
12501
12554
|
}
|
|
12502
|
-
},
|
|
12555
|
+
}, _callee15, null, [[2, 15]]);
|
|
12503
12556
|
}))); // UPDATE_APPOINTMENT_STATUS
|
|
12504
12557
|
|
|
12505
|
-
var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
12558
|
+
var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
12506
12559
|
var payload,
|
|
12507
|
-
|
|
12560
|
+
_ref33,
|
|
12508
12561
|
rejectWithValue,
|
|
12509
12562
|
_payload$appointmentI2,
|
|
12510
12563
|
appointmentId,
|
|
@@ -12519,7 +12572,7 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12519
12572
|
_encounterInfo$result,
|
|
12520
12573
|
encounterCode,
|
|
12521
12574
|
encounterInfo,
|
|
12522
|
-
|
|
12575
|
+
_ref34,
|
|
12523
12576
|
_id,
|
|
12524
12577
|
_key,
|
|
12525
12578
|
statushistory,
|
|
@@ -12527,15 +12580,15 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12527
12580
|
appInfo,
|
|
12528
12581
|
body,
|
|
12529
12582
|
data,
|
|
12530
|
-
|
|
12583
|
+
_args16 = arguments;
|
|
12531
12584
|
|
|
12532
|
-
return regeneratorRuntime.wrap(function
|
|
12585
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
12533
12586
|
while (1) {
|
|
12534
|
-
switch (
|
|
12587
|
+
switch (_context16.prev = _context16.next) {
|
|
12535
12588
|
case 0:
|
|
12536
|
-
payload =
|
|
12537
|
-
|
|
12538
|
-
|
|
12589
|
+
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
12590
|
+
_ref33 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref33.rejectWithValue;
|
|
12591
|
+
_context16.prev = 2;
|
|
12539
12592
|
_payload$appointmentI2 = payload.appointmentId, appointmentId = _payload$appointmentI2 === void 0 ? 0 : _payload$appointmentI2, _payload$status = payload.status, status = _payload$status === void 0 ? "" : _payload$status, _payload$isCompleted = payload.isCompleted, isCompleted = _payload$isCompleted === void 0 ? false : _payload$isCompleted; // const appBody = {
|
|
12540
12593
|
// db_name: dbName,
|
|
12541
12594
|
// queryid: query_ids["appointmentReducer/readAppointment"],
|
|
@@ -12562,11 +12615,11 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12562
12615
|
}
|
|
12563
12616
|
|
|
12564
12617
|
if (!encounterStatus) {
|
|
12565
|
-
|
|
12618
|
+
_context16.next = 20;
|
|
12566
12619
|
break;
|
|
12567
12620
|
}
|
|
12568
12621
|
|
|
12569
|
-
|
|
12622
|
+
_context16.next = 8;
|
|
12570
12623
|
return fetchData$3({
|
|
12571
12624
|
body: JSON.stringify({
|
|
12572
12625
|
db_name: dbName,
|
|
@@ -12577,9 +12630,9 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12577
12630
|
}, __readDocumentUrl__);
|
|
12578
12631
|
|
|
12579
12632
|
case 8:
|
|
12580
|
-
encounterCode =
|
|
12633
|
+
encounterCode = _context16.sent;
|
|
12581
12634
|
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 : "";
|
|
12582
|
-
|
|
12635
|
+
_context16.next = 12;
|
|
12583
12636
|
return fetchData$3({
|
|
12584
12637
|
body: JSON.stringify({
|
|
12585
12638
|
db_name: dbName,
|
|
@@ -12590,11 +12643,11 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12590
12643
|
}, __readDocumentUrl__);
|
|
12591
12644
|
|
|
12592
12645
|
case 12:
|
|
12593
|
-
encounterInfo =
|
|
12594
|
-
|
|
12646
|
+
encounterInfo = _context16.sent;
|
|
12647
|
+
_ref34 = (encounterInfo === null || encounterInfo === void 0 ? void 0 : (_encounterInfo$result = encounterInfo.result) === null || _encounterInfo$result === void 0 ? void 0 : _encounterInfo$result[0]) || {}, _id = _ref34._id, _key = _ref34._key, statushistory = _ref34.statushistory;
|
|
12595
12648
|
|
|
12596
12649
|
if (!(_id && _key && statushistory && Array.isArray(statushistory))) {
|
|
12597
|
-
|
|
12650
|
+
_context16.next = 20;
|
|
12598
12651
|
break;
|
|
12599
12652
|
}
|
|
12600
12653
|
|
|
@@ -12631,7 +12684,7 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12631
12684
|
status: encounterStatus
|
|
12632
12685
|
}
|
|
12633
12686
|
}];
|
|
12634
|
-
|
|
12687
|
+
_context16.next = 20;
|
|
12635
12688
|
return fetchData$3({
|
|
12636
12689
|
body: JSON.stringify(updateData)
|
|
12637
12690
|
}, __uspsertUrl__);
|
|
@@ -12657,34 +12710,34 @@ var UPDATE_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/updateAppoi
|
|
|
12657
12710
|
id: appointmentId
|
|
12658
12711
|
}
|
|
12659
12712
|
}];
|
|
12660
|
-
|
|
12713
|
+
_context16.next = 26;
|
|
12661
12714
|
return fetchData$3({
|
|
12662
12715
|
body: JSON.stringify(body)
|
|
12663
12716
|
}, __uspsertUrl__);
|
|
12664
12717
|
|
|
12665
12718
|
case 26:
|
|
12666
|
-
data =
|
|
12667
|
-
return
|
|
12719
|
+
data = _context16.sent;
|
|
12720
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12668
12721
|
data: data
|
|
12669
12722
|
}));
|
|
12670
12723
|
|
|
12671
12724
|
case 30:
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
return
|
|
12675
|
-
message:
|
|
12725
|
+
_context16.prev = 30;
|
|
12726
|
+
_context16.t0 = _context16["catch"](2);
|
|
12727
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12728
|
+
message: _context16.t0.message
|
|
12676
12729
|
})));
|
|
12677
12730
|
|
|
12678
12731
|
case 33:
|
|
12679
12732
|
case "end":
|
|
12680
|
-
return
|
|
12733
|
+
return _context16.stop();
|
|
12681
12734
|
}
|
|
12682
12735
|
}
|
|
12683
|
-
},
|
|
12736
|
+
}, _callee16, null, [[2, 30]]);
|
|
12684
12737
|
})));
|
|
12685
|
-
var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
12738
|
+
var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApoointmentStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
12686
12739
|
var payload,
|
|
12687
|
-
|
|
12740
|
+
_ref36,
|
|
12688
12741
|
rejectWithValue,
|
|
12689
12742
|
_appData$,
|
|
12690
12743
|
_payload$appointmentI3,
|
|
@@ -12697,15 +12750,15 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
|
|
|
12697
12750
|
insertObject,
|
|
12698
12751
|
body,
|
|
12699
12752
|
data,
|
|
12700
|
-
|
|
12753
|
+
_args17 = arguments;
|
|
12701
12754
|
|
|
12702
|
-
return regeneratorRuntime.wrap(function
|
|
12755
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
12703
12756
|
while (1) {
|
|
12704
|
-
switch (
|
|
12757
|
+
switch (_context17.prev = _context17.next) {
|
|
12705
12758
|
case 0:
|
|
12706
|
-
payload =
|
|
12707
|
-
|
|
12708
|
-
|
|
12759
|
+
payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
12760
|
+
_ref36 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref36.rejectWithValue;
|
|
12761
|
+
_context17.prev = 2;
|
|
12709
12762
|
_payload$appointmentI3 = payload.appointmentId, appointmentId = _payload$appointmentI3 === void 0 ? 0 : _payload$appointmentI3, _payload$reason = payload.reason, reason = _payload$reason === void 0 ? "" : _payload$reason;
|
|
12710
12763
|
appBody = {
|
|
12711
12764
|
db_name: dbName,
|
|
@@ -12714,17 +12767,17 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
|
|
|
12714
12767
|
appointment_id: appointmentId
|
|
12715
12768
|
}
|
|
12716
12769
|
};
|
|
12717
|
-
|
|
12770
|
+
_context17.next = 7;
|
|
12718
12771
|
return fetchData$3({
|
|
12719
12772
|
body: JSON.stringify(appBody)
|
|
12720
12773
|
});
|
|
12721
12774
|
|
|
12722
12775
|
case 7:
|
|
12723
|
-
appData =
|
|
12776
|
+
appData = _context17.sent;
|
|
12724
12777
|
appInfo = (appData === null || appData === void 0 ? void 0 : (_appData$ = appData[0]) === null || _appData$ === void 0 ? void 0 : _appData$[0]) || {};
|
|
12725
12778
|
|
|
12726
12779
|
if (!(Object.keys(appInfo).length > 0)) {
|
|
12727
|
-
|
|
12780
|
+
_context17.next = 19;
|
|
12728
12781
|
break;
|
|
12729
12782
|
}
|
|
12730
12783
|
|
|
@@ -12745,53 +12798,53 @@ var CANCEL_APPOINTMENT_STATUS = createAsyncThunk("appointmentReducer/cancelApooi
|
|
|
12745
12798
|
id: appointmentId
|
|
12746
12799
|
}
|
|
12747
12800
|
}];
|
|
12748
|
-
|
|
12801
|
+
_context17.next = 17;
|
|
12749
12802
|
return fetchData$3({
|
|
12750
12803
|
body: JSON.stringify(body)
|
|
12751
12804
|
}, __uspsertUrl__);
|
|
12752
12805
|
|
|
12753
12806
|
case 17:
|
|
12754
|
-
data =
|
|
12755
|
-
return
|
|
12807
|
+
data = _context17.sent;
|
|
12808
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12756
12809
|
data: data
|
|
12757
12810
|
}));
|
|
12758
12811
|
|
|
12759
12812
|
case 19:
|
|
12760
|
-
|
|
12813
|
+
_context17.next = 24;
|
|
12761
12814
|
break;
|
|
12762
12815
|
|
|
12763
12816
|
case 21:
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
return
|
|
12767
|
-
message:
|
|
12817
|
+
_context17.prev = 21;
|
|
12818
|
+
_context17.t0 = _context17["catch"](2);
|
|
12819
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12820
|
+
message: _context17.t0.message
|
|
12768
12821
|
})));
|
|
12769
12822
|
|
|
12770
12823
|
case 24:
|
|
12771
12824
|
case "end":
|
|
12772
|
-
return
|
|
12825
|
+
return _context17.stop();
|
|
12773
12826
|
}
|
|
12774
12827
|
}
|
|
12775
|
-
},
|
|
12828
|
+
}, _callee17, null, [[2, 21]]);
|
|
12776
12829
|
}))); // REASON_FOR_APPT_CANCEL_MODIFY
|
|
12777
12830
|
|
|
12778
|
-
var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonForApptCancelModify", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
12831
|
+
var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonForApptCancelModify", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
|
|
12779
12832
|
var payload,
|
|
12780
|
-
|
|
12833
|
+
_ref38,
|
|
12781
12834
|
rejectWithValue,
|
|
12782
12835
|
body,
|
|
12783
12836
|
data,
|
|
12784
12837
|
returnData,
|
|
12785
12838
|
_data$result3,
|
|
12786
|
-
|
|
12839
|
+
_args18 = arguments;
|
|
12787
12840
|
|
|
12788
|
-
return regeneratorRuntime.wrap(function
|
|
12841
|
+
return regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
12789
12842
|
while (1) {
|
|
12790
|
-
switch (
|
|
12843
|
+
switch (_context18.prev = _context18.next) {
|
|
12791
12844
|
case 0:
|
|
12792
|
-
payload =
|
|
12793
|
-
|
|
12794
|
-
|
|
12845
|
+
payload = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
|
|
12846
|
+
_ref38 = _args18.length > 1 ? _args18[1] : undefined, rejectWithValue = _ref38.rejectWithValue;
|
|
12847
|
+
_context18.prev = 2;
|
|
12795
12848
|
body = {
|
|
12796
12849
|
db_name: dbName,
|
|
12797
12850
|
entity: "CodingMaster",
|
|
@@ -12799,13 +12852,13 @@ var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonF
|
|
|
12799
12852
|
sort: "CodingMaster.display ASC",
|
|
12800
12853
|
return_fields: "KEEP(CodingMaster,'_id','id','_key','code','display','Type')"
|
|
12801
12854
|
};
|
|
12802
|
-
|
|
12855
|
+
_context18.next = 6;
|
|
12803
12856
|
return fetchData$3({
|
|
12804
12857
|
body: JSON.stringify(body)
|
|
12805
12858
|
}, __readDocumentUrl__);
|
|
12806
12859
|
|
|
12807
12860
|
case 6:
|
|
12808
|
-
data =
|
|
12861
|
+
data = _context18.sent;
|
|
12809
12862
|
returnData = [];
|
|
12810
12863
|
|
|
12811
12864
|
if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
@@ -12820,23 +12873,23 @@ var REASON_FOR_APPT_CANCEL_MODIFY = createAsyncThunk("appointmentReducer/reasonF
|
|
|
12820
12873
|
});
|
|
12821
12874
|
}
|
|
12822
12875
|
|
|
12823
|
-
return
|
|
12876
|
+
return _context18.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
12824
12877
|
data: returnData
|
|
12825
12878
|
}));
|
|
12826
12879
|
|
|
12827
12880
|
case 12:
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
return
|
|
12831
|
-
message:
|
|
12881
|
+
_context18.prev = 12;
|
|
12882
|
+
_context18.t0 = _context18["catch"](2);
|
|
12883
|
+
return _context18.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
12884
|
+
message: _context18.t0.message
|
|
12832
12885
|
})));
|
|
12833
12886
|
|
|
12834
12887
|
case 15:
|
|
12835
12888
|
case "end":
|
|
12836
|
-
return
|
|
12889
|
+
return _context18.stop();
|
|
12837
12890
|
}
|
|
12838
12891
|
}
|
|
12839
|
-
},
|
|
12892
|
+
}, _callee18, null, [[2, 12]]);
|
|
12840
12893
|
}))); // APPOINTMENT CREATE INITIALSTATE
|
|
12841
12894
|
|
|
12842
12895
|
var appointmentReducer = createSlice({
|
|
@@ -12861,7 +12914,8 @@ var appointmentReducer = createSlice({
|
|
|
12861
12914
|
follow_up_appintment: _objectSpread2({}, defaultState.Info),
|
|
12862
12915
|
reasonForApptCancelModify: _objectSpread2({}, defaultState.Info),
|
|
12863
12916
|
getReferralLocation: _objectSpread2({}, defaultState.List),
|
|
12864
|
-
getSpecialityIdByPractitionerId: _objectSpread2({}, defaultState.Info)
|
|
12917
|
+
getSpecialityIdByPractitionerId: _objectSpread2({}, defaultState.Info),
|
|
12918
|
+
checkAppointmentAgainstPatient: _objectSpread2({}, defaultState.Info)
|
|
12865
12919
|
},
|
|
12866
12920
|
extraReducers: (_extraReducers$D = {}, _defineProperty(_extraReducers$D, APPOINTMENT_CREATE.fulfilled, function (state, action) {
|
|
12867
12921
|
var _action$payload;
|
|
@@ -13033,6 +13087,16 @@ var appointmentReducer = createSlice({
|
|
|
13033
13087
|
var _action$payload34;
|
|
13034
13088
|
|
|
13035
13089
|
state.getSpecialityIdByPractitionerId = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : [];
|
|
13090
|
+
}), _defineProperty(_extraReducers$D, CHECK_APPOINTMENT_AGAINST_PATIENT.fulfilled, function (state, action) {
|
|
13091
|
+
var _action$payload35;
|
|
13092
|
+
|
|
13093
|
+
state.checkAppointmentAgainstPatient = (_action$payload35 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload35 !== void 0 ? _action$payload35 : [];
|
|
13094
|
+
}), _defineProperty(_extraReducers$D, CHECK_APPOINTMENT_AGAINST_PATIENT.pending, function (state, action) {
|
|
13095
|
+
state.checkAppointmentAgainstPatient.loading = true;
|
|
13096
|
+
}), _defineProperty(_extraReducers$D, CHECK_APPOINTMENT_AGAINST_PATIENT.rejected, function (state, action) {
|
|
13097
|
+
var _action$payload36;
|
|
13098
|
+
|
|
13099
|
+
state.checkAppointmentAgainstPatient = (_action$payload36 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload36 !== void 0 ? _action$payload36 : [];
|
|
13036
13100
|
}), _extraReducers$D)
|
|
13037
13101
|
}); // end
|
|
13038
13102
|
// APPOINTMENT ACTION LISTS
|
|
@@ -13054,7 +13118,8 @@ var appointmentActions = {
|
|
|
13054
13118
|
GET__FOLLOW_UP_APPOINTMENT: GET__FOLLOW_UP_APPOINTMENT,
|
|
13055
13119
|
REASON_FOR_APPT_CANCEL_MODIFY: REASON_FOR_APPT_CANCEL_MODIFY,
|
|
13056
13120
|
GET_REFERRAL_LOCATION: GET_REFERRAL_LOCATION,
|
|
13057
|
-
GET_SPECIALITY_ID_BY_PRCTITIONER_ID: GET_SPECIALITY_ID_BY_PRCTITIONER_ID
|
|
13121
|
+
GET_SPECIALITY_ID_BY_PRCTITIONER_ID: GET_SPECIALITY_ID_BY_PRCTITIONER_ID,
|
|
13122
|
+
CHECK_APPOINTMENT_AGAINST_PATIENT: CHECK_APPOINTMENT_AGAINST_PATIENT
|
|
13058
13123
|
}; // end
|
|
13059
13124
|
var appointmentReducer$1 = appointmentReducer.reducer;
|
|
13060
13125
|
|
|
@@ -22747,7 +22812,7 @@ var queries$a = {
|
|
|
22747
22812
|
relationship: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='RELATIONSHIP' && CodeableConceptMaster.status==true\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22748
22813
|
symptoms: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"SymptomsMapping\",\n \"return_fields\": \"SymptomsMapping\"\n }"),
|
|
22749
22814
|
Severity: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCSEVERITY'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22750
|
-
bodySite: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCBODYSITE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22815
|
+
bodySite: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.status == true && CodeableConceptMaster.Type=='CCBODYSITE'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22751
22816
|
Verification: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCVERIFICTIONSTATUS'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22752
22817
|
clinicalStatus: "{\n \"db_name\": \"".concat(dbName, "\",\n \"entity\": \"CodeableConceptMaster\",\n \"filter\": \"CodeableConceptMaster.Type=='CCCLINICALSTATUS'\",\n \"return_fields\": \"MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})\"\n }"),
|
|
22753
22818
|
encounterBasedCC: function encounterBasedCC(encounter_id) {
|
|
@@ -28875,6 +28940,7 @@ var generateJSON$3 = function generateJSON(dataList) {
|
|
|
28875
28940
|
};
|
|
28876
28941
|
|
|
28877
28942
|
var childJSON$2 = function childJSON(dataList, editIds, edit, vId) {
|
|
28943
|
+
debugger;
|
|
28878
28944
|
var payload = dataList.map(function (data, i) {
|
|
28879
28945
|
var _data$orderCatalog, _data$occuranceEndDat, _data$orderQty, _data$status, _data$reasonCode, _data$indications, _data$notes, _data$attribute$view, _data$attribute, _data$attribute$bedSi, _data$attribute2, _data$attribute$contr, _data$attribute3, _data$statusreason, _data$accessionNum;
|
|
28880
28946
|
|
|
@@ -28918,7 +28984,7 @@ var childJSON$2 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
28918
28984
|
orderMode: data === null || data === void 0 ? void 0 : data.orderMode,
|
|
28919
28985
|
priority: data === null || data === void 0 ? void 0 : data.priority,
|
|
28920
28986
|
orderDateTime: data === null || data === void 0 ? void 0 : data.orderDateTime,
|
|
28921
|
-
occuranceStartDate: vId > 0 ? vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
28987
|
+
occuranceStartDate: vId > 0 ? !edit ? getActualDate$2(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
28922
28988
|
occuranceEndDate: (_data$occuranceEndDat = data === null || data === void 0 ? void 0 : data.occuranceEndDate) !== null && _data$occuranceEndDat !== void 0 ? _data$occuranceEndDat : 0,
|
|
28923
28989
|
orderQty: (_data$orderQty = data === null || data === void 0 ? void 0 : data.orderQty) !== null && _data$orderQty !== void 0 ? _data$orderQty : 0,
|
|
28924
28990
|
orderUOM: "",
|
|
@@ -28927,7 +28993,7 @@ var childJSON$2 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
28927
28993
|
workflowStatus: "",
|
|
28928
28994
|
billQty: 0,
|
|
28929
28995
|
orderPrivilegeLevel: 0,
|
|
28930
|
-
apptDate: vId,
|
|
28996
|
+
apptDate: !edit ? getActualDate$2(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId,
|
|
28931
28997
|
apptRefNum: "",
|
|
28932
28998
|
Requestor: _toConsumableArray(data === null || data === void 0 ? void 0 : data.Requestor),
|
|
28933
28999
|
reasonCode: (_data$reasonCode = data === null || data === void 0 ? void 0 : data.reasonCode) !== null && _data$reasonCode !== void 0 ? _data$reasonCode : "",
|
|
@@ -28940,7 +29006,7 @@ var childJSON$2 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
28940
29006
|
freqRateUnit: "",
|
|
28941
29007
|
duration: 0,
|
|
28942
29008
|
durationType: "",
|
|
28943
|
-
parentOrderId: edit ? data.
|
|
29009
|
+
parentOrderId: edit ? data === null || data === void 0 ? void 0 : data.parentOrderId : editIds ? editIds : "",
|
|
28944
29010
|
orderGroupRefId: "",
|
|
28945
29011
|
specimenRelated: [{
|
|
28946
29012
|
reqd: data.specimenRelated[0].reqd,
|
|
@@ -28983,6 +29049,17 @@ var childJSON$2 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
28983
29049
|
return payload;
|
|
28984
29050
|
};
|
|
28985
29051
|
|
|
29052
|
+
var getActualDate$2 = function getActualDate(incomingDate, actualDate) {
|
|
29053
|
+
debugger;
|
|
29054
|
+
var actualFormat = moment$1.unix(actualDate).format("YYYY-MM-DD,hh:mm A");
|
|
29055
|
+
var incomingFormat = moment$1.unix(incomingDate).format("YYYY-MM-DD,hh:mm A");
|
|
29056
|
+
var requiredTime = actualFormat.split(","); //Got the time
|
|
29057
|
+
|
|
29058
|
+
var requiredDate = incomingFormat.slice(0, 11);
|
|
29059
|
+
var requiredFormat = moment$1(requiredDate + requiredTime, 'YYYY-MM-DD,hh:mm A').unix();
|
|
29060
|
+
return requiredFormat;
|
|
29061
|
+
};
|
|
29062
|
+
|
|
28986
29063
|
var queries$6 = {
|
|
28987
29064
|
laborder_read: function laborder_read(encounter_id, order_id) {
|
|
28988
29065
|
return {
|
|
@@ -34756,7 +34833,7 @@ var childJSON$1 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
34756
34833
|
orderMode: data === null || data === void 0 ? void 0 : data.orderMode,
|
|
34757
34834
|
priority: data === null || data === void 0 ? void 0 : data.priority,
|
|
34758
34835
|
orderDateTime: data === null || data === void 0 ? void 0 : data.orderDateTime,
|
|
34759
|
-
occuranceStartDate: vId > 0 ? vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
34836
|
+
occuranceStartDate: vId > 0 ? !edit ? getActualDate$1(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
34760
34837
|
occuranceEndDate: (_data$occuranceEndDat = data === null || data === void 0 ? void 0 : data.occuranceEndDate) !== null && _data$occuranceEndDat !== void 0 ? _data$occuranceEndDat : 0,
|
|
34761
34838
|
orderQty: (_data$orderQty = data === null || data === void 0 ? void 0 : data.orderQty) !== null && _data$orderQty !== void 0 ? _data$orderQty : 0,
|
|
34762
34839
|
orderUOM: "",
|
|
@@ -34765,7 +34842,7 @@ var childJSON$1 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
34765
34842
|
workflowStatus: "",
|
|
34766
34843
|
billQty: 0,
|
|
34767
34844
|
orderPrivilegeLevel: 0,
|
|
34768
|
-
apptDate: vId,
|
|
34845
|
+
apptDate: !edit ? getActualDate$1(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId,
|
|
34769
34846
|
apptRefNum: "",
|
|
34770
34847
|
Requestor: _toConsumableArray(data === null || data === void 0 ? void 0 : data.Requestor),
|
|
34771
34848
|
reasonCode: (_data$reasonCode = data === null || data === void 0 ? void 0 : data.reasonCode) !== null && _data$reasonCode !== void 0 ? _data$reasonCode : "",
|
|
@@ -34778,7 +34855,7 @@ var childJSON$1 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
34778
34855
|
freqRateUnit: "",
|
|
34779
34856
|
duration: 0,
|
|
34780
34857
|
durationType: "",
|
|
34781
|
-
parentOrderId: edit ? data.
|
|
34858
|
+
parentOrderId: edit ? data === null || data === void 0 ? void 0 : data.parentOrderId : editIds ? editIds : "",
|
|
34782
34859
|
orderGroupRefId: "",
|
|
34783
34860
|
performer: _toConsumableArray(data === null || data === void 0 ? void 0 : data.performer),
|
|
34784
34861
|
notes: (_data$notes = data === null || data === void 0 ? void 0 : data.notes) !== null && _data$notes !== void 0 ? _data$notes : "",
|
|
@@ -34810,6 +34887,16 @@ var childJSON$1 = function childJSON(dataList, editIds, edit, vId) {
|
|
|
34810
34887
|
return payload;
|
|
34811
34888
|
};
|
|
34812
34889
|
|
|
34890
|
+
var getActualDate$1 = function getActualDate(incomingDate, actualDate) {
|
|
34891
|
+
var actualFormat = moment$1.unix(actualDate).format("YYYY-MM-DD,hh:mm A");
|
|
34892
|
+
var incomingFormat = moment$1.unix(incomingDate).format("YYYY-MM-DD,hh:mm A");
|
|
34893
|
+
var requiredTime = actualFormat.split(","); //Got the time
|
|
34894
|
+
|
|
34895
|
+
var requiredDate = incomingFormat.slice(0, 11);
|
|
34896
|
+
var requiredFormat = moment$1(requiredDate + requiredTime, 'YYYY-MM-DD,hh:mm A').unix();
|
|
34897
|
+
return requiredFormat;
|
|
34898
|
+
};
|
|
34899
|
+
|
|
34813
34900
|
var _extraReducers$f;
|
|
34814
34901
|
var TREATMENT_PROCEDURE_SAVE = createAsyncThunk("DiagnosisMasterSlice/savetreatment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
34815
34902
|
var payload,
|
|
@@ -36682,7 +36769,7 @@ var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
|
36682
36769
|
orderMode: data === null || data === void 0 ? void 0 : data.orderMode,
|
|
36683
36770
|
priority: data === null || data === void 0 ? void 0 : data.priority,
|
|
36684
36771
|
orderDateTime: data === null || data === void 0 ? void 0 : data.orderDateTime,
|
|
36685
|
-
occuranceStartDate: vId > 0 ? vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
36772
|
+
occuranceStartDate: vId > 0 ? !edit ? getActualDate(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId : data === null || data === void 0 ? void 0 : data.occuranceStartDate,
|
|
36686
36773
|
occuranceEndDate: (_data$occuranceEndDat = data === null || data === void 0 ? void 0 : data.occuranceEndDate) !== null && _data$occuranceEndDat !== void 0 ? _data$occuranceEndDat : 0,
|
|
36687
36774
|
orderQty: (_data$orderQty = data === null || data === void 0 ? void 0 : data.orderQty) !== null && _data$orderQty !== void 0 ? _data$orderQty : 0,
|
|
36688
36775
|
orderUOM: "",
|
|
@@ -36691,7 +36778,7 @@ var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
|
36691
36778
|
workflowStatus: "",
|
|
36692
36779
|
billQty: 0,
|
|
36693
36780
|
orderPrivilegeLevel: 0,
|
|
36694
|
-
apptDate: vId,
|
|
36781
|
+
apptDate: !edit ? getActualDate(vId, data === null || data === void 0 ? void 0 : data.starts_on) : vId,
|
|
36695
36782
|
apptRefNum: "",
|
|
36696
36783
|
Requestor: _toConsumableArray(data === null || data === void 0 ? void 0 : data.Requestor),
|
|
36697
36784
|
reasonCode: (_data$reasonCode = data === null || data === void 0 ? void 0 : data.reasonCode) !== null && _data$reasonCode !== void 0 ? _data$reasonCode : "",
|
|
@@ -36704,7 +36791,7 @@ var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
|
36704
36791
|
freqRateUnit: "",
|
|
36705
36792
|
duration: 0,
|
|
36706
36793
|
durationType: "",
|
|
36707
|
-
parentOrderId: edit ? data.
|
|
36794
|
+
parentOrderId: edit ? data === null || data === void 0 ? void 0 : data.parentOrderId : editIds ? editIds : "",
|
|
36708
36795
|
orderGroupRefId: "",
|
|
36709
36796
|
performer: _toConsumableArray(data === null || data === void 0 ? void 0 : data.performer),
|
|
36710
36797
|
notes: (_data$notes = data === null || data === void 0 ? void 0 : data.notes) !== null && _data$notes !== void 0 ? _data$notes : "",
|
|
@@ -36736,6 +36823,16 @@ var childJSON = function childJSON(dataList, editIds, edit, vId) {
|
|
|
36736
36823
|
return payload;
|
|
36737
36824
|
};
|
|
36738
36825
|
|
|
36826
|
+
var getActualDate = function getActualDate(incomingDate, actualDate) {
|
|
36827
|
+
var actualFormat = moment$1.unix(actualDate).format("YYYY-MM-DD,hh:mm A");
|
|
36828
|
+
var incomingFormat = moment$1.unix(incomingDate).format("YYYY-MM-DD,hh:mm A");
|
|
36829
|
+
var requiredTime = actualFormat.split(","); //Got the time
|
|
36830
|
+
|
|
36831
|
+
var requiredDate = incomingFormat.slice(0, 11);
|
|
36832
|
+
var requiredFormat = moment$1(requiredDate + requiredTime, 'YYYY-MM-DD,hh:mm A').unix();
|
|
36833
|
+
return requiredFormat;
|
|
36834
|
+
};
|
|
36835
|
+
|
|
36739
36836
|
var _extraReducers$e;
|
|
36740
36837
|
var READ_RAD_CHILD = createAsyncThunk("RadiologySlice/rad_child", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
36741
36838
|
var payload,
|
|
@@ -38723,7 +38820,21 @@ var queries$2 = {
|
|
|
38723
38820
|
return_fields: " {Practitioner_id:(for doc in Practitioner filter doc.id in Encounter.participant[*].Practitioner_id return {name:document(doc.name),_id:doc._id})}"
|
|
38724
38821
|
};
|
|
38725
38822
|
},
|
|
38726
|
-
doc_read:
|
|
38823
|
+
doc_read: function doc_read(patient_id) {
|
|
38824
|
+
return {
|
|
38825
|
+
db_name: dbName,
|
|
38826
|
+
entity: "CAPatientClinicalDocs",
|
|
38827
|
+
filter: "CAPatientClinicalDocs.patientid =='".concat(patient_id, "' && CAPatientClinicalDocs.activestatus ==true"),
|
|
38828
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})",
|
|
38829
|
+
sort: "CAPatientClinicalDocs.updatedate desc"
|
|
38830
|
+
};
|
|
38831
|
+
} // `{
|
|
38832
|
+
// "db_name": "${dbName}",
|
|
38833
|
+
// "entity": "CAPatientClinicalDocs",
|
|
38834
|
+
// "filter": "CAPatientClinicalDocs.activestatus ==true",
|
|
38835
|
+
// "return_fields": "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:document(CAPatientClinicalDocs.practitionerid)},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
38836
|
+
// }`,
|
|
38837
|
+
,
|
|
38727
38838
|
doc_single_read: function doc_single_read(key) {
|
|
38728
38839
|
return {
|
|
38729
38840
|
db_name: dbName,
|
|
@@ -38732,12 +38843,14 @@ var queries$2 = {
|
|
|
38732
38843
|
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:(for pract in Practitioner filter pract._id == CAPatientClinicalDocs.practitionerid return merge(pract,{name:(for doc in HumanNameMaster filter doc._id in pract.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))})) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{'role':MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(practrole).role).coding) RETURN DOCUMENT(cod) )}) }) ) }))},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})"
|
|
38733
38844
|
};
|
|
38734
38845
|
},
|
|
38735
|
-
doc_agnst_category: function doc_agnst_category(category, speciality, encoumter, practitioner) {
|
|
38846
|
+
doc_agnst_category: function doc_agnst_category(category, speciality, encoumter, practitioner, patient_id) {
|
|
38736
38847
|
return {
|
|
38737
38848
|
db_name: dbName,
|
|
38738
38849
|
entity: "CAPatientClinicalDocs",
|
|
38739
|
-
filter:
|
|
38740
|
-
|
|
38850
|
+
// filter: `CAPatientClinicalDocs.activestatus ==true && CAPatientClinicalDocs.doccategory=='${category}' || CAPatientClinicalDocs.specialty=='${speciality}' || CAPatientClinicalDocs.encounterid=='${encoumter}' || CAPatientClinicalDocs.practitionerid=='${practitioner}'`,
|
|
38851
|
+
filter: "CAPatientClinicalDocs.patientid =='".concat(patient_id, "' && CAPatientClinicalDocs.activestatus ==true && (CAPatientClinicalDocs.doccategory=='").concat(category, "' || CAPatientClinicalDocs.specialty=='").concat(speciality, "' || CAPatientClinicalDocs.encounterid=='").concat(encoumter, "' || CAPatientClinicalDocs.practitionerid=='").concat(practitioner, "')"),
|
|
38852
|
+
return_fields: "MERGE(CAPatientClinicalDocs, {organizationid:document(CAPatientClinicalDocs.organizationid)},{doccategory:(document(CAPatientClinicalDocs.doccategory))}, {patientid:document(CAPatientClinicalDocs.patientid)},{practitionerid:(for pract in Practitioner filter pract._id == CAPatientClinicalDocs.practitionerid return merge(pract,{name:(for doc in HumanNameMaster filter doc._id in pract.name return merge(doc,{use:(document(doc.use)),prefix:(document(doc.prefix)),suffix:(document(doc.suffix))})) ,practitioner_role:(FOR practrole IN TO_ARRAY(pract.practitioner_role) RETURN MERGE(DOCUMENT(practrole),{'role':MERGE(DOCUMENT(DOCUMENT(practrole).role),{coding:(FOR cod IN TO_ARRAY(DOCUMENT(DOCUMENT(practrole).role).coding) RETURN DOCUMENT(cod) )}) }) ) }))},{encounterid:document(CAPatientClinicalDocs.encounterid),doctype:(document(CAPatientClinicalDocs.doctype)),reason:(document(CAPatientClinicalDocs.reason)),encountertype:(document(CAPatientClinicalDocs.encountertype)),specialty:(document(CAPatientClinicalDocs.specialty))})",
|
|
38853
|
+
sort: "CAPatientClinicalDocs.updatedate desc"
|
|
38741
38854
|
};
|
|
38742
38855
|
},
|
|
38743
38856
|
//....not used....//
|
|
@@ -38891,9 +39004,7 @@ var generatesingleRead = function generatesingleRead(val, state) {
|
|
|
38891
39004
|
}; //generate doc against category
|
|
38892
39005
|
|
|
38893
39006
|
var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
|
|
38894
|
-
var orderedData = data
|
|
38895
|
-
return (b === null || b === void 0 ? void 0 : b.createddate) - (a === null || a === void 0 ? void 0 : a.createddate);
|
|
38896
|
-
});
|
|
39007
|
+
var orderedData = data;
|
|
38897
39008
|
var obj = {};
|
|
38898
39009
|
orderedData.forEach(function (element) {
|
|
38899
39010
|
var _element$doccategory3;
|
|
@@ -38911,7 +39022,7 @@ var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
|
|
|
38911
39022
|
var userObj = _objectSpread2({
|
|
38912
39023
|
title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner = element.practitionerid[0]) === null || _element$practitioner === void 0 ? void 0 : (_element$practitioner2 = _element$practitioner.practitioner_role) === null || _element$practitioner2 === void 0 ? void 0 : (_element$practitioner3 = _element$practitioner2[0]) === null || _element$practitioner3 === void 0 ? void 0 : (_element$practitioner4 = _element$practitioner3.role) === null || _element$practitioner4 === void 0 ? void 0 : (_element$practitioner5 = _element$practitioner4.coding[0]) === null || _element$practitioner5 === void 0 ? void 0 : _element$practitioner5.display : "",
|
|
38913
39024
|
//title: "Role",
|
|
38914
|
-
date: utcTOLocal$1(element.
|
|
39025
|
+
date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm a"),
|
|
38915
39026
|
name: element.practitionerid.length > 0 ? makeName(((_element$practitioner6 = element.practitionerid[0]) === null || _element$practitioner6 === void 0 ? void 0 : _element$practitioner6.name[0]) || {}) : "Dummy"
|
|
38916
39027
|
}, element);
|
|
38917
39028
|
|
|
@@ -38939,7 +39050,7 @@ var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
|
|
|
38939
39050
|
|
|
38940
39051
|
var _userObj = _objectSpread2({
|
|
38941
39052
|
title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner7 = element.practitionerid[0]) === null || _element$practitioner7 === void 0 ? void 0 : (_element$practitioner8 = _element$practitioner7.practitioner_role) === null || _element$practitioner8 === void 0 ? void 0 : (_element$practitioner9 = _element$practitioner8[0]) === null || _element$practitioner9 === void 0 ? void 0 : (_element$practitioner10 = _element$practitioner9.role) === null || _element$practitioner10 === void 0 ? void 0 : (_element$practitioner11 = _element$practitioner10.coding[0]) === null || _element$practitioner11 === void 0 ? void 0 : _element$practitioner11.display : "",
|
|
38942
|
-
date: utcTOLocal$1(element.
|
|
39053
|
+
date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm:ss a"),
|
|
38943
39054
|
name: element.practitionerid.length > 0 ? makeName(((_element$practitioner12 = element.practitionerid[0]) === null || _element$practitioner12 === void 0 ? void 0 : _element$practitioner12.name[0]) || {}) : "Dummy"
|
|
38944
39055
|
}, element);
|
|
38945
39056
|
|
|
@@ -38956,7 +39067,7 @@ var genreateDocAgnstCategory = function genreateDocAgnstCategory(data) {
|
|
|
38956
39067
|
};
|
|
38957
39068
|
var generatePractitoner = function generatePractitoner(data) {
|
|
38958
39069
|
var orderedData = data.sort(function (a, b) {
|
|
38959
|
-
return (b === null || b === void 0 ? void 0 : b.
|
|
39070
|
+
return (b === null || b === void 0 ? void 0 : b.updatedate) - (a === null || a === void 0 ? void 0 : a.updatedate);
|
|
38960
39071
|
});
|
|
38961
39072
|
var arr = [];
|
|
38962
39073
|
orderedData.forEach(function (element) {
|
|
@@ -38964,7 +39075,7 @@ var generatePractitoner = function generatePractitoner(data) {
|
|
|
38964
39075
|
|
|
38965
39076
|
var userObj = _objectSpread2({
|
|
38966
39077
|
title: element.practitionerid.length > 0 ? element === null || element === void 0 ? void 0 : (_element$practitioner13 = element.practitionerid[0]) === null || _element$practitioner13 === void 0 ? void 0 : (_element$practitioner14 = _element$practitioner13.practitioner_role[0]) === null || _element$practitioner14 === void 0 ? void 0 : (_element$practitioner15 = _element$practitioner14.role) === null || _element$practitioner15 === void 0 ? void 0 : (_element$practitioner16 = _element$practitioner15.coding[0]) === null || _element$practitioner16 === void 0 ? void 0 : _element$practitioner16.display : "",
|
|
38967
|
-
date: utcTOLocal$1(element.
|
|
39078
|
+
date: utcTOLocal$1(element.updatedate, "MMMM Do h:mm a"),
|
|
38968
39079
|
name: element.practitionerid.length > 0 ? makeName(((_element$practitioner17 = element.practitionerid[0]) === null || _element$practitioner17 === void 0 ? void 0 : _element$practitioner17.name[0]) || {}) : "Dummy"
|
|
38969
39080
|
}, element);
|
|
38970
39081
|
|
|
@@ -39293,6 +39404,7 @@ var DOCC_READ = createAsyncThunk("DoccSlice/docc_read", /*#__PURE__*/_asyncToGen
|
|
|
39293
39404
|
_ref14,
|
|
39294
39405
|
rejectWithValue,
|
|
39295
39406
|
getState,
|
|
39407
|
+
patient_id,
|
|
39296
39408
|
data,
|
|
39297
39409
|
res,
|
|
39298
39410
|
_args7 = arguments;
|
|
@@ -39304,31 +39416,32 @@ var DOCC_READ = createAsyncThunk("DoccSlice/docc_read", /*#__PURE__*/_asyncToGen
|
|
|
39304
39416
|
payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
|
|
39305
39417
|
_ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue, getState = _ref14.getState;
|
|
39306
39418
|
_context7.prev = 2;
|
|
39307
|
-
|
|
39419
|
+
patient_id = payload.patient_id;
|
|
39420
|
+
_context7.next = 6;
|
|
39308
39421
|
return fetchData$3({
|
|
39309
|
-
body: queries$2.doc_read
|
|
39422
|
+
body: JSON.stringify(queries$2.doc_read(patient_id))
|
|
39310
39423
|
}, __readDocumentUrl__);
|
|
39311
39424
|
|
|
39312
|
-
case
|
|
39425
|
+
case 6:
|
|
39313
39426
|
data = _context7.sent;
|
|
39314
39427
|
res = generateResJson(data.result);
|
|
39315
39428
|
return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
39316
39429
|
data: res
|
|
39317
39430
|
}));
|
|
39318
39431
|
|
|
39319
|
-
case
|
|
39320
|
-
_context7.prev =
|
|
39432
|
+
case 11:
|
|
39433
|
+
_context7.prev = 11;
|
|
39321
39434
|
_context7.t0 = _context7["catch"](2);
|
|
39322
39435
|
return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
39323
39436
|
message: _context7.t0.message
|
|
39324
39437
|
})));
|
|
39325
39438
|
|
|
39326
|
-
case
|
|
39439
|
+
case 14:
|
|
39327
39440
|
case "end":
|
|
39328
39441
|
return _context7.stop();
|
|
39329
39442
|
}
|
|
39330
39443
|
}
|
|
39331
|
-
}, _callee7, null, [[2,
|
|
39444
|
+
}, _callee7, null, [[2, 11]]);
|
|
39332
39445
|
})));
|
|
39333
39446
|
var DOCC_SINGLE_READ = createAsyncThunk("DoccSlice/docc_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
|
|
39334
39447
|
var payload,
|
|
@@ -39387,6 +39500,7 @@ var DOCC_AGAINST_CATEGORY = createAsyncThunk("DoccSlice/docc_agnst_category", /*
|
|
|
39387
39500
|
speciality,
|
|
39388
39501
|
encoumter,
|
|
39389
39502
|
practitioner,
|
|
39503
|
+
patient_id,
|
|
39390
39504
|
data,
|
|
39391
39505
|
res,
|
|
39392
39506
|
_args9 = arguments;
|
|
@@ -39398,10 +39512,10 @@ var DOCC_AGAINST_CATEGORY = createAsyncThunk("DoccSlice/docc_agnst_category", /*
|
|
|
39398
39512
|
payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
|
39399
39513
|
_ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue, getState = _ref18.getState;
|
|
39400
39514
|
_context9.prev = 2;
|
|
39401
|
-
category = payload.category, speciality = payload.speciality, encoumter = payload.encoumter, practitioner = payload.practitioner;
|
|
39515
|
+
category = payload.category, speciality = payload.speciality, encoumter = payload.encoumter, practitioner = payload.practitioner, patient_id = payload.patient_id;
|
|
39402
39516
|
_context9.next = 6;
|
|
39403
39517
|
return fetchData$3({
|
|
39404
|
-
body: JSON.stringify(queries$2.doc_agnst_category(category, speciality, encoumter, practitioner))
|
|
39518
|
+
body: JSON.stringify(queries$2.doc_agnst_category(category, speciality, encoumter, practitioner, patient_id))
|
|
39405
39519
|
}, __readDocumentUrl__);
|
|
39406
39520
|
|
|
39407
39521
|
case 6:
|
|
@@ -40566,7 +40680,7 @@ var query$4 = {
|
|
|
40566
40680
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40567
40681
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('First Visit')"
|
|
40568
40682
|
},
|
|
40569
|
-
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40683
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:CONTAINS(prac.speciality,'CodeableConceptMaster')?(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding)):(for cod in CodingMaster filter cod._id==prac.speciality return cod)}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40570
40684
|
};
|
|
40571
40685
|
},
|
|
40572
40686
|
getNewPatientsDoctor: function getNewPatientsDoctor(data) {
|
|
@@ -40577,7 +40691,7 @@ var query$4 = {
|
|
|
40577
40691
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40578
40692
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('New Patient')"
|
|
40579
40693
|
},
|
|
40580
|
-
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40694
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:CONTAINS(prac.speciality,'CodeableConceptMaster')?(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding)):(for cod in CodingMaster filter cod._id==prac.speciality return cod)}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40581
40695
|
};
|
|
40582
40696
|
},
|
|
40583
40697
|
getOtherVisitsDoctor: function getOtherVisitsDoctor(data) {
|
|
@@ -40588,7 +40702,7 @@ var query$4 = {
|
|
|
40588
40702
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40589
40703
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Other Visits')"
|
|
40590
40704
|
},
|
|
40591
|
-
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40705
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:CONTAINS(prac.speciality,'CodeableConceptMaster')?(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding)):(for cod in CodingMaster filter cod._id==prac.speciality return cod)}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40592
40706
|
};
|
|
40593
40707
|
},
|
|
40594
40708
|
getTodayVisitsDoctor: function getTodayVisitsDoctor(data) {
|
|
@@ -40599,7 +40713,7 @@ var query$4 = {
|
|
|
40599
40713
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "' "),
|
|
40600
40714
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(first(document(Encounter.statushistory[*].status)[*].display))=='checked-in'"
|
|
40601
40715
|
},
|
|
40602
|
-
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40716
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:CONTAINS(prac.speciality,'CodeableConceptMaster')?(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding)):(for cod in CodingMaster filter cod._id==prac.speciality return cod)}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40603
40717
|
};
|
|
40604
40718
|
},
|
|
40605
40719
|
getWalkInsDoctor: function getWalkInsDoctor(data) {
|
|
@@ -40610,7 +40724,7 @@ var query$4 = {
|
|
|
40610
40724
|
Appointment: "Appointment.activestatus==true && Appointment.start>=".concat(data === null || data === void 0 ? void 0 : data.startDate, " && Appointment.end<=").concat(data === null || data === void 0 ? void 0 : data.endDate, " && document(Appointment.resourcecode).id ==").concat(data === null || data === void 0 ? void 0 : data.practionerID, " && Appointment.orgid=='").concat(data === null || data === void 0 ? void 0 : data.orgID, "'"),
|
|
40611
40725
|
Encounter: "Appointment.id in Encounter.appointmentId && lower(Encounter.visit_type)==lower('Walkin')"
|
|
40612
40726
|
},
|
|
40613
|
-
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding))}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40727
|
+
return_fields: "merge(Encounter,{patient_id:(for pat in Patient filter pat.id==Encounter.patient_id return {id : pat.id, _id : pat._id,name:(for hn in HumanNameMaster filter hn._id in pat.name return merge(hn,{use:document(hn.use),prefix:document(hn.prefix),suffix:document(hn.suffix)})),telecom:document(pat.telecom),gender:document(pat.gender),MRN:pat.alias,age:pat.age}),status:document(Encounter.status),practitioner_details:(for prac in Encounter.practitioner_details return merge(prac,{speciality:CONTAINS(prac.speciality,'CodeableConceptMaster')?(for cod in CodeableConceptMaster filter cod._id==prac.speciality return document(cod.coding)):(for cod in CodingMaster filter cod._id==prac.speciality return cod)}))},{appointmentId:(filter Appointment.id in Encounter.appointmentId return merge(Appointment,{PersonID:(for per in Person filter per.Id in Appointment.PersonID return merge(per,{name:(for nam in HumanNameMaster filter nam._id in per.name return merge(nam,{use:document(nam.use),prefix:document(nam.prefix),suffix:document(nam.suffix)}))},{gender:document(per.gender)},{photo:document(per.photo)})),resourcecode:merge(document(Appointment.resourcecode),{name:merge(document(document(Appointment.resourcecode).name))}),SpecialtyID:(for spe in CodeableConceptMaster filter Appointment.SpecialtyID any == spe.id return merge(spe,{coding:document(spe.coding)}))}))})"
|
|
40614
40728
|
};
|
|
40615
40729
|
}
|
|
40616
40730
|
};
|
|
@@ -41872,7 +41986,7 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
|
|
|
41872
41986
|
data = _context13.sent;
|
|
41873
41987
|
debugger;
|
|
41874
41988
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result13 = data.result) === null || _data$result13 === void 0 ? void 0 : _data$result13.map(function (_) {
|
|
41875
|
-
var _$Appointment62, _$Appointment62$Perso, _$Appointment62$Perso2, _$Appointment62$Perso3, _$Appointment63, _$Appointment63$Perso, _$Appointment63$Perso2, _$Appointment63$Perso3, _$Appointment64, _$Appointment64$Perso, _$Appointment64$Perso2, _$
|
|
41989
|
+
var _$Appointment62, _$Appointment62$Perso, _$Appointment62$Perso2, _$Appointment62$Perso3, _$Appointment63, _$Appointment63$Perso, _$Appointment63$Perso2, _$Appointment63$Perso3, _$Appointment64, _$Appointment64$Perso, _$Appointment64$Perso2, _$Appointment65, _$Appointment65$Perso, _$Appointment65$Perso2, _$Appointment65$Perso3, _$Appointment65$Perso4, _$Appointment66, _$Appointment66$Perso, _$Appointment66$Perso2, _$Appointment66$Perso3, _$Appointment66$Perso4, _$Appointment67, _$Appointment68, _$Appointment69, _$Appointment70, _$Appointment71, _$Encounter$0$visit_t2, _$Encounter37, _$Encounter37$, _$Appointment72, _$Appointment72$resou, _$Appointment73, _$Appointment73$Speci, _$Appointment73$Speci2, _$Appointment73$Speci3, _$Appointment73$Speci4, _$Appointment74, _$Appointment74$orgid, _$Appointment75;
|
|
41876
41990
|
|
|
41877
41991
|
return {
|
|
41878
41992
|
// img: _?.Appointment?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -41890,9 +42004,9 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
|
|
|
41890
42004
|
name: makeName((_ === null || _ === void 0 ? void 0 : (_$Appointment62 = _.Appointment) === null || _$Appointment62 === void 0 ? void 0 : (_$Appointment62$Perso = _$Appointment62.PersonID) === null || _$Appointment62$Perso === void 0 ? void 0 : (_$Appointment62$Perso2 = _$Appointment62$Perso[0]) === null || _$Appointment62$Perso2 === void 0 ? void 0 : (_$Appointment62$Perso3 = _$Appointment62$Perso2.name) === null || _$Appointment62$Perso3 === void 0 ? void 0 : _$Appointment62$Perso3[0]) || {}),
|
|
41891
42005
|
mrn: ((_$Appointment63 = _.Appointment) === null || _$Appointment63 === void 0 ? void 0 : (_$Appointment63$Perso = _$Appointment63.PersonID) === null || _$Appointment63$Perso === void 0 ? void 0 : (_$Appointment63$Perso2 = _$Appointment63$Perso[0]) === null || _$Appointment63$Perso2 === void 0 ? void 0 : (_$Appointment63$Perso3 = _$Appointment63$Perso2.MRN) === null || _$Appointment63$Perso3 === void 0 ? void 0 : _$Appointment63$Perso3[0]) || "",
|
|
41892
42006
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$Appointment64 = _.Appointment) === null || _$Appointment64 === void 0 ? void 0 : (_$Appointment64$Perso = _$Appointment64.PersonID) === null || _$Appointment64$Perso === void 0 ? void 0 : (_$Appointment64$Perso2 = _$Appointment64$Perso[0]) === null || _$Appointment64$Perso2 === void 0 ? void 0 : _$Appointment64$Perso2.birthDay),
|
|
41893
|
-
contact: (_
|
|
41894
|
-
refNo: (_ === null || _ === void 0 ? void 0 : (_$
|
|
41895
|
-
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$
|
|
42007
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$Appointment65 = _.Appointment) === null || _$Appointment65 === void 0 ? void 0 : (_$Appointment65$Perso = _$Appointment65.PersonID) === null || _$Appointment65$Perso === void 0 ? void 0 : (_$Appointment65$Perso2 = _$Appointment65$Perso[0]) === null || _$Appointment65$Perso2 === void 0 ? void 0 : (_$Appointment65$Perso3 = _$Appointment65$Perso2.telecom) === null || _$Appointment65$Perso3 === void 0 ? void 0 : (_$Appointment65$Perso4 = _$Appointment65$Perso3[0]) === null || _$Appointment65$Perso4 === void 0 ? void 0 : _$Appointment65$Perso4.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$Appointment66 = _.Appointment) === null || _$Appointment66 === void 0 ? void 0 : (_$Appointment66$Perso = _$Appointment66.PersonID) === null || _$Appointment66$Perso === void 0 ? void 0 : (_$Appointment66$Perso2 = _$Appointment66$Perso[0]) === null || _$Appointment66$Perso2 === void 0 ? void 0 : (_$Appointment66$Perso3 = _$Appointment66$Perso2.telecom) === null || _$Appointment66$Perso3 === void 0 ? void 0 : (_$Appointment66$Perso4 = _$Appointment66$Perso3[0]) === null || _$Appointment66$Perso4 === void 0 ? void 0 : _$Appointment66$Perso4.value) : "",
|
|
42008
|
+
refNo: (_ === null || _ === void 0 ? void 0 : (_$Appointment67 = _.Appointment) === null || _$Appointment67 === void 0 ? void 0 : _$Appointment67.appno) || "",
|
|
42009
|
+
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$Appointment68 = _.Appointment) === null || _$Appointment68 === void 0 ? void 0 : _$Appointment68.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment69 = _.Appointment) === null || _$Appointment69 === void 0 ? void 0 : _$Appointment69.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$Appointment70 = _.Appointment) === null || _$Appointment70 === void 0 ? void 0 : _$Appointment70.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$Appointment71 = _.Appointment) === null || _$Appointment71 === void 0 ? void 0 : _$Appointment71.start, "hh:mm A") : ""),
|
|
41896
42010
|
//encounterNo : _?.Encounter?.[0]?.encounter_no ?? "",
|
|
41897
42011
|
visitType: (_$Encounter$0$visit_t2 = _ === null || _ === void 0 ? void 0 : (_$Encounter37 = _.Encounter) === null || _$Encounter37 === void 0 ? void 0 : (_$Encounter37$ = _$Encounter37[0]) === null || _$Encounter37$ === void 0 ? void 0 : _$Encounter37$.visit_type) !== null && _$Encounter$0$visit_t2 !== void 0 ? _$Encounter$0$visit_t2 : "",
|
|
41898
42012
|
// mrn: _?.patient_id?.[0]?.alias || "",
|
|
@@ -41912,10 +42026,10 @@ var GET_APPOINTMENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getAppo
|
|
|
41912
42026
|
// }).join(", ") ?? "",
|
|
41913
42027
|
// clinic: _?.Appointment?.orgid?.name ?? ""
|
|
41914
42028
|
// }),
|
|
41915
|
-
practitionerName: makeName(_ === null || _ === void 0 ? void 0 : (_$
|
|
41916
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$
|
|
41917
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
41918
|
-
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42029
|
+
practitionerName: makeName(_ === null || _ === void 0 ? void 0 : (_$Appointment72 = _.Appointment) === null || _$Appointment72 === void 0 ? void 0 : (_$Appointment72$resou = _$Appointment72.resourcecode) === null || _$Appointment72$resou === void 0 ? void 0 : _$Appointment72$resou.name),
|
|
42030
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$Appointment73 = _.Appointment) === null || _$Appointment73 === void 0 ? void 0 : (_$Appointment73$Speci = _$Appointment73.SpecialtyID) === null || _$Appointment73$Speci === void 0 ? void 0 : (_$Appointment73$Speci2 = _$Appointment73$Speci[0]) === null || _$Appointment73$Speci2 === void 0 ? void 0 : (_$Appointment73$Speci3 = _$Appointment73$Speci2.coding) === null || _$Appointment73$Speci3 === void 0 ? void 0 : (_$Appointment73$Speci4 = _$Appointment73$Speci3[0]) === null || _$Appointment73$Speci4 === void 0 ? void 0 : _$Appointment73$Speci4.display) || "",
|
|
42031
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$Appointment74 = _.Appointment) === null || _$Appointment74 === void 0 ? void 0 : (_$Appointment74$orgid = _$Appointment74.orgid) === null || _$Appointment74$orgid === void 0 ? void 0 : _$Appointment74$orgid.name) || "",
|
|
42032
|
+
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$Appointment75 = _.Appointment) === null || _$Appointment75 === void 0 ? void 0 : _$Appointment75.appstatus) || "",
|
|
41919
42033
|
// "View Patient": true,
|
|
41920
42034
|
// Attend: true,
|
|
41921
42035
|
// type: "OP",
|
|
@@ -41971,7 +42085,7 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
|
|
|
41971
42085
|
case 5:
|
|
41972
42086
|
data = _context14.sent;
|
|
41973
42087
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result14 = data.result) === null || _data$result14 === void 0 ? void 0 : _data$result14.map(function (_) {
|
|
41974
|
-
var _$patient_id19, _$patient_id19$, _$patient_id19$$name, _$patient_id20, _$patient_id20$, _$appointmentId36, _$appointmentId36$, _$appointmentId36$$Pe, _$appointmentId36$$Pe2, _$
|
|
42088
|
+
var _$patient_id19, _$patient_id19$, _$patient_id19$$name, _$patient_id20, _$patient_id20$, _$appointmentId36, _$appointmentId36$, _$appointmentId36$$Pe, _$appointmentId36$$Pe2, _$patient_id21, _$patient_id21$, _$patient_id21$$telec, _$patient_id21$$telec2, _$patient_id22, _$patient_id22$, _$patient_id22$$telec, _$patient_id22$$telec2, _$appointmentId37, _$appointmentId37$, _$appointmentId38, _$appointmentId38$, _$appointmentId39, _$appointmentId39$, _$appointmentId40, _$appointmentId40$, _$appointmentId41, _$appointmentId41$, _$visit_type6, _$practitioner_detail26, _$practitioner_detail27, _$practitioner_detail28, _$practitioner_detail29, _$practitioner_detail30, _$practitioner_detail31, _$practitioner_detail32, _$practitioner_detail33, _$practitioner_detail34, _$status6;
|
|
41975
42089
|
|
|
41976
42090
|
return {
|
|
41977
42091
|
// img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -42014,7 +42128,7 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
|
|
|
42014
42128
|
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id19 = _.patient_id) === null || _$patient_id19 === void 0 ? void 0 : (_$patient_id19$ = _$patient_id19[0]) === null || _$patient_id19$ === void 0 ? void 0 : (_$patient_id19$$name = _$patient_id19$.name) === null || _$patient_id19$$name === void 0 ? void 0 : _$patient_id19$$name[0]) || {}),
|
|
42015
42129
|
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id20 = _.patient_id) === null || _$patient_id20 === void 0 ? void 0 : (_$patient_id20$ = _$patient_id20[0]) === null || _$patient_id20$ === void 0 ? void 0 : _$patient_id20$.MRN) || "",
|
|
42016
42130
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId36 = _.appointmentId) === null || _$appointmentId36 === void 0 ? void 0 : (_$appointmentId36$ = _$appointmentId36[0]) === null || _$appointmentId36$ === void 0 ? void 0 : (_$appointmentId36$$Pe = _$appointmentId36$.PersonID) === null || _$appointmentId36$$Pe === void 0 ? void 0 : (_$appointmentId36$$Pe2 = _$appointmentId36$$Pe[0]) === null || _$appointmentId36$$Pe2 === void 0 ? void 0 : _$appointmentId36$$Pe2.birthDay),
|
|
42017
|
-
contact: (_
|
|
42131
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id21 = _.patient_id) === null || _$patient_id21 === void 0 ? void 0 : (_$patient_id21$ = _$patient_id21[0]) === null || _$patient_id21$ === void 0 ? void 0 : (_$patient_id21$$telec = _$patient_id21$.telecom) === null || _$patient_id21$$telec === void 0 ? void 0 : (_$patient_id21$$telec2 = _$patient_id21$$telec[0]) === null || _$patient_id21$$telec2 === void 0 ? void 0 : _$patient_id21$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id22 = _.patient_id) === null || _$patient_id22 === void 0 ? void 0 : (_$patient_id22$ = _$patient_id22[0]) === null || _$patient_id22$ === void 0 ? void 0 : (_$patient_id22$$telec = _$patient_id22$.telecom) === null || _$patient_id22$$telec === void 0 ? void 0 : (_$patient_id22$$telec2 = _$patient_id22$$telec[0]) === null || _$patient_id22$$telec2 === void 0 ? void 0 : _$patient_id22$$telec2.value) : "",
|
|
42018
42132
|
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId37 = _.appointmentId) === null || _$appointmentId37 === void 0 ? void 0 : (_$appointmentId37$ = _$appointmentId37[0]) === null || _$appointmentId37$ === void 0 ? void 0 : _$appointmentId37$.appno) || "",
|
|
42019
42133
|
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId38 = _.appointmentId) === null || _$appointmentId38 === void 0 ? void 0 : (_$appointmentId38$ = _$appointmentId38[0]) === null || _$appointmentId38$ === void 0 ? void 0 : _$appointmentId38$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId39 = _.appointmentId) === null || _$appointmentId39 === void 0 ? void 0 : (_$appointmentId39$ = _$appointmentId39[0]) === null || _$appointmentId39$ === void 0 ? void 0 : _$appointmentId39$.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId40 = _.appointmentId) === null || _$appointmentId40 === void 0 ? void 0 : (_$appointmentId40$ = _$appointmentId40[0]) === null || _$appointmentId40$ === void 0 ? void 0 : _$appointmentId40$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId41 = _.appointmentId) === null || _$appointmentId41 === void 0 ? void 0 : (_$appointmentId41$ = _$appointmentId41[0]) === null || _$appointmentId41$ === void 0 ? void 0 : _$appointmentId41$.start, "hh:mm A") : ""),
|
|
42020
42134
|
// date: JSON.stringify({
|
|
@@ -42034,8 +42148,8 @@ var GET_FIRST_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getFirs
|
|
|
42034
42148
|
//encounterNo : _?.Appointment?.appointmentType ?? "en no",
|
|
42035
42149
|
visitType: (_$visit_type6 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type6 !== void 0 ? _$visit_type6 : "",
|
|
42036
42150
|
practitionerName: (_$practitioner_detail26 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail27 = _.practitioner_details) === null || _$practitioner_detail27 === void 0 ? void 0 : (_$practitioner_detail28 = _$practitioner_detail27[0]) === null || _$practitioner_detail28 === void 0 ? void 0 : _$practitioner_detail28.id_name) !== null && _$practitioner_detail26 !== void 0 ? _$practitioner_detail26 : "",
|
|
42037
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail29 = _.practitioner_details) === null || _$practitioner_detail29 === void 0 ? void 0 : (_$practitioner_detail30 = _$practitioner_detail29[0]) === null || _$practitioner_detail30 === void 0 ? void 0 : (_$practitioner_detail31 = _$practitioner_detail30.speciality) === null || _$practitioner_detail31 === void 0 ? void 0 : (_$practitioner_detail32 = _$practitioner_detail31[0]) === null || _$practitioner_detail32 === void 0 ? void 0 :
|
|
42038
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42151
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail29 = _.practitioner_details) === null || _$practitioner_detail29 === void 0 ? void 0 : (_$practitioner_detail30 = _$practitioner_detail29[0]) === null || _$practitioner_detail30 === void 0 ? void 0 : (_$practitioner_detail31 = _$practitioner_detail30.speciality) === null || _$practitioner_detail31 === void 0 ? void 0 : (_$practitioner_detail32 = _$practitioner_detail31[0]) === null || _$practitioner_detail32 === void 0 ? void 0 : _$practitioner_detail32.display) || "",
|
|
42152
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail33 = _.practitioner_details) === null || _$practitioner_detail33 === void 0 ? void 0 : (_$practitioner_detail34 = _$practitioner_detail33[0]) === null || _$practitioner_detail34 === void 0 ? void 0 : _$practitioner_detail34.clinic) || "",
|
|
42039
42153
|
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status6 = _.status) === null || _$status6 === void 0 ? void 0 : _$status6.display) || "",
|
|
42040
42154
|
action: true
|
|
42041
42155
|
};
|
|
@@ -42082,7 +42196,7 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
|
|
|
42082
42196
|
case 5:
|
|
42083
42197
|
data = _context15.sent;
|
|
42084
42198
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result15 = data.result) === null || _data$result15 === void 0 ? void 0 : _data$result15.map(function (_) {
|
|
42085
|
-
var _$
|
|
42199
|
+
var _$patient_id23, _$patient_id23$, _$patient_id23$$name, _$patient_id24, _$patient_id24$, _$appointmentId42, _$appointmentId42$, _$appointmentId42$$Pe, _$appointmentId42$$Pe2, _$patient_id25, _$patient_id25$, _$patient_id25$$telec, _$patient_id25$$telec2, _$patient_id26, _$patient_id26$, _$patient_id26$$telec, _$patient_id26$$telec2, _$appointmentId43, _$appointmentId43$, _$appointmentId44, _$appointmentId44$, _$appointmentId45, _$appointmentId45$, _$appointmentId46, _$appointmentId46$, _$appointmentId47, _$appointmentId47$, _$visit_type7, _$practitioner_detail35, _$practitioner_detail36, _$practitioner_detail37, _$practitioner_detail38, _$practitioner_detail39, _$practitioner_detail40, _$practitioner_detail41, _$practitioner_detail42, _$practitioner_detail43, _$status7;
|
|
42086
42200
|
|
|
42087
42201
|
return {
|
|
42088
42202
|
// img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -42122,10 +42236,10 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
|
|
|
42122
42236
|
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
|
|
42123
42237
|
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
|
|
42124
42238
|
// }),
|
|
42125
|
-
name: makeName((_ === null || _ === void 0 ? void 0 : (_$
|
|
42126
|
-
mrn: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42239
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id23 = _.patient_id) === null || _$patient_id23 === void 0 ? void 0 : (_$patient_id23$ = _$patient_id23[0]) === null || _$patient_id23$ === void 0 ? void 0 : (_$patient_id23$$name = _$patient_id23$.name) === null || _$patient_id23$$name === void 0 ? void 0 : _$patient_id23$$name[0]) || {}),
|
|
42240
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id24 = _.patient_id) === null || _$patient_id24 === void 0 ? void 0 : (_$patient_id24$ = _$patient_id24[0]) === null || _$patient_id24$ === void 0 ? void 0 : _$patient_id24$.MRN) || "",
|
|
42127
42241
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId42 = _.appointmentId) === null || _$appointmentId42 === void 0 ? void 0 : (_$appointmentId42$ = _$appointmentId42[0]) === null || _$appointmentId42$ === void 0 ? void 0 : (_$appointmentId42$$Pe = _$appointmentId42$.PersonID) === null || _$appointmentId42$$Pe === void 0 ? void 0 : (_$appointmentId42$$Pe2 = _$appointmentId42$$Pe[0]) === null || _$appointmentId42$$Pe2 === void 0 ? void 0 : _$appointmentId42$$Pe2.birthDay),
|
|
42128
|
-
contact: (_
|
|
42242
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id25 = _.patient_id) === null || _$patient_id25 === void 0 ? void 0 : (_$patient_id25$ = _$patient_id25[0]) === null || _$patient_id25$ === void 0 ? void 0 : (_$patient_id25$$telec = _$patient_id25$.telecom) === null || _$patient_id25$$telec === void 0 ? void 0 : (_$patient_id25$$telec2 = _$patient_id25$$telec[0]) === null || _$patient_id25$$telec2 === void 0 ? void 0 : _$patient_id25$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id26 = _.patient_id) === null || _$patient_id26 === void 0 ? void 0 : (_$patient_id26$ = _$patient_id26[0]) === null || _$patient_id26$ === void 0 ? void 0 : (_$patient_id26$$telec = _$patient_id26$.telecom) === null || _$patient_id26$$telec === void 0 ? void 0 : (_$patient_id26$$telec2 = _$patient_id26$$telec[0]) === null || _$patient_id26$$telec2 === void 0 ? void 0 : _$patient_id26$$telec2.value) : "",
|
|
42129
42243
|
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId43 = _.appointmentId) === null || _$appointmentId43 === void 0 ? void 0 : (_$appointmentId43$ = _$appointmentId43[0]) === null || _$appointmentId43$ === void 0 ? void 0 : _$appointmentId43$.appno) || "",
|
|
42130
42244
|
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId44 = _.appointmentId) === null || _$appointmentId44 === void 0 ? void 0 : (_$appointmentId44$ = _$appointmentId44[0]) === null || _$appointmentId44$ === void 0 ? void 0 : _$appointmentId44$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId45 = _.appointmentId) === null || _$appointmentId45 === void 0 ? void 0 : (_$appointmentId45$ = _$appointmentId45[0]) === null || _$appointmentId45$ === void 0 ? void 0 : _$appointmentId45$.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId46 = _.appointmentId) === null || _$appointmentId46 === void 0 ? void 0 : (_$appointmentId46$ = _$appointmentId46[0]) === null || _$appointmentId46$ === void 0 ? void 0 : _$appointmentId46$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId47 = _.appointmentId) === null || _$appointmentId47 === void 0 ? void 0 : (_$appointmentId47$ = _$appointmentId47[0]) === null || _$appointmentId47$ === void 0 ? void 0 : _$appointmentId47$.start, "hh:mm A") : ""),
|
|
42131
42245
|
// date: JSON.stringify({
|
|
@@ -42143,9 +42257,9 @@ var GET_NEW_PATIENTS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getNewP
|
|
|
42143
42257
|
// clinic: _?.practitioner_details?.[0]?.clinic || ""
|
|
42144
42258
|
// }),
|
|
42145
42259
|
visitType: (_$visit_type7 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type7 !== void 0 ? _$visit_type7 : "",
|
|
42146
|
-
practitionerName: (_$
|
|
42147
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42148
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42260
|
+
practitionerName: (_$practitioner_detail35 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail36 = _.practitioner_details) === null || _$practitioner_detail36 === void 0 ? void 0 : (_$practitioner_detail37 = _$practitioner_detail36[0]) === null || _$practitioner_detail37 === void 0 ? void 0 : _$practitioner_detail37.id_name) !== null && _$practitioner_detail35 !== void 0 ? _$practitioner_detail35 : "",
|
|
42261
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail38 = _.practitioner_details) === null || _$practitioner_detail38 === void 0 ? void 0 : (_$practitioner_detail39 = _$practitioner_detail38[0]) === null || _$practitioner_detail39 === void 0 ? void 0 : (_$practitioner_detail40 = _$practitioner_detail39.speciality) === null || _$practitioner_detail40 === void 0 ? void 0 : (_$practitioner_detail41 = _$practitioner_detail40[0]) === null || _$practitioner_detail41 === void 0 ? void 0 : _$practitioner_detail41.display) || "",
|
|
42262
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail42 = _.practitioner_details) === null || _$practitioner_detail42 === void 0 ? void 0 : (_$practitioner_detail43 = _$practitioner_detail42[0]) === null || _$practitioner_detail43 === void 0 ? void 0 : _$practitioner_detail43.clinic) || "",
|
|
42149
42263
|
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status7 = _.status) === null || _$status7 === void 0 ? void 0 : _$status7.display) || "",
|
|
42150
42264
|
action: true
|
|
42151
42265
|
};
|
|
@@ -42192,7 +42306,7 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
|
|
|
42192
42306
|
case 5:
|
|
42193
42307
|
data = _context16.sent;
|
|
42194
42308
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result16 = data.result) === null || _data$result16 === void 0 ? void 0 : _data$result16.map(function (_) {
|
|
42195
|
-
var _$
|
|
42309
|
+
var _$patient_id27, _$patient_id27$, _$patient_id27$$name, _$patient_id28, _$patient_id28$, _$appointmentId48, _$appointmentId48$, _$appointmentId48$$Pe, _$appointmentId48$$Pe2, _$patient_id29, _$patient_id29$, _$patient_id29$$telec, _$patient_id29$$telec2, _$patient_id30, _$patient_id30$, _$patient_id30$$telec, _$patient_id30$$telec2, _$appointmentId49, _$appointmentId49$, _$appointmentId50, _$appointmentId50$, _$appointmentId51, _$appointmentId51$, _$appointmentId52, _$appointmentId52$, _$appointmentId53, _$appointmentId53$, _$visit_type8, _$practitioner_detail44, _$practitioner_detail45, _$practitioner_detail46, _$practitioner_detail47, _$practitioner_detail48, _$practitioner_detail49, _$practitioner_detail50, _$practitioner_detail51, _$practitioner_detail52, _$status8;
|
|
42196
42310
|
|
|
42197
42311
|
return {
|
|
42198
42312
|
// img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -42232,10 +42346,10 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
|
|
|
42232
42346
|
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
|
|
42233
42347
|
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
|
|
42234
42348
|
// }),
|
|
42235
|
-
name: makeName((_ === null || _ === void 0 ? void 0 : (_$
|
|
42236
|
-
mrn: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42349
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id27 = _.patient_id) === null || _$patient_id27 === void 0 ? void 0 : (_$patient_id27$ = _$patient_id27[0]) === null || _$patient_id27$ === void 0 ? void 0 : (_$patient_id27$$name = _$patient_id27$.name) === null || _$patient_id27$$name === void 0 ? void 0 : _$patient_id27$$name[0]) || {}),
|
|
42350
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id28 = _.patient_id) === null || _$patient_id28 === void 0 ? void 0 : (_$patient_id28$ = _$patient_id28[0]) === null || _$patient_id28$ === void 0 ? void 0 : _$patient_id28$.MRN) || "",
|
|
42237
42351
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId48 = _.appointmentId) === null || _$appointmentId48 === void 0 ? void 0 : (_$appointmentId48$ = _$appointmentId48[0]) === null || _$appointmentId48$ === void 0 ? void 0 : (_$appointmentId48$$Pe = _$appointmentId48$.PersonID) === null || _$appointmentId48$$Pe === void 0 ? void 0 : (_$appointmentId48$$Pe2 = _$appointmentId48$$Pe[0]) === null || _$appointmentId48$$Pe2 === void 0 ? void 0 : _$appointmentId48$$Pe2.birthDay),
|
|
42238
|
-
contact: (_
|
|
42352
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id29 = _.patient_id) === null || _$patient_id29 === void 0 ? void 0 : (_$patient_id29$ = _$patient_id29[0]) === null || _$patient_id29$ === void 0 ? void 0 : (_$patient_id29$$telec = _$patient_id29$.telecom) === null || _$patient_id29$$telec === void 0 ? void 0 : (_$patient_id29$$telec2 = _$patient_id29$$telec[0]) === null || _$patient_id29$$telec2 === void 0 ? void 0 : _$patient_id29$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id30 = _.patient_id) === null || _$patient_id30 === void 0 ? void 0 : (_$patient_id30$ = _$patient_id30[0]) === null || _$patient_id30$ === void 0 ? void 0 : (_$patient_id30$$telec = _$patient_id30$.telecom) === null || _$patient_id30$$telec === void 0 ? void 0 : (_$patient_id30$$telec2 = _$patient_id30$$telec[0]) === null || _$patient_id30$$telec2 === void 0 ? void 0 : _$patient_id30$$telec2.value) : "",
|
|
42239
42353
|
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId49 = _.appointmentId) === null || _$appointmentId49 === void 0 ? void 0 : (_$appointmentId49$ = _$appointmentId49[0]) === null || _$appointmentId49$ === void 0 ? void 0 : _$appointmentId49$.appno) || "",
|
|
42240
42354
|
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId50 = _.appointmentId) === null || _$appointmentId50 === void 0 ? void 0 : (_$appointmentId50$ = _$appointmentId50[0]) === null || _$appointmentId50$ === void 0 ? void 0 : _$appointmentId50$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId51 = _.appointmentId) === null || _$appointmentId51 === void 0 ? void 0 : (_$appointmentId51$ = _$appointmentId51[0]) === null || _$appointmentId51$ === void 0 ? void 0 : _$appointmentId51$.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId52 = _.appointmentId) === null || _$appointmentId52 === void 0 ? void 0 : (_$appointmentId52$ = _$appointmentId52[0]) === null || _$appointmentId52$ === void 0 ? void 0 : _$appointmentId52$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId53 = _.appointmentId) === null || _$appointmentId53 === void 0 ? void 0 : (_$appointmentId53$ = _$appointmentId53[0]) === null || _$appointmentId53$ === void 0 ? void 0 : _$appointmentId53$.start, "hh:mm A") : ""),
|
|
42241
42355
|
// date: JSON.stringify({
|
|
@@ -42253,9 +42367,9 @@ var GET_OTHER_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getOthe
|
|
|
42253
42367
|
// clinic: _?.practitioner_details?.[0]?.clinic || ""
|
|
42254
42368
|
// }),
|
|
42255
42369
|
visitType: (_$visit_type8 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type8 !== void 0 ? _$visit_type8 : "",
|
|
42256
|
-
practitionerName: (_$
|
|
42257
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42258
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42370
|
+
practitionerName: (_$practitioner_detail44 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail45 = _.practitioner_details) === null || _$practitioner_detail45 === void 0 ? void 0 : (_$practitioner_detail46 = _$practitioner_detail45[0]) === null || _$practitioner_detail46 === void 0 ? void 0 : _$practitioner_detail46.id_name) !== null && _$practitioner_detail44 !== void 0 ? _$practitioner_detail44 : "",
|
|
42371
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail47 = _.practitioner_details) === null || _$practitioner_detail47 === void 0 ? void 0 : (_$practitioner_detail48 = _$practitioner_detail47[0]) === null || _$practitioner_detail48 === void 0 ? void 0 : (_$practitioner_detail49 = _$practitioner_detail48.speciality) === null || _$practitioner_detail49 === void 0 ? void 0 : (_$practitioner_detail50 = _$practitioner_detail49[0]) === null || _$practitioner_detail50 === void 0 ? void 0 : _$practitioner_detail50.display) || "",
|
|
42372
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail51 = _.practitioner_details) === null || _$practitioner_detail51 === void 0 ? void 0 : (_$practitioner_detail52 = _$practitioner_detail51[0]) === null || _$practitioner_detail52 === void 0 ? void 0 : _$practitioner_detail52.clinic) || "",
|
|
42259
42373
|
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status8 = _.status) === null || _$status8 === void 0 ? void 0 : _$status8.display) || "",
|
|
42260
42374
|
action: true
|
|
42261
42375
|
};
|
|
@@ -42302,7 +42416,7 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
|
|
|
42302
42416
|
case 5:
|
|
42303
42417
|
data = _context17.sent;
|
|
42304
42418
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result17 = data.result) === null || _data$result17 === void 0 ? void 0 : _data$result17.map(function (_) {
|
|
42305
|
-
var _$
|
|
42419
|
+
var _$patient_id31, _$patient_id31$, _$patient_id31$$name, _$patient_id32, _$patient_id32$, _$appointmentId54, _$appointmentId54$, _$appointmentId54$$Pe, _$appointmentId54$$Pe2, _$patient_id33, _$patient_id33$, _$patient_id33$$telec, _$patient_id33$$telec2, _$patient_id34, _$patient_id34$, _$patient_id34$$telec, _$patient_id34$$telec2, _$appointmentId55, _$appointmentId55$, _$appointmentId56, _$appointmentId56$, _$appointmentId57, _$appointmentId57$, _$appointmentId58, _$appointmentId58$, _$appointmentId59, _$appointmentId59$, _$visit_type9, _$practitioner_detail53, _$practitioner_detail54, _$practitioner_detail55, _$practitioner_detail56, _$practitioner_detail57, _$practitioner_detail58, _$practitioner_detail59, _$practitioner_detail60, _$practitioner_detail61, _$status9;
|
|
42306
42420
|
|
|
42307
42421
|
return {
|
|
42308
42422
|
// img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -42342,10 +42456,10 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
|
|
|
42342
42456
|
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
|
|
42343
42457
|
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
|
|
42344
42458
|
// }),
|
|
42345
|
-
name: makeName((_ === null || _ === void 0 ? void 0 : (_$
|
|
42346
|
-
mrn: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42459
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id31 = _.patient_id) === null || _$patient_id31 === void 0 ? void 0 : (_$patient_id31$ = _$patient_id31[0]) === null || _$patient_id31$ === void 0 ? void 0 : (_$patient_id31$$name = _$patient_id31$.name) === null || _$patient_id31$$name === void 0 ? void 0 : _$patient_id31$$name[0]) || {}),
|
|
42460
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id32 = _.patient_id) === null || _$patient_id32 === void 0 ? void 0 : (_$patient_id32$ = _$patient_id32[0]) === null || _$patient_id32$ === void 0 ? void 0 : _$patient_id32$.MRN) || "",
|
|
42347
42461
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId54 = _.appointmentId) === null || _$appointmentId54 === void 0 ? void 0 : (_$appointmentId54$ = _$appointmentId54[0]) === null || _$appointmentId54$ === void 0 ? void 0 : (_$appointmentId54$$Pe = _$appointmentId54$.PersonID) === null || _$appointmentId54$$Pe === void 0 ? void 0 : (_$appointmentId54$$Pe2 = _$appointmentId54$$Pe[0]) === null || _$appointmentId54$$Pe2 === void 0 ? void 0 : _$appointmentId54$$Pe2.birthDay),
|
|
42348
|
-
contact: (_
|
|
42462
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id33 = _.patient_id) === null || _$patient_id33 === void 0 ? void 0 : (_$patient_id33$ = _$patient_id33[0]) === null || _$patient_id33$ === void 0 ? void 0 : (_$patient_id33$$telec = _$patient_id33$.telecom) === null || _$patient_id33$$telec === void 0 ? void 0 : (_$patient_id33$$telec2 = _$patient_id33$$telec[0]) === null || _$patient_id33$$telec2 === void 0 ? void 0 : _$patient_id33$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id34 = _.patient_id) === null || _$patient_id34 === void 0 ? void 0 : (_$patient_id34$ = _$patient_id34[0]) === null || _$patient_id34$ === void 0 ? void 0 : (_$patient_id34$$telec = _$patient_id34$.telecom) === null || _$patient_id34$$telec === void 0 ? void 0 : (_$patient_id34$$telec2 = _$patient_id34$$telec[0]) === null || _$patient_id34$$telec2 === void 0 ? void 0 : _$patient_id34$$telec2.value) : "",
|
|
42349
42463
|
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId55 = _.appointmentId) === null || _$appointmentId55 === void 0 ? void 0 : (_$appointmentId55$ = _$appointmentId55[0]) === null || _$appointmentId55$ === void 0 ? void 0 : _$appointmentId55$.appno) || "",
|
|
42350
42464
|
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId56 = _.appointmentId) === null || _$appointmentId56 === void 0 ? void 0 : (_$appointmentId56$ = _$appointmentId56[0]) === null || _$appointmentId56$ === void 0 ? void 0 : _$appointmentId56$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId57 = _.appointmentId) === null || _$appointmentId57 === void 0 ? void 0 : (_$appointmentId57$ = _$appointmentId57[0]) === null || _$appointmentId57$ === void 0 ? void 0 : _$appointmentId57$.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId58 = _.appointmentId) === null || _$appointmentId58 === void 0 ? void 0 : (_$appointmentId58$ = _$appointmentId58[0]) === null || _$appointmentId58$ === void 0 ? void 0 : _$appointmentId58$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId59 = _.appointmentId) === null || _$appointmentId59 === void 0 ? void 0 : (_$appointmentId59$ = _$appointmentId59[0]) === null || _$appointmentId59$ === void 0 ? void 0 : _$appointmentId59$.start, "hh:mm A") : ""),
|
|
42351
42465
|
// date: JSON.stringify({
|
|
@@ -42363,9 +42477,9 @@ var GET_TODAY_VISITS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getToda
|
|
|
42363
42477
|
// clinic: _?.practitioner_details?.[0]?.clinic || ""
|
|
42364
42478
|
// }),
|
|
42365
42479
|
visitType: (_$visit_type9 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type9 !== void 0 ? _$visit_type9 : "",
|
|
42366
|
-
practitionerName: (_$
|
|
42367
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42368
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42480
|
+
practitionerName: (_$practitioner_detail53 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail54 = _.practitioner_details) === null || _$practitioner_detail54 === void 0 ? void 0 : (_$practitioner_detail55 = _$practitioner_detail54[0]) === null || _$practitioner_detail55 === void 0 ? void 0 : _$practitioner_detail55.id_name) !== null && _$practitioner_detail53 !== void 0 ? _$practitioner_detail53 : "",
|
|
42481
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail56 = _.practitioner_details) === null || _$practitioner_detail56 === void 0 ? void 0 : (_$practitioner_detail57 = _$practitioner_detail56[0]) === null || _$practitioner_detail57 === void 0 ? void 0 : (_$practitioner_detail58 = _$practitioner_detail57.speciality) === null || _$practitioner_detail58 === void 0 ? void 0 : (_$practitioner_detail59 = _$practitioner_detail58[0]) === null || _$practitioner_detail59 === void 0 ? void 0 : _$practitioner_detail59.display) || "",
|
|
42482
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail60 = _.practitioner_details) === null || _$practitioner_detail60 === void 0 ? void 0 : (_$practitioner_detail61 = _$practitioner_detail60[0]) === null || _$practitioner_detail61 === void 0 ? void 0 : _$practitioner_detail61.clinic) || "",
|
|
42369
42483
|
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status9 = _.status) === null || _$status9 === void 0 ? void 0 : _$status9.display) || "",
|
|
42370
42484
|
action: true
|
|
42371
42485
|
};
|
|
@@ -42412,7 +42526,7 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
|
|
|
42412
42526
|
case 5:
|
|
42413
42527
|
data = _context18.sent;
|
|
42414
42528
|
returnedData = (data === null || data === void 0 ? void 0 : data.result) ? data === null || data === void 0 ? void 0 : (_data$result18 = data.result) === null || _data$result18 === void 0 ? void 0 : _data$result18.map(function (_) {
|
|
42415
|
-
var _$
|
|
42529
|
+
var _$patient_id35, _$patient_id35$, _$patient_id35$$name, _$patient_id36, _$patient_id36$, _$appointmentId60, _$appointmentId60$, _$appointmentId60$$Pe, _$appointmentId60$$Pe2, _$patient_id37, _$patient_id37$, _$patient_id37$$telec, _$patient_id37$$telec2, _$patient_id38, _$patient_id38$, _$patient_id38$$telec, _$patient_id38$$telec2, _$appointmentId61, _$appointmentId61$, _$appointmentId62, _$appointmentId62$, _$appointmentId63, _$appointmentId63$, _$appointmentId64, _$appointmentId64$, _$appointmentId65, _$appointmentId65$, _$visit_type10, _$practitioner_detail62, _$practitioner_detail63, _$practitioner_detail64, _$practitioner_detail65, _$practitioner_detail66, _$practitioner_detail67, _$practitioner_detail68, _$practitioner_detail69, _$practitioner_detail70, _$status10;
|
|
42416
42530
|
|
|
42417
42531
|
return {
|
|
42418
42532
|
// img: _?.appointmentId?.[0]?.PersonID?.[0]?.photo?.[0]?.fileid
|
|
@@ -42452,10 +42566,10 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
|
|
|
42452
42566
|
// gender: _?.appointmentId?.[0]?.PersonID?.[0]?.gender ?? "",
|
|
42453
42567
|
// contact: _?.patient_id?.[0]?.telecom?.[0]?.value ?? ""
|
|
42454
42568
|
// }),
|
|
42455
|
-
name: makeName((_ === null || _ === void 0 ? void 0 : (_$
|
|
42456
|
-
mrn: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42569
|
+
name: makeName((_ === null || _ === void 0 ? void 0 : (_$patient_id35 = _.patient_id) === null || _$patient_id35 === void 0 ? void 0 : (_$patient_id35$ = _$patient_id35[0]) === null || _$patient_id35$ === void 0 ? void 0 : (_$patient_id35$$name = _$patient_id35$.name) === null || _$patient_id35$$name === void 0 ? void 0 : _$patient_id35$$name[0]) || {}),
|
|
42570
|
+
mrn: (_ === null || _ === void 0 ? void 0 : (_$patient_id36 = _.patient_id) === null || _$patient_id36 === void 0 ? void 0 : (_$patient_id36$ = _$patient_id36[0]) === null || _$patient_id36$ === void 0 ? void 0 : _$patient_id36$.MRN) || "",
|
|
42457
42571
|
age: getAge(_ === null || _ === void 0 ? void 0 : (_$appointmentId60 = _.appointmentId) === null || _$appointmentId60 === void 0 ? void 0 : (_$appointmentId60$ = _$appointmentId60[0]) === null || _$appointmentId60$ === void 0 ? void 0 : (_$appointmentId60$$Pe = _$appointmentId60$.PersonID) === null || _$appointmentId60$$Pe === void 0 ? void 0 : (_$appointmentId60$$Pe2 = _$appointmentId60$$Pe[0]) === null || _$appointmentId60$$Pe2 === void 0 ? void 0 : _$appointmentId60$$Pe2.birthDay),
|
|
42458
|
-
contact: (_
|
|
42572
|
+
contact: (_ === null || _ === void 0 ? void 0 : (_$patient_id37 = _.patient_id) === null || _$patient_id37 === void 0 ? void 0 : (_$patient_id37$ = _$patient_id37[0]) === null || _$patient_id37$ === void 0 ? void 0 : (_$patient_id37$$telec = _$patient_id37$.telecom) === null || _$patient_id37$$telec === void 0 ? void 0 : (_$patient_id37$$telec2 = _$patient_id37$$telec[0]) === null || _$patient_id37$$telec2 === void 0 ? void 0 : _$patient_id37$$telec2.value) ? JSON.stringify(_ === null || _ === void 0 ? void 0 : (_$patient_id38 = _.patient_id) === null || _$patient_id38 === void 0 ? void 0 : (_$patient_id38$ = _$patient_id38[0]) === null || _$patient_id38$ === void 0 ? void 0 : (_$patient_id38$$telec = _$patient_id38$.telecom) === null || _$patient_id38$$telec === void 0 ? void 0 : (_$patient_id38$$telec2 = _$patient_id38$$telec[0]) === null || _$patient_id38$$telec2 === void 0 ? void 0 : _$patient_id38$$telec2.value) : "",
|
|
42459
42573
|
refNo: (_ === null || _ === void 0 ? void 0 : (_$appointmentId61 = _.appointmentId) === null || _$appointmentId61 === void 0 ? void 0 : (_$appointmentId61$ = _$appointmentId61[0]) === null || _$appointmentId61$ === void 0 ? void 0 : _$appointmentId61$.appno) || "",
|
|
42460
42574
|
date: "".concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId62 = _.appointmentId) === null || _$appointmentId62 === void 0 ? void 0 : (_$appointmentId62$ = _$appointmentId62[0]) === null || _$appointmentId62$ === void 0 ? void 0 : _$appointmentId62$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId63 = _.appointmentId) === null || _$appointmentId63 === void 0 ? void 0 : (_$appointmentId63$ = _$appointmentId63[0]) === null || _$appointmentId63$ === void 0 ? void 0 : _$appointmentId63$.start, "DD MMM,YYYY") : "", ",").concat((_ === null || _ === void 0 ? void 0 : (_$appointmentId64 = _.appointmentId) === null || _$appointmentId64 === void 0 ? void 0 : (_$appointmentId64$ = _$appointmentId64[0]) === null || _$appointmentId64$ === void 0 ? void 0 : _$appointmentId64$.start) ? utcTOLocal$1(_ === null || _ === void 0 ? void 0 : (_$appointmentId65 = _.appointmentId) === null || _$appointmentId65 === void 0 ? void 0 : (_$appointmentId65$ = _$appointmentId65[0]) === null || _$appointmentId65$ === void 0 ? void 0 : _$appointmentId65$.start, "hh:mm A") : ""),
|
|
42461
42575
|
// date: JSON.stringify({
|
|
@@ -42473,9 +42587,9 @@ var GET_WALK_INS_DOCTOR = createAsyncThunk("appointmentStatsApiSlice/getWalkInsD
|
|
|
42473
42587
|
// clinic: _?.practitioner_details?.[0]?.clinic || ""
|
|
42474
42588
|
// }),
|
|
42475
42589
|
visitType: (_$visit_type10 = _ === null || _ === void 0 ? void 0 : _.visit_type) !== null && _$visit_type10 !== void 0 ? _$visit_type10 : "",
|
|
42476
|
-
practitionerName: (_$
|
|
42477
|
-
speciality: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42478
|
-
clinic: (_ === null || _ === void 0 ? void 0 : (_$
|
|
42590
|
+
practitionerName: (_$practitioner_detail62 = _ === null || _ === void 0 ? void 0 : (_$practitioner_detail63 = _.practitioner_details) === null || _$practitioner_detail63 === void 0 ? void 0 : (_$practitioner_detail64 = _$practitioner_detail63[0]) === null || _$practitioner_detail64 === void 0 ? void 0 : _$practitioner_detail64.id_name) !== null && _$practitioner_detail62 !== void 0 ? _$practitioner_detail62 : "",
|
|
42591
|
+
speciality: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail65 = _.practitioner_details) === null || _$practitioner_detail65 === void 0 ? void 0 : (_$practitioner_detail66 = _$practitioner_detail65[0]) === null || _$practitioner_detail66 === void 0 ? void 0 : (_$practitioner_detail67 = _$practitioner_detail66.speciality) === null || _$practitioner_detail67 === void 0 ? void 0 : (_$practitioner_detail68 = _$practitioner_detail67[0]) === null || _$practitioner_detail68 === void 0 ? void 0 : _$practitioner_detail68.display) || "",
|
|
42592
|
+
clinic: (_ === null || _ === void 0 ? void 0 : (_$practitioner_detail69 = _.practitioner_details) === null || _$practitioner_detail69 === void 0 ? void 0 : (_$practitioner_detail70 = _$practitioner_detail69[0]) === null || _$practitioner_detail70 === void 0 ? void 0 : _$practitioner_detail70.clinic) || "",
|
|
42479
42593
|
appointmentStatus: (_ === null || _ === void 0 ? void 0 : (_$status10 = _.status) === null || _$status10 === void 0 ? void 0 : _$status10.display) || "",
|
|
42480
42594
|
action: true
|
|
42481
42595
|
};
|