primarycare-binder 1.0.137 → 1.0.142

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.
Files changed (2) hide show
  1. package/dist/index.cjs.js +1624 -1288
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -2327,1237 +2327,1241 @@ var sendEmailViaalertsHub = /*#__PURE__*/function () {
2327
2327
  };
2328
2328
  }();
2329
2329
 
2330
- var _urls;
2331
-
2332
- var __baseUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/read_qdmqueries");
2333
- var __uspsertUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/upsert_document");
2334
- var __update__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/updatedocument");
2335
- var __readDocumentUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/read_documents");
2336
- var __deleteUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/delete_document");
2337
- var __bookAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/bookAppointment");
2338
- var __modifyAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/modifyAppointment");
2339
- var __cancelAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/cancelAppointment");
2340
- var __cancelAllAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/cancelAllAppointments");
2341
- var __keyClockLogin__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT); // vitals url
2342
- var urls = (_urls = {
2343
- generate_otp: "".concat(__keyClockLogin__, "/api/v1/generateOTP"),
2344
- register_user: "".concat(__keyClockLogin__, "/api/v1/userRegistration"),
2345
- sign_in: "".concat(__keyClockLogin__, "/api/v1/userSignIn"),
2346
- resend_otp: "".concat(__keyClockLogin__, "/api/v1/resendOTP"),
2347
- logout: "".concat(__keyClockLogin__, "/api/v1/logout"),
2348
- forgotOrgUserPassword: "".concat(__keyClockLogin__, "/api/v1/forgotOrgUserPassword"),
2349
- getUserInfo: "".concat(__keyClockLogin__, "/api/v1/getUserInfo"),
2350
- getOrgUserInfo: "".concat(__keyClockLogin__, "/api/v1/getOrgUserInfo"),
2351
- deleteUser: "".concat(__keyClockLogin__, "/api/v1/deleteUser"),
2352
- // fuzzy_search
2353
- fuzzy_search: "".concat(__baseUrl__, ":12013/api/fuzzySearch"),
2354
- // patient
2355
- patient_create: "".concat(__baseUrl__, ":11001/api/upsertPatient"),
2356
- patient_update: "".concat(__baseUrl__, ":11001/api/upsertPatient"),
2357
- patient_read: "".concat(__baseUrl__, ":11002/api/readPatient"),
2358
- patient_delete: "".concat(__baseUrl__, ":11003/api/deletePatient"),
2359
- // appointment
2360
- appointment_create: "".concat(__baseUrl__, ":12001/api/upsertAppointment"),
2361
- appointment_update: "".concat(__baseUrl__, ":12001/api/upsertAppointment"),
2362
- appointment_read: "".concat(__baseUrl__, ":12003/api/readAppointment"),
2363
- appointment_delete: "".concat(__baseUrl__, ":12002/api/deleteAppointment"),
2364
- // appointment response
2365
- appointment_response_create: "".concat(__baseUrl__, ":12004/api/upsertAppointmentResponse"),
2366
- appointment_response_update: "".concat(__baseUrl__, ":12004/api/upsertAppointmentResponse"),
2367
- appointment_response_read: "".concat(__baseUrl__, ":12005/api/readAppointmentResponse"),
2368
- appointment_response_delete: "".concat(__baseUrl__, ":12006/api/deleteAppointmentResponse"),
2369
- // related person
2370
- related_person_create: "".concat(__baseUrl__, ":12010/api/upsertRelatedPerson"),
2371
- related_person_update: "".concat(__baseUrl__, ":12010/api/upsertRelatedPerson"),
2372
- related_person_read: "".concat(__baseUrl__, ":12011/api/readRelatedPerson"),
2373
- related_person_delete: "".concat(__baseUrl__, ":12012/api/deleteRelatedPerson"),
2374
- // practitioner
2375
- practitioner_create: "".concat(__baseUrl__, ":17002/api/upsertPractitioner"),
2376
- practitioner_update: "".concat(__baseUrl__, ":17002/api/upsertPractitioner"),
2377
- practitioner_read: "".concat(__baseUrl__, ":17001/api/readPractitioner"),
2378
- practitioner_delete: "".concat(__baseUrl__, ":17003/api/deletePractitioner"),
2379
- // docter listing
2380
- docter_listing: "".concat(__baseUrl__, ":17002/api/docterListing"),
2381
- // Consulation
2382
- get_cities: "/api/v1/getCityFromHospital",
2383
- get_locality: "/api/v1/getLocalityBasedOnCity",
2384
- get_hospitals_gps: "/api/v1/getHospitalBasedOnGPS",
2385
- get_hospitals_locality: "/api/v1/getHospitalBasedonLocality"
2386
- }, _defineProperty(_urls, "get_cities", "/api/v1/getCityFromHospital"), _defineProperty(_urls, "get_symptoms", "/api/v1/getSymptoms"), _defineProperty(_urls, "get_speciality", "/api/v1/getSpeciality"), _defineProperty(_urls, "upsert_service", "/api/v1/upsertService"), _defineProperty(_urls, "read_service", "/api/v1/readService"), _defineProperty(_urls, "delete_service", "/api/v1/deleteService"), _defineProperty(_urls, "upsert_slot", "/api/v1/upsertSlot"), _defineProperty(_urls, "read_slot", "api/v1/readSlot"), _defineProperty(_urls, "delete_slot", "api/v1/deleteSlot"), _defineProperty(_urls, "slot_availability", "api/v1/readAvailibalityChecking"), _defineProperty(_urls, "upsert_task", "api/v1/upsertTask"), _defineProperty(_urls, "read_task", "api/v1/readTask"), _defineProperty(_urls, "delete_task", "api/v1/deleteTask"), _defineProperty(_urls, "upsert_schedule", "api/v1/upsertSchedule"), _defineProperty(_urls, "read_schedule", "api/v1/readSchedule"), _defineProperty(_urls, "delete_schedule", "api/v1/deleteSchedule"), _defineProperty(_urls, "upsert_person", "api/v1/upsertPerson"), _defineProperty(_urls, "read_person", "api/v1/readPerson"), _defineProperty(_urls, "delete_person", "api/v1/deletePerson"), _defineProperty(_urls, "upsert_practitioner_role", "api/v1/upsertPractitionerRole"), _defineProperty(_urls, "read_practitioner_role", "api/v1/readPractitionerRole"), _defineProperty(_urls, "delete_practitioner_role", "api/v1/deletePractitionerRole"), _defineProperty(_urls, "get_user_info", "api/v1/getUserInfo"), _defineProperty(_urls, "oraganization_registration", "api/v1/orgUserRegistration"), _defineProperty(_urls, "oraganization_siginIn", "".concat(__keyClockLogin__, "/api/v1/orgUserSignIn")), _defineProperty(_urls, "oraganization_registet_patient", "api/v1/upsert_document"), _urls);
2387
-
2388
- var _extraReducers;
2389
- var __options = {
2390
- method: "POST",
2391
- headers: {
2392
- "Content-Type": "text/plain"
2330
+ var query_ids = {
2331
+ "searhcApiSlice/getSpeciality": "e44815f9-8e63-406f-855f-09225f11c11d",
2332
+ "searhcApiSlice/getAllSpeciality": "c64c4a00-9c2d-4069-bd99-53d351606ef8",
2333
+ "searhcApiSlice/getSymptoms": "b15e9945-28c7-4ec7-9fc7-022f58ba766f",
2334
+ "searhcApiSlice/getHospitals": "f3434d9b-2811-4472-b382-2bb01f57a3b3",
2335
+ doctorListing: "ff38b85a-7363-4fb3-9a8a-2b861f05beff",
2336
+ doctorListing_practitioner: "4034bc70-d67c-433f-95ad-ca7dc075ffd8",
2337
+ "slotApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
2338
+ "slotApiSlice/freeSlot": "27c8df01-ab61-4c60-838a-46071b34430e",
2339
+ hospitalList: "f3434d9b-2811-4472-b382-2bb01f57a3b3",
2340
+ "appointmentReducer/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
2341
+ "personApiSlice/upsertPerson": "04ecb73d-f048-44ce-8563-c9be015812dd",
2342
+ "personApiSlice/readPerson": "ff38b85a-7363-4fb3-9a8a-2b861f05beef",
2343
+ "appointmentReducer/upsertAppointment": "04ecb73d-f048-44ce-8563-c9be015812dd",
2344
+ "slotApiSlice/readSlot": {
2345
+ practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
2346
+ clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951"
2393
2347
  },
2394
- body: {}
2348
+ "appointmentReducer/allAppointments": "ff38b85a-7363-4fb3-9a8a-2b861f06aeff",
2349
+ "appointmentReducer/reasonForAppointment": "ff38b85a-7363-4fb3-9a8a-2b861f05ceff",
2350
+ "personApiSlice/addRelatedPerson": "04ecb73d-f048-44ce-8563-c9be015812dd",
2351
+ "personApiSlice/getRelatedPerson": "ff38b85a-7363-4fb3-9a8a-2b861ddffeff",
2352
+ "personApiSlice/SearchPerson": "ed874349-89bf-4fca-b045-4228bf69e43d",
2353
+ "personApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
2354
+ "appointmentReducer/upsertReadAppointment": {
2355
+ practionerid: "1db17c11-4bf4-44f3-844c-b15471548a47",
2356
+ clinicid: "45db9789-07b5-4ca4-85ef-7641147761ee"
2357
+ },
2358
+ "practitionerReducer/upsertHoliday": "04ecb73d-f048-44ce-8563-c9be015812dd",
2359
+ "appointmentReducer/reccuranceAppointment": {
2360
+ practioner: "b63b22f6-2c89-4189-8b08-7b3199ecbe01",
2361
+ clinic: "ee1efa2f-cde4-416e-8261-44c573442efb"
2362
+ },
2363
+ "appointmentReducer/queueManagement": "3a756831-94f1-4b24-8ea7-4700b0b0be31",
2364
+ "searhcApiSlice/masterSearch": "0f0e1609-e0ca-4757-b922-538491e3334a",
2365
+ "appointmentReducer/updateAppointmentStatus": "",
2366
+ "consultant/cheifComplaints": "04ecb73d-f048-44ce-8563-c9be015812dd",
2367
+ "consultant/diagnosis": "04ecb73d-f048-44ce-8563-c9be015812dd",
2368
+ "consultant/allergy": "04ecb73d-f048-44ce-8563-c9be015812dd",
2369
+ "consultant/medication": "04ecb73d-f048-44ce-8563-c9be015812dd",
2370
+ "consultant/treatment": "04ecb73d-f048-44ce-8563-c9be015812dd"
2395
2371
  };
2396
- var REGISTER_USERS = createAsyncThunk("authSlice/registerUsers", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
2397
- var payload,
2398
- _ref2,
2399
- rejectWithValue,
2400
- _payload$firstName,
2401
- firstName,
2402
- _payload$lastName,
2403
- lastName,
2404
- _payload$emailId,
2405
- emailId,
2406
- _payload$mobileNo,
2407
- mobileNo,
2408
- _,
2409
- _args = arguments;
2410
-
2411
- return regeneratorRuntime.wrap(function _callee$(_context) {
2412
- while (1) {
2413
- switch (_context.prev = _context.next) {
2414
- case 0:
2415
- payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
2416
- _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
2417
- _context.prev = 2;
2418
- _payload$firstName = payload.firstName, firstName = _payload$firstName === void 0 ? "" : _payload$firstName, _payload$lastName = payload.lastName, lastName = _payload$lastName === void 0 ? "" : _payload$lastName, _payload$emailId = payload.emailId, emailId = _payload$emailId === void 0 ? "" : _payload$emailId, _payload$mobileNo = payload.mobileNo, mobileNo = _payload$mobileNo === void 0 ? "" : _payload$mobileNo;
2419
- _context.next = 6;
2420
- return fetch(urls.register_user, _objectSpread2(_objectSpread2({}, __options), {}, {
2421
- body: btoa(JSON.stringify({
2422
- "username": mobileNo,
2423
- "enabled": true,
2424
- "totp": false,
2425
- "emailVerified": true,
2426
- "firstName": firstName,
2427
- "lastName": lastName,
2428
- "email": emailId,
2429
- "disableableCredentialTypes": [],
2430
- "requiredActions": [],
2431
- "notBefore": 0,
2432
- "access": {
2433
- "manageGroupMembership": true,
2434
- "view": true,
2435
- "mapRoles": true,
2436
- "impersonate": true,
2437
- "manage": true
2438
- },
2439
- "realmRoles": ["mb-user"]
2440
- }))
2441
- }));
2442
-
2443
- case 6:
2444
- _ = _context.sent;
2445
- _context.next = 9;
2446
- return _.json();
2447
-
2448
- case 9:
2449
- _ = _context.sent;
2450
- return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2451
- data: _
2452
- }));
2453
-
2454
- case 13:
2455
- _context.prev = 13;
2456
- _context.t0 = _context["catch"](2);
2457
- return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2458
- message: _context.t0.message
2459
- })));
2460
-
2461
- case 16:
2462
- case "end":
2463
- return _context.stop();
2464
- }
2372
+ var dbName = process.env.REACT_APP_DB;
2373
+ var queries = {
2374
+ IdmGetPermission: function IdmGetPermission(id) {
2375
+ return {
2376
+ db_name: "".concat(dbName),
2377
+ entity: "PermissionRoleMapping",
2378
+ filter: "PermissionRoleMapping.role_id == ".concat(id),
2379
+ return_fields: "{PermissionRoleMapping}"
2380
+ };
2381
+ },
2382
+ visit_read: function visit_read(encounter_id) {
2383
+ return {
2384
+ db_name: "".concat(dbName),
2385
+ entity: "Encounter",
2386
+ filter: "Encounter.activestatus==true && Encounter._id=='".concat(encounter_id, "'"),
2387
+ return_fields: "Encounter"
2388
+ };
2389
+ },
2390
+ get_apo_read: function get_apo_read(appointmentId) {
2391
+ return {
2392
+ db_name: "".concat(dbName),
2393
+ entity: "Appointment",
2394
+ filter: "Appointment.activestatus==true && Appointment._id=='".concat(appointmentId, "'"),
2395
+ return_fields: "Appointment"
2396
+ };
2397
+ },
2398
+ get_apo_read_list: function get_apo_read_list(appointmentId) {
2399
+ return {
2400
+ db_name: "".concat(dbName),
2401
+ entity: "Encounter,Patient",
2402
+ filter: {
2403
+ Encounter: "".concat(appointmentId, " IN Encounter.appointmentId"),
2404
+ Patient: "Patient.id == Encounter.patient_id"
2405
+ },
2406
+ return_fields: "MERGE(Encounter, {patient_id: (FOR pat IN Patient.identifier RETURN MERGE(Patient,{identifier:DOCUMENT(pat),name:(FOR hn IN Patient.name RETURN DOCUMENT(hn)), telecom:(FOR tel IN Patient.telecom RETURN DOCUMENT(tel)), photo:(FOR ph IN Patient.photo RETURN DOCUMENT(ph)), martialStatus:(FOR ms IN Patient.martialStatus RETURN DOCUMENT(ms)) } )), } )"
2407
+ };
2408
+ },
2409
+ visitmodify: {
2410
+ // Appointment/10158
2411
+ query: function query(id) {
2412
+ return "Appointment.activestatus==true && Appointment._id=='".concat(id, "'");
2413
+ },
2414
+ returnFields: "Appointment"
2415
+ },
2416
+ instructionQuery: {
2417
+ query: function query(id, collection, key, type) {
2418
+ return "".concat(collection, ".id==").concat(id, " for ccm in CodeableConceptMaster FILTER ccm.Type=='").concat(key, "' for cm in CodingMaster FILTER ").concat(collection, ".").concat(type, " ANY==ccm._id && ccm.coding ANY == cm._id");
2419
+ },
2420
+ returnFields: function returnFields(collection) {
2421
+ return "{id:".concat(collection, "._id, display:cm.display}");
2465
2422
  }
2466
- }, _callee, null, [[2, 13]]);
2467
- })));
2468
- var GENERATE_OTP = createAsyncThunk("authSlice/generateOTP", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2469
- var payload,
2470
- _ref4,
2471
- rejectWithValue,
2472
- _payload$mobileNo2,
2473
- mobileNo,
2474
- _,
2475
- _args2 = arguments;
2476
-
2477
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
2478
- while (1) {
2479
- switch (_context2.prev = _context2.next) {
2480
- case 0:
2481
- payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
2482
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
2483
- _context2.prev = 2;
2484
- _payload$mobileNo2 = payload.mobileNo, mobileNo = _payload$mobileNo2 === void 0 ? "" : _payload$mobileNo2;
2485
- _context2.next = 6;
2486
- return fetch(urls.generate_otp, _objectSpread2(_objectSpread2({}, __options), {}, {
2487
- body: btoa(JSON.stringify({
2488
- "username": mobileNo
2489
- }))
2490
- }));
2491
-
2492
- case 6:
2493
- _ = _context2.sent;
2494
- _context2.next = 9;
2495
- return _.json();
2496
-
2497
- case 9:
2498
- _ = _context2.sent;
2499
- return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2500
- data: _
2501
- }));
2502
-
2503
- case 13:
2504
- _context2.prev = 13;
2505
- _context2.t0 = _context2["catch"](2);
2506
- return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2507
- message: _context2.t0.message
2508
- })));
2509
-
2510
- case 16:
2511
- case "end":
2512
- return _context2.stop();
2513
- }
2514
- }
2515
- }, _callee2, null, [[2, 13]]);
2516
- })));
2517
- var RESEND_OTP = createAsyncThunk("authSlice/resendOTP", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
2518
- var payload,
2519
- _ref6,
2520
- rejectWithValue,
2521
- _payload$mobileNo3,
2522
- mobileNo,
2523
- _,
2524
- _args3 = arguments;
2525
-
2526
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
2527
- while (1) {
2528
- switch (_context3.prev = _context3.next) {
2529
- case 0:
2530
- payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
2531
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
2532
- _context3.prev = 2;
2533
- _payload$mobileNo3 = payload.mobileNo, mobileNo = _payload$mobileNo3 === void 0 ? "" : _payload$mobileNo3;
2534
- _context3.next = 6;
2535
- return fetch(urls.resend_otp, _objectSpread2(_objectSpread2({}, __options), {}, {
2536
- body: btoa(JSON.stringify({
2537
- "username": mobileNo
2538
- }))
2539
- }));
2540
-
2541
- case 6:
2542
- _ = _context3.sent;
2543
- _context3.next = 9;
2544
- return _.json();
2545
-
2546
- case 9:
2547
- _ = _context3.sent;
2548
- return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2549
- data: _
2550
- }));
2551
-
2552
- case 13:
2553
- _context3.prev = 13;
2554
- _context3.t0 = _context3["catch"](2);
2555
- return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2556
- message: _context3.t0.message
2557
- })));
2558
-
2559
- case 16:
2560
- case "end":
2561
- return _context3.stop();
2562
- }
2563
- }
2564
- }, _callee3, null, [[2, 13]]);
2565
- })));
2566
- var SIGN_IN = createAsyncThunk("authSlice/signIn", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
2567
- var payload,
2568
- _ref8,
2569
- rejectWithValue,
2570
- _payload$mobileNo4,
2571
- mobileNo,
2572
- _payload$otp,
2573
- otp,
2574
- _,
2575
- _args4 = arguments;
2576
-
2577
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
2578
- while (1) {
2579
- switch (_context4.prev = _context4.next) {
2580
- case 0:
2581
- payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
2582
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
2583
- _context4.prev = 2;
2584
- _payload$mobileNo4 = payload.mobileNo, mobileNo = _payload$mobileNo4 === void 0 ? "" : _payload$mobileNo4, _payload$otp = payload.otp, otp = _payload$otp === void 0 ? "" : _payload$otp;
2585
- _context4.next = 6;
2586
- return fetch(urls.sign_in, _objectSpread2(_objectSpread2({}, __options), {}, {
2587
- body: btoa(JSON.stringify({
2588
- "username": mobileNo,
2589
- "password": otp
2590
- }))
2591
- }));
2592
-
2593
- case 6:
2594
- _ = _context4.sent;
2595
- _context4.next = 9;
2596
- return _.json();
2597
-
2598
- case 9:
2599
- _ = _context4.sent;
2600
- return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2601
- data: _
2602
- }));
2603
-
2604
- case 13:
2605
- _context4.prev = 13;
2606
- _context4.t0 = _context4["catch"](2);
2607
- return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2608
- message: _context4.t0.message
2609
- })));
2610
-
2611
- case 16:
2612
- case "end":
2613
- return _context4.stop();
2614
- }
2615
- }
2616
- }, _callee4, null, [[2, 13]]);
2617
- })));
2618
- var LOG_OUT = createAsyncThunk("authSlice/logout", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
2619
- var payload,
2620
- _ref10,
2621
- rejectWithValue,
2622
- _payload$userId,
2623
- userId,
2624
- _payload$accessToken,
2625
- accessToken,
2626
- _,
2627
- _args5 = arguments;
2628
-
2629
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
2630
- while (1) {
2631
- switch (_context5.prev = _context5.next) {
2632
- case 0:
2633
- payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
2634
- _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
2635
- _context5.prev = 2;
2636
- _payload$userId = payload.userId, userId = _payload$userId === void 0 ? "" : _payload$userId, _payload$accessToken = payload.accessToken, accessToken = _payload$accessToken === void 0 ? "" : _payload$accessToken;
2637
- _context5.next = 6;
2638
- return fetch(urls.logout, _objectSpread2(_objectSpread2({}, __options), {}, {
2639
- headers: {
2640
- "Content-Type": "application/json"
2641
- },
2642
- body: {
2643
- "user_id": userId,
2644
- "access_token": accessToken
2645
- }
2646
- }));
2647
-
2648
- case 6:
2649
- _ = _context5.sent;
2650
- _context5.next = 9;
2651
- return _.json();
2423
+ },
2424
+ getPatientByMRN: {
2425
+ query: function query(id) {
2426
+ return "Patient.alias=='".concat(id, "' && Person.Id==Patient.personID LET name=(FOR nam IN Person.name LET period=(FOR per IN TO_ARRAY(DOCUMENT(nam).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(nam),{period:period})) LET telecom=(FOR tel IN Person.telecom LET period=(FOR per IN TO_ARRAY(DOCUMENT(tel).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(tel),{period:period})) LET photo=(FOR pht IN Person.photo RETURN DOCUMENT(pht))");
2427
+ },
2428
+ returnFields: "MERGE(Person,{name:name,telecom:telecom,photo:photo})"
2429
+ },
2430
+ codablemasterType: {
2431
+ query: function query(type) {
2432
+ return "CodeableConceptMaster.Type=='".concat(type, "'");
2433
+ },
2434
+ // "db_name": dbName,
2435
+ // "entity": "CodeableConceptMaster",
2436
+ // "filter": "CodeableConceptMaster.Type=='ORGTYPE'",
2437
+ returnFields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
2438
+ },
2439
+ codablemasterName: {
2440
+ query: function query(name) {
2441
+ return "'".concat(name, "' IN Organization.OrgType");
2442
+ },
2443
+ // "filter": "'Hospital' IN Organization.OrgType",
2444
+ returnFields: "{OrgID:Organization.id,name:Organization.name}"
2445
+ },
2446
+ codablemasterSpeciality: {
2447
+ query: function query(id) {
2448
+ return JSON.parse("{\"HealthcareService\":\"HealthcareService.OrgID==".concat(id, "\",\n \"CodeableConceptMaster\":\"CodeableConceptMaster.Type=='SPECIALTY' AND HealthcareService.SpecialtyID ANY == CodeableConceptMaster.id\"}"));
2449
+ },
2450
+ // "filter": {"HealthcareService":"HealthcareService.OrgID==17",
2451
+ // "CodeableConceptMaster":"CodeableConceptMaster.Type=='SPECIALTY' AND HealthcareService.SpecialtyID ANY == CodeableConceptMaster.id"},
2452
+ returnFields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
2453
+ },
2454
+ codablemasterPractitioner: {
2455
+ query: function query(OrgID) {
2456
+ return "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==".concat(OrgID);
2457
+ },
2458
+ returnFields: "MERGE(Practitioner,{name:TO_ARRAY(DOCUMENT( Practitioner.name)), practitioner_type:(FOR cod IN TO_ARRAY(DOCUMENT(Practitioner.practitioner_type).coding) RETURN MERGE(DOCUMENT(Practitioner.practitioner_type),{coding:DOCUMENT(cod) } ) ) } )"
2459
+ },
2460
+ codablemasterGetFinancial: {
2461
+ query: function query(patientId) {
2462
+ return "Account.guarantor[0].patient_id==".concat(patientId);
2463
+ },
2464
+ // "filter": "Account.patient_id==@patient_id",
2465
+ returnFields: "Account"
2466
+ },
2467
+ codablemasterPractitionerRole: {
2468
+ query: function query(OrgID) {
2469
+ return "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==".concat(OrgID, " && PractitionerRole.SpecialtyID ANY == CodeableConceptMaster.id");
2470
+ },
2471
+ // "filter": "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==9",
2472
+ returnFields: "MERGE(PractitionerRole,{code:(FOR cod IN PractitionerRole.code RETURN DOCUMENT(cod)),Role:(CodeableConceptMaster.text)})"
2473
+ },
2474
+ codablemasterGetReferral: {
2475
+ query: function query(patientid) {
2476
+ return "ReferralTrx.patientId==".concat(patientid);
2477
+ },
2478
+ // "filter": "ReferralTrx.patientId==123",
2479
+ returnFields: "MERGE(ReferralTrx,{identifier:(FOR iden IN ReferralTrx.identifier let Type=(FOR typ IN DOCUMENT(iden).Type let cod =(FOR cod IN DOCUMENT(typ).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(typ),{coding:cod})) RETURN MERGE(DOCUMENT(iden),{Type:Type})), serviceRequested:(FOR serreq IN ReferralTrx.serviceRequested let coding =(FOR cod IN DOCUMENT(serreq).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(serreq),{coding:coding})), reasonCode:(FOR rescod IN ReferralTrx.reasonCode let coding =(FOR cod IN DOCUMENT(rescod).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(rescod),{coding:coding})), Type:(FOR typs IN ReferralTrx.Type let coding =(FOR cod IN DOCUMENT(typs).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(typs),{coding:coding})) })"
2480
+ },
2481
+ codablemasterGetAppointment: {
2482
+ query: function query(appointmentId) {
2483
+ return "Patient.personID in Appointment.PersonID && Appointment.appno like '%".concat(appointmentId, "%'");
2484
+ },
2485
+ returnFields: "{AppointmentID:Appointment.id,_id:Appointment._id,status:Appointment.status,avc:Appointment.avc,appnumber:Appointment.appno,end:Appointment.end,start:Appointment.start,createddate:Appointment.createddate,updatedate:Appointment.updatedate,patient:merge(Patient,{identifier:document(Patient.identifier)},{martialStatus:document(Patient.martialStatus)},{name:document(Patient.name)},{telecom:document(Patient.telecom)},{photo:document(Patient.photo)},{personID:(for pid in Person filter pid.Id == Patient.personID return pid)},{address:document(Patient.address)},{activereason:(DOCUMENT(Patient.activereason)),deceasedreason:(DOCUMENT(Patient.deceasedreason))},{isdeceased:(for doc in CodeableConceptMaster filter doc._id==Patient.isdeceased return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod)}))})}"
2486
+ },
2487
+ codablemasterGetPatientname: {
2488
+ query: function query(patientName) {
2489
+ return JSON.parse("\n {\n \"HumanNameMaster\": \"HumanNameMaster.text LIKE '".concat(patientName, "'\",\n \"Person\": \"Person.name[*] ANY == HumanNameMaster._id\",\n \"Patient\": \"Patient.personID == Person.Id\"\n }"));
2490
+ },
2491
+ returnFields: "{'prefix': HumanNameMaster.prefix, 'name': HumanNameMaster.text, 'personId': Person.Id, 'patientDetails': Patient, 'telecom': Document(Person.telecom)}"
2492
+ },
2493
+ specialityAgainstPractitioner: {
2494
+ query: function query() {
2495
+ return JSON.parse("\n {\n \"CodeableConceptMaster\": \"CodeableConceptMaster.Type=='SPECIALTY' AND PractitionerRole.SpecialtyID ANY ==CodeableConceptMaster.id\",\n \"Practitioner\": \"Practitioner.PractitionerRoleID==PractitionerRole.id\"\n }");
2496
+ },
2497
+ returnFields: "MERGE({_id:Practitioner._id,id:Practitioner.id},{name:(FOR cod IN TO_ARRAY(Practitioner.name) RETURN DOCUMENT(cod))},{SPECIALTY:(FOR spcod IN TO_ARRAY(DOCUMENT(CodeableConceptMaster._id).coding) RETURN MERGE(DOCUMENT(CodeableConceptMaster._id),{coding:DOCUMENT(spcod)})) })" // "MERGE({_id:Practitioner._id,id:Practitioner.id},{name:(FOR cod IN Practitioner.name RETURN DOCUMENT(cod))},{SPECIALTY:DOCUMENT(CodeableConceptMaster._id) })",
2652
2498
 
2653
- case 9:
2654
- _ = _context5.sent;
2655
- return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2656
- data: _
2657
- }));
2499
+ },
2500
+ practitionerAgainstOrganization: {
2501
+ query: function query(practitionerId) {
2502
+ return JSON.parse("\n {\n \"Practitioner\": \"Practitioner.id==".concat(practitionerId, "\",\n \"PractitionerRole\": \"Practitioner.PractitionerRoleID==PractitionerRole.id\",\n \"Organization\": \"PractitionerRole.OrgID ANY == Organization.id\"\n }"));
2503
+ },
2504
+ returnFields: "DISTINCT {Organization:Organization.name, OrgID:Organization.id}"
2505
+ },
2506
+ getCodableConceptMaster: function getCodableConceptMaster(_ref) {
2507
+ var _ref$type = _ref.type,
2508
+ type = _ref$type === void 0 ? "" : _ref$type;
2509
+ return {
2510
+ db_name: dbName,
2511
+ entity: "CodeableConceptMaster",
2512
+ filter: "CodeableConceptMaster.Type=='".concat(type, "'"),
2513
+ return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
2514
+ };
2515
+ },
2516
+ deleteCAOrderline: function deleteCAOrderline() {
2517
+ var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2518
+ var id = payload.id;
2519
+ return {
2520
+ db_name: dbName,
2521
+ entity: "CA_OrderLine",
2522
+ filter: "CA_OrderLine._id==".concat(id)
2523
+ };
2524
+ },
2525
+ getReasonMaster: function getReasonMaster() {
2526
+ return {
2527
+ db_name: dbName,
2528
+ entity: "ReasonMaster",
2529
+ return_fields: "ReasonMaster"
2530
+ };
2531
+ },
2532
+ getLocationMaster: function getLocationMaster() {
2533
+ return {
2534
+ db_name: dbName,
2535
+ entity: "LocationMaster",
2536
+ return_fields: "LocationMaster"
2537
+ };
2538
+ },
2539
+ getOrderCatalog: function getOrderCatalog() {
2540
+ return {
2541
+ db_name: dbName,
2542
+ entity: "OrderCatalog",
2543
+ filter: "OrderCatalog.ordercategory=='RAD'",
2544
+ return_fields: "{_id:OrderCatalog._id,id:OrderCatalog.id,ordercategory:OrderCatalog.ordercategory,ordercatalog:OrderCatalog.ordercatalog,shortdesc:OrderCatalog.shortdesc,longdesc:OrderCatalog.longdesc}",
2545
+ sort: "OrderCatalog.shortdesc asc"
2546
+ };
2547
+ },
2548
+ getOrderType: function getOrderType() {
2549
+ return {
2550
+ db_name: dbName,
2551
+ entity: "OrderType",
2552
+ filter: "OrderType.Ordcatgory=='RAD'",
2553
+ return_fields: "{_id:OrderType._id,id:OrderType.id,OrdType:OrderType.OrdType,shortdesc:OrderType.shortdesc,longdesc:OrderType.longdesc,Ordcatgory:OrderType.Ordcatgory}",
2554
+ sort: "OrderType.shortdesc asc"
2555
+ };
2556
+ },
2557
+ getCaOrderLine: function getCaOrderLine(_ref2) {
2558
+ var _ref2$id = _ref2.id,
2559
+ id = _ref2$id === void 0 ? 0 : _ref2$id;
2560
+ return {
2561
+ db_name: dbName,
2562
+ entity: "CA_OrderLine",
2563
+ filter: "CA_OrderLine.encounter_Id==".concat(id),
2564
+ return_fields: "CA_OrderLine"
2565
+ };
2566
+ },
2567
+ getOrganization: function getOrganization(_ref3) {
2568
+ var _ref3$id = _ref3.id,
2569
+ id = _ref3$id === void 0 ? 0 : _ref3$id;
2570
+ return {
2571
+ db_name: dbName,
2572
+ entity: "Organization",
2573
+ filter: "Organization.id==".concat(id),
2574
+ return_fields: "{_id:Organization._id,OrgID:Organization.id,name:Organization.name}"
2575
+ };
2576
+ },
2577
+ getPractionerRole: function getPractionerRole(_ref4) {
2578
+ var _ref4$id = _ref4.id,
2579
+ id = _ref4$id === void 0 ? 0 : _ref4$id;
2580
+ return {
2581
+ db_name: dbName,
2582
+ entity: "PractitionerRole,Organization,Practitioner",
2583
+ filter: {
2584
+ PractitionerRole: "PractitionerRole.OrgID ANY == ".concat(id),
2585
+ Practitioner: "PractitionerRole.id==Practitioner.PractitionerRoleID"
2586
+ },
2587
+ return_fields: "DISTINCT MERGE({PractitionerRole:DOCUMENT(PractitionerRole.code)})"
2588
+ };
2589
+ },
2590
+ getPractionerName: function getPractionerName(_ref5) {
2591
+ var _ref5$id = _ref5.id,
2592
+ id = _ref5$id === void 0 ? 0 : _ref5$id;
2593
+ return {
2594
+ db_name: dbName,
2595
+ entity: "PractitionerRole,Organization,Practitioner",
2596
+ filter: {
2597
+ PractitionerRole: "PractitionerRole.OrgID ANY == ".concat(id),
2598
+ Practitioner: "PractitionerRole.id==Practitioner.PractitionerRoleID"
2599
+ },
2600
+ return_fields: "DISTINCT MERGE({PractitionerName:DOCUMENT(Practitioner.name)})"
2601
+ };
2602
+ },
2603
+ getCaDiagnosis: function getCaDiagnosis(_ref6) {
2604
+ var _ref6$id = _ref6.id,
2605
+ id = _ref6$id === void 0 ? 0 : _ref6$id;
2606
+ return {
2607
+ db_name: dbName,
2608
+ entity: "CA_Diagnosis",
2609
+ filter: "CA_Diagnosis.encounter_id == ".concat(id),
2610
+ return_fields: "DOCUMENT(CA_Diagnosis.diagcode)"
2611
+ };
2612
+ },
2613
+ upsertCaOrderline: function upsertCaOrderline(_ref7) {
2614
+ var _ref7$doc = _ref7.doc,
2615
+ doc = _ref7$doc === void 0 ? {} : _ref7$doc;
2616
+ return [{
2617
+ db_name: dbName,
2618
+ entity: "CA_OrderLine",
2619
+ is_metadata: true,
2620
+ metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
2621
+ doc: _objectSpread2({}, doc)
2622
+ }];
2623
+ },
2624
+ upsertCaOrderApprovalWorkqueue: function upsertCaOrderApprovalWorkqueue(_ref8) {
2625
+ var _ref8$doc = _ref8.doc,
2626
+ doc = _ref8$doc === void 0 ? {} : _ref8$doc;
2627
+ return [{
2628
+ db_name: dbName,
2629
+ entity: "CA_OrderApprovalWorkqueue",
2630
+ is_metadata: true,
2631
+ metadataId: query_ids["personApiSlice/upsertPerson"],
2632
+ doc: _objectSpread2({}, doc)
2633
+ }];
2634
+ },
2635
+ commonUpsertQuery: function commonUpsertQuery(_ref9) {
2636
+ var _ref9$doc = _ref9.doc,
2637
+ doc = _ref9$doc === void 0 ? {} : _ref9$doc,
2638
+ _ref9$entity = _ref9.entity,
2639
+ entity = _ref9$entity === void 0 ? "" : _ref9$entity;
2640
+ return [{
2641
+ db_name: dbName,
2642
+ entity: entity,
2643
+ is_metadata: true,
2644
+ metadataId: query_ids["personApiSlice/upsertPerson"],
2645
+ doc: _objectSpread2({}, doc)
2646
+ }];
2647
+ }
2648
+ };
2658
2649
 
2659
- case 13:
2660
- _context5.prev = 13;
2661
- _context5.t0 = _context5["catch"](2);
2662
- return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2663
- message: _context5.t0.message
2664
- })));
2650
+ var _urls;
2651
+ var __baseUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/read_qdmqueries");
2652
+ var __uspsertUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/upsert_document");
2653
+ var __update__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/updatedocument");
2654
+ var __readDocumentUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/read_documents");
2655
+ var __deleteUrl__ = "".concat(process.env.REACT_APP_BASE_URL_PROTOCAL, "://").concat(process.env.REACT_APP_BASE_URL_HOST, ":").concat(process.env.REACT_APP_BASE_URL_PORT, "/api/delete_document");
2656
+ var __imgdownloadBaseUrl__ = "".concat(process.env.REACT_APP_IMAGE_UPLOAD_PROTOCAL || "https", "://").concat(process.env.REACT_APP_IMAGE_UPLOAD_HOST || "fileupload.dev.ainqaplatform.in", ":").concat(process.env.REACT_APP_IMAGE_UPLOAD_PORT || 443, "/").concat(dbName, "/");
2657
+ var __bookAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/bookAppointment");
2658
+ var __modifyAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/modifyAppointment");
2659
+ var __cancelAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/cancelAppointment");
2660
+ var __cancelAllAppointmentUrl__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT, "/api/v1/cancelAllAppointments");
2661
+ var __keyClockLogin__ = "".concat(process.env.REACT_APP_AUTH_URL_PROTOCAL, "://").concat(process.env.REACT_APP_AUTH_URL_HOST, ":").concat(process.env.REACT_APP_AUTH_URL_PORT); // vitals url
2662
+ var urls = (_urls = {
2663
+ generate_otp: "".concat(__keyClockLogin__, "/api/v1/generateOTP"),
2664
+ register_user: "".concat(__keyClockLogin__, "/api/v1/userRegistration"),
2665
+ sign_in: "".concat(__keyClockLogin__, "/api/v1/userSignIn"),
2666
+ resend_otp: "".concat(__keyClockLogin__, "/api/v1/resendOTP"),
2667
+ logout: "".concat(__keyClockLogin__, "/api/v1/logout"),
2668
+ forgotOrgUserPassword: "".concat(__keyClockLogin__, "/api/v1/forgotOrgUserPassword"),
2669
+ getUserInfo: "".concat(__keyClockLogin__, "/api/v1/getUserInfo"),
2670
+ getOrgUserInfo: "".concat(__keyClockLogin__, "/api/v1/getOrgUserInfo"),
2671
+ deleteUser: "".concat(__keyClockLogin__, "/api/v1/deleteUser"),
2672
+ // fuzzy_search
2673
+ fuzzy_search: "".concat(__baseUrl__, ":12013/api/fuzzySearch"),
2674
+ // patient
2675
+ patient_create: "".concat(__baseUrl__, ":11001/api/upsertPatient"),
2676
+ patient_update: "".concat(__baseUrl__, ":11001/api/upsertPatient"),
2677
+ patient_read: "".concat(__baseUrl__, ":11002/api/readPatient"),
2678
+ patient_delete: "".concat(__baseUrl__, ":11003/api/deletePatient"),
2679
+ // appointment
2680
+ appointment_create: "".concat(__baseUrl__, ":12001/api/upsertAppointment"),
2681
+ appointment_update: "".concat(__baseUrl__, ":12001/api/upsertAppointment"),
2682
+ appointment_read: "".concat(__baseUrl__, ":12003/api/readAppointment"),
2683
+ appointment_delete: "".concat(__baseUrl__, ":12002/api/deleteAppointment"),
2684
+ // appointment response
2685
+ appointment_response_create: "".concat(__baseUrl__, ":12004/api/upsertAppointmentResponse"),
2686
+ appointment_response_update: "".concat(__baseUrl__, ":12004/api/upsertAppointmentResponse"),
2687
+ appointment_response_read: "".concat(__baseUrl__, ":12005/api/readAppointmentResponse"),
2688
+ appointment_response_delete: "".concat(__baseUrl__, ":12006/api/deleteAppointmentResponse"),
2689
+ // related person
2690
+ related_person_create: "".concat(__baseUrl__, ":12010/api/upsertRelatedPerson"),
2691
+ related_person_update: "".concat(__baseUrl__, ":12010/api/upsertRelatedPerson"),
2692
+ related_person_read: "".concat(__baseUrl__, ":12011/api/readRelatedPerson"),
2693
+ related_person_delete: "".concat(__baseUrl__, ":12012/api/deleteRelatedPerson"),
2694
+ // practitioner
2695
+ practitioner_create: "".concat(__baseUrl__, ":17002/api/upsertPractitioner"),
2696
+ practitioner_update: "".concat(__baseUrl__, ":17002/api/upsertPractitioner"),
2697
+ practitioner_read: "".concat(__baseUrl__, ":17001/api/readPractitioner"),
2698
+ practitioner_delete: "".concat(__baseUrl__, ":17003/api/deletePractitioner"),
2699
+ // docter listing
2700
+ docter_listing: "".concat(__baseUrl__, ":17002/api/docterListing"),
2701
+ // Consulation
2702
+ get_cities: "/api/v1/getCityFromHospital",
2703
+ get_locality: "/api/v1/getLocalityBasedOnCity",
2704
+ get_hospitals_gps: "/api/v1/getHospitalBasedOnGPS",
2705
+ get_hospitals_locality: "/api/v1/getHospitalBasedonLocality"
2706
+ }, _defineProperty(_urls, "get_cities", "/api/v1/getCityFromHospital"), _defineProperty(_urls, "get_symptoms", "/api/v1/getSymptoms"), _defineProperty(_urls, "get_speciality", "/api/v1/getSpeciality"), _defineProperty(_urls, "upsert_service", "/api/v1/upsertService"), _defineProperty(_urls, "read_service", "/api/v1/readService"), _defineProperty(_urls, "delete_service", "/api/v1/deleteService"), _defineProperty(_urls, "upsert_slot", "/api/v1/upsertSlot"), _defineProperty(_urls, "read_slot", "api/v1/readSlot"), _defineProperty(_urls, "delete_slot", "api/v1/deleteSlot"), _defineProperty(_urls, "slot_availability", "api/v1/readAvailibalityChecking"), _defineProperty(_urls, "upsert_task", "api/v1/upsertTask"), _defineProperty(_urls, "read_task", "api/v1/readTask"), _defineProperty(_urls, "delete_task", "api/v1/deleteTask"), _defineProperty(_urls, "upsert_schedule", "api/v1/upsertSchedule"), _defineProperty(_urls, "read_schedule", "api/v1/readSchedule"), _defineProperty(_urls, "delete_schedule", "api/v1/deleteSchedule"), _defineProperty(_urls, "upsert_person", "api/v1/upsertPerson"), _defineProperty(_urls, "read_person", "api/v1/readPerson"), _defineProperty(_urls, "delete_person", "api/v1/deletePerson"), _defineProperty(_urls, "upsert_practitioner_role", "api/v1/upsertPractitionerRole"), _defineProperty(_urls, "read_practitioner_role", "api/v1/readPractitionerRole"), _defineProperty(_urls, "delete_practitioner_role", "api/v1/deletePractitionerRole"), _defineProperty(_urls, "get_user_info", "api/v1/getUserInfo"), _defineProperty(_urls, "oraganization_registration", "api/v1/orgUserRegistration"), _defineProperty(_urls, "oraganization_siginIn", "".concat(__keyClockLogin__, "/api/v1/orgUserSignIn")), _defineProperty(_urls, "oraganization_registet_patient", "api/v1/upsert_document"), _urls);
2665
2707
 
2666
- case 16:
2667
- case "end":
2668
- return _context5.stop();
2669
- }
2670
- }
2671
- }, _callee5, null, [[2, 13]]);
2672
- })));
2673
- var FORGOT_PASSWORD = createAsyncThunk("authSlice/forgotPassword", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
2708
+ var _extraReducers;
2709
+ var __options = {
2710
+ method: "POST",
2711
+ headers: {
2712
+ "Content-Type": "text/plain"
2713
+ },
2714
+ body: {}
2715
+ };
2716
+ var REGISTER_USERS = createAsyncThunk("authSlice/registerUsers", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
2674
2717
  var payload,
2675
- _ref12,
2718
+ _ref2,
2676
2719
  rejectWithValue,
2677
- _payload$username,
2678
- username,
2720
+ _payload$firstName,
2721
+ firstName,
2722
+ _payload$lastName,
2723
+ lastName,
2724
+ _payload$emailId,
2725
+ emailId,
2726
+ _payload$mobileNo,
2727
+ mobileNo,
2679
2728
  _,
2680
- _args6 = arguments;
2729
+ _args = arguments;
2681
2730
 
2682
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
2731
+ return regeneratorRuntime.wrap(function _callee$(_context) {
2683
2732
  while (1) {
2684
- switch (_context6.prev = _context6.next) {
2733
+ switch (_context.prev = _context.next) {
2685
2734
  case 0:
2686
- payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
2687
- _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
2688
- _context6.prev = 2;
2689
- _payload$username = payload.username, username = _payload$username === void 0 ? "" : _payload$username;
2690
- _context6.next = 6;
2691
- return fetch(urls.forgotOrgUserPassword, _objectSpread2(_objectSpread2({}, __options), {}, {
2735
+ payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
2736
+ _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
2737
+ _context.prev = 2;
2738
+ _payload$firstName = payload.firstName, firstName = _payload$firstName === void 0 ? "" : _payload$firstName, _payload$lastName = payload.lastName, lastName = _payload$lastName === void 0 ? "" : _payload$lastName, _payload$emailId = payload.emailId, emailId = _payload$emailId === void 0 ? "" : _payload$emailId, _payload$mobileNo = payload.mobileNo, mobileNo = _payload$mobileNo === void 0 ? "" : _payload$mobileNo;
2739
+ _context.next = 6;
2740
+ return fetch(urls.register_user, _objectSpread2(_objectSpread2({}, __options), {}, {
2692
2741
  body: btoa(JSON.stringify({
2693
- "username": username
2742
+ "username": mobileNo,
2743
+ "enabled": true,
2744
+ "totp": false,
2745
+ "emailVerified": true,
2746
+ "firstName": firstName,
2747
+ "lastName": lastName,
2748
+ "email": emailId,
2749
+ "disableableCredentialTypes": [],
2750
+ "requiredActions": [],
2751
+ "notBefore": 0,
2752
+ "access": {
2753
+ "manageGroupMembership": true,
2754
+ "view": true,
2755
+ "mapRoles": true,
2756
+ "impersonate": true,
2757
+ "manage": true
2758
+ },
2759
+ "realmRoles": ["mb-user"]
2694
2760
  }))
2695
2761
  }));
2696
2762
 
2697
2763
  case 6:
2698
- _ = _context6.sent;
2699
- _context6.next = 9;
2764
+ _ = _context.sent;
2765
+ _context.next = 9;
2700
2766
  return _.json();
2701
2767
 
2702
2768
  case 9:
2703
- _ = _context6.sent;
2704
- return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2769
+ _ = _context.sent;
2770
+ return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2705
2771
  data: _
2706
2772
  }));
2707
2773
 
2708
2774
  case 13:
2709
- _context6.prev = 13;
2710
- _context6.t0 = _context6["catch"](2);
2711
- return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2712
- message: _context6.t0.message
2775
+ _context.prev = 13;
2776
+ _context.t0 = _context["catch"](2);
2777
+ return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2778
+ message: _context.t0.message
2713
2779
  })));
2714
2780
 
2715
2781
  case 16:
2716
2782
  case "end":
2717
- return _context6.stop();
2718
- }
2719
- }
2720
- }, _callee6, null, [[2, 13]]);
2721
- })));
2722
- var GUEST_INFO = createAsyncThunk("authSlice/guestInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
2723
- var payload,
2724
- _args7 = arguments;
2725
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
2726
- while (1) {
2727
- switch (_context7.prev = _context7.next) {
2728
- case 0:
2729
- payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
2730
- return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2731
- data: payload,
2732
- isGuest: true
2733
- }));
2734
-
2735
- case 2:
2736
- case "end":
2737
- return _context7.stop();
2738
- }
2739
- }
2740
- }, _callee7);
2741
- })));
2742
- var LOGGED_USER_INFO = createAsyncThunk("authSlice/loggedUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
2743
- var payload,
2744
- _args8 = arguments;
2745
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
2746
- while (1) {
2747
- switch (_context8.prev = _context8.next) {
2748
- case 0:
2749
- payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
2750
- return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2751
- data: payload,
2752
- isSignedIn: true
2753
- }));
2754
-
2755
- case 2:
2756
- case "end":
2757
- return _context8.stop();
2758
- }
2759
- }
2760
- }, _callee8);
2761
- })));
2762
- var GET_USER_INFO = createAsyncThunk("authSlice/getUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
2763
- var payload,
2764
- _ref16,
2765
- rejectWithValue,
2766
- _payload$token,
2767
- token,
2768
- _,
2769
- _args9 = arguments;
2770
-
2771
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
2772
- while (1) {
2773
- switch (_context9.prev = _context9.next) {
2774
- case 0:
2775
- payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
2776
- _ref16 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
2777
- _context9.prev = 2;
2778
- _payload$token = payload.token, token = _payload$token === void 0 ? "" : _payload$token;
2779
- _context9.next = 6;
2780
- return fetch(urls.getUserInfo, _objectSpread2(_objectSpread2({}, __options), {}, {
2781
- body: token
2782
- }));
2783
-
2784
- case 6:
2785
- _ = _context9.sent;
2786
- _context9.next = 9;
2787
- return _.json();
2788
-
2789
- case 9:
2790
- _ = _context9.sent;
2791
-
2792
- if (!_.error) {
2793
- _context9.next = 12;
2794
- break;
2795
- }
2796
-
2797
- throw new Error(_.error);
2798
-
2799
- case 12:
2800
- return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2801
- data: {
2802
- name: _.name,
2803
- email: _.email,
2804
- mobile: _.preferred_username,
2805
- type: "token"
2806
- }
2807
- }));
2808
-
2809
- case 15:
2810
- _context9.prev = 15;
2811
- _context9.t0 = _context9["catch"](2);
2812
- return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2813
- data: {
2814
- error: _context9.t0.message
2815
- }
2816
- })));
2817
-
2818
- case 18:
2819
- case "end":
2820
- return _context9.stop();
2783
+ return _context.stop();
2821
2784
  }
2822
2785
  }
2823
- }, _callee9, null, [[2, 15]]);
2786
+ }, _callee, null, [[2, 13]]);
2824
2787
  })));
2825
- var GET_ORG_USER_INFO = createAsyncThunk("authSlice/getUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
2788
+ var GENERATE_OTP = createAsyncThunk("authSlice/generateOTP", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2826
2789
  var payload,
2827
- _ref18,
2790
+ _ref4,
2828
2791
  rejectWithValue,
2829
- _payload$token2,
2830
- token,
2792
+ _payload$mobileNo2,
2793
+ mobileNo,
2831
2794
  _,
2832
- _args10 = arguments;
2795
+ _args2 = arguments;
2833
2796
 
2834
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
2797
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
2835
2798
  while (1) {
2836
- switch (_context10.prev = _context10.next) {
2799
+ switch (_context2.prev = _context2.next) {
2837
2800
  case 0:
2838
- payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
2839
- _ref18 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
2840
- _context10.prev = 2;
2841
- _payload$token2 = payload.token, token = _payload$token2 === void 0 ? "" : _payload$token2;
2842
- _context10.next = 6;
2843
- return fetch(urls.getOrgUserInfo, _objectSpread2(_objectSpread2({}, __options), {}, {
2844
- body: token
2801
+ payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
2802
+ _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
2803
+ _context2.prev = 2;
2804
+ _payload$mobileNo2 = payload.mobileNo, mobileNo = _payload$mobileNo2 === void 0 ? "" : _payload$mobileNo2;
2805
+ _context2.next = 6;
2806
+ return fetch(urls.generate_otp, _objectSpread2(_objectSpread2({}, __options), {}, {
2807
+ body: btoa(JSON.stringify({
2808
+ "username": mobileNo
2809
+ }))
2845
2810
  }));
2846
2811
 
2847
2812
  case 6:
2848
- _ = _context10.sent;
2849
- _context10.next = 9;
2813
+ _ = _context2.sent;
2814
+ _context2.next = 9;
2850
2815
  return _.json();
2851
2816
 
2852
2817
  case 9:
2853
- _ = _context10.sent;
2854
-
2855
- if (!_.error) {
2856
- _context10.next = 12;
2857
- break;
2858
- }
2859
-
2860
- throw new Error(_.error);
2861
-
2862
- case 12:
2863
- return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2864
- data: {
2865
- name: _.name,
2866
- email: _.email,
2867
- mobile: _.preferred_username,
2868
- type: "token"
2869
- }
2818
+ _ = _context2.sent;
2819
+ return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2820
+ data: _
2870
2821
  }));
2871
2822
 
2872
- case 15:
2873
- _context10.prev = 15;
2874
- _context10.t0 = _context10["catch"](2);
2875
- return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2876
- data: {
2877
- error: _context10.t0.message
2878
- }
2823
+ case 13:
2824
+ _context2.prev = 13;
2825
+ _context2.t0 = _context2["catch"](2);
2826
+ return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2827
+ message: _context2.t0.message
2879
2828
  })));
2880
2829
 
2881
- case 18:
2830
+ case 16:
2882
2831
  case "end":
2883
- return _context10.stop();
2832
+ return _context2.stop();
2884
2833
  }
2885
2834
  }
2886
- }, _callee10, null, [[2, 15]]);
2835
+ }, _callee2, null, [[2, 13]]);
2887
2836
  })));
2888
- var DELETE_USER = createAsyncThunk("authSlice/deleteUser", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
2837
+ var RESEND_OTP = createAsyncThunk("authSlice/resendOTP", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
2889
2838
  var payload,
2890
- _ref20,
2839
+ _ref6,
2891
2840
  rejectWithValue,
2892
- _payload$username2,
2893
- username,
2841
+ _payload$mobileNo3,
2842
+ mobileNo,
2894
2843
  _,
2895
- _args11 = arguments;
2844
+ _args3 = arguments;
2896
2845
 
2897
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
2846
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
2898
2847
  while (1) {
2899
- switch (_context11.prev = _context11.next) {
2848
+ switch (_context3.prev = _context3.next) {
2900
2849
  case 0:
2901
- payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
2902
- _ref20 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
2903
- _context11.prev = 2;
2904
- _payload$username2 = payload.username, username = _payload$username2 === void 0 ? "" : _payload$username2;
2905
- _context11.next = 6;
2906
- return fetch(urls.deleteUser, _objectSpread2(_objectSpread2({}, __options), {}, {
2850
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
2851
+ _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
2852
+ _context3.prev = 2;
2853
+ _payload$mobileNo3 = payload.mobileNo, mobileNo = _payload$mobileNo3 === void 0 ? "" : _payload$mobileNo3;
2854
+ _context3.next = 6;
2855
+ return fetch(urls.resend_otp, _objectSpread2(_objectSpread2({}, __options), {}, {
2907
2856
  body: btoa(JSON.stringify({
2908
- "username": username
2857
+ "username": mobileNo
2909
2858
  }))
2910
2859
  }));
2911
2860
 
2912
2861
  case 6:
2913
- _ = _context11.sent;
2914
- _context11.next = 9;
2862
+ _ = _context3.sent;
2863
+ _context3.next = 9;
2915
2864
  return _.json();
2916
2865
 
2917
2866
  case 9:
2918
- _ = _context11.sent;
2919
-
2920
- if (!_.error) {
2921
- _context11.next = 12;
2922
- break;
2923
- }
2924
-
2925
- throw new Error(_.error);
2926
-
2927
- case 12:
2928
- return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2867
+ _ = _context3.sent;
2868
+ return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2929
2869
  data: _
2930
2870
  }));
2931
2871
 
2932
- case 15:
2933
- _context11.prev = 15;
2934
- _context11.t0 = _context11["catch"](2);
2935
- return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2936
- data: {
2937
- error: _context11.t0.message
2938
- }
2872
+ case 13:
2873
+ _context3.prev = 13;
2874
+ _context3.t0 = _context3["catch"](2);
2875
+ return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2876
+ message: _context3.t0.message
2939
2877
  })));
2940
2878
 
2941
- case 18:
2879
+ case 16:
2942
2880
  case "end":
2943
- return _context11.stop();
2881
+ return _context3.stop();
2944
2882
  }
2945
2883
  }
2946
- }, _callee11, null, [[2, 15]]);
2884
+ }, _callee3, null, [[2, 13]]);
2947
2885
  })));
2948
- var authSlice = createSlice({
2949
- name: "authSlice",
2950
- initialState: {
2951
- registerUsers: _objectSpread2({}, defaultState.Info),
2952
- generateOTP: _objectSpread2({}, defaultState.Info),
2953
- resendOTP: _objectSpread2({}, defaultState.Info),
2954
- signIn: _objectSpread2({}, defaultState.Info),
2955
- logout: _objectSpread2({}, defaultState.Info),
2956
- guestInfo: _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2957
- isGuest: false
2958
- }),
2959
- loggedUserInfo: _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2960
- isSignedIn: false
2961
- }),
2962
- forgotPassword: _objectSpread2({}, defaultState.Info),
2963
- deleteUser: _objectSpread2({}, defaultState.Info)
2964
- },
2965
- extraReducers: (_extraReducers = {}, _defineProperty(_extraReducers, REGISTER_USERS.fulfilled, function (state, action) {
2966
- var _action$payload;
2967
-
2968
- state.registerUsers = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
2969
- }), _defineProperty(_extraReducers, REGISTER_USERS.pending, function (state, action) {
2970
- state.registerUsers.loading = true;
2971
- }), _defineProperty(_extraReducers, REGISTER_USERS.rejected, function (state, action) {
2972
- var _action$payload2;
2973
-
2974
- state.registerUsers = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
2975
- }), _defineProperty(_extraReducers, DELETE_USER.fulfilled, function (state, action) {
2976
- var _action$payload3;
2977
-
2978
- state.deleteUser = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
2979
- }), _defineProperty(_extraReducers, DELETE_USER.pending, function (state, action) {
2980
- state.deleteUser.loading = true;
2981
- }), _defineProperty(_extraReducers, DELETE_USER.rejected, function (state, action) {
2982
- var _action$payload4;
2983
-
2984
- state.deleteUser = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
2985
- }), _defineProperty(_extraReducers, GENERATE_OTP.fulfilled, function (state, action) {
2986
- var _action$payload5;
2987
-
2988
- state.generateOTP = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
2989
- }), _defineProperty(_extraReducers, GENERATE_OTP.pending, function (state, action) {
2990
- state.generateOTP.loading = true;
2991
- }), _defineProperty(_extraReducers, GENERATE_OTP.rejected, function (state, action) {
2992
- var _action$payload6;
2993
-
2994
- state.generateOTP = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
2995
- }), _defineProperty(_extraReducers, RESEND_OTP.fulfilled, function (state, action) {
2996
- var _action$payload7;
2997
-
2998
- state.resendOTP = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
2999
- }), _defineProperty(_extraReducers, RESEND_OTP.pending, function (state, action) {
3000
- state.resendOTP.loading = true;
3001
- }), _defineProperty(_extraReducers, RESEND_OTP.rejected, function (state, action) {
3002
- var _action$payload8;
3003
-
3004
- state.resendOTP = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
3005
- }), _defineProperty(_extraReducers, SIGN_IN.fulfilled, function (state, action) {
3006
- var _action$payload9;
3007
-
3008
- state.signIn = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
3009
- }), _defineProperty(_extraReducers, SIGN_IN.pending, function (state, action) {
3010
- state.signIn.loading = true;
3011
- }), _defineProperty(_extraReducers, SIGN_IN.rejected, function (state, action) {
3012
- var _action$payload10;
3013
-
3014
- state.signIn = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
3015
- }), _defineProperty(_extraReducers, LOG_OUT.fulfilled, function (state, action) {
3016
- var _action$payload11;
3017
-
3018
- state.logout = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
3019
- }), _defineProperty(_extraReducers, LOG_OUT.pending, function (state, action) {
3020
- state.logout.loading = true;
3021
- }), _defineProperty(_extraReducers, LOG_OUT.rejected, function (state, action) {
3022
- var _action$payload12;
3023
-
3024
- state.logout = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
3025
- }), _defineProperty(_extraReducers, FORGOT_PASSWORD.fulfilled, function (state, action) {
3026
- var _action$payload13;
3027
-
3028
- state.forgotPassword = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
3029
- }), _defineProperty(_extraReducers, FORGOT_PASSWORD.pending, function (state, action) {
3030
- state.forgotPassword.loading = true;
3031
- }), _defineProperty(_extraReducers, FORGOT_PASSWORD.rejected, function (state, action) {
3032
- var _action$payload14;
3033
-
3034
- state.forgotPassword = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
3035
- }), _defineProperty(_extraReducers, GUEST_INFO.fulfilled, function (state, action) {
3036
- var _action$payload15;
2886
+ var SIGN_IN = createAsyncThunk("authSlice/signIn", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
2887
+ var payload,
2888
+ _ref8,
2889
+ rejectWithValue,
2890
+ _payload$mobileNo4,
2891
+ mobileNo,
2892
+ _payload$otp,
2893
+ otp,
2894
+ _,
2895
+ _args4 = arguments;
3037
2896
 
3038
- state.guestInfo = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
3039
- }), _defineProperty(_extraReducers, GUEST_INFO.pending, function (state, action) {
3040
- state.guestInfo.loading = true;
3041
- }), _defineProperty(_extraReducers, GUEST_INFO.rejected, function (state, action) {
3042
- var _action$payload16;
2897
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
2898
+ while (1) {
2899
+ switch (_context4.prev = _context4.next) {
2900
+ case 0:
2901
+ payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
2902
+ _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
2903
+ _context4.prev = 2;
2904
+ _payload$mobileNo4 = payload.mobileNo, mobileNo = _payload$mobileNo4 === void 0 ? "" : _payload$mobileNo4, _payload$otp = payload.otp, otp = _payload$otp === void 0 ? "" : _payload$otp;
2905
+ _context4.next = 6;
2906
+ return fetch(urls.sign_in, _objectSpread2(_objectSpread2({}, __options), {}, {
2907
+ body: btoa(JSON.stringify({
2908
+ "username": mobileNo,
2909
+ "password": otp
2910
+ }))
2911
+ }));
3043
2912
 
3044
- state.guestInfo = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
3045
- }), _defineProperty(_extraReducers, LOGGED_USER_INFO.fulfilled, function (state, action) {
3046
- var _action$payload17;
2913
+ case 6:
2914
+ _ = _context4.sent;
2915
+ _context4.next = 9;
2916
+ return _.json();
3047
2917
 
3048
- state.loggedUserInfo = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
3049
- }), _defineProperty(_extraReducers, LOGGED_USER_INFO.pending, function (state, action) {
3050
- state.loggedUserInfo.loading = true;
3051
- }), _defineProperty(_extraReducers, LOGGED_USER_INFO.rejected, function (state, action) {
3052
- var _action$payload18;
2918
+ case 9:
2919
+ _ = _context4.sent;
2920
+ return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2921
+ data: _
2922
+ }));
3053
2923
 
3054
- state.loggedUserInfo = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
3055
- }), _defineProperty(_extraReducers, GET_USER_INFO.fulfilled, function (state, action) {
3056
- var _action$payload19;
2924
+ case 13:
2925
+ _context4.prev = 13;
2926
+ _context4.t0 = _context4["catch"](2);
2927
+ return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2928
+ message: _context4.t0.message
2929
+ })));
3057
2930
 
3058
- state.loggedUserInfo = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
3059
- }), _defineProperty(_extraReducers, GET_USER_INFO.pending, function (state, action) {
3060
- state.loggedUserInfo.loading = true;
3061
- }), _defineProperty(_extraReducers, GET_USER_INFO.rejected, function (state, action) {
3062
- var _action$payload20;
2931
+ case 16:
2932
+ case "end":
2933
+ return _context4.stop();
2934
+ }
2935
+ }
2936
+ }, _callee4, null, [[2, 13]]);
2937
+ })));
2938
+ var LOG_OUT = createAsyncThunk("authSlice/logout", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
2939
+ var payload,
2940
+ _ref10,
2941
+ rejectWithValue,
2942
+ _payload$userId,
2943
+ userId,
2944
+ _payload$accessToken,
2945
+ accessToken,
2946
+ _,
2947
+ _args5 = arguments;
3063
2948
 
3064
- state.loggedUserInfo = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
3065
- }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.fulfilled, function (state, action) {
3066
- var _action$payload21;
2949
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
2950
+ while (1) {
2951
+ switch (_context5.prev = _context5.next) {
2952
+ case 0:
2953
+ payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
2954
+ _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
2955
+ _context5.prev = 2;
2956
+ _payload$userId = payload.userId, userId = _payload$userId === void 0 ? "" : _payload$userId, _payload$accessToken = payload.accessToken, accessToken = _payload$accessToken === void 0 ? "" : _payload$accessToken;
2957
+ _context5.next = 6;
2958
+ return fetch(urls.logout, _objectSpread2(_objectSpread2({}, __options), {}, {
2959
+ headers: {
2960
+ "Content-Type": "application/json"
2961
+ },
2962
+ body: {
2963
+ "user_id": userId,
2964
+ "access_token": accessToken
2965
+ }
2966
+ }));
3067
2967
 
3068
- state.loggedUserInfo = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
3069
- }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.pending, function (state, action) {
3070
- state.loggedUserInfo.loading = true;
3071
- }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.rejected, function (state, action) {
3072
- var _action$payload22;
2968
+ case 6:
2969
+ _ = _context5.sent;
2970
+ _context5.next = 9;
2971
+ return _.json();
3073
2972
 
3074
- state.loggedUserInfo = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
3075
- }), _extraReducers)
3076
- });
3077
- var authActions = {
3078
- REGISTER_USERS: REGISTER_USERS,
3079
- GENERATE_OTP: GENERATE_OTP,
3080
- RESEND_OTP: RESEND_OTP,
3081
- SIGN_IN: SIGN_IN,
3082
- LOG_OUT: LOG_OUT,
3083
- GUEST_INFO: GUEST_INFO,
3084
- LOGGED_USER_INFO: LOGGED_USER_INFO,
3085
- FORGOT_PASSWORD: FORGOT_PASSWORD,
3086
- GET_USER_INFO: GET_USER_INFO,
3087
- GET_ORG_USER_INFO: GET_ORG_USER_INFO,
3088
- DELETE_USER: DELETE_USER
3089
- };
3090
- var authSlice$1 = authSlice.reducer;
2973
+ case 9:
2974
+ _ = _context5.sent;
2975
+ return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
2976
+ data: _
2977
+ }));
3091
2978
 
3092
- var _extraReducers$1;
3093
- var __options$1 = {
3094
- method: "POST",
3095
- headers: {
3096
- "Content-Type": "text/plain"
3097
- },
3098
- body: {}
3099
- }; // FUZZY_SEARCH
2979
+ case 13:
2980
+ _context5.prev = 13;
2981
+ _context5.t0 = _context5["catch"](2);
2982
+ return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
2983
+ message: _context5.t0.message
2984
+ })));
3100
2985
 
3101
- var FUZZY_SEARCH = createAsyncThunk("fuzzySearchReducer/fuzzySearch", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
2986
+ case 16:
2987
+ case "end":
2988
+ return _context5.stop();
2989
+ }
2990
+ }
2991
+ }, _callee5, null, [[2, 13]]);
2992
+ })));
2993
+ var FORGOT_PASSWORD = createAsyncThunk("authSlice/forgotPassword", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
3102
2994
  var payload,
3103
- _ref2,
2995
+ _ref12,
3104
2996
  rejectWithValue,
3105
- _payload$db_name,
3106
- db_name,
3107
- _payload$entity,
3108
- entity,
3109
- _payload$filter,
3110
- filter,
3111
- _payload$value,
3112
- value,
2997
+ _payload$username,
2998
+ username,
3113
2999
  _,
3114
- _args = arguments;
3000
+ _args6 = arguments;
3115
3001
 
3116
- return regeneratorRuntime.wrap(function _callee$(_context) {
3002
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
3117
3003
  while (1) {
3118
- switch (_context.prev = _context.next) {
3004
+ switch (_context6.prev = _context6.next) {
3119
3005
  case 0:
3120
- payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
3121
- _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
3122
- _context.prev = 2;
3123
- _payload$db_name = payload.db_name, db_name = _payload$db_name === void 0 ? "primarycare" : _payload$db_name, _payload$entity = payload.entity, entity = _payload$entity === void 0 ? "Person" : _payload$entity, _payload$filter = payload.filter, filter = _payload$filter === void 0 ? "" : _payload$filter, _payload$value = payload.value, value = _payload$value === void 0 ? "" : _payload$value;
3124
- _context.next = 6;
3125
- return fetch(urls.fuzzy_search, _objectSpread2(_objectSpread2({}, __options$1), {}, {
3006
+ payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
3007
+ _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
3008
+ _context6.prev = 2;
3009
+ _payload$username = payload.username, username = _payload$username === void 0 ? "" : _payload$username;
3010
+ _context6.next = 6;
3011
+ return fetch(urls.forgotOrgUserPassword, _objectSpread2(_objectSpread2({}, __options), {}, {
3126
3012
  body: btoa(JSON.stringify({
3127
- "db_name": db_name,
3128
- "entity": entity,
3129
- "filter": filter,
3130
- "value": value
3013
+ "username": username
3131
3014
  }))
3132
3015
  }));
3133
3016
 
3134
3017
  case 6:
3135
- _ = _context.sent;
3136
- _context.next = 9;
3018
+ _ = _context6.sent;
3019
+ _context6.next = 9;
3137
3020
  return _.json();
3138
3021
 
3139
3022
  case 9:
3140
- _ = _context.sent;
3141
- return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3023
+ _ = _context6.sent;
3024
+ return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3142
3025
  data: _
3143
3026
  }));
3144
3027
 
3145
3028
  case 13:
3146
- _context.prev = 13;
3147
- _context.t0 = _context["catch"](2);
3148
- return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3149
- message: _context.t0.message
3029
+ _context6.prev = 13;
3030
+ _context6.t0 = _context6["catch"](2);
3031
+ return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3032
+ message: _context6.t0.message
3033
+ })));
3034
+
3035
+ case 16:
3036
+ case "end":
3037
+ return _context6.stop();
3038
+ }
3039
+ }
3040
+ }, _callee6, null, [[2, 13]]);
3041
+ })));
3042
+ var GUEST_INFO = createAsyncThunk("authSlice/guestInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
3043
+ var payload,
3044
+ _args7 = arguments;
3045
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
3046
+ while (1) {
3047
+ switch (_context7.prev = _context7.next) {
3048
+ case 0:
3049
+ payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
3050
+ return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3051
+ data: payload,
3052
+ isGuest: true
3053
+ }));
3054
+
3055
+ case 2:
3056
+ case "end":
3057
+ return _context7.stop();
3058
+ }
3059
+ }
3060
+ }, _callee7);
3061
+ })));
3062
+ var LOGGED_USER_INFO = createAsyncThunk("authSlice/loggedUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
3063
+ var payload,
3064
+ _args8 = arguments;
3065
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
3066
+ while (1) {
3067
+ switch (_context8.prev = _context8.next) {
3068
+ case 0:
3069
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
3070
+ return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3071
+ data: payload,
3072
+ isSignedIn: true
3073
+ }));
3074
+
3075
+ case 2:
3076
+ case "end":
3077
+ return _context8.stop();
3078
+ }
3079
+ }
3080
+ }, _callee8);
3081
+ })));
3082
+ var GET_USER_INFO = createAsyncThunk("authSlice/getUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
3083
+ var payload,
3084
+ _ref16,
3085
+ rejectWithValue,
3086
+ _payload$token,
3087
+ token,
3088
+ _,
3089
+ _args9 = arguments;
3090
+
3091
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
3092
+ while (1) {
3093
+ switch (_context9.prev = _context9.next) {
3094
+ case 0:
3095
+ payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
3096
+ _ref16 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
3097
+ _context9.prev = 2;
3098
+ _payload$token = payload.token, token = _payload$token === void 0 ? "" : _payload$token;
3099
+ _context9.next = 6;
3100
+ return fetch(urls.getUserInfo, _objectSpread2(_objectSpread2({}, __options), {}, {
3101
+ body: token
3102
+ }));
3103
+
3104
+ case 6:
3105
+ _ = _context9.sent;
3106
+ _context9.next = 9;
3107
+ return _.json();
3108
+
3109
+ case 9:
3110
+ _ = _context9.sent;
3111
+
3112
+ if (!_.error) {
3113
+ _context9.next = 12;
3114
+ break;
3115
+ }
3116
+
3117
+ throw new Error(_.error);
3118
+
3119
+ case 12:
3120
+ return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3121
+ data: {
3122
+ name: _.name,
3123
+ email: _.email,
3124
+ mobile: _.preferred_username,
3125
+ type: "token"
3126
+ }
3127
+ }));
3128
+
3129
+ case 15:
3130
+ _context9.prev = 15;
3131
+ _context9.t0 = _context9["catch"](2);
3132
+ return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3133
+ data: {
3134
+ error: _context9.t0.message
3135
+ }
3150
3136
  })));
3151
3137
 
3152
- case 16:
3138
+ case 18:
3153
3139
  case "end":
3154
- return _context.stop();
3140
+ return _context9.stop();
3155
3141
  }
3156
3142
  }
3157
- }, _callee, null, [[2, 13]]);
3158
- }))); // end
3159
- // FUZZY SEARCH CREATE INITIALSTATE
3160
-
3161
- var fuzzySearchReducer = createSlice({
3162
- name: "fuzzySearchReducer",
3163
- initialState: {
3164
- fuzzySearch: _objectSpread2({}, defaultState.Info)
3165
- },
3166
- extraReducers: (_extraReducers$1 = {}, _defineProperty(_extraReducers$1, FUZZY_SEARCH.fulfilled, function (state, action) {
3167
- var _action$payload;
3168
-
3169
- state.fuzzySearch = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
3170
- }), _defineProperty(_extraReducers$1, FUZZY_SEARCH.pending, function (state, action) {
3171
- state.fuzzySearch.loading = true;
3172
- }), _defineProperty(_extraReducers$1, FUZZY_SEARCH.rejected, function (state, action) {
3173
- var _action$payload2;
3143
+ }, _callee9, null, [[2, 15]]);
3144
+ })));
3145
+ var GET_ORG_USER_INFO = createAsyncThunk("authSlice/getUserInfo", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
3146
+ var payload,
3147
+ _ref18,
3148
+ rejectWithValue,
3149
+ _payload$token2,
3150
+ token,
3151
+ _,
3152
+ _args10 = arguments;
3174
3153
 
3175
- state.fuzzySearch = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
3176
- }), _extraReducers$1)
3177
- }); // end
3178
- // FUZZY SEARCH CREATE ACTION LISTS
3154
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
3155
+ while (1) {
3156
+ switch (_context10.prev = _context10.next) {
3157
+ case 0:
3158
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
3159
+ _ref18 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
3160
+ _context10.prev = 2;
3161
+ _payload$token2 = payload.token, token = _payload$token2 === void 0 ? "" : _payload$token2;
3162
+ _context10.next = 6;
3163
+ return fetch(urls.getOrgUserInfo, _objectSpread2(_objectSpread2({}, __options), {}, {
3164
+ body: token
3165
+ }));
3179
3166
 
3180
- var fuzzySearchActions = {
3181
- FUZZY_SEARCH: FUZZY_SEARCH
3182
- }; // end
3183
- var fuzzySearchReducer$1 = fuzzySearchReducer.reducer;
3167
+ case 6:
3168
+ _ = _context10.sent;
3169
+ _context10.next = 9;
3170
+ return _.json();
3184
3171
 
3185
- var makeName = function makeName() {
3186
- var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3187
- var _nameObj$prefix = nameObj.prefix,
3188
- prefix = _nameObj$prefix === void 0 ? "" : _nameObj$prefix,
3189
- _nameObj$given = nameObj.given,
3190
- given = _nameObj$given === void 0 ? "" : _nameObj$given,
3191
- _nameObj$family = nameObj.family,
3192
- family = _nameObj$family === void 0 ? "" : _nameObj$family,
3193
- _nameObj$suffix = nameObj.suffix,
3194
- suffix = _nameObj$suffix === void 0 ? "" : _nameObj$suffix;
3195
- return "".concat(prefix && prefix + ".").concat(given && given + " ").concat(family).concat(suffix && " " + suffix);
3196
- };
3172
+ case 9:
3173
+ _ = _context10.sent;
3197
3174
 
3198
- var fetchData$1 = /*#__PURE__*/function () {
3199
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(input) {
3200
- var url,
3201
- __options,
3202
- res,
3203
- data,
3204
- _args = arguments;
3175
+ if (!_.error) {
3176
+ _context10.next = 12;
3177
+ break;
3178
+ }
3205
3179
 
3206
- return regeneratorRuntime.wrap(function _callee$(_context) {
3207
- while (1) {
3208
- switch (_context.prev = _context.next) {
3209
- case 0:
3210
- url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
3211
- __options = {
3212
- method: "POST",
3213
- headers: {
3214
- "Content-Type": "application/json"
3215
- },
3216
- body: {}
3217
- };
3218
- _context.next = 4;
3219
- return fetch(url, _objectSpread2(_objectSpread2({}, __options), input));
3180
+ throw new Error(_.error);
3220
3181
 
3221
- case 4:
3222
- res = _context.sent;
3223
- _context.next = 7;
3224
- return res.json();
3182
+ case 12:
3183
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3184
+ data: {
3185
+ name: _.name,
3186
+ email: _.email,
3187
+ mobile: _.preferred_username,
3188
+ type: "token"
3189
+ }
3190
+ }));
3225
3191
 
3226
- case 7:
3227
- data = _context.sent;
3228
- return _context.abrupt("return", data);
3192
+ case 15:
3193
+ _context10.prev = 15;
3194
+ _context10.t0 = _context10["catch"](2);
3195
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3196
+ data: {
3197
+ error: _context10.t0.message
3198
+ }
3199
+ })));
3229
3200
 
3230
- case 9:
3231
- case "end":
3232
- return _context.stop();
3233
- }
3201
+ case 18:
3202
+ case "end":
3203
+ return _context10.stop();
3234
3204
  }
3235
- }, _callee);
3236
- }));
3237
-
3238
- return function fetchData(_x) {
3239
- return _ref3.apply(this, arguments);
3240
- };
3241
- }();
3205
+ }
3206
+ }, _callee10, null, [[2, 15]]);
3207
+ })));
3208
+ var DELETE_USER = createAsyncThunk("authSlice/deleteUser", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
3209
+ var payload,
3210
+ _ref20,
3211
+ rejectWithValue,
3212
+ _payload$username2,
3213
+ username,
3214
+ _,
3215
+ _args11 = arguments;
3242
3216
 
3243
- var query_ids = {
3244
- "searhcApiSlice/getSpeciality": "e44815f9-8e63-406f-855f-09225f11c11d",
3245
- "searhcApiSlice/getAllSpeciality": "c64c4a00-9c2d-4069-bd99-53d351606ef8",
3246
- "searhcApiSlice/getSymptoms": "b15e9945-28c7-4ec7-9fc7-022f58ba766f",
3247
- "searhcApiSlice/getHospitals": "f3434d9b-2811-4472-b382-2bb01f57a3b3",
3248
- doctorListing: "ff38b85a-7363-4fb3-9a8a-2b861f05beff",
3249
- doctorListing_practitioner: "4034bc70-d67c-433f-95ad-ca7dc075ffd8",
3250
- "slotApiSlice/slotAvailability": "c21732eb-9330-45d2-a6bd-e67dca2136d5",
3251
- "slotApiSlice/freeSlot": "27c8df01-ab61-4c60-838a-46071b34430e",
3252
- hospitalList: "f3434d9b-2811-4472-b382-2bb01f57a3b3",
3253
- "appointmentReducer/readAppointment": "0bfea3d4-fe24-43f9-b5b8-cf9ff4365fab",
3254
- "personApiSlice/upsertPerson": "04ecb73d-f048-44ce-8563-c9be015812dd",
3255
- "personApiSlice/readPerson": "ff38b85a-7363-4fb3-9a8a-2b861f05beef",
3256
- "appointmentReducer/upsertAppointment": "04ecb73d-f048-44ce-8563-c9be015812dd",
3257
- "slotApiSlice/readSlot": {
3258
- practionerid: "30fcb559-96fb-48f6-a955-e47dd97bc851",
3259
- clinicid: "30fcb559-96fb-48f6-a955-e47dd97bc951"
3260
- },
3261
- "appointmentReducer/allAppointments": "ff38b85a-7363-4fb3-9a8a-2b861f06aeff",
3262
- "appointmentReducer/reasonForAppointment": "ff38b85a-7363-4fb3-9a8a-2b861f05ceff",
3263
- "personApiSlice/addRelatedPerson": "04ecb73d-f048-44ce-8563-c9be015812dd",
3264
- "personApiSlice/getRelatedPerson": "ff38b85a-7363-4fb3-9a8a-2b861ddffeff",
3265
- "personApiSlice/SearchPerson": "ed874349-89bf-4fca-b045-4228bf69e43d",
3266
- "personApiSlice/SearchPractioner": "2fef3beb-6f38-48b0-955f-90f88dab2822",
3267
- "appointmentReducer/upsertReadAppointment": {
3268
- practionerid: "1db17c11-4bf4-44f3-844c-b15471548a47",
3269
- clinicid: "45db9789-07b5-4ca4-85ef-7641147761ee"
3270
- },
3271
- "practitionerReducer/upsertHoliday": "04ecb73d-f048-44ce-8563-c9be015812dd",
3272
- "appointmentReducer/reccuranceAppointment": {
3273
- practioner: "b63b22f6-2c89-4189-8b08-7b3199ecbe01",
3274
- clinic: "ee1efa2f-cde4-416e-8261-44c573442efb"
3275
- },
3276
- "appointmentReducer/queueManagement": "3a756831-94f1-4b24-8ea7-4700b0b0be31",
3277
- "searhcApiSlice/masterSearch": "0f0e1609-e0ca-4757-b922-538491e3334a",
3278
- "appointmentReducer/updateAppointmentStatus": "",
3279
- "consultant/cheifComplaints": "04ecb73d-f048-44ce-8563-c9be015812dd",
3280
- "consultant/diagnosis": "04ecb73d-f048-44ce-8563-c9be015812dd",
3281
- "consultant/allergy": "04ecb73d-f048-44ce-8563-c9be015812dd",
3282
- "consultant/medication": "04ecb73d-f048-44ce-8563-c9be015812dd",
3283
- "consultant/treatment": "04ecb73d-f048-44ce-8563-c9be015812dd"
3284
- };
3285
- var dbName = process.env.REACT_APP_DB;
3286
- var queries = {
3287
- IdmGetPermission: function IdmGetPermission(id) {
3288
- return {
3289
- db_name: "".concat(dbName),
3290
- entity: "PermissionRoleMapping",
3291
- filter: "PermissionRoleMapping.role_id == ".concat(id),
3292
- return_fields: "{PermissionRoleMapping}"
3293
- };
3294
- },
3295
- visit_read: function visit_read(encounter_id) {
3296
- return {
3297
- db_name: "".concat(dbName),
3298
- entity: "Encounter",
3299
- filter: "Encounter.activestatus==true && Encounter._id=='".concat(encounter_id, "'"),
3300
- return_fields: "Encounter"
3301
- };
3302
- },
3303
- get_apo_read: function get_apo_read(appointmentId) {
3304
- return {
3305
- db_name: "".concat(dbName),
3306
- entity: "Appointment",
3307
- filter: "Appointment.activestatus==true && Appointment._id=='".concat(appointmentId, "'"),
3308
- return_fields: "Appointment"
3309
- };
3310
- },
3311
- get_apo_read_list: function get_apo_read_list(appointmentId) {
3312
- return {
3313
- db_name: "".concat(dbName),
3314
- entity: "Encounter,Patient",
3315
- filter: {
3316
- Encounter: "".concat(appointmentId, " IN Encounter.appointmentId"),
3317
- Patient: "Patient.id == Encounter.patient_id"
3318
- },
3319
- return_fields: "MERGE(Encounter, {patient_id: (FOR pat IN Patient.identifier RETURN MERGE(Patient,{identifier:DOCUMENT(pat),name:(FOR hn IN Patient.name RETURN DOCUMENT(hn)), telecom:(FOR tel IN Patient.telecom RETURN DOCUMENT(tel)), photo:(FOR ph IN Patient.photo RETURN DOCUMENT(ph)), martialStatus:(FOR ms IN Patient.martialStatus RETURN DOCUMENT(ms)) } )), } )"
3320
- };
3321
- },
3322
- visitmodify: {
3323
- // Appointment/10158
3324
- query: function query(id) {
3325
- return "Appointment.activestatus==true && Appointment._id=='".concat(id, "'");
3326
- },
3327
- returnFields: "Appointment"
3328
- },
3329
- instructionQuery: {
3330
- query: function query(id, collection, key, type) {
3331
- return "".concat(collection, ".id==").concat(id, " for ccm in CodeableConceptMaster FILTER ccm.Type=='").concat(key, "' for cm in CodingMaster FILTER ").concat(collection, ".").concat(type, " ANY==ccm._id && ccm.coding ANY == cm._id");
3332
- },
3333
- returnFields: function returnFields(collection) {
3334
- return "{id:".concat(collection, "._id, display:cm.display}");
3217
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
3218
+ while (1) {
3219
+ switch (_context11.prev = _context11.next) {
3220
+ case 0:
3221
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
3222
+ _ref20 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
3223
+ _context11.prev = 2;
3224
+ _payload$username2 = payload.username, username = _payload$username2 === void 0 ? "" : _payload$username2;
3225
+ _context11.next = 6;
3226
+ return fetch(urls.deleteUser, _objectSpread2(_objectSpread2({}, __options), {}, {
3227
+ body: btoa(JSON.stringify({
3228
+ "username": username
3229
+ }))
3230
+ }));
3231
+
3232
+ case 6:
3233
+ _ = _context11.sent;
3234
+ _context11.next = 9;
3235
+ return _.json();
3236
+
3237
+ case 9:
3238
+ _ = _context11.sent;
3239
+
3240
+ if (!_.error) {
3241
+ _context11.next = 12;
3242
+ break;
3243
+ }
3244
+
3245
+ throw new Error(_.error);
3246
+
3247
+ case 12:
3248
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3249
+ data: _
3250
+ }));
3251
+
3252
+ case 15:
3253
+ _context11.prev = 15;
3254
+ _context11.t0 = _context11["catch"](2);
3255
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3256
+ data: {
3257
+ error: _context11.t0.message
3258
+ }
3259
+ })));
3260
+
3261
+ case 18:
3262
+ case "end":
3263
+ return _context11.stop();
3264
+ }
3335
3265
  }
3266
+ }, _callee11, null, [[2, 15]]);
3267
+ })));
3268
+ var authSlice = createSlice({
3269
+ name: "authSlice",
3270
+ initialState: {
3271
+ registerUsers: _objectSpread2({}, defaultState.Info),
3272
+ generateOTP: _objectSpread2({}, defaultState.Info),
3273
+ resendOTP: _objectSpread2({}, defaultState.Info),
3274
+ signIn: _objectSpread2({}, defaultState.Info),
3275
+ logout: _objectSpread2({}, defaultState.Info),
3276
+ guestInfo: _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3277
+ isGuest: false
3278
+ }),
3279
+ loggedUserInfo: _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3280
+ isSignedIn: false
3281
+ }),
3282
+ forgotPassword: _objectSpread2({}, defaultState.Info),
3283
+ deleteUser: _objectSpread2({}, defaultState.Info)
3336
3284
  },
3337
- getPatientByMRN: {
3338
- query: function query(id) {
3339
- return "Patient.alias=='".concat(id, "' && Person.Id==Patient.personID LET name=(FOR nam IN Person.name LET period=(FOR per IN TO_ARRAY(DOCUMENT(nam).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(nam),{period:period})) LET telecom=(FOR tel IN Person.telecom LET period=(FOR per IN TO_ARRAY(DOCUMENT(tel).period) RETURN DOCUMENT(per)) RETURN MERGE(DOCUMENT(tel),{period:period})) LET photo=(FOR pht IN Person.photo RETURN DOCUMENT(pht))");
3340
- },
3341
- returnFields: "MERGE(Person,{name:name,telecom:telecom,photo:photo})"
3342
- },
3343
- codablemasterType: {
3344
- query: function query(type) {
3345
- return "CodeableConceptMaster.Type=='".concat(type, "'");
3346
- },
3347
- // "db_name": dbName,
3348
- // "entity": "CodeableConceptMaster",
3349
- // "filter": "CodeableConceptMaster.Type=='ORGTYPE'",
3350
- returnFields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
3351
- },
3352
- codablemasterName: {
3353
- query: function query(name) {
3354
- return "'".concat(name, "' IN Organization.OrgType");
3355
- },
3356
- // "filter": "'Hospital' IN Organization.OrgType",
3357
- returnFields: "{OrgID:Organization.id,name:Organization.name}"
3358
- },
3359
- codablemasterSpeciality: {
3360
- query: function query(id) {
3361
- return JSON.parse("{\"HealthcareService\":\"HealthcareService.OrgID==".concat(id, "\",\n \"CodeableConceptMaster\":\"CodeableConceptMaster.Type=='SPECIALTY' AND HealthcareService.SpecialtyID ANY == CodeableConceptMaster.id\"}"));
3362
- },
3363
- // "filter": {"HealthcareService":"HealthcareService.OrgID==17",
3364
- // "CodeableConceptMaster":"CodeableConceptMaster.Type=='SPECIALTY' AND HealthcareService.SpecialtyID ANY == CodeableConceptMaster.id"},
3365
- returnFields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
3366
- },
3367
- codablemasterPractitioner: {
3368
- query: function query(OrgID) {
3369
- return "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==".concat(OrgID);
3370
- },
3371
- returnFields: "MERGE(Practitioner,{name:TO_ARRAY(DOCUMENT( Practitioner.name)), practitioner_type:(FOR cod IN TO_ARRAY(DOCUMENT(Practitioner.practitioner_type).coding) RETURN MERGE(DOCUMENT(Practitioner.practitioner_type),{coding:DOCUMENT(cod) } ) ) } )"
3372
- },
3373
- codablemasterGetFinancial: {
3374
- query: function query(patientId) {
3375
- return "Account.guarantor[0].patient_id==".concat(patientId);
3376
- },
3377
- // "filter": "Account.patient_id==@patient_id",
3378
- returnFields: "Account"
3379
- },
3380
- codablemasterPractitionerRole: {
3381
- query: function query(OrgID) {
3382
- return "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==".concat(OrgID, " && PractitionerRole.SpecialtyID ANY == CodeableConceptMaster.id");
3383
- },
3384
- // "filter": "Practitioner.PractitionerRoleID==PractitionerRole.id && PractitionerRole.SpecialtyID ANY ==9",
3385
- returnFields: "MERGE(PractitionerRole,{code:(FOR cod IN PractitionerRole.code RETURN DOCUMENT(cod)),Role:(CodeableConceptMaster.text)})"
3386
- },
3387
- codablemasterGetReferral: {
3388
- query: function query(patientid) {
3389
- return "ReferralTrx.patientId==".concat(patientid);
3390
- },
3391
- // "filter": "ReferralTrx.patientId==123",
3392
- returnFields: "MERGE(ReferralTrx,{identifier:(FOR iden IN ReferralTrx.identifier let Type=(FOR typ IN DOCUMENT(iden).Type let cod =(FOR cod IN DOCUMENT(typ).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(typ),{coding:cod})) RETURN MERGE(DOCUMENT(iden),{Type:Type})), serviceRequested:(FOR serreq IN ReferralTrx.serviceRequested let coding =(FOR cod IN DOCUMENT(serreq).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(serreq),{coding:coding})), reasonCode:(FOR rescod IN ReferralTrx.reasonCode let coding =(FOR cod IN DOCUMENT(rescod).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(rescod),{coding:coding})), Type:(FOR typs IN ReferralTrx.Type let coding =(FOR cod IN DOCUMENT(typs).coding RETURN DOCUMENT(cod)) RETURN MERGE(DOCUMENT(typs),{coding:coding})) })"
3393
- },
3394
- codablemasterGetAppointment: {
3395
- query: function query(appointmentId) {
3396
- return "Patient.personID in Appointment.PersonID && Appointment.appno like '%".concat(appointmentId, "%'");
3397
- },
3398
- returnFields: "{AppointmentID:Appointment.id,_id:Appointment._id,status:Appointment.status,avc:Appointment.avc,appnumber:Appointment.appno,end:Appointment.end,start:Appointment.start,createddate:Appointment.createddate,updatedate:Appointment.updatedate,patient:merge(Patient,{identifier:document(Patient.identifier)},{martialStatus:document(Patient.martialStatus)},{name:document(Patient.name)},{telecom:document(Patient.telecom)},{photo:document(Patient.photo)},{personID:(for pid in Person filter pid.Id == Patient.personID return pid)},{address:document(Patient.address)},{activereason:(DOCUMENT(Patient.activereason)),deceasedreason:(DOCUMENT(Patient.deceasedreason))},{isdeceased:(for doc in CodeableConceptMaster filter doc._id==Patient.isdeceased return merge(doc,{coding:(for cod in CodingMaster filter cod._id in doc.coding return cod)}))})}"
3399
- },
3400
- codablemasterGetPatientname: {
3401
- query: function query(patientName) {
3402
- return JSON.parse("\n {\n \"HumanNameMaster\": \"HumanNameMaster.text LIKE '".concat(patientName, "'\",\n \"Person\": \"Person.name[*] ANY == HumanNameMaster._id\",\n \"Patient\": \"Patient.personID == Person.Id\"\n }"));
3403
- },
3404
- returnFields: "{'prefix': HumanNameMaster.prefix, 'name': HumanNameMaster.text, 'personId': Person.Id, 'patientDetails': Patient, 'telecom': Document(Person.telecom)}"
3405
- },
3406
- specialityAgainstPractitioner: {
3407
- query: function query() {
3408
- return JSON.parse("\n {\n \"CodeableConceptMaster\": \"CodeableConceptMaster.Type=='SPECIALTY' AND PractitionerRole.SpecialtyID ANY ==CodeableConceptMaster.id\",\n \"Practitioner\": \"Practitioner.PractitionerRoleID==PractitionerRole.id\"\n }");
3409
- },
3410
- returnFields: "MERGE({_id:Practitioner._id,id:Practitioner.id},{name:(FOR cod IN TO_ARRAY(Practitioner.name) RETURN DOCUMENT(cod))},{SPECIALTY:(FOR spcod IN TO_ARRAY(DOCUMENT(CodeableConceptMaster._id).coding) RETURN MERGE(DOCUMENT(CodeableConceptMaster._id),{coding:DOCUMENT(spcod)})) })" // "MERGE({_id:Practitioner._id,id:Practitioner.id},{name:(FOR cod IN Practitioner.name RETURN DOCUMENT(cod))},{SPECIALTY:DOCUMENT(CodeableConceptMaster._id) })",
3285
+ extraReducers: (_extraReducers = {}, _defineProperty(_extraReducers, REGISTER_USERS.fulfilled, function (state, action) {
3286
+ var _action$payload;
3411
3287
 
3288
+ state.registerUsers = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
3289
+ }), _defineProperty(_extraReducers, REGISTER_USERS.pending, function (state, action) {
3290
+ state.registerUsers.loading = true;
3291
+ }), _defineProperty(_extraReducers, REGISTER_USERS.rejected, function (state, action) {
3292
+ var _action$payload2;
3293
+
3294
+ state.registerUsers = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
3295
+ }), _defineProperty(_extraReducers, DELETE_USER.fulfilled, function (state, action) {
3296
+ var _action$payload3;
3297
+
3298
+ state.deleteUser = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
3299
+ }), _defineProperty(_extraReducers, DELETE_USER.pending, function (state, action) {
3300
+ state.deleteUser.loading = true;
3301
+ }), _defineProperty(_extraReducers, DELETE_USER.rejected, function (state, action) {
3302
+ var _action$payload4;
3303
+
3304
+ state.deleteUser = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
3305
+ }), _defineProperty(_extraReducers, GENERATE_OTP.fulfilled, function (state, action) {
3306
+ var _action$payload5;
3307
+
3308
+ state.generateOTP = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
3309
+ }), _defineProperty(_extraReducers, GENERATE_OTP.pending, function (state, action) {
3310
+ state.generateOTP.loading = true;
3311
+ }), _defineProperty(_extraReducers, GENERATE_OTP.rejected, function (state, action) {
3312
+ var _action$payload6;
3313
+
3314
+ state.generateOTP = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
3315
+ }), _defineProperty(_extraReducers, RESEND_OTP.fulfilled, function (state, action) {
3316
+ var _action$payload7;
3317
+
3318
+ state.resendOTP = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
3319
+ }), _defineProperty(_extraReducers, RESEND_OTP.pending, function (state, action) {
3320
+ state.resendOTP.loading = true;
3321
+ }), _defineProperty(_extraReducers, RESEND_OTP.rejected, function (state, action) {
3322
+ var _action$payload8;
3323
+
3324
+ state.resendOTP = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
3325
+ }), _defineProperty(_extraReducers, SIGN_IN.fulfilled, function (state, action) {
3326
+ var _action$payload9;
3327
+
3328
+ state.signIn = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
3329
+ }), _defineProperty(_extraReducers, SIGN_IN.pending, function (state, action) {
3330
+ state.signIn.loading = true;
3331
+ }), _defineProperty(_extraReducers, SIGN_IN.rejected, function (state, action) {
3332
+ var _action$payload10;
3333
+
3334
+ state.signIn = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
3335
+ }), _defineProperty(_extraReducers, LOG_OUT.fulfilled, function (state, action) {
3336
+ var _action$payload11;
3337
+
3338
+ state.logout = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
3339
+ }), _defineProperty(_extraReducers, LOG_OUT.pending, function (state, action) {
3340
+ state.logout.loading = true;
3341
+ }), _defineProperty(_extraReducers, LOG_OUT.rejected, function (state, action) {
3342
+ var _action$payload12;
3343
+
3344
+ state.logout = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
3345
+ }), _defineProperty(_extraReducers, FORGOT_PASSWORD.fulfilled, function (state, action) {
3346
+ var _action$payload13;
3347
+
3348
+ state.forgotPassword = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
3349
+ }), _defineProperty(_extraReducers, FORGOT_PASSWORD.pending, function (state, action) {
3350
+ state.forgotPassword.loading = true;
3351
+ }), _defineProperty(_extraReducers, FORGOT_PASSWORD.rejected, function (state, action) {
3352
+ var _action$payload14;
3353
+
3354
+ state.forgotPassword = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
3355
+ }), _defineProperty(_extraReducers, GUEST_INFO.fulfilled, function (state, action) {
3356
+ var _action$payload15;
3357
+
3358
+ state.guestInfo = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
3359
+ }), _defineProperty(_extraReducers, GUEST_INFO.pending, function (state, action) {
3360
+ state.guestInfo.loading = true;
3361
+ }), _defineProperty(_extraReducers, GUEST_INFO.rejected, function (state, action) {
3362
+ var _action$payload16;
3363
+
3364
+ state.guestInfo = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
3365
+ }), _defineProperty(_extraReducers, LOGGED_USER_INFO.fulfilled, function (state, action) {
3366
+ var _action$payload17;
3367
+
3368
+ state.loggedUserInfo = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
3369
+ }), _defineProperty(_extraReducers, LOGGED_USER_INFO.pending, function (state, action) {
3370
+ state.loggedUserInfo.loading = true;
3371
+ }), _defineProperty(_extraReducers, LOGGED_USER_INFO.rejected, function (state, action) {
3372
+ var _action$payload18;
3373
+
3374
+ state.loggedUserInfo = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
3375
+ }), _defineProperty(_extraReducers, GET_USER_INFO.fulfilled, function (state, action) {
3376
+ var _action$payload19;
3377
+
3378
+ state.loggedUserInfo = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
3379
+ }), _defineProperty(_extraReducers, GET_USER_INFO.pending, function (state, action) {
3380
+ state.loggedUserInfo.loading = true;
3381
+ }), _defineProperty(_extraReducers, GET_USER_INFO.rejected, function (state, action) {
3382
+ var _action$payload20;
3383
+
3384
+ state.loggedUserInfo = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
3385
+ }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.fulfilled, function (state, action) {
3386
+ var _action$payload21;
3387
+
3388
+ state.loggedUserInfo = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
3389
+ }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.pending, function (state, action) {
3390
+ state.loggedUserInfo.loading = true;
3391
+ }), _defineProperty(_extraReducers, GET_ORG_USER_INFO.rejected, function (state, action) {
3392
+ var _action$payload22;
3393
+
3394
+ state.loggedUserInfo = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
3395
+ }), _extraReducers)
3396
+ });
3397
+ var authActions = {
3398
+ REGISTER_USERS: REGISTER_USERS,
3399
+ GENERATE_OTP: GENERATE_OTP,
3400
+ RESEND_OTP: RESEND_OTP,
3401
+ SIGN_IN: SIGN_IN,
3402
+ LOG_OUT: LOG_OUT,
3403
+ GUEST_INFO: GUEST_INFO,
3404
+ LOGGED_USER_INFO: LOGGED_USER_INFO,
3405
+ FORGOT_PASSWORD: FORGOT_PASSWORD,
3406
+ GET_USER_INFO: GET_USER_INFO,
3407
+ GET_ORG_USER_INFO: GET_ORG_USER_INFO,
3408
+ DELETE_USER: DELETE_USER
3409
+ };
3410
+ var authSlice$1 = authSlice.reducer;
3411
+
3412
+ var _extraReducers$1;
3413
+ var __options$1 = {
3414
+ method: "POST",
3415
+ headers: {
3416
+ "Content-Type": "text/plain"
3412
3417
  },
3413
- practitionerAgainstOrganization: {
3414
- query: function query(practitionerId) {
3415
- return JSON.parse("\n {\n \"Practitioner\": \"Practitioner.id==".concat(practitionerId, "\",\n \"PractitionerRole\": \"Practitioner.PractitionerRoleID==PractitionerRole.id\",\n \"Organization\": \"PractitionerRole.OrgID ANY == Organization.id\"\n }"));
3416
- },
3417
- returnFields: "DISTINCT {Organization:Organization.name, OrgID:Organization.id}"
3418
- },
3419
- getCodableConceptMaster: function getCodableConceptMaster(_ref) {
3420
- var _ref$type = _ref.type,
3421
- type = _ref$type === void 0 ? "" : _ref$type;
3422
- return {
3423
- db_name: dbName,
3424
- entity: "CodeableConceptMaster",
3425
- filter: "CodeableConceptMaster.Type=='".concat(type, "'"),
3426
- return_fields: "MERGE(CodeableConceptMaster,{coding:(FOR cod IN CodeableConceptMaster.coding RETURN DOCUMENT(cod))})"
3427
- };
3428
- },
3429
- deleteCAOrderline: function deleteCAOrderline() {
3430
- var payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3431
- var id = payload.id;
3432
- return {
3433
- db_name: dbName,
3434
- entity: "CA_OrderLine",
3435
- filter: "CA_OrderLine._id==".concat(id)
3436
- };
3437
- },
3438
- getReasonMaster: function getReasonMaster() {
3439
- return {
3440
- db_name: dbName,
3441
- entity: "ReasonMaster",
3442
- return_fields: "ReasonMaster"
3443
- };
3444
- },
3445
- getLocationMaster: function getLocationMaster() {
3446
- return {
3447
- db_name: dbName,
3448
- entity: "LocationMaster",
3449
- return_fields: "LocationMaster"
3450
- };
3451
- },
3452
- getOrderCatalog: function getOrderCatalog() {
3453
- return {
3454
- db_name: dbName,
3455
- entity: "OrderCatalog",
3456
- filter: "OrderCatalog.ordercategory=='RAD'",
3457
- return_fields: "{_id:OrderCatalog._id,id:OrderCatalog.id,ordercategory:OrderCatalog.ordercategory,ordercatalog:OrderCatalog.ordercatalog,shortdesc:OrderCatalog.shortdesc,longdesc:OrderCatalog.longdesc}",
3458
- sort: "OrderCatalog.shortdesc asc"
3459
- };
3460
- },
3461
- getOrderType: function getOrderType() {
3462
- return {
3463
- db_name: dbName,
3464
- entity: "OrderType",
3465
- filter: "OrderType.Ordcatgory=='RAD'",
3466
- return_fields: "{_id:OrderType._id,id:OrderType.id,OrdType:OrderType.OrdType,shortdesc:OrderType.shortdesc,longdesc:OrderType.longdesc,Ordcatgory:OrderType.Ordcatgory}",
3467
- sort: "OrderType.shortdesc asc"
3468
- };
3469
- },
3470
- getCaOrderLine: function getCaOrderLine(_ref2) {
3471
- var _ref2$id = _ref2.id,
3472
- id = _ref2$id === void 0 ? 0 : _ref2$id;
3473
- return {
3474
- db_name: dbName,
3475
- entity: "CA_OrderLine",
3476
- filter: "CA_OrderLine.encounter_Id==".concat(id),
3477
- return_fields: "CA_OrderLine"
3478
- };
3479
- },
3480
- getOrganization: function getOrganization(_ref3) {
3481
- var _ref3$id = _ref3.id,
3482
- id = _ref3$id === void 0 ? 0 : _ref3$id;
3483
- return {
3484
- db_name: dbName,
3485
- entity: "Organization",
3486
- filter: "Organization.id==".concat(id),
3487
- return_fields: "{_id:Organization._id,OrgID:Organization.id,name:Organization.name}"
3488
- };
3489
- },
3490
- getPractionerRole: function getPractionerRole(_ref4) {
3491
- var _ref4$id = _ref4.id,
3492
- id = _ref4$id === void 0 ? 0 : _ref4$id;
3493
- return {
3494
- db_name: dbName,
3495
- entity: "PractitionerRole,Organization,Practitioner",
3496
- filter: {
3497
- PractitionerRole: "PractitionerRole.OrgID ANY == ".concat(id),
3498
- Practitioner: "PractitionerRole.id==Practitioner.PractitionerRoleID"
3499
- },
3500
- return_fields: "DISTINCT MERGE({PractitionerRole:DOCUMENT(PractitionerRole.code)})"
3501
- };
3502
- },
3503
- getPractionerName: function getPractionerName(_ref5) {
3504
- var _ref5$id = _ref5.id,
3505
- id = _ref5$id === void 0 ? 0 : _ref5$id;
3506
- return {
3507
- db_name: dbName,
3508
- entity: "PractitionerRole,Organization,Practitioner",
3509
- filter: {
3510
- PractitionerRole: "PractitionerRole.OrgID ANY == ".concat(id),
3511
- Practitioner: "PractitionerRole.id==Practitioner.PractitionerRoleID"
3512
- },
3513
- return_fields: "DISTINCT MERGE({PractitionerName:DOCUMENT(Practitioner.name)})"
3514
- };
3515
- },
3516
- getCaDiagnosis: function getCaDiagnosis(_ref6) {
3517
- var _ref6$id = _ref6.id,
3518
- id = _ref6$id === void 0 ? 0 : _ref6$id;
3519
- return {
3520
- db_name: dbName,
3521
- entity: "CA_Diagnosis",
3522
- filter: "CA_Diagnosis.encounter_id == ".concat(id),
3523
- return_fields: "DOCUMENT(CA_Diagnosis.diagcode)"
3524
- };
3525
- },
3526
- upsertCaOrderline: function upsertCaOrderline(_ref7) {
3527
- var _ref7$doc = _ref7.doc,
3528
- doc = _ref7$doc === void 0 ? {} : _ref7$doc;
3529
- return [{
3530
- db_name: dbName,
3531
- entity: "CA_OrderLine",
3532
- is_metadata: true,
3533
- metadataId: "04ecb73d-f048-44ce-8563-c9be015812dd",
3534
- doc: _objectSpread2({}, doc)
3535
- }];
3536
- },
3537
- upsertCaOrderApprovalWorkqueue: function upsertCaOrderApprovalWorkqueue(_ref8) {
3538
- var _ref8$doc = _ref8.doc,
3539
- doc = _ref8$doc === void 0 ? {} : _ref8$doc;
3540
- return [{
3541
- db_name: dbName,
3542
- entity: "CA_OrderApprovalWorkqueue",
3543
- is_metadata: true,
3544
- metadataId: query_ids["personApiSlice/upsertPerson"],
3545
- doc: _objectSpread2({}, doc)
3546
- }];
3418
+ body: {}
3419
+ }; // FUZZY_SEARCH
3420
+
3421
+ var FUZZY_SEARCH = createAsyncThunk("fuzzySearchReducer/fuzzySearch", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
3422
+ var payload,
3423
+ _ref2,
3424
+ rejectWithValue,
3425
+ _payload$db_name,
3426
+ db_name,
3427
+ _payload$entity,
3428
+ entity,
3429
+ _payload$filter,
3430
+ filter,
3431
+ _payload$value,
3432
+ value,
3433
+ _,
3434
+ _args = arguments;
3435
+
3436
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3437
+ while (1) {
3438
+ switch (_context.prev = _context.next) {
3439
+ case 0:
3440
+ payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
3441
+ _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
3442
+ _context.prev = 2;
3443
+ _payload$db_name = payload.db_name, db_name = _payload$db_name === void 0 ? "primarycare" : _payload$db_name, _payload$entity = payload.entity, entity = _payload$entity === void 0 ? "Person" : _payload$entity, _payload$filter = payload.filter, filter = _payload$filter === void 0 ? "" : _payload$filter, _payload$value = payload.value, value = _payload$value === void 0 ? "" : _payload$value;
3444
+ _context.next = 6;
3445
+ return fetch(urls.fuzzy_search, _objectSpread2(_objectSpread2({}, __options$1), {}, {
3446
+ body: btoa(JSON.stringify({
3447
+ "db_name": db_name,
3448
+ "entity": entity,
3449
+ "filter": filter,
3450
+ "value": value
3451
+ }))
3452
+ }));
3453
+
3454
+ case 6:
3455
+ _ = _context.sent;
3456
+ _context.next = 9;
3457
+ return _.json();
3458
+
3459
+ case 9:
3460
+ _ = _context.sent;
3461
+ return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
3462
+ data: _
3463
+ }));
3464
+
3465
+ case 13:
3466
+ _context.prev = 13;
3467
+ _context.t0 = _context["catch"](2);
3468
+ return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
3469
+ message: _context.t0.message
3470
+ })));
3471
+
3472
+ case 16:
3473
+ case "end":
3474
+ return _context.stop();
3475
+ }
3476
+ }
3477
+ }, _callee, null, [[2, 13]]);
3478
+ }))); // end
3479
+ // FUZZY SEARCH CREATE INITIALSTATE
3480
+
3481
+ var fuzzySearchReducer = createSlice({
3482
+ name: "fuzzySearchReducer",
3483
+ initialState: {
3484
+ fuzzySearch: _objectSpread2({}, defaultState.Info)
3547
3485
  },
3548
- commonUpsertQuery: function commonUpsertQuery(_ref9) {
3549
- var _ref9$doc = _ref9.doc,
3550
- doc = _ref9$doc === void 0 ? {} : _ref9$doc,
3551
- _ref9$entity = _ref9.entity,
3552
- entity = _ref9$entity === void 0 ? "" : _ref9$entity;
3553
- return [{
3554
- db_name: dbName,
3555
- entity: entity,
3556
- is_metadata: true,
3557
- metadataId: query_ids["personApiSlice/upsertPerson"],
3558
- doc: _objectSpread2({}, doc)
3559
- }];
3560
- }
3486
+ extraReducers: (_extraReducers$1 = {}, _defineProperty(_extraReducers$1, FUZZY_SEARCH.fulfilled, function (state, action) {
3487
+ var _action$payload;
3488
+
3489
+ state.fuzzySearch = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
3490
+ }), _defineProperty(_extraReducers$1, FUZZY_SEARCH.pending, function (state, action) {
3491
+ state.fuzzySearch.loading = true;
3492
+ }), _defineProperty(_extraReducers$1, FUZZY_SEARCH.rejected, function (state, action) {
3493
+ var _action$payload2;
3494
+
3495
+ state.fuzzySearch = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
3496
+ }), _extraReducers$1)
3497
+ }); // end
3498
+ // FUZZY SEARCH CREATE ACTION LISTS
3499
+
3500
+ var fuzzySearchActions = {
3501
+ FUZZY_SEARCH: FUZZY_SEARCH
3502
+ }; // end
3503
+ var fuzzySearchReducer$1 = fuzzySearchReducer.reducer;
3504
+
3505
+ var makeName = function makeName() {
3506
+ var nameObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3507
+ var _nameObj$prefix = nameObj.prefix,
3508
+ prefix = _nameObj$prefix === void 0 ? "" : _nameObj$prefix,
3509
+ _nameObj$given = nameObj.given,
3510
+ given = _nameObj$given === void 0 ? "" : _nameObj$given,
3511
+ _nameObj$family = nameObj.family,
3512
+ family = _nameObj$family === void 0 ? "" : _nameObj$family,
3513
+ _nameObj$suffix = nameObj.suffix,
3514
+ suffix = _nameObj$suffix === void 0 ? "" : _nameObj$suffix;
3515
+ return "".concat(prefix && prefix + ".").concat(given && given + " ").concat(family).concat(suffix && " " + suffix);
3516
+ };
3517
+
3518
+ var fetchData$1 = /*#__PURE__*/function () {
3519
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(input) {
3520
+ var url,
3521
+ __options,
3522
+ res,
3523
+ data,
3524
+ _args = arguments;
3525
+
3526
+ return regeneratorRuntime.wrap(function _callee$(_context) {
3527
+ while (1) {
3528
+ switch (_context.prev = _context.next) {
3529
+ case 0:
3530
+ url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
3531
+ __options = {
3532
+ method: "POST",
3533
+ headers: {
3534
+ "Content-Type": "application/json"
3535
+ },
3536
+ body: {}
3537
+ };
3538
+ _context.next = 4;
3539
+ return fetch(url, _objectSpread2(_objectSpread2({}, __options), input));
3540
+
3541
+ case 4:
3542
+ res = _context.sent;
3543
+ _context.next = 7;
3544
+ return res.json();
3545
+
3546
+ case 7:
3547
+ data = _context.sent;
3548
+ return _context.abrupt("return", data);
3549
+
3550
+ case 9:
3551
+ case "end":
3552
+ return _context.stop();
3553
+ }
3554
+ }
3555
+ }, _callee);
3556
+ }));
3557
+
3558
+ return function fetchData(_x) {
3559
+ return _ref3.apply(this, arguments);
3560
+ };
3561
+ }();
3562
+
3563
+ var getImgUrl = function getImgUrl(fileId) {
3564
+ return fileId ? "".concat(__imgdownloadBaseUrl__).concat(fileId) : "";
3561
3565
  };
3562
3566
 
3563
3567
  var moment = createCommonjsModule(function (module, exports) {
@@ -10382,25 +10386,27 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
10382
10386
  _practData$0$4$Organi4,
10383
10387
  _practData$0$5,
10384
10388
  _practData$0$6,
10385
- _practData$0$6$hospit,
10386
10389
  _practData$0$7,
10387
- _practData$0$7$commun,
10388
10390
  _practData$0$8,
10391
+ _practData$0$8$hospit,
10389
10392
  _practData$0$9,
10393
+ _practData$0$9$commun,
10390
10394
  _practData$0$10,
10391
- _practData$0$10$posit,
10392
10395
  _practData$0$11,
10393
- _practData$0$11$degre,
10394
10396
  _practData$0$12,
10395
- _practData$0$12$hospi,
10397
+ _practData$0$12$posit,
10396
10398
  _practData$0$13,
10397
- _practData$0$13$addre,
10398
- _practData$0$13$addre2,
10399
+ _practData$0$13$degre,
10399
10400
  _practData$0$14,
10400
- _practData$0$14$name,
10401
+ _practData$0$14$hospi,
10401
10402
  _practData$0$15,
10402
10403
  _practData$0$15$addre,
10403
10404
  _practData$0$15$addre2,
10405
+ _practData$0$16,
10406
+ _practData$0$16$name,
10407
+ _practData$0$17,
10408
+ _practData$0$17$addre,
10409
+ _practData$0$17$addre2,
10404
10410
  languages,
10405
10411
  gender,
10406
10412
  designation,
@@ -10473,7 +10479,7 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
10473
10479
  isDoctor: !isClinic,
10474
10480
  language: "",
10475
10481
  isClinic: isClinic,
10476
- memberIncludes: "1",
10482
+ memberIncludes: "0",
10477
10483
  hospitalName: "",
10478
10484
  hospitalLocation: "",
10479
10485
  kms: "0 Kms",
@@ -10500,10 +10506,12 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
10500
10506
  info["title"] = ((_practData$0$4 = practData[0][0]) === null || _practData$0$4 === void 0 ? void 0 : (_practData$0$4$Organi = _practData$0$4.Organization) === null || _practData$0$4$Organi === void 0 ? void 0 : (_practData$0$4$Organi2 = _practData$0$4$Organi[0]) === null || _practData$0$4$Organi2 === void 0 ? void 0 : (_practData$0$4$Organi3 = _practData$0$4$Organi2.address) === null || _practData$0$4$Organi3 === void 0 ? void 0 : (_practData$0$4$Organi4 = _practData$0$4$Organi3[0]) === null || _practData$0$4$Organi4 === void 0 ? void 0 : _practData$0$4$Organi4.line) || "";
10501
10507
  info["kms"] = "10";
10502
10508
  info["orgId"] = (_practData$0$5 = practData[0][0]) === null || _practData$0$5 === void 0 ? void 0 : _practData$0$5.OrgID;
10509
+ info["clinicId"] = (_practData$0$6 = practData[0][0]) === null || _practData$0$6 === void 0 ? void 0 : _practData$0$6.id;
10510
+ info["id"] = (_practData$0$7 = practData[0][0]) === null || _practData$0$7 === void 0 ? void 0 : _practData$0$7.id;
10503
10511
  } else {
10504
- info["orgId"] = (_practData$0$6 = practData[0][0]) === null || _practData$0$6 === void 0 ? void 0 : (_practData$0$6$hospit = _practData$0$6.hospital) === null || _practData$0$6$hospit === void 0 ? void 0 : _practData$0$6$hospit.id;
10512
+ info["orgId"] = (_practData$0$8 = practData[0][0]) === null || _practData$0$8 === void 0 ? void 0 : (_practData$0$8$hospit = _practData$0$8.hospital) === null || _practData$0$8$hospit === void 0 ? void 0 : _practData$0$8$hospit.id;
10505
10513
  languages = new Set();
10506
- (_practData$0$7 = practData[0][0]) === null || _practData$0$7 === void 0 ? void 0 : (_practData$0$7$commun = _practData$0$7.communication) === null || _practData$0$7$commun === void 0 ? void 0 : _practData$0$7$commun.forEach(function (c) {
10514
+ (_practData$0$9 = practData[0][0]) === null || _practData$0$9 === void 0 ? void 0 : (_practData$0$9$commun = _practData$0$9.communication) === null || _practData$0$9$commun === void 0 ? void 0 : _practData$0$9$commun.forEach(function (c) {
10507
10515
  var _c$Type;
10508
10516
 
10509
10517
  if ((c === null || c === void 0 ? void 0 : (_c$Type = c.Type) === null || _c$Type === void 0 ? void 0 : _c$Type.toLowerCase()) === "language") {
@@ -10516,10 +10524,10 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
10516
10524
  }
10517
10525
  }
10518
10526
  });
10519
- info["id"] = (_practData$0$8 = practData[0][0]) === null || _practData$0$8 === void 0 ? void 0 : _practData$0$8["id"];
10520
- gender = ((_practData$0$9 = practData[0][0]) === null || _practData$0$9 === void 0 ? void 0 : _practData$0$9.gender) || "";
10527
+ info["id"] = (_practData$0$10 = practData[0][0]) === null || _practData$0$10 === void 0 ? void 0 : _practData$0$10["id"];
10528
+ gender = ((_practData$0$11 = practData[0][0]) === null || _practData$0$11 === void 0 ? void 0 : _practData$0$11.gender) || "";
10521
10529
  designation = "";
10522
- (_practData$0$10 = practData[0][0]) === null || _practData$0$10 === void 0 ? void 0 : (_practData$0$10$posit = _practData$0$10.position) === null || _practData$0$10$posit === void 0 ? void 0 : _practData$0$10$posit.forEach(function (s) {
10530
+ (_practData$0$12 = practData[0][0]) === null || _practData$0$12 === void 0 ? void 0 : (_practData$0$12$posit = _practData$0$12.position) === null || _practData$0$12$posit === void 0 ? void 0 : _practData$0$12$posit.forEach(function (s) {
10523
10531
  var val = s === null || s === void 0 ? void 0 : s.coding;
10524
10532
 
10525
10533
  if (val === null || val === void 0 ? void 0 : val.display) {
@@ -10535,13 +10543,13 @@ var APPOINTMENT_UPDATE_READ = createAsyncThunk("appointmentReducer/upsertReadApp
10535
10543
  }
10536
10544
  });
10537
10545
  info["title"] = "".concat(gender).concat(gender && " | ").concat(designation);
10538
- info["subtext"] = ((_practData$0$11 = practData[0][0]) === null || _practData$0$11 === void 0 ? void 0 : (_practData$0$11$degre = _practData$0$11.degree) === null || _practData$0$11$degre === void 0 ? void 0 : _practData$0$11$degre.join(", ")) || "MBBS";
10546
+ info["subtext"] = ((_practData$0$13 = practData[0][0]) === null || _practData$0$13 === void 0 ? void 0 : (_practData$0$13$degre = _practData$0$13.degree) === null || _practData$0$13$degre === void 0 ? void 0 : _practData$0$13$degre.join(", ")) || "MBBS";
10539
10547
  info["language"] = languages.size > 0 ? _toConsumableArray(languages) : ["English"];
10540
- info["hospitalName"] = ((_practData$0$12 = practData[0][0]) === null || _practData$0$12 === void 0 ? void 0 : (_practData$0$12$hospi = _practData$0$12.hospital) === null || _practData$0$12$hospi === void 0 ? void 0 : _practData$0$12$hospi.alias) || "";
10541
- info["hospitalLocation"] = ((_practData$0$13 = practData[0][0]) === null || _practData$0$13 === void 0 ? void 0 : (_practData$0$13$addre = _practData$0$13.address) === null || _practData$0$13$addre === void 0 ? void 0 : (_practData$0$13$addre2 = _practData$0$13$addre[0]) === null || _practData$0$13$addre2 === void 0 ? void 0 : _practData$0$13$addre2.line) || "";
10542
- nameObj = ((_practData$0$14 = practData[0][0]) === null || _practData$0$14 === void 0 ? void 0 : (_practData$0$14$name = _practData$0$14.name) === null || _practData$0$14$name === void 0 ? void 0 : _practData$0$14$name[0]) || {};
10548
+ info["hospitalName"] = ((_practData$0$14 = practData[0][0]) === null || _practData$0$14 === void 0 ? void 0 : (_practData$0$14$hospi = _practData$0$14.hospital) === null || _practData$0$14$hospi === void 0 ? void 0 : _practData$0$14$hospi.alias) || "";
10549
+ info["hospitalLocation"] = ((_practData$0$15 = practData[0][0]) === null || _practData$0$15 === void 0 ? void 0 : (_practData$0$15$addre = _practData$0$15.address) === null || _practData$0$15$addre === void 0 ? void 0 : (_practData$0$15$addre2 = _practData$0$15$addre[0]) === null || _practData$0$15$addre2 === void 0 ? void 0 : _practData$0$15$addre2.line) || "";
10550
+ nameObj = ((_practData$0$16 = practData[0][0]) === null || _practData$0$16 === void 0 ? void 0 : (_practData$0$16$name = _practData$0$16.name) === null || _practData$0$16$name === void 0 ? void 0 : _practData$0$16$name[0]) || {};
10543
10551
  info["name"] = makeName(nameObj);
10544
- info["kms"] = ((_practData$0$15 = practData[0][0]) === null || _practData$0$15 === void 0 ? void 0 : (_practData$0$15$addre = _practData$0$15.address) === null || _practData$0$15$addre === void 0 ? void 0 : (_practData$0$15$addre2 = _practData$0$15$addre[0]) === null || _practData$0$15$addre2 === void 0 ? void 0 : _practData$0$15$addre2.distance) ? "".concat(practData[0][0].address[0].distance) : "";
10552
+ info["kms"] = ((_practData$0$17 = practData[0][0]) === null || _practData$0$17 === void 0 ? void 0 : (_practData$0$17$addre = _practData$0$17.address) === null || _practData$0$17$addre === void 0 ? void 0 : (_practData$0$17$addre2 = _practData$0$17$addre[0]) === null || _practData$0$17$addre2 === void 0 ? void 0 : _practData$0$17$addre2.distance) ? "".concat(practData[0][0].address[0].distance) : "";
10545
10553
  }
10546
10554
  }
10547
10555
 
@@ -13014,8 +13022,11 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13014
13022
  id = record.id,
13015
13023
  restData = _objectWithoutProperties(record, ["OrgType", "id"]);
13016
13024
 
13025
+ var facilityCoding = "facility";
13017
13026
  var isClinic = (_OrgType$some = OrgType === null || OrgType === void 0 ? void 0 : OrgType.some(function (type) {
13018
- return type.toLowerCase() === 'clinic';
13027
+ var _type$display;
13028
+
13029
+ return (type === null || type === void 0 ? void 0 : (_type$display = type.display) === null || _type$display === void 0 ? void 0 : _type$display.toLowerCase()) === facilityCoding;
13019
13030
  })) !== null && _OrgType$some !== void 0 ? _OrgType$some : false;
13020
13031
  var healthCareId = [0];
13021
13032
  var slots = [];
@@ -13063,7 +13074,9 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13063
13074
  weekCalendar: payload.date && payload.date * 1000 || Date.now(),
13064
13075
  isAllSession: isClinic,
13065
13076
  allSession: allSession,
13077
+ memberIncludesImg: [],
13066
13078
  morning: morning,
13079
+ img: "",
13067
13080
  afternoone: afternoone,
13068
13081
  evening: evening,
13069
13082
  night: night,
@@ -13075,7 +13088,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13075
13088
  };
13076
13089
 
13077
13090
  if (isClinic) {
13078
- var _restData$clinics5, _restData$clinics5$, _restData$clinics5$$S, _restData$clinics6, _restData$clinics6$, _restData$address, _restData$address$, _restData$address2, _restData$address2$, _restData$address3, _restData$address3$;
13091
+ var _restData$clinics5, _restData$clinics5$, _restData$clinics5$$S, _restData$clinics6, _restData$clinics6$, _restData$address, _restData$address$, _restData$address2, _restData$address2$, _restData$clinics7, _restData$clinics7$, _restData$clinics7$$p, _restData$clinics7$$p2, _restData$clinics8, _restData$clinics8$, _restData$clinics8$$p, _restData$clinics8$$p2, _restData$clinics8$$p3, _restData$address3, _restData$address3$;
13079
13092
 
13080
13093
  restData === null || restData === void 0 ? void 0 : (_restData$clinics5 = restData.clinics) === null || _restData$clinics5 === void 0 ? void 0 : (_restData$clinics5$ = _restData$clinics5[0]) === null || _restData$clinics5$ === void 0 ? void 0 : (_restData$clinics5$$S = _restData$clinics5$.Specialties) === null || _restData$clinics5$$S === void 0 ? void 0 : _restData$clinics5$$S.forEach(function (s) {
13081
13094
  var _s$Type;
@@ -13100,9 +13113,19 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13100
13113
  info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address = restData.address) === null || _restData$address === void 0 ? void 0 : (_restData$address$ = _restData$address[0]) === null || _restData$address$ === void 0 ? void 0 : _restData$address$.line) || "";
13101
13114
  info["title"] = (restData === null || restData === void 0 ? void 0 : (_restData$address2 = restData.address) === null || _restData$address2 === void 0 ? void 0 : (_restData$address2$ = _restData$address2[0]) === null || _restData$address2$ === void 0 ? void 0 : _restData$address2$.line) || "";
13102
13115
  info["gender"] = null;
13116
+ info["memberIncludes"] = restData === null || restData === void 0 ? void 0 : (_restData$clinics7 = restData.clinics) === null || _restData$clinics7 === void 0 ? void 0 : (_restData$clinics7$ = _restData$clinics7[0]) === null || _restData$clinics7$ === void 0 ? void 0 : (_restData$clinics7$$p = _restData$clinics7$.practioner_roles) === null || _restData$clinics7$$p === void 0 ? void 0 : (_restData$clinics7$$p2 = _restData$clinics7$$p[0]) === null || _restData$clinics7$$p2 === void 0 ? void 0 : _restData$clinics7$$p2.member_count;
13117
+ info["memberIncludesImg"] = restData === null || restData === void 0 ? void 0 : (_restData$clinics8 = restData.clinics) === null || _restData$clinics8 === void 0 ? void 0 : (_restData$clinics8$ = _restData$clinics8[0]) === null || _restData$clinics8$ === void 0 ? void 0 : (_restData$clinics8$$p = _restData$clinics8$.practioner_roles) === null || _restData$clinics8$$p === void 0 ? void 0 : (_restData$clinics8$$p2 = _restData$clinics8$$p[0]) === null || _restData$clinics8$$p2 === void 0 ? void 0 : (_restData$clinics8$$p3 = _restData$clinics8$$p2.practitioner) === null || _restData$clinics8$$p3 === void 0 ? void 0 : _restData$clinics8$$p3.map(function (p) {
13118
+ if (p) {
13119
+ var _p$photo, _p$photo$;
13120
+
13121
+ return getImgUrl(p === null || p === void 0 ? void 0 : (_p$photo = p.photo) === null || _p$photo === void 0 ? void 0 : (_p$photo$ = _p$photo[0]) === null || _p$photo$ === void 0 ? void 0 : _p$photo$.fileid);
13122
+ }
13123
+
13124
+ return "";
13125
+ });
13103
13126
  info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address3 = restData.address) === null || _restData$address3 === void 0 ? void 0 : (_restData$address3$ = _restData$address3[0]) === null || _restData$address3$ === void 0 ? void 0 : _restData$address3$.distance) ? "".concat(restData.address[0].distance) : "0";
13104
13127
  } else {
13105
- var _restData$Specialties, _restData$communicati, _restData$hospital2, _restData$degree, _restData$hospital3, _restData$address4, _restData$address4$, _restData$name, _restData$address5, _restData$address5$;
13128
+ var _restData$Specialties, _restData$communicati, _restData$hospital2, _restData$degree, _restData$hospital3, _restData$address4, _restData$address4$, _restData$name, _restData$photo, _restData$photo$, _restData$address5, _restData$address5$;
13106
13129
 
13107
13130
  var gender = (restData === null || restData === void 0 ? void 0 : restData.gender) || "";
13108
13131
  var designation = "";
@@ -13149,6 +13172,7 @@ var DOCTER_LISTING = createAsyncThunk("docterListingReducer/docterListing", /*#_
13149
13172
  info["hospitalLocation"] = (restData === null || restData === void 0 ? void 0 : (_restData$address4 = restData.address) === null || _restData$address4 === void 0 ? void 0 : (_restData$address4$ = _restData$address4[0]) === null || _restData$address4$ === void 0 ? void 0 : _restData$address4$.line) || "";
13150
13173
  var nameObj = (restData === null || restData === void 0 ? void 0 : (_restData$name = restData.name) === null || _restData$name === void 0 ? void 0 : _restData$name[0]) || {};
13151
13174
  info["name"] = makeName(nameObj);
13175
+ info["img"] = getImgUrl(restData === null || restData === void 0 ? void 0 : (_restData$photo = restData.photo) === null || _restData$photo === void 0 ? void 0 : (_restData$photo$ = _restData$photo[0]) === null || _restData$photo$ === void 0 ? void 0 : _restData$photo$.fileid);
13152
13176
  info["kms"] = (restData === null || restData === void 0 ? void 0 : (_restData$address5 = restData.address) === null || _restData$address5 === void 0 ? void 0 : (_restData$address5$ = _restData$address5[0]) === null || _restData$address5$ === void 0 ? void 0 : _restData$address5$.distance) ? "".concat(restData.address[0].distance) : "0";
13153
13177
  }
13154
13178
 
@@ -13492,12 +13516,12 @@ var GET_HOSPITALS_LOCALITY = createAsyncThunk("searhcApiSlice/getHospitals", /*#
13492
13516
 
13493
13517
  if (Array.isArray(data)) {
13494
13518
  data.forEach(function (hospInfo) {
13495
- if (hospInfo.id && hospInfo.alias) {
13519
+ if (hospInfo.id && hospInfo.name) {
13496
13520
  var _hospInfo$address, _hospInfo$address2;
13497
13521
 
13498
13522
  returnData.push({
13499
13523
  value: hospInfo.id,
13500
- label: hospInfo.alias,
13524
+ label: hospInfo.name,
13501
13525
  lat: hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address = hospInfo.address) === null || _hospInfo$address === void 0 ? void 0 : _hospInfo$address.latitude,
13502
13526
  "long": hospInfo === null || hospInfo === void 0 ? void 0 : (_hospInfo$address2 = hospInfo.address) === null || _hospInfo$address2 === void 0 ? void 0 : _hospInfo$address2.longitude
13503
13527
  });
@@ -15236,8 +15260,9 @@ var ADD_RELATED_PERSON = createAsyncThunk("personApiSlice/addRelatedPerson", /*#
15236
15260
  // ??
15237
15261
  "id": 0,
15238
15262
  // ??
15239
- "Type": "string" // ??
15240
-
15263
+ "Type": "string",
15264
+ // ??
15265
+ "status": true
15241
15266
  }],
15242
15267
  "name": [{
15243
15268
  "use": "string",
@@ -17170,6 +17195,67 @@ var dashboardQuery = {
17170
17195
  }
17171
17196
  };
17172
17197
  },
17198
+ patientStatusPendingAssessment: function patientStatusPendingAssessment(orgID, startDate, endDate, loginId) {
17199
+ return {
17200
+ // Doctor: {},
17201
+ nurse: {
17202
+ db_name: dbName,
17203
+ entity: "Practitioner,Encounter",
17204
+ filter: {
17205
+ Practitioner: "Practitioner.practitioner_type=='CodingMaster/10628' and Practitioner.id==".concat(loginId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(orgID),
17206
+ Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='CodingMaster/12164' collect with count into length")
17207
+ },
17208
+ return_fields: "{CheckedIn:length}"
17209
+ } // Frontdesk: {},
17210
+
17211
+ };
17212
+ },
17213
+ patientStatusCompletedAssessment: function patientStatusCompletedAssessment(orgID, startDate, endDate, loginId) {
17214
+ debugger;
17215
+ return {
17216
+ // Doctor: {},
17217
+ nurse: {
17218
+ db_name: dbName,
17219
+ entity: "Practitioner,Encounter",
17220
+ filter: {
17221
+ Practitioner: "Practitioner.practitioner_type=='CodingMaster/10628' and Practitioner.id==".concat(loginId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(orgID),
17222
+ Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='CodingMaster/11595'collect with count into length")
17223
+ },
17224
+ return_fields: "{Triage:length}"
17225
+ } // Frontdesk: {},
17226
+
17227
+ };
17228
+ },
17229
+ consultationInProgress: function consultationInProgress(orgID, startDate, endDate, loginId) {
17230
+ return {
17231
+ // Doctor: {},
17232
+ nurse: {
17233
+ db_name: dbName,
17234
+ entity: "Practitioner,Encounter",
17235
+ filter: {
17236
+ Practitioner: "Practitioner.practitioner_type=='CodingMaster/10628' and Practitioner.id==".concat(loginId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(orgID),
17237
+ Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='CodingMaster/11596' collect with count into length")
17238
+ },
17239
+ return_fields: "{InProgress:length}"
17240
+ } // Frontdesk: {},
17241
+
17242
+ };
17243
+ },
17244
+ consultationCompleted: function consultationCompleted(orgID, startDate, endDate, loginId) {
17245
+ return {
17246
+ // Doctor: {},
17247
+ nurse: {
17248
+ db_name: dbName,
17249
+ entity: "Practitioner,Encounter",
17250
+ filter: {
17251
+ Practitioner: "Practitioner.practitioner_type=='CodingMaster/10628' and Practitioner.id==".concat(loginId, " AND DOCUMENT(Practitioner.practitioner_role[*])[*].OrgID ANY ==").concat(orgID),
17252
+ Encounter: "DOCUMENT(Practitioner.practitioner_role[*])[*].SpecialtyID ANY IN Encounter.practitioner_details[*].speciality AND Encounter.encounterdate>=".concat(startDate, " && Encounter.encounterdate<=").concat(endDate, " && Encounter.status=='CodingMaster/11598' collect with count into length")
17253
+ },
17254
+ return_fields: "{Finished:length}"
17255
+ } // Frontdesk: {},
17256
+
17257
+ };
17258
+ },
17173
17259
  checkingAppointment: function checkingAppointment(orgID, startDate, endDate, loginId) {
17174
17260
  return {
17175
17261
  Doctor: {
@@ -17447,96 +17533,298 @@ var APPOINTMENTS = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_
17447
17533
  payload = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
17448
17534
  _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
17449
17535
  _context.prev = 2;
17450
- orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
17536
+ orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId; // debugger;
17537
+
17451
17538
  _context.next = 6;
17452
17539
  return fetchData$1({
17453
17540
  body: JSON.stringify(dashboardQuery.totalAppointment(orgId, startDate, endDate, loginId)[roleId])
17454
17541
  }, __readDocumentUrl__);
17455
17542
 
17456
- case 6:
17457
- data = _context.sent;
17458
- _context.next = 9;
17543
+ case 6:
17544
+ data = _context.sent;
17545
+ _context.next = 9;
17546
+ return fetchData$1({
17547
+ body: JSON.stringify(dashboardQuery.checkingAppointment(orgId, startDate, endDate, loginId)[roleId])
17548
+ }, __readDocumentUrl__);
17549
+
17550
+ case 9:
17551
+ data1 = _context.sent;
17552
+ total = (_data$result$0$count = data === null || data === void 0 ? void 0 : (_data$result$ = data.result[0]) === null || _data$result$ === void 0 ? void 0 : _data$result$.count) !== null && _data$result$0$count !== void 0 ? _data$result$0$count : 0;
17553
+ checking = (_data1$result$0$check = data1 === null || data1 === void 0 ? void 0 : (_data1$result$ = data1.result[0]) === null || _data1$result$ === void 0 ? void 0 : _data1$result$.checkedInCount) !== null && _data1$result$0$check !== void 0 ? _data1$result$0$check : 0; // debugger;
17554
+
17555
+ return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17556
+ data: {
17557
+ count: "".concat(checking, "/").concat(total)
17558
+ }
17559
+ }));
17560
+
17561
+ case 15:
17562
+ _context.prev = 15;
17563
+ _context.t0 = _context["catch"](2);
17564
+ return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17565
+ message: _context.t0.message
17566
+ })));
17567
+
17568
+ case 18:
17569
+ case "end":
17570
+ return _context.stop();
17571
+ }
17572
+ }
17573
+ }, _callee, null, [[2, 15]]);
17574
+ })));
17575
+ var PATIENTSTATUSASSESSMENTPENDING = createAsyncThunk("dashboardApiSlice/patientStatusAssessmentPendin", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
17576
+ var payload,
17577
+ _ref4,
17578
+ rejectWithValue,
17579
+ _data$result$0$Checke,
17580
+ _data$result$2,
17581
+ orgId,
17582
+ startDate,
17583
+ endDate,
17584
+ roleId,
17585
+ loginId,
17586
+ data,
17587
+ _args2 = arguments;
17588
+
17589
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
17590
+ while (1) {
17591
+ switch (_context2.prev = _context2.next) {
17592
+ case 0:
17593
+ payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
17594
+ _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
17595
+ _context2.prev = 2;
17596
+ orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId; // debugger;
17597
+
17598
+ _context2.next = 6;
17599
+ return fetchData$1({
17600
+ body: JSON.stringify(dashboardQuery.patientStatusPendingAssessment(orgId, startDate, endDate, loginId)[roleId])
17601
+ }, __readDocumentUrl__);
17602
+
17603
+ case 6:
17604
+ data = _context2.sent;
17605
+ return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17606
+ data: {
17607
+ count: (_data$result$0$Checke = data === null || data === void 0 ? void 0 : (_data$result$2 = data.result[0]) === null || _data$result$2 === void 0 ? void 0 : _data$result$2.CheckedIn) !== null && _data$result$0$Checke !== void 0 ? _data$result$0$Checke : 0
17608
+ }
17609
+ }));
17610
+
17611
+ case 10:
17612
+ _context2.prev = 10;
17613
+ _context2.t0 = _context2["catch"](2);
17614
+ return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17615
+ message: _context2.t0.message
17616
+ })));
17617
+
17618
+ case 13:
17619
+ case "end":
17620
+ return _context2.stop();
17621
+ }
17622
+ }
17623
+ }, _callee2, null, [[2, 10]]);
17624
+ })));
17625
+ var PATIENTSTATUSASSESSMENTCOMPLETED = createAsyncThunk("dashboardApiSlice/patientStatusAssessmentComplete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
17626
+ var payload,
17627
+ _ref6,
17628
+ rejectWithValue,
17629
+ _data$result$0$Triage,
17630
+ _data$result$3,
17631
+ orgId,
17632
+ startDate,
17633
+ endDate,
17634
+ roleId,
17635
+ loginId,
17636
+ data,
17637
+ _args3 = arguments;
17638
+
17639
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
17640
+ while (1) {
17641
+ switch (_context3.prev = _context3.next) {
17642
+ case 0:
17643
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
17644
+ _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
17645
+ _context3.prev = 2;
17646
+ orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId; // debugger;
17647
+
17648
+ _context3.next = 6;
17649
+ return fetchData$1({
17650
+ body: JSON.stringify(dashboardQuery.patientStatusCompletedAssessment(orgId, startDate, endDate, loginId)[roleId])
17651
+ }, __readDocumentUrl__);
17652
+
17653
+ case 6:
17654
+ data = _context3.sent;
17655
+ return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17656
+ data: {
17657
+ count: (_data$result$0$Triage = data === null || data === void 0 ? void 0 : (_data$result$3 = data.result[0]) === null || _data$result$3 === void 0 ? void 0 : _data$result$3.Triage) !== null && _data$result$0$Triage !== void 0 ? _data$result$0$Triage : 0
17658
+ }
17659
+ }));
17660
+
17661
+ case 10:
17662
+ _context3.prev = 10;
17663
+ _context3.t0 = _context3["catch"](2);
17664
+ return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17665
+ message: _context3.t0.message
17666
+ })));
17667
+
17668
+ case 13:
17669
+ case "end":
17670
+ return _context3.stop();
17671
+ }
17672
+ }
17673
+ }, _callee3, null, [[2, 10]]);
17674
+ })));
17675
+ var CONSULTATION_INPROGRESS = createAsyncThunk("dashboardApiSlice/consultationIn_progress", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
17676
+ var payload,
17677
+ _ref8,
17678
+ rejectWithValue,
17679
+ _data$result$0$InProg,
17680
+ _data$result$4,
17681
+ orgId,
17682
+ startDate,
17683
+ endDate,
17684
+ roleId,
17685
+ loginId,
17686
+ data,
17687
+ _args4 = arguments;
17688
+
17689
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
17690
+ while (1) {
17691
+ switch (_context4.prev = _context4.next) {
17692
+ case 0:
17693
+ payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
17694
+ _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
17695
+ _context4.prev = 2;
17696
+ orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId; // debugger;
17697
+
17698
+ _context4.next = 6;
17699
+ return fetchData$1({
17700
+ body: JSON.stringify(dashboardQuery.consultationInProgress(orgId, startDate, endDate, loginId)[roleId])
17701
+ }, __readDocumentUrl__);
17702
+
17703
+ case 6:
17704
+ data = _context4.sent;
17705
+ return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17706
+ data: {
17707
+ count: (_data$result$0$InProg = data === null || data === void 0 ? void 0 : (_data$result$4 = data.result[0]) === null || _data$result$4 === void 0 ? void 0 : _data$result$4.InProgress) !== null && _data$result$0$InProg !== void 0 ? _data$result$0$InProg : 0
17708
+ }
17709
+ }));
17710
+
17711
+ case 10:
17712
+ _context4.prev = 10;
17713
+ _context4.t0 = _context4["catch"](2);
17714
+ return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17715
+ message: _context4.t0.message
17716
+ })));
17717
+
17718
+ case 13:
17719
+ case "end":
17720
+ return _context4.stop();
17721
+ }
17722
+ }
17723
+ }, _callee4, null, [[2, 10]]);
17724
+ })));
17725
+ var CONSULTATION_COMPLETED = createAsyncThunk("dashboardApiSlice/consultation_completed", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
17726
+ var payload,
17727
+ _ref10,
17728
+ rejectWithValue,
17729
+ _data$result$0$Finish,
17730
+ _data$result$5,
17731
+ orgId,
17732
+ startDate,
17733
+ endDate,
17734
+ roleId,
17735
+ loginId,
17736
+ data,
17737
+ _args5 = arguments;
17738
+
17739
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
17740
+ while (1) {
17741
+ switch (_context5.prev = _context5.next) {
17742
+ case 0:
17743
+ payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
17744
+ _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
17745
+ _context5.prev = 2;
17746
+ orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId; // debugger;
17747
+
17748
+ _context5.next = 6;
17459
17749
  return fetchData$1({
17460
- body: JSON.stringify(dashboardQuery.checkingAppointment(orgId, startDate, endDate, loginId)[roleId])
17750
+ body: JSON.stringify(dashboardQuery.consultationCompleted(orgId, startDate, endDate, loginId)[roleId])
17461
17751
  }, __readDocumentUrl__);
17462
17752
 
17463
- case 9:
17464
- data1 = _context.sent;
17465
- total = (_data$result$0$count = data === null || data === void 0 ? void 0 : (_data$result$ = data.result[0]) === null || _data$result$ === void 0 ? void 0 : _data$result$.count) !== null && _data$result$0$count !== void 0 ? _data$result$0$count : 0;
17466
- checking = (_data1$result$0$check = data1 === null || data1 === void 0 ? void 0 : (_data1$result$ = data1.result[0]) === null || _data1$result$ === void 0 ? void 0 : _data1$result$.checkedInCount) !== null && _data1$result$0$check !== void 0 ? _data1$result$0$check : 0;
17467
- return _context.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17753
+ case 6:
17754
+ data = _context5.sent;
17755
+ return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17468
17756
  data: {
17469
- count: "".concat(checking, "/").concat(total)
17757
+ count: (_data$result$0$Finish = data === null || data === void 0 ? void 0 : (_data$result$5 = data.result[0]) === null || _data$result$5 === void 0 ? void 0 : _data$result$5.Finished) !== null && _data$result$0$Finish !== void 0 ? _data$result$0$Finish : 0
17470
17758
  }
17471
17759
  }));
17472
17760
 
17473
- case 15:
17474
- _context.prev = 15;
17475
- _context.t0 = _context["catch"](2);
17476
- return _context.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17477
- message: _context.t0.message
17761
+ case 10:
17762
+ _context5.prev = 10;
17763
+ _context5.t0 = _context5["catch"](2);
17764
+ return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17765
+ message: _context5.t0.message
17478
17766
  })));
17479
17767
 
17480
- case 18:
17768
+ case 13:
17481
17769
  case "end":
17482
- return _context.stop();
17770
+ return _context5.stop();
17483
17771
  }
17484
17772
  }
17485
- }, _callee, null, [[2, 15]]);
17773
+ }, _callee5, null, [[2, 10]]);
17486
17774
  })));
17487
- var FIRST_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
17775
+ var FIRST_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
17488
17776
  var payload,
17489
- _ref4,
17777
+ _ref12,
17490
17778
  rejectWithValue,
17491
17779
  _data$result$0$firstV,
17492
17780
  _data$result,
17493
- _data$result$2,
17781
+ _data$result$6,
17494
17782
  orgId,
17495
17783
  startDate,
17496
17784
  endDate,
17497
17785
  roleId,
17498
17786
  loginId,
17499
17787
  data,
17500
- _args2 = arguments;
17788
+ _args6 = arguments;
17501
17789
 
17502
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
17790
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
17503
17791
  while (1) {
17504
- switch (_context2.prev = _context2.next) {
17792
+ switch (_context6.prev = _context6.next) {
17505
17793
  case 0:
17506
- payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
17507
- _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
17508
- _context2.prev = 2;
17794
+ payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
17795
+ _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
17796
+ _context6.prev = 2;
17509
17797
  orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
17510
- _context2.next = 6;
17798
+ _context6.next = 6;
17511
17799
  return fetchData$1({
17512
17800
  body: JSON.stringify(dashboardQuery.firstVisit(orgId, startDate, endDate, loginId)[roleId])
17513
17801
  }, __readDocumentUrl__);
17514
17802
 
17515
17803
  case 6:
17516
- data = _context2.sent;
17517
- return _context2.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17804
+ data = _context6.sent;
17805
+ return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17518
17806
  data: {
17519
- count: (_data$result$0$firstV = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$2 = _data$result[0]) === null || _data$result$2 === void 0 ? void 0 : _data$result$2.firstVisitCount) !== null && _data$result$0$firstV !== void 0 ? _data$result$0$firstV : 0
17807
+ count: (_data$result$0$firstV = data === null || data === void 0 ? void 0 : (_data$result = data.result) === null || _data$result === void 0 ? void 0 : (_data$result$6 = _data$result[0]) === null || _data$result$6 === void 0 ? void 0 : _data$result$6.firstVisitCount) !== null && _data$result$0$firstV !== void 0 ? _data$result$0$firstV : 0
17520
17808
  }
17521
17809
  }));
17522
17810
 
17523
17811
  case 10:
17524
- _context2.prev = 10;
17525
- _context2.t0 = _context2["catch"](2);
17526
- return _context2.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17527
- message: _context2.t0.message
17812
+ _context6.prev = 10;
17813
+ _context6.t0 = _context6["catch"](2);
17814
+ return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17815
+ message: _context6.t0.message
17528
17816
  })));
17529
17817
 
17530
17818
  case 13:
17531
17819
  case "end":
17532
- return _context2.stop();
17820
+ return _context6.stop();
17533
17821
  }
17534
17822
  }
17535
- }, _callee2, null, [[2, 10]]);
17823
+ }, _callee6, null, [[2, 10]]);
17536
17824
  })));
17537
- var OTHER_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
17825
+ var OTHER_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
17538
17826
  var payload,
17539
- _ref6,
17827
+ _ref14,
17540
17828
  rejectWithValue,
17541
17829
  _data$result$0$otherV,
17542
17830
  _data$result2,
@@ -17547,46 +17835,46 @@ var OTHER_VISIT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE
17547
17835
  roleId,
17548
17836
  loginId,
17549
17837
  data,
17550
- _args3 = arguments;
17838
+ _args7 = arguments;
17551
17839
 
17552
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
17840
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
17553
17841
  while (1) {
17554
- switch (_context3.prev = _context3.next) {
17842
+ switch (_context7.prev = _context7.next) {
17555
17843
  case 0:
17556
- payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
17557
- _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
17558
- _context3.prev = 2;
17844
+ payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
17845
+ _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
17846
+ _context7.prev = 2;
17559
17847
  orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
17560
- _context3.next = 6;
17848
+ _context7.next = 6;
17561
17849
  return fetchData$1({
17562
17850
  body: JSON.stringify(dashboardQuery.OtherVisit(orgId, startDate, endDate, loginId)[roleId])
17563
17851
  }, __readDocumentUrl__);
17564
17852
 
17565
17853
  case 6:
17566
- data = _context3.sent;
17567
- return _context3.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17854
+ data = _context7.sent;
17855
+ return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17568
17856
  data: {
17569
17857
  count: (_data$result$0$otherV = data === null || data === void 0 ? void 0 : (_data$result2 = data.result) === null || _data$result2 === void 0 ? void 0 : (_data$result2$ = _data$result2[0]) === null || _data$result2$ === void 0 ? void 0 : _data$result2$.otherVisitCount) !== null && _data$result$0$otherV !== void 0 ? _data$result$0$otherV : 0
17570
17858
  }
17571
17859
  }));
17572
17860
 
17573
17861
  case 10:
17574
- _context3.prev = 10;
17575
- _context3.t0 = _context3["catch"](2);
17576
- return _context3.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17577
- message: _context3.t0.message
17862
+ _context7.prev = 10;
17863
+ _context7.t0 = _context7["catch"](2);
17864
+ return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17865
+ message: _context7.t0.message
17578
17866
  })));
17579
17867
 
17580
17868
  case 13:
17581
17869
  case "end":
17582
- return _context3.stop();
17870
+ return _context7.stop();
17583
17871
  }
17584
17872
  }
17585
- }, _callee3, null, [[2, 10]]);
17873
+ }, _callee7, null, [[2, 10]]);
17586
17874
  })));
17587
- var WALK_INS_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
17875
+ var WALK_INS_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
17588
17876
  var payload,
17589
- _ref8,
17877
+ _ref16,
17590
17878
  rejectWithValue,
17591
17879
  _data$result$0$walkin,
17592
17880
  _data$result3,
@@ -17597,46 +17885,46 @@ var WALK_INS_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*
17597
17885
  roleId,
17598
17886
  loginId,
17599
17887
  data,
17600
- _args4 = arguments;
17888
+ _args8 = arguments;
17601
17889
 
17602
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
17890
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
17603
17891
  while (1) {
17604
- switch (_context4.prev = _context4.next) {
17892
+ switch (_context8.prev = _context8.next) {
17605
17893
  case 0:
17606
- payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
17607
- _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
17608
- _context4.prev = 2;
17894
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
17895
+ _ref16 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref16.rejectWithValue;
17896
+ _context8.prev = 2;
17609
17897
  orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
17610
- _context4.next = 6;
17898
+ _context8.next = 6;
17611
17899
  return fetchData$1({
17612
17900
  body: JSON.stringify(dashboardQuery.walkIns(orgId, startDate, endDate, loginId)[roleId])
17613
17901
  }, __readDocumentUrl__);
17614
17902
 
17615
17903
  case 6:
17616
- data = _context4.sent;
17617
- return _context4.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17904
+ data = _context8.sent;
17905
+ return _context8.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17618
17906
  data: {
17619
17907
  count: (_data$result$0$walkin = data === null || data === void 0 ? void 0 : (_data$result3 = data.result) === null || _data$result3 === void 0 ? void 0 : (_data$result3$ = _data$result3[0]) === null || _data$result3$ === void 0 ? void 0 : _data$result3$.walkinCount) !== null && _data$result$0$walkin !== void 0 ? _data$result$0$walkin : 0
17620
17908
  }
17621
17909
  }));
17622
17910
 
17623
17911
  case 10:
17624
- _context4.prev = 10;
17625
- _context4.t0 = _context4["catch"](2);
17626
- return _context4.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17627
- message: _context4.t0.message
17912
+ _context8.prev = 10;
17913
+ _context8.t0 = _context8["catch"](2);
17914
+ return _context8.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17915
+ message: _context8.t0.message
17628
17916
  })));
17629
17917
 
17630
17918
  case 13:
17631
17919
  case "end":
17632
- return _context4.stop();
17920
+ return _context8.stop();
17633
17921
  }
17634
17922
  }
17635
- }, _callee4, null, [[2, 10]]);
17923
+ }, _callee8, null, [[2, 10]]);
17636
17924
  })));
17637
- var NEW_PATIENT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
17925
+ var NEW_PATIENT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
17638
17926
  var payload,
17639
- _ref10,
17927
+ _ref18,
17640
17928
  rejectWithValue,
17641
17929
  _data$result$0$newPat,
17642
17930
  _data$result4,
@@ -17647,61 +17935,61 @@ var NEW_PATIENT_COUNT = createAsyncThunk("dashboardApiSlice/runquery", /*#__PURE
17647
17935
  roleId,
17648
17936
  loginId,
17649
17937
  data,
17650
- _args5 = arguments;
17938
+ _args9 = arguments;
17651
17939
 
17652
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
17940
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
17653
17941
  while (1) {
17654
- switch (_context5.prev = _context5.next) {
17942
+ switch (_context9.prev = _context9.next) {
17655
17943
  case 0:
17656
- payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
17657
- _ref10 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref10.rejectWithValue;
17658
- _context5.prev = 2;
17944
+ payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
17945
+ _ref18 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref18.rejectWithValue;
17946
+ _context9.prev = 2;
17659
17947
  orgId = payload.orgId, startDate = payload.startDate, endDate = payload.endDate, roleId = payload.roleId, loginId = payload.loginId;
17660
- _context5.next = 6;
17948
+ _context9.next = 6;
17661
17949
  return fetchData$1({
17662
17950
  body: JSON.stringify(dashboardQuery.newPatient(orgId, startDate, endDate, loginId)[roleId])
17663
17951
  }, __readDocumentUrl__);
17664
17952
 
17665
17953
  case 6:
17666
- data = _context5.sent;
17667
- return _context5.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17954
+ data = _context9.sent;
17955
+ return _context9.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.List), {}, {
17668
17956
  data: {
17669
17957
  count: (_data$result$0$newPat = data === null || data === void 0 ? void 0 : (_data$result4 = data.result) === null || _data$result4 === void 0 ? void 0 : (_data$result4$ = _data$result4[0]) === null || _data$result4$ === void 0 ? void 0 : _data$result4$.newPatientCount) !== null && _data$result$0$newPat !== void 0 ? _data$result$0$newPat : 0
17670
17958
  }
17671
17959
  }));
17672
17960
 
17673
17961
  case 10:
17674
- _context5.prev = 10;
17675
- _context5.t0 = _context5["catch"](2);
17676
- return _context5.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17677
- message: _context5.t0.message
17962
+ _context9.prev = 10;
17963
+ _context9.t0 = _context9["catch"](2);
17964
+ return _context9.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17965
+ message: _context9.t0.message
17678
17966
  })));
17679
17967
 
17680
17968
  case 13:
17681
17969
  case "end":
17682
- return _context5.stop();
17970
+ return _context9.stop();
17683
17971
  }
17684
17972
  }
17685
- }, _callee5, null, [[2, 10]]);
17973
+ }, _callee9, null, [[2, 10]]);
17686
17974
  })));
17687
- var FOLLOW_UP_COUNT = createAsyncThunk("dashboardApiSlice/followUpCount", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
17975
+ var FOLLOW_UP_COUNT = createAsyncThunk("dashboardApiSlice/followUpCount", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
17688
17976
  var payload,
17689
- _ref12,
17977
+ _ref20,
17690
17978
  rejectWithValue,
17691
17979
  _data$result$0$Follow,
17692
17980
  _data$result5,
17693
17981
  _data$result5$,
17694
17982
  data,
17695
- _args6 = arguments;
17983
+ _args10 = arguments;
17696
17984
 
17697
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
17985
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
17698
17986
  while (1) {
17699
- switch (_context6.prev = _context6.next) {
17987
+ switch (_context10.prev = _context10.next) {
17700
17988
  case 0:
17701
- payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
17702
- _ref12 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref12.rejectWithValue;
17703
- _context6.prev = 2;
17704
- _context6.next = 5;
17989
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
17990
+ _ref20 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref20.rejectWithValue;
17991
+ _context10.prev = 2;
17992
+ _context10.next = 5;
17705
17993
  return fetchData$1({
17706
17994
  body: JSON.stringify({
17707
17995
  db_name: dbName,
@@ -17712,45 +18000,45 @@ var FOLLOW_UP_COUNT = createAsyncThunk("dashboardApiSlice/followUpCount", /*#__P
17712
18000
  }, __readDocumentUrl__);
17713
18001
 
17714
18002
  case 5:
17715
- data = _context6.sent;
17716
- return _context6.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18003
+ data = _context10.sent;
18004
+ return _context10.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
17717
18005
  data: {
17718
18006
  count: (_data$result$0$Follow = 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$.FollowUpAppointments) !== null && _data$result$0$Follow !== void 0 ? _data$result$0$Follow : 0
17719
18007
  }
17720
18008
  }));
17721
18009
 
17722
18010
  case 9:
17723
- _context6.prev = 9;
17724
- _context6.t0 = _context6["catch"](2);
17725
- return _context6.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17726
- message: _context6.t0.message
18011
+ _context10.prev = 9;
18012
+ _context10.t0 = _context10["catch"](2);
18013
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18014
+ message: _context10.t0.message
17727
18015
  })));
17728
18016
 
17729
18017
  case 12:
17730
18018
  case "end":
17731
- return _context6.stop();
18019
+ return _context10.stop();
17732
18020
  }
17733
18021
  }
17734
- }, _callee6, null, [[2, 9]]);
18022
+ }, _callee10, null, [[2, 9]]);
17735
18023
  })));
17736
- var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
18024
+ var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
17737
18025
  var payload,
17738
- _ref14,
18026
+ _ref22,
17739
18027
  rejectWithValue,
17740
18028
  _data$result$0$Appoin,
17741
18029
  _data$result6,
17742
18030
  _data$result6$,
17743
18031
  data,
17744
- _args7 = arguments;
18032
+ _args11 = arguments;
17745
18033
 
17746
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
18034
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
17747
18035
  while (1) {
17748
- switch (_context7.prev = _context7.next) {
18036
+ switch (_context11.prev = _context11.next) {
17749
18037
  case 0:
17750
- payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
17751
- _ref14 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref14.rejectWithValue;
17752
- _context7.prev = 2;
17753
- _context7.next = 5;
18038
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
18039
+ _ref22 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref22.rejectWithValue;
18040
+ _context11.prev = 2;
18041
+ _context11.next = 5;
17754
18042
  return fetchData$1({
17755
18043
  body: JSON.stringify({
17756
18044
  db_name: dbName,
@@ -17761,26 +18049,26 @@ var REFERRAL_COUNT = createAsyncThunk("dashboardApiSlice/referralCount", /*#__PU
17761
18049
  }, __readDocumentUrl__);
17762
18050
 
17763
18051
  case 5:
17764
- data = _context7.sent;
17765
- return _context7.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
18052
+ data = _context11.sent;
18053
+ return _context11.abrupt("return", _objectSpread2(_objectSpread2({}, defaultState.Info), {}, {
17766
18054
  data: {
17767
18055
  count: (_data$result$0$Appoin = data === null || data === void 0 ? void 0 : (_data$result6 = data.result) === null || _data$result6 === void 0 ? void 0 : (_data$result6$ = _data$result6[0]) === null || _data$result6$ === void 0 ? void 0 : _data$result6$.AppointmentReferral) !== null && _data$result$0$Appoin !== void 0 ? _data$result$0$Appoin : 0
17768
18056
  }
17769
18057
  }));
17770
18058
 
17771
18059
  case 9:
17772
- _context7.prev = 9;
17773
- _context7.t0 = _context7["catch"](2);
17774
- return _context7.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
17775
- message: _context7.t0.message
18060
+ _context11.prev = 9;
18061
+ _context11.t0 = _context11["catch"](2);
18062
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2(_objectSpread2({}, defaultReject), {}, {
18063
+ message: _context11.t0.message
17776
18064
  })));
17777
18065
 
17778
18066
  case 12:
17779
18067
  case "end":
17780
- return _context7.stop();
18068
+ return _context11.stop();
17781
18069
  }
17782
18070
  }
17783
- }, _callee7, null, [[2, 9]]);
18071
+ }, _callee11, null, [[2, 9]]);
17784
18072
  })));
17785
18073
  var dashboardApiSlice = createSlice({
17786
18074
  name: "dashboardApiSlice",
@@ -17791,78 +18079,122 @@ var dashboardApiSlice = createSlice({
17791
18079
  walkinCount: _objectSpread2({}, defaultState.Info),
17792
18080
  newPatientCount: _objectSpread2({}, defaultState.Info),
17793
18081
  followUpCount: _objectSpread2({}, defaultState.Info),
17794
- referralCount: _objectSpread2({}, defaultState.Info)
18082
+ referralCount: _objectSpread2({}, defaultState.Info),
18083
+ patientStatusAssessmentPendin: _objectSpread2({}, defaultState.Info),
18084
+ patientStatusAssessmentComplete: _objectSpread2({}, defaultState.Info),
18085
+ consultation_in_progress: _objectSpread2({}, defaultState.Info),
18086
+ consultation_completed: _objectSpread2({}, defaultState.Info)
17795
18087
  },
17796
- extraReducers: (_extraReducers$h = {}, _defineProperty(_extraReducers$h, APPOINTMENTS.fulfilled, function (state, action) {
18088
+ extraReducers: (_extraReducers$h = {}, _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTPENDING.fulfilled, function (state, action) {
17797
18089
  var _action$payload;
17798
18090
 
17799
- state.appointment = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
18091
+ state.patientStatusAssessmentPendin = (_action$payload = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload !== void 0 ? _action$payload : {};
18092
+ }), _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTPENDING.pending, function (state, action) {
18093
+ state.patientStatusAssessmentPendin.loading = true;
18094
+ }), _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTPENDING.rejected, function (state, action) {
18095
+ var _action$payload2;
18096
+
18097
+ state.patientStatusAssessmentPendin = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
18098
+ }), _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTCOMPLETED.fulfilled, function (state, action) {
18099
+ var _action$payload3;
18100
+
18101
+ state.patientStatusAssessmentComplete = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
18102
+ }), _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTCOMPLETED.pending, function (state, action) {
18103
+ state.patientStatusAssessmentComplete.loading = true;
18104
+ }), _defineProperty(_extraReducers$h, PATIENTSTATUSASSESSMENTCOMPLETED.rejected, function (state, action) {
18105
+ var _action$payload4;
18106
+
18107
+ state.patientStatusAssessmentComplete = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
18108
+ }), _defineProperty(_extraReducers$h, CONSULTATION_INPROGRESS.fulfilled, function (state, action) {
18109
+ var _action$payload5;
18110
+
18111
+ state.consultation_in_progress = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
18112
+ }), _defineProperty(_extraReducers$h, CONSULTATION_INPROGRESS.pending, function (state, action) {
18113
+ state.consultation_in_progress.loading = true;
18114
+ }), _defineProperty(_extraReducers$h, CONSULTATION_INPROGRESS.rejected, function (state, action) {
18115
+ var _action$payload6;
18116
+
18117
+ state.consultation_in_progress = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
18118
+ }), _defineProperty(_extraReducers$h, CONSULTATION_COMPLETED.fulfilled, function (state, action) {
18119
+ var _action$payload7;
18120
+
18121
+ state.consultation_completed = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
18122
+ }), _defineProperty(_extraReducers$h, CONSULTATION_COMPLETED.pending, function (state, action) {
18123
+ state.consultation_completed.loading = true;
18124
+ }), _defineProperty(_extraReducers$h, CONSULTATION_COMPLETED.rejected, function (state, action) {
18125
+ var _action$payload8;
18126
+
18127
+ state.consultation_completed = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
18128
+ }), _defineProperty(_extraReducers$h, APPOINTMENTS.fulfilled, function (state, action) {
18129
+ var _action$payload9;
18130
+
18131
+ state.appointment = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
17800
18132
  }), _defineProperty(_extraReducers$h, APPOINTMENTS.pending, function (state, action) {
17801
18133
  state.appointment.loading = true;
17802
18134
  }), _defineProperty(_extraReducers$h, APPOINTMENTS.rejected, function (state, action) {
17803
- var _action$payload2;
18135
+ var _action$payload10;
17804
18136
 
17805
- state.appointment = (_action$payload2 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload2 !== void 0 ? _action$payload2 : {};
18137
+ state.appointment = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
17806
18138
  }), _defineProperty(_extraReducers$h, FIRST_VISIT_COUNT.fulfilled, function (state, action) {
17807
- var _action$payload3;
18139
+ var _action$payload11;
17808
18140
 
17809
- state.firstVisitCount = (_action$payload3 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload3 !== void 0 ? _action$payload3 : {};
18141
+ state.firstVisitCount = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
17810
18142
  }), _defineProperty(_extraReducers$h, FIRST_VISIT_COUNT.pending, function (state, action) {
17811
18143
  state.firstVisitCount.loading = true;
17812
18144
  }), _defineProperty(_extraReducers$h, FIRST_VISIT_COUNT.rejected, function (state, action) {
17813
- var _action$payload4;
18145
+ var _action$payload12;
17814
18146
 
17815
- state.firstVisitCount = (_action$payload4 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload4 !== void 0 ? _action$payload4 : {};
18147
+ state.firstVisitCount = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
17816
18148
  }), _defineProperty(_extraReducers$h, OTHER_VISIT_COUNT.fulfilled, function (state, action) {
17817
- var _action$payload5;
18149
+ var _action$payload13;
17818
18150
 
17819
- state.otherVisitCount = (_action$payload5 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload5 !== void 0 ? _action$payload5 : {};
18151
+ state.otherVisitCount = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
17820
18152
  }), _defineProperty(_extraReducers$h, OTHER_VISIT_COUNT.pending, function (state, action) {
17821
18153
  state.otherVisitCount.loading = true;
17822
18154
  }), _defineProperty(_extraReducers$h, OTHER_VISIT_COUNT.rejected, function (state, action) {
17823
- var _action$payload6;
18155
+ var _action$payload14;
17824
18156
 
17825
- state.otherVisitCount = (_action$payload6 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload6 !== void 0 ? _action$payload6 : {};
18157
+ state.otherVisitCount = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
17826
18158
  }), _defineProperty(_extraReducers$h, WALK_INS_COUNT.fulfilled, function (state, action) {
17827
- var _action$payload7;
18159
+ var _action$payload15;
17828
18160
 
17829
- state.walkinCount = (_action$payload7 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload7 !== void 0 ? _action$payload7 : {};
18161
+ state.walkinCount = (_action$payload15 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload15 !== void 0 ? _action$payload15 : {};
17830
18162
  }), _defineProperty(_extraReducers$h, WALK_INS_COUNT.pending, function (state, action) {
17831
18163
  state.walkinCount.loading = true;
17832
18164
  }), _defineProperty(_extraReducers$h, WALK_INS_COUNT.rejected, function (state, action) {
17833
- var _action$payload8;
18165
+ var _action$payload16;
17834
18166
 
17835
- state.walkinCount = (_action$payload8 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload8 !== void 0 ? _action$payload8 : {};
18167
+ state.walkinCount = (_action$payload16 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload16 !== void 0 ? _action$payload16 : {};
17836
18168
  }), _defineProperty(_extraReducers$h, NEW_PATIENT_COUNT.fulfilled, function (state, action) {
17837
- var _action$payload9;
18169
+ var _action$payload17;
17838
18170
 
17839
- state.newPatientCount = (_action$payload9 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload9 !== void 0 ? _action$payload9 : {};
18171
+ state.newPatientCount = (_action$payload17 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload17 !== void 0 ? _action$payload17 : {};
17840
18172
  }), _defineProperty(_extraReducers$h, NEW_PATIENT_COUNT.pending, function (state, action) {
17841
18173
  state.newPatientCount.loading = true;
17842
18174
  }), _defineProperty(_extraReducers$h, NEW_PATIENT_COUNT.rejected, function (state, action) {
17843
- var _action$payload10;
18175
+ var _action$payload18;
17844
18176
 
17845
- state.newPatientCount = (_action$payload10 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload10 !== void 0 ? _action$payload10 : {};
18177
+ state.newPatientCount = (_action$payload18 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload18 !== void 0 ? _action$payload18 : {};
17846
18178
  }), _defineProperty(_extraReducers$h, FOLLOW_UP_COUNT.fulfilled, function (state, action) {
17847
- var _action$payload11;
18179
+ var _action$payload19;
17848
18180
 
17849
- state.followUpCount = (_action$payload11 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload11 !== void 0 ? _action$payload11 : {};
18181
+ state.followUpCount = (_action$payload19 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload19 !== void 0 ? _action$payload19 : {};
17850
18182
  }), _defineProperty(_extraReducers$h, FOLLOW_UP_COUNT.pending, function (state, action) {
17851
18183
  state.followUpCount.loading = true;
17852
18184
  }), _defineProperty(_extraReducers$h, FOLLOW_UP_COUNT.rejected, function (state, action) {
17853
- var _action$payload12;
18185
+ var _action$payload20;
17854
18186
 
17855
- state.followUpCount = (_action$payload12 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload12 !== void 0 ? _action$payload12 : {};
18187
+ state.followUpCount = (_action$payload20 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload20 !== void 0 ? _action$payload20 : {};
17856
18188
  }), _defineProperty(_extraReducers$h, REFERRAL_COUNT.fulfilled, function (state, action) {
17857
- var _action$payload13;
18189
+ var _action$payload21;
17858
18190
 
17859
- state.referralCount = (_action$payload13 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload13 !== void 0 ? _action$payload13 : {};
18191
+ state.referralCount = (_action$payload21 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload21 !== void 0 ? _action$payload21 : {};
17860
18192
  }), _defineProperty(_extraReducers$h, REFERRAL_COUNT.pending, function (state, action) {
17861
18193
  state.referralCount.loading = true;
17862
18194
  }), _defineProperty(_extraReducers$h, REFERRAL_COUNT.rejected, function (state, action) {
17863
- var _action$payload14;
18195
+ var _action$payload22;
17864
18196
 
17865
- state.referralCount = (_action$payload14 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload14 !== void 0 ? _action$payload14 : {};
18197
+ state.referralCount = (_action$payload22 = action === null || action === void 0 ? void 0 : action.payload) !== null && _action$payload22 !== void 0 ? _action$payload22 : {};
17866
18198
  }), _extraReducers$h)
17867
18199
  });
17868
18200
  var dashboardApiActions = {
@@ -17872,7 +18204,11 @@ var dashboardApiActions = {
17872
18204
  WALK_INS_COUNT: WALK_INS_COUNT,
17873
18205
  NEW_PATIENT_COUNT: NEW_PATIENT_COUNT,
17874
18206
  FOLLOW_UP_COUNT: FOLLOW_UP_COUNT,
17875
- REFERRAL_COUNT: REFERRAL_COUNT
18207
+ REFERRAL_COUNT: REFERRAL_COUNT,
18208
+ PATIENTSTATUSASSESSMENTPENDING: PATIENTSTATUSASSESSMENTPENDING,
18209
+ PATIENTSTATUSASSESSMENTCOMPLETED: PATIENTSTATUSASSESSMENTCOMPLETED,
18210
+ CONSULTATION_INPROGRESS: CONSULTATION_INPROGRESS,
18211
+ CONSULTATION_COMPLETED: CONSULTATION_COMPLETED
17876
18212
  };
17877
18213
  var dashboardApiSlice$1 = dashboardApiSlice.reducer;
17878
18214