primarycare-binder 1.1.73 → 1.1.76
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 +261 -116
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -16865,75 +16865,75 @@ var ADD_RELATED_PERSON = createAsyncThunk("personApiSlice/addRelatedPerson", /*#
|
|
|
16865
16865
|
_context2.prev = 2;
|
|
16866
16866
|
_payload$phone2 = payload.phone, phone = _payload$phone2 === void 0 ? "" : _payload$phone2, _payload$dob2 = payload.dob, dob = _payload$dob2 === void 0 ? "" : _payload$dob2, _payload$firstName2 = payload.firstName, firstName = _payload$firstName2 === void 0 ? "" : _payload$firstName2, _payload$lastName2 = payload.lastName, lastName = _payload$lastName2 === void 0 ? "" : _payload$lastName2, _payload$gender2 = payload.gender, gender = _payload$gender2 === void 0 ? "" : _payload$gender2, _payload$email2 = payload.email, email = _payload$email2 === void 0 ? "" : _payload$email2, _payload$relationType = payload.relationType, relationType = _payload$relationType === void 0 ? "" : _payload$relationType, _payload$relationPers = payload.relationPersonId, relationPersonId = _payload$relationPers === void 0 ? [0] : _payload$relationPers, _payload$personId = payload.personId, personId = _payload$personId === void 0 ? 0 : _payload$personId;
|
|
16867
16867
|
body = [{
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16868
|
+
db_name: dbName,
|
|
16869
|
+
entity: "RelatedPerson",
|
|
16870
|
+
is_metadata: true,
|
|
16871
|
+
metadataId: query_ids["personApiSlice/addRelatedPerson"],
|
|
16872
|
+
doc: {
|
|
16873
|
+
identifier: [],
|
|
16874
16874
|
// empty
|
|
16875
|
-
|
|
16875
|
+
active: true,
|
|
16876
16876
|
// true
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16877
|
+
relationship: relationType,
|
|
16878
|
+
name: [{
|
|
16879
|
+
use: "",
|
|
16880
|
+
text: firstName,
|
|
16881
|
+
family: lastName,
|
|
16882
|
+
given: "",
|
|
16883
|
+
prefix: "",
|
|
16884
|
+
suffix: "",
|
|
16885
|
+
period: [{
|
|
16886
|
+
start: Math.floor(Date.now() / 1000),
|
|
16887
|
+
end: 0
|
|
16888
16888
|
}]
|
|
16889
16889
|
}],
|
|
16890
16890
|
// ??
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16891
|
+
telecom: [{
|
|
16892
|
+
system: "Phone",
|
|
16893
|
+
value: phone,
|
|
16894
16894
|
// number
|
|
16895
|
-
|
|
16895
|
+
use: "Mobile",
|
|
16896
16896
|
// phone
|
|
16897
|
-
|
|
16897
|
+
rank: "1",
|
|
16898
16898
|
// 1
|
|
16899
|
-
|
|
16900
|
-
|
|
16901
|
-
|
|
16899
|
+
period: [{
|
|
16900
|
+
start: Math.floor(Date.now() / 1000),
|
|
16901
|
+
end: 0
|
|
16902
16902
|
}]
|
|
16903
16903
|
}, {
|
|
16904
|
-
|
|
16905
|
-
|
|
16904
|
+
system: "Email",
|
|
16905
|
+
value: email,
|
|
16906
16906
|
// number
|
|
16907
|
-
|
|
16907
|
+
use: "Work",
|
|
16908
16908
|
// phone
|
|
16909
|
-
|
|
16909
|
+
rank: "2",
|
|
16910
16910
|
// 1
|
|
16911
|
-
|
|
16912
|
-
|
|
16913
|
-
|
|
16911
|
+
period: [{
|
|
16912
|
+
start: Math.floor(Date.now() / 1000),
|
|
16913
|
+
end: 0
|
|
16914
16914
|
}]
|
|
16915
16915
|
}],
|
|
16916
16916
|
// ??
|
|
16917
|
-
|
|
16917
|
+
gender: gender,
|
|
16918
16918
|
// gender
|
|
16919
|
-
|
|
16919
|
+
birthDate: dob.replace(/-/g, "/"),
|
|
16920
16920
|
// DOB
|
|
16921
|
-
|
|
16921
|
+
address: [],
|
|
16922
16922
|
// ??
|
|
16923
|
-
|
|
16923
|
+
photo: [],
|
|
16924
16924
|
// ??
|
|
16925
|
-
|
|
16926
|
-
|
|
16927
|
-
|
|
16925
|
+
period: [{
|
|
16926
|
+
start: Math.floor(Date.now() / 1000),
|
|
16927
|
+
end: 0
|
|
16928
16928
|
}],
|
|
16929
16929
|
// ??
|
|
16930
|
-
|
|
16930
|
+
communication: [],
|
|
16931
16931
|
// ??
|
|
16932
|
-
|
|
16932
|
+
id: 0,
|
|
16933
16933
|
// ??
|
|
16934
|
-
|
|
16934
|
+
PatientID: relationPersonId,
|
|
16935
16935
|
// ??
|
|
16936
|
-
|
|
16936
|
+
PersonID: personId
|
|
16937
16937
|
}
|
|
16938
16938
|
}];
|
|
16939
16939
|
_context2.next = 7;
|
|
@@ -16954,7 +16954,7 @@ var ADD_RELATED_PERSON = createAsyncThunk("personApiSlice/addRelatedPerson", /*#
|
|
|
16954
16954
|
case 10:
|
|
16955
16955
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
16956
16956
|
data: {
|
|
16957
|
-
id: (data === null || data === void 0 ? void 0 : (_data$Result5 = data[
|
|
16957
|
+
id: (data === null || data === void 0 ? void 0 : (_data$Result5 = data["Result"]) === null || _data$Result5 === void 0 ? void 0 : (_data$Result5$ = _data$Result5[0]) === null || _data$Result5$ === void 0 ? void 0 : (_data$Result5$$proper = _data$Result5$.properties) === null || _data$Result5$$proper === void 0 ? void 0 : (_data$Result5$$proper2 = _data$Result5$$proper.doc) === null || _data$Result5$$proper2 === void 0 ? void 0 : _data$Result5$$proper2.Id) || 0
|
|
16958
16958
|
}
|
|
16959
16959
|
}));
|
|
16960
16960
|
|
|
@@ -17423,6 +17423,73 @@ var READ_PATIENT = createAsyncThunk("personApiSlice/deletePerson", /*#__PURE__*/
|
|
|
17423
17423
|
}
|
|
17424
17424
|
}, _callee9, null, [[2, 13]]);
|
|
17425
17425
|
})));
|
|
17426
|
+
var FETCH_MY_KAD_DETAILS = createAsyncThunk("personApiSlice/fetch_mykad", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
17427
|
+
var payload,
|
|
17428
|
+
_ref21,
|
|
17429
|
+
rejectWithValue,
|
|
17430
|
+
url,
|
|
17431
|
+
res,
|
|
17432
|
+
data,
|
|
17433
|
+
_args10 = arguments;
|
|
17434
|
+
|
|
17435
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
17436
|
+
while (1) {
|
|
17437
|
+
switch (_context10.prev = _context10.next) {
|
|
17438
|
+
case 0:
|
|
17439
|
+
payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
|
|
17440
|
+
_ref21 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
|
|
17441
|
+
_context10.prev = 2;
|
|
17442
|
+
url = process.env.REACT_APP_MYKAD_URL;
|
|
17443
|
+
_context10.next = 6;
|
|
17444
|
+
return fetch(url);
|
|
17445
|
+
|
|
17446
|
+
case 6:
|
|
17447
|
+
res = _context10.sent;
|
|
17448
|
+
|
|
17449
|
+
if (res.ok) {
|
|
17450
|
+
_context10.next = 9;
|
|
17451
|
+
break;
|
|
17452
|
+
}
|
|
17453
|
+
|
|
17454
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
17455
|
+
message: res.statusText
|
|
17456
|
+
})));
|
|
17457
|
+
|
|
17458
|
+
case 9:
|
|
17459
|
+
_context10.next = 11;
|
|
17460
|
+
return res.json();
|
|
17461
|
+
|
|
17462
|
+
case 11:
|
|
17463
|
+
data = _context10.sent;
|
|
17464
|
+
|
|
17465
|
+
if (!(data.ERR_CODE !== "OK")) {
|
|
17466
|
+
_context10.next = 14;
|
|
17467
|
+
break;
|
|
17468
|
+
}
|
|
17469
|
+
|
|
17470
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
17471
|
+
message: "Something went wrong!"
|
|
17472
|
+
})));
|
|
17473
|
+
|
|
17474
|
+
case 14:
|
|
17475
|
+
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
17476
|
+
data: data
|
|
17477
|
+
}));
|
|
17478
|
+
|
|
17479
|
+
case 17:
|
|
17480
|
+
_context10.prev = 17;
|
|
17481
|
+
_context10.t0 = _context10["catch"](2);
|
|
17482
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
17483
|
+
message: _context10.t0.message
|
|
17484
|
+
})));
|
|
17485
|
+
|
|
17486
|
+
case 20:
|
|
17487
|
+
case "end":
|
|
17488
|
+
return _context10.stop();
|
|
17489
|
+
}
|
|
17490
|
+
}
|
|
17491
|
+
}, _callee10, null, [[2, 17]]);
|
|
17492
|
+
})));
|
|
17426
17493
|
var personApiSlice = createSlice({
|
|
17427
17494
|
name: "personApiSlice",
|
|
17428
17495
|
initialState: {
|
|
@@ -17434,7 +17501,8 @@ var personApiSlice = createSlice({
|
|
|
17434
17501
|
getRelatedPerson: _objectSpread2({}, defaultState.List),
|
|
17435
17502
|
searchPerson: _objectSpread2({}, defaultState.List),
|
|
17436
17503
|
searchPractioner: _objectSpread2({}, defaultState.List),
|
|
17437
|
-
searchBYAdhaar: _objectSpread2({}, defaultState.List)
|
|
17504
|
+
searchBYAdhaar: _objectSpread2({}, defaultState.List),
|
|
17505
|
+
fetch_mykad: _objectSpread2({}, defaultState.Info)
|
|
17438
17506
|
},
|
|
17439
17507
|
extraReducers: (_extraReducers$u = {}, _defineProperty(_extraReducers$u, UPSERT_PERSON.fulfilled, function (state, action) {
|
|
17440
17508
|
var _action$payload;
|
|
@@ -17526,6 +17594,12 @@ var personApiSlice = createSlice({
|
|
|
17526
17594
|
var _action$payload18;
|
|
17527
17595
|
|
|
17528
17596
|
state.getRelatedPerson = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : [];
|
|
17597
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.fulfilled, function (state, action) {
|
|
17598
|
+
state.fetch_mykad.loading = false, state.fetch_mykad.error = false, state.fetch_mykad = action.payload;
|
|
17599
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.pending, function (state, action) {
|
|
17600
|
+
state.fetch_mykad.loading = true, state.fetch_mykad.error = false, state.fetch_mykad.loading = true;
|
|
17601
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.rejected, function (state, action) {
|
|
17602
|
+
state.fetch_mykad.loading = false, state.fetch_mykad.error = true, state.fetch_mykad = action.payload;
|
|
17529
17603
|
}), _extraReducers$u)
|
|
17530
17604
|
});
|
|
17531
17605
|
var personApiActions = {
|
|
@@ -17537,7 +17611,8 @@ var personApiActions = {
|
|
|
17537
17611
|
SEARCH_PERSON: SEARCH_PERSON,
|
|
17538
17612
|
READ_PATIENT: READ_PATIENT,
|
|
17539
17613
|
SEARCH_PRACTIONER: SEARCH_PRACTIONER,
|
|
17540
|
-
SEARCH_BY_ADHAAR: SEARCH_BY_ADHAAR
|
|
17614
|
+
SEARCH_BY_ADHAAR: SEARCH_BY_ADHAAR,
|
|
17615
|
+
FETCH_MY_KAD_DETAILS: FETCH_MY_KAD_DETAILS
|
|
17541
17616
|
};
|
|
17542
17617
|
var personApiSlice$1 = personApiSlice.reducer;
|
|
17543
17618
|
|
|
@@ -18544,10 +18619,68 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
|
|
|
18544
18619
|
}
|
|
18545
18620
|
}, _callee12, null, [[2, 13]]);
|
|
18546
18621
|
})));
|
|
18547
|
-
var
|
|
18622
|
+
var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
18548
18623
|
var payload,
|
|
18549
18624
|
_ref26,
|
|
18550
18625
|
rejectWithValue,
|
|
18626
|
+
_payload$patientId3,
|
|
18627
|
+
patientId,
|
|
18628
|
+
encounterId,
|
|
18629
|
+
body,
|
|
18630
|
+
data,
|
|
18631
|
+
returnData,
|
|
18632
|
+
_args13 = arguments;
|
|
18633
|
+
|
|
18634
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
18635
|
+
while (1) {
|
|
18636
|
+
switch (_context13.prev = _context13.next) {
|
|
18637
|
+
case 0:
|
|
18638
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
18639
|
+
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
|
|
18640
|
+
_context13.prev = 2;
|
|
18641
|
+
_payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
|
|
18642
|
+
body = {
|
|
18643
|
+
db_name: dbName,
|
|
18644
|
+
entity: "Encounter",
|
|
18645
|
+
filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
|
|
18646
|
+
return_fields: "merge({id:Encounter.id},{_id:Encounter._id},{_key:Encounter._key},{encounterdate:Encounter.encounterdate},{encounter_no:Encounter.encounter_no},{type:document(Encounter.type)[*].display},{visit_type:Encounter.visit_type},{location:(for doc in Encounter.location for loc in LocationMaster filter loc._id == doc.location_id return document(document(loc.locationType).coding))},{Practitioner_id:(for part in Encounter.participant for practId in Practitioner filter practId.id == part.Practitioner_id return {name:(for doc in HumanNameMaster filter doc._id in practId.name return merge(doc,{use:(document(document(doc.use).coding)),prefix:(document(document(doc.prefix).coding)),suffix:(document(document(doc.suffix).coding))}))} )},{PractitionerRole_id:(for part in Encounter.participant for practRole in PractitionerRole filter practRole.id == part.PractitionerRole_id return document(document(practRole.role).coding) )})",
|
|
18647
|
+
sort: "Encounter.encounterdate desc"
|
|
18648
|
+
};
|
|
18649
|
+
_context13.next = 7;
|
|
18650
|
+
return fetchData$3({
|
|
18651
|
+
body: JSON.stringify(body)
|
|
18652
|
+
}, __readDocumentUrl__);
|
|
18653
|
+
|
|
18654
|
+
case 7:
|
|
18655
|
+
data = _context13.sent;
|
|
18656
|
+
returnData = [];
|
|
18657
|
+
|
|
18658
|
+
if (Array.isArray(data.result)) {
|
|
18659
|
+
returnData = data.result;
|
|
18660
|
+
}
|
|
18661
|
+
|
|
18662
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18663
|
+
data: returnData
|
|
18664
|
+
}));
|
|
18665
|
+
|
|
18666
|
+
case 13:
|
|
18667
|
+
_context13.prev = 13;
|
|
18668
|
+
_context13.t0 = _context13["catch"](2);
|
|
18669
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18670
|
+
message: _context13.t0.message
|
|
18671
|
+
})));
|
|
18672
|
+
|
|
18673
|
+
case 16:
|
|
18674
|
+
case "end":
|
|
18675
|
+
return _context13.stop();
|
|
18676
|
+
}
|
|
18677
|
+
}
|
|
18678
|
+
}, _callee13, null, [[2, 13]]);
|
|
18679
|
+
})));
|
|
18680
|
+
var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
18681
|
+
var payload,
|
|
18682
|
+
_ref28,
|
|
18683
|
+
rejectWithValue,
|
|
18551
18684
|
_payload$patientid,
|
|
18552
18685
|
patientid,
|
|
18553
18686
|
_payload$reffId,
|
|
@@ -18586,15 +18719,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18586
18719
|
_returnData15,
|
|
18587
18720
|
_returnData15$,
|
|
18588
18721
|
info,
|
|
18589
|
-
|
|
18722
|
+
_args14 = arguments;
|
|
18590
18723
|
|
|
18591
|
-
return regeneratorRuntime.wrap(function
|
|
18724
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
18592
18725
|
while (1) {
|
|
18593
|
-
switch (
|
|
18726
|
+
switch (_context14.prev = _context14.next) {
|
|
18594
18727
|
case 0:
|
|
18595
|
-
payload =
|
|
18596
|
-
|
|
18597
|
-
|
|
18728
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
18729
|
+
_ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
18730
|
+
_context14.prev = 2;
|
|
18598
18731
|
_payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
|
|
18599
18732
|
body = {
|
|
18600
18733
|
db_name: dbName,
|
|
@@ -18602,13 +18735,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18602
18735
|
filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
|
|
18603
18736
|
return_fields: queries$b["codablemasterGetReferral"].returnFields
|
|
18604
18737
|
};
|
|
18605
|
-
|
|
18738
|
+
_context14.next = 7;
|
|
18606
18739
|
return fetchData$3({
|
|
18607
18740
|
body: JSON.stringify(body)
|
|
18608
18741
|
}, __readDocumentUrl__);
|
|
18609
18742
|
|
|
18610
18743
|
case 7:
|
|
18611
|
-
data =
|
|
18744
|
+
data = _context14.sent;
|
|
18612
18745
|
returnData = [];
|
|
18613
18746
|
|
|
18614
18747
|
if (Array.isArray(data.result)) {
|
|
@@ -18641,42 +18774,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18641
18774
|
returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
|
|
18642
18775
|
}
|
|
18643
18776
|
|
|
18644
|
-
return
|
|
18777
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18645
18778
|
data: returnData
|
|
18646
18779
|
}));
|
|
18647
18780
|
|
|
18648
18781
|
case 13:
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
return
|
|
18652
|
-
message:
|
|
18782
|
+
_context14.prev = 13;
|
|
18783
|
+
_context14.t0 = _context14["catch"](2);
|
|
18784
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18785
|
+
message: _context14.t0.message
|
|
18653
18786
|
})));
|
|
18654
18787
|
|
|
18655
18788
|
case 16:
|
|
18656
18789
|
case "end":
|
|
18657
|
-
return
|
|
18790
|
+
return _context14.stop();
|
|
18658
18791
|
}
|
|
18659
18792
|
}
|
|
18660
|
-
},
|
|
18793
|
+
}, _callee14, null, [[2, 13]]);
|
|
18661
18794
|
})));
|
|
18662
|
-
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18795
|
+
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
18663
18796
|
var payload,
|
|
18664
|
-
|
|
18797
|
+
_ref30,
|
|
18665
18798
|
rejectWithValue,
|
|
18666
18799
|
_payload$appointmentI,
|
|
18667
18800
|
appointmentId,
|
|
18668
18801
|
body,
|
|
18669
18802
|
data,
|
|
18670
18803
|
returnData,
|
|
18671
|
-
|
|
18804
|
+
_args15 = arguments;
|
|
18672
18805
|
|
|
18673
|
-
return regeneratorRuntime.wrap(function
|
|
18806
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
18674
18807
|
while (1) {
|
|
18675
|
-
switch (
|
|
18808
|
+
switch (_context15.prev = _context15.next) {
|
|
18676
18809
|
case 0:
|
|
18677
|
-
payload =
|
|
18678
|
-
|
|
18679
|
-
|
|
18810
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
18811
|
+
_ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
|
|
18812
|
+
_context15.prev = 2;
|
|
18680
18813
|
_payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
|
|
18681
18814
|
body = {
|
|
18682
18815
|
db_name: dbName,
|
|
@@ -18684,55 +18817,55 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
|
|
|
18684
18817
|
filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
|
|
18685
18818
|
return_fields: queries$b["codablemasterGetAppointment"].returnFields
|
|
18686
18819
|
};
|
|
18687
|
-
|
|
18820
|
+
_context15.next = 7;
|
|
18688
18821
|
return fetchData$3({
|
|
18689
18822
|
body: JSON.stringify(body)
|
|
18690
18823
|
}, __readDocumentUrl__);
|
|
18691
18824
|
|
|
18692
18825
|
case 7:
|
|
18693
|
-
data =
|
|
18826
|
+
data = _context15.sent;
|
|
18694
18827
|
returnData = [];
|
|
18695
18828
|
|
|
18696
18829
|
if (Array.isArray(data.result)) {
|
|
18697
18830
|
returnData = data.result;
|
|
18698
18831
|
}
|
|
18699
18832
|
|
|
18700
|
-
return
|
|
18833
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18701
18834
|
data: returnData
|
|
18702
18835
|
}));
|
|
18703
18836
|
|
|
18704
18837
|
case 13:
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
return
|
|
18708
|
-
message:
|
|
18838
|
+
_context15.prev = 13;
|
|
18839
|
+
_context15.t0 = _context15["catch"](2);
|
|
18840
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18841
|
+
message: _context15.t0.message
|
|
18709
18842
|
})));
|
|
18710
18843
|
|
|
18711
18844
|
case 16:
|
|
18712
18845
|
case "end":
|
|
18713
|
-
return
|
|
18846
|
+
return _context15.stop();
|
|
18714
18847
|
}
|
|
18715
18848
|
}
|
|
18716
|
-
},
|
|
18849
|
+
}, _callee15, null, [[2, 13]]);
|
|
18717
18850
|
})));
|
|
18718
|
-
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18851
|
+
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
18719
18852
|
var payload,
|
|
18720
|
-
|
|
18853
|
+
_ref32,
|
|
18721
18854
|
rejectWithValue,
|
|
18722
18855
|
_payload$patientName,
|
|
18723
18856
|
patientName,
|
|
18724
18857
|
body,
|
|
18725
18858
|
data,
|
|
18726
18859
|
returnData,
|
|
18727
|
-
|
|
18860
|
+
_args16 = arguments;
|
|
18728
18861
|
|
|
18729
|
-
return regeneratorRuntime.wrap(function
|
|
18862
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
18730
18863
|
while (1) {
|
|
18731
|
-
switch (
|
|
18864
|
+
switch (_context16.prev = _context16.next) {
|
|
18732
18865
|
case 0:
|
|
18733
|
-
payload =
|
|
18734
|
-
|
|
18735
|
-
|
|
18866
|
+
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
18867
|
+
_ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
18868
|
+
_context16.prev = 2;
|
|
18736
18869
|
_payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
|
|
18737
18870
|
body = {
|
|
18738
18871
|
db_name: dbName,
|
|
@@ -18740,40 +18873,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
18740
18873
|
filter: queries$b["codablemasterGetPatientname"].query(patientName),
|
|
18741
18874
|
return_fields: queries$b["codablemasterGetPatientname"].returnFields
|
|
18742
18875
|
};
|
|
18743
|
-
|
|
18876
|
+
_context16.next = 7;
|
|
18744
18877
|
return fetchData$3({
|
|
18745
18878
|
body: JSON.stringify(body)
|
|
18746
18879
|
}, __readDocumentUrl__);
|
|
18747
18880
|
|
|
18748
18881
|
case 7:
|
|
18749
|
-
data =
|
|
18882
|
+
data = _context16.sent;
|
|
18750
18883
|
returnData = [];
|
|
18751
18884
|
|
|
18752
18885
|
if (Array.isArray(data.result)) {
|
|
18753
18886
|
returnData = data.result;
|
|
18754
18887
|
}
|
|
18755
18888
|
|
|
18756
|
-
return
|
|
18889
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18757
18890
|
data: returnData
|
|
18758
18891
|
}));
|
|
18759
18892
|
|
|
18760
18893
|
case 13:
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
return
|
|
18764
|
-
message:
|
|
18894
|
+
_context16.prev = 13;
|
|
18895
|
+
_context16.t0 = _context16["catch"](2);
|
|
18896
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18897
|
+
message: _context16.t0.message
|
|
18765
18898
|
})));
|
|
18766
18899
|
|
|
18767
18900
|
case 16:
|
|
18768
18901
|
case "end":
|
|
18769
|
-
return
|
|
18902
|
+
return _context16.stop();
|
|
18770
18903
|
}
|
|
18771
18904
|
}
|
|
18772
|
-
},
|
|
18905
|
+
}, _callee16, null, [[2, 13]]);
|
|
18773
18906
|
})));
|
|
18774
|
-
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18907
|
+
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
18775
18908
|
var payload,
|
|
18776
|
-
|
|
18909
|
+
_ref34,
|
|
18777
18910
|
rejectWithValue,
|
|
18778
18911
|
_payload$idnumber,
|
|
18779
18912
|
idnumber,
|
|
@@ -18781,45 +18914,45 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
|
|
|
18781
18914
|
idsourcecode,
|
|
18782
18915
|
body,
|
|
18783
18916
|
data,
|
|
18784
|
-
|
|
18917
|
+
_args17 = arguments;
|
|
18785
18918
|
|
|
18786
|
-
return regeneratorRuntime.wrap(function
|
|
18919
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
18787
18920
|
while (1) {
|
|
18788
|
-
switch (
|
|
18921
|
+
switch (_context17.prev = _context17.next) {
|
|
18789
18922
|
case 0:
|
|
18790
|
-
payload =
|
|
18791
|
-
|
|
18792
|
-
|
|
18923
|
+
payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
18924
|
+
_ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
|
|
18925
|
+
_context17.prev = 2;
|
|
18793
18926
|
_payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
|
|
18794
18927
|
body = {
|
|
18795
18928
|
db_name: dbName,
|
|
18796
18929
|
filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
|
|
18797
18930
|
queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
|
|
18798
18931
|
};
|
|
18799
|
-
|
|
18932
|
+
_context17.next = 7;
|
|
18800
18933
|
return fetchData$3({
|
|
18801
18934
|
body: JSON.stringify(body)
|
|
18802
18935
|
}, __baseUrl__);
|
|
18803
18936
|
|
|
18804
18937
|
case 7:
|
|
18805
|
-
data =
|
|
18806
|
-
return
|
|
18938
|
+
data = _context17.sent;
|
|
18939
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18807
18940
|
data: data
|
|
18808
18941
|
}));
|
|
18809
18942
|
|
|
18810
18943
|
case 11:
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
return
|
|
18814
|
-
message:
|
|
18944
|
+
_context17.prev = 11;
|
|
18945
|
+
_context17.t0 = _context17["catch"](2);
|
|
18946
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18947
|
+
message: _context17.t0.message
|
|
18815
18948
|
})));
|
|
18816
18949
|
|
|
18817
18950
|
case 14:
|
|
18818
18951
|
case "end":
|
|
18819
|
-
return
|
|
18952
|
+
return _context17.stop();
|
|
18820
18953
|
}
|
|
18821
18954
|
}
|
|
18822
|
-
},
|
|
18955
|
+
}, _callee17, null, [[2, 11]]);
|
|
18823
18956
|
})));
|
|
18824
18957
|
var OrganizationRegisterPatientApiSlice = createSlice({
|
|
18825
18958
|
name: "OrganizationRegisterPatientApiSlice",
|
|
@@ -18839,7 +18972,8 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
18839
18972
|
getreferral: _objectSpread2({}, defaultState.Info),
|
|
18840
18973
|
getappointment: _objectSpread2({}, defaultState.Info),
|
|
18841
18974
|
getpatientname: _objectSpread2({}, defaultState.Info),
|
|
18842
|
-
getpatientid: _objectSpread2({}, defaultState.Info)
|
|
18975
|
+
getpatientid: _objectSpread2({}, defaultState.Info),
|
|
18976
|
+
getEncounterHeader: _objectSpread2({}, defaultState.Info)
|
|
18843
18977
|
},
|
|
18844
18978
|
extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
|
|
18845
18979
|
var _action$payload;
|
|
@@ -19001,6 +19135,16 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
19001
19135
|
var _action$payload32;
|
|
19002
19136
|
|
|
19003
19137
|
state.getpatientid = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
|
|
19138
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.fulfilled, function (state, action) {
|
|
19139
|
+
var _action$payload33;
|
|
19140
|
+
|
|
19141
|
+
state.getEncounterHeader = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
|
|
19142
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.pending, function (state, action) {
|
|
19143
|
+
state.getEncounterHeader.loading = true;
|
|
19144
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.rejected, function (state, action) {
|
|
19145
|
+
var _action$payload34;
|
|
19146
|
+
|
|
19147
|
+
state.getEncounterHeader = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
|
|
19004
19148
|
}), _extraReducers$q)
|
|
19005
19149
|
});
|
|
19006
19150
|
var oraganizationRegisterPatientActions = {
|
|
@@ -19019,7 +19163,8 @@ var oraganizationRegisterPatientActions = {
|
|
|
19019
19163
|
GET_PATIENT_APPOINTMENT: GET_PATIENT_APPOINTMENT,
|
|
19020
19164
|
GET_PATIENT_NAME: GET_PATIENT_NAME,
|
|
19021
19165
|
GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
|
|
19022
|
-
GET_PRACTITIONERS: GET_PRACTITIONERS
|
|
19166
|
+
GET_PRACTITIONERS: GET_PRACTITIONERS,
|
|
19167
|
+
GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER
|
|
19023
19168
|
};
|
|
19024
19169
|
var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
|
|
19025
19170
|
|