hplx-feature-library 1.0.174 → 1.0.176

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