primarycare-binder 1.1.111 → 1.1.112
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 +192 -95
- 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,
|