hplx-feature-library 1.0.163 → 1.0.164

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 (145) hide show
  1. package/dist/Attachments/components/document-canvas/document-pen-tool.d.ts +1 -1
  2. package/dist/Attachments/components/drag-drop-overlay.d.ts +1 -1
  3. package/dist/Attachments/components/edit-document-modal.d.ts +1 -1
  4. package/dist/Attachments/components/uploading-toast.d.ts +1 -1
  5. package/dist/Attachments/context/index.d.ts +2 -2
  6. package/dist/Attachments/hooks/useDropdownPosition.d.ts +1 -1
  7. package/dist/Attachments/index.js +562 -541
  8. package/dist/CameraCapture/index.d.ts +1 -1
  9. package/dist/PediatricsCalculator/components/PediatricsCalculatorTableContext.d.ts +1 -1
  10. package/dist/PediatricsCalculator/index.js +1 -1
  11. package/dist/PediatricsCalculatorTable-BglWcUGO.cjs +40 -0
  12. package/dist/PediatricsCalculatorTable-Dwluo5W0.js +2163 -0
  13. package/dist/components/CustomDropdown.d.ts +1 -1
  14. package/dist/hplx-feature-library.css +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/useOutsideClick-COATBT9j.cjs +92 -0
  17. package/dist/useOutsideClick-CYAjbj1N.js +6878 -0
  18. package/package.json +4 -31
  19. package/dist/APIAction-Dwk0qXbN.cjs +0 -9
  20. package/dist/APIAction-Zpy6wLQC.js +0 -4033
  21. package/dist/PatientAddEdit/index.js +0 -1661
  22. package/dist/PatientPopup/action/APIAction.d.ts +0 -65
  23. package/dist/PatientPopup/app/PatientPopupContainer.d.ts +0 -6
  24. package/dist/PatientPopup/app/PatientPopupContext.d.ts +0 -30
  25. package/dist/PatientPopup/common/common.d.ts +0 -14
  26. package/dist/PatientPopup/components/Lab/HPLXLab.d.ts +0 -8
  27. package/dist/PatientPopup/components/Lab/LISLab.d.ts +0 -8
  28. package/dist/PatientPopup/components/Lab/LabTable.d.ts +0 -5
  29. package/dist/PatientPopup/components/Lab/index.d.ts +0 -5
  30. package/dist/PatientPopup/components/Loader/Loader.d.ts +0 -2
  31. package/dist/PatientPopup/components/Pagination.d.ts +0 -9
  32. package/dist/PatientPopup/components/Profile/Abha.d.ts +0 -11
  33. package/dist/PatientPopup/components/Profile/PatientDetailsModal.d.ts +0 -1
  34. package/dist/PatientPopup/components/Profile/Profile.d.ts +0 -11
  35. package/dist/PatientPopup/components/Profile/Sms.d.ts +0 -2
  36. package/dist/PatientPopup/components/Visits/Table.d.ts +0 -11
  37. package/dist/PatientPopup/components/Visits/index.d.ts +0 -15
  38. package/dist/PatientPopup/components/addBills/AddBillFooter.d.ts +0 -2
  39. package/dist/PatientPopup/components/addBills/AddBills.d.ts +0 -5
  40. package/dist/PatientPopup/components/addBills/AddBillsTable.d.ts +0 -17
  41. package/dist/PatientPopup/components/addBills/DropDown.d.ts +0 -15
  42. package/dist/PatientPopup/components/appointment/AllAppts.d.ts +0 -8
  43. package/dist/PatientPopup/components/appointment/Appointment.d.ts +0 -2
  44. package/dist/PatientPopup/components/appointment/AppointmentsTable.d.ts +0 -10
  45. package/dist/PatientPopup/components/bills/Bills.d.ts +0 -6
  46. package/dist/PatientPopup/components/bills/BillsTable.d.ts +0 -11
  47. package/dist/PatientPopup/components/deposit/DepositSection.d.ts +0 -9
  48. package/dist/PatientPopup/components/mainNavItem/MainNavItem.d.ts +0 -13
  49. package/dist/PatientPopup/components/patientPopupBody/PatientPopupBody.d.ts +0 -8
  50. package/dist/PatientPopup/components/patientPopupHeader/PatientPopupHeader.d.ts +0 -10
  51. package/dist/PatientPopup/components/patientPopupSummary/BillSummary.d.ts +0 -19
  52. package/dist/PatientPopup/components/patientPopupSummary/ConsultationDetails.d.ts +0 -14
  53. package/dist/PatientPopup/components/patientPopupSummary/DeleteItem.d.ts +0 -11
  54. package/dist/PatientPopup/components/patientPopupSummary/DepositRefundSummary.d.ts +0 -8
  55. package/dist/PatientPopup/components/patientPopupSummary/LabServiceDetails.d.ts +0 -13
  56. package/dist/PatientPopup/components/patientPopupSummary/OtherServiceDetails.d.ts +0 -13
  57. package/dist/PatientPopup/components/patientPopupSummary/PatientPopupSummary.d.ts +0 -8
  58. package/dist/PatientPopup/components/patientPopupSummary/PaymentCard.d.ts +0 -25
  59. package/dist/PatientPopup/components/patientPopupSummary/ServiceLevelBillSummary.d.ts +0 -18
  60. package/dist/PatientPopup/components/payments/DepositRefundTable.d.ts +0 -14
  61. package/dist/PatientPopup/components/payments/OtherServicesTable.d.ts +0 -16
  62. package/dist/PatientPopup/components/payments/PaymentEditModal.d.ts +0 -15
  63. package/dist/PatientPopup/components/payments/PaymentHeader.d.ts +0 -7
  64. package/dist/PatientPopup/components/payments/Payments.d.ts +0 -5
  65. package/dist/PatientPopup/components/payments/PaymentsTable.d.ts +0 -14
  66. package/dist/PatientPopup/constants/AppConstants.d.ts +0 -123
  67. package/dist/PatientPopup/index.d.ts +0 -1
  68. package/dist/PatientPopup/index.js +0 -135387
  69. package/dist/PatientPopup/types/hplxAPITypes.d.ts +0 -37
  70. package/dist/PatientPopup/utils/PrintFontLoader.d.ts +0 -4
  71. package/dist/PatientPopup/utils/helperFunctions.d.ts +0 -3
  72. package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +0 -9
  73. package/dist/PediatricsCalculatorTable-qu37FR7D.js +0 -1175
  74. package/dist/ReusableModal-2GKjVVbf.cjs +0 -1
  75. package/dist/ReusableModal-BL_DwV8I.js +0 -29
  76. package/dist/Subscription/components/SubscriptionBadge.d.ts +0 -2
  77. package/dist/changePasswordModal/APIAction/APIActions.d.ts +0 -8
  78. package/dist/changePasswordModal/component/ChangePasswordModal.d.ts +0 -14
  79. package/dist/common/APIAction/APIAction.d.ts +0 -28
  80. package/dist/common/components/BorderFullWidth.d.ts +0 -2
  81. package/dist/common/components/table/ExistingPatients.d.ts +0 -17
  82. package/dist/common/editRibbon/EditRibbon.d.ts +0 -9
  83. package/dist/common/utils/NetworkInstance.d.ts +0 -4
  84. package/dist/common/utils/common-utils.d.ts +0 -36
  85. package/dist/components/PatientAddEdit.d.ts +0 -3
  86. package/dist/constants/CommonConstant.d.ts +0 -70
  87. package/dist/fonts/AnekMalayalam-Bold.ttf +0 -0
  88. package/dist/fonts/AnekMalayalam-Regular.ttf +0 -0
  89. package/dist/fonts/Arial-Bold-Italic.ttf +0 -0
  90. package/dist/fonts/Arial-Bold.ttf +0 -0
  91. package/dist/fonts/Arial-Italic.ttf +0 -0
  92. package/dist/fonts/Arial.ttf +0 -0
  93. package/dist/fonts/IndianRupee.ttf +0 -0
  94. package/dist/fonts/MuktaMaheePunjabi-Bold.ttf +0 -0
  95. package/dist/fonts/MuktaMaheePunjabi-Regular.ttf +0 -0
  96. package/dist/fonts/Noto-Sans-Telugu-Bold.ttf +0 -0
  97. package/dist/fonts/Noto-Sans-Telugu-Regular.ttf +0 -0
  98. package/dist/fonts/NotoNastaliqUrdu-Bold.ttf +0 -0
  99. package/dist/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
  100. package/dist/fonts/NotoSansArabic-Bold.ttf +0 -0
  101. package/dist/fonts/NotoSansArabic.ttf +0 -0
  102. package/dist/fonts/NotoSansHindi-Bold.ttf +0 -0
  103. package/dist/fonts/NotoSansHindi.ttf +0 -0
  104. package/dist/fonts/NotoSansKannada-Bold.ttf +0 -0
  105. package/dist/fonts/NotoSansKannada.ttf +0 -0
  106. package/dist/fonts/NotoSansOriya-Bold.ttf +0 -0
  107. package/dist/fonts/NotoSansOriya.ttf +0 -0
  108. package/dist/fonts/NotoSansTamil-Bold.ttf +0 -0
  109. package/dist/fonts/NotoSansTamil.ttf +0 -0
  110. package/dist/fonts/NotoSerifGujarati-Bold.ttf +0 -0
  111. package/dist/fonts/NotoSerifGujarati-Regular.ttf +0 -0
  112. package/dist/fonts/Roboto-Regular.ttf +0 -0
  113. package/dist/fonts/Times-Bold-Italic.ttf +0 -0
  114. package/dist/fonts/Times-Bold.ttf +0 -0
  115. package/dist/fonts/Times-Italic.ttf +0 -0
  116. package/dist/fonts/Times.ttf +0 -0
  117. package/dist/fonts/TiroBangla-Bold.ttf +0 -0
  118. package/dist/fonts/TiroBangla-Regular.ttf +0 -0
  119. package/dist/fonts/Verdana-Bold-Italic.ttf +0 -0
  120. package/dist/fonts/Verdana-Bold.ttf +0 -0
  121. package/dist/fonts/Verdana-Italic.ttf +0 -0
  122. package/dist/fonts/Verdana.ttf +0 -0
  123. package/dist/hooks/useMediaQuery.d.ts +0 -1
  124. package/dist/index-BzwuwvT5.js +0 -961
  125. package/dist/index-CJ2AKRoq.cjs +0 -102
  126. package/dist/index-CRCsQdYf.cjs +0 -32
  127. package/dist/index-UPYT3B9g.js +0 -7241
  128. package/dist/nineDots/NineDotsTypes.d.ts +0 -22
  129. package/dist/nineDots/NineDotsUtils.d.ts +0 -3
  130. package/dist/nineDots/nineDots.d.ts +0 -3
  131. package/dist/searchPatients/SearchPatients.d.ts +0 -11
  132. package/dist/types/APIEndPoints.d.ts +0 -11
  133. package/dist/types/ApiResponseTypes.d.ts +0 -290
  134. package/dist/types/CommonTypes.d.ts +0 -255
  135. package/dist/types/PatientAddEditTypes/index.js +0 -1
  136. package/dist/types/PatientAddEditTypes.d.ts +0 -7
  137. package/dist/types/PatientPopupTypes/index.js +0 -1
  138. package/dist/types/PatientPopupTypes.d.ts +0 -836
  139. package/dist/useOutsideClick-C4Q0aGuf.js +0 -15
  140. package/dist/useOutsideClick-CicUjzPP.cjs +0 -1
  141. package/dist/userProfile/APIAction/APIActions.d.ts +0 -18
  142. package/dist/userProfile/UserProfile.d.ts +0 -18
  143. package/dist/userProfile/UserProfileItem.d.ts +0 -7
  144. package/dist/warning-BozzKWdr.js +0 -38
  145. package/dist/warning-W0tkkrLJ.cjs +0 -1
@@ -1,1661 +0,0 @@
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-UPYT3B9g.js";
2
- import { g as ae, i as la, d as aa, c as ta, a as ra, b as sa, p as na, e as oa, f as ia, H as ha, h as Ke, j as Qe, v as Xe, k as ee, l as el, D as je, M as Ce, m as le, S as da, n as ll, E as Ne, o as fa, q as al, r as ca, u as pa, s as ua, C as Pe, O as De, t as ma, w as ga } from "../APIAction-Zpy6wLQC.js";
3
- import { M as xa } from "../index-BzwuwvT5.js";
4
- import { useState as n, useRef as Y, useCallback as q, useEffect as k, useMemo as _a } from "react";
5
- 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 }) => {
6
- const [N, L] = n(!1);
7
- return /* @__PURE__ */ l.jsxs("div", { children: [
8
- /* @__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." }) }),
9
- /* @__PURE__ */ l.jsxs("table", { className: "hfl-mx-7", children: [
10
- /* @__PURE__ */ l.jsx("thead", { children: /* @__PURE__ */ l.jsxs("tr", { className: "hfl-w-full", children: [
11
- /* @__PURE__ */ l.jsx(
12
- "th",
13
- {
14
- className: "hfl-w-[40px] hfl-max-w-[40px] hfl-rounded-tl hfl-border hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]",
15
- children: /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-flex hfl-items-center hfl-text-Gray-500", children: "#" })
16
- }
17
- ),
18
- /* @__PURE__ */ l.jsx(
19
- "th",
20
- {
21
- className: "hfl-w-[20%] hfl-max-w-[40px] hfl-rounded-tl hfl-border hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]",
22
- children: /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-flex hfl-items-center hfl-text-Gray-500", children: "Name" })
23
- }
24
- ),
25
- /* @__PURE__ */ l.jsx(
26
- "th",
27
- {
28
- className: "hfl-w-[20%] hfl-max-w-[40px] hfl-rounded-tl hfl-border hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]",
29
- children: /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-flex hfl-items-center hfl-text-Gray-500", children: "Phone No" })
30
- }
31
- ),
32
- /* @__PURE__ */ l.jsx(
33
- "th",
34
- {
35
- className: "hfl-w-[20%] hfl-max-w-[40px] hfl-rounded-tl hfl-border hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]",
36
- children: /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-flex hfl-items-center hfl-text-Gray-500", children: "Email" })
37
- }
38
- ),
39
- /* @__PURE__ */ l.jsx(
40
- "th",
41
- {
42
- className: "hfl-w-[20%] hfl-max-w-[40px] hfl-rounded-tl hfl-border hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]",
43
- children: /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-flex hfl-items-center hfl-text-Gray-500", children: "Branch" })
44
- }
45
- ),
46
- /* @__PURE__ */ l.jsx(
47
- "th",
48
- {
49
- className: "hfl-w-[20%] hfl-max-w-[40px] hfl-rounded-tl hfl-rounded-tr hfl-border-b hfl-border-r hfl-border-Blue_gray-100 hfl-bg-Blue_gray-50 hfl-px-2 hfl-py-[6px]"
50
- }
51
- )
52
- ] }) }),
53
- M.map((o, p) => /* @__PURE__ */ l.jsxs("tr", { className: "hfl-w-full hfl-border-1 hfl-border-Gray-100", children: [
54
- /* @__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 }) }),
55
- /* @__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 }) }),
56
- /* @__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 }) }),
57
- /* @__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
- /* @__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" }) }),
59
- /* @__PURE__ */ l.jsx(
60
- "td",
61
- {
62
- className: "hfl-flex hfl-items-center hfl-justify-center hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",
63
- children: window.role_id == "11" && /* @__PURE__ */ l.jsx(
64
- y,
65
- {
66
- hierarchy: "Secondary",
67
- size: "sm",
68
- textField: "Continue",
69
- className: "hfl-text-Primary-700",
70
- onClick: async () => {
71
- 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}`);
72
- }
73
- }
74
- )
75
- }
76
- )
77
- ] }))
78
- ] }),
79
- /* @__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" }) }),
80
- /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-justify-center", children: /* @__PURE__ */ l.jsx(
81
- y,
82
- {
83
- disabled: N,
84
- hierarchy: "Primary",
85
- size: "xl",
86
- textField: "Create As New Patient",
87
- className: "hfl-bg-Primary-700",
88
- onClick: () => {
89
- L(!0), v(!0, T);
90
- }
91
- }
92
- ) })
93
- ] });
94
- };
95
- function ya(M) {
96
- const { editPatient: v, setEditPatient: T, createAsNew: N, setCreateAsNew: L } = M, o = () => v ? "Primary" : "Secondary", p = () => N ? "Primary" : "Secondary";
97
- 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: [
98
- /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text md", className: "hfl-text-Error-700", children: "Are you updating" }),
99
- /* @__PURE__ */ l.jsx(
100
- y,
101
- {
102
- hierarchy: o(),
103
- size: "lg",
104
- textField: "Exisitng Patient",
105
- onClick: () => {
106
- T(!0), L(!1);
107
- }
108
- }
109
- ),
110
- /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text md", className: "hfl-text-Error-700", children: "or creating a" }),
111
- /* @__PURE__ */ l.jsx(
112
- y,
113
- {
114
- hierarchy: p(),
115
- size: "lg",
116
- textField: "New Patient",
117
- onClick: () => {
118
- L(!0), T(!1);
119
- }
120
- }
121
- )
122
- ] });
123
- }
124
- const Na = (M) => {
125
- 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({
126
- name: "",
127
- phone: "",
128
- age: "",
129
- gender: "",
130
- email: "",
131
- aadhar_number: ""
132
- }), [W, ul] = n([]), [$, D] = n({
133
- name: !1,
134
- phone: !1
135
- }), [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({
136
- name: "",
137
- phone: "",
138
- dob: "",
139
- gender: "",
140
- //(0 for male, 1 for female, 2 for others),
141
- honorific: "",
142
- patient_preferred_language: N?.visit_pad_json ? JSON.parse(N?.visit_pad_json)?.defaultLanguage?.rows : "",
143
- age: "",
144
- age_selector: "years",
145
- // 2 for years, 3 for months, 4 for weeks and 5 for days
146
- blood_group: "",
147
- email: "",
148
- address: "",
149
- city: "",
150
- existingBidStr: "",
151
- pincode: "",
152
- ref_doc_name: "",
153
- ref_doc_spec: "",
154
- temp_appnt_id: "",
155
- //not used
156
- throughChannel: "",
157
- refDocId: "",
158
- careOf: "",
159
- phoneSecondary: "",
160
- occupation: "",
161
- tag: "",
162
- phone_otp: "",
163
- regAsNew: "",
164
- image_link: "",
165
- marital_status: "",
166
- spouse_blood_group: "",
167
- married_since: "",
168
- spouse_name: "",
169
- org_person_dob: "",
170
- aadhar_number: "",
171
- custom_fields: []
172
- }), [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) => {
173
- Dl([
174
- {
175
- id: 1,
176
- title: e,
177
- description: a,
178
- type: r,
179
- duration: s
180
- }
181
- ]);
182
- }, 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 && la(g.visit_pad_json) && JSON.parse(g.visit_pad_json), He = aa((...e) => {
183
- const [a, r] = e;
184
- Il(a, r);
185
- }), i = q(
186
- (e, a) => {
187
- J(!1), j((r) => ({ ...r, [e]: a })), (e === "name" || e === "phone" && a.length >= 3) && He(e, a);
188
- },
189
- [He]
190
- ), kl = (e) => {
191
- i("throughChannel", e.value.trim()), ie(!1);
192
- }, Tl = (e) => {
193
- i("occupation", e.trim()), he(!1);
194
- }, Ll = (e) => {
195
- i("city", e.trim()), de(!1);
196
- }, Al = (e) => {
197
- const { value: a } = e.target, r = Ol(a);
198
- ml(r);
199
- }, Rl = (e) => {
200
- const { value: a } = e.target, r = Gl(a);
201
- gl(r);
202
- }, Ml = (e) => {
203
- const { value: a } = e.target, r = Fl(a);
204
- vl(r);
205
- }, Ol = (e) => {
206
- if (oe?.length) {
207
- let a = oe;
208
- return e?.length && (a = oe.filter(
209
- (r) => r.title.toLowerCase().includes(e.toLowerCase())
210
- // last keyboad input after ,
211
- )), a;
212
- } else
213
- return [];
214
- }, Gl = (e) => {
215
- if (De?.length) {
216
- let a = De;
217
- return e?.length && (a = De.filter(
218
- (r) => r.toLowerCase().includes(e.toLowerCase())
219
- // last keyboad input after ,
220
- )), a;
221
- } else
222
- return [];
223
- }, Fl = (e) => {
224
- if (Pe?.length) {
225
- let a = Pe;
226
- return e?.length && (a = Pe.filter(
227
- (r) => r.toLowerCase().includes(e.toLowerCase())
228
- // last keyboad input after ,
229
- )), a;
230
- } else
231
- return [];
232
- }, Ve = Y(null), Z = Y(null), me = Y(null), Ye = window.location?.pathname.includes("/frontdesk");
233
- k(() => {
234
- const e = ta(t.age, S);
235
- e && j((a) => ({
236
- ...a,
237
- dob: e
238
- }));
239
- }, [S, t.age]);
240
- const ge = q(
241
- (e) => {
242
- ce(e), i("gender", e), c((a) => ({
243
- ...a,
244
- gender: ""
245
- }));
246
- },
247
- [i]
248
- ), qe = (e) => {
249
- (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);
250
- }, Ue = q(() => {
251
- U(t.image_link), R(!1), I(!1);
252
- }, [t.image_link]), We = q(async () => {
253
- const e = await ra(
254
- "patient_config",
255
- o?.org_branch_id_for_seg?.toString() || "",
256
- { token: p, envName: b }
257
- );
258
- Bl(e);
259
- }, [p, b, o?.org_branch_id_for_seg]);
260
- k(() => (document.addEventListener("mousedown", qe), () => {
261
- document.removeEventListener("mousedown", qe);
262
- }), []), k(() => {
263
- o.doctor_speciality === "Gynaecologist" && !t.gender && ge("1");
264
- }, [t.gender, ge, o.doctor_speciality]), k(() => {
265
- t.image_link && Ue(), t.honorific && Re(t.honorific);
266
- }, [t.honorific, t.image_link, Ue]), k(() => {
267
- Ye && Te(!0);
268
- }, [Ye]), k(() => {
269
- We();
270
- }, [We]), k(() => {
271
- (async () => {
272
- pl(N);
273
- try {
274
- const e = await sa({ token: p, envName: b }), { total_ref_doc_details: a, through_channel: r } = e;
275
- a.length && jl(na(a)), r.length && xl(oa(r));
276
- } catch (e) {
277
- console.log("ERROR", e);
278
- }
279
- })();
280
- }, [N, p, b]);
281
- const Il = async (e, a) => {
282
- const r = {
283
- branch_id: o?.org_branch_id_for_seg || "",
284
- doctor_id: o?.person_id_for_seg || "",
285
- doctor_role_id: o?.doctor_role_id_for_seg || "",
286
- term: encodeURIComponent(a),
287
- limit: 30
288
- }, s = await ua(r, { token: p, envName: b });
289
- if (!s) {
290
- D({ name: !1, phone: !1 });
291
- return;
292
- }
293
- !s.apiError && Number(s.total_persons) > 0 ? (ul(s.persons), D(e === "name" ? { ...$, name: !0 } : { ...$, phone: !0 })) : D({ name: !1, phone: !1 });
294
- }, xe = (e) => {
295
- switch (e) {
296
- case "Appointment":
297
- return "#Appnt";
298
- default:
299
- return "";
300
- }
301
- }, _e = (e) => {
302
- switch (e) {
303
- case "Bill":
304
- case "Appointment":
305
- return "emrPatientPopUp.php?pid=";
306
- default:
307
- return Ne.visitpad + "?pid=";
308
- }
309
- }, zl = q(
310
- (e) => {
311
- ia({ callback: (r) => {
312
- j({
313
- name: r?.name || "",
314
- phone: r?.phone_number || "",
315
- gender: r?.gender || "",
316
- honorific: r?.honorific || "",
317
- patient_preferred_language: r?.patient_preferred_language || "",
318
- ref_doc_spec: r?.ref_doc_spec || "",
319
- age: r?.age.toString() || "",
320
- age_selector: "2",
321
- //hardcoded as suggested by backend
322
- dob: r.org_person_dob || "",
323
- org_person_dob: r.org_person_dob || "",
324
- blood_group: r?.blood_group || "",
325
- email: r?.email || "",
326
- address: r?.address || "",
327
- city: r?.city || "",
328
- existingBidStr: r?.org_person_bid_str || "",
329
- pincode: r?.pincode || "",
330
- ref_doc_name: r?.ref_doc_name || "",
331
- temp_appnt_id: "",
332
- throughChannel: r?.through_channel || "",
333
- refDocId: r?.ref_doc_id || "",
334
- careOf: r?.care_of || "",
335
- phoneSecondary: r?.phone_secondary || "",
336
- occupation: r?.occupation || "",
337
- tag: r?.tag || "",
338
- phone_otp: "",
339
- regAsNew: "",
340
- image_link: r?.image_link || "",
341
- marital_status: r.marital_status || "",
342
- spouse_blood_group: r.spouse_blood_group || "",
343
- married_since: r.married_since || "",
344
- spouse_name: r.spouse_name || "",
345
- aadhar_number: r.aadhar_number || "",
346
- custom_fields: r.custom_fields || []
347
- }), ce(r?.gender);
348
- }, payload: e, token_env: { token: p, envName: b } });
349
- },
350
- [b, p]
351
- ), $e = async (e) => {
352
- Ie(!0);
353
- const a = {
354
- branch_id: o?.org_branch_id_for_seg?.toString() || "",
355
- person_id: o?.person_id_for_seg || "",
356
- person_role_id: o?.doctor_role_id_for_seg || "",
357
- patient_role_id: e.person_role_id || ""
358
- };
359
- zl(a), D({ name: !1, phone: !1 }), dl(!0), sl(e);
360
- }, Hl = () => {
361
- let e = !0;
362
- return t.name ? t.name.length < 2 && (c((a) => ({
363
- ...a,
364
- name: "Enter at least 2 letters "
365
- })), e = !1) : (c((a) => ({
366
- ...a,
367
- name: "Enter the Name of the Patient"
368
- })), e = !1), (g && g.phone_number_length && t.phone.length != 10 || t.phone.length && t.phone.length != 10) && (c((a) => ({
369
- ...a,
370
- phone: "Please enter 10 digit number"
371
- })), e = !1), t.aadhar_number && t.aadhar_number.length != 12 && (c((a) => ({
372
- ...a,
373
- aadhar_number: "Please enter 12 digit aadhar number"
374
- })), e = !1), z(S).length && F?.length === 0 && (c((a) => ({
375
- ...a,
376
- age: "Invalid Age."
377
- })), e = !1), Cl === "" && (c((a) => ({
378
- ...a,
379
- gender: "Select Gender"
380
- })), e = !1), u.email.length && (t.email && !ll().email().isValidSync(t.email) && c((a) => ({
381
- ...a,
382
- email: "Email format is wrong"
383
- })), e = !1), e;
384
- }, K = async (e, a) => {
385
- try {
386
- if (!Hl()) {
387
- E("Invalid form", "Please fill in the required fields", "Error", 3e3);
388
- return;
389
- }
390
- const s = new FormData();
391
- s.append("name", t.name), s.append("phone", t.phone), s.append("gender", fa(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");
392
- const f = Object.fromEntries(s.entries()), x = Object.fromEntries(
393
- Object.entries(f).map(([V, Kl]) => [V, String(Kl)])
394
- ), _ = {
395
- ...x,
396
- custom_fields: JSON.parse(x.custom_fields || "[]"),
397
- doctor_role_id: o.doctor_role_id_for_seg || "",
398
- doctor_id: o.person_id_for_seg || "",
399
- org_branch_id: o.org_branch_id_for_seg || "",
400
- source: "emr",
401
- ip: ""
402
- }, d = await ca(_, { token: p, envName: b });
403
- if (d.apiError)
404
- E("Error", d.apiError, "Error", 3e3), J(!1);
405
- else {
406
- if (e) {
407
- try {
408
- P && await be(d.person_role_id.toString(), d.org_person_bid_str.toString());
409
- } catch (V) {
410
- console.log(V);
411
- }
412
- a !== "Rx" && C && C?.mode_of_patient_popup?.include == "1" && typeof o.patientPopupHandler < "u" ? o.patientPopupHandler(
413
- "addpatient",
414
- d.person_role_id.toString(),
415
- d.person_id.toString(),
416
- g,
417
- C,
418
- a
419
- ) : ae(_e(a) + d.person_role_id.toString() + xe(a)), v();
420
- return;
421
- } else {
422
- try {
423
- P && await be(d.person_role_id.toString(), d.org_person_bid_str.toString());
424
- } catch (V) {
425
- console.log(V);
426
- }
427
- H();
428
- }
429
- 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(
430
- "addpatient",
431
- d.person_role_id.toString(),
432
- d.person_id.toString(),
433
- g,
434
- C,
435
- a
436
- ) : ae(_e(a) + d.person_role_id.toString() + xe(a)), v());
437
- }
438
- } catch (r) {
439
- console.log(r);
440
- }
441
- }, Vl = () => {
442
- try {
443
- const e = {
444
- "/md/viewRemoteAppointments.php": ["onlineConsultationHead", "bannerPopupWrap", "calendarViewClassDiv"],
445
- [Ne.consultations]: [
446
- "onlineConsultationHead",
447
- "newPaddingMarginEMR",
448
- "bannerPopupWrap",
449
- "consultations_mfe"
450
- ],
451
- [Ne.appointments]: ["appointments_mfe"]
452
- }, a = window.location?.pathname || "", r = e[a];
453
- if (!r?.length) return;
454
- const s = document.getElementById("react_emr_mfe"), f = document.getElementById("react_curtains_mfe"), x = document.querySelector(".offlineEMR3");
455
- [s, f, x].forEach((_) => {
456
- _ && _.classList.contains("hidden") && _.classList.remove("hidden");
457
- });
458
- for (const _ of r) {
459
- const d = document.getElementsByClassName(_);
460
- d.length && !d[0].classList.contains("hidden") && d[0].classList.add("hidden");
461
- }
462
- } catch (e) {
463
- console.error("Error in manipulating DOM:", e);
464
- }
465
- }, be = async (e, a) => {
466
- const r = new FormData();
467
- r.append("pid", e), r.append("bidstr", a), r.append("imgData", P);
468
- const s = await ma(r, { token: p, envName: b });
469
- s.apiError && E("Error", s.apiError, "Error", 3e3);
470
- }, ye = async (e) => {
471
- const a = {
472
- patient_id: A?.person_id,
473
- honorific: t?.honorific,
474
- name: t?.name,
475
- gender: t?.gender,
476
- age: t?.age,
477
- org_person_dob: t?.dob ? t.dob : al(t?.age, S) || void 0,
478
- phone_number: t?.phone,
479
- email: t?.email,
480
- blood_group: t?.blood_group,
481
- patient_preferred_language: t?.patient_preferred_language,
482
- address: t?.address,
483
- city: t?.city,
484
- pincode: t?.pincode,
485
- org_person_bid_str: t?.existingBidStr,
486
- ref_doc_name: t?.ref_doc_name,
487
- ref_doc_spec: t?.ref_doc_spec,
488
- through_channel: t?.throughChannel,
489
- ref_doc_id: t?.refDocId,
490
- care_of: t?.careOf,
491
- phone_secondary: t?.phoneSecondary,
492
- occupation: t?.occupation,
493
- tag: t?.tag,
494
- marital_status: t.marital_status,
495
- married_since: t.married_since,
496
- spouse_name: t.spouse_name,
497
- spouse_blood_group: t.spouse_blood_group,
498
- image_link: t?.image_link,
499
- remote_consultation_id: "0",
500
- oc_status: !1,
501
- aadhar_number: t?.aadhar_number,
502
- person_role_id: o.doctor_role_id_for_seg || "",
503
- person_id: o.person_id_for_seg || "",
504
- branch_id: o.org_branch_id_for_seg || ""
505
- }, r = await pa(a, { token: p, envName: b });
506
- if (O) {
507
- r && J(!1);
508
- const { message: s, status: f } = r || {};
509
- if (f) {
510
- E("Patient Edited", "Patient Edited Successfully", "Success", 1500);
511
- try {
512
- t?.image_link && !P ? Yl(A?.person_role_id) : P && El && (ue(!1), await be(A?.person_role_id, t?.existingBidStr));
513
- } catch (x) {
514
- console.log(x);
515
- }
516
- e !== "Rx" && C && C?.mode_of_patient_popup?.include == "1" && typeof o.patientPopupHandler < "u" ? o.patientPopupHandler(
517
- "addpatient",
518
- A?.person_role_id,
519
- A?.person_id,
520
- g,
521
- C,
522
- e
523
- ) : ae(_e(e) + A?.person_role_id?.toString() + xe(e)), v();
524
- } else
525
- E("Patient Not Edited", s || "Patient Not Edited", "Failure", 1500);
526
- }
527
- }, Yl = async (e) => {
528
- const a = new FormData();
529
- a.append("pid", e);
530
- const r = await ga(a, { token: p, envName: b });
531
- r.apiError && E("Error", r.apiError, "Error", 3e3);
532
- }, z = (e = "") => {
533
- const a = e?.toLowerCase();
534
- 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";
535
- }, ql = async () => {
536
- try {
537
- R(!1);
538
- const e = await navigator.mediaDevices.getUserMedia({ video: !0 });
539
- B.current && (B.current.srcObject = e), I(!0);
540
- } catch (e) {
541
- console.error("Error accessing camera:", e);
542
- }
543
- }, Ul = () => {
544
- const e = Oe.current, a = B.current;
545
- if (e && a) {
546
- e.width = a.videoWidth, e.height = a.videoHeight;
547
- const r = e.getContext("2d");
548
- if (r) {
549
- r.drawImage(a, 0, 0, e.width, e.height);
550
- const s = e.toDataURL();
551
- U(s), R(!1), I(!1), H();
552
- }
553
- }
554
- }, Wl = () => {
555
- document.getElementById("upload-local-file")?.click();
556
- }, $l = (e) => {
557
- R(!1), I(!1);
558
- const a = e.target.files?.[0];
559
- if (!a) return;
560
- const r = new FileReader();
561
- r.readAsDataURL(a), r.onloadend = () => {
562
- const s = r.result;
563
- s && U(s.toString()), e.target.value = "";
564
- };
565
- }, Je = () => {
566
- R(!0), U(""), I(!1), H();
567
- }, H = () => {
568
- if (B.current) {
569
- const e = B.current.srcObject;
570
- e instanceof MediaStream && e.getTracks().forEach((a) => a.stop()), B.current.srcObject = null;
571
- }
572
- }, Jl = _a(() => [...ze?.patient_config?.custom_fields || []].sort((r, s) => r.sort - s.sort).map((r) => {
573
- const s = t.custom_fields?.find((f) => f.id === r.id);
574
- return {
575
- ...r,
576
- value: s?.value || "",
577
- title: s?.value ? s?.title : r.title
578
- };
579
- }), [ze?.patient_config?.custom_fields, t.custom_fields]), ve = (e, a, r) => {
580
- j((s) => {
581
- const f = s.custom_fields?.length ? s.custom_fields.map((_) => _.id === e ? { ..._, value: r } : _) : [];
582
- return f.some((_) => _.id === e) || f.push({
583
- id: e,
584
- value: r,
585
- title: a
586
- }), {
587
- ...s,
588
- custom_fields: f
589
- };
590
- });
591
- }, Zl = () => Jl?.map((e) => {
592
- const { id: a, type: r, value: s, title: f } = e || {};
593
- if (!a || !r || !f) return null;
594
- switch (r) {
595
- case "text":
596
- return /* @__PURE__ */ l.jsx(
597
- m,
598
- {
599
- label: f,
600
- labelColor: "hfl-text-Gray-600",
601
- labelSize: "Text sm",
602
- inputProps: {
603
- value: s || "",
604
- placeholder: `Enter ${f}`,
605
- onChange: (x) => {
606
- ve(a, f, x.target.value);
607
- }
608
- },
609
- width: "22em"
610
- },
611
- a
612
- );
613
- case "date":
614
- return /* @__PURE__ */ l.jsx(
615
- we,
616
- {
617
- label: f,
618
- placeholder: `Select ${f}`,
619
- selectDate: s ? new Date(s) : null,
620
- dateVar: (x) => {
621
- ve(a, f, x.toDateString() || "");
622
- },
623
- isborderRequired: !0,
624
- width: "22em",
625
- clearDate: (x) => {
626
- ve(a, f, x);
627
- },
628
- openUp: !0,
629
- backSpaceClearDate: !0
630
- },
631
- a
632
- );
633
- default:
634
- return null;
635
- }
636
- });
637
- return /* @__PURE__ */ l.jsx(
638
- xa,
639
- {
640
- isOpen: T,
641
- onRequestClose: () => {
642
- H(), v();
643
- },
644
- shouldCloseOnOverlayClick: !1,
645
- style: {
646
- content: {
647
- zIndex: 1030,
648
- padding: "0px",
649
- maxWidth: "840px",
650
- maxHeight: "624px",
651
- margin: "auto",
652
- borderRadius: "12px"
653
- },
654
- overlay: {
655
- backgroundColor: "rgba(52, 64, 84, 0.5)",
656
- position: "fixed",
657
- zIndex: 1030
658
- }
659
- },
660
- children: /* @__PURE__ */ l.jsxs("div", { id: "add-patient-modal", children: [
661
- /* @__PURE__ */ l.jsxs(
662
- "div",
663
- {
664
- className: "hfl-flex hfl-h-16 hfl-w-full hfl-flex-row hfl-items-center hfl-justify-between hfl-border-b-1 hfl-border-b-Gray-200 hfl-px-6",
665
- id: "add-patient-header",
666
- "data-qa": "testid_addPatient",
667
- children: [
668
- /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text xl", children: te ? "Patient(s) with Same phone number or Email" : "Add New Patient" }),
669
- /* @__PURE__ */ l.jsx("div", { className: "hfl-items-center", children: /* @__PURE__ */ l.jsx(
670
- "span",
671
- {
672
- className: "hx_close hfl-ml-4 hover:hfl-cursor-pointer",
673
- onClick: () => {
674
- H(), v();
675
- }
676
- }
677
- ) })
678
- ]
679
- }
680
- ),
681
- te ? /* @__PURE__ */ l.jsx(
682
- ba,
683
- {
684
- conflicts: fl,
685
- handleAddPatient: K,
686
- redirectAction: ol,
687
- manipulateExistingDOM: Vl
688
- }
689
- ) : /* @__PURE__ */ l.jsxs("div", { className: "hfl-min-h-[400px] hfl-px-10 hfl-py-5", children: [
690
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between", children: [
691
- /* @__PURE__ */ l.jsxs("div", { children: [
692
- /* @__PURE__ */ l.jsx(
693
- m,
694
- {
695
- label: "Patient Name*",
696
- labelColor: "hfl-text-Gray-600",
697
- labelSize: "Text sm",
698
- prefix: /* @__PURE__ */ l.jsxs(
699
- "div",
700
- {
701
- ref: me,
702
- className: "-hfl-ml-2 hfl-flex hfl-w-16 hfl-items-center hfl-justify-between hfl-bg-Gray-50",
703
- onClick: () => pe((e) => !e),
704
- children: [
705
- /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text md", className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700", children: Ae }),
706
- !Ae.length && /* @__PURE__ */ l.jsx("div", { className: `${Me ? "hx_up" : "hx_down"} -hfl-mr-2` })
707
- ]
708
- }
709
- ),
710
- errorMsg: u.name ? u.name : void 0,
711
- inputProps: {
712
- type: "text",
713
- // onBlur: () => {
714
- // setShowPatientListDD({ name: false, phone: false });
715
- // },
716
- value: Be,
717
- placeholder: "Enter Name",
718
- onChange: (e) => {
719
- i("name", e.target.value);
720
- },
721
- onBlur: () => {
722
- const e = !(t.name.length > 0);
723
- t.name.length > 0 && t.name.length < 2 && !Sl ? c((a) => ({
724
- ...a,
725
- name: "Enter at least 2 letters "
726
- })) : c((a) => ({
727
- ...a,
728
- name: e ? "Enter the Name of the Patient" : ""
729
- })), Ie(!1), D({ name: !1, phone: !1 });
730
- }
731
- // onChange: (e) => {
732
- // handleEditCustomFieldTitle(e);
733
- // },
734
- },
735
- start_icon: "hx_person",
736
- width: "16em"
737
- }
738
- ),
739
- Me && /* @__PURE__ */ l.jsx(
740
- "div",
741
- {
742
- 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",
743
- style: {
744
- boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
745
- },
746
- children: ha.map((e) => /* @__PURE__ */ l.jsx(
747
- Q,
748
- {
749
- className: "hfl-text-Primary-700",
750
- label: e.label,
751
- onSelect: () => {
752
- Re(e.label), pe(!1), ce(e.gender), i("honorific", e.label), i("gender", e.gender), j((a) => ({
753
- ...a,
754
- gender: e.gender,
755
- honorific: e.label
756
- }));
757
- }
758
- }
759
- ))
760
- }
761
- ),
762
- $.name && Be.length > 0 && /* @__PURE__ */ l.jsxs(
763
- "div",
764
- {
765
- 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]",
766
- style: {
767
- boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
768
- },
769
- ref: Z,
770
- children: [
771
- /* @__PURE__ */ l.jsx(h, { className: "hfl-text-Primary-600", variant: "Regular", type: "Text md", children: "Existing Patients" }),
772
- W && W?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
773
- "div",
774
- {
775
- className: "hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",
776
- onMouseDown: () => $e(e),
777
- children: [
778
- /* @__PURE__ */ l.jsxs(
779
- h,
780
- {
781
- variant: "Regular",
782
- type: "Text md",
783
- className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700",
784
- children: [
785
- e?.org_person_name?.length > 13 ? e?.org_person_name?.substring(0, 11) + "..." : e?.org_person_name,
786
- `(${e.ageStr || Ke(e.age)}, ${Qe(
787
- parseInt(e.org_person_gender.toString())
788
- )})`
789
- ]
790
- }
791
- ),
792
- /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text sm", className: "hfl-text-Gray-500", children: e.org_person_phone || "" })
793
- ]
794
- },
795
- e?.person_role_id
796
- ))
797
- ]
798
- }
799
- )
800
- ] }),
801
- /* @__PURE__ */ l.jsxs("div", { children: [
802
- /* @__PURE__ */ l.jsx(
803
- m,
804
- {
805
- label: `Phone Number ${g && g.phone_number_length ? "*" : ""}`,
806
- labelColor: "hfl-text-Gray-600",
807
- labelSize: "Text sm",
808
- errorMsg: u.phone ? u.phone : void 0,
809
- inputProps: {
810
- // value: title,
811
- maxLength: 10,
812
- value: G,
813
- placeholder: "Enter Number",
814
- onChange: (e) => {
815
- i("phone", e.target.value.replace(/[^0-9]/g, ""));
816
- },
817
- onBlur: () => {
818
- const { isError: e = !1, msg: a = "" } = g && g.phone_number_length ? Xe(G) : G ? Xe(G) : {};
819
- c((r) => ({
820
- ...r,
821
- phone: e ? a : ""
822
- })), D({ name: !1, phone: !1 });
823
- }
824
- },
825
- width: "21em",
826
- start_icon: "hx_phone"
827
- }
828
- ),
829
- $.phone && G.length > 0 && /* @__PURE__ */ l.jsxs(
830
- "div",
831
- {
832
- 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]",
833
- style: {
834
- boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
835
- },
836
- ref: Z,
837
- children: [
838
- /* @__PURE__ */ l.jsx(h, { className: "hfl-text-Primary-600", variant: "Regular", type: "Text md", children: "Existing Patients" }),
839
- W && W?.slice(0, 7)?.map((e) => /* @__PURE__ */ l.jsxs(
840
- "div",
841
- {
842
- className: "hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",
843
- onMouseDown: () => $e(e),
844
- children: [
845
- /* @__PURE__ */ l.jsxs(
846
- h,
847
- {
848
- variant: "Regular",
849
- type: "Text md",
850
- className: "hfl-px-1 hfl-py-1 hfl-text-Gray-700",
851
- children: [
852
- e.org_person_name?.length > 13 ? e.org_person_name?.substring(0, 11) + "..." : e.org_person_name,
853
- `(${e.ageStr || Ke(e.age)}, ${Qe(
854
- parseInt(e.org_person_gender.toString())
855
- )})`
856
- ]
857
- }
858
- ),
859
- /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text sm", className: "hfl-text-Gray-500", children: e.org_person_phone })
860
- ]
861
- },
862
- e?.person_role_id
863
- ))
864
- ]
865
- }
866
- )
867
- ] })
868
- ] }),
869
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-justify-between hfl-space-x-2 hfl-pt-4", children: [
870
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-h-[40px] hfl-space-y-1", children: [
871
- /* @__PURE__ */ l.jsx(h, { variant: "Medium", type: "Text sm", className: "hfl-pb-[1px] hfl-text-Gray-600", children: "Gender*" }),
872
- /* @__PURE__ */ l.jsxs("div", { children: [
873
- /* @__PURE__ */ l.jsx(
874
- Ql,
875
- {
876
- className: `!hfl-h-[40px] hfl-w-44 ${u.gender ? "hfl-border-Error-300" : ""}`,
877
- options: [
878
- { label: "M", value: "0" },
879
- { label: "F", value: "1" },
880
- { label: "Other", value: "2" }
881
- ],
882
- value: Nl,
883
- onChange: (e) => ge(e),
884
- disabled: !1
885
- }
886
- ),
887
- !!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 })
888
- ] })
889
- ] }),
890
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-space-x-1", children: [
891
- /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
892
- Ze,
893
- {
894
- label: "Age or DOB*",
895
- className: "hfl-w-20",
896
- classNamedoubleInput: "hfl-relative",
897
- suffixClassName: "hfl-w-16 hfl-border-0",
898
- suffixDropdownClassName: "hfl-ml-[80px]",
899
- input1value: t.age,
900
- input2value: S,
901
- end_icon: "hx_down",
902
- errorMsg: u.age ? u.age : void 0,
903
- inputProps: {
904
- type: "number",
905
- min: 0,
906
- maxLength: 3,
907
- placeholder: "Age",
908
- onChange: (e) => {
909
- i("age", e.target.value.replace(/[^0-9]/g, "")), j((a) => ({
910
- ...a,
911
- dob: ""
912
- }));
913
- },
914
- onBlur: () => {
915
- c((e) => ({
916
- ...e,
917
- age: z(S)
918
- }));
919
- }
920
- },
921
- onlySuffixDropdownItemsAllowed: !0,
922
- suffixInputProps: { placeholder: "Select format" },
923
- suffixOptions: [
924
- { label: "Years", value: "years" },
925
- { label: "Weeks", value: "weeks" },
926
- { label: "Months", value: "months" },
927
- { label: "Days", value: "days" }
928
- ],
929
- handleValChange: (e) => {
930
- i("age", e), c((a) => ({
931
- ...a,
932
- age: z(S)
933
- }));
934
- },
935
- handleSuffixValChange: (e) => {
936
- Le(e), c((a) => ({
937
- ...a,
938
- age: z(e)
939
- }));
940
- },
941
- onSuffixDropdownClick: (e) => {
942
- Le(e.label), j((a) => ({
943
- ...a,
944
- age_selector: e.value,
945
- dob: ""
946
- })), c((a) => ({
947
- ...a,
948
- age: z(e.value)
949
- }));
950
- }
951
- }
952
- ) }),
953
- /* @__PURE__ */ l.jsx("div", { className: "hfl-mt-[24px] hfl-space-y-1", children: /* @__PURE__ */ l.jsx(
954
- we,
955
- {
956
- className: "hfl-relative",
957
- placeholder: "DOB",
958
- width: "8em",
959
- height: "!hfl-h-[40px]",
960
- label: "",
961
- labelSize: "Text sm",
962
- labelColor: "hfl-text-Gray-700",
963
- selectDate: t?.dob && el(new Date(t?.dob)) ? new Date(ee(new Date(t?.dob)).format("DD-MMM-YYYY")) : "",
964
- dateVar: (e) => {
965
- j((a) => ({
966
- ...a,
967
- dob: ee(e).format("YYYY-MM-DD"),
968
- age: ""
969
- })), c((a) => ({
970
- ...a,
971
- age: ""
972
- }));
973
- },
974
- isborderRequired: !0,
975
- maxDate: /* @__PURE__ */ new Date()
976
- }
977
- ) })
978
- ] }),
979
- /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-1", children: /* @__PURE__ */ l.jsx(
980
- X,
981
- {
982
- value: {
983
- label: t?.patient_preferred_language ? je[t.patient_preferred_language] : "English"
984
- },
985
- placeholder: "English",
986
- label: "Preferred Language",
987
- onChange: (e) => {
988
- i("patient_preferred_language", e.value);
989
- },
990
- options: Object.keys(je).map((e) => ({
991
- label: je[e],
992
- value: e
993
- })),
994
- className: "!hfl-h-[40px] hfl-w-[200px]",
995
- "data-qa": "dropdown-language"
996
- }
997
- ) })
998
- ] }),
999
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-justify-between hfl-pb-6 hfl-pt-6", children: [
1000
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-w-6/12 hfl-flex-col ", children: [
1001
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1002
- /* @__PURE__ */ l.jsx(
1003
- m,
1004
- {
1005
- label: "City",
1006
- labelColor: "hfl-text-Gray-600",
1007
- labelSize: "Text sm",
1008
- inputProps: {
1009
- value: t?.city,
1010
- placeholder: "Enter City",
1011
- onChange: (e) => {
1012
- i("city", e.target.value), de(!0), Ml(e);
1013
- },
1014
- onBlur: (e) => {
1015
- e.stopPropagation(), de(!1);
1016
- }
1017
- },
1018
- width: 23.5 + "em"
1019
- }
1020
- ),
1021
- yl && fe && fe.length > 0 && /* @__PURE__ */ l.jsx(
1022
- "div",
1023
- {
1024
- 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 ",
1025
- children: fe.map((e) => /* @__PURE__ */ l.jsx(
1026
- Q,
1027
- {
1028
- label: e,
1029
- className: "hfl-text-Primary-700",
1030
- onSelect: () => (
1031
- // handleSuggestionClick({ ...restOptions, title })
1032
- Ll(e)
1033
- )
1034
- }
1035
- ))
1036
- }
1037
- )
1038
- ] }),
1039
- /* @__PURE__ */ l.jsx("div", { className: "hfl-pt-4", children: /* @__PURE__ */ l.jsx(
1040
- m,
1041
- {
1042
- className: "hfl-mb-3",
1043
- label: "Pin",
1044
- labelColor: "hfl-text-Gray-600",
1045
- labelSize: "Text sm",
1046
- inputProps: {
1047
- value: t?.pincode,
1048
- placeholder: "Enter Pin",
1049
- onChange: (e) => {
1050
- i("pincode", e.target.value);
1051
- }
1052
- },
1053
- width: 22.5 + "em"
1054
- }
1055
- ) })
1056
- ] }),
1057
- /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-h-full hfl-flex-col", style: { height: "100%" }, children: /* @__PURE__ */ l.jsx(
1058
- Xl,
1059
- {
1060
- className: "hfl-w-[355px]",
1061
- label: "Address",
1062
- inputProps: {
1063
- value: t?.address,
1064
- placeholder: "Enter Address",
1065
- onChange: (e) => {
1066
- i("address", e.target.value);
1067
- }
1068
- },
1069
- isDynamicHeight: !0,
1070
- "data-qa": "enter-address"
1071
- }
1072
- ) })
1073
- ] }),
1074
- Se ? /* @__PURE__ */ l.jsx(
1075
- ya,
1076
- {
1077
- setEditPatient: nl,
1078
- editPatient: O,
1079
- createAsNew: il,
1080
- setCreateAsNew: hl,
1081
- showEditPrompt: Se
1082
- }
1083
- ) : /* @__PURE__ */ l.jsx(l.Fragment, {}),
1084
- ke ? /* @__PURE__ */ l.jsxs("div", { className: "", children: [
1085
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-stroke-Gray-200 hfl-stroke-1 hfl-pb-6", children: [
1086
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1087
- /* @__PURE__ */ l.jsx("span", { className: "hfl-absolute hfl-left-0 hfl-right-0 hfl-top-1/2 hfl-h-px hfl-bg-Gray-200" }),
1088
- /* @__PURE__ */ l.jsx("span", { className: "hfl-relative hfl-bg-White hfl-px-4", children: /* @__PURE__ */ l.jsx(
1089
- h,
1090
- {
1091
- variant: "Medium",
1092
- type: "Text sm",
1093
- className: "hfl-ml-2 hfl-inline hfl-bg-White hfl-text-Gray-400",
1094
- children: "Marital Status"
1095
- }
1096
- ) })
1097
- ] }),
1098
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
1099
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-space-x-1", children: [
1100
- /* @__PURE__ */ l.jsx("div", { className: "hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
1101
- X,
1102
- {
1103
- value: {
1104
- label: t.marital_status && Ce.find((e) => e === t.marital_status) || ""
1105
- },
1106
- placeholder: "Marital Status",
1107
- label: "Marital Status",
1108
- onChange: (e) => {
1109
- i("marital_status", e.label);
1110
- },
1111
- options: Ce.map((e) => ({
1112
- label: e,
1113
- value: e
1114
- })),
1115
- className: "!hfl-h-[40px] hfl-w-[200px]",
1116
- "data-qa": "marital-status"
1117
- }
1118
- ) }),
1119
- /* @__PURE__ */ l.jsx("div", { className: "hfl-mt-[24px] hfl-flex hfl-space-y-2", children: /* @__PURE__ */ l.jsx(
1120
- we,
1121
- {
1122
- className: "hfl-relative",
1123
- placeholder: "Since",
1124
- width: "8em",
1125
- height: "!hfl-h-[40px]",
1126
- label: "",
1127
- labelSize: "Text sm",
1128
- labelColor: "hfl-text-Gray-700",
1129
- selectDate: t?.married_since && el(new Date(t?.married_since)) ? new Date(ee(new Date(t?.married_since)).format("DD-MMM-YYYY")) : "",
1130
- dateVar: (e) => {
1131
- j((a) => ({
1132
- ...a,
1133
- married_since: ee(e).format("YYYY-MM-DD")
1134
- }));
1135
- },
1136
- isborderRequired: !0,
1137
- maxDate: /* @__PURE__ */ new Date()
1138
- }
1139
- ) })
1140
- ] }),
1141
- /* @__PURE__ */ l.jsx(
1142
- X,
1143
- {
1144
- label: "Blood Group",
1145
- placeholder: "Enter blood group",
1146
- value: {
1147
- label: t.blood_group && le.find((e) => e.value === t.blood_group)?.label || "Blood group"
1148
- },
1149
- onChange: (e) => {
1150
- i("blood_group", e.value);
1151
- },
1152
- options: le,
1153
- className: "!hfl-h-11 hfl-w-[370px]",
1154
- "data-qa": "blood-group"
1155
- }
1156
- )
1157
- ] }),
1158
- t?.marital_status !== Ce[0] && /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
1159
- /* @__PURE__ */ l.jsx(
1160
- m,
1161
- {
1162
- label: "Spouse Name",
1163
- start_icon: "hx_person",
1164
- labelColor: "hfl-text-Gray-600",
1165
- labelSize: "Text sm",
1166
- inputProps: {
1167
- value: t.spouse_name,
1168
- placeholder: "Enter Spouse Name",
1169
- onChange: (e) => {
1170
- i("spouse_name", e.target.value);
1171
- }
1172
- },
1173
- width: "21em"
1174
- }
1175
- ),
1176
- /* @__PURE__ */ l.jsx(
1177
- X,
1178
- {
1179
- label: "Spouse Blood Group",
1180
- placeholder: "Enter blood group",
1181
- value: {
1182
- label: t.spouse_blood_group ? le.find((e) => e.value === t.spouse_blood_group)?.label || "Spouse Blood group" : "Blood group"
1183
- },
1184
- onChange: (e) => {
1185
- i("spouse_blood_group", e.value);
1186
- },
1187
- options: le,
1188
- className: "!hfl-h-11 hfl-w-[370px]",
1189
- "data-qa": "blood-group"
1190
- }
1191
- )
1192
- ] })
1193
- ] }),
1194
- /* @__PURE__ */ l.jsx(tl, {}),
1195
- /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-6", children: /* @__PURE__ */ l.jsx(
1196
- Ze,
1197
- {
1198
- classNameDatePicker: "hfl-relative",
1199
- classNamedoubleInput: "hfl-relative",
1200
- label: "Referred By",
1201
- input1value: t.ref_doc_name,
1202
- input2value: t.ref_doc_spec,
1203
- end_icon: "hx_down",
1204
- inputProps: { placeholder: "Doctor Name" },
1205
- suffixInputProps: { placeholder: "Speciality" },
1206
- className: "hfl-w-48",
1207
- suffixClassName: "hfl-w-[100px]",
1208
- suffixDropdownClassName: "hfl-ml-[160px]",
1209
- options: wl,
1210
- suffixOptions: da,
1211
- handleValChange: (e) => {
1212
- i("ref_doc_name", e);
1213
- },
1214
- handleSuffixValChange: (e) => {
1215
- i("ref_doc_spec", e.value);
1216
- },
1217
- onDropdownClick: (e) => {
1218
- i("ref_doc_name", e.doctor_name), i("refDocId", e.doctor_id), i("ref_doc_spec", e.specialist);
1219
- },
1220
- onSuffixDropdownClick: (e) => {
1221
- i("ref_doc_spec", e.value);
1222
- }
1223
- }
1224
- ) }),
1225
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-justify-between hfl-pb-6 hfl-pt-4", children: [
1226
- /* @__PURE__ */ l.jsx(
1227
- m,
1228
- {
1229
- label: "Existing ID (if any)",
1230
- labelColor: "hfl-text-Gray-600",
1231
- labelSize: "Text sm",
1232
- inputProps: {
1233
- value: t?.existingBidStr,
1234
- placeholder: "Enter ID",
1235
- onChange: (e) => {
1236
- i("existingBidStr", e.target.value);
1237
- }
1238
- },
1239
- width: "23em"
1240
- }
1241
- ),
1242
- /* @__PURE__ */ l.jsx(
1243
- m,
1244
- {
1245
- label: "Email",
1246
- showEmailSuggestions: !0,
1247
- labelColor: "hfl-text-Gray-600",
1248
- errorMsg: u.email ? u.email : void 0,
1249
- labelSize: "Text sm",
1250
- start_icon: "hx_mail",
1251
- inputProps: {
1252
- value: t.email,
1253
- placeholder: "Enter Email",
1254
- onChange: (e) => {
1255
- i("email", e.target.value.trim());
1256
- },
1257
- onBlur: (e) => {
1258
- e.target.value && !ll().email().isValidSync(e.target.value) ? c((a) => ({
1259
- ...a,
1260
- email: "Email format is wrong"
1261
- })) : c((a) => ({
1262
- ...a,
1263
- email: ""
1264
- }));
1265
- }
1266
- },
1267
- width: 20.5 + "em"
1268
- }
1269
- )
1270
- ] }),
1271
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-inline-flex hfl-flex-row hfl-flex-wrap hfl-justify-between hfl-gap-y-6 hfl-py-6", children: [
1272
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between", children: [
1273
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1274
- /* @__PURE__ */ l.jsx(
1275
- m,
1276
- {
1277
- label: "Channel (How did the patient hear about you?)",
1278
- labelColor: "hfl-text-Gray-600",
1279
- labelSize: "Text sm",
1280
- inputProps: {
1281
- value: t?.throughChannel,
1282
- placeholder: "Enter Channel",
1283
- onChange: (e) => {
1284
- i("throughChannel", e.target.value), ie(!0), Al(e);
1285
- },
1286
- onBlur: (e) => {
1287
- e.stopPropagation(), ie(!1);
1288
- }
1289
- },
1290
- width: "22em"
1291
- }
1292
- ),
1293
- _l && se && se.length > 0 && /* @__PURE__ */ l.jsx(
1294
- "div",
1295
- {
1296
- 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 ",
1297
- children: se.map((e) => {
1298
- const { title: a, ...r } = e;
1299
- return /* @__PURE__ */ l.jsx(
1300
- Q,
1301
- {
1302
- label: a,
1303
- className: "hfl-text-Primary-700",
1304
- ...r,
1305
- onSelect: () => kl({
1306
- value: e.value
1307
- })
1308
- },
1309
- e.value
1310
- );
1311
- })
1312
- }
1313
- )
1314
- ] }),
1315
- /* @__PURE__ */ l.jsx(
1316
- m,
1317
- {
1318
- label: "C/O",
1319
- labelColor: "hfl-text-Gray-600",
1320
- labelSize: "Text sm",
1321
- inputProps: {
1322
- value: t?.careOf,
1323
- placeholder: "Enter C/O",
1324
- onChange: (e) => {
1325
- i("careOf", e.target.value);
1326
- }
1327
- },
1328
- width: "22em"
1329
- }
1330
- )
1331
- ] }),
1332
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-relative", children: [
1333
- /* @__PURE__ */ l.jsx(
1334
- m,
1335
- {
1336
- label: "Occupation",
1337
- labelColor: "hfl-text-Gray-600",
1338
- labelSize: "Text sm",
1339
- inputProps: {
1340
- value: t?.occupation,
1341
- placeholder: "Enter Occupation",
1342
- onChange: (e) => {
1343
- i("occupation", e.target.value), he(!0), Rl(e);
1344
- },
1345
- onBlur: (e) => {
1346
- e.stopPropagation(), he(!1);
1347
- }
1348
- },
1349
- width: "22em"
1350
- }
1351
- ),
1352
- bl && ne && ne.length > 0 && /* @__PURE__ */ l.jsx(
1353
- "div",
1354
- {
1355
- 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 ",
1356
- children: ne.map((e) => /* @__PURE__ */ l.jsx(
1357
- Q,
1358
- {
1359
- label: e,
1360
- className: "hfl-text-Primary-700",
1361
- onSelect: () => (
1362
- // handleSuggestionClick({ ...restOptions, title })
1363
- Tl(e)
1364
- )
1365
- }
1366
- ))
1367
- }
1368
- )
1369
- ] }),
1370
- /* @__PURE__ */ l.jsx(
1371
- m,
1372
- {
1373
- label: "Tag",
1374
- labelColor: "hfl-text-Gray-600",
1375
- labelSize: "Text sm",
1376
- inputProps: {
1377
- value: t.tag,
1378
- placeholder: "Enter Tag",
1379
- onChange: (e) => {
1380
- i("tag", e.target.value);
1381
- }
1382
- },
1383
- width: "22em"
1384
- }
1385
- ),
1386
- /* @__PURE__ */ l.jsx(
1387
- m,
1388
- {
1389
- label: "Mobile 2",
1390
- labelColor: "hfl-text-Gray-600",
1391
- labelSize: "Text sm",
1392
- inputProps: {
1393
- value: t.phoneSecondary,
1394
- maxLength: 10,
1395
- placeholder: "Enter Secondary Number",
1396
- onChange: (e) => {
1397
- i("phoneSecondary", e.target.value.replace(/[^0-9]/g, ""));
1398
- }
1399
- },
1400
- width: "22em"
1401
- }
1402
- ),
1403
- /* @__PURE__ */ l.jsx(
1404
- m,
1405
- {
1406
- label: "Aadhar Number",
1407
- labelColor: "hfl-text-Gray-600",
1408
- errorMsg: u.aadhar_number ? u.aadhar_number : void 0,
1409
- labelSize: "Text sm",
1410
- inputProps: {
1411
- value: t.aadhar_number,
1412
- placeholder: "Aadhar Card Number",
1413
- maxLength: 12,
1414
- onChange: (e) => {
1415
- i("aadhar_number", e.target.value);
1416
- },
1417
- onBlur: () => {
1418
- c((e) => ({
1419
- ...e,
1420
- aadhar_number: t.aadhar_number && t.aadhar_number.length != 12 ? "Please enter 12 digit aadhar number" : ""
1421
- }));
1422
- }
1423
- },
1424
- width: "22em"
1425
- }
1426
- ),
1427
- /* @__PURE__ */ l.jsx("div", { className: "hfl-grid hfl-grid-cols-2 hfl-gap-x-11 hfl-gap-y-6", children: Zl() })
1428
- ] }),
1429
- /* @__PURE__ */ l.jsx(tl, {}),
1430
- /* @__PURE__ */ l.jsx("div", { className: "hfl-flex hfl-flex-col hfl-items-start hfl-justify-start hfl-pt-3", children: /* @__PURE__ */ l.jsxs(
1431
- "div",
1432
- {
1433
- className: `hfl-flex hfl-h-[153px] hfl-w-[200px] hfl-items-center hfl-justify-center
1434
- hfl-rounded-3xl hfl-border-4
1435
- hfl-border-White hfl-bg-Primary-50 hfl-shadow-lg`,
1436
- children: [
1437
- /* @__PURE__ */ l.jsxs(
1438
- "div",
1439
- {
1440
- className: `hfl-flex hfl-flex-col hfl-items-center hfl-justify-between
1441
- ${Ee ? "" : "hfl-hidden"}`,
1442
- children: [
1443
- /* @__PURE__ */ l.jsx(
1444
- y,
1445
- {
1446
- hierarchy: "Primary",
1447
- size: "lg",
1448
- textField: "Camera",
1449
- className: "hfl-mb-2",
1450
- onClick: ql,
1451
- icon: "Left",
1452
- iconFile: "hx_camera"
1453
- }
1454
- ),
1455
- /* @__PURE__ */ l.jsxs("div", { children: [
1456
- /* @__PURE__ */ l.jsx(
1457
- "input",
1458
- {
1459
- id: "upload-local-file",
1460
- type: "file",
1461
- style: { display: "none" },
1462
- accept: "image/*",
1463
- onChange: $l
1464
- }
1465
- ),
1466
- /* @__PURE__ */ l.jsx(
1467
- y,
1468
- {
1469
- hierarchy: "Secondary",
1470
- size: "lg",
1471
- textField: "Upload",
1472
- icon: "Left",
1473
- iconFile: "hx_image-add",
1474
- onClick: Wl
1475
- }
1476
- )
1477
- ] })
1478
- ]
1479
- }
1480
- ),
1481
- /* @__PURE__ */ l.jsxs(
1482
- "div",
1483
- {
1484
- className: `hfl-relative hfl-flex
1485
- ${Ge ? "" : "hfl-hidden"}`,
1486
- children: [
1487
- /* @__PURE__ */ l.jsx("canvas", { ref: Oe, style: { display: "none" } }),
1488
- /* @__PURE__ */ l.jsx("video", { ref: B, className: "hfl-object-fit hfl-h-full hfl-w-full hfl-rounded-3xl", autoPlay: !0 }),
1489
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-absolute hfl-bottom-0 hfl-left-0 hfl-right-0 hfl-flex hfl-justify-around", children: [
1490
- /* @__PURE__ */ l.jsx(
1491
- y,
1492
- {
1493
- hierarchy: "Primary",
1494
- size: "lg",
1495
- textField: "Cancel",
1496
- className: "hfl-mb-2 hfl-bg-Error-600 hover:hfl-bg-Error-700",
1497
- onClick: Je
1498
- }
1499
- ),
1500
- /* @__PURE__ */ l.jsx(
1501
- y,
1502
- {
1503
- hierarchy: "Primary",
1504
- size: "lg",
1505
- textField: "Capture",
1506
- className: "hfl-mb-2 hfl-bg-Primary-600",
1507
- onClick: Ul
1508
- }
1509
- )
1510
- ] })
1511
- ]
1512
- }
1513
- ),
1514
- /* @__PURE__ */ l.jsx(
1515
- "div",
1516
- {
1517
- className: Ee || P || Ge ? "hfl-hidden" : "",
1518
- onClick: () => {
1519
- ue(!0), R(!0);
1520
- },
1521
- "data-qa": "profile-img",
1522
- children: /* @__PURE__ */ l.jsxs("svg", { width: "76", height: "72", viewBox: "0 0 76 72", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1523
- /* @__PURE__ */ l.jsx(
1524
- "path",
1525
- {
1526
- opacity: "0.4",
1527
- d: "M75.375 26.0477V57.1667C75.6016 59.1092 75.3857 61.0778 74.7434 62.925C74.1011 64.7722 73.0491 66.4501 71.6663 67.8329C70.2834 69.2158 68.6055 70.2678 66.7583 70.9101C64.9111 71.5524 62.9425 71.7683 61 71.5417H15C13.0575 71.7683 11.0889 71.5524 9.2417 70.9101C7.3945 70.2678 5.71661 69.2158 4.33373 67.8329C2.95086 66.4501 1.89887 64.7722 1.25659 62.925C0.614305 61.0778 0.398381 59.1092 0.624996 57.1667V18.8333C0.398381 16.8908 0.614305 14.9222 1.25659 13.075C1.89887 11.2278 2.95086 9.54994 4.33373 8.16707C5.71661 6.7842 7.3945 5.73221 9.2417 5.08992C11.0889 4.44764 13.0575 4.23172 15 4.45833H48.7333C48.9029 4.46277 49.0695 4.50469 49.221 4.58109C49.3725 4.65748 49.5052 4.76645 49.6096 4.90019C49.7141 5.03393 49.7876 5.18911 49.825 5.35462C49.8624 5.52013 49.8626 5.69187 49.8258 5.8575C48.9214 10.3365 49.831 14.9913 52.355 18.8004C54.879 22.6094 58.8112 25.2613 63.2885 26.1742C66.8321 26.8826 70.5088 26.4602 73.7995 24.9667C73.975 24.8968 74.1649 24.8712 74.3526 24.8921C74.5403 24.9131 74.72 24.9799 74.8757 25.0868C75.0314 25.1936 75.1584 25.3372 75.2455 25.5048C75.3326 25.6724 75.3771 25.8588 75.375 26.0477Z",
1528
- fill: "#396CE8"
1529
- }
1530
- ),
1531
- /* @__PURE__ */ l.jsx(
1532
- "path",
1533
- {
1534
- d: "M69.2877 46.2877L52.2217 29.2217C51.4989 28.5016 50.5202 28.0973 49.5 28.0973C48.4798 28.0973 47.5011 28.5016 46.7783 29.2217L27.8417 48.1583C27.4834 48.5095 27.0017 48.7062 26.5 48.7062C25.9983 48.7062 25.5166 48.5095 25.1583 48.1583L21.555 44.555C20.8322 43.835 19.8536 43.4307 18.8333 43.4307C17.8131 43.4307 16.8344 43.835 16.1117 44.555L6.71233 53.9543C6.49661 54.1698 6.37527 54.4621 6.375 54.767V57.1667C6.375 63.2233 8.94333 65.7917 15 65.7917H61C67.0567 65.7917 69.625 63.2233 69.625 57.1667V47.1003C69.6247 46.7954 69.5034 46.5031 69.2877 46.2877Z",
1535
- fill: "#396CE8"
1536
- }
1537
- ),
1538
- /* @__PURE__ */ l.jsx(
1539
- "path",
1540
- {
1541
- d: "M22.6667 31.2917C22.0374 31.2939 21.4139 31.1722 20.8317 30.9335C20.2494 30.6948 19.7199 30.3438 19.2734 29.9004C18.3715 29.005 17.8623 27.7881 17.8577 26.5172C17.8532 25.2464 18.3536 24.0258 19.249 23.124C20.1444 22.2221 21.3613 21.7129 22.6322 21.7083H22.6667C23.9375 21.7083 25.1563 22.2132 26.0549 23.1118C26.9535 24.0104 27.4583 25.2292 27.4583 26.5C27.4583 27.7708 26.9535 28.9896 26.0549 29.8882C25.1563 30.7868 23.9375 31.2917 22.6667 31.2917Z",
1542
- fill: "#396CE8"
1543
- }
1544
- ),
1545
- /* @__PURE__ */ l.jsx(
1546
- "path",
1547
- {
1548
- d: "M74.5317 7.21833L68.7817 1.46833C68.2421 0.930873 67.5116 0.629108 66.75 0.629108C65.9884 0.629108 65.2579 0.930873 64.7183 1.46833L58.9683 7.21833C58.4605 7.76333 58.184 8.48418 58.1972 9.229C58.2103 9.97382 58.512 10.6845 59.0388 11.2112C59.5655 11.738 60.2762 12.0397 61.021 12.0528C61.7658 12.066 62.4867 11.7895 63.0317 11.2817L63.875 10.4422V18.8333C63.875 19.5958 64.1779 20.3271 64.7171 20.8663C65.2562 21.4054 65.9875 21.7083 66.75 21.7083C67.5125 21.7083 68.2438 21.4054 68.7829 20.8663C69.3221 20.3271 69.625 19.5958 69.625 18.8333V10.4422L70.4683 11.2817C71.0133 11.7895 71.7342 12.066 72.479 12.0528C73.2238 12.0397 73.9345 11.738 74.4612 11.2112C74.988 10.6845 75.2897 9.97382 75.3028 9.229C75.316 8.48418 75.0395 7.76333 74.5317 7.21833Z",
1549
- fill: "#396CE8"
1550
- }
1551
- )
1552
- ] })
1553
- }
1554
- ),
1555
- /* @__PURE__ */ l.jsxs(
1556
- "div",
1557
- {
1558
- className: `hfl-relative hfl-h-full hfl-w-full
1559
- ${P ? "" : "hfl-hidden"}`,
1560
- children: [
1561
- /* @__PURE__ */ l.jsx(
1562
- "img",
1563
- {
1564
- src: P,
1565
- alt: "ProfilePicturePreview",
1566
- className: "hfl-h-full hfl-w-full hfl-rounded-3xl hfl-object-cover"
1567
- }
1568
- ),
1569
- /* @__PURE__ */ l.jsx(
1570
- "div",
1571
- {
1572
- className: `hfl-absolute hfl-right-2 hfl-top-2 hfl-flex hfl-h-[40px]
1573
- hfl-w-[40px] hfl-cursor-pointer hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-White`,
1574
- onClick: () => {
1575
- ue(!0), Je();
1576
- },
1577
- children: /* @__PURE__ */ l.jsx("i", { className: "hx_delete hfl-text-[22px]" })
1578
- }
1579
- )
1580
- ]
1581
- }
1582
- )
1583
- ]
1584
- }
1585
- ) })
1586
- ] }) : /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-row hfl-items-center hfl-justify-center", children: [
1587
- /* @__PURE__ */ l.jsxs(h, { variant: "Regular", type: "Text md", children: [
1588
- "If you want to add more details,",
1589
- " "
1590
- ] }),
1591
- /* @__PURE__ */ l.jsx(
1592
- h,
1593
- {
1594
- variant: "Medium",
1595
- type: "Text md",
1596
- className: "hfl-cursor-pointer hfl-text-Primary-700",
1597
- onClick: () => {
1598
- Te(!0);
1599
- },
1600
- children: "Click Here"
1601
- }
1602
- )
1603
- ] })
1604
- ] }),
1605
- /* @__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(
1606
- "div",
1607
- {
1608
- className: "hfl-flex hfl-h-[118px] hfl-w-full hfl-flex-col hfl-items-center hfl-justify-center hfl-gap-1",
1609
- style: { boxShadow: "-3px -1px 4px rgba(0, 0, 0, 0.25)" },
1610
- children: [
1611
- window.location?.href.indexOf("/frontdesk") == -1 && /* @__PURE__ */ l.jsx(
1612
- y,
1613
- {
1614
- disabled: Fe,
1615
- hierarchy: "Primary",
1616
- size: "sm",
1617
- textField: "Add & Create Rx",
1618
- className: "hfl-bg-Primary-600",
1619
- onClick: () => {
1620
- Fe || (J(!0), re("Rx"), O ? ye("Rx") : K(!1, "Rx"));
1621
- }
1622
- }
1623
- ),
1624
- /* @__PURE__ */ l.jsx("div", { children: window.location?.href.indexOf("/frontdesk") == -1 && /* @__PURE__ */ l.jsx(h, { variant: "Regular", type: "Text sm", children: "or" }) }),
1625
- /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-items-start hfl-gap-2", children: [
1626
- /* @__PURE__ */ l.jsx(
1627
- y,
1628
- {
1629
- hierarchy: "Secondary",
1630
- size: "sm",
1631
- textField: "Add & Create Bill",
1632
- className: "hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",
1633
- onClick: () => {
1634
- re("Bill"), O ? ye("Bill") : K(!1, "Bill");
1635
- }
1636
- }
1637
- ),
1638
- /* @__PURE__ */ l.jsx(
1639
- y,
1640
- {
1641
- hierarchy: "Secondary",
1642
- size: "sm",
1643
- textField: "Add & Create Appointment",
1644
- className: "hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",
1645
- onClick: () => {
1646
- re("Appointment"), O ? ye("Appointment") : K(!1, "Appointment");
1647
- }
1648
- }
1649
- )
1650
- ] }),
1651
- /* @__PURE__ */ l.jsx("div", { className: "hfl-absolute hfl-z-[100]", children: /* @__PURE__ */ l.jsx(ea, { toastList: Pl }) })
1652
- ]
1653
- }
1654
- ) })
1655
- ] })
1656
- }
1657
- );
1658
- };
1659
- export {
1660
- Na as default
1661
- };