hplx-feature-library 1.0.262 → 1.0.263
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/APIAction-CC17r7p0.cjs +1 -0
- package/dist/APIAction-DT2t98rl.js +191 -0
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/{AllInvestigationsTable-BDLPOHjr.cjs → AllInvestigationsTable-Btilz6k7.cjs} +1 -1
- package/dist/{AllInvestigationsTable-Dg-YXASz.js → AllInvestigationsTable-DaTLqp8z.js} +2 -2
- package/dist/Attachments/index.js +1 -1
- package/dist/{Attachments-4fllqH12.cjs → Attachments-DAq9xgoo.cjs} +1 -1
- package/dist/{Attachments-CyWfyXVq.js → Attachments-rqdT5ZCi.js} +1 -1
- package/dist/NineDots/index.js +1 -1
- package/dist/{NineDots-CUXiXRmO.cjs → NineDots-BqJkRMwa.cjs} +1 -1
- package/dist/{NineDots-B3ZRumoi.js → NineDots-Di0ExA79.js} +1 -1
- package/dist/PatientAddEdit/components/VerifyOtpModal.d.ts +14 -0
- package/dist/PatientAddEdit/index.js +1 -1
- package/dist/{PatientAddEdit-OJOcJQ2m.js → PatientAddEdit-DujKaqWc.js} +750 -545
- package/dist/PatientAddEdit-_qlZg3dz.cjs +7 -0
- package/dist/PatientPopup/index.js +1 -1
- package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -3
- package/dist/{PatientPopupContainer-D4ip9SKW.js → PatientPopupContainer-A1RU4MWv.js} +23 -23
- package/dist/{PatientPopupContainer-Bgo9gldx.cjs → PatientPopupContainer-T_jhsgnM.cjs} +7 -7
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/{PediatricsCalculatorTable-B4fTy1J5.cjs → PediatricsCalculatorTable-CV2TYaNw.cjs} +1 -1
- package/dist/{PediatricsCalculatorTable-G0ttbDpi.js → PediatricsCalculatorTable-DNrhACld.js} +2 -2
- package/dist/{PrintModal-Dq0Z1WeK.js → PrintModal-B656GT1T.js} +21 -23
- package/dist/{PrintModal-ClPSnO5C.cjs → PrintModal-DUOclH1A.cjs} +5 -5
- package/dist/SearchPatients/index.js +1 -1
- package/dist/{SearchPatients-C4Vnh3N8.cjs → SearchPatients-0ldEci6d.cjs} +1 -1
- package/dist/{SearchPatients-Db-rZQFH.js → SearchPatients-dk3g8cS2.js} +3 -3
- package/dist/UserProfile/index.js +1 -1
- package/dist/{UserProfile-V_7POQiQ.cjs → UserProfile-CmtfxoCm.cjs} +1 -1
- package/dist/{UserProfile-BxJOxt0y.js → UserProfile-Cx8clS5a.js} +4 -4
- package/dist/common/APIAction/APIAction.d.ts +2 -0
- package/dist/common/editRibbon/EditRibbon.d.ts +0 -1
- package/dist/{common-utils-DvF5Rjeq.js → common-utils-CV2JVzIc.js} +5 -5
- package/dist/{common-utils-BuL9g3zT.cjs → common-utils-PQ3dz_tV.cjs} +1 -1
- package/dist/{dayjs.min-DXp74Ozx.cjs → dayjs.min-e35R9Xl4.cjs} +1 -1
- package/dist/{dayjs.min-D52_GdfV.js → dayjs.min-gQLjWrOd.js} +1 -1
- package/dist/hplx-feature-library.css +1 -1
- package/dist/{index-DkA8S5IK.cjs → index-BrdW6iDR.cjs} +1 -1
- package/dist/{index-DQlbIHh3.cjs → index-CSBySGrm.cjs} +31 -31
- package/dist/{index-T1lUjzhG.js → index-DaR8OZ5T.js} +1 -1
- package/dist/{index-Bd0CDVpH.js → index-WgpmO6Qi.js} +1480 -1452
- package/dist/index.js +9 -9
- package/dist/print-pdf/index.js +1 -1
- package/dist/types/APIEndPoints.d.ts +3 -1
- package/dist/types/ApiResponseTypes.d.ts +6 -0
- package/package.json +1 -1
- package/dist/APIAction-DZ6jFXOq.cjs +0 -1
- package/dist/APIAction-VHoA7gHt.js +0 -161
- package/dist/PatientAddEdit-svjtGpiz.cjs +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./common-utils-PQ3dz_tV.cjs"),P=require("./dayjs.min-e35R9Xl4.cjs"),E="/preferences/doctor",_="/preferences/visitpad",A="/preferences/branch",u="patient/search",T="../api/modelGetAddPatientSuggestion.php",h="appointments/get",g="/v1/patient/add",m="/v1/patients",l="../api/modelSavePatientImage.php",I="../api/modelDeletePatientImage.php",d="/patient/detail",f="../api/modelSendRegisterOtp.php",D="../api/modelVerifyRegisterOtp.php",w=async(r="",t={},e,n,o)=>{const{doc_rid:a=""}=t;let c="";Array.isArray(r)?c=r.map(i=>`&fields_required=${encodeURIComponent(i)}`).join(""):r&&(c=`&fields_required=${encodeURIComponent(r)}`);try{const i=await s.hplxAPI(o?.token,o.envName).get(`${E}/${a||e}?branch_id=${n}`+c),{data:p}=i||{};return Promise.resolve(p)}catch(i){return console.error("Error fetching doctor preference:",i),Promise.reject(i)}},N=async(r="",t,e)=>{try{const n=await s.ReArchAPI(e.token,e.envName).get(`${A}/${t}?fields_required=${r}`),{data:o}=n||{};return Promise.resolve(o)}catch(n){return console.log(n),Promise.reject(n)}},y=async(r,t,e,n,o)=>{try{const a={appnt_date:r,doctor_role_id:t,doctor_id:n,org_branch_id:e},c=await s.ReArchAPI(o.token,o.envName).post(h,{...a}),{data:i}=c||{};return Promise.resolve(i)}catch(a){return a instanceof Error&&console.error("Error fetching appointments:",a.message),a?.response?.status===401&&s.handle401Status(),Promise.reject(a)}},R=async(r,t)=>{let e=[];const n=await y(P.dayjs().format("YYYY-MM-DD"),r.doctor_role_id,r.branch_id,r.doctor_id,t);n?.appointments?.length&&(e=n.appointments),window.filteredUpcomingAppts=[],e.length&&(r.term?.length?window.filteredUpcomingAppts=e.filter(o=>o.org_person_name.length&&o.org_person_name.toLowerCase().includes(r.term.toLowerCase())&&o.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(o.remote_appnt_status==="CONFIRMED"||o.appnt_status===0||o.appnt_status===3||o.appnt_status===5)):window.filteredUpcomingAppts=e.filter(o=>o.appnt_date>=P.dayjs(new Date).format("YYYY-MM-DD")&&(o.remote_appnt_status==="CONFIRMED"||o.appnt_status===0||o.appnt_status===3||o.appnt_status===5)));try{const o=await s.ReArchAPI(t.token,t.envName).post(u,r),{data:a}=o||{};return Promise.resolve(a)}catch(o){return console.log(o),null}},C=async r=>{try{const t=await s.hplxAPI(r.token,r.envName).post(T),{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&&s.handle401Status(),Promise.reject(t)}},v=async(r,t)=>{try{const e=await s.ReArchAPI(t.token,t.envName).post(g,{...r,token:t.token}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return Promise.reject(e)}},O=async(r,t)=>{try{const e=await s.ReArchAPI(t.token,t.envName).put(m+"/"+r?.person_role_id,{...r}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},S=async(r,t)=>{try{const e=await s.hplxAPI(t.token,t.envName).post(l,r),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},j=async(r,t)=>{try{const e=await s.hplxAPI(t.token,t.envName).post(I,r),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},L=async({callback:r,payload:t,token_env:e,isCallbackNeeded:n=!0})=>{try{const o=t;window?.partner_service_enabled==="1"&&(o.partner_service_enabled=!0);const a=await s.ReArchAPI(e.token,e.envName).post(d,{...o}),{data:c}=a||{},{error:i}=c||{};if(i)throw new Error(i);if(n)r(c);else return c}catch(o){console.log(o)}},Y=async({doc_id:r="",doc_rid:t=""},e,n,o,a)=>{try{const c={branch_id:n,doctor_id:r||o,doctor_role_id:t||a},i=await s.hplxAPI(e.token,e.envName).post(_,c),{data:p}=i||{};return Promise.resolve(p)}catch(c){return console.error("Error fetching visitpad preference:",c),Promise.reject(c)}},G=async(r,t)=>{try{const e=new URLSearchParams;e.append("reg_mobile_number",r);const n=await s.hplxAPI(t.token,t.envName).post(f,e,{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return Promise.resolve(n?.data)}catch(e){return console.log(e),Promise.reject(e)}},M=async(r,t,e)=>{try{const n=new URLSearchParams;n.append("reg_mobile_number",r),n.append("reg_mobile_otp",t);const o=await s.hplxAPI(e.token,e.envName).post(D,n,{headers:{"Content-Type":"application/x-www-form-urlencoded"}});return Promise.resolve(o?.data)}catch(n){return console.log(n),Promise.reject(n)}};exports.ADD_PATIENT_IMAGE=l;exports.GET_PATIENT_DETAILS=d;exports.UPDATE_PATIENT_DETAIL=m;exports.addPatientDetails=v;exports.addPatientImage=S;exports.deletePatientImage=j;exports.getBranchPreferences=N;exports.getDoctorPreference=w;exports.getPatientDetails=L;exports.getPatientList=R;exports.getReferredByList=C;exports.getVisitpadPreference=Y;exports.patientConsentOTPVerification=M;exports.patientConsentSendOTP=G;exports.updatePatientDetails=O;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { h as i, R as p, b as l } from "./common-utils-CV2JVzIc.js";
|
|
2
|
+
import { d } from "./dayjs.min-gQLjWrOd.js";
|
|
3
|
+
const P = "/preferences/doctor", E = "/preferences/visitpad", _ = "/preferences/branch", u = "patient/search", f = "../api/modelGetAddPatientSuggestion.php", g = "appointments/get", h = "/v1/patient/add", T = "/v1/patients", w = "../api/modelSavePatientImage.php", A = "../api/modelDeletePatientImage.php", N = "/patient/detail", D = "../api/modelSendRegisterOtp.php", I = "../api/modelVerifyRegisterOtp.php", v = async (r = "", t = {}, e, s, o) => {
|
|
4
|
+
const { doc_rid: n = "" } = t;
|
|
5
|
+
let a = "";
|
|
6
|
+
Array.isArray(r) ? a = r.map((c) => `&fields_required=${encodeURIComponent(c)}`).join("") : r && (a = `&fields_required=${encodeURIComponent(r)}`);
|
|
7
|
+
try {
|
|
8
|
+
const c = await i(o?.token, o.envName).get(
|
|
9
|
+
`${P}/${n || e}?branch_id=${s}` + 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
|
+
}, O = async (r = "", t, e) => {
|
|
16
|
+
try {
|
|
17
|
+
const s = await p(e.token, e.envName).get(
|
|
18
|
+
`${_}/${t}?fields_required=${r}`
|
|
19
|
+
), { data: o } = s || {};
|
|
20
|
+
return Promise.resolve(o);
|
|
21
|
+
} catch (s) {
|
|
22
|
+
return console.log(s), Promise.reject(s);
|
|
23
|
+
}
|
|
24
|
+
}, y = async (r, t, e, s, o) => {
|
|
25
|
+
try {
|
|
26
|
+
const n = {
|
|
27
|
+
appnt_date: r,
|
|
28
|
+
// If empty then will take today's date
|
|
29
|
+
doctor_role_id: t,
|
|
30
|
+
doctor_id: s,
|
|
31
|
+
org_branch_id: e
|
|
32
|
+
}, a = await p(o.token, o.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 && l(), Promise.reject(n);
|
|
38
|
+
}
|
|
39
|
+
}, j = async (r, t) => {
|
|
40
|
+
let e = [];
|
|
41
|
+
const s = await y(
|
|
42
|
+
d().format("YYYY-MM-DD"),
|
|
43
|
+
r.doctor_role_id,
|
|
44
|
+
r.branch_id,
|
|
45
|
+
r.doctor_id,
|
|
46
|
+
t
|
|
47
|
+
);
|
|
48
|
+
s?.appointments?.length && (e = s.appointments), window.filteredUpcomingAppts = [], e.length && (r.term?.length ? window.filteredUpcomingAppts = e.filter((o) => o.org_person_name.length && o.org_person_name.toLowerCase().includes(r.term.toLowerCase()) && o.appnt_date >= d(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (o.remote_appnt_status === "CONFIRMED" || o.appnt_status === 0 || o.appnt_status === 3 || o.appnt_status === 5)) : window.filteredUpcomingAppts = e.filter((o) => o.appnt_date >= d(/* @__PURE__ */ new Date()).format("YYYY-MM-DD") && (o.remote_appnt_status === "CONFIRMED" || o.appnt_status === 0 || o.appnt_status === 3 || o.appnt_status === 5)));
|
|
49
|
+
try {
|
|
50
|
+
const o = await p(t.token, t.envName).post(
|
|
51
|
+
u,
|
|
52
|
+
r
|
|
53
|
+
), { data: n } = o || {};
|
|
54
|
+
return Promise.resolve(n);
|
|
55
|
+
} catch (o) {
|
|
56
|
+
return console.log(o), null;
|
|
57
|
+
}
|
|
58
|
+
}, S = async (r) => {
|
|
59
|
+
try {
|
|
60
|
+
const t = await i(r.token, r.envName).post(
|
|
61
|
+
f
|
|
62
|
+
), { data: e } = t || {}, { apiError: s } = e || {};
|
|
63
|
+
if (s)
|
|
64
|
+
throw new Error(s);
|
|
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 && l(), Promise.reject(t);
|
|
68
|
+
}
|
|
69
|
+
}, Y = async (r, t) => {
|
|
70
|
+
try {
|
|
71
|
+
const e = await p(t.token, t.envName).post(h, {
|
|
72
|
+
...r,
|
|
73
|
+
token: t.token
|
|
74
|
+
}), { data: s } = e || {};
|
|
75
|
+
return Promise.resolve(s);
|
|
76
|
+
} catch (e) {
|
|
77
|
+
return Promise.reject(e);
|
|
78
|
+
}
|
|
79
|
+
}, b = async (r, t) => {
|
|
80
|
+
try {
|
|
81
|
+
const e = await p(t.token, t.envName).put(
|
|
82
|
+
T + "/" + r?.person_role_id,
|
|
83
|
+
{
|
|
84
|
+
...r
|
|
85
|
+
}
|
|
86
|
+
), { data: s } = e || {};
|
|
87
|
+
return Promise.resolve(s);
|
|
88
|
+
} catch (e) {
|
|
89
|
+
return console.log(e), Promise.reject(e);
|
|
90
|
+
}
|
|
91
|
+
}, G = async (r, t) => {
|
|
92
|
+
try {
|
|
93
|
+
const e = await i(t.token, t.envName).post(
|
|
94
|
+
w,
|
|
95
|
+
r
|
|
96
|
+
), { data: s } = e || {};
|
|
97
|
+
return Promise.resolve(s);
|
|
98
|
+
} catch (e) {
|
|
99
|
+
return console.log(e), Promise.reject(e);
|
|
100
|
+
}
|
|
101
|
+
}, M = async (r, t) => {
|
|
102
|
+
try {
|
|
103
|
+
const e = await i(t.token, t.envName).post(
|
|
104
|
+
A,
|
|
105
|
+
r
|
|
106
|
+
), { data: s } = e || {};
|
|
107
|
+
return Promise.resolve(s);
|
|
108
|
+
} catch (e) {
|
|
109
|
+
return console.log(e), Promise.reject(e);
|
|
110
|
+
}
|
|
111
|
+
}, L = async ({
|
|
112
|
+
callback: r,
|
|
113
|
+
payload: t,
|
|
114
|
+
token_env: e,
|
|
115
|
+
isCallbackNeeded: s = !0
|
|
116
|
+
}) => {
|
|
117
|
+
try {
|
|
118
|
+
const o = t;
|
|
119
|
+
window?.partner_service_enabled === "1" && (o.partner_service_enabled = !0);
|
|
120
|
+
const n = await p(e.token, e.envName).post(
|
|
121
|
+
N,
|
|
122
|
+
{
|
|
123
|
+
...o
|
|
124
|
+
}
|
|
125
|
+
), { data: a } = n || {}, { error: c } = a || {};
|
|
126
|
+
if (c)
|
|
127
|
+
throw new Error(c);
|
|
128
|
+
if (s)
|
|
129
|
+
r(a);
|
|
130
|
+
else return a;
|
|
131
|
+
} catch (o) {
|
|
132
|
+
console.log(o);
|
|
133
|
+
}
|
|
134
|
+
}, U = async ({ doc_id: r = "", doc_rid: t = "" }, e, s, o, n) => {
|
|
135
|
+
try {
|
|
136
|
+
const a = {
|
|
137
|
+
branch_id: s,
|
|
138
|
+
doctor_id: r || o,
|
|
139
|
+
doctor_role_id: t || n
|
|
140
|
+
}, c = await i(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
|
+
}, F = async (r, t) => {
|
|
149
|
+
try {
|
|
150
|
+
const e = new URLSearchParams();
|
|
151
|
+
e.append("reg_mobile_number", r);
|
|
152
|
+
const s = await i(t.token, t.envName).post(D, e, {
|
|
153
|
+
headers: {
|
|
154
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return Promise.resolve(s?.data);
|
|
158
|
+
} catch (e) {
|
|
159
|
+
return console.log(e), Promise.reject(e);
|
|
160
|
+
}
|
|
161
|
+
}, $ = async (r, t, e) => {
|
|
162
|
+
try {
|
|
163
|
+
const s = new URLSearchParams();
|
|
164
|
+
s.append("reg_mobile_number", r), s.append("reg_mobile_otp", t);
|
|
165
|
+
const o = await i(e.token, e.envName).post(I, s, {
|
|
166
|
+
headers: {
|
|
167
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
return Promise.resolve(o?.data);
|
|
171
|
+
} catch (s) {
|
|
172
|
+
return console.log(s), Promise.reject(s);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
export {
|
|
176
|
+
w as A,
|
|
177
|
+
N as G,
|
|
178
|
+
T as U,
|
|
179
|
+
O as a,
|
|
180
|
+
S as b,
|
|
181
|
+
$ as c,
|
|
182
|
+
L as d,
|
|
183
|
+
G as e,
|
|
184
|
+
M as f,
|
|
185
|
+
j as g,
|
|
186
|
+
Y as h,
|
|
187
|
+
v as i,
|
|
188
|
+
U as j,
|
|
189
|
+
F as p,
|
|
190
|
+
b as u
|
|
191
|
+
};
|