hplx-feature-library 1.0.174 → 1.0.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/AllInvestigationsTable-CnlHFXlF.cjs +79 -0
- package/dist/{AllInvestigationsTable-txmu7PTJ.js → AllInvestigationsTable-CrAeJucx.js} +6479 -6150
- package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +1 -1
- package/dist/Attachments/components/drag-drop-overlay.d.ts +1 -1
- package/dist/Attachments/components/edit-document-modal.d.ts +1 -1
- package/dist/Attachments/components/uploading-toast.d.ts +1 -1
- package/dist/Attachments/context/index.d.ts +2 -2
- package/dist/Attachments/hooks/useDropdownPosition.d.ts +1 -1
- package/dist/Attachments/index.js +536 -514
- package/dist/CameraCapture/index.d.ts +1 -1
- package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/PediatricsCalculatorTable-Be2H_OXh.js +2156 -0
- package/dist/PediatricsCalculatorTable-fk_QinWG.cjs +40 -0
- package/dist/ReusableTable/context/TableContextBase.d.ts +1 -1
- package/dist/TrendGraphs/context/index.d.ts +1 -1
- package/dist/components/CustomDropdown.d.ts +1 -1
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index-4whwJbrk.js +6867 -0
- package/dist/index-C6KQLMQs.cjs +92 -0
- package/dist/index.js +2 -2
- package/dist/types/AllInvestigationTypes.d.ts +2 -0
- package/package.json +5 -31
- package/dist/APIAction-DP4YAX6k.cjs +0 -1
- package/dist/APIAction-DsHApdnW.js +0 -161
- package/dist/AllInvestigationsTable-C7uQ56B0.cjs +0 -79
- package/dist/NetworkInstance-CPW2SeAM.cjs +0 -9
- package/dist/NetworkInstance-D0jiwhQe.js +0 -3597
- package/dist/PatientAddEdit/index.js +0 -1663
- package/dist/PatientPopup/action/APIAction.d.ts +0 -65
- package/dist/PatientPopup/app/PatientPopupContainer.d.ts +0 -6
- package/dist/PatientPopup/app/PatientPopupContext.d.ts +0 -30
- package/dist/PatientPopup/common/common.d.ts +0 -14
- package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +0 -8
- package/dist/PatientPopup/components/Lab/LISLab.d.ts +0 -8
- package/dist/PatientPopup/components/Lab/LabTable.d.ts +0 -5
- package/dist/PatientPopup/components/Lab/index.d.ts +0 -5
- package/dist/PatientPopup/components/Loader/Loader.d.ts +0 -2
- package/dist/PatientPopup/components/Pagination.d.ts +0 -9
- package/dist/PatientPopup/components/Profile/Abha.d.ts +0 -11
- package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +0 -1
- package/dist/PatientPopup/components/Profile/Profile.d.ts +0 -11
- package/dist/PatientPopup/components/Profile/Sms.d.ts +0 -2
- package/dist/PatientPopup/components/Visits/Table.d.ts +0 -11
- package/dist/PatientPopup/components/Visits/index.d.ts +0 -15
- package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +0 -2
- package/dist/PatientPopup/components/addBills/AddBills.d.ts +0 -5
- package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +0 -17
- package/dist/PatientPopup/components/addBills/DropDown.d.ts +0 -15
- package/dist/PatientPopup/components/appointment/AllAppts.d.ts +0 -8
- package/dist/PatientPopup/components/appointment/Appointment.d.ts +0 -2
- package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +0 -10
- package/dist/PatientPopup/components/bills/Bills.d.ts +0 -6
- package/dist/PatientPopup/components/bills/BillsTable.d.ts +0 -11
- package/dist/PatientPopup/components/deposit/DepositSection.d.ts +0 -9
- package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +0 -10
- package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +0 -19
- package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +0 -14
- package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +0 -11
- package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +0 -13
- package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +0 -8
- package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +0 -25
- package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +0 -18
- package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +0 -14
- package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +0 -16
- package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +0 -15
- package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +0 -7
- package/dist/PatientPopup/components/payments/Payments.d.ts +0 -5
- package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +0 -14
- package/dist/PatientPopup/constants/AppConstants.d.ts +0 -123
- package/dist/PatientPopup/index.d.ts +0 -1
- package/dist/PatientPopup/index.js +0 -14681
- package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -37
- package/dist/PatientPopup/utils/PrintFontLoader.d.ts +0 -4
- package/dist/PatientPopup/utils/helperFunctions.d.ts +0 -3
- package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +0 -9
- package/dist/PediatricsCalculatorTable-CNWwNxCr.js +0 -1167
- package/dist/PrintModal-9636D2oo.js +0 -120749
- package/dist/PrintModal-BZmh4_Md.cjs +0 -425
- package/dist/ReusableModal-BteIK-YX.js +0 -29
- package/dist/ReusableModal-CIgDYOWZ.cjs +0 -1
- package/dist/Subscription/components/SubscriptionBadge.d.ts +0 -2
- package/dist/changePasswordModal/APIAction/APIActions.d.ts +0 -8
- package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +0 -14
- package/dist/clsx-C11secjj.cjs +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/common/APIAction/APIAction.d.ts +0 -28
- package/dist/common/components/BorderFullWidth.d.ts +0 -2
- package/dist/common/components/table/ExistingPatients.d.ts +0 -17
- package/dist/common/editRibbon/EditRibbon.d.ts +0 -9
- package/dist/common/utils/NetworkInstance.d.ts +0 -4
- package/dist/common/utils/common-utils.d.ts +0 -36
- package/dist/components/PatientAddEdit.d.ts +0 -3
- package/dist/constants/CommonConstant.d.ts +0 -70
- package/dist/dayjs.min-B2cg6pUo.js +0 -284
- package/dist/dayjs.min-DXp74Ozx.cjs +0 -1
- package/dist/fonts/AnekMalayalam-Bold.ttf +0 -0
- package/dist/fonts/AnekMalayalam-Regular.ttf +0 -0
- package/dist/fonts/Arial-Bold-Italic.ttf +0 -0
- package/dist/fonts/Arial-Bold.ttf +0 -0
- package/dist/fonts/Arial-Italic.ttf +0 -0
- package/dist/fonts/Arial.ttf +0 -0
- package/dist/fonts/IndianRupee.ttf +0 -0
- package/dist/fonts/MuktaMaheePunjabi-Bold.ttf +0 -0
- package/dist/fonts/MuktaMaheePunjabi-Regular.ttf +0 -0
- package/dist/fonts/Noto-Sans-Telugu-Bold.ttf +0 -0
- package/dist/fonts/Noto-Sans-Telugu-Regular.ttf +0 -0
- package/dist/fonts/NotoNastaliqUrdu-Bold.ttf +0 -0
- package/dist/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
- package/dist/fonts/NotoSansArabic-Bold.ttf +0 -0
- package/dist/fonts/NotoSansArabic.ttf +0 -0
- package/dist/fonts/NotoSansHindi-Bold.ttf +0 -0
- package/dist/fonts/NotoSansHindi.ttf +0 -0
- package/dist/fonts/NotoSansKannada-Bold.ttf +0 -0
- package/dist/fonts/NotoSansKannada.ttf +0 -0
- package/dist/fonts/NotoSansOriya-Bold.ttf +0 -0
- package/dist/fonts/NotoSansOriya.ttf +0 -0
- package/dist/fonts/NotoSansTamil-Bold.ttf +0 -0
- package/dist/fonts/NotoSansTamil.ttf +0 -0
- package/dist/fonts/NotoSerifGujarati-Bold.ttf +0 -0
- package/dist/fonts/NotoSerifGujarati-Regular.ttf +0 -0
- package/dist/fonts/Roboto-Regular.ttf +0 -0
- package/dist/fonts/Times-Bold-Italic.ttf +0 -0
- package/dist/fonts/Times-Bold.ttf +0 -0
- package/dist/fonts/Times-Italic.ttf +0 -0
- package/dist/fonts/Times.ttf +0 -0
- package/dist/fonts/TiroBangla-Bold.ttf +0 -0
- package/dist/fonts/TiroBangla-Regular.ttf +0 -0
- package/dist/fonts/Verdana-Bold-Italic.ttf +0 -0
- package/dist/fonts/Verdana-Bold.ttf +0 -0
- package/dist/fonts/Verdana-Italic.ttf +0 -0
- package/dist/fonts/Verdana.ttf +0 -0
- package/dist/hooks/useMediaQuery.d.ts +0 -1
- package/dist/index-BUI6-03D.js +0 -7242
- package/dist/index-DQlbIHh3.cjs +0 -102
- package/dist/index-DXvmjJBJ.js +0 -961
- package/dist/index-DkA8S5IK.cjs +0 -32
- package/dist/nineDots/NineDotsTypes.d.ts +0 -22
- package/dist/nineDots/NineDotsUtils.d.ts +0 -3
- package/dist/nineDots/nineDots.d.ts +0 -3
- package/dist/print-pdf/index.js +0 -4
- package/dist/searchPatients/SearchPatients.d.ts +0 -11
- package/dist/types/APIEndPoints.d.ts +0 -11
- package/dist/types/ApiResponseTypes.d.ts +0 -290
- package/dist/types/CommonTypes.d.ts +0 -255
- package/dist/types/PatientAddEditTypes/index.js +0 -1
- package/dist/types/PatientAddEditTypes.d.ts +0 -7
- package/dist/types/PatientPopupTypes/index.js +0 -1
- package/dist/types/PatientPopupTypes.d.ts +0 -836
- package/dist/userProfile/APIAction/APIActions.d.ts +0 -18
- package/dist/userProfile/UserProfile.d.ts +0 -18
- package/dist/userProfile/UserProfileItem.d.ts +0 -7
- package/dist/warning-BozzKWdr.js +0 -38
- package/dist/warning-W0tkkrLJ.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as r } from "./PediatricsCalculatorTable-
|
|
2
|
-
import { A as s } from "./AllInvestigationsTable-
|
|
1
|
+
import { P as r } from "./PediatricsCalculatorTable-Be2H_OXh.js";
|
|
2
|
+
import { A as s } from "./AllInvestigationsTable-CrAeJucx.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AllInvestigations,
|
|
5
5
|
r as PediatricsCalculator
|
|
@@ -14,6 +14,7 @@ export interface I_InvestigationTest {
|
|
|
14
14
|
source_id: number;
|
|
15
15
|
source_type: E_INVESTIGATIONS_SOURCE;
|
|
16
16
|
isEditPermitted?: boolean;
|
|
17
|
+
id: string;
|
|
17
18
|
}
|
|
18
19
|
export interface I_InvestigationTestWithPrint extends I_InvestigationTest {
|
|
19
20
|
isPrintable?: boolean;
|
|
@@ -33,6 +34,7 @@ export interface I_AllInvestigationsDateDetail {
|
|
|
33
34
|
source_id: number;
|
|
34
35
|
source_type: E_INVESTIGATIONS_SOURCE;
|
|
35
36
|
isEditPermitted: boolean;
|
|
37
|
+
id: string;
|
|
36
38
|
}
|
|
37
39
|
export interface I_TestRanges {
|
|
38
40
|
test_id: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hplx-feature-library",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.176",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "npm i hplx-react-elements-dev@qa && vite",
|
|
@@ -63,26 +63,6 @@
|
|
|
63
63
|
"import": "./dist/constants/AttachmentConstants/index.js",
|
|
64
64
|
"types": "./dist/constants/AttachmentConstants.d.ts"
|
|
65
65
|
},
|
|
66
|
-
"./PatientAddEdit": {
|
|
67
|
-
"import": "./dist/PatientAddEdit/index.js",
|
|
68
|
-
"types": "./dist/PatientAddEdit.d.ts"
|
|
69
|
-
},
|
|
70
|
-
"./Types/PatientAddEditTypes": {
|
|
71
|
-
"import": "./dist/types/PatientAddEditTypes/index.js",
|
|
72
|
-
"types": "./dist/types/PatientAddEditTypes.d.ts"
|
|
73
|
-
},
|
|
74
|
-
"./common/constants/CommonConstants": {
|
|
75
|
-
"import": "./dist/common/constants/CommonConstants/index.js",
|
|
76
|
-
"types": "./dist/common/constants/CommonConstants.d.ts"
|
|
77
|
-
},
|
|
78
|
-
"./PatientPopup": {
|
|
79
|
-
"import": "./dist/PatientPopup/index.js",
|
|
80
|
-
"types": "./dist/PatientPopup/index.d.ts"
|
|
81
|
-
},
|
|
82
|
-
"./print-pdf": {
|
|
83
|
-
"import": "./dist/print-pdf/index.js",
|
|
84
|
-
"types": "./dist/print-pdf/index.d.ts"
|
|
85
|
-
},
|
|
86
66
|
"./AllInvestigations": {
|
|
87
67
|
"import": "./dist/AllInvestigations/index.js",
|
|
88
68
|
"types": "./dist/AllInvestigations/index.d.ts"
|
|
@@ -93,27 +73,22 @@
|
|
|
93
73
|
}
|
|
94
74
|
},
|
|
95
75
|
"dependencies": {
|
|
96
|
-
"@react-pdf/renderer": "^4.3.1",
|
|
97
76
|
"date-fns": "^4.1.0",
|
|
98
|
-
"dayjs": "^1.11.
|
|
99
|
-
"franc": "^6.2.0",
|
|
77
|
+
"dayjs": "^1.11.15",
|
|
100
78
|
"hplx-font-icons": "^2.20.0",
|
|
101
79
|
"hplx-react-elements-dev": "^1.3.121",
|
|
102
|
-
"html2canvas": "^1.4.1",
|
|
103
80
|
"konva": "^9.3.22",
|
|
104
81
|
"lodash.debounce": "^4.0.8",
|
|
105
82
|
"nanoid": "^5.1.5",
|
|
106
|
-
"react
|
|
83
|
+
"react": "^18.3.1",
|
|
84
|
+
"react-dom": "^18.3.1",
|
|
107
85
|
"react-konva": "^18.2.12",
|
|
108
|
-
"react-router-dom": "^7.9.4",
|
|
109
|
-
"react-table": "^7.8.0",
|
|
110
86
|
"recharts": "^3.1.2",
|
|
111
87
|
"swr": "^2.3.4",
|
|
112
|
-
"to-words": "^4.7.0",
|
|
113
|
-
"yup": "^1.7.1",
|
|
114
88
|
"zustand": "^5.0.6"
|
|
115
89
|
},
|
|
116
90
|
"peerDependencies": {
|
|
91
|
+
"hplx-font-icons": "^2.20.0",
|
|
117
92
|
"react": "^18.3.1",
|
|
118
93
|
"react-dom": "^18.3.1",
|
|
119
94
|
"react-modal": "^3.16.3",
|
|
@@ -125,7 +100,6 @@
|
|
|
125
100
|
"@types/react": "^18.3.23",
|
|
126
101
|
"@types/react-dom": "^18.3.7",
|
|
127
102
|
"@types/react-modal": "^3.16.3",
|
|
128
|
-
"@types/react-table": "^7.7.20",
|
|
129
103
|
"@vitejs/plugin-react": "^4.5.2",
|
|
130
104
|
"autoprefixer": "^10.4.21",
|
|
131
105
|
"axios": "^1.11.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=require("./NetworkInstance-CPW2SeAM.cjs"),P=require("./dayjs.min-DXp74Ozx.cjs"),l="/preferences/doctor",m="/preferences/visitpad",E="/preferences/branch",u="patient/search",A="../api/modelGetAddPatientSuggestion.php",g="appointments/get",_="/v1/patient/add",h="/v1/patients",f="../api/modelSavePatientImage.php",I="../api/modelDeletePatientImage.php",d="/patient/detail",D=async(s="",t={},e,n,r)=>{const{doc_rid:o=""}=t;let a="";Array.isArray(s)?a=s.map(c=>`&fields_required=${encodeURIComponent(c)}`).join(""):s&&(a=`&fields_required=${encodeURIComponent(s)}`);try{const c=await i.hplxAPI(r?.token,r.envName).get(`${l}/${o||e}?branch_id=${n}`+a),{data:p}=c||{};return Promise.resolve(p)}catch(c){return console.error("Error fetching doctor preference:",c),Promise.reject(c)}},T=async(s="",t,e)=>{try{const n=await i.ReArchAPI(e.token,e.envName).get(`${E}/${t}?fields_required=${s}`),{data:r}=n||{};return Promise.resolve(r)}catch(n){return console.log(n),Promise.reject(n)}},w=async(s,t,e,n,r)=>{try{const o={appnt_date:s,doctor_role_id:t,doctor_id:n,org_branch_id:e},a=await i.ReArchAPI(r.token,r.envName).post(g,{...o}),{data:c}=a||{};return Promise.resolve(c)}catch(o){return o instanceof Error&&console.error("Error fetching appointments:",o.message),o?.response?.status===401&&i.handle401Status(),Promise.reject(o)}},y=async(s,t)=>{let e=[];const n=await w(P.dayjs().format("YYYY-MM-DD"),s.doctor_role_id,s.branch_id,s.doctor_id,t);n?.appointments?.length&&(e=n.appointments),window.filteredUpcomingAppts=[],e.length&&(s.term?.length?window.filteredUpcomingAppts=e.filter(r=>r.org_person_name.length&&r.org_person_name.toLowerCase().includes(s.term.toLowerCase())&&r.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)):window.filteredUpcomingAppts=e.filter(r=>r.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)));try{const r=await i.ReArchAPI(t.token,t.envName).post(u,s),{data:o}=r||{};return Promise.resolve(o)}catch(r){return console.log(r),null}},N=async s=>{try{const t=await i.hplxAPI(s.token,s.envName).post(A),{data:e}=t||{},{apiError:n}=e||{};if(n)throw new Error(n);return Promise.resolve(e)}catch(t){return t instanceof Error&&console.error("Error fetching referred by list:",t.message),t?.response?.status===401&&i.handle401Status(),Promise.reject(t)}},R=async(s,t)=>{try{const e=await i.ReArchAPI(t.token,t.envName).post(_,{...s,token:t.token}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return Promise.reject(e)}},j=async(s,t)=>{try{const e=await i.ReArchAPI(t.token,t.envName).put(h+"/"+s?.person_role_id,{...s}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},v=async(s,t)=>{try{const e=await i.hplxAPI(t.token,t.envName).post(f,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},Y=async(s,t)=>{try{const e=await i.hplxAPI(t.token,t.envName).post(I,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},C=async({callback:s,payload:t,token_env:e,isCallbackNeeded:n=!0})=>{try{const r=t;window?.partner_service_enabled==="1"&&(r.partner_service_enabled=!0);const o=await i.ReArchAPI(e.token,e.envName).post(d,{...r}),{data:a}=o||{},{error:c}=a||{};if(c)throw new Error(c);if(n)s(a);else return a}catch(r){console.log(r)}},G=async({doc_id:s="",doc_rid:t=""},e,n,r,o)=>{try{const a={branch_id:n,doctor_id:s||r,doctor_role_id:t||o},c=await i.hplxAPI(e.token,e.envName).post(m,a),{data:p}=c||{};return Promise.resolve(p)}catch(a){return console.error("Error fetching visitpad preference:",a),Promise.reject(a)}};exports.GET_PATIENT_DETAILS=d;exports.addPatientDetails=R;exports.addPatientImage=v;exports.deletePatientImage=Y;exports.getBranchPreferences=T;exports.getDoctorPreference=D;exports.getPatientDetails=C;exports.getPatientList=y;exports.getReferredByList=N;exports.getVisitpadPreference=G;exports.updatePatientDetails=j;
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { R as i, h as p, a as d } from "./NetworkInstance-D0jiwhQe.js";
|
|
2
|
-
import { d as l } from "./dayjs.min-B2cg6pUo.js";
|
|
3
|
-
const P = "/preferences/doctor", E = "/preferences/visitpad", u = "/preferences/branch", f = "patient/search", _ = "../api/modelGetAddPatientSuggestion.php", g = "appointments/get", h = "/v1/patient/add", A = "/v1/patients", w = "../api/modelSavePatientImage.php", D = "../api/modelDeletePatientImage.php", T = "/patient/detail", R = async (s = "", t = {}, e, o, r) => {
|
|
4
|
-
const { doc_rid: n = "" } = t;
|
|
5
|
-
let a = "";
|
|
6
|
-
Array.isArray(s) ? a = s.map((c) => `&fields_required=${encodeURIComponent(c)}`).join("") : s && (a = `&fields_required=${encodeURIComponent(s)}`);
|
|
7
|
-
try {
|
|
8
|
-
const c = await p(r?.token, r.envName).get(
|
|
9
|
-
`${P}/${n || e}?branch_id=${o}` + a
|
|
10
|
-
), { data: m } = c || {};
|
|
11
|
-
return Promise.resolve(m);
|
|
12
|
-
} catch (c) {
|
|
13
|
-
return console.error("Error fetching doctor preference:", c), Promise.reject(c);
|
|
14
|
-
}
|
|
15
|
-
}, v = async (s = "", t, e) => {
|
|
16
|
-
try {
|
|
17
|
-
const o = await i(e.token, e.envName).get(
|
|
18
|
-
`${u}/${t}?fields_required=${s}`
|
|
19
|
-
), { data: r } = o || {};
|
|
20
|
-
return Promise.resolve(r);
|
|
21
|
-
} catch (o) {
|
|
22
|
-
return console.log(o), Promise.reject(o);
|
|
23
|
-
}
|
|
24
|
-
}, N = async (s, t, e, o, r) => {
|
|
25
|
-
try {
|
|
26
|
-
const n = {
|
|
27
|
-
appnt_date: s,
|
|
28
|
-
// If empty then will take today's date
|
|
29
|
-
doctor_role_id: t,
|
|
30
|
-
doctor_id: o,
|
|
31
|
-
org_branch_id: e
|
|
32
|
-
}, a = await i(r.token, r.envName).post(g, {
|
|
33
|
-
...n
|
|
34
|
-
}), { data: c } = a || {};
|
|
35
|
-
return Promise.resolve(c);
|
|
36
|
-
} catch (n) {
|
|
37
|
-
return n instanceof Error && console.error("Error fetching appointments:", n.message), n?.response?.status === 401 && d(), Promise.reject(n);
|
|
38
|
-
}
|
|
39
|
-
}, Y = async (s, t) => {
|
|
40
|
-
let e = [];
|
|
41
|
-
const o = await N(
|
|
42
|
-
l().format("YYYY-MM-DD"),
|
|
43
|
-
s.doctor_role_id,
|
|
44
|
-
s.branch_id,
|
|
45
|
-
s.doctor_id,
|
|
46
|
-
t
|
|
47
|
-
);
|
|
48
|
-
o?.appointments?.length && (e = o.appointments), window.filteredUpcomingAppts = [], e.length && (s.term?.length ? window.filteredUpcomingAppts = e.filter((r) => r.org_person_name.length && r.org_person_name.toLowerCase().includes(s.term.toLowerCase()) && r.appnt_date >= l(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (r.remote_appnt_status === "CONFIRMED" || r.appnt_status === 0 || r.appnt_status === 3 || r.appnt_status === 5)) : window.filteredUpcomingAppts = e.filter((r) => r.appnt_date >= l(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (r.remote_appnt_status === "CONFIRMED" || r.appnt_status === 0 || r.appnt_status === 3 || r.appnt_status === 5)));
|
|
49
|
-
try {
|
|
50
|
-
const r = await i(t.token, t.envName).post(
|
|
51
|
-
f,
|
|
52
|
-
s
|
|
53
|
-
), { data: n } = r || {};
|
|
54
|
-
return Promise.resolve(n);
|
|
55
|
-
} catch (r) {
|
|
56
|
-
return console.log(r), null;
|
|
57
|
-
}
|
|
58
|
-
}, j = async (s) => {
|
|
59
|
-
try {
|
|
60
|
-
const t = await p(s.token, s.envName).post(
|
|
61
|
-
_
|
|
62
|
-
), { data: e } = t || {}, { apiError: o } = e || {};
|
|
63
|
-
if (o)
|
|
64
|
-
throw new Error(o);
|
|
65
|
-
return Promise.resolve(e);
|
|
66
|
-
} catch (t) {
|
|
67
|
-
return t instanceof Error && console.error("Error fetching referred by list:", t.message), t?.response?.status === 401 && d(), Promise.reject(t);
|
|
68
|
-
}
|
|
69
|
-
}, C = async (s, t) => {
|
|
70
|
-
try {
|
|
71
|
-
const e = await i(t.token, t.envName).post(h, {
|
|
72
|
-
...s,
|
|
73
|
-
token: t.token
|
|
74
|
-
}), { data: o } = e || {};
|
|
75
|
-
return Promise.resolve(o);
|
|
76
|
-
} catch (e) {
|
|
77
|
-
return Promise.reject(e);
|
|
78
|
-
}
|
|
79
|
-
}, G = async (s, t) => {
|
|
80
|
-
try {
|
|
81
|
-
const e = await i(t.token, t.envName).put(
|
|
82
|
-
A + "/" + s?.person_role_id,
|
|
83
|
-
{
|
|
84
|
-
...s
|
|
85
|
-
}
|
|
86
|
-
), { data: o } = e || {};
|
|
87
|
-
return Promise.resolve(o);
|
|
88
|
-
} catch (e) {
|
|
89
|
-
return console.log(e), Promise.reject(e);
|
|
90
|
-
}
|
|
91
|
-
}, M = async (s, t) => {
|
|
92
|
-
try {
|
|
93
|
-
const e = await p(t.token, t.envName).post(
|
|
94
|
-
w,
|
|
95
|
-
s
|
|
96
|
-
), { data: o } = e || {};
|
|
97
|
-
return Promise.resolve(o);
|
|
98
|
-
} catch (e) {
|
|
99
|
-
return console.log(e), Promise.reject(e);
|
|
100
|
-
}
|
|
101
|
-
}, b = async (s, t) => {
|
|
102
|
-
try {
|
|
103
|
-
const e = await p(t.token, t.envName).post(
|
|
104
|
-
D,
|
|
105
|
-
s
|
|
106
|
-
), { data: o } = e || {};
|
|
107
|
-
return Promise.resolve(o);
|
|
108
|
-
} catch (e) {
|
|
109
|
-
return console.log(e), Promise.reject(e);
|
|
110
|
-
}
|
|
111
|
-
}, L = async ({
|
|
112
|
-
callback: s,
|
|
113
|
-
payload: t,
|
|
114
|
-
token_env: e,
|
|
115
|
-
isCallbackNeeded: o = !0
|
|
116
|
-
}) => {
|
|
117
|
-
try {
|
|
118
|
-
const r = t;
|
|
119
|
-
window?.partner_service_enabled === "1" && (r.partner_service_enabled = !0);
|
|
120
|
-
const n = await i(e.token, e.envName).post(
|
|
121
|
-
T,
|
|
122
|
-
{
|
|
123
|
-
...r
|
|
124
|
-
}
|
|
125
|
-
), { data: a } = n || {}, { error: c } = a || {};
|
|
126
|
-
if (c)
|
|
127
|
-
throw new Error(c);
|
|
128
|
-
if (o)
|
|
129
|
-
s(a);
|
|
130
|
-
else return a;
|
|
131
|
-
} catch (r) {
|
|
132
|
-
console.log(r);
|
|
133
|
-
}
|
|
134
|
-
}, S = async ({ doc_id: s = "", doc_rid: t = "" }, e, o, r, n) => {
|
|
135
|
-
try {
|
|
136
|
-
const a = {
|
|
137
|
-
branch_id: o,
|
|
138
|
-
doctor_id: s || r,
|
|
139
|
-
doctor_role_id: t || n
|
|
140
|
-
}, c = await p(e.token, e.envName).post(
|
|
141
|
-
E,
|
|
142
|
-
a
|
|
143
|
-
), { data: m } = c || {};
|
|
144
|
-
return Promise.resolve(m);
|
|
145
|
-
} catch (a) {
|
|
146
|
-
return console.error("Error fetching visitpad preference:", a), Promise.reject(a);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
export {
|
|
150
|
-
T as G,
|
|
151
|
-
j as a,
|
|
152
|
-
L as b,
|
|
153
|
-
C as c,
|
|
154
|
-
Y as d,
|
|
155
|
-
M as e,
|
|
156
|
-
b as f,
|
|
157
|
-
v as g,
|
|
158
|
-
R as h,
|
|
159
|
-
S as i,
|
|
160
|
-
G as u
|
|
161
|
-
};
|