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