primarycare-binder 1.1.72 → 1.1.75
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 +444 -183
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -15190,13 +15190,13 @@ var MASTER_SEARCH = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*
|
|
|
15190
15190
|
}
|
|
15191
15191
|
}, _callee9, null, [[2, 24]]);
|
|
15192
15192
|
})));
|
|
15193
|
-
var
|
|
15193
|
+
var GET_ENCOUNTER_MASTER_TYPE = createAsyncThunk('searchApiSlice/masterEncounterType', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
|
|
15194
15194
|
var payload,
|
|
15195
15195
|
_ref20,
|
|
15196
15196
|
rejectWithValue,
|
|
15197
|
-
body,
|
|
15198
|
-
data,
|
|
15199
15197
|
returnData,
|
|
15198
|
+
encounterTypeBody,
|
|
15199
|
+
encounterType,
|
|
15200
15200
|
_args10 = arguments;
|
|
15201
15201
|
|
|
15202
15202
|
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -15206,6 +15206,109 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
|
|
|
15206
15206
|
payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
|
|
15207
15207
|
_ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
|
|
15208
15208
|
_context10.prev = 2;
|
|
15209
|
+
returnData = [];
|
|
15210
|
+
encounterTypeBody = {
|
|
15211
|
+
db_name: dbName,
|
|
15212
|
+
entity: "CodingMaster",
|
|
15213
|
+
filter: "CodingMaster.Type == 'ENCOUNTERTYPE' && CodingMaster.status == true && CodingMaster.activestatus==true ",
|
|
15214
|
+
return_fields: "KEEP(CodingMaster,'_id','id','_key','Type','status','activestatus','shortdesc','display','code')",
|
|
15215
|
+
sort: "document(AMPatientClass.encTypeDesc).display"
|
|
15216
|
+
};
|
|
15217
|
+
_context10.next = 7;
|
|
15218
|
+
return fetchData$3({
|
|
15219
|
+
body: JSON.stringify(encounterTypeBody)
|
|
15220
|
+
}, __readDocumentUrl__);
|
|
15221
|
+
|
|
15222
|
+
case 7:
|
|
15223
|
+
encounterType = _context10.sent;
|
|
15224
|
+
returnData = encounterType === null || encounterType === void 0 ? void 0 : encounterType.result;
|
|
15225
|
+
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
15226
|
+
data: returnData
|
|
15227
|
+
}));
|
|
15228
|
+
|
|
15229
|
+
case 12:
|
|
15230
|
+
_context10.prev = 12;
|
|
15231
|
+
_context10.t0 = _context10["catch"](2);
|
|
15232
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
15233
|
+
message: err.message
|
|
15234
|
+
})));
|
|
15235
|
+
|
|
15236
|
+
case 15:
|
|
15237
|
+
case "end":
|
|
15238
|
+
return _context10.stop();
|
|
15239
|
+
}
|
|
15240
|
+
}
|
|
15241
|
+
}, _callee10, null, [[2, 12]]);
|
|
15242
|
+
})));
|
|
15243
|
+
var GET_ENCOUNTER_MASTER_CLASS = createAsyncThunk('searchApiSlice/masterEncounterClass', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
|
|
15244
|
+
var payload,
|
|
15245
|
+
_ref22,
|
|
15246
|
+
rejectWithValue,
|
|
15247
|
+
_payload$encType,
|
|
15248
|
+
encType,
|
|
15249
|
+
returnData,
|
|
15250
|
+
encounterClassBody,
|
|
15251
|
+
encounterClass,
|
|
15252
|
+
_args11 = arguments;
|
|
15253
|
+
|
|
15254
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
15255
|
+
while (1) {
|
|
15256
|
+
switch (_context11.prev = _context11.next) {
|
|
15257
|
+
case 0:
|
|
15258
|
+
payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
|
|
15259
|
+
_ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
|
|
15260
|
+
_context11.prev = 2;
|
|
15261
|
+
_payload$encType = payload.encType, encType = _payload$encType === void 0 ? "" : _payload$encType;
|
|
15262
|
+
returnData = {};
|
|
15263
|
+
encounterClassBody = {
|
|
15264
|
+
db_name: dbName,
|
|
15265
|
+
entity: "AMPatientClass",
|
|
15266
|
+
filter: "AMPatientClass.encType=='".concat(encType, "' && AMPatientClass.activestatus==true && AMPatientClass.status==true"),
|
|
15267
|
+
return_fields: "merge(AMPatientClass,{encType:document(AMPatientClass.encType).code},{encTypeDesc:document(AMPatientClass.encTypeDesc).display},{encClsType:document(AMPatientClass.encClsType).code},{encClsDesc:document(AMPatientClass.encClsDesc).display})",
|
|
15268
|
+
sort: "document(AMPatientClass.encTypeDesc).display"
|
|
15269
|
+
};
|
|
15270
|
+
_context11.next = 8;
|
|
15271
|
+
return fetchData$3({
|
|
15272
|
+
body: JSON.stringify(encounterClassBody)
|
|
15273
|
+
}, __readDocumentUrl__);
|
|
15274
|
+
|
|
15275
|
+
case 8:
|
|
15276
|
+
encounterClass = _context11.sent;
|
|
15277
|
+
returnData = encounterClass === null || encounterClass === void 0 ? void 0 : encounterClass.result;
|
|
15278
|
+
return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
15279
|
+
data: returnData
|
|
15280
|
+
}));
|
|
15281
|
+
|
|
15282
|
+
case 13:
|
|
15283
|
+
_context11.prev = 13;
|
|
15284
|
+
_context11.t0 = _context11["catch"](2);
|
|
15285
|
+
return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
15286
|
+
message: err.message
|
|
15287
|
+
})));
|
|
15288
|
+
|
|
15289
|
+
case 16:
|
|
15290
|
+
case "end":
|
|
15291
|
+
return _context11.stop();
|
|
15292
|
+
}
|
|
15293
|
+
}
|
|
15294
|
+
}, _callee11, null, [[2, 13]]);
|
|
15295
|
+
})));
|
|
15296
|
+
var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
|
|
15297
|
+
var payload,
|
|
15298
|
+
_ref24,
|
|
15299
|
+
rejectWithValue,
|
|
15300
|
+
body,
|
|
15301
|
+
data,
|
|
15302
|
+
returnData,
|
|
15303
|
+
_args12 = arguments;
|
|
15304
|
+
|
|
15305
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
15306
|
+
while (1) {
|
|
15307
|
+
switch (_context12.prev = _context12.next) {
|
|
15308
|
+
case 0:
|
|
15309
|
+
payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
|
|
15310
|
+
_ref24 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref24.rejectWithValue;
|
|
15311
|
+
_context12.prev = 2;
|
|
15209
15312
|
body = {
|
|
15210
15313
|
db_name: dbName,
|
|
15211
15314
|
queryid: query_ids["searhcApiSlice/masterSearch"],
|
|
@@ -15213,13 +15316,13 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
|
|
|
15213
15316
|
type: ["Relation"]
|
|
15214
15317
|
}
|
|
15215
15318
|
};
|
|
15216
|
-
|
|
15319
|
+
_context12.next = 6;
|
|
15217
15320
|
return fetchData$3({
|
|
15218
15321
|
body: JSON.stringify(body)
|
|
15219
15322
|
});
|
|
15220
15323
|
|
|
15221
15324
|
case 6:
|
|
15222
|
-
data =
|
|
15325
|
+
data = _context12.sent;
|
|
15223
15326
|
returnData = [];
|
|
15224
15327
|
|
|
15225
15328
|
if (Array.isArray(data)) {
|
|
@@ -15233,40 +15336,40 @@ var GET_RELATIONSHIPS = createAsyncThunk("searhcApiSlice/masterSearch", /*#__PUR
|
|
|
15233
15336
|
});
|
|
15234
15337
|
}
|
|
15235
15338
|
|
|
15236
|
-
return
|
|
15339
|
+
return _context12.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
15237
15340
|
data: returnData
|
|
15238
15341
|
}));
|
|
15239
15342
|
|
|
15240
15343
|
case 12:
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
return
|
|
15244
|
-
message:
|
|
15344
|
+
_context12.prev = 12;
|
|
15345
|
+
_context12.t0 = _context12["catch"](2);
|
|
15346
|
+
return _context12.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
15347
|
+
message: _context12.t0.message
|
|
15245
15348
|
})));
|
|
15246
15349
|
|
|
15247
15350
|
case 15:
|
|
15248
15351
|
case "end":
|
|
15249
|
-
return
|
|
15352
|
+
return _context12.stop();
|
|
15250
15353
|
}
|
|
15251
15354
|
}
|
|
15252
|
-
},
|
|
15355
|
+
}, _callee12, null, [[2, 12]]);
|
|
15253
15356
|
})));
|
|
15254
|
-
var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialityAgainstPractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
15357
|
+
var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialityAgainstPractitioner", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
15255
15358
|
var payload,
|
|
15256
|
-
|
|
15359
|
+
_ref26,
|
|
15257
15360
|
rejectWithValue,
|
|
15258
15361
|
body,
|
|
15259
15362
|
data,
|
|
15260
15363
|
returnData,
|
|
15261
|
-
|
|
15364
|
+
_args13 = arguments;
|
|
15262
15365
|
|
|
15263
|
-
return regeneratorRuntime.wrap(function
|
|
15366
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
15264
15367
|
while (1) {
|
|
15265
|
-
switch (
|
|
15368
|
+
switch (_context13.prev = _context13.next) {
|
|
15266
15369
|
case 0:
|
|
15267
|
-
payload =
|
|
15268
|
-
|
|
15269
|
-
|
|
15370
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
15371
|
+
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
|
|
15372
|
+
_context13.prev = 2;
|
|
15270
15373
|
body = {
|
|
15271
15374
|
db_name: dbName,
|
|
15272
15375
|
entity: "Practitioner",
|
|
@@ -15274,13 +15377,13 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
|
|
|
15274
15377
|
return_fields: "merge(Practitioner,{name:(for hm in HumanNameMaster filter hm._id in Practitioner.name return merge(hm,{use:(for cod in CodeableConceptMaster filter cod._id== hm.use return document(cod.coding)),prefix:(for cod in CodeableConceptMaster filter cod._id == hm.prefix return document(cod.coding)),suffix:(for cod in CodeableConceptMaster filter cod._id == hm.suffix return document(cod.coding))}))},{SPECIALTY:(for PractitionerRole in PractitionerRole filter Practitioner.practitioner_role any == PractitionerRole._id for CodeableConceptMaster in CodeableConceptMaster filter PractitionerRole.SpecialtyID == CodeableConceptMaster._id return merge(CodeableConceptMaster,{coding:document(CodeableConceptMaster.coding)}) ) } )",
|
|
15275
15378
|
sort: "first(document(Practitioner.name)[*].text)"
|
|
15276
15379
|
};
|
|
15277
|
-
|
|
15380
|
+
_context13.next = 6;
|
|
15278
15381
|
return fetchData$3({
|
|
15279
15382
|
body: JSON.stringify(body)
|
|
15280
15383
|
}, __readDocumentUrl__);
|
|
15281
15384
|
|
|
15282
15385
|
case 6:
|
|
15283
|
-
data =
|
|
15386
|
+
data = _context13.sent;
|
|
15284
15387
|
returnData = [];
|
|
15285
15388
|
|
|
15286
15389
|
if (Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
@@ -15296,70 +15399,70 @@ var SPECIALITY_AGAINST_PRACTITIONER = createAsyncThunk("searhcApiSlice/specialit
|
|
|
15296
15399
|
});
|
|
15297
15400
|
}
|
|
15298
15401
|
|
|
15299
|
-
return
|
|
15402
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
15300
15403
|
data: returnData
|
|
15301
15404
|
}));
|
|
15302
15405
|
|
|
15303
15406
|
case 12:
|
|
15304
|
-
|
|
15305
|
-
|
|
15306
|
-
return
|
|
15307
|
-
message:
|
|
15407
|
+
_context13.prev = 12;
|
|
15408
|
+
_context13.t0 = _context13["catch"](2);
|
|
15409
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
15410
|
+
message: _context13.t0.message
|
|
15308
15411
|
})));
|
|
15309
15412
|
|
|
15310
15413
|
case 15:
|
|
15311
15414
|
case "end":
|
|
15312
|
-
return
|
|
15415
|
+
return _context13.stop();
|
|
15313
15416
|
}
|
|
15314
15417
|
}
|
|
15315
|
-
},
|
|
15418
|
+
}, _callee13, null, [[2, 12]]);
|
|
15316
15419
|
})));
|
|
15317
15420
|
|
|
15318
15421
|
var getLocationInfo = /*#__PURE__*/function () {
|
|
15319
|
-
var
|
|
15422
|
+
var _ref27 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
15320
15423
|
var _hospInfo$address3, _hospInfo$address3$, _hospInfo$address3$$c;
|
|
15321
15424
|
|
|
15322
15425
|
var hospInfo,
|
|
15323
15426
|
obj,
|
|
15324
15427
|
city,
|
|
15325
15428
|
info,
|
|
15326
|
-
|
|
15327
|
-
return regeneratorRuntime.wrap(function
|
|
15429
|
+
_args14 = arguments;
|
|
15430
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
15328
15431
|
while (1) {
|
|
15329
|
-
switch (
|
|
15432
|
+
switch (_context14.prev = _context14.next) {
|
|
15330
15433
|
case 0:
|
|
15331
|
-
hospInfo =
|
|
15332
|
-
obj =
|
|
15434
|
+
hospInfo = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
15435
|
+
obj = _args14.length > 1 && _args14[1] !== undefined ? _args14[1] : {};
|
|
15333
15436
|
city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address3 = hospInfo.address) === null || _hospInfo$address3 === void 0 ? void 0 : (_hospInfo$address3$ = _hospInfo$address3[0]) === null || _hospInfo$address3$ === void 0 ? void 0 : (_hospInfo$address3$$c = _hospInfo$address3$.city) === null || _hospInfo$address3$$c === void 0 ? void 0 : _hospInfo$address3$$c.geogLevelName;
|
|
15334
15437
|
|
|
15335
15438
|
if (obj[city]) {
|
|
15336
|
-
|
|
15439
|
+
_context14.next = 8;
|
|
15337
15440
|
break;
|
|
15338
15441
|
}
|
|
15339
15442
|
|
|
15340
|
-
|
|
15443
|
+
_context14.next = 6;
|
|
15341
15444
|
return getLatLong(city);
|
|
15342
15445
|
|
|
15343
15446
|
case 6:
|
|
15344
|
-
info =
|
|
15447
|
+
info = _context14.sent;
|
|
15345
15448
|
obj[city] = info;
|
|
15346
15449
|
|
|
15347
15450
|
case 8:
|
|
15348
15451
|
case "end":
|
|
15349
|
-
return
|
|
15452
|
+
return _context14.stop();
|
|
15350
15453
|
}
|
|
15351
15454
|
}
|
|
15352
|
-
},
|
|
15455
|
+
}, _callee14);
|
|
15353
15456
|
}));
|
|
15354
15457
|
|
|
15355
15458
|
return function getLocationInfo() {
|
|
15356
|
-
return
|
|
15459
|
+
return _ref27.apply(this, arguments);
|
|
15357
15460
|
};
|
|
15358
15461
|
}();
|
|
15359
15462
|
|
|
15360
|
-
var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
15463
|
+
var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practitionerAgainstOrganization", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
15361
15464
|
var payload,
|
|
15362
|
-
|
|
15465
|
+
_ref29,
|
|
15363
15466
|
rejectWithValue,
|
|
15364
15467
|
_payload$practitioner,
|
|
15365
15468
|
practitionerId,
|
|
@@ -15373,21 +15476,21 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
15373
15476
|
_data$result2,
|
|
15374
15477
|
cityMap,
|
|
15375
15478
|
promArr,
|
|
15376
|
-
|
|
15479
|
+
_args15 = arguments;
|
|
15377
15480
|
|
|
15378
|
-
return regeneratorRuntime.wrap(function
|
|
15481
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
15379
15482
|
while (1) {
|
|
15380
|
-
switch (
|
|
15483
|
+
switch (_context15.prev = _context15.next) {
|
|
15381
15484
|
case 0:
|
|
15382
|
-
payload =
|
|
15383
|
-
|
|
15384
|
-
|
|
15485
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
15486
|
+
_ref29 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref29.rejectWithValue;
|
|
15487
|
+
_context15.prev = 2;
|
|
15385
15488
|
_payload$practitioner = payload.practitionerId, practitionerId = _payload$practitioner === void 0 ? "" : _payload$practitioner;
|
|
15386
|
-
|
|
15489
|
+
_context15.next = 6;
|
|
15387
15490
|
return getCurrentPosition();
|
|
15388
15491
|
|
|
15389
15492
|
case 6:
|
|
15390
|
-
_yield$getCurrentPosi2 =
|
|
15493
|
+
_yield$getCurrentPosi2 = _context15.sent;
|
|
15391
15494
|
myLat = _yield$getCurrentPosi2.lat;
|
|
15392
15495
|
myLong = _yield$getCurrentPosi2["long"];
|
|
15393
15496
|
body = {
|
|
@@ -15399,17 +15502,17 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
15399
15502
|
},
|
|
15400
15503
|
return_fields: "{address: (let add = Document(Organization.address[0]) return merge(add, { city: Document(add.city) })), OrganizationName:Organization.name, OrgID:Organization.id}"
|
|
15401
15504
|
};
|
|
15402
|
-
|
|
15505
|
+
_context15.next = 12;
|
|
15403
15506
|
return fetchData$3({
|
|
15404
15507
|
body: JSON.stringify(body)
|
|
15405
15508
|
}, __readDocumentUrl__);
|
|
15406
15509
|
|
|
15407
15510
|
case 12:
|
|
15408
|
-
data =
|
|
15511
|
+
data = _context15.sent;
|
|
15409
15512
|
returnData = [];
|
|
15410
15513
|
|
|
15411
15514
|
if (!Array.isArray(data === null || data === void 0 ? void 0 : data.result)) {
|
|
15412
|
-
|
|
15515
|
+
_context15.next = 20;
|
|
15413
15516
|
break;
|
|
15414
15517
|
}
|
|
15415
15518
|
|
|
@@ -15417,7 +15520,7 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
15417
15520
|
promArr = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : _data$result.map(function (hospInfo) {
|
|
15418
15521
|
return getLocationInfo(hospInfo, cityMap);
|
|
15419
15522
|
});
|
|
15420
|
-
|
|
15523
|
+
_context15.next = 19;
|
|
15421
15524
|
return es6Promise.Promise.all(promArr);
|
|
15422
15525
|
|
|
15423
15526
|
case 19:
|
|
@@ -15426,9 +15529,9 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
15426
15529
|
|
|
15427
15530
|
var city = hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address4 = hospInfo.address) === null || _hospInfo$address4 === void 0 ? void 0 : (_hospInfo$address4$ = _hospInfo$address4[0]) === null || _hospInfo$address4$ === void 0 ? void 0 : (_hospInfo$address4$$c = _hospInfo$address4$.city) === null || _hospInfo$address4$$c === void 0 ? void 0 : _hospInfo$address4$$c.geogLevelName;
|
|
15428
15531
|
|
|
15429
|
-
var
|
|
15430
|
-
lat =
|
|
15431
|
-
_long2 =
|
|
15532
|
+
var _ref30 = cityMap[city] || {},
|
|
15533
|
+
lat = _ref30.lat,
|
|
15534
|
+
_long2 = _ref30["long"];
|
|
15432
15535
|
|
|
15433
15536
|
var distance = "";
|
|
15434
15537
|
|
|
@@ -15446,23 +15549,23 @@ var PRACTITIONER_AGAINST_ORGANIZATION = createAsyncThunk("searhcApiSlice/practit
|
|
|
15446
15549
|
});
|
|
15447
15550
|
|
|
15448
15551
|
case 20:
|
|
15449
|
-
return
|
|
15552
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
15450
15553
|
data: returnData
|
|
15451
15554
|
}));
|
|
15452
15555
|
|
|
15453
15556
|
case 23:
|
|
15454
|
-
|
|
15455
|
-
|
|
15456
|
-
return
|
|
15457
|
-
message:
|
|
15557
|
+
_context15.prev = 23;
|
|
15558
|
+
_context15.t0 = _context15["catch"](2);
|
|
15559
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
15560
|
+
message: _context15.t0.message
|
|
15458
15561
|
})));
|
|
15459
15562
|
|
|
15460
15563
|
case 26:
|
|
15461
15564
|
case "end":
|
|
15462
|
-
return
|
|
15565
|
+
return _context15.stop();
|
|
15463
15566
|
}
|
|
15464
15567
|
}
|
|
15465
|
-
},
|
|
15568
|
+
}, _callee15, null, [[2, 23]]);
|
|
15466
15569
|
})));
|
|
15467
15570
|
var searhcApiSlice = createSlice({
|
|
15468
15571
|
name: "searhcApiSlice",
|
|
@@ -15476,7 +15579,9 @@ var searhcApiSlice = createSlice({
|
|
|
15476
15579
|
masterSearch: _objectSpread2({}, defaultState.Info),
|
|
15477
15580
|
getRelationships: _objectSpread2({}, defaultState.Info),
|
|
15478
15581
|
getSpecialityAgainstPractitioner: _objectSpread2({}, defaultState.Info),
|
|
15479
|
-
getPractitionerAgainstOrganization: _objectSpread2({}, defaultState.Info)
|
|
15582
|
+
getPractitionerAgainstOrganization: _objectSpread2({}, defaultState.Info),
|
|
15583
|
+
getEncounterType: _objectSpread2({}, defaultState.Info),
|
|
15584
|
+
getEncounterClass: _objectSpread2({}, defaultState.Info)
|
|
15480
15585
|
},
|
|
15481
15586
|
extraReducers: (_extraReducers$y = {}, _defineProperty(_extraReducers$y, GET_CITIES.fulfilled, function (state, action) {
|
|
15482
15587
|
var _action$payload;
|
|
@@ -15598,6 +15703,26 @@ var searhcApiSlice = createSlice({
|
|
|
15598
15703
|
var _action$payload24;
|
|
15599
15704
|
|
|
15600
15705
|
state.getPractitionerAgainstOrganization = (_action$payload24 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload24 !== void 0 ? _action$payload24 : [];
|
|
15706
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.fulfilled, function (state, action) {
|
|
15707
|
+
var _action$payload25;
|
|
15708
|
+
|
|
15709
|
+
state.getEncounterType = (_action$payload25 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload25 !== void 0 ? _action$payload25 : [];
|
|
15710
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.pending, function (state, action) {
|
|
15711
|
+
state.getEncounterType.loading = true;
|
|
15712
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_TYPE.rejected, function (state, action) {
|
|
15713
|
+
var _action$payload26;
|
|
15714
|
+
|
|
15715
|
+
state.getEncounterType = (_action$payload26 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload26 !== void 0 ? _action$payload26 : [];
|
|
15716
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.fulfilled, function (state, action) {
|
|
15717
|
+
var _action$payload27;
|
|
15718
|
+
|
|
15719
|
+
state.getEncounterClass = (_action$payload27 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload27 !== void 0 ? _action$payload27 : [];
|
|
15720
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.pending, function (state, action) {
|
|
15721
|
+
state.getEncounterClass.loading = true;
|
|
15722
|
+
}), _defineProperty(_extraReducers$y, GET_ENCOUNTER_MASTER_CLASS.rejected, function (state, action) {
|
|
15723
|
+
var _action$payload28;
|
|
15724
|
+
|
|
15725
|
+
state.getEncounterClass = (_action$payload28 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload28 !== void 0 ? _action$payload28 : [];
|
|
15601
15726
|
}), _extraReducers$y)
|
|
15602
15727
|
});
|
|
15603
15728
|
var searchApiActions = {
|
|
@@ -15612,7 +15737,9 @@ var searchApiActions = {
|
|
|
15612
15737
|
GET_RELATIONSHIPS: GET_RELATIONSHIPS,
|
|
15613
15738
|
SPECIALITY_AGAINST_PRACTITIONER: SPECIALITY_AGAINST_PRACTITIONER,
|
|
15614
15739
|
PRACTITIONER_AGAINST_ORGANIZATION: PRACTITIONER_AGAINST_ORGANIZATION,
|
|
15615
|
-
GET_ALL_SPECIALITY_2: GET_ALL_SPECIALITY_2
|
|
15740
|
+
GET_ALL_SPECIALITY_2: GET_ALL_SPECIALITY_2,
|
|
15741
|
+
GET_ENCOUNTER_MASTER_TYPE: GET_ENCOUNTER_MASTER_TYPE,
|
|
15742
|
+
GET_ENCOUNTER_MASTER_CLASS: GET_ENCOUNTER_MASTER_CLASS
|
|
15616
15743
|
};
|
|
15617
15744
|
var searhcApiSlice$1 = searhcApiSlice.reducer;
|
|
15618
15745
|
|
|
@@ -16738,75 +16865,75 @@ var ADD_RELATED_PERSON = createAsyncThunk("personApiSlice/addRelatedPerson", /*#
|
|
|
16738
16865
|
_context2.prev = 2;
|
|
16739
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;
|
|
16740
16867
|
body = [{
|
|
16741
|
-
|
|
16742
|
-
|
|
16743
|
-
|
|
16744
|
-
|
|
16745
|
-
|
|
16746
|
-
|
|
16868
|
+
db_name: dbName,
|
|
16869
|
+
entity: "RelatedPerson",
|
|
16870
|
+
is_metadata: true,
|
|
16871
|
+
metadataId: query_ids["personApiSlice/addRelatedPerson"],
|
|
16872
|
+
doc: {
|
|
16873
|
+
identifier: [],
|
|
16747
16874
|
// empty
|
|
16748
|
-
|
|
16875
|
+
active: true,
|
|
16749
16876
|
// true
|
|
16750
|
-
|
|
16751
|
-
|
|
16752
|
-
|
|
16753
|
-
|
|
16754
|
-
|
|
16755
|
-
|
|
16756
|
-
|
|
16757
|
-
|
|
16758
|
-
|
|
16759
|
-
|
|
16760
|
-
|
|
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
|
|
16761
16888
|
}]
|
|
16762
16889
|
}],
|
|
16763
16890
|
// ??
|
|
16764
|
-
|
|
16765
|
-
|
|
16766
|
-
|
|
16891
|
+
telecom: [{
|
|
16892
|
+
system: "Phone",
|
|
16893
|
+
value: phone,
|
|
16767
16894
|
// number
|
|
16768
|
-
|
|
16895
|
+
use: "Mobile",
|
|
16769
16896
|
// phone
|
|
16770
|
-
|
|
16897
|
+
rank: "1",
|
|
16771
16898
|
// 1
|
|
16772
|
-
|
|
16773
|
-
|
|
16774
|
-
|
|
16899
|
+
period: [{
|
|
16900
|
+
start: Math.floor(Date.now() / 1000),
|
|
16901
|
+
end: 0
|
|
16775
16902
|
}]
|
|
16776
16903
|
}, {
|
|
16777
|
-
|
|
16778
|
-
|
|
16904
|
+
system: "Email",
|
|
16905
|
+
value: email,
|
|
16779
16906
|
// number
|
|
16780
|
-
|
|
16907
|
+
use: "Work",
|
|
16781
16908
|
// phone
|
|
16782
|
-
|
|
16909
|
+
rank: "2",
|
|
16783
16910
|
// 1
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16911
|
+
period: [{
|
|
16912
|
+
start: Math.floor(Date.now() / 1000),
|
|
16913
|
+
end: 0
|
|
16787
16914
|
}]
|
|
16788
16915
|
}],
|
|
16789
16916
|
// ??
|
|
16790
|
-
|
|
16917
|
+
gender: gender,
|
|
16791
16918
|
// gender
|
|
16792
|
-
|
|
16919
|
+
birthDate: dob.replace(/-/g, "/"),
|
|
16793
16920
|
// DOB
|
|
16794
|
-
|
|
16921
|
+
address: [],
|
|
16795
16922
|
// ??
|
|
16796
|
-
|
|
16923
|
+
photo: [],
|
|
16797
16924
|
// ??
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16925
|
+
period: [{
|
|
16926
|
+
start: Math.floor(Date.now() / 1000),
|
|
16927
|
+
end: 0
|
|
16801
16928
|
}],
|
|
16802
16929
|
// ??
|
|
16803
|
-
|
|
16930
|
+
communication: [],
|
|
16804
16931
|
// ??
|
|
16805
|
-
|
|
16932
|
+
id: 0,
|
|
16806
16933
|
// ??
|
|
16807
|
-
|
|
16934
|
+
PatientID: relationPersonId,
|
|
16808
16935
|
// ??
|
|
16809
|
-
|
|
16936
|
+
PersonID: personId
|
|
16810
16937
|
}
|
|
16811
16938
|
}];
|
|
16812
16939
|
_context2.next = 7;
|
|
@@ -16827,7 +16954,7 @@ var ADD_RELATED_PERSON = createAsyncThunk("personApiSlice/addRelatedPerson", /*#
|
|
|
16827
16954
|
case 10:
|
|
16828
16955
|
return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
|
|
16829
16956
|
data: {
|
|
16830
|
-
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
|
|
16831
16958
|
}
|
|
16832
16959
|
}));
|
|
16833
16960
|
|
|
@@ -17296,6 +17423,62 @@ var READ_PATIENT = createAsyncThunk("personApiSlice/deletePerson", /*#__PURE__*/
|
|
|
17296
17423
|
}
|
|
17297
17424
|
}, _callee9, null, [[2, 13]]);
|
|
17298
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
|
+
return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
17465
|
+
data: data
|
|
17466
|
+
}));
|
|
17467
|
+
|
|
17468
|
+
case 15:
|
|
17469
|
+
_context10.prev = 15;
|
|
17470
|
+
_context10.t0 = _context10["catch"](2);
|
|
17471
|
+
return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
17472
|
+
message: _context10.t0.message
|
|
17473
|
+
})));
|
|
17474
|
+
|
|
17475
|
+
case 18:
|
|
17476
|
+
case "end":
|
|
17477
|
+
return _context10.stop();
|
|
17478
|
+
}
|
|
17479
|
+
}
|
|
17480
|
+
}, _callee10, null, [[2, 15]]);
|
|
17481
|
+
})));
|
|
17299
17482
|
var personApiSlice = createSlice({
|
|
17300
17483
|
name: "personApiSlice",
|
|
17301
17484
|
initialState: {
|
|
@@ -17307,7 +17490,8 @@ var personApiSlice = createSlice({
|
|
|
17307
17490
|
getRelatedPerson: _objectSpread2({}, defaultState.List),
|
|
17308
17491
|
searchPerson: _objectSpread2({}, defaultState.List),
|
|
17309
17492
|
searchPractioner: _objectSpread2({}, defaultState.List),
|
|
17310
|
-
searchBYAdhaar: _objectSpread2({}, defaultState.List)
|
|
17493
|
+
searchBYAdhaar: _objectSpread2({}, defaultState.List),
|
|
17494
|
+
fetch_mykad: _objectSpread2({}, defaultState.Info)
|
|
17311
17495
|
},
|
|
17312
17496
|
extraReducers: (_extraReducers$u = {}, _defineProperty(_extraReducers$u, UPSERT_PERSON.fulfilled, function (state, action) {
|
|
17313
17497
|
var _action$payload;
|
|
@@ -17399,6 +17583,12 @@ var personApiSlice = createSlice({
|
|
|
17399
17583
|
var _action$payload18;
|
|
17400
17584
|
|
|
17401
17585
|
state.getRelatedPerson = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : [];
|
|
17586
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.fulfilled, function (state, action) {
|
|
17587
|
+
state.fetch_mykad.loading = false, state.fetch_mykad.error = false, state.fetch_mykad = action.payload;
|
|
17588
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.pending, function (state, action) {
|
|
17589
|
+
state.fetch_mykad.loading = true, state.fetch_mykad.error = false, state.fetch_mykad.loading = true;
|
|
17590
|
+
}), _defineProperty(_extraReducers$u, FETCH_MY_KAD_DETAILS.rejected, function (state, action) {
|
|
17591
|
+
state.fetch_mykad.loading = false, state.fetch_mykad.error = true, state.fetch_mykad = action.payload;
|
|
17402
17592
|
}), _extraReducers$u)
|
|
17403
17593
|
});
|
|
17404
17594
|
var personApiActions = {
|
|
@@ -17410,7 +17600,8 @@ var personApiActions = {
|
|
|
17410
17600
|
SEARCH_PERSON: SEARCH_PERSON,
|
|
17411
17601
|
READ_PATIENT: READ_PATIENT,
|
|
17412
17602
|
SEARCH_PRACTIONER: SEARCH_PRACTIONER,
|
|
17413
|
-
SEARCH_BY_ADHAAR: SEARCH_BY_ADHAAR
|
|
17603
|
+
SEARCH_BY_ADHAAR: SEARCH_BY_ADHAAR,
|
|
17604
|
+
FETCH_MY_KAD_DETAILS: FETCH_MY_KAD_DETAILS
|
|
17414
17605
|
};
|
|
17415
17606
|
var personApiSlice$1 = personApiSlice.reducer;
|
|
17416
17607
|
|
|
@@ -18417,10 +18608,68 @@ var GET_FINANCIAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getfin
|
|
|
18417
18608
|
}
|
|
18418
18609
|
}, _callee12, null, [[2, 13]]);
|
|
18419
18610
|
})));
|
|
18420
|
-
var
|
|
18611
|
+
var GET_ENCOUNTER_HEADER = createAsyncThunk("OrganizationRegisterPatientApiSlice/getEncounterHeader", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
|
|
18421
18612
|
var payload,
|
|
18422
18613
|
_ref26,
|
|
18423
18614
|
rejectWithValue,
|
|
18615
|
+
_payload$patientId3,
|
|
18616
|
+
patientId,
|
|
18617
|
+
encounterId,
|
|
18618
|
+
body,
|
|
18619
|
+
data,
|
|
18620
|
+
returnData,
|
|
18621
|
+
_args13 = arguments;
|
|
18622
|
+
|
|
18623
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
18624
|
+
while (1) {
|
|
18625
|
+
switch (_context13.prev = _context13.next) {
|
|
18626
|
+
case 0:
|
|
18627
|
+
payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
|
|
18628
|
+
_ref26 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref26.rejectWithValue;
|
|
18629
|
+
_context13.prev = 2;
|
|
18630
|
+
_payload$patientId3 = payload.patientId, patientId = _payload$patientId3 === void 0 ? "" : _payload$patientId3, encounterId = payload.encounterId;
|
|
18631
|
+
body = {
|
|
18632
|
+
db_name: dbName,
|
|
18633
|
+
entity: "Encounter",
|
|
18634
|
+
filter: "Encounter.patient_id == ".concat(patientId, " && Encounter.id==").concat(encounterId, " && Encounter.activestatus == true"),
|
|
18635
|
+
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) )})",
|
|
18636
|
+
sort: "Encounter.encounterdate desc"
|
|
18637
|
+
};
|
|
18638
|
+
_context13.next = 7;
|
|
18639
|
+
return fetchData$3({
|
|
18640
|
+
body: JSON.stringify(body)
|
|
18641
|
+
}, __readDocumentUrl__);
|
|
18642
|
+
|
|
18643
|
+
case 7:
|
|
18644
|
+
data = _context13.sent;
|
|
18645
|
+
returnData = [];
|
|
18646
|
+
|
|
18647
|
+
if (Array.isArray(data.result)) {
|
|
18648
|
+
returnData = data.result;
|
|
18649
|
+
}
|
|
18650
|
+
|
|
18651
|
+
return _context13.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18652
|
+
data: returnData
|
|
18653
|
+
}));
|
|
18654
|
+
|
|
18655
|
+
case 13:
|
|
18656
|
+
_context13.prev = 13;
|
|
18657
|
+
_context13.t0 = _context13["catch"](2);
|
|
18658
|
+
return _context13.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18659
|
+
message: _context13.t0.message
|
|
18660
|
+
})));
|
|
18661
|
+
|
|
18662
|
+
case 16:
|
|
18663
|
+
case "end":
|
|
18664
|
+
return _context13.stop();
|
|
18665
|
+
}
|
|
18666
|
+
}
|
|
18667
|
+
}, _callee13, null, [[2, 13]]);
|
|
18668
|
+
})));
|
|
18669
|
+
var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getreferral", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
|
|
18670
|
+
var payload,
|
|
18671
|
+
_ref28,
|
|
18672
|
+
rejectWithValue,
|
|
18424
18673
|
_payload$patientid,
|
|
18425
18674
|
patientid,
|
|
18426
18675
|
_payload$reffId,
|
|
@@ -18459,15 +18708,15 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18459
18708
|
_returnData15,
|
|
18460
18709
|
_returnData15$,
|
|
18461
18710
|
info,
|
|
18462
|
-
|
|
18711
|
+
_args14 = arguments;
|
|
18463
18712
|
|
|
18464
|
-
return regeneratorRuntime.wrap(function
|
|
18713
|
+
return regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
18465
18714
|
while (1) {
|
|
18466
|
-
switch (
|
|
18715
|
+
switch (_context14.prev = _context14.next) {
|
|
18467
18716
|
case 0:
|
|
18468
|
-
payload =
|
|
18469
|
-
|
|
18470
|
-
|
|
18717
|
+
payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
|
|
18718
|
+
_ref28 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref28.rejectWithValue;
|
|
18719
|
+
_context14.prev = 2;
|
|
18471
18720
|
_payload$patientid = payload.patientid, patientid = _payload$patientid === void 0 ? "" : _payload$patientid, _payload$reffId = payload.reffId, reffId = _payload$reffId === void 0 ? "" : _payload$reffId;
|
|
18472
18721
|
body = {
|
|
18473
18722
|
db_name: dbName,
|
|
@@ -18475,13 +18724,13 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18475
18724
|
filter: queries$b["codablemasterGetReferral"].query(patientid, reffId),
|
|
18476
18725
|
return_fields: queries$b["codablemasterGetReferral"].returnFields
|
|
18477
18726
|
};
|
|
18478
|
-
|
|
18727
|
+
_context14.next = 7;
|
|
18479
18728
|
return fetchData$3({
|
|
18480
18729
|
body: JSON.stringify(body)
|
|
18481
18730
|
}, __readDocumentUrl__);
|
|
18482
18731
|
|
|
18483
18732
|
case 7:
|
|
18484
|
-
data =
|
|
18733
|
+
data = _context14.sent;
|
|
18485
18734
|
returnData = [];
|
|
18486
18735
|
|
|
18487
18736
|
if (Array.isArray(data.result)) {
|
|
@@ -18514,42 +18763,42 @@ var GET_FERERRAL = createAsyncThunk("OrganizationRegisterPatientApiSlice/getrefe
|
|
|
18514
18763
|
returnData[0] = _objectSpread2(_objectSpread2({}, returnData[0]), info);
|
|
18515
18764
|
}
|
|
18516
18765
|
|
|
18517
|
-
return
|
|
18766
|
+
return _context14.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18518
18767
|
data: returnData
|
|
18519
18768
|
}));
|
|
18520
18769
|
|
|
18521
18770
|
case 13:
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
return
|
|
18525
|
-
message:
|
|
18771
|
+
_context14.prev = 13;
|
|
18772
|
+
_context14.t0 = _context14["catch"](2);
|
|
18773
|
+
return _context14.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18774
|
+
message: _context14.t0.message
|
|
18526
18775
|
})));
|
|
18527
18776
|
|
|
18528
18777
|
case 16:
|
|
18529
18778
|
case "end":
|
|
18530
|
-
return
|
|
18779
|
+
return _context14.stop();
|
|
18531
18780
|
}
|
|
18532
18781
|
}
|
|
18533
|
-
},
|
|
18782
|
+
}, _callee14, null, [[2, 13]]);
|
|
18534
18783
|
})));
|
|
18535
|
-
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18784
|
+
var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSlice/getappointment", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
|
|
18536
18785
|
var payload,
|
|
18537
|
-
|
|
18786
|
+
_ref30,
|
|
18538
18787
|
rejectWithValue,
|
|
18539
18788
|
_payload$appointmentI,
|
|
18540
18789
|
appointmentId,
|
|
18541
18790
|
body,
|
|
18542
18791
|
data,
|
|
18543
18792
|
returnData,
|
|
18544
|
-
|
|
18793
|
+
_args15 = arguments;
|
|
18545
18794
|
|
|
18546
|
-
return regeneratorRuntime.wrap(function
|
|
18795
|
+
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
18547
18796
|
while (1) {
|
|
18548
|
-
switch (
|
|
18797
|
+
switch (_context15.prev = _context15.next) {
|
|
18549
18798
|
case 0:
|
|
18550
|
-
payload =
|
|
18551
|
-
|
|
18552
|
-
|
|
18799
|
+
payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
|
|
18800
|
+
_ref30 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref30.rejectWithValue;
|
|
18801
|
+
_context15.prev = 2;
|
|
18553
18802
|
_payload$appointmentI = payload.appointmentId, appointmentId = _payload$appointmentI === void 0 ? "" : _payload$appointmentI;
|
|
18554
18803
|
body = {
|
|
18555
18804
|
db_name: dbName,
|
|
@@ -18557,55 +18806,55 @@ var GET_PATIENT_APPOINTMENT = createAsyncThunk("OrganizationRegisterPatientApiSl
|
|
|
18557
18806
|
filter: queries$b["codablemasterGetAppointment"].query(appointmentId),
|
|
18558
18807
|
return_fields: queries$b["codablemasterGetAppointment"].returnFields
|
|
18559
18808
|
};
|
|
18560
|
-
|
|
18809
|
+
_context15.next = 7;
|
|
18561
18810
|
return fetchData$3({
|
|
18562
18811
|
body: JSON.stringify(body)
|
|
18563
18812
|
}, __readDocumentUrl__);
|
|
18564
18813
|
|
|
18565
18814
|
case 7:
|
|
18566
|
-
data =
|
|
18815
|
+
data = _context15.sent;
|
|
18567
18816
|
returnData = [];
|
|
18568
18817
|
|
|
18569
18818
|
if (Array.isArray(data.result)) {
|
|
18570
18819
|
returnData = data.result;
|
|
18571
18820
|
}
|
|
18572
18821
|
|
|
18573
|
-
return
|
|
18822
|
+
return _context15.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18574
18823
|
data: returnData
|
|
18575
18824
|
}));
|
|
18576
18825
|
|
|
18577
18826
|
case 13:
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
return
|
|
18581
|
-
message:
|
|
18827
|
+
_context15.prev = 13;
|
|
18828
|
+
_context15.t0 = _context15["catch"](2);
|
|
18829
|
+
return _context15.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18830
|
+
message: _context15.t0.message
|
|
18582
18831
|
})));
|
|
18583
18832
|
|
|
18584
18833
|
case 16:
|
|
18585
18834
|
case "end":
|
|
18586
|
-
return
|
|
18835
|
+
return _context15.stop();
|
|
18587
18836
|
}
|
|
18588
18837
|
}
|
|
18589
|
-
},
|
|
18838
|
+
}, _callee15, null, [[2, 13]]);
|
|
18590
18839
|
})));
|
|
18591
|
-
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18840
|
+
var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatientname", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
|
|
18592
18841
|
var payload,
|
|
18593
|
-
|
|
18842
|
+
_ref32,
|
|
18594
18843
|
rejectWithValue,
|
|
18595
18844
|
_payload$patientName,
|
|
18596
18845
|
patientName,
|
|
18597
18846
|
body,
|
|
18598
18847
|
data,
|
|
18599
18848
|
returnData,
|
|
18600
|
-
|
|
18849
|
+
_args16 = arguments;
|
|
18601
18850
|
|
|
18602
|
-
return regeneratorRuntime.wrap(function
|
|
18851
|
+
return regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
18603
18852
|
while (1) {
|
|
18604
|
-
switch (
|
|
18853
|
+
switch (_context16.prev = _context16.next) {
|
|
18605
18854
|
case 0:
|
|
18606
|
-
payload =
|
|
18607
|
-
|
|
18608
|
-
|
|
18855
|
+
payload = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
|
|
18856
|
+
_ref32 = _args16.length > 1 ? _args16[1] : undefined, rejectWithValue = _ref32.rejectWithValue;
|
|
18857
|
+
_context16.prev = 2;
|
|
18609
18858
|
_payload$patientName = payload.patientName, patientName = _payload$patientName === void 0 ? "" : _payload$patientName;
|
|
18610
18859
|
body = {
|
|
18611
18860
|
db_name: dbName,
|
|
@@ -18613,40 +18862,40 @@ var GET_PATIENT_NAME = createAsyncThunk("OrganizationRegisterPatientApiSlice/get
|
|
|
18613
18862
|
filter: queries$b["codablemasterGetPatientname"].query(patientName),
|
|
18614
18863
|
return_fields: queries$b["codablemasterGetPatientname"].returnFields
|
|
18615
18864
|
};
|
|
18616
|
-
|
|
18865
|
+
_context16.next = 7;
|
|
18617
18866
|
return fetchData$3({
|
|
18618
18867
|
body: JSON.stringify(body)
|
|
18619
18868
|
}, __readDocumentUrl__);
|
|
18620
18869
|
|
|
18621
18870
|
case 7:
|
|
18622
|
-
data =
|
|
18871
|
+
data = _context16.sent;
|
|
18623
18872
|
returnData = [];
|
|
18624
18873
|
|
|
18625
18874
|
if (Array.isArray(data.result)) {
|
|
18626
18875
|
returnData = data.result;
|
|
18627
18876
|
}
|
|
18628
18877
|
|
|
18629
|
-
return
|
|
18878
|
+
return _context16.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18630
18879
|
data: returnData
|
|
18631
18880
|
}));
|
|
18632
18881
|
|
|
18633
18882
|
case 13:
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
return
|
|
18637
|
-
message:
|
|
18883
|
+
_context16.prev = 13;
|
|
18884
|
+
_context16.t0 = _context16["catch"](2);
|
|
18885
|
+
return _context16.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18886
|
+
message: _context16.t0.message
|
|
18638
18887
|
})));
|
|
18639
18888
|
|
|
18640
18889
|
case 16:
|
|
18641
18890
|
case "end":
|
|
18642
|
-
return
|
|
18891
|
+
return _context16.stop();
|
|
18643
18892
|
}
|
|
18644
18893
|
}
|
|
18645
|
-
},
|
|
18894
|
+
}, _callee16, null, [[2, 13]]);
|
|
18646
18895
|
})));
|
|
18647
|
-
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
18896
|
+
var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/getpatienttypeid", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
|
|
18648
18897
|
var payload,
|
|
18649
|
-
|
|
18898
|
+
_ref34,
|
|
18650
18899
|
rejectWithValue,
|
|
18651
18900
|
_payload$idnumber,
|
|
18652
18901
|
idnumber,
|
|
@@ -18654,45 +18903,45 @@ var GET_PATIENT_TYPEID = createAsyncThunk("OrganizationRegisterPatientApiSlice/g
|
|
|
18654
18903
|
idsourcecode,
|
|
18655
18904
|
body,
|
|
18656
18905
|
data,
|
|
18657
|
-
|
|
18906
|
+
_args17 = arguments;
|
|
18658
18907
|
|
|
18659
|
-
return regeneratorRuntime.wrap(function
|
|
18908
|
+
return regeneratorRuntime.wrap(function _callee17$(_context17) {
|
|
18660
18909
|
while (1) {
|
|
18661
|
-
switch (
|
|
18910
|
+
switch (_context17.prev = _context17.next) {
|
|
18662
18911
|
case 0:
|
|
18663
|
-
payload =
|
|
18664
|
-
|
|
18665
|
-
|
|
18912
|
+
payload = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
|
|
18913
|
+
_ref34 = _args17.length > 1 ? _args17[1] : undefined, rejectWithValue = _ref34.rejectWithValue;
|
|
18914
|
+
_context17.prev = 2;
|
|
18666
18915
|
_payload$idnumber = payload.idnumber, idnumber = _payload$idnumber === void 0 ? "" : _payload$idnumber, _payload$idsourcecode = payload.idsourcecode, idsourcecode = _payload$idsourcecode === void 0 ? "" : _payload$idsourcecode;
|
|
18667
18916
|
body = {
|
|
18668
18917
|
db_name: dbName,
|
|
18669
18918
|
filter: JSON.parse("{\n \"idnumber\":\"".concat(idnumber, "\",\"idsourcecode\":\"").concat(idsourcecode, "\"\n }")),
|
|
18670
18919
|
queryid: "8ffac13e-b147-4568-a13e-ecf9c07c0d92"
|
|
18671
18920
|
};
|
|
18672
|
-
|
|
18921
|
+
_context17.next = 7;
|
|
18673
18922
|
return fetchData$3({
|
|
18674
18923
|
body: JSON.stringify(body)
|
|
18675
18924
|
}, __baseUrl__);
|
|
18676
18925
|
|
|
18677
18926
|
case 7:
|
|
18678
|
-
data =
|
|
18679
|
-
return
|
|
18927
|
+
data = _context17.sent;
|
|
18928
|
+
return _context17.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
|
|
18680
18929
|
data: data
|
|
18681
18930
|
}));
|
|
18682
18931
|
|
|
18683
18932
|
case 11:
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
return
|
|
18687
|
-
message:
|
|
18933
|
+
_context17.prev = 11;
|
|
18934
|
+
_context17.t0 = _context17["catch"](2);
|
|
18935
|
+
return _context17.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
|
|
18936
|
+
message: _context17.t0.message
|
|
18688
18937
|
})));
|
|
18689
18938
|
|
|
18690
18939
|
case 14:
|
|
18691
18940
|
case "end":
|
|
18692
|
-
return
|
|
18941
|
+
return _context17.stop();
|
|
18693
18942
|
}
|
|
18694
18943
|
}
|
|
18695
|
-
},
|
|
18944
|
+
}, _callee17, null, [[2, 11]]);
|
|
18696
18945
|
})));
|
|
18697
18946
|
var OrganizationRegisterPatientApiSlice = createSlice({
|
|
18698
18947
|
name: "OrganizationRegisterPatientApiSlice",
|
|
@@ -18712,7 +18961,8 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
18712
18961
|
getreferral: _objectSpread2({}, defaultState.Info),
|
|
18713
18962
|
getappointment: _objectSpread2({}, defaultState.Info),
|
|
18714
18963
|
getpatientname: _objectSpread2({}, defaultState.Info),
|
|
18715
|
-
getpatientid: _objectSpread2({}, defaultState.Info)
|
|
18964
|
+
getpatientid: _objectSpread2({}, defaultState.Info),
|
|
18965
|
+
getEncounterHeader: _objectSpread2({}, defaultState.Info)
|
|
18716
18966
|
},
|
|
18717
18967
|
extraReducers: (_extraReducers$q = {}, _defineProperty(_extraReducers$q, GET_PATIENT_NAME.fulfilled, function (state, action) {
|
|
18718
18968
|
var _action$payload;
|
|
@@ -18874,6 +19124,16 @@ var OrganizationRegisterPatientApiSlice = createSlice({
|
|
|
18874
19124
|
var _action$payload32;
|
|
18875
19125
|
|
|
18876
19126
|
state.getpatientid = (_action$payload32 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload32 !== void 0 ? _action$payload32 : {};
|
|
19127
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.fulfilled, function (state, action) {
|
|
19128
|
+
var _action$payload33;
|
|
19129
|
+
|
|
19130
|
+
state.getEncounterHeader = (_action$payload33 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload33 !== void 0 ? _action$payload33 : {};
|
|
19131
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.pending, function (state, action) {
|
|
19132
|
+
state.getEncounterHeader.loading = true;
|
|
19133
|
+
}), _defineProperty(_extraReducers$q, GET_ENCOUNTER_HEADER.rejected, function (state, action) {
|
|
19134
|
+
var _action$payload34;
|
|
19135
|
+
|
|
19136
|
+
state.getEncounterHeader = (_action$payload34 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload34 !== void 0 ? _action$payload34 : {};
|
|
18877
19137
|
}), _extraReducers$q)
|
|
18878
19138
|
});
|
|
18879
19139
|
var oraganizationRegisterPatientActions = {
|
|
@@ -18892,7 +19152,8 @@ var oraganizationRegisterPatientActions = {
|
|
|
18892
19152
|
GET_PATIENT_APPOINTMENT: GET_PATIENT_APPOINTMENT,
|
|
18893
19153
|
GET_PATIENT_NAME: GET_PATIENT_NAME,
|
|
18894
19154
|
GET_PATIENT_TYPEID: GET_PATIENT_TYPEID,
|
|
18895
|
-
GET_PRACTITIONERS: GET_PRACTITIONERS
|
|
19155
|
+
GET_PRACTITIONERS: GET_PRACTITIONERS,
|
|
19156
|
+
GET_ENCOUNTER_HEADER: GET_ENCOUNTER_HEADER
|
|
18896
19157
|
};
|
|
18897
19158
|
var OrganizationRegisterPatientApiSlice$1 = OrganizationRegisterPatientApiSlice.reducer;
|
|
18898
19159
|
|