hplx-feature-library 1.0.261 → 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.
Files changed (49) hide show
  1. package/dist/APIAction-CC17r7p0.cjs +1 -0
  2. package/dist/APIAction-DT2t98rl.js +191 -0
  3. package/dist/AllInvestigations/index.js +1 -1
  4. package/dist/{AllInvestigationsTable-BDLPOHjr.cjs → AllInvestigationsTable-Btilz6k7.cjs} +1 -1
  5. package/dist/{AllInvestigationsTable-Dg-YXASz.js → AllInvestigationsTable-DaTLqp8z.js} +2 -2
  6. package/dist/Attachments/index.js +1 -1
  7. package/dist/{Attachments-CEyxq22h.cjs → Attachments-DAq9xgoo.cjs} +2 -2
  8. package/dist/{Attachments-Dsb_1p7x.js → Attachments-rqdT5ZCi.js} +273 -277
  9. package/dist/NineDots/index.js +1 -1
  10. package/dist/{NineDots-CUXiXRmO.cjs → NineDots-BqJkRMwa.cjs} +1 -1
  11. package/dist/{NineDots-B3ZRumoi.js → NineDots-Di0ExA79.js} +1 -1
  12. package/dist/PatientAddEdit/components/VerifyOtpModal.d.ts +14 -0
  13. package/dist/PatientAddEdit/index.js +1 -1
  14. package/dist/{PatientAddEdit-OJOcJQ2m.js → PatientAddEdit-DujKaqWc.js} +750 -545
  15. package/dist/PatientAddEdit-_qlZg3dz.cjs +7 -0
  16. package/dist/PatientPopup/index.js +1 -1
  17. package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -3
  18. package/dist/{PatientPopupContainer-D4ip9SKW.js → PatientPopupContainer-A1RU4MWv.js} +23 -23
  19. package/dist/{PatientPopupContainer-Bgo9gldx.cjs → PatientPopupContainer-T_jhsgnM.cjs} +7 -7
  20. package/dist/PediatricsCalculator/index.js +1 -1
  21. package/dist/{PediatricsCalculatorTable-B4fTy1J5.cjs → PediatricsCalculatorTable-CV2TYaNw.cjs} +1 -1
  22. package/dist/{PediatricsCalculatorTable-G0ttbDpi.js → PediatricsCalculatorTable-DNrhACld.js} +2 -2
  23. package/dist/{PrintModal-Dq0Z1WeK.js → PrintModal-B656GT1T.js} +21 -23
  24. package/dist/{PrintModal-ClPSnO5C.cjs → PrintModal-DUOclH1A.cjs} +5 -5
  25. package/dist/SearchPatients/index.js +1 -1
  26. package/dist/{SearchPatients-C4Vnh3N8.cjs → SearchPatients-0ldEci6d.cjs} +1 -1
  27. package/dist/{SearchPatients-Db-rZQFH.js → SearchPatients-dk3g8cS2.js} +3 -3
  28. package/dist/UserProfile/index.js +1 -1
  29. package/dist/{UserProfile-V_7POQiQ.cjs → UserProfile-CmtfxoCm.cjs} +1 -1
  30. package/dist/{UserProfile-BxJOxt0y.js → UserProfile-Cx8clS5a.js} +4 -4
  31. package/dist/common/APIAction/APIAction.d.ts +2 -0
  32. package/dist/common/editRibbon/EditRibbon.d.ts +0 -1
  33. package/dist/{common-utils-DvF5Rjeq.js → common-utils-CV2JVzIc.js} +5 -5
  34. package/dist/{common-utils-BuL9g3zT.cjs → common-utils-PQ3dz_tV.cjs} +1 -1
  35. package/dist/{dayjs.min-DXp74Ozx.cjs → dayjs.min-e35R9Xl4.cjs} +1 -1
  36. package/dist/{dayjs.min-D52_GdfV.js → dayjs.min-gQLjWrOd.js} +1 -1
  37. package/dist/hplx-feature-library.css +1 -1
  38. package/dist/{index-DkA8S5IK.cjs → index-BrdW6iDR.cjs} +1 -1
  39. package/dist/{index-DQlbIHh3.cjs → index-CSBySGrm.cjs} +31 -31
  40. package/dist/{index-T1lUjzhG.js → index-DaR8OZ5T.js} +1 -1
  41. package/dist/{index-Bd0CDVpH.js → index-WgpmO6Qi.js} +1480 -1452
  42. package/dist/index.js +9 -9
  43. package/dist/print-pdf/index.js +1 -1
  44. package/dist/types/APIEndPoints.d.ts +3 -1
  45. package/dist/types/ApiResponseTypes.d.ts +6 -0
  46. package/package.json +1 -1
  47. package/dist/APIAction-DZ6jFXOq.cjs +0 -1
  48. package/dist/APIAction-VHoA7gHt.js +0 -161
  49. package/dist/PatientAddEdit-svjtGpiz.cjs +0 -7
@@ -1,14 +1,14 @@
1
- import { j as l, b as h, K as y, P as m, k as Q, a as Ql, e as Ze, Z as we, A as X, c as Xl, q as ea } from "./index-Bd0CDVpH.js";
1
+ import { j as l, b as h, K as C, w as pa, P as v, k as fe, a as ua, e as ml, Z as Le, A as ce, c as ma, q as xa } from "./index-WgpmO6Qi.js";
2
2
  /* empty css */
3
- import { M as la } from "./index-T1lUjzhG.js";
4
- import { useState as n, useRef as Y, useCallback as q, useEffect as k, useMemo as aa } from "react";
5
- import { c as Ke } from "./index.esm-Bn1Rklqj.js";
6
- import { d as ee } from "./dayjs.min-D52_GdfV.js";
7
- import { a as ae, i as ta, d as ra, c as sa, p as na, e as oa, f as Qe, g as Xe, v as el, j as ll, E as je, k as ia, l as al } from "./common-utils-DvF5Rjeq.js";
8
- import { H as ha, D as Ce, M as Ne, b as le, S as da, C as Pe, O as De } from "./CommonConstant-Bj7SvPfU.js";
9
- import { a as fa, b as ca, c as pa, d as ua, u as ma, g as ga, e as xa, f as _a } from "./APIAction-VHoA7gHt.js";
10
- const tl = () => /* @__PURE__ */ l.jsx("div", { className: "hfl-h-0 hfl-w-full hfl-border-1 hfl-border-Gray-200" }), ba = ({ conflicts: M, handleAddPatient: v, redirectAction: T }) => {
11
- const [N, L] = n(!1);
3
+ import { M as Nl } from "./index-DaR8OZ5T.js";
4
+ import { useState as n, useEffect as M, useRef as re, useCallback as x, useMemo as xl } from "react";
5
+ import { c as gl } from "./index.esm-Bn1Rklqj.js";
6
+ import { d as pe } from "./dayjs.min-gQLjWrOd.js";
7
+ import { a as me, i as ga, d as _a, c as ba, p as ya, e as va, f as ja, j as _l, k as bl, g as yl, v as vl, l as jl, E as Fe } from "./common-utils-CV2JVzIc.js";
8
+ import { H as wa, D as Ge, M as Ie, b as ue, S as Ca, C as ze, O as He } from "./CommonConstant-Bj7SvPfU.js";
9
+ import { a as Na, b as Pa, p as Sa, c as Da, d as Ea, e as Ta, f as Ba, h as Oa, u as Ra, g as Aa } from "./APIAction-DT2t98rl.js";
10
+ const wl = () => /* @__PURE__ */ l.jsx("div", { className: "hfl-h-0 hfl-w-full hfl-border-1 hfl-border-Gray-200" }), ka = ({ conflicts: N, handleAddPatient: _, redirectAction: I }) => {
11
+ const [S, y] = n(!1);
12
12
  return /* @__PURE__ */ l.jsxs("div", { children: [
13
13
  /* @__PURE__ */ l.jsx("div", { className: "hfl-mx-[20%] hfl-my-5 hfl-text-center", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: "hfl-text-Error-700", children: "Patient/s with similar information already exists in your Clinic. To continue with an existing patient click on “Continue." }) }),
14
14
  /* @__PURE__ */ l.jsxs("table", { className: "hfl-mx-7", children: [
@@ -55,25 +55,25 @@ const tl = () => /* @__PURE__ */ l.jsx("div", { className: "hfl-h-0 hfl-w-full h
55
55
  }
56
56
  )
57
57
  ] }) }),
58
- M.map((o, p) => /* @__PURE__ */ l.jsxs("tr", { className: "hfl-w-full hfl-border-1 hfl-border-Gray-100", children: [
59
- /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-800", children: p + 1 }) }),
60
- /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-800", children: o.org_person_name || o.name }) }),
61
- /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-500", children: o.org_person_phone || o.phone }) }),
62
- /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-500", children: o.org_person_email || o.email }) }),
58
+ N.map((i, f) => /* @__PURE__ */ l.jsxs("tr", { className: "hfl-w-full hfl-border-1 hfl-border-Gray-100", children: [
59
+ /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-800", children: f + 1 }) }),
60
+ /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-800", children: i.org_person_name || i.name }) }),
61
+ /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-500", children: i.org_person_phone || i.phone }) }),
62
+ /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-500", children: i.org_person_email || i.email }) }),
63
63
  /* @__PURE__ */ l.jsx("td", { className: "hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: " hfl-flex hfl-items-center hfl-text-Gray-500", children: "In Same Branch" }) }),
64
64
  /* @__PURE__ */ l.jsx(
65
65
  "td",
66
66
  {
67
67
  className: "hfl-flex hfl-items-center hfl-justify-center hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",
68
68
  children: window.role_id == "11" && /* @__PURE__ */ l.jsx(
69
- y,
69
+ C,
70
70
  {
71
71
  hierarchy: "Secondary",
72
72
  size: "sm",
73
73
  textField: "Continue",
74
74
  className: "hfl-text-Primary-700",
75
75
  onClick: async () => {
76
- window.location.href.includes("/frontdesk") ? window.location.href = window.origin + "/md/viewPatientDashboard.php?pid=" + o?.person_role_id?.toString() : ae(`viewPatientDashboard.php?pid=${o.person_role_id}`);
76
+ window.location.href.includes("/frontdesk") ? window.location.href = window.origin + "/md/viewPatientDashboard.php?pid=" + i?.person_role_id?.toString() : me(`viewPatientDashboard.php?pid=${i.person_role_id}`);
77
77
  }
78
78
  }
79
79
  )
@@ -83,68 +83,165 @@ const tl = () => /* @__PURE__ */ l.jsx("div", { className: "hfl-h-0 hfl-w-full h
83
83
  ] }),
84
84
  /* @__PURE__ */ l.jsx("div", { className: "hfl-my-7 hfl-flex hfl-items-center hfl-justify-center", children: /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: "hfl-text-Success-800", children: "If your patient is not in the above list" }) }),
85
85
  /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-justify-center", children: /* @__PURE__ */ l.jsx(
86
- y,
86
+ C,
87
87
  {
88
- disabled: N,
88
+ disabled: S,
89
89
  hierarchy: "Primary",
90
90
  size: "xl",
91
91
  textField: "Create As New Patient",
92
92
  className: "hfl-bg-Primary-700",
93
93
  onClick: () => {
94
- L(!0), v(!0, T);
94
+ y(!0), _(!0, I);
95
95
  }
96
96
  }
97
97
  ) })
98
98
  ] });
99
99
  };
100
- function ya(M) {
101
- const { editPatient: v, setEditPatient: T, createAsNew: N, setCreateAsNew: L } = M, o = () => v ? "Primary" : "Secondary", p = () => N ? "Primary" : "Secondary";
100
+ function Ma(N) {
101
+ const { editPatient: _, setEditPatient: I, createAsNew: S, setCreateAsNew: y } = N, i = () => _ ? "Primary" : "Secondary", f = () => S ? "Primary" : "Secondary";
102
102
  return /* @__PURE__ */ l.jsxs("div", { className: "hfl-mt-6 hfl-flex hfl-h-20 hfl-w-full hfl-items-center hfl-justify-center hfl-gap-4 hfl-border-1 hfl-border-Error-200 hfl-bg-Error-25", children: [
103
103
  /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text md", className: "hfl-text-Error-700", children: "Are you updating" }),
104
104
  /* @__PURE__ */ l.jsx(
105
- y,
105
+ C,
106
106
  {
107
- hierarchy: o(),
107
+ hierarchy: i(),
108
108
  size: "lg",
109
109
  textField: "Exisitng Patient",
110
110
  onClick: () => {
111
- T(!0), L(!1);
111
+ I(!0), y(!1);
112
112
  }
113
113
  }
114
114
  ),
115
115
  /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text md", className: "hfl-text-Error-700", children: "or creating a" }),
116
116
  /* @__PURE__ */ l.jsx(
117
- y,
117
+ C,
118
118
  {
119
- hierarchy: p(),
119
+ hierarchy: f(),
120
120
  size: "lg",
121
121
  textField: "New Patient",
122
122
  onClick: () => {
123
- L(!0), T(!1);
123
+ y(!0), I(!1);
124
124
  }
125
125
  }
126
126
  )
127
127
  ] });
128
128
  }
129
- const Ba = (M) => {
130
- const { closeModal: v, modalIsOpen: T, pref: N, variable: L } = M, { window_var: o, token: p, envName: b } = L, [te, rl] = n(!1), [A, sl] = n({}), [O, nl] = n(!1), [ol, re] = n(""), [il, hl] = n(!1), [Se, dl] = n(!1), [fl, cl] = n([]), [Ee, R] = n(!1), [P, U] = n(""), [g, pl] = n(), [u, c] = n({
129
+ const Ve = 15, Cl = 3, La = ({
130
+ isOpen: N,
131
+ onClose: _,
132
+ onSubmit: I,
133
+ otpErrorMsg: S,
134
+ setOtpErrorMsg: y,
135
+ optHeading: i,
136
+ otpSubHeading: f,
137
+ veriftButtonTitle: m,
138
+ resendOtp: Q
139
+ }) => {
140
+ const [W, D] = n(""), [z, u] = n(Ve), [se, H] = n(!1), [V, J] = n(0);
141
+ M(() => {
142
+ N && (D(""), y(""), u(Ve), H(!1), J(0));
143
+ }, [N, y]), M(() => {
144
+ if (z > 0 && N) {
145
+ const L = setInterval(() => {
146
+ u((Z) => Z - 1);
147
+ }, 1e3);
148
+ return () => clearInterval(L);
149
+ } else z === 0 && N && H(!0);
150
+ }, [z, N]);
151
+ const xe = (L) => {
152
+ L.preventDefault(), String(W).length === 6 && I(W);
153
+ }, ge = (L) => {
154
+ S && y("");
155
+ const Z = L.target.value;
156
+ /^\d*$/.test(Z) && D(Z);
157
+ }, _e = () => {
158
+ se && V < Cl && (Q(), J((L) => L + 1), u(Ve), H(!1));
159
+ };
160
+ return /* @__PURE__ */ l.jsxs(
161
+ Nl,
162
+ {
163
+ isOpen: N,
164
+ onRequestClose: _,
165
+ style: {
166
+ overlay: {
167
+ backgroundColor: "rgba(52, 64, 84, 0.5)",
168
+ zIndex: 1032
169
+ },
170
+ content: {
171
+ maxWidth: "400px",
172
+ maxHeight: "350px",
173
+ display: "flex",
174
+ flexDirection: "column",
175
+ justifyContent: "center",
176
+ padding: "24px",
177
+ margin: "auto",
178
+ borderRadius: "12px"
179
+ }
180
+ },
181
+ ariaHideApp: !1,
182
+ children: [
183
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-items-end hfl-justify-end", children: /* @__PURE__ */ l.jsx(C, { hierarchy: "Tertiary-Grey", icon: "Only", iconFile: "hx_close", onClick: _, size: "md", textField: "" }) }),
184
+ /* @__PURE__ */ l.jsxs(
185
+ "form",
186
+ {
187
+ className: "hfl-z-5 hfl-relative hfl-flex hfl-h-full hfl-flex-col hfl-items-center hfl-justify-center hfl-text-center",
188
+ onSubmit: xe,
189
+ children: [
190
+ /* @__PURE__ */ l.jsx(h, { variant: "Semibold", type: "Text lg", children: i }),
191
+ /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text sm", className: "hfl-mx-auto hfl-w-[290px] hfl-pt-2 hfl-text-Gray-500", children: f }),
192
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-mx-auto hfl-max-h-[150px] hfl-w-[315px] hfl-py-5", children: /* @__PURE__ */ l.jsx(
193
+ pa,
194
+ {
195
+ inputProps: {
196
+ autoFocus: !0,
197
+ value: W,
198
+ pattern: "[0-9]+",
199
+ onChange: ge
200
+ },
201
+ size: "xs",
202
+ digits: 6,
203
+ errorMsg: S
204
+ }
205
+ ) }),
206
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-mb-4 hfl-h-4", children: V >= Cl ? /* @__PURE__ */ l.jsx(h, { type: "Text sm", variant: "Regular", className: "hfl-text-Error-500", children: "Maximum resend attempts reached." }) : se ? /* @__PURE__ */ l.jsx(
207
+ h,
208
+ {
209
+ variant: "Semibold",
210
+ type: "Text sm",
211
+ className: "hfl-cursor-pointer hfl-text-Primary-700 hfl-underline",
212
+ onClick: _e,
213
+ children: "Resend OTP"
214
+ }
215
+ ) : /* @__PURE__ */ l.jsxs(h, { type: "Text sm", variant: "Regular", className: "hfl-text-Gray-500", children: [
216
+ "Resend OTP in 00:",
217
+ z < 10 ? `0${z}` : z
218
+ ] }) }),
219
+ /* @__PURE__ */ l.jsx(C, { hierarchy: "Primary", size: "lg", textField: m, disabled: String(W).length < 6 })
220
+ ]
221
+ }
222
+ )
223
+ ]
224
+ }
225
+ );
226
+ }, Ua = (N) => {
227
+ const { closeModal: _, modalIsOpen: I, pref: S, variable: y } = N, { window_var: i, token: f, envName: m } = y, [Q, W] = n(!1), [D, z] = n({}), [u, se] = n(!1), [H, V] = n(null), [J, xe] = n(!0), [ge, _e] = n(!1), [L, Z] = n([]), [qe, K] = n(!1), [E, ne] = n(""), [g, Pl] = n(), [b, p] = n({
131
228
  name: "",
132
229
  phone: "",
133
230
  age: "",
134
231
  gender: "",
135
232
  email: "",
136
233
  aadhar_number: ""
137
- }), [W, ul] = n([]), [$, D] = n({
234
+ }), [ie, Sl] = n([]), [oe, q] = n({
138
235
  name: !1,
139
236
  phone: !1
140
- }), [se, ml] = n([]), [ne, gl] = n([]), [oe, xl] = n([]), [_l, ie] = n(!1), [bl, he] = n(!1), [yl, de] = n(!1), [fe, vl] = n([]), [t, j] = n({
237
+ }), [be, Dl] = n([]), [ye, El] = n([]), [ve, Tl] = n([]), [Bl, je] = n(!1), [Ol, we] = n(!1), [Rl, Ce] = n(!1), [Ne, Al] = n([]), [A, kl] = n(!1), [a, F] = n({
141
238
  name: "",
142
239
  phone: "",
143
240
  dob: "",
144
241
  gender: "",
145
242
  //(0 for male, 1 for female, 2 for others),
146
243
  honorific: "",
147
- patient_preferred_language: N?.visit_pad_json ? JSON.parse(N?.visit_pad_json)?.defaultLanguage?.rows : "",
244
+ patient_preferred_language: S?.visit_pad_json ? JSON.parse(S?.visit_pad_json)?.defaultLanguage?.rows : "",
148
245
  age: "",
149
246
  age_selector: "years",
150
247
  // 2 for years, 3 for months, 4 for weeks and 5 for days
@@ -174,147 +271,158 @@ const Ba = (M) => {
174
271
  org_person_dob: "",
175
272
  aadhar_number: "",
176
273
  custom_fields: []
177
- }), [wl, jl] = n([]), { name: Be, phone: G, age: w, dob: F, gender: Cl } = t, [ke, Te] = n(!1), [Nl, ce] = n(t.gender), [S, Le] = n("Years"), [Ae, Re] = n(""), [Me, pe] = n(!1), [Pl, Dl] = n([]), E = (e, a, r, s) => {
178
- Dl([
274
+ }), [Ml, Ll] = n([]), { name: Ye, phone: k, age: T, dob: G, gender: $e } = a, [Ue, We] = n(!1), [Fl, Pe] = n(a.gender), [B, Je] = n("Years"), [Ze, Ke] = n(""), [Xe, Se] = n(!1), [Gl, Il] = n([]), P = (e, t, r, s) => {
275
+ Il([
179
276
  {
180
277
  id: 1,
181
278
  title: e,
182
- description: a,
279
+ description: t,
183
280
  type: r,
184
281
  duration: s
185
282
  }
186
283
  ]);
187
- }, B = Y(null), Oe = Y(null), [Ge, I] = n(!1), [Fe, J] = n(!1), [Sl, Ie] = n(!1), [El, ue] = n(!1), [ze, Bl] = n(), C = g && g.visit_pad_json && ta(g.visit_pad_json) && JSON.parse(g.visit_pad_json), He = ra((...e) => {
188
- const [a, r] = e;
189
- Il(a, r);
190
- }), i = q(
191
- (e, a) => {
192
- J(!1), j((r) => ({ ...r, [e]: a })), (e === "name" || e === "phone" && a.length >= 3) && He(e, a);
284
+ }, $ = re(null), Qe = re(null), [el, ee] = n(!1), [zl, De] = n(!1), [Hl, ll] = n(!1), [al, Ee] = n(!1), [tl, Te] = n(!1), [he, Vl] = n(), O = g && g.visit_pad_json && ga(g.visit_pad_json) && JSON.parse(g.visit_pad_json), rl = _a((...e) => {
285
+ const [t, r] = e;
286
+ Ql(t, r);
287
+ }), o = x(
288
+ (e, t) => {
289
+ De(!1), F((r) => ({ ...r, [e]: t })), (e === "name" || e === "phone" && t.length >= 3) && rl(e, t);
193
290
  },
194
- [He]
195
- ), kl = (e) => {
196
- i("throughChannel", e.value.trim()), ie(!1);
197
- }, Tl = (e) => {
198
- i("occupation", e.trim()), he(!1);
199
- }, Ll = (e) => {
200
- i("city", e.trim()), de(!1);
201
- }, Al = (e) => {
202
- const { value: a } = e.target, r = Ol(a);
203
- ml(r);
204
- }, Rl = (e) => {
205
- const { value: a } = e.target, r = Gl(a);
206
- gl(r);
207
- }, Ml = (e) => {
208
- const { value: a } = e.target, r = Fl(a);
209
- vl(r);
210
- }, Ol = (e) => {
211
- if (oe?.length) {
212
- let a = oe;
213
- return e?.length && (a = oe.filter(
291
+ [rl]
292
+ ), ql = (e) => {
293
+ o("throughChannel", e.value.trim()), je(!1);
294
+ }, R = xl(
295
+ () => he?.branch_details?.enable_mobile_otp == "1",
296
+ [he?.branch_details?.enable_mobile_otp]
297
+ ), Yl = (e) => {
298
+ o("occupation", e.trim()), we(!1);
299
+ }, $l = (e) => {
300
+ o("city", e.trim()), Ce(!1);
301
+ }, Ul = (e) => {
302
+ const { value: t } = e.target, r = Zl(t);
303
+ Dl(r);
304
+ }, Wl = (e) => {
305
+ const { value: t } = e.target, r = Kl(t);
306
+ El(r);
307
+ }, Jl = (e) => {
308
+ const { value: t } = e.target, r = Xl(t);
309
+ Al(r);
310
+ }, Zl = (e) => {
311
+ if (ve?.length) {
312
+ let t = ve;
313
+ return e?.length && (t = ve.filter(
214
314
  (r) => r.title.toLowerCase().includes(e.toLowerCase())
215
315
  // last keyboad input after ,
216
- )), a;
316
+ )), t;
217
317
  } else
218
318
  return [];
219
- }, Gl = (e) => {
220
- if (De?.length) {
221
- let a = De;
222
- return e?.length && (a = De.filter(
319
+ }, Kl = (e) => {
320
+ if (He?.length) {
321
+ let t = He;
322
+ return e?.length && (t = He.filter(
223
323
  (r) => r.toLowerCase().includes(e.toLowerCase())
224
324
  // last keyboad input after ,
225
- )), a;
325
+ )), t;
226
326
  } else
227
327
  return [];
228
- }, Fl = (e) => {
229
- if (Pe?.length) {
230
- let a = Pe;
231
- return e?.length && (a = Pe.filter(
328
+ }, Xl = (e) => {
329
+ if (ze?.length) {
330
+ let t = ze;
331
+ return e?.length && (t = ze.filter(
232
332
  (r) => r.toLowerCase().includes(e.toLowerCase())
233
333
  // last keyboad input after ,
234
- )), a;
334
+ )), t;
235
335
  } else
236
336
  return [];
237
- }, Ve = Y(null), Z = Y(null), me = Y(null), Ye = window.location?.pathname.includes("/frontdesk");
238
- k(() => {
239
- const e = sa(t.age, S);
240
- e && j((a) => ({
241
- ...a,
337
+ }, sl = re(null), de = re(null), Be = re(null), nl = window.location?.pathname.includes("/frontdesk");
338
+ M(() => {
339
+ const e = ba(a.age, B);
340
+ e && F((t) => ({
341
+ ...t,
242
342
  dob: e
243
343
  }));
244
- }, [S, t.age]);
245
- const ge = q(
344
+ }, [B, a.age]);
345
+ const Oe = x(
246
346
  (e) => {
247
- ce(e), i("gender", e), c((a) => ({
248
- ...a,
347
+ Pe(e), o("gender", e), p((t) => ({
348
+ ...t,
249
349
  gender: ""
250
350
  }));
251
351
  },
252
- [i]
253
- ), qe = (e) => {
254
- (Ve.current && !Ve.current.contains(e.target) || Z.current && !Z.current.contains(e.target)) && D({ name: !1, phone: !1 }), me.current && !me.current.contains(e.target) && pe(!1);
255
- }, Ue = q(() => {
256
- U(t.image_link), R(!1), I(!1);
257
- }, [t.image_link]), We = q(async () => {
258
- const e = await fa(
352
+ [o]
353
+ ), il = (e) => {
354
+ (sl.current && !sl.current.contains(e.target) || de.current && !de.current.contains(e.target)) && q({ name: !1, phone: !1 }), Be.current && !Be.current.contains(e.target) && Se(!1);
355
+ }, ol = x(() => {
356
+ ne(a.image_link), K(!1), ee(!1);
357
+ }, [a.image_link]), hl = x(async () => {
358
+ const e = await Na(
259
359
  "patient_config",
260
- o?.org_branch_id_for_seg?.toString() || "",
261
- { token: p, envName: b }
360
+ i?.org_branch_id_for_seg?.toString() || "",
361
+ { token: f, envName: m }
262
362
  );
263
- Bl(e);
264
- }, [p, b, o?.org_branch_id_for_seg]);
265
- k(() => (document.addEventListener("mousedown", qe), () => {
266
- document.removeEventListener("mousedown", qe);
267
- }), []), k(() => {
268
- o.doctor_speciality === "Gynaecologist" && !t.gender && ge("1");
269
- }, [t.gender, ge, o.doctor_speciality]), k(() => {
270
- t.image_link && Ue(), t.honorific && Re(t.honorific);
271
- }, [t.honorific, t.image_link, Ue]), k(() => {
272
- Ye && Te(!0);
273
- }, [Ye]), k(() => {
274
- We();
275
- }, [We]), k(() => {
363
+ Vl(e);
364
+ }, [f, m, i?.org_branch_id_for_seg]);
365
+ M(() => (document.addEventListener("mousedown", il), () => {
366
+ document.removeEventListener("mousedown", il);
367
+ }), []), M(() => {
368
+ i.doctor_speciality === "Gynaecologist" && !a.gender && Oe("1");
369
+ }, [a.gender, Oe, i.doctor_speciality]), M(() => {
370
+ a.image_link && ol(), a.honorific && Ke(a.honorific);
371
+ }, [a.honorific, a.image_link, ol]), M(() => {
372
+ nl && We(!0);
373
+ }, [nl]), M(() => {
374
+ hl();
375
+ }, [hl]), M(() => {
276
376
  (async () => {
277
- pl(N);
377
+ Pl(S);
278
378
  try {
279
- const e = await ca({ token: p, envName: b }), { total_ref_doc_details: a, through_channel: r } = e;
280
- a.length && jl(na(a)), r.length && xl(oa(r));
379
+ const e = await Pa({ token: f, envName: m }), { total_ref_doc_details: t, through_channel: r } = e;
380
+ t.length && Ll(ya(t)), r.length && Tl(va(r));
281
381
  } catch (e) {
282
382
  console.log("ERROR", e);
283
383
  }
284
384
  })();
285
- }, [N, p, b]);
286
- const Il = async (e, a) => {
385
+ }, [S, f, m]);
386
+ const Ql = async (e, t) => {
287
387
  const r = {
288
- branch_id: o?.org_branch_id_for_seg || "",
289
- doctor_id: o?.person_id_for_seg || "",
290
- doctor_role_id: o?.doctor_role_id_for_seg || "",
291
- term: encodeURIComponent(a),
388
+ branch_id: i?.org_branch_id_for_seg || "",
389
+ doctor_id: i?.person_id_for_seg || "",
390
+ doctor_role_id: i?.doctor_role_id_for_seg || "",
391
+ term: encodeURIComponent(t),
292
392
  limit: 30
293
- }, s = await ga(r, { token: p, envName: b });
393
+ }, s = await Aa(r, { token: f, envName: m });
294
394
  if (!s) {
295
- D({ name: !1, phone: !1 });
395
+ q({ name: !1, phone: !1 });
296
396
  return;
297
397
  }
298
- !s.apiError && Number(s.total_persons) > 0 ? (ul(s.persons), D(e === "name" ? { ...$, name: !0 } : { ...$, phone: !0 })) : D({ name: !1, phone: !1 });
299
- }, xe = (e) => {
398
+ !s.apiError && Number(s.total_persons) > 0 ? (Sl(s.persons), q(e === "name" ? { ...oe, name: !0 } : { ...oe, phone: !0 })) : q({ name: !1, phone: !1 });
399
+ }, U = x(async () => {
400
+ if (!R || !J) return;
401
+ Te(!0), (await Sa(k, y)).apiError ? P("OTP Failed", "Unable to send OTP. Please try again.", "Error", 3e3) : P("Success", "OTP sent successfully", "Success", 1500);
402
+ }, [R, J, k, y]), ea = x(
403
+ async (e) => {
404
+ (await Da(k, e, y)).apiError ? P("Invalid OTP", "Please enter correct OTP", "Error", 3e3) : (kl(!0), P("Success", "OTP verified successfully", "Success", 1500), Te(!1));
405
+ },
406
+ [k, y]
407
+ ), Re = (e) => {
300
408
  switch (e) {
301
409
  case "Appointment":
302
410
  return "#Appnt";
303
411
  default:
304
412
  return "";
305
413
  }
306
- }, _e = (e) => {
414
+ }, Ae = (e) => {
307
415
  switch (e) {
308
416
  case "Bill":
309
417
  case "Appointment":
310
418
  return "emrPatientPopUp.php?pid=";
311
419
  default:
312
- return je.visitpad + "?pid=";
420
+ return Fe.visitpad + "?pid=";
313
421
  }
314
- }, zl = q(
422
+ }, la = x(
315
423
  (e) => {
316
- pa({ callback: (r) => {
317
- j({
424
+ Ea({ callback: (r) => {
425
+ F({
318
426
  name: r?.name || "",
319
427
  phone: r?.phone_number || "",
320
428
  gender: r?.gender || "",
@@ -349,302 +457,391 @@ const Ba = (M) => {
349
457
  spouse_name: r.spouse_name || "",
350
458
  aadhar_number: r.aadhar_number || "",
351
459
  custom_fields: r.custom_fields || []
352
- }), ce(r?.gender);
353
- }, payload: e, token_env: { token: p, envName: b } });
460
+ }), Pe(r?.gender);
461
+ }, payload: e, token_env: { token: f, envName: m } });
354
462
  },
355
- [b, p]
356
- ), $e = async (e) => {
357
- Ie(!0);
358
- const a = {
359
- branch_id: o?.org_branch_id_for_seg?.toString() || "",
360
- person_id: o?.person_id_for_seg || "",
361
- person_role_id: o?.doctor_role_id_for_seg || "",
463
+ [m, f]
464
+ ), X = x(
465
+ (e = "") => {
466
+ const t = e?.toLowerCase();
467
+ return G !== "" ? "" : T !== "" && Number(T) < 0 && G === "" ? "Invalid Age" : t === "weeks" && T !== "" && Number(T) < 5907 || t === "days" && T !== "" && Number(T) < 9999 || t === "months" && T !== "" && Number(T) < 1358 || t === "years" && T !== "" && Number(T) < 114 ? "" : "Invalid Age";
468
+ },
469
+ [G, T]
470
+ ), dl = async (e) => {
471
+ ll(!0);
472
+ const t = {
473
+ branch_id: i?.org_branch_id_for_seg?.toString() || "",
474
+ person_id: i?.person_id_for_seg || "",
475
+ person_role_id: i?.doctor_role_id_for_seg || "",
362
476
  patient_role_id: e.person_role_id || ""
363
477
  };
364
- zl(a), D({ name: !1, phone: !1 }), dl(!0), sl(e);
365
- }, Hl = () => {
478
+ la(t), q({ name: !1, phone: !1 }), _e(!0), z(e);
479
+ }, fl = x(() => {
366
480
  let e = !0;
367
- return t.name ? t.name.length < 2 && (c((a) => ({
368
- ...a,
481
+ return a.name ? a.name.length < 2 && (p((t) => ({
482
+ ...t,
369
483
  name: "Enter at least 2 letters "
370
- })), e = !1) : (c((a) => ({
371
- ...a,
484
+ })), e = !1) : (p((t) => ({
485
+ ...t,
372
486
  name: "Enter the Name of the Patient"
373
- })), e = !1), (g && g.phone_number_length && t.phone.length != 10 || t.phone.length && t.phone.length != 10) && (c((a) => ({
374
- ...a,
487
+ })), e = !1), (g && g.phone_number_length && a.phone.length !== 10 || a.phone.length && a.phone.length !== 10) && (p((t) => ({
488
+ ...t,
375
489
  phone: "Please enter 10 digit number"
376
- })), e = !1), t.aadhar_number && t.aadhar_number.length != 12 && (c((a) => ({
377
- ...a,
490
+ })), e = !1), a.aadhar_number && a.aadhar_number.length != 12 && (p((t) => ({
491
+ ...t,
378
492
  aadhar_number: "Please enter 12 digit aadhar number"
379
- })), e = !1), z(S).length && F?.length === 0 && (c((a) => ({
380
- ...a,
493
+ })), e = !1), X(B).length && G?.length === 0 && (p((t) => ({
494
+ ...t,
381
495
  age: "Invalid Age."
382
- })), e = !1), Cl === "" && (c((a) => ({
383
- ...a,
496
+ })), e = !1), $e === "" && (p((t) => ({
497
+ ...t,
384
498
  gender: "Select Gender"
385
- })), e = !1), u.email.length && (t.email && !Ke().email().isValidSync(t.email) && c((a) => ({
386
- ...a,
499
+ })), e = !1), b.email.length && (a.email && !gl().email().isValidSync(a.email) && p((t) => ({
500
+ ...t,
387
501
  email: "Email format is wrong"
388
502
  })), e = !1), e;
389
- }, K = async (e, a) => {
390
- try {
391
- if (!Hl()) {
392
- E("Invalid form", "Please fill in the required fields", "Error", 3e3);
393
- return;
394
- }
395
- const s = new FormData();
396
- s.append("name", t.name), s.append("phone", t.phone), s.append("gender", ia(t.gender)), s.append("honorific", t.honorific), s.append("patient_preferred_language", t.patient_preferred_language), s.append("age", F && F.length ? F : al(t?.age, S) || ""), s.append("age_selector", t.age_selector), s.append("blood_group", t.blood_group), s.append("email", t.email), s.append("address", t.address), s.append("city", t.city), s.append("existing_bid_str", t.existingBidStr), s.append("pincode", t.pincode), s.append("ref_doc_id", t.refDocId), s.append("ref_doc_name", t.ref_doc_name), s.append("ref_doc_spec", t.ref_doc_spec), s.append("through_channel", t.throughChannel), s.append("care_of", t.careOf), s.append("phone_secondary", t.phoneSecondary), s.append("occupation", t.occupation), s.append("tag", t.tag), s.append("marital_status", t.marital_status), s.append("married_since", t.married_since), s.append("spouse_name", t.spouse_name), s.append("spouse_blood_group", t.spouse_blood_group), s.append("aadhar_number", t.aadhar_number), s.append("custom_fields", JSON.stringify(t.custom_fields || [])), e && s.append("reg_as_new", "1");
397
- const f = Object.fromEntries(s.entries()), x = Object.fromEntries(
398
- Object.entries(f).map(([V, Kl]) => [V, String(Kl)])
399
- ), _ = {
400
- ...x,
401
- custom_fields: JSON.parse(x.custom_fields || "[]"),
402
- doctor_role_id: o.doctor_role_id_for_seg || "",
403
- doctor_id: o.person_id_for_seg || "",
404
- org_branch_id: o.org_branch_id_for_seg || "",
405
- source: "emr",
406
- ip: ""
407
- }, d = await ua(_, { token: p, envName: b });
408
- if (d.apiError)
409
- E("Error", d.apiError, "Error", 3e3), J(!1);
410
- else {
411
- if (e) {
412
- try {
413
- P && await be(d.person_role_id.toString(), d.org_person_bid_str.toString());
414
- } catch (V) {
415
- console.log(V);
503
+ }, [
504
+ a.name,
505
+ a.phone.length,
506
+ a.aadhar_number,
507
+ a.email,
508
+ g,
509
+ X,
510
+ B,
511
+ G?.length,
512
+ $e,
513
+ b.email.length
514
+ ]), le = x(
515
+ async (e, t) => {
516
+ const r = new FormData();
517
+ r.append("pid", e), r.append("bidstr", t), r.append("imgData", E);
518
+ const s = await Ta(r, { token: f, envName: m });
519
+ s.apiError && P("Error", s.apiError, "Error", 3e3);
520
+ },
521
+ [E, m, f]
522
+ ), cl = x(
523
+ async (e) => {
524
+ const t = new FormData();
525
+ t.append("pid", e);
526
+ const r = await Ba(t, { token: f, envName: m });
527
+ r.apiError && P("Error", r.apiError, "Error", 3e3);
528
+ },
529
+ [m, f]
530
+ ), ke = x(
531
+ async (e, t) => {
532
+ try {
533
+ if (!fl()) {
534
+ P("Invalid form", "Please fill in the required fields", "Error", 3e3);
535
+ return;
536
+ }
537
+ if (R && !A && !u) {
538
+ P("Consent Required", "Please provide patient consent.", "Error", 3e3);
539
+ return;
540
+ }
541
+ const s = new FormData();
542
+ s.append("name", a.name), s.append("phone", a.phone), s.append("gender", ja(a.gender)), s.append("honorific", a.honorific), s.append("patient_preferred_language", a.patient_preferred_language), s.append("age", G && G.length ? G : _l(a?.age, B) || ""), s.append("age_selector", a.age_selector), s.append("blood_group", a.blood_group), s.append("email", a.email), s.append("address", a.address), s.append("city", a.city), s.append("existing_bid_str", a.existingBidStr), s.append("pincode", a.pincode), s.append("ref_doc_id", a.refDocId), s.append("ref_doc_name", a.ref_doc_name), s.append("ref_doc_spec", a.ref_doc_spec), s.append("through_channel", a.throughChannel), s.append("care_of", a.careOf), s.append("phone_secondary", a.phoneSecondary), s.append("occupation", a.occupation), s.append("tag", a.tag), s.append("marital_status", a.marital_status), s.append("married_since", a.married_since), s.append("spouse_name", a.spouse_name), s.append("spouse_blood_group", a.spouse_blood_group), s.append("aadhar_number", a.aadhar_number), s.append("custom_fields", JSON.stringify(a.custom_fields || [])), e && s.append("reg_as_new", "1");
543
+ const c = Object.fromEntries(s.entries()), j = Object.fromEntries(
544
+ Object.entries(c).map(([te, ca]) => [te, String(ca)])
545
+ ), w = {
546
+ ...j,
547
+ custom_fields: JSON.parse(j.custom_fields || "[]"),
548
+ doctor_role_id: i.doctor_role_id_for_seg || "",
549
+ doctor_id: i.person_id_for_seg || "",
550
+ org_branch_id: i.org_branch_id_for_seg || "",
551
+ source: "emr",
552
+ ip: ""
553
+ }, d = await Oa(w, { token: f, envName: m });
554
+ if (d.apiError)
555
+ P("Error", d.apiError, "Error", 3e3), De(!1);
556
+ else {
557
+ if (e) {
558
+ try {
559
+ E && await le(d.person_role_id.toString(), d.org_person_bid_str.toString());
560
+ } catch (te) {
561
+ console.log(te);
562
+ }
563
+ t !== "Rx" && O && O?.mode_of_patient_popup?.include == "1" && typeof i.patientPopupHandler < "u" ? i.patientPopupHandler(
564
+ "addpatient",
565
+ d.person_role_id.toString(),
566
+ d.person_id.toString(),
567
+ g,
568
+ O,
569
+ t
570
+ ) : me(Ae(t) + d.person_role_id.toString() + Re(t)), _();
571
+ return;
572
+ } else {
573
+ try {
574
+ E && await le(d.person_role_id.toString(), d.org_person_bid_str.toString());
575
+ } catch (te) {
576
+ console.log(te);
577
+ }
578
+ ae();
416
579
  }
417
- a !== "Rx" && C && C?.mode_of_patient_popup?.include == "1" && typeof o.patientPopupHandler < "u" ? o.patientPopupHandler(
580
+ d?.conflicts?.length > 0 ? (W(!0), Z(d.conflicts)) : _(), Array.isArray(d?.person) || P("Success", "Patient Added Successfully", "Success", 3e3), d != null && !d?.conflicts?.length && d?.person_role_id && (t !== "Rx" && O && O?.mode_of_patient_popup?.include == "1" && typeof i.patientPopupHandler < "u" ? i.patientPopupHandler(
418
581
  "addpatient",
419
582
  d.person_role_id.toString(),
420
583
  d.person_id.toString(),
421
584
  g,
422
- C,
423
- a
424
- ) : ae(_e(a) + d.person_role_id.toString() + xe(a)), v();
425
- return;
426
- } else {
427
- try {
428
- P && await be(d.person_role_id.toString(), d.org_person_bid_str.toString());
429
- } catch (V) {
430
- console.log(V);
431
- }
432
- H();
585
+ O,
586
+ t
587
+ ) : me(Ae(t) + d.person_role_id.toString() + Re(t)), _());
433
588
  }
434
- d?.conflicts?.length > 0 ? (rl(!0), cl(d.conflicts)) : v(), Array.isArray(d?.person) || E("Success", "Patient Added Successfully", "Success", 3e3), d != null && !d?.conflicts?.length && d?.person_role_id && (a !== "Rx" && C && C?.mode_of_patient_popup?.include == "1" && typeof o.patientPopupHandler < "u" ? o.patientPopupHandler(
435
- "addpatient",
436
- d.person_role_id.toString(),
437
- d.person_id.toString(),
438
- g,
439
- C,
440
- a
441
- ) : ae(_e(a) + d.person_role_id.toString() + xe(a)), v());
589
+ } catch (r) {
590
+ console.log(r);
442
591
  }
443
- } catch (r) {
444
- console.log(r);
445
- }
446
- }, Vl = () => {
592
+ },
593
+ [
594
+ fl,
595
+ R,
596
+ A,
597
+ u,
598
+ a,
599
+ G,
600
+ B,
601
+ i,
602
+ f,
603
+ m,
604
+ O,
605
+ _,
606
+ E,
607
+ le,
608
+ g
609
+ ]
610
+ ), aa = () => {
447
611
  try {
448
612
  const e = {
449
613
  "/md/viewRemoteAppointments.php": ["onlineConsultationHead", "bannerPopupWrap", "calendarViewClassDiv"],
450
- [je.consultations]: [
614
+ [Fe.consultations]: [
451
615
  "onlineConsultationHead",
452
616
  "newPaddingMarginEMR",
453
617
  "bannerPopupWrap",
454
618
  "consultations_mfe"
455
619
  ],
456
- [je.appointments]: ["appointments_mfe"]
457
- }, a = window.location?.pathname || "", r = e[a];
620
+ [Fe.appointments]: ["appointments_mfe"]
621
+ }, t = window.location?.pathname || "", r = e[t];
458
622
  if (!r?.length) return;
459
- const s = document.getElementById("react_emr_mfe"), f = document.getElementById("react_curtains_mfe"), x = document.querySelector(".offlineEMR3");
460
- [s, f, x].forEach((_) => {
461
- _ && _.classList.contains("hidden") && _.classList.remove("hidden");
623
+ const s = document.getElementById("react_emr_mfe"), c = document.getElementById("react_curtains_mfe"), j = document.querySelector(".offlineEMR3");
624
+ [s, c, j].forEach((w) => {
625
+ w && w.classList.contains("hidden") && w.classList.remove("hidden");
462
626
  });
463
- for (const _ of r) {
464
- const d = document.getElementsByClassName(_);
627
+ for (const w of r) {
628
+ const d = document.getElementsByClassName(w);
465
629
  d.length && !d[0].classList.contains("hidden") && d[0].classList.add("hidden");
466
630
  }
467
631
  } catch (e) {
468
632
  console.error("Error in manipulating DOM:", e);
469
633
  }
470
- }, be = async (e, a) => {
471
- const r = new FormData();
472
- r.append("pid", e), r.append("bidstr", a), r.append("imgData", P);
473
- const s = await xa(r, { token: p, envName: b });
474
- s.apiError && E("Error", s.apiError, "Error", 3e3);
475
- }, ye = async (e) => {
476
- const a = {
477
- patient_id: A?.person_id,
478
- honorific: t?.honorific,
479
- name: t?.name,
480
- gender: t?.gender,
481
- age: t?.age,
482
- org_person_dob: t?.dob ? t.dob : al(t?.age, S) || void 0,
483
- phone_number: t?.phone,
484
- email: t?.email,
485
- blood_group: t?.blood_group,
486
- patient_preferred_language: t?.patient_preferred_language,
487
- address: t?.address,
488
- city: t?.city,
489
- pincode: t?.pincode,
490
- org_person_bid_str: t?.existingBidStr,
491
- ref_doc_name: t?.ref_doc_name,
492
- ref_doc_spec: t?.ref_doc_spec,
493
- through_channel: t?.throughChannel,
494
- ref_doc_id: t?.refDocId,
495
- care_of: t?.careOf,
496
- phone_secondary: t?.phoneSecondary,
497
- occupation: t?.occupation,
498
- tag: t?.tag,
499
- marital_status: t.marital_status,
500
- married_since: t.married_since,
501
- spouse_name: t.spouse_name,
502
- spouse_blood_group: t.spouse_blood_group,
503
- image_link: t?.image_link,
504
- remote_consultation_id: "0",
505
- oc_status: !1,
506
- aadhar_number: t?.aadhar_number,
507
- person_role_id: o.doctor_role_id_for_seg || "",
508
- person_id: o.person_id_for_seg || "",
509
- branch_id: o.org_branch_id_for_seg || ""
510
- }, r = await ma(a, { token: p, envName: b });
511
- if (O) {
512
- r && J(!1);
513
- const { message: s, status: f } = r || {};
514
- if (f) {
515
- E("Patient Edited", "Patient Edited Successfully", "Success", 1500);
516
- try {
517
- t?.image_link && !P ? Yl(A?.person_role_id) : P && El && (ue(!1), await be(A?.person_role_id, t?.existingBidStr));
518
- } catch (x) {
519
- console.log(x);
520
- }
521
- e !== "Rx" && C && C?.mode_of_patient_popup?.include == "1" && typeof o.patientPopupHandler < "u" ? o.patientPopupHandler(
522
- "addpatient",
523
- A?.person_role_id,
524
- A?.person_id,
525
- g,
526
- C,
527
- e
528
- ) : ae(_e(e) + A?.person_role_id?.toString() + xe(e)), v();
529
- } else
530
- E("Patient Not Edited", s || "Patient Not Edited", "Failure", 1500);
531
- }
532
- }, Yl = async (e) => {
533
- const a = new FormData();
534
- a.append("pid", e);
535
- const r = await _a(a, { token: p, envName: b });
536
- r.apiError && E("Error", r.apiError, "Error", 3e3);
537
- }, z = (e = "") => {
538
- const a = e?.toLowerCase();
539
- return F !== "" ? "" : w !== "" && Number(w) < 0 && t?.dob === "" ? "Invalid Age" : a === "weeks" && w !== "" && Number(w) < 5907 || a === "days" && w !== "" && Number(w) < 9999 || a === "months" && w !== "" && Number(w) < 1358 || a === "years" && w !== "" && Number(w) < 114 ? "" : "Invalid Age";
540
- }, ql = async () => {
634
+ }, pl = x(
635
+ async (e) => {
636
+ const t = {
637
+ patient_id: D?.person_id,
638
+ honorific: a?.honorific,
639
+ name: a?.name,
640
+ gender: a?.gender,
641
+ age: a?.age,
642
+ org_person_dob: a?.dob ? a.dob : _l(a?.age, B) || void 0,
643
+ phone_number: a?.phone,
644
+ email: a?.email,
645
+ blood_group: a?.blood_group,
646
+ patient_preferred_language: a?.patient_preferred_language,
647
+ address: a?.address,
648
+ city: a?.city,
649
+ pincode: a?.pincode,
650
+ org_person_bid_str: a?.existingBidStr,
651
+ ref_doc_name: a?.ref_doc_name,
652
+ ref_doc_spec: a?.ref_doc_spec,
653
+ through_channel: a?.throughChannel,
654
+ ref_doc_id: a?.refDocId,
655
+ care_of: a?.careOf,
656
+ phone_secondary: a?.phoneSecondary,
657
+ occupation: a?.occupation,
658
+ tag: a?.tag,
659
+ marital_status: a.marital_status,
660
+ married_since: a.married_since,
661
+ spouse_name: a.spouse_name,
662
+ spouse_blood_group: a.spouse_blood_group,
663
+ image_link: a?.image_link,
664
+ remote_consultation_id: "0",
665
+ oc_status: !1,
666
+ aadhar_number: a?.aadhar_number,
667
+ person_role_id: i.doctor_role_id_for_seg || "",
668
+ person_id: i.person_id_for_seg || "",
669
+ branch_id: i.org_branch_id_for_seg || ""
670
+ }, r = await Ra(t, { token: f, envName: m });
671
+ if (u) {
672
+ r && De(!1);
673
+ const { message: s, status: c } = r || {};
674
+ if (c) {
675
+ P("Patient Edited", "Patient Edited Successfully", "Success", 1500);
676
+ try {
677
+ a?.image_link && !E ? cl(D?.person_role_id) : E && al && (Ee(!1), await le(D?.person_role_id, a?.existingBidStr));
678
+ } catch (j) {
679
+ console.log(j);
680
+ }
681
+ e !== "Rx" && O && O?.mode_of_patient_popup?.include == "1" && typeof i.patientPopupHandler < "u" ? i.patientPopupHandler(
682
+ "addpatient",
683
+ D?.person_role_id,
684
+ D?.person_id,
685
+ g,
686
+ O,
687
+ e
688
+ ) : me(
689
+ Ae(e) + D?.person_role_id?.toString() + Re(e)
690
+ ), _();
691
+ } else
692
+ P("Patient Not Edited", s || "Patient Not Edited", "Failure", 1500);
693
+ }
694
+ },
695
+ [
696
+ D?.person_id,
697
+ D?.person_role_id,
698
+ a,
699
+ B,
700
+ i,
701
+ f,
702
+ m,
703
+ u,
704
+ O,
705
+ _,
706
+ E,
707
+ al,
708
+ cl,
709
+ le,
710
+ g
711
+ ]
712
+ ), ta = async () => {
541
713
  try {
542
- R(!1);
714
+ K(!1);
543
715
  const e = await navigator.mediaDevices.getUserMedia({ video: !0 });
544
- B.current && (B.current.srcObject = e), I(!0);
716
+ $.current && ($.current.srcObject = e), ee(!0);
545
717
  } catch (e) {
546
718
  console.error("Error accessing camera:", e);
547
719
  }
548
- }, Ul = () => {
549
- const e = Oe.current, a = B.current;
550
- if (e && a) {
551
- e.width = a.videoWidth, e.height = a.videoHeight;
720
+ }, ra = () => {
721
+ const e = Qe.current, t = $.current;
722
+ if (e && t) {
723
+ e.width = t.videoWidth, e.height = t.videoHeight;
552
724
  const r = e.getContext("2d");
553
725
  if (r) {
554
- r.drawImage(a, 0, 0, e.width, e.height);
726
+ r.drawImage(t, 0, 0, e.width, e.height);
555
727
  const s = e.toDataURL();
556
- U(s), R(!1), I(!1), H();
728
+ ne(s), K(!1), ee(!1), ae();
557
729
  }
558
730
  }
559
- }, Wl = () => {
731
+ }, sa = () => {
560
732
  document.getElementById("upload-local-file")?.click();
561
- }, $l = (e) => {
562
- R(!1), I(!1);
563
- const a = e.target.files?.[0];
564
- if (!a) return;
733
+ }, na = (e) => {
734
+ K(!1), ee(!1);
735
+ const t = e.target.files?.[0];
736
+ if (!t) return;
565
737
  const r = new FileReader();
566
- r.readAsDataURL(a), r.onloadend = () => {
738
+ r.readAsDataURL(t), r.onloadend = () => {
567
739
  const s = r.result;
568
- s && U(s.toString()), e.target.value = "";
740
+ s && ne(s.toString()), e.target.value = "";
569
741
  };
570
- }, Je = () => {
571
- R(!0), U(""), I(!1), H();
572
- }, H = () => {
573
- if (B.current) {
574
- const e = B.current.srcObject;
575
- e instanceof MediaStream && e.getTracks().forEach((a) => a.stop()), B.current.srcObject = null;
742
+ }, ul = () => {
743
+ K(!0), ne(""), ee(!1), ae();
744
+ }, ae = () => {
745
+ if ($.current) {
746
+ const e = $.current.srcObject;
747
+ e instanceof MediaStream && e.getTracks().forEach((t) => t.stop()), $.current.srcObject = null;
576
748
  }
577
- }, Jl = aa(() => [...ze?.patient_config?.custom_fields || []].sort((r, s) => r.sort - s.sort).map((r) => {
578
- const s = t.custom_fields?.find((f) => f.id === r.id);
749
+ }, ia = xl(() => [...he?.patient_config?.custom_fields || []].sort((r, s) => r.sort - s.sort).map((r) => {
750
+ const s = a.custom_fields?.find((c) => c.id === r.id);
579
751
  return {
580
752
  ...r,
581
753
  value: s?.value || "",
582
754
  title: s?.value ? s?.title : r.title
583
755
  };
584
- }), [ze?.patient_config?.custom_fields, t.custom_fields]), ve = (e, a, r) => {
585
- j((s) => {
586
- const f = s.custom_fields?.length ? s.custom_fields.map((_) => _.id === e ? { ..._, value: r } : _) : [];
587
- return f.some((_) => _.id === e) || f.push({
756
+ }), [he?.patient_config?.custom_fields, a.custom_fields]), Me = (e, t, r) => {
757
+ F((s) => {
758
+ const c = s.custom_fields?.length ? s.custom_fields.map((w) => w.id === e ? { ...w, value: r } : w) : [];
759
+ return c.some((w) => w.id === e) || c.push({
588
760
  id: e,
589
761
  value: r,
590
- title: a
762
+ title: t
591
763
  }), {
592
764
  ...s,
593
- custom_fields: f
765
+ custom_fields: c
594
766
  };
595
767
  });
596
- }, Zl = () => Jl?.map((e) => {
597
- const { id: a, type: r, value: s, title: f } = e || {};
598
- if (!a || !r || !f) return null;
768
+ }, oa = () => ia?.map((e) => {
769
+ const { id: t, type: r, value: s, title: c } = e || {};
770
+ if (!t || !r || !c) return null;
599
771
  switch (r) {
600
772
  case "text":
601
773
  return /* @__PURE__ */ l.jsx(
602
- m,
774
+ v,
603
775
  {
604
- label: f,
776
+ label: c,
605
777
  labelColor: "hfl-text-Gray-600",
606
778
  labelSize: "Text sm",
607
779
  inputProps: {
608
780
  value: s || "",
609
- placeholder: `Enter ${f}`,
610
- onChange: (x) => {
611
- ve(a, f, x.target.value);
781
+ placeholder: `Enter ${c}`,
782
+ onChange: (j) => {
783
+ Me(t, c, j.target.value);
612
784
  }
613
785
  },
614
786
  width: "22em"
615
787
  },
616
- a
788
+ t
617
789
  );
618
790
  case "date":
619
791
  return /* @__PURE__ */ l.jsx(
620
- we,
792
+ Le,
621
793
  {
622
- label: f,
623
- placeholder: `Select ${f}`,
794
+ label: c,
795
+ placeholder: `Select ${c}`,
624
796
  selectDate: s ? new Date(s) : null,
625
- dateVar: (x) => {
626
- ve(a, f, x.toDateString() || "");
797
+ dateVar: (j) => {
798
+ Me(t, c, j.toDateString() || "");
627
799
  },
628
800
  isborderRequired: !0,
629
801
  width: "22em",
630
- clearDate: (x) => {
631
- ve(a, f, x);
802
+ clearDate: (j) => {
803
+ Me(t, c, j);
632
804
  },
633
805
  openUp: !0,
634
806
  backSpaceClearDate: !0
635
807
  },
636
- a
808
+ t
637
809
  );
638
810
  default:
639
811
  return null;
640
812
  }
641
- });
642
- return /* @__PURE__ */ l.jsx(
643
- la,
813
+ }), Y = x(
814
+ (e) => {
815
+ V(e), u ? pl(e) : ke(!1, e);
816
+ },
817
+ [u, pl, ke]
818
+ ), ha = x(() => {
819
+ if (R && !u && !A) {
820
+ V("Rx"), U();
821
+ return;
822
+ }
823
+ Y("Rx");
824
+ }, [R, u, A, U, Y]), da = x(() => {
825
+ if (R && !u && !A) {
826
+ V("Bill"), U();
827
+ return;
828
+ }
829
+ Y("Bill");
830
+ }, [R, u, A, U, Y]), fa = x(() => {
831
+ if (R && !u && !A) {
832
+ V("Appointment"), U();
833
+ return;
834
+ }
835
+ Y("Appointment");
836
+ }, [R, u, A, U, Y]);
837
+ return M(() => {
838
+ A && H && (Y(H), V(null));
839
+ }, [A, H, Y]), /* @__PURE__ */ l.jsx(
840
+ Nl,
644
841
  {
645
- isOpen: T,
842
+ isOpen: I,
646
843
  onRequestClose: () => {
647
- H(), v();
844
+ ae(), _();
648
845
  },
649
846
  shouldCloseOnOverlayClick: !1,
650
847
  style: {
@@ -670,32 +867,32 @@ const Ba = (M) => {
670
867
  id: "add-patient-header",
671
868
  "data-qa": "testid_addPatient",
672
869
  children: [
673
- /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text xl", children: te ? "Patient(s) with Same phone number or Email" : "Add New Patient" }),
870
+ /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text xl", children: Q ? "Patient(s) with Same phone number or Email" : "Add New Patient" }),
674
871
  /* @__PURE__ */ l.jsx("div", { className: "hfl-items-center", children: /* @__PURE__ */ l.jsx(
675
872
  "span",
676
873
  {
677
874
  className: "hx_close hfl-ml-4 hover:hfl-cursor-pointer",
678
875
  onClick: () => {
679
- H(), v();
876
+ ae(), _();
680
877
  }
681
878
  }
682
879
  ) })
683
880
  ]
684
881
  }
685
882
  ),
686
- te ? /* @__PURE__ */ l.jsx(
687
- ba,
883
+ Q ? /* @__PURE__ */ l.jsx(
884
+ ka,
688
885
  {
689
- conflicts: fl,
690
- handleAddPatient: K,
691
- redirectAction: ol,
692
- manipulateExistingDOM: Vl
886
+ conflicts: L,
887
+ handleAddPatient: ke,
888
+ redirectAction: H,
889
+ manipulateExistingDOM: aa
693
890
  }
694
891
  ) : /* @__PURE__ */ l.jsxs("div", { className: "hfl-min-h-[400px] hfl-px-10 hfl-py-5", children: [
695
892
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between", children: [
696
893
  /* @__PURE__ */ l.jsxs("div", { children: [
697
894
  /* @__PURE__ */ l.jsx(
698
- m,
895
+ v,
699
896
  {
700
897
  label: "Patient Name*",
701
898
  labelColor: "hfl-text-Gray-600",
@@ -703,35 +900,35 @@ const Ba = (M) => {
703
900
  prefix: /* @__PURE__ */ l.jsxs(
704
901
  "div",
705
902
  {
706
- ref: me,
903
+ ref: Be,
707
904
  className: "-hfl-ml-2 hfl-flex hfl-w-16 hfl-items-center hfl-justify-between hfl-bg-Gray-50",
708
- onClick: () => pe((e) => !e),
905
+ onClick: () => Se((e) => !e),
709
906
  children: [
710
- /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700", children: Ae }),
711
- !Ae.length && /* @__PURE__ */ l.jsx("div", { className: `${Me ? "hx_up" : "hx_down"} -hfl-mr-2` })
907
+ /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700", children: Ze }),
908
+ !Ze.length && /* @__PURE__ */ l.jsx("div", { className: `${Xe ? "hx_up" : "hx_down"} -hfl-mr-2` })
712
909
  ]
713
910
  }
714
911
  ),
715
- errorMsg: u.name ? u.name : void 0,
912
+ errorMsg: b.name ? b.name : void 0,
716
913
  inputProps: {
717
914
  type: "text",
718
915
  // onBlur: () => {
719
916
  // setShowPatientListDD({ name: false, phone: false });
720
917
  // },
721
- value: Be,
918
+ value: Ye,
722
919
  placeholder: "Enter Name",
723
920
  onChange: (e) => {
724
- i("name", e.target.value);
921
+ o("name", e.target.value);
725
922
  },
726
923
  onBlur: () => {
727
- const e = !(t.name.length > 0);
728
- t.name.length > 0 && t.name.length < 2 && !Sl ? c((a) => ({
729
- ...a,
924
+ const e = !(a.name.length > 0);
925
+ a.name.length > 0 && a.name.length < 2 && !Hl ? p((t) => ({
926
+ ...t,
730
927
  name: "Enter at least 2 letters "
731
- })) : c((a) => ({
732
- ...a,
928
+ })) : p((t) => ({
929
+ ...t,
733
930
  name: e ? "Enter the Name of the Patient" : ""
734
- })), Ie(!1), D({ name: !1, phone: !1 });
931
+ })), ll(!1), q({ name: !1, phone: !1 });
735
932
  }
736
933
  // onChange: (e) => {
737
934
  // handleEditCustomFieldTitle(e);
@@ -741,21 +938,21 @@ const Ba = (M) => {
741
938
  width: "16em"
742
939
  }
743
940
  ),
744
- Me && /* @__PURE__ */ l.jsx(
941
+ Xe && /* @__PURE__ */ l.jsx(
745
942
  "div",
746
943
  {
747
944
  className: "hfl-absolute hfl-z-[1000] hfl-mt-[2px] hfl-flex hfl-h-[270px] hfl-w-20 hfl-flex-col hfl-overflow-y-auto hfl-rounded-lg hfl-border-1 hfl-border-Gray-300 hfl-bg-White",
748
945
  style: {
749
946
  boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
750
947
  },
751
- children: ha.map((e) => /* @__PURE__ */ l.jsx(
752
- Q,
948
+ children: wa.map((e) => /* @__PURE__ */ l.jsx(
949
+ fe,
753
950
  {
754
951
  className: "hfl-text-Primary-700",
755
952
  label: e.label,
756
953
  onSelect: () => {
757
- Re(e.label), pe(!1), ce(e.gender), i("honorific", e.label), i("gender", e.gender), j((a) => ({
758
- ...a,
954
+ Ke(e.label), Se(!1), Pe(e.gender), o("honorific", e.label), o("gender", e.gender), F((t) => ({
955
+ ...t,
759
956
  gender: e.gender,
760
957
  honorific: e.label
761
958
  }));
@@ -764,21 +961,21 @@ const Ba = (M) => {
764
961
  ))
765
962
  }
766
963
  ),
767
- $.name && Be.length > 0 && /* @__PURE__ */ l.jsxs(
964
+ oe.name && Ye.length > 0 && /* @__PURE__ */ l.jsxs(
768
965
  "div",
769
966
  {
770
967
  className: "hfl-absolute hfl-z-[1000] hfl-mt-[2px] hfl-flex hfl-w-[350px] hfl-flex-col hfl-space-y-2 hfl-rounded-lg hfl-border-1 hfl-border-Gray-300 hfl-bg-White hfl-px-[16px] hfl-py-[10px]",
771
968
  style: {
772
969
  boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
773
970
  },
774
- ref: Z,
971
+ ref: de,
775
972
  children: [
776
973
  /* @__PURE__ */ l.jsx(h, { className: "hfl-text-Primary-600", variant: "Regular", type: "Text md", children: "Existing Patients" }),
777
- W && W?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
974
+ ie && ie?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
778
975
  "div",
779
976
  {
780
977
  className: "hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",
781
- onMouseDown: () => $e(e),
978
+ onMouseDown: () => dl(e),
782
979
  children: [
783
980
  /* @__PURE__ */ l.jsxs(
784
981
  h,
@@ -788,7 +985,7 @@ const Ba = (M) => {
788
985
  className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700",
789
986
  children: [
790
987
  e?.org_person_name?.length > 13 ? e?.org_person_name?.substring(0, 11) + "..." : e?.org_person_name,
791
- `(${e.ageStr || Qe(e.age)}, ${Xe(
988
+ `(${e.ageStr || bl(e.age)}, ${yl(
792
989
  parseInt(e.org_person_gender.toString())
793
990
  )})`
794
991
  ]
@@ -803,49 +1000,49 @@ const Ba = (M) => {
803
1000
  }
804
1001
  )
805
1002
  ] }),
806
- /* @__PURE__ */ l.jsxs("div", { children: [
1003
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-items-end hfl-gap-3", children: /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
807
1004
  /* @__PURE__ */ l.jsx(
808
- m,
1005
+ v,
809
1006
  {
810
1007
  label: `Phone Number ${g && g.phone_number_length ? "*" : ""}`,
811
1008
  labelColor: "hfl-text-Gray-600",
812
1009
  labelSize: "Text sm",
813
- errorMsg: u.phone ? u.phone : void 0,
1010
+ errorMsg: b.phone ? b.phone : void 0,
814
1011
  inputProps: {
815
1012
  // value: title,
816
1013
  maxLength: 10,
817
- value: G,
1014
+ value: k,
818
1015
  placeholder: "Enter Number",
819
1016
  onChange: (e) => {
820
- i("phone", e.target.value.replace(/[^0-9]/g, ""));
1017
+ o("phone", e.target.value.replace(/[^0-9]/g, ""));
821
1018
  },
822
1019
  onBlur: () => {
823
- const { isError: e = !1, msg: a = "" } = g && g.phone_number_length ? el(G) : G ? el(G) : {};
824
- c((r) => ({
1020
+ const { isError: e = !1, msg: t = "" } = g && g.phone_number_length ? vl(k) : k ? vl(k) : {};
1021
+ p((r) => ({
825
1022
  ...r,
826
- phone: e ? a : ""
827
- })), D({ name: !1, phone: !1 });
1023
+ phone: e ? t : ""
1024
+ })), q({ name: !1, phone: !1 });
828
1025
  }
829
1026
  },
830
1027
  width: "21em",
831
1028
  start_icon: "hx_phone"
832
1029
  }
833
1030
  ),
834
- $.phone && G.length > 0 && /* @__PURE__ */ l.jsxs(
1031
+ oe.phone && k.length > 0 && /* @__PURE__ */ l.jsxs(
835
1032
  "div",
836
1033
  {
837
1034
  className: "hfl-absolute hfl-z-[1000] hfl-mt-[2px] hfl-flex hfl-w-[350px] hfl-flex-col hfl-space-y-2 hfl-rounded-lg hfl-border-1 hfl-border-Gray-300 hfl-bg-White hfl-px-[24px] hfl-py-[10px]",
838
1035
  style: {
839
1036
  boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
840
1037
  },
841
- ref: Z,
1038
+ ref: de,
842
1039
  children: [
843
1040
  /* @__PURE__ */ l.jsx(h, { className: "hfl-text-Primary-600", variant: "Regular", type: "Text md", children: "Existing Patients" }),
844
- W && W?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
1041
+ ie && ie?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
845
1042
  "div",
846
1043
  {
847
1044
  className: "hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",
848
- onMouseDown: () => $e(e),
1045
+ onMouseDown: () => dl(e),
849
1046
  children: [
850
1047
  /* @__PURE__ */ l.jsxs(
851
1048
  h,
@@ -855,7 +1052,7 @@ const Ba = (M) => {
855
1052
  className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700",
856
1053
  children: [
857
1054
  e.org_person_name?.length > 13 ? e.org_person_name?.substring(0, 11) + "..." : e.org_person_name,
858
- `(${e.ageStr || Qe(e.age)}, ${Xe(
1055
+ `(${e.ageStr || bl(e.age)}, ${yl(
859
1056
  parseInt(e.org_person_gender.toString())
860
1057
  )})`
861
1058
  ]
@@ -869,57 +1066,72 @@ const Ba = (M) => {
869
1066
  ]
870
1067
  }
871
1068
  )
872
- ] })
1069
+ ] }) })
873
1070
  ] }),
1071
+ R && !u && tl && /* @__PURE__ */ l.jsx(
1072
+ La,
1073
+ {
1074
+ isOpen: tl,
1075
+ onClose: () => Te(!1),
1076
+ onSubmit: (e) => ea(e),
1077
+ optHeading: "Verify with a OTP",
1078
+ otpSubHeading: `Please enter the OTP shared on ${k}`,
1079
+ veriftButtonTitle: "Verify OTP",
1080
+ resendOtp: U,
1081
+ otpErrorMsg: "",
1082
+ setOtpErrorMsg: () => {
1083
+ }
1084
+ }
1085
+ ),
874
1086
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-justify-between hfl-space-x-2 hfl-pt-4", children: [
875
1087
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-h-[40px] hfl-space-y-1", children: [
876
1088
  /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-pb-[1px] hfl-text-Gray-600", children: "Gender*" }),
877
1089
  /* @__PURE__ */ l.jsxs("div", { children: [
878
1090
  /* @__PURE__ */ l.jsx(
879
- Ql,
1091
+ ua,
880
1092
  {
881
- className: `!hfl-h-[40px] hfl-w-44 ${u.gender ? "hfl-border-Error-300" : ""}`,
1093
+ className: `!hfl-h-[40px] hfl-w-44 ${b.gender ? "hfl-border-Error-300" : ""}`,
882
1094
  options: [
883
1095
  { label: "M", value: "0" },
884
1096
  { label: "F", value: "1" },
885
1097
  { label: "Other", value: "2" }
886
1098
  ],
887
- value: Nl,
888
- onChange: (e) => ge(e),
1099
+ value: Fl,
1100
+ onChange: (e) => Oe(e),
889
1101
  disabled: !1
890
1102
  }
891
1103
  ),
892
- !!u.gender && /* @__PURE__ */ l.jsx("div", { className: "hfl-font-inter hfl-text-1 hfl-font-inter-0 hfl-leading-10 hfl-tracking-1 hfl-text-Error-500", children: u.gender })
1104
+ !!b.gender && /* @__PURE__ */ l.jsx("div", { className: "hfl-font-inter hfl-text-1 hfl-font-inter-0 hfl-leading-10 hfl-tracking-1 hfl-text-Error-500", children: b.gender })
893
1105
  ] })
894
1106
  ] }),
895
1107
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-space-x-1", children: [
896
1108
  /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
897
- Ze,
1109
+ ml,
898
1110
  {
899
1111
  label: "Age or DOB*",
900
1112
  className: "hfl-w-20",
901
1113
  classNamedoubleInput: "hfl-relative",
902
1114
  suffixClassName: "hfl-w-16 hfl-border-0",
903
1115
  suffixDropdownClassName: "hfl-ml-[80px]",
904
- input1value: t.age,
905
- input2value: S,
1116
+ input1value: a.age,
1117
+ input2value: B,
906
1118
  end_icon: "hx_down",
907
- errorMsg: u.age ? u.age : void 0,
1119
+ errorMsg: b.age ? b.age : void 0,
908
1120
  inputProps: {
909
1121
  type: "number",
910
1122
  min: 0,
911
1123
  maxLength: 3,
912
1124
  placeholder: "Age",
913
1125
  onChange: (e) => {
914
- i("age", e.target.value.replace(/[^0-9]/g, "")), j((a) => ({
915
- ...a,
1126
+ o("age", e.target.value.replace(/[^0-9]/g, "")), F((t) => ({
1127
+ ...t,
916
1128
  dob: ""
917
1129
  }));
918
1130
  },
919
1131
  onBlur: () => {
920
- c((e) => ({
1132
+ p((e) => ({
921
1133
  ...e,
922
- age: z(S)
1134
+ age: X(B)
923
1135
  }));
924
1136
  }
925
1137
  },
@@ -932,31 +1144,31 @@ const Ba = (M) => {
932
1144
  { label: "Days", value: "days" }
933
1145
  ],
934
1146
  handleValChange: (e) => {
935
- i("age", e), c((a) => ({
936
- ...a,
937
- age: z(S)
1147
+ o("age", e), p((t) => ({
1148
+ ...t,
1149
+ age: X(B)
938
1150
  }));
939
1151
  },
940
1152
  handleSuffixValChange: (e) => {
941
- Le(e), c((a) => ({
942
- ...a,
943
- age: z(e)
1153
+ Je(e), p((t) => ({
1154
+ ...t,
1155
+ age: X(e)
944
1156
  }));
945
1157
  },
946
1158
  onSuffixDropdownClick: (e) => {
947
- Le(e.label), j((a) => ({
948
- ...a,
1159
+ Je(e.label), F((t) => ({
1160
+ ...t,
949
1161
  age_selector: e.value,
950
1162
  dob: ""
951
- })), c((a) => ({
952
- ...a,
953
- age: z(e.value)
1163
+ })), p((t) => ({
1164
+ ...t,
1165
+ age: X(e.value)
954
1166
  }));
955
1167
  }
956
1168
  }
957
1169
  ) }),
958
1170
  /* @__PURE__ */ l.jsx("div", { className: "hfl-mt-[24px] hfl-space-y-1", children: /* @__PURE__ */ l.jsx(
959
- we,
1171
+ Le,
960
1172
  {
961
1173
  className: "hfl-relative",
962
1174
  placeholder: "DOB",
@@ -965,14 +1177,14 @@ const Ba = (M) => {
965
1177
  label: "",
966
1178
  labelSize: "Text sm",
967
1179
  labelColor: "hfl-text-Gray-700",
968
- selectDate: t?.dob && ll(new Date(t?.dob)) ? new Date(ee(new Date(t?.dob)).format("DD-MMM-YYYY")) : "",
1180
+ selectDate: a?.dob && jl(new Date(a?.dob)) ? new Date(pe(new Date(a?.dob)).format("DD-MMM-YYYY")) : "",
969
1181
  dateVar: (e) => {
970
- j((a) => ({
971
- ...a,
972
- dob: ee(e).format("YYYY-MM-DD"),
1182
+ F((t) => ({
1183
+ ...t,
1184
+ dob: pe(e).format("YYYY-MM-DD"),
973
1185
  age: ""
974
- })), c((a) => ({
975
- ...a,
1186
+ })), p((t) => ({
1187
+ ...t,
976
1188
  age: ""
977
1189
  }));
978
1190
  },
@@ -982,18 +1194,18 @@ const Ba = (M) => {
982
1194
  ) })
983
1195
  ] }),
984
1196
  /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-1", children: /* @__PURE__ */ l.jsx(
985
- X,
1197
+ ce,
986
1198
  {
987
1199
  value: {
988
- label: t?.patient_preferred_language ? Ce[t.patient_preferred_language] : "English"
1200
+ label: a?.patient_preferred_language ? Ge[a.patient_preferred_language] : "English"
989
1201
  },
990
1202
  placeholder: "English",
991
1203
  label: "Preferred Language",
992
1204
  onChange: (e) => {
993
- i("patient_preferred_language", e.value);
1205
+ o("patient_preferred_language", e.value);
994
1206
  },
995
- options: Object.keys(Ce).map((e) => ({
996
- label: Ce[e],
1207
+ options: Object.keys(Ge).map((e) => ({
1208
+ label: Ge[e],
997
1209
  value: e
998
1210
  })),
999
1211
  className: "!hfl-h-[40px] hfl-w-[200px]",
@@ -1005,36 +1217,36 @@ const Ba = (M) => {
1005
1217
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-w-6/12 hfl-flex-col ", children: [
1006
1218
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1007
1219
  /* @__PURE__ */ l.jsx(
1008
- m,
1220
+ v,
1009
1221
  {
1010
1222
  label: "City",
1011
1223
  labelColor: "hfl-text-Gray-600",
1012
1224
  labelSize: "Text sm",
1013
1225
  inputProps: {
1014
- value: t?.city,
1226
+ value: a?.city,
1015
1227
  placeholder: "Enter City",
1016
1228
  onChange: (e) => {
1017
- i("city", e.target.value), de(!0), Ml(e);
1229
+ o("city", e.target.value), Ce(!0), Jl(e);
1018
1230
  },
1019
1231
  onBlur: (e) => {
1020
- e.stopPropagation(), de(!1);
1232
+ e.stopPropagation(), Ce(!1);
1021
1233
  }
1022
1234
  },
1023
1235
  width: 23.5 + "em"
1024
1236
  }
1025
1237
  ),
1026
- yl && fe && fe.length > 0 && /* @__PURE__ */ l.jsx(
1238
+ Rl && Ne && Ne.length > 0 && /* @__PURE__ */ l.jsx(
1027
1239
  "div",
1028
1240
  {
1029
1241
  className: "hfl-absolute hfl-z-10 hfl-mt-1 hfl-max-h-80 hfl-w-full hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Blue_gray-200 hfl-bg-Indigo-25 hfl-shadow-md ",
1030
- children: fe.map((e) => /* @__PURE__ */ l.jsx(
1031
- Q,
1242
+ children: Ne.map((e) => /* @__PURE__ */ l.jsx(
1243
+ fe,
1032
1244
  {
1033
1245
  label: e,
1034
1246
  className: "hfl-text-Primary-700",
1035
1247
  onSelect: () => (
1036
1248
  // handleSuggestionClick({ ...restOptions, title })
1037
- Ll(e)
1249
+ $l(e)
1038
1250
  )
1039
1251
  }
1040
1252
  ))
@@ -1042,17 +1254,17 @@ const Ba = (M) => {
1042
1254
  )
1043
1255
  ] }),
1044
1256
  /* @__PURE__ */ l.jsx("div", { className: "hfl-pt-4", children: /* @__PURE__ */ l.jsx(
1045
- m,
1257
+ v,
1046
1258
  {
1047
1259
  className: "hfl-mb-3",
1048
1260
  label: "Pin",
1049
1261
  labelColor: "hfl-text-Gray-600",
1050
1262
  labelSize: "Text sm",
1051
1263
  inputProps: {
1052
- value: t?.pincode,
1264
+ value: a?.pincode,
1053
1265
  placeholder: "Enter Pin",
1054
1266
  onChange: (e) => {
1055
- i("pincode", e.target.value);
1267
+ o("pincode", e.target.value);
1056
1268
  }
1057
1269
  },
1058
1270
  width: 22.5 + "em"
@@ -1060,15 +1272,15 @@ const Ba = (M) => {
1060
1272
  ) })
1061
1273
  ] }),
1062
1274
  /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-h-full hfl-flex-col", style: { height: "100%" }, children: /* @__PURE__ */ l.jsx(
1063
- Xl,
1275
+ ma,
1064
1276
  {
1065
1277
  className: "hfl-w-[355px]",
1066
1278
  label: "Address",
1067
1279
  inputProps: {
1068
- value: t?.address,
1280
+ value: a?.address,
1069
1281
  placeholder: "Enter Address",
1070
1282
  onChange: (e) => {
1071
- i("address", e.target.value);
1283
+ o("address", e.target.value);
1072
1284
  }
1073
1285
  },
1074
1286
  isDynamicHeight: !0,
@@ -1076,17 +1288,16 @@ const Ba = (M) => {
1076
1288
  }
1077
1289
  ) })
1078
1290
  ] }),
1079
- Se ? /* @__PURE__ */ l.jsx(
1080
- ya,
1291
+ ge ? /* @__PURE__ */ l.jsx(
1292
+ Ma,
1081
1293
  {
1082
- setEditPatient: nl,
1083
- editPatient: O,
1084
- createAsNew: il,
1085
- setCreateAsNew: hl,
1086
- showEditPrompt: Se
1294
+ setEditPatient: se,
1295
+ editPatient: u,
1296
+ createAsNew: J,
1297
+ setCreateAsNew: xe
1087
1298
  }
1088
1299
  ) : /* @__PURE__ */ l.jsx(l.Fragment, {}),
1089
- ke ? /* @__PURE__ */ l.jsxs("div", { className: "", children: [
1300
+ Ue ? /* @__PURE__ */ l.jsxs("div", { className: "", children: [
1090
1301
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-stroke-Gray-200 hfl-stroke-1 hfl-pb-6", children: [
1091
1302
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1092
1303
  /* @__PURE__ */ l.jsx("span", { className: "hfl-absolute hfl-left-0 hfl-right-0 hfl-top-1/2 hfl-h-px hfl-bg-Gray-200" }),
@@ -1103,17 +1314,17 @@ const Ba = (M) => {
1103
1314
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
1104
1315
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-space-x-1", children: [
1105
1316
  /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
1106
- X,
1317
+ ce,
1107
1318
  {
1108
1319
  value: {
1109
- label: t.marital_status && Ne.find((e) => e === t.marital_status) || ""
1320
+ label: a.marital_status && Ie.find((e) => e === a.marital_status) || ""
1110
1321
  },
1111
1322
  placeholder: "Marital Status",
1112
1323
  label: "Marital Status",
1113
1324
  onChange: (e) => {
1114
- i("marital_status", e.label);
1325
+ o("marital_status", e.label);
1115
1326
  },
1116
- options: Ne.map((e) => ({
1327
+ options: Ie.map((e) => ({
1117
1328
  label: e,
1118
1329
  value: e
1119
1330
  })),
@@ -1122,7 +1333,7 @@ const Ba = (M) => {
1122
1333
  }
1123
1334
  ) }),
1124
1335
  /* @__PURE__ */ l.jsx("div", { className: "hfl-mt-[24px] hfl-flex hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
1125
- we,
1336
+ Le,
1126
1337
  {
1127
1338
  className: "hfl-relative",
1128
1339
  placeholder: "Since",
@@ -1131,11 +1342,11 @@ const Ba = (M) => {
1131
1342
  label: "",
1132
1343
  labelSize: "Text sm",
1133
1344
  labelColor: "hfl-text-Gray-700",
1134
- selectDate: t?.married_since && ll(new Date(t?.married_since)) ? new Date(ee(new Date(t?.married_since)).format("DD-MMM-YYYY")) : "",
1345
+ selectDate: a?.married_since && jl(new Date(a?.married_since)) ? new Date(pe(new Date(a?.married_since)).format("DD-MMM-YYYY")) : "",
1135
1346
  dateVar: (e) => {
1136
- j((a) => ({
1137
- ...a,
1138
- married_since: ee(e).format("YYYY-MM-DD")
1347
+ F((t) => ({
1348
+ ...t,
1349
+ married_since: pe(e).format("YYYY-MM-DD")
1139
1350
  }));
1140
1351
  },
1141
1352
  isborderRequired: !0,
@@ -1144,127 +1355,127 @@ const Ba = (M) => {
1144
1355
  ) })
1145
1356
  ] }),
1146
1357
  /* @__PURE__ */ l.jsx(
1147
- X,
1358
+ ce,
1148
1359
  {
1149
1360
  label: "Blood Group",
1150
1361
  placeholder: "Enter blood group",
1151
1362
  value: {
1152
- label: t.blood_group && le.find((e) => e.value === t.blood_group)?.label || "Blood group"
1363
+ label: a.blood_group && ue.find((e) => e.value === a.blood_group)?.label || "Blood group"
1153
1364
  },
1154
1365
  onChange: (e) => {
1155
- i("blood_group", e.value);
1366
+ o("blood_group", e.value);
1156
1367
  },
1157
- options: le,
1368
+ options: ue,
1158
1369
  className: "!hfl-h-11 hfl-w-[370px]",
1159
1370
  "data-qa": "blood-group"
1160
1371
  }
1161
1372
  )
1162
1373
  ] }),
1163
- t?.marital_status !== Ne[0] && /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
1374
+ a?.marital_status !== Ie[0] && /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
1164
1375
  /* @__PURE__ */ l.jsx(
1165
- m,
1376
+ v,
1166
1377
  {
1167
1378
  label: "Spouse Name",
1168
1379
  start_icon: "hx_person",
1169
1380
  labelColor: "hfl-text-Gray-600",
1170
1381
  labelSize: "Text sm",
1171
1382
  inputProps: {
1172
- value: t.spouse_name,
1383
+ value: a.spouse_name,
1173
1384
  placeholder: "Enter Spouse Name",
1174
1385
  onChange: (e) => {
1175
- i("spouse_name", e.target.value);
1386
+ o("spouse_name", e.target.value);
1176
1387
  }
1177
1388
  },
1178
1389
  width: "21em"
1179
1390
  }
1180
1391
  ),
1181
1392
  /* @__PURE__ */ l.jsx(
1182
- X,
1393
+ ce,
1183
1394
  {
1184
1395
  label: "Spouse Blood Group",
1185
1396
  placeholder: "Enter blood group",
1186
1397
  value: {
1187
- label: t.spouse_blood_group ? le.find((e) => e.value === t.spouse_blood_group)?.label || "Spouse Blood group" : "Blood group"
1398
+ label: a.spouse_blood_group ? ue.find((e) => e.value === a.spouse_blood_group)?.label || "Spouse Blood group" : "Blood group"
1188
1399
  },
1189
1400
  onChange: (e) => {
1190
- i("spouse_blood_group", e.value);
1401
+ o("spouse_blood_group", e.value);
1191
1402
  },
1192
- options: le,
1403
+ options: ue,
1193
1404
  className: "!hfl-h-11 hfl-w-[370px]",
1194
1405
  "data-qa": "blood-group"
1195
1406
  }
1196
1407
  )
1197
1408
  ] })
1198
1409
  ] }),
1199
- /* @__PURE__ */ l.jsx(tl, {}),
1410
+ /* @__PURE__ */ l.jsx(wl, {}),
1200
1411
  /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-6", children: /* @__PURE__ */ l.jsx(
1201
- Ze,
1412
+ ml,
1202
1413
  {
1203
1414
  classNameDatePicker: "hfl-relative",
1204
1415
  classNamedoubleInput: "hfl-relative",
1205
1416
  label: "Referred By",
1206
- input1value: t.ref_doc_name,
1207
- input2value: t.ref_doc_spec,
1417
+ input1value: a.ref_doc_name,
1418
+ input2value: a.ref_doc_spec,
1208
1419
  end_icon: "hx_down",
1209
1420
  inputProps: { placeholder: "Doctor Name" },
1210
1421
  suffixInputProps: { placeholder: "Speciality" },
1211
1422
  className: "hfl-w-48",
1212
1423
  suffixClassName: "hfl-w-[100px]",
1213
1424
  suffixDropdownClassName: "hfl-ml-[160px]",
1214
- options: wl,
1215
- suffixOptions: da,
1425
+ options: Ml,
1426
+ suffixOptions: Ca,
1216
1427
  handleValChange: (e) => {
1217
- i("ref_doc_name", e);
1428
+ o("ref_doc_name", e);
1218
1429
  },
1219
1430
  handleSuffixValChange: (e) => {
1220
- i("ref_doc_spec", e.value);
1431
+ o("ref_doc_spec", e.value);
1221
1432
  },
1222
1433
  onDropdownClick: (e) => {
1223
- i("ref_doc_name", e.doctor_name), i("refDocId", e.doctor_id), i("ref_doc_spec", e.specialist);
1434
+ o("ref_doc_name", e.doctor_name), o("refDocId", e.doctor_id), o("ref_doc_spec", e.specialist);
1224
1435
  },
1225
1436
  onSuffixDropdownClick: (e) => {
1226
- i("ref_doc_spec", e.value);
1437
+ o("ref_doc_spec", e.value);
1227
1438
  }
1228
1439
  }
1229
1440
  ) }),
1230
1441
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-justify-between hfl-pb-6 hfl-pt-4", children: [
1231
1442
  /* @__PURE__ */ l.jsx(
1232
- m,
1443
+ v,
1233
1444
  {
1234
1445
  label: "Existing ID (if any)",
1235
1446
  labelColor: "hfl-text-Gray-600",
1236
1447
  labelSize: "Text sm",
1237
1448
  inputProps: {
1238
- value: t?.existingBidStr,
1449
+ value: a?.existingBidStr,
1239
1450
  placeholder: "Enter ID",
1240
1451
  onChange: (e) => {
1241
- i("existingBidStr", e.target.value);
1452
+ o("existingBidStr", e.target.value);
1242
1453
  }
1243
1454
  },
1244
1455
  width: "23em"
1245
1456
  }
1246
1457
  ),
1247
1458
  /* @__PURE__ */ l.jsx(
1248
- m,
1459
+ v,
1249
1460
  {
1250
1461
  label: "Email",
1251
1462
  showEmailSuggestions: !0,
1252
1463
  labelColor: "hfl-text-Gray-600",
1253
- errorMsg: u.email ? u.email : void 0,
1464
+ errorMsg: b.email ? b.email : void 0,
1254
1465
  labelSize: "Text sm",
1255
1466
  start_icon: "hx_mail",
1256
1467
  inputProps: {
1257
- value: t.email,
1468
+ value: a.email,
1258
1469
  placeholder: "Enter Email",
1259
1470
  onChange: (e) => {
1260
- i("email", e.target.value.trim());
1471
+ o("email", e.target.value.trim());
1261
1472
  },
1262
1473
  onBlur: (e) => {
1263
- e.target.value && !Ke().email().isValidSync(e.target.value) ? c((a) => ({
1264
- ...a,
1474
+ e.target.value && !gl().email().isValidSync(e.target.value) ? p((t) => ({
1475
+ ...t,
1265
1476
  email: "Email format is wrong"
1266
- })) : c((a) => ({
1267
- ...a,
1477
+ })) : p((t) => ({
1478
+ ...t,
1268
1479
  email: ""
1269
1480
  }));
1270
1481
  }
@@ -1277,37 +1488,37 @@ const Ba = (M) => {
1277
1488
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between", children: [
1278
1489
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1279
1490
  /* @__PURE__ */ l.jsx(
1280
- m,
1491
+ v,
1281
1492
  {
1282
1493
  label: "Channel (How did the patient hear about you?)",
1283
1494
  labelColor: "hfl-text-Gray-600",
1284
1495
  labelSize: "Text sm",
1285
1496
  inputProps: {
1286
- value: t?.throughChannel,
1497
+ value: a?.throughChannel,
1287
1498
  placeholder: "Enter Channel",
1288
1499
  onChange: (e) => {
1289
- i("throughChannel", e.target.value), ie(!0), Al(e);
1500
+ o("throughChannel", e.target.value), je(!0), Ul(e);
1290
1501
  },
1291
1502
  onBlur: (e) => {
1292
- e.stopPropagation(), ie(!1);
1503
+ e.stopPropagation(), je(!1);
1293
1504
  }
1294
1505
  },
1295
1506
  width: "22em"
1296
1507
  }
1297
1508
  ),
1298
- _l && se && se.length > 0 && /* @__PURE__ */ l.jsx(
1509
+ Bl && be && be.length > 0 && /* @__PURE__ */ l.jsx(
1299
1510
  "div",
1300
1511
  {
1301
1512
  className: "hfl-absolute hfl-z-10 hfl-mt-1 hfl-max-h-80 hfl-w-full hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Blue_gray-200 hfl-bg-Indigo-25 hfl-shadow-md ",
1302
- children: se.map((e) => {
1303
- const { title: a, ...r } = e;
1513
+ children: be.map((e) => {
1514
+ const { title: t, ...r } = e;
1304
1515
  return /* @__PURE__ */ l.jsx(
1305
- Q,
1516
+ fe,
1306
1517
  {
1307
- label: a,
1518
+ label: t,
1308
1519
  className: "hfl-text-Primary-700",
1309
1520
  ...r,
1310
- onSelect: () => kl({
1521
+ onSelect: () => ql({
1311
1522
  value: e.value
1312
1523
  })
1313
1524
  },
@@ -1318,16 +1529,16 @@ const Ba = (M) => {
1318
1529
  )
1319
1530
  ] }),
1320
1531
  /* @__PURE__ */ l.jsx(
1321
- m,
1532
+ v,
1322
1533
  {
1323
1534
  label: "C/O",
1324
1535
  labelColor: "hfl-text-Gray-600",
1325
1536
  labelSize: "Text sm",
1326
1537
  inputProps: {
1327
- value: t?.careOf,
1538
+ value: a?.careOf,
1328
1539
  placeholder: "Enter C/O",
1329
1540
  onChange: (e) => {
1330
- i("careOf", e.target.value);
1541
+ o("careOf", e.target.value);
1331
1542
  }
1332
1543
  },
1333
1544
  width: "22em"
@@ -1336,36 +1547,36 @@ const Ba = (M) => {
1336
1547
  ] }),
1337
1548
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1338
1549
  /* @__PURE__ */ l.jsx(
1339
- m,
1550
+ v,
1340
1551
  {
1341
1552
  label: "Occupation",
1342
1553
  labelColor: "hfl-text-Gray-600",
1343
1554
  labelSize: "Text sm",
1344
1555
  inputProps: {
1345
- value: t?.occupation,
1556
+ value: a?.occupation,
1346
1557
  placeholder: "Enter Occupation",
1347
1558
  onChange: (e) => {
1348
- i("occupation", e.target.value), he(!0), Rl(e);
1559
+ o("occupation", e.target.value), we(!0), Wl(e);
1349
1560
  },
1350
1561
  onBlur: (e) => {
1351
- e.stopPropagation(), he(!1);
1562
+ e.stopPropagation(), we(!1);
1352
1563
  }
1353
1564
  },
1354
1565
  width: "22em"
1355
1566
  }
1356
1567
  ),
1357
- bl && ne && ne.length > 0 && /* @__PURE__ */ l.jsx(
1568
+ Ol && ye && ye.length > 0 && /* @__PURE__ */ l.jsx(
1358
1569
  "div",
1359
1570
  {
1360
1571
  className: "hfl-absolute hfl-z-10 hfl-mt-1 hfl-max-h-80 hfl-w-full hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Blue_gray-200 hfl-bg-Indigo-25 hfl-shadow-md ",
1361
- children: ne.map((e) => /* @__PURE__ */ l.jsx(
1362
- Q,
1572
+ children: ye.map((e) => /* @__PURE__ */ l.jsx(
1573
+ fe,
1363
1574
  {
1364
1575
  label: e,
1365
1576
  className: "hfl-text-Primary-700",
1366
1577
  onSelect: () => (
1367
1578
  // handleSuggestionClick({ ...restOptions, title })
1368
- Tl(e)
1579
+ Yl(e)
1369
1580
  )
1370
1581
  }
1371
1582
  ))
@@ -1373,65 +1584,65 @@ const Ba = (M) => {
1373
1584
  )
1374
1585
  ] }),
1375
1586
  /* @__PURE__ */ l.jsx(
1376
- m,
1587
+ v,
1377
1588
  {
1378
1589
  label: "Tag",
1379
1590
  labelColor: "hfl-text-Gray-600",
1380
1591
  labelSize: "Text sm",
1381
1592
  inputProps: {
1382
- value: t.tag,
1593
+ value: a.tag,
1383
1594
  placeholder: "Enter Tag",
1384
1595
  onChange: (e) => {
1385
- i("tag", e.target.value);
1596
+ o("tag", e.target.value);
1386
1597
  }
1387
1598
  },
1388
1599
  width: "22em"
1389
1600
  }
1390
1601
  ),
1391
1602
  /* @__PURE__ */ l.jsx(
1392
- m,
1603
+ v,
1393
1604
  {
1394
1605
  label: "Mobile 2",
1395
1606
  labelColor: "hfl-text-Gray-600",
1396
1607
  labelSize: "Text sm",
1397
1608
  inputProps: {
1398
- value: t.phoneSecondary,
1609
+ value: a.phoneSecondary,
1399
1610
  maxLength: 10,
1400
1611
  placeholder: "Enter Secondary Number",
1401
1612
  onChange: (e) => {
1402
- i("phoneSecondary", e.target.value.replace(/[^0-9]/g, ""));
1613
+ o("phoneSecondary", e.target.value.replace(/[^0-9]/g, ""));
1403
1614
  }
1404
1615
  },
1405
1616
  width: "22em"
1406
1617
  }
1407
1618
  ),
1408
1619
  /* @__PURE__ */ l.jsx(
1409
- m,
1620
+ v,
1410
1621
  {
1411
1622
  label: "Aadhar Number",
1412
1623
  labelColor: "hfl-text-Gray-600",
1413
- errorMsg: u.aadhar_number ? u.aadhar_number : void 0,
1624
+ errorMsg: b.aadhar_number ? b.aadhar_number : void 0,
1414
1625
  labelSize: "Text sm",
1415
1626
  inputProps: {
1416
- value: t.aadhar_number,
1627
+ value: a.aadhar_number,
1417
1628
  placeholder: "Aadhar Card Number",
1418
1629
  maxLength: 12,
1419
1630
  onChange: (e) => {
1420
- i("aadhar_number", e.target.value);
1631
+ o("aadhar_number", e.target.value);
1421
1632
  },
1422
1633
  onBlur: () => {
1423
- c((e) => ({
1634
+ p((e) => ({
1424
1635
  ...e,
1425
- aadhar_number: t.aadhar_number && t.aadhar_number.length != 12 ? "Please enter 12 digit aadhar number" : ""
1636
+ aadhar_number: a.aadhar_number && a.aadhar_number.length != 12 ? "Please enter 12 digit aadhar number" : ""
1426
1637
  }));
1427
1638
  }
1428
1639
  },
1429
1640
  width: "22em"
1430
1641
  }
1431
1642
  ),
1432
- /* @__PURE__ */ l.jsx("div", { className: "hfl-grid hfl-grid-cols-2 hfl-gap-x-11 hfl-gap-y-6", children: Zl() })
1643
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-grid hfl-grid-cols-2 hfl-gap-x-11 hfl-gap-y-6", children: oa() })
1433
1644
  ] }),
1434
- /* @__PURE__ */ l.jsx(tl, {}),
1645
+ /* @__PURE__ */ l.jsx(wl, {}),
1435
1646
  /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-flex-col hfl-items-start hfl-justify-start hfl-pt-3", children: /* @__PURE__ */ l.jsxs(
1436
1647
  "div",
1437
1648
  {
@@ -1443,16 +1654,16 @@ const Ba = (M) => {
1443
1654
  "div",
1444
1655
  {
1445
1656
  className: `hfl-flex hfl-flex-col hfl-items-center hfl-justify-between
1446
- ${Ee ? "" : "hfl-hidden"}`,
1657
+ ${qe ? "" : "hfl-hidden"}`,
1447
1658
  children: [
1448
1659
  /* @__PURE__ */ l.jsx(
1449
- y,
1660
+ C,
1450
1661
  {
1451
1662
  hierarchy: "Primary",
1452
1663
  size: "lg",
1453
1664
  textField: "Camera",
1454
1665
  className: "hfl-mb-2",
1455
- onClick: ql,
1666
+ onClick: ta,
1456
1667
  icon: "Left",
1457
1668
  iconFile: "hx_camera"
1458
1669
  }
@@ -1465,18 +1676,18 @@ const Ba = (M) => {
1465
1676
  type: "file",
1466
1677
  style: { display: "none" },
1467
1678
  accept: "image/*",
1468
- onChange: $l
1679
+ onChange: na
1469
1680
  }
1470
1681
  ),
1471
1682
  /* @__PURE__ */ l.jsx(
1472
- y,
1683
+ C,
1473
1684
  {
1474
1685
  hierarchy: "Secondary",
1475
1686
  size: "lg",
1476
1687
  textField: "Upload",
1477
1688
  icon: "Left",
1478
1689
  iconFile: "hx_image-add",
1479
- onClick: Wl
1690
+ onClick: sa
1480
1691
  }
1481
1692
  )
1482
1693
  ] })
@@ -1487,29 +1698,29 @@ const Ba = (M) => {
1487
1698
  "div",
1488
1699
  {
1489
1700
  className: `hfl-relative hfl-flex
1490
- ${Ge ? "" : "hfl-hidden"}`,
1701
+ ${el ? "" : "hfl-hidden"}`,
1491
1702
  children: [
1492
- /* @__PURE__ */ l.jsx("canvas", { ref: Oe, style: { display: "none" } }),
1493
- /* @__PURE__ */ l.jsx("video", { ref: B, className: "hfl-object-fit hfl-h-full hfl-w-full hfl-rounded-3xl", autoPlay: !0 }),
1703
+ /* @__PURE__ */ l.jsx("canvas", { ref: Qe, style: { display: "none" } }),
1704
+ /* @__PURE__ */ l.jsx("video", { ref: $, className: "hfl-object-fit hfl-h-full hfl-w-full hfl-rounded-3xl", autoPlay: !0 }),
1494
1705
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-absolute hfl-bottom-0 hfl-left-0 hfl-right-0 hfl-flex hfl-justify-around", children: [
1495
1706
  /* @__PURE__ */ l.jsx(
1496
- y,
1707
+ C,
1497
1708
  {
1498
1709
  hierarchy: "Primary",
1499
1710
  size: "lg",
1500
1711
  textField: "Cancel",
1501
1712
  className: "hfl-mb-2 hfl-bg-Error-600 hover:hfl-bg-Error-700",
1502
- onClick: Je
1713
+ onClick: ul
1503
1714
  }
1504
1715
  ),
1505
1716
  /* @__PURE__ */ l.jsx(
1506
- y,
1717
+ C,
1507
1718
  {
1508
1719
  hierarchy: "Primary",
1509
1720
  size: "lg",
1510
1721
  textField: "Capture",
1511
1722
  className: "hfl-mb-2 hfl-bg-Primary-600",
1512
- onClick: Ul
1723
+ onClick: ra
1513
1724
  }
1514
1725
  )
1515
1726
  ] })
@@ -1519,9 +1730,9 @@ const Ba = (M) => {
1519
1730
  /* @__PURE__ */ l.jsx(
1520
1731
  "div",
1521
1732
  {
1522
- className: Ee || P || Ge ? "hfl-hidden" : "",
1733
+ className: qe || E || el ? "hfl-hidden" : "",
1523
1734
  onClick: () => {
1524
- ue(!0), R(!0);
1735
+ Ee(!0), K(!0);
1525
1736
  },
1526
1737
  "data-qa": "profile-img",
1527
1738
  children: /* @__PURE__ */ l.jsxs("svg", { width: "76", height: "72", viewBox: "0 0 76 72", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
@@ -1561,12 +1772,12 @@ const Ba = (M) => {
1561
1772
  "div",
1562
1773
  {
1563
1774
  className: `hfl-relative hfl-h-full hfl-w-full
1564
- ${P ? "" : "hfl-hidden"}`,
1775
+ ${E ? "" : "hfl-hidden"}`,
1565
1776
  children: [
1566
1777
  /* @__PURE__ */ l.jsx(
1567
1778
  "img",
1568
1779
  {
1569
- src: P,
1780
+ src: E,
1570
1781
  alt: "ProfilePicturePreview",
1571
1782
  className: "hfl-h-full hfl-w-full hfl-rounded-3xl hfl-object-cover"
1572
1783
  }
@@ -1577,7 +1788,7 @@ const Ba = (M) => {
1577
1788
  className: `hfl-absolute hfl-right-2 hfl-top-2 hfl-flex hfl-h-[40px]
1578
1789
  hfl-w-[40px] hfl-cursor-pointer hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-White`,
1579
1790
  onClick: () => {
1580
- ue(!0), Je();
1791
+ Ee(!0), ul();
1581
1792
  },
1582
1793
  children: /* @__PURE__ */ l.jsx("i", { className: "hx_delete hfl-text-[22px]" })
1583
1794
  }
@@ -1600,60 +1811,54 @@ const Ba = (M) => {
1600
1811
  type: "Text md",
1601
1812
  className: "hfl-cursor-pointer hfl-text-Primary-700",
1602
1813
  onClick: () => {
1603
- Te(!0);
1814
+ We(!0);
1604
1815
  },
1605
1816
  children: "Click Here"
1606
1817
  }
1607
1818
  )
1608
1819
  ] })
1609
1820
  ] }),
1610
- /* @__PURE__ */ l.jsx("div", { className: `${ke ? "" : "hfl-flex hfl-w-full"} hfl-sticky hfl-bottom-0 hfl-bg-White`, children: te ? /* @__PURE__ */ l.jsx(l.Fragment, {}) : /* @__PURE__ */ l.jsxs(
1821
+ /* @__PURE__ */ l.jsx("div", { className: `${Ue ? "" : "hfl-flex hfl-w-full"} hfl-sticky hfl-bottom-0 hfl-bg-White`, children: Q ? /* @__PURE__ */ l.jsx(l.Fragment, {}) : /* @__PURE__ */ l.jsxs(
1611
1822
  "div",
1612
1823
  {
1613
1824
  className: "hfl-flex hfl-h-[118px] hfl-w-full hfl-flex-col hfl-items-center hfl-justify-center hfl-gap-1",
1614
1825
  style: { boxShadow: "-3px -1px 4px rgba(0, 0, 0, 0.25)" },
1615
1826
  children: [
1616
1827
  window.location?.href.indexOf("/frontdesk") == -1 && /* @__PURE__ */ l.jsx(
1617
- y,
1828
+ C,
1618
1829
  {
1619
- disabled: Fe,
1830
+ disabled: zl,
1620
1831
  hierarchy: "Primary",
1621
1832
  size: "sm",
1622
1833
  textField: "Add & Create Rx",
1623
1834
  className: "hfl-bg-Primary-600",
1624
- onClick: () => {
1625
- Fe || (J(!0), re("Rx"), O ? ye("Rx") : K(!1, "Rx"));
1626
- }
1835
+ onClick: ha
1627
1836
  }
1628
1837
  ),
1629
1838
  /* @__PURE__ */ l.jsx("div", { children: window.location?.href.indexOf("/frontdesk") == -1 && /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text sm", children: "or" }) }),
1630
1839
  /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-items-start hfl-gap-2", children: [
1631
1840
  /* @__PURE__ */ l.jsx(
1632
- y,
1841
+ C,
1633
1842
  {
1634
1843
  hierarchy: "Secondary",
1635
1844
  size: "sm",
1636
1845
  textField: "Add & Create Bill",
1637
1846
  className: "hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",
1638
- onClick: () => {
1639
- re("Bill"), O ? ye("Bill") : K(!1, "Bill");
1640
- }
1847
+ onClick: da
1641
1848
  }
1642
1849
  ),
1643
1850
  /* @__PURE__ */ l.jsx(
1644
- y,
1851
+ C,
1645
1852
  {
1646
1853
  hierarchy: "Secondary",
1647
1854
  size: "sm",
1648
1855
  textField: "Add & Create Appointment",
1649
1856
  className: "hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",
1650
- onClick: () => {
1651
- re("Appointment"), O ? ye("Appointment") : K(!1, "Appointment");
1652
- }
1857
+ onClick: fa
1653
1858
  }
1654
1859
  )
1655
1860
  ] }),
1656
- /* @__PURE__ */ l.jsx("div", { className: "hfl-absolute hfl-z-[100]", children: /* @__PURE__ */ l.jsx(ea, { toastList: Pl }) })
1861
+ /* @__PURE__ */ l.jsx("div", { className: "hfl-absolute hfl-z-[100]", children: /* @__PURE__ */ l.jsx(xa, { toastList: Gl }) })
1657
1862
  ]
1658
1863
  }
1659
1864
  ) })
@@ -1662,5 +1867,5 @@ const Ba = (M) => {
1662
1867
  );
1663
1868
  };
1664
1869
  export {
1665
- Ba as P
1870
+ Ua as P
1666
1871
  };