primarycare-binder 1.1.74 → 1.1.77
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 +124 -86
- 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
|
|
|
@@ -43272,7 +43347,7 @@ var makeRadiologyData = function makeRadiologyData(order, info) {
|
|
|
43272
43347
|
};
|
|
43273
43348
|
|
|
43274
43349
|
var makeMedicationData = function makeMedicationData(order, info) {
|
|
43275
|
-
var _info$org_id2, _info$patientId2, _info$encounterType2, _info$encounterId2, _order$drugType, _info$status$value2, _info$status2, _order$drugCode, _order$formCode, _order$routeCode, _order$dosageUOM$_id, _order$dosageUOM, _order$IVInfusRateVal, _order$IVInfusRateUOM, _order$IVInfusRateUOM2, _order$duration2, _order$durationType$_2, _order$durationType2, _moment$unix2, _order$notes, _order$practInstr, _order$IVDosDurValue2, _order$IVDosDurUOM$_i2, _order$IVDosDurUOM2;
|
|
43350
|
+
var _info$org_id2, _info$patientId2, _info$encounterType2, _info$encounterId2, _order$drugType, _info$status$value2, _info$status2, _order$drugCode, _order$formCode, _order$routeCode, _order$dosageUOM$_id, _order$dosageUOM, _order$IVInfusRateVal, _order$IVInfusRateUOM, _order$IVInfusRateUOM2, _order$duration2, _order$durationType$_2, _order$durationType2, _order$name2, _moment$unix2, _order$notes, _order$practInstr, _order$IVDosDurValue2, _order$IVDosDurUOM$_i2, _order$IVDosDurUOM2;
|
|
43276
43351
|
|
|
43277
43352
|
return {
|
|
43278
43353
|
db_name: dbName,
|
|
@@ -43310,44 +43385,7 @@ var makeMedicationData = function makeMedicationData(order, info) {
|
|
|
43310
43385
|
ivInfusionRateUOM: (_order$IVInfusRateUOM = order === null || order === void 0 ? void 0 : (_order$IVInfusRateUOM2 = order.IVInfusRateUOM) === null || _order$IVInfusRateUOM2 === void 0 ? void 0 : _order$IVInfusRateUOM2._id) !== null && _order$IVInfusRateUOM !== void 0 ? _order$IVInfusRateUOM : "",
|
|
43311
43386
|
dosageDurationValue: (_order$duration2 = order === null || order === void 0 ? void 0 : order.duration) !== null && _order$duration2 !== void 0 ? _order$duration2 : 0,
|
|
43312
43387
|
dosageDurationUOM: (_order$durationType$_2 = order === null || order === void 0 ? void 0 : (_order$durationType2 = order.durationType) === null || _order$durationType2 === void 0 ? void 0 : _order$durationType2._id) !== null && _order$durationType$_2 !== void 0 ? _order$durationType$_2 : "",
|
|
43313
|
-
|
|
43314
|
-
// {
|
|
43315
|
-
// frqGrpId: "number",
|
|
43316
|
-
// dispSeqNo: "number",
|
|
43317
|
-
// adminDate: "number",
|
|
43318
|
-
// adminTime: "time",
|
|
43319
|
-
// adminDosageQty: "number",
|
|
43320
|
-
// adminDosageUOM: "string",
|
|
43321
|
-
// adminDosageInstruction: "string",
|
|
43322
|
-
// adminFrDay: "number",
|
|
43323
|
-
// adminToDay: "number",
|
|
43324
|
-
// adminDosageFreqCode: "string",
|
|
43325
|
-
// },
|
|
43326
|
-
// ],
|
|
43327
|
-
useAsTaperedDose: [// {
|
|
43328
|
-
// tdGrpId: "number",
|
|
43329
|
-
// dispSeqNo: "number",
|
|
43330
|
-
// adminFrDay: "number",
|
|
43331
|
-
// adminToDay: "number",
|
|
43332
|
-
// adminFrDate: "number",
|
|
43333
|
-
// adminToDate: "number",
|
|
43334
|
-
// adminDosageStrength: "number",
|
|
43335
|
-
// adminDosageStrengthUOM: "string",
|
|
43336
|
-
// adminDosageInstruction: "string",
|
|
43337
|
-
// adminDosageFreqCode: "string",
|
|
43338
|
-
// },
|
|
43339
|
-
],
|
|
43340
|
-
useAsSlidingScaleDose: [// {
|
|
43341
|
-
// ssGrpId: "number",
|
|
43342
|
-
// dispSeqNo: "number",
|
|
43343
|
-
// adminFrDay: "number",
|
|
43344
|
-
// adminToDay: "number",
|
|
43345
|
-
// adminPrdUOM: "string",
|
|
43346
|
-
// adminDosageQty: "number",
|
|
43347
|
-
// adminDosageQtyUOM: "string",
|
|
43348
|
-
// adminDosageInstruction: "string",
|
|
43349
|
-
// },
|
|
43350
|
-
],
|
|
43388
|
+
orderdescription: (_order$name2 = order === null || order === void 0 ? void 0 : order.name) !== null && _order$name2 !== void 0 ? _order$name2 : "",
|
|
43351
43389
|
occurStartDateTime: (_moment$unix2 = moment$1().unix()) !== null && _moment$unix2 !== void 0 ? _moment$unix2 : 0,
|
|
43352
43390
|
occurEndDateTime: 0,
|
|
43353
43391
|
totPresQty: 0,
|