hplx-feature-library 1.0.202 → 1.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/APIAction-5-3i1gGx.cjs +1 -0
- package/dist/{APIAction-BpUGTq-P.js → APIAction-l6i46qgX.js} +24 -23
- package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +19 -0
- package/dist/AllInvestigations/index.d.ts +1 -0
- package/dist/AllInvestigations/index.js +4 -0
- package/dist/AllInvestigations/utils/test-tange-util.d.ts +8 -0
- package/dist/AllInvestigationsTable-BDLPOHjr.cjs +79 -0
- package/dist/AllInvestigationsTable-Dg-YXASz.js +17065 -0
- package/dist/Attachments/index.js +1 -1
- package/dist/{Attachments-3UkuRnaT.js → Attachments-BzZHI8d3.js} +6180 -6297
- package/dist/Attachments-CziD-_gm.cjs +186 -0
- package/dist/CommonConstant-Bj7SvPfU.js +436 -0
- package/dist/CommonConstant-COHqiSWL.cjs +1 -0
- package/dist/NineDots/index.js +4 -0
- package/dist/NineDots-BEzE3Pj8.cjs +3 -0
- package/dist/NineDots-CCtE2t9I.js +1788 -0
- package/dist/PatientAddEdit/index.js +1 -1
- package/dist/{PatientAddEdit-DjNwzBQV.js → PatientAddEdit-CPjv2_ZF.js} +20 -18
- package/dist/PatientAddEdit-UFho4sOA.cjs +7 -0
- package/dist/PatientPopup/index.js +1 -1
- package/dist/{PatientPopupContainer-RxozPrZy.js → PatientPopupContainer-AprY0NY2.js} +49 -47
- package/dist/PatientPopupContainer-Cwv4GWjB.cjs +36 -0
- package/dist/PediatricsCalculator/index.js +1 -1
- package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +9 -0
- package/dist/{PediatricsCalculatorTable-qu37FR7D.js → PediatricsCalculatorTable-G0ttbDpi.js} +228 -236
- package/dist/{PrintModal-DYCkcIdD.cjs → PrintModal-CHkA2pab.cjs} +50 -52
- package/dist/{PrintModal-D4AX-Rz-.js → PrintModal-DFzssQg2.js} +3261 -3227
- package/dist/{ReusableModal-2GKjVVbf.cjs → ReusableModal-CIgDYOWZ.cjs} +1 -1
- package/dist/{ReusableModal-BL_DwV8I.js → ReusableModal-CT4_gW1b.js} +1 -1
- package/dist/ReusableTable/ReusableTable.d.ts +3 -0
- package/dist/ReusableTable/ReusableTableConstants.d.ts +8 -0
- package/dist/ReusableTable/ReusableTableTypes.d.ts +96 -0
- package/dist/ReusableTable/components/EmptyTableContainer.d.ts +12 -0
- package/dist/ReusableTable/components/FilterCheckbox.d.ts +8 -0
- package/dist/ReusableTable/components/FilterDropdown.d.ts +17 -0
- package/dist/ReusableTable/components/Pagination.d.ts +2 -0
- package/dist/ReusableTable/components/TableBody.d.ts +2 -0
- package/dist/ReusableTable/components/TableCell.d.ts +3 -0
- package/dist/ReusableTable/components/TableFilterSelect.d.ts +12 -0
- package/dist/ReusableTable/components/TableHead.d.ts +2 -0
- package/dist/ReusableTable/components/TableMain.d.ts +2 -0
- package/dist/ReusableTable/components/TableRow.d.ts +3 -0
- package/dist/ReusableTable/context/TableContext.d.ts +21 -0
- package/dist/ReusableTable/context/TableContextBase.d.ts +26 -0
- package/dist/ReusableTable/context/useTableContext.d.ts +2 -0
- package/dist/SearchPatients/index.js +1 -1
- package/dist/{SearchPatients-CKu0XGDw.cjs → SearchPatients-BXNWucYz.cjs} +1 -1
- package/dist/{SearchPatients-B34Jmyh7.js → SearchPatients-BYGGaUoD.js} +3 -3
- package/dist/TrendGraphs/AreaChartComponent.d.ts +9 -0
- package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +16 -0
- package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +2 -0
- package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +2 -0
- package/dist/TrendGraphs/LineChartComponent/index.d.ts +2 -0
- package/dist/TrendGraphs/context/index.d.ts +2 -0
- package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +2 -0
- package/dist/TrendGraphs/utils/index.d.ts +4 -0
- package/dist/UserProfile/index.js +4 -0
- package/dist/UserProfile-CcEbhDhd.js +1761 -0
- package/dist/UserProfile-DkQgWGvV.cjs +14 -0
- package/dist/clsx-C11secjj.cjs +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/common-utils-CJv4_aVl.cjs +6 -0
- package/dist/common-utils-Dq5TMP7t.js +1952 -0
- package/dist/components/Modal.d.ts +5 -0
- package/dist/constants/TrendGraphsConstants.d.ts +2 -0
- package/dist/dayjs.min-D52_GdfV.js +284 -0
- package/dist/dayjs.min-DXp74Ozx.cjs +1 -0
- package/dist/hplx-feature-library.css +1 -1
- package/dist/{index-UPYT3B9g.js → index-Bd0CDVpH.js} +3 -2
- package/dist/index-CJFGOBPb.js +122 -0
- package/dist/{index-CJ2AKRoq.cjs → index-DQlbIHh3.cjs} +26 -26
- package/dist/index-DfcUmlge.cjs +17 -0
- package/dist/{index-CRCsQdYf.cjs → index-DkA8S5IK.cjs} +1 -1
- package/dist/{index-BzwuwvT5.js → index-T1lUjzhG.js} +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +18 -12
- package/dist/nineDots/index.d.ts +1 -0
- package/dist/print-pdf/index.js +1 -1
- package/dist/types/AllInvestigationTypes/index.js +4 -0
- package/dist/types/AllInvestigationTypes.d.ts +45 -0
- package/dist/types/CommonTypes.d.ts +1 -1
- package/dist/types/NineDotsTypes/index.js +1 -0
- package/dist/types/TrendGraphTypes.d.ts +19 -0
- package/dist/useClickOutside-BjJyGTec.js +14 -0
- package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
- package/dist/userProfile/index.d.ts +1 -0
- package/package.json +14 -9
- package/dist/APIAction-Dh8yXpE0.cjs +0 -1
- package/dist/Attachments-B9GrTokn.cjs +0 -202
- package/dist/PatientAddEdit-DKtOZH2N.cjs +0 -7
- package/dist/PatientPopupContainer-Bg9zUots.cjs +0 -36
- package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +0 -9
- package/dist/common-utils-B6431-iN.js +0 -2657
- package/dist/common-utils-DeErqLTB.cjs +0 -6
|
@@ -1,10 +1,12 @@
|
|
|
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-
|
|
1
|
+
import { j as l, b as h, K as y, P as m, k as Q, a as Ql, e as Ze, Z as we, A as X, c as Xl, q as ea } from "./index-Bd0CDVpH.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { M as la } from "./index-
|
|
3
|
+
import { M as la } from "./index-T1lUjzhG.js";
|
|
4
4
|
import { useState as n, useRef as Y, useCallback as q, useEffect as k, useMemo as aa } from "react";
|
|
5
5
|
import { c as Ke } from "./index.esm-Bn1Rklqj.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
6
|
+
import { d as ee } from "./dayjs.min-D52_GdfV.js";
|
|
7
|
+
import { a as ae, i as ta, d as ra, c as sa, p as na, e as oa, f as Qe, g as Xe, v as el, j as ll, E as je, k as ia, l as al } from "./common-utils-Dq5TMP7t.js";
|
|
8
|
+
import { H as ha, D as Ce, M as Ne, b as le, S as da, C as Pe, O as De } from "./CommonConstant-Bj7SvPfU.js";
|
|
9
|
+
import { a as fa, b as ca, c as pa, d as ua, u as ma, g as ga, e as xa, f as _a } from "./APIAction-l6i46qgX.js";
|
|
8
10
|
const tl = () => /* @__PURE__ */ l.jsx("div", { className: "hfl-h-0 hfl-w-full hfl-border-1 hfl-border-Gray-200" }), ba = ({ conflicts: M, handleAddPatient: v, redirectAction: T }) => {
|
|
9
11
|
const [N, L] = n(!1);
|
|
10
12
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
@@ -124,7 +126,7 @@ function ya(M) {
|
|
|
124
126
|
)
|
|
125
127
|
] });
|
|
126
128
|
}
|
|
127
|
-
const
|
|
129
|
+
const Ba = (M) => {
|
|
128
130
|
const { closeModal: v, modalIsOpen: T, pref: N, variable: L } = M, { window_var: o, token: p, envName: b } = L, [te, rl] = n(!1), [A, sl] = n({}), [O, nl] = n(!1), [ol, re] = n(""), [il, hl] = n(!1), [Se, dl] = n(!1), [fl, cl] = n([]), [Ee, R] = n(!1), [P, U] = n(""), [g, pl] = n(), [u, c] = n({
|
|
129
131
|
name: "",
|
|
130
132
|
phone: "",
|
|
@@ -307,7 +309,7 @@ const Sa = (M) => {
|
|
|
307
309
|
case "Appointment":
|
|
308
310
|
return "emrPatientPopUp.php?pid=";
|
|
309
311
|
default:
|
|
310
|
-
return
|
|
312
|
+
return je.visitpad + "?pid=";
|
|
311
313
|
}
|
|
312
314
|
}, zl = q(
|
|
313
315
|
(e) => {
|
|
@@ -391,7 +393,7 @@ const Sa = (M) => {
|
|
|
391
393
|
return;
|
|
392
394
|
}
|
|
393
395
|
const s = new FormData();
|
|
394
|
-
s.append("name", t.name), s.append("phone", t.phone), s.append("gender",
|
|
396
|
+
s.append("name", t.name), s.append("phone", t.phone), s.append("gender", ia(t.gender)), s.append("honorific", t.honorific), s.append("patient_preferred_language", t.patient_preferred_language), s.append("age", F && F.length ? F : al(t?.age, S) || ""), s.append("age_selector", t.age_selector), s.append("blood_group", t.blood_group), s.append("email", t.email), s.append("address", t.address), s.append("city", t.city), s.append("existing_bid_str", t.existingBidStr), s.append("pincode", t.pincode), s.append("ref_doc_id", t.refDocId), s.append("ref_doc_name", t.ref_doc_name), s.append("ref_doc_spec", t.ref_doc_spec), s.append("through_channel", t.throughChannel), s.append("care_of", t.careOf), s.append("phone_secondary", t.phoneSecondary), s.append("occupation", t.occupation), s.append("tag", t.tag), s.append("marital_status", t.marital_status), s.append("married_since", t.married_since), s.append("spouse_name", t.spouse_name), s.append("spouse_blood_group", t.spouse_blood_group), s.append("aadhar_number", t.aadhar_number), s.append("custom_fields", JSON.stringify(t.custom_fields || [])), e && s.append("reg_as_new", "1");
|
|
395
397
|
const f = Object.fromEntries(s.entries()), x = Object.fromEntries(
|
|
396
398
|
Object.entries(f).map(([V, Kl]) => [V, String(Kl)])
|
|
397
399
|
), _ = {
|
|
@@ -445,13 +447,13 @@ const Sa = (M) => {
|
|
|
445
447
|
try {
|
|
446
448
|
const e = {
|
|
447
449
|
"/md/viewRemoteAppointments.php": ["onlineConsultationHead", "bannerPopupWrap", "calendarViewClassDiv"],
|
|
448
|
-
[
|
|
450
|
+
[je.consultations]: [
|
|
449
451
|
"onlineConsultationHead",
|
|
450
452
|
"newPaddingMarginEMR",
|
|
451
453
|
"bannerPopupWrap",
|
|
452
454
|
"consultations_mfe"
|
|
453
455
|
],
|
|
454
|
-
[
|
|
456
|
+
[je.appointments]: ["appointments_mfe"]
|
|
455
457
|
}, a = window.location?.pathname || "", r = e[a];
|
|
456
458
|
if (!r?.length) return;
|
|
457
459
|
const s = document.getElementById("react_emr_mfe"), f = document.getElementById("react_curtains_mfe"), x = document.querySelector(".offlineEMR3");
|
|
@@ -746,7 +748,7 @@ const Sa = (M) => {
|
|
|
746
748
|
style: {
|
|
747
749
|
boxShadow: "0px 24px 48px -12px rgba(16, 24, 40, 0.18)"
|
|
748
750
|
},
|
|
749
|
-
children:
|
|
751
|
+
children: ha.map((e) => /* @__PURE__ */ l.jsx(
|
|
750
752
|
Q,
|
|
751
753
|
{
|
|
752
754
|
className: "hfl-text-Primary-700",
|
|
@@ -983,15 +985,15 @@ const Sa = (M) => {
|
|
|
983
985
|
X,
|
|
984
986
|
{
|
|
985
987
|
value: {
|
|
986
|
-
label: t?.patient_preferred_language ?
|
|
988
|
+
label: t?.patient_preferred_language ? Ce[t.patient_preferred_language] : "English"
|
|
987
989
|
},
|
|
988
990
|
placeholder: "English",
|
|
989
991
|
label: "Preferred Language",
|
|
990
992
|
onChange: (e) => {
|
|
991
993
|
i("patient_preferred_language", e.value);
|
|
992
994
|
},
|
|
993
|
-
options: Object.keys(
|
|
994
|
-
label:
|
|
995
|
+
options: Object.keys(Ce).map((e) => ({
|
|
996
|
+
label: Ce[e],
|
|
995
997
|
value: e
|
|
996
998
|
})),
|
|
997
999
|
className: "!hfl-h-[40px] hfl-w-[200px]",
|
|
@@ -1104,14 +1106,14 @@ const Sa = (M) => {
|
|
|
1104
1106
|
X,
|
|
1105
1107
|
{
|
|
1106
1108
|
value: {
|
|
1107
|
-
label: t.marital_status &&
|
|
1109
|
+
label: t.marital_status && Ne.find((e) => e === t.marital_status) || ""
|
|
1108
1110
|
},
|
|
1109
1111
|
placeholder: "Marital Status",
|
|
1110
1112
|
label: "Marital Status",
|
|
1111
1113
|
onChange: (e) => {
|
|
1112
1114
|
i("marital_status", e.label);
|
|
1113
1115
|
},
|
|
1114
|
-
options:
|
|
1116
|
+
options: Ne.map((e) => ({
|
|
1115
1117
|
label: e,
|
|
1116
1118
|
value: e
|
|
1117
1119
|
})),
|
|
@@ -1158,7 +1160,7 @@ const Sa = (M) => {
|
|
|
1158
1160
|
}
|
|
1159
1161
|
)
|
|
1160
1162
|
] }),
|
|
1161
|
-
t?.marital_status !==
|
|
1163
|
+
t?.marital_status !== Ne[0] && /* @__PURE__ */ l.jsxs("div", { className: "hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4", children: [
|
|
1162
1164
|
/* @__PURE__ */ l.jsx(
|
|
1163
1165
|
m,
|
|
1164
1166
|
{
|
|
@@ -1210,7 +1212,7 @@ const Sa = (M) => {
|
|
|
1210
1212
|
suffixClassName: "hfl-w-[100px]",
|
|
1211
1213
|
suffixDropdownClassName: "hfl-ml-[160px]",
|
|
1212
1214
|
options: wl,
|
|
1213
|
-
suffixOptions:
|
|
1215
|
+
suffixOptions: da,
|
|
1214
1216
|
handleValChange: (e) => {
|
|
1215
1217
|
i("ref_doc_name", e);
|
|
1216
1218
|
},
|
|
@@ -1660,5 +1662,5 @@ const Sa = (M) => {
|
|
|
1660
1662
|
);
|
|
1661
1663
|
};
|
|
1662
1664
|
export {
|
|
1663
|
-
|
|
1665
|
+
Ba as P
|
|
1664
1666
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const t=require("./index-DQlbIHh3.cjs");;/* empty css */const Tt=require("./index-DkA8S5IK.cjs"),n=require("react"),Oe=require("./index.esm-BdlMQ1M7.cjs"),K=require("./dayjs.min-DXp74Ozx.cjs"),h=require("./common-utils-CJv4_aVl.cjs"),p=require("./CommonConstant-COHqiSWL.cjs"),P=require("./APIAction-5-3i1gGx.cjs"),Me=()=>t.jsxRuntimeExports.jsx("div",{className:"hfl-h-0 hfl-w-full hfl-border-1 hfl-border-Gray-200"}),Lt=({conflicts:k,handleAddPatient:b,redirectAction:B})=>{const[v,A]=n.useState(!1);return t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx("div",{className:"hfl-mx-[20%] hfl-my-5 hfl-text-center",children:t.jsxRuntimeExports.jsx(t.bs,{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."})}),t.jsxRuntimeExports.jsxs("table",{className:"hfl-mx-7",children:[t.jsxRuntimeExports.jsx("thead",{children:t.jsxRuntimeExports.jsxs("tr",{className:"hfl-w-full",children:[t.jsxRuntimeExports.jsx("th",{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]",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-flex hfl-items-center hfl-text-Gray-500",children:"#"})}),t.jsxRuntimeExports.jsx("th",{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]",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-flex hfl-items-center hfl-text-Gray-500",children:"Name"})}),t.jsxRuntimeExports.jsx("th",{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]",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-flex hfl-items-center hfl-text-Gray-500",children:"Phone No"})}),t.jsxRuntimeExports.jsx("th",{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]",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-flex hfl-items-center hfl-text-Gray-500",children:"Email"})}),t.jsxRuntimeExports.jsx("th",{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]",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-flex hfl-items-center hfl-text-Gray-500",children:"Branch"})}),t.jsxRuntimeExports.jsx("th",{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]"})]})}),k.map((o,u)=>t.jsxRuntimeExports.jsxs("tr",{className:"hfl-w-full hfl-border-1 hfl-border-Gray-100",children:[t.jsxRuntimeExports.jsx("td",{className:"hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:" hfl-flex hfl-items-center hfl-text-Gray-800",children:u+1})}),t.jsxRuntimeExports.jsx("td",{className:"hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:" hfl-flex hfl-items-center hfl-text-Gray-800",children:o.org_person_name||o.name})}),t.jsxRuntimeExports.jsx("td",{className:"hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:" hfl-flex hfl-items-center hfl-text-Gray-500",children:o.org_person_phone||o.phone})}),t.jsxRuntimeExports.jsx("td",{className:"hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:" hfl-flex hfl-items-center hfl-text-Gray-500",children:o.org_person_email||o.email})}),t.jsxRuntimeExports.jsx("td",{className:"hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:" hfl-flex hfl-items-center hfl-text-Gray-500",children:"In Same Branch"})}),t.jsxRuntimeExports.jsx("td",{className:"hfl-flex hfl-items-center hfl-justify-center hfl-border-Blue_gray-100 hfl-px-2 hfl-py-[6px] ",children:window.role_id=="11"&&t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",size:"sm",textField:"Continue",className:"hfl-text-Primary-700",onClick:async()=>{window.location.href.includes("/frontdesk")?window.location.href=window.origin+"/md/viewPatientDashboard.php?pid="+o?.person_role_id?.toString():h.goToPage(`viewPatientDashboard.php?pid=${o.person_role_id}`)}})})]}))]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-my-7 hfl-flex hfl-items-center hfl-justify-center",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:"hfl-text-Success-800",children:"If your patient is not in the above list"})}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-justify-center",children:t.jsxRuntimeExports.jsx(t.Ku,{disabled:v,hierarchy:"Primary",size:"xl",textField:"Create As New Patient",className:"hfl-bg-Primary-700",onClick:()=>{A(!0),b(!0,B)}})})]})};function kt(k){const{editPatient:b,setEditPatient:B,createAsNew:v,setCreateAsNew:A}=k,o=()=>b?"Primary":"Secondary",u=()=>v?"Primary":"Secondary";return t.jsxRuntimeExports.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:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text md",className:"hfl-text-Error-700",children:"Are you updating"}),t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:o(),size:"lg",textField:"Exisitng Patient",onClick:()=>{B(!0),A(!1)}}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text md",className:"hfl-text-Error-700",children:"or creating a"}),t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:u(),size:"lg",textField:"New Patient",onClick:()=>{A(!0),B(!1)}})]})}const Gt=k=>{const{closeModal:b,modalIsOpen:B,pref:v,variable:A}=k,{window_var:o,token:u,envName:j}=A,[Z,Fe]=n.useState(!1),[T,Ie]=n.useState({}),[G,ze]=n.useState(!1),[He,J]=n.useState(""),[qe,Ue]=n.useState(!1),[xe,Ve]=n.useState(!1),[Ye,$e]=n.useState([]),[me,L]=n.useState(!1),[w,q]=n.useState(""),[m,We]=n.useState(),[x,c]=n.useState({name:"",phone:"",age:"",gender:"",email:"",aadhar_number:""}),[U,Ke]=n.useState([]),[V,C]=n.useState({name:!1,phone:!1}),[Q,Ze]=n.useState([]),[X,Je]=n.useState([]),[ee,Qe]=n.useState([]),[Xe,te]=n.useState(!1),[et,se]=n.useState(!1),[tt,le]=n.useState(!1),[re,st]=n.useState([]),[l,E]=n.useState({name:"",phone:"",dob:"",gender:"",honorific:"",patient_preferred_language:v?.visit_pad_json?JSON.parse(v?.visit_pad_json)?.defaultLanguage?.rows:"",age:"",age_selector:"years",blood_group:"",email:"",address:"",city:"",existingBidStr:"",pincode:"",ref_doc_name:"",ref_doc_spec:"",temp_appnt_id:"",throughChannel:"",refDocId:"",careOf:"",phoneSecondary:"",occupation:"",tag:"",phone_otp:"",regAsNew:"",image_link:"",marital_status:"",spouse_blood_group:"",married_since:"",spouse_name:"",org_person_dob:"",aadhar_number:"",custom_fields:[]}),[lt,rt]=n.useState([]),{name:ge,phone:O,age:y,dob:M,gender:at}=l,[_e,je]=n.useState(!1),[nt,ae]=n.useState(l.gender),[N,be]=n.useState("Years"),[ye,Ee]=n.useState(""),[Re,ne]=n.useState(!1),[ot,it]=n.useState([]),S=(e,s,r,a)=>{it([{id:1,title:e,description:s,type:r,duration:a}])},D=n.useRef(null),ve=n.useRef(null),[we,F]=n.useState(!1),[Ce,Y]=n.useState(!1),[ht,Ne]=n.useState(!1),[dt,oe]=n.useState(!1),[Pe,ft]=n.useState(),R=m&&m.visit_pad_json&&h.isJson(m.visit_pad_json)&&JSON.parse(m.visit_pad_json),Se=h.debounceFn((...e)=>{const[s,r]=e;yt(s,r)}),i=n.useCallback((e,s)=>{Y(!1),E(r=>({...r,[e]:s})),(e==="name"||e==="phone"&&s.length>=3)&&Se(e,s)},[Se]),ct=e=>{i("throughChannel",e.value.trim()),te(!1)},pt=e=>{i("occupation",e.trim()),se(!1)},ut=e=>{i("city",e.trim()),le(!1)},xt=e=>{const{value:s}=e.target,r=_t(s);Ze(r)},mt=e=>{const{value:s}=e.target,r=jt(s);Je(r)},gt=e=>{const{value:s}=e.target,r=bt(s);st(r)},_t=e=>{if(ee?.length){let s=ee;return e?.length&&(s=ee.filter(r=>r.title.toLowerCase().includes(e.toLowerCase()))),s}else return[]},jt=e=>{if(p.OccupationList?.length){let s=p.OccupationList;return e?.length&&(s=p.OccupationList.filter(r=>r.toLowerCase().includes(e.toLowerCase()))),s}else return[]},bt=e=>{if(p.CityList?.length){let s=p.CityList;return e?.length&&(s=p.CityList.filter(r=>r.toLowerCase().includes(e.toLowerCase()))),s}else return[]},De=n.useRef(null),$=n.useRef(null),ie=n.useRef(null),Be=window.location?.pathname.includes("/frontdesk");n.useEffect(()=>{const e=h.calculateDOB(l.age,N);e&&E(s=>({...s,dob:e}))},[N,l.age]);const he=n.useCallback(e=>{ae(e),i("gender",e),c(s=>({...s,gender:""}))},[i]),Ae=e=>{(De.current&&!De.current.contains(e.target)||$.current&&!$.current.contains(e.target))&&C({name:!1,phone:!1}),ie.current&&!ie.current.contains(e.target)&&ne(!1)},Te=n.useCallback(()=>{q(l.image_link),L(!1),F(!1)},[l.image_link]),Le=n.useCallback(async()=>{const e=await P.getBranchPreferences("patient_config",o?.org_branch_id_for_seg?.toString()||"",{token:u,envName:j});ft(e)},[u,j,o?.org_branch_id_for_seg]);n.useEffect(()=>(document.addEventListener("mousedown",Ae),()=>{document.removeEventListener("mousedown",Ae)}),[]),n.useEffect(()=>{o.doctor_speciality==="Gynaecologist"&&!l.gender&&he("1")},[l.gender,he,o.doctor_speciality]),n.useEffect(()=>{l.image_link&&Te(),l.honorific&&Ee(l.honorific)},[l.honorific,l.image_link,Te]),n.useEffect(()=>{Be&&je(!0)},[Be]),n.useEffect(()=>{Le()},[Le]),n.useEffect(()=>{(async()=>{We(v);try{const e=await P.getReferredByList({token:u,envName:j}),{total_ref_doc_details:s,through_channel:r}=e;s.length&&rt(h.parseReferredByDocList(s)),r.length&&Qe(h.parseThroughChannelList(r))}catch(e){console.log("ERROR",e)}})()},[v,u,j]);const yt=async(e,s)=>{const r={branch_id:o?.org_branch_id_for_seg||"",doctor_id:o?.person_id_for_seg||"",doctor_role_id:o?.doctor_role_id_for_seg||"",term:encodeURIComponent(s),limit:30},a=await P.getPatientList(r,{token:u,envName:j});if(!a){C({name:!1,phone:!1});return}!a.apiError&&Number(a.total_persons)>0?(Ke(a.persons),C(e==="name"?{...V,name:!0}:{...V,phone:!0})):C({name:!1,phone:!1})},de=e=>{switch(e){case"Appointment":return"#Appnt";default:return""}},fe=e=>{switch(e){case"Bill":case"Appointment":return"emrPatientPopUp.php?pid=";default:return h.EAPP_ROUTES.visitpad+"?pid="}},Et=n.useCallback(e=>{const s=r=>{E({name:r?.name||"",phone:r?.phone_number||"",gender:r?.gender||"",honorific:r?.honorific||"",patient_preferred_language:r?.patient_preferred_language||"",ref_doc_spec:r?.ref_doc_spec||"",age:r?.age.toString()||"",age_selector:"2",dob:r.org_person_dob||"",org_person_dob:r.org_person_dob||"",blood_group:r?.blood_group||"",email:r?.email||"",address:r?.address||"",city:r?.city||"",existingBidStr:r?.org_person_bid_str||"",pincode:r?.pincode||"",ref_doc_name:r?.ref_doc_name||"",temp_appnt_id:"",throughChannel:r?.through_channel||"",refDocId:r?.ref_doc_id||"",careOf:r?.care_of||"",phoneSecondary:r?.phone_secondary||"",occupation:r?.occupation||"",tag:r?.tag||"",phone_otp:"",regAsNew:"",image_link:r?.image_link||"",marital_status:r.marital_status||"",spouse_blood_group:r.spouse_blood_group||"",married_since:r.married_since||"",spouse_name:r.spouse_name||"",aadhar_number:r.aadhar_number||"",custom_fields:r.custom_fields||[]}),ae(r?.gender)};P.getPatientDetails({callback:s,payload:e,token_env:{token:u,envName:j}})},[j,u]),ke=async e=>{Ne(!0);const s={branch_id:o?.org_branch_id_for_seg?.toString()||"",person_id:o?.person_id_for_seg||"",person_role_id:o?.doctor_role_id_for_seg||"",patient_role_id:e.person_role_id||""};Et(s),C({name:!1,phone:!1}),Ve(!0),Ie(e)},Rt=()=>{let e=!0;return l.name?l.name.length<2&&(c(s=>({...s,name:"Enter at least 2 letters "})),e=!1):(c(s=>({...s,name:"Enter the Name of the Patient"})),e=!1),(m&&m.phone_number_length&&l.phone.length!=10||l.phone.length&&l.phone.length!=10)&&(c(s=>({...s,phone:"Please enter 10 digit number"})),e=!1),l.aadhar_number&&l.aadhar_number.length!=12&&(c(s=>({...s,aadhar_number:"Please enter 12 digit aadhar number"})),e=!1),I(N).length&&M?.length===0&&(c(s=>({...s,age:"Invalid Age."})),e=!1),at===""&&(c(s=>({...s,gender:"Select Gender"})),e=!1),x.email.length&&(l.email&&!Oe.create$6().email().isValidSync(l.email)&&c(s=>({...s,email:"Email format is wrong"})),e=!1),e},W=async(e,s)=>{try{if(!Rt()){S("Invalid form","Please fill in the required fields","Error",3e3);return}const a=new FormData;a.append("name",l.name),a.append("phone",l.phone),a.append("gender",h.getGenderKey(l.gender)),a.append("honorific",l.honorific),a.append("patient_preferred_language",l.patient_preferred_language),a.append("age",M&&M.length?M:h.calculateDate(l?.age,N)||""),a.append("age_selector",l.age_selector),a.append("blood_group",l.blood_group),a.append("email",l.email),a.append("address",l.address),a.append("city",l.city),a.append("existing_bid_str",l.existingBidStr),a.append("pincode",l.pincode),a.append("ref_doc_id",l.refDocId),a.append("ref_doc_name",l.ref_doc_name),a.append("ref_doc_spec",l.ref_doc_spec),a.append("through_channel",l.throughChannel),a.append("care_of",l.careOf),a.append("phone_secondary",l.phoneSecondary),a.append("occupation",l.occupation),a.append("tag",l.tag),a.append("marital_status",l.marital_status),a.append("married_since",l.married_since),a.append("spouse_name",l.spouse_name),a.append("spouse_blood_group",l.spouse_blood_group),a.append("aadhar_number",l.aadhar_number),a.append("custom_fields",JSON.stringify(l.custom_fields||[])),e&&a.append("reg_as_new","1");const f=Object.fromEntries(a.entries()),g=Object.fromEntries(Object.entries(f).map(([H,At])=>[H,String(At)])),_={...g,custom_fields:JSON.parse(g.custom_fields||"[]"),doctor_role_id:o.doctor_role_id_for_seg||"",doctor_id:o.person_id_for_seg||"",org_branch_id:o.org_branch_id_for_seg||"",source:"emr",ip:""},d=await P.addPatientDetails(_,{token:u,envName:j});if(d.apiError)S("Error",d.apiError,"Error",3e3),Y(!1);else{if(e){try{w&&await ce(d.person_role_id.toString(),d.org_person_bid_str.toString())}catch(H){console.log(H)}s!=="Rx"&&R&&R?.mode_of_patient_popup?.include=="1"&&typeof o.patientPopupHandler<"u"?o.patientPopupHandler("addpatient",d.person_role_id.toString(),d.person_id.toString(),m,R,s):h.goToPage(fe(s)+d.person_role_id.toString()+de(s)),b();return}else{try{w&&await ce(d.person_role_id.toString(),d.org_person_bid_str.toString())}catch(H){console.log(H)}z()}d?.conflicts?.length>0?(Fe(!0),$e(d.conflicts)):b(),Array.isArray(d?.person)||S("Success","Patient Added Successfully","Success",3e3),d!=null&&!d?.conflicts?.length&&d?.person_role_id&&(s!=="Rx"&&R&&R?.mode_of_patient_popup?.include=="1"&&typeof o.patientPopupHandler<"u"?o.patientPopupHandler("addpatient",d.person_role_id.toString(),d.person_id.toString(),m,R,s):h.goToPage(fe(s)+d.person_role_id.toString()+de(s)),b())}}catch(r){console.log(r)}},vt=()=>{try{const e={"/md/viewRemoteAppointments.php":["onlineConsultationHead","bannerPopupWrap","calendarViewClassDiv"],[h.EAPP_ROUTES.consultations]:["onlineConsultationHead","newPaddingMarginEMR","bannerPopupWrap","consultations_mfe"],[h.EAPP_ROUTES.appointments]:["appointments_mfe"]},s=window.location?.pathname||"",r=e[s];if(!r?.length)return;const a=document.getElementById("react_emr_mfe"),f=document.getElementById("react_curtains_mfe"),g=document.querySelector(".offlineEMR3");[a,f,g].forEach(_=>{_&&_.classList.contains("hidden")&&_.classList.remove("hidden")});for(const _ of r){const d=document.getElementsByClassName(_);d.length&&!d[0].classList.contains("hidden")&&d[0].classList.add("hidden")}}catch(e){console.error("Error in manipulating DOM:",e)}},ce=async(e,s)=>{const r=new FormData;r.append("pid",e),r.append("bidstr",s),r.append("imgData",w);const a=await P.addPatientImage(r,{token:u,envName:j});a.apiError&&S("Error",a.apiError,"Error",3e3)},pe=async e=>{const s={patient_id:T?.person_id,honorific:l?.honorific,name:l?.name,gender:l?.gender,age:l?.age,org_person_dob:l?.dob?l.dob:h.calculateDate(l?.age,N)||void 0,phone_number:l?.phone,email:l?.email,blood_group:l?.blood_group,patient_preferred_language:l?.patient_preferred_language,address:l?.address,city:l?.city,pincode:l?.pincode,org_person_bid_str:l?.existingBidStr,ref_doc_name:l?.ref_doc_name,ref_doc_spec:l?.ref_doc_spec,through_channel:l?.throughChannel,ref_doc_id:l?.refDocId,care_of:l?.careOf,phone_secondary:l?.phoneSecondary,occupation:l?.occupation,tag:l?.tag,marital_status:l.marital_status,married_since:l.married_since,spouse_name:l.spouse_name,spouse_blood_group:l.spouse_blood_group,image_link:l?.image_link,remote_consultation_id:"0",oc_status:!1,aadhar_number:l?.aadhar_number,person_role_id:o.doctor_role_id_for_seg||"",person_id:o.person_id_for_seg||"",branch_id:o.org_branch_id_for_seg||""},r=await P.updatePatientDetails(s,{token:u,envName:j});if(G){r&&Y(!1);const{message:a,status:f}=r||{};if(f){S("Patient Edited","Patient Edited Successfully","Success",1500);try{l?.image_link&&!w?wt(T?.person_role_id):w&&dt&&(oe(!1),await ce(T?.person_role_id,l?.existingBidStr))}catch(g){console.log(g)}e!=="Rx"&&R&&R?.mode_of_patient_popup?.include=="1"&&typeof o.patientPopupHandler<"u"?o.patientPopupHandler("addpatient",T?.person_role_id,T?.person_id,m,R,e):h.goToPage(fe(e)+T?.person_role_id?.toString()+de(e)),b()}else S("Patient Not Edited",a||"Patient Not Edited","Failure",1500)}},wt=async e=>{const s=new FormData;s.append("pid",e);const r=await P.deletePatientImage(s,{token:u,envName:j});r.apiError&&S("Error",r.apiError,"Error",3e3)},I=(e="")=>{const s=e?.toLowerCase();return M!==""?"":y!==""&&Number(y)<0&&l?.dob===""?"Invalid Age":s==="weeks"&&y!==""&&Number(y)<5907||s==="days"&&y!==""&&Number(y)<9999||s==="months"&&y!==""&&Number(y)<1358||s==="years"&&y!==""&&Number(y)<114?"":"Invalid Age"},Ct=async()=>{try{L(!1);const e=await navigator.mediaDevices.getUserMedia({video:!0});D.current&&(D.current.srcObject=e),F(!0)}catch(e){console.error("Error accessing camera:",e)}},Nt=()=>{const e=ve.current,s=D.current;if(e&&s){e.width=s.videoWidth,e.height=s.videoHeight;const r=e.getContext("2d");if(r){r.drawImage(s,0,0,e.width,e.height);const a=e.toDataURL();q(a),L(!1),F(!1),z()}}},Pt=()=>{document.getElementById("upload-local-file")?.click()},St=e=>{L(!1),F(!1);const s=e.target.files?.[0];if(!s)return;const r=new FileReader;r.readAsDataURL(s),r.onloadend=()=>{const a=r.result;a&&q(a.toString()),e.target.value=""}},Ge=()=>{L(!0),q(""),F(!1),z()},z=()=>{if(D.current){const e=D.current.srcObject;e instanceof MediaStream&&e.getTracks().forEach(s=>s.stop()),D.current.srcObject=null}},Dt=n.useMemo(()=>[...Pe?.patient_config?.custom_fields||[]].sort((r,a)=>r.sort-a.sort).map(r=>{const a=l.custom_fields?.find(f=>f.id===r.id);return{...r,value:a?.value||"",title:a?.value?a?.title:r.title}}),[Pe?.patient_config?.custom_fields,l.custom_fields]),ue=(e,s,r)=>{E(a=>{const f=a.custom_fields?.length?a.custom_fields.map(_=>_.id===e?{..._,value:r}:_):[];return f.some(_=>_.id===e)||f.push({id:e,value:r,title:s}),{...a,custom_fields:f}})},Bt=()=>Dt?.map(e=>{const{id:s,type:r,value:a,title:f}=e||{};if(!s||!r||!f)return null;switch(r){case"text":return t.jsxRuntimeExports.jsx(t.Ps,{label:f,labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:a||"",placeholder:`Enter ${f}`,onChange:g=>{ue(s,f,g.target.value)}},width:"22em"},s);case"date":return t.jsxRuntimeExports.jsx(t.ZC,{label:f,placeholder:`Select ${f}`,selectDate:a?new Date(a):null,dateVar:g=>{ue(s,f,g.toDateString()||"")},isborderRequired:!0,width:"22em",clearDate:g=>{ue(s,f,g)},openUp:!0,backSpaceClearDate:!0},s);default:return null}});return t.jsxRuntimeExports.jsx(Tt.Modal,{isOpen:B,onRequestClose:()=>{z(),b()},shouldCloseOnOverlayClick:!1,style:{content:{zIndex:1030,padding:"0px",maxWidth:"840px",maxHeight:"624px",margin:"auto",borderRadius:"12px"},overlay:{backgroundColor:"rgba(52, 64, 84, 0.5)",position:"fixed",zIndex:1030}},children:t.jsxRuntimeExports.jsxs("div",{id:"add-patient-modal",children:[t.jsxRuntimeExports.jsxs("div",{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",id:"add-patient-header","data-qa":"testid_addPatient",children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text xl",children:Z?"Patient(s) with Same phone number or Email":"Add New Patient"}),t.jsxRuntimeExports.jsx("div",{className:"hfl-items-center",children:t.jsxRuntimeExports.jsx("span",{className:"hx_close hfl-ml-4 hover:hfl-cursor-pointer",onClick:()=>{z(),b()}})})]}),Z?t.jsxRuntimeExports.jsx(Lt,{conflicts:Ye,handleAddPatient:W,redirectAction:He,manipulateExistingDOM:vt}):t.jsxRuntimeExports.jsxs("div",{className:"hfl-min-h-[400px] hfl-px-10 hfl-py-5",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between",children:[t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"Patient Name*",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",prefix:t.jsxRuntimeExports.jsxs("div",{ref:ie,className:"-hfl-ml-2 hfl-flex hfl-w-16 hfl-items-center hfl-justify-between hfl-bg-Gray-50",onClick:()=>ne(e=>!e),children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:"hfl-px-1 hfl-py-1 hfl-text-Gray-700",children:ye}),!ye.length&&t.jsxRuntimeExports.jsx("div",{className:`${Re?"hx_up":"hx_down"} -hfl-mr-2`})]}),errorMsg:x.name?x.name:void 0,inputProps:{type:"text",value:ge,placeholder:"Enter Name",onChange:e=>{i("name",e.target.value)},onBlur:()=>{const e=!(l.name.length>0);l.name.length>0&&l.name.length<2&&!ht?c(s=>({...s,name:"Enter at least 2 letters "})):c(s=>({...s,name:e?"Enter the Name of the Patient":""})),Ne(!1),C({name:!1,phone:!1})}},start_icon:"hx_person",width:"16em"}),Re&&t.jsxRuntimeExports.jsx("div",{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",style:{boxShadow:"0px 24px 48px -12px rgba(16, 24, 40, 0.18)"},children:p.HonorificList.map(e=>t.jsxRuntimeExports.jsx(t.ks,{className:"hfl-text-Primary-700",label:e.label,onSelect:()=>{Ee(e.label),ne(!1),ae(e.gender),i("honorific",e.label),i("gender",e.gender),E(s=>({...s,gender:e.gender,honorific:e.label}))}}))}),V.name&&ge.length>0&&t.jsxRuntimeExports.jsxs("div",{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]",style:{boxShadow:"0px 24px 48px -12px rgba(16, 24, 40, 0.18)"},ref:$,children:[t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-text-Primary-600",variant:"Regular",type:"Text md",children:"Existing Patients"}),U&&U?.slice(0,7)?.map(e=>t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",onMouseDown:()=>ke(e),children:[t.jsxRuntimeExports.jsxs(t.bs,{variant:"Regular",type:"Text md",className:"hfl-px-1 hfl-py-1 hfl-text-Gray-700",children:[e?.org_person_name?.length>13?e?.org_person_name?.substring(0,11)+"...":e?.org_person_name,`(${e.ageStr||h.calculateAge(e.age)}, ${h.getGender(parseInt(e.org_person_gender.toString()))})`]}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-Gray-500",children:e.org_person_phone||""})]},e?.person_role_id))]})]}),t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx(t.Ps,{label:`Phone Number ${m&&m.phone_number_length?"*":""}`,labelColor:"hfl-text-Gray-600",labelSize:"Text sm",errorMsg:x.phone?x.phone:void 0,inputProps:{maxLength:10,value:O,placeholder:"Enter Number",onChange:e=>{i("phone",e.target.value.replace(/[^0-9]/g,""))},onBlur:()=>{const{isError:e=!1,msg:s=""}=m&&m.phone_number_length||O?h.validateMobileNo(O):{};c(r=>({...r,phone:e?s:""})),C({name:!1,phone:!1})}},width:"21em",start_icon:"hx_phone"}),V.phone&&O.length>0&&t.jsxRuntimeExports.jsxs("div",{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]",style:{boxShadow:"0px 24px 48px -12px rgba(16, 24, 40, 0.18)"},ref:$,children:[t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-text-Primary-600",variant:"Regular",type:"Text md",children:"Existing Patients"}),U&&U?.slice(0,7)?.map(e=>t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-cursor-pointer hfl-items-center hfl-justify-between hfl-gap-[36px]",onMouseDown:()=>ke(e),children:[t.jsxRuntimeExports.jsxs(t.bs,{variant:"Regular",type:"Text md",className:"hfl-px-1 hfl-py-1 hfl-text-Gray-700",children:[e.org_person_name?.length>13?e.org_person_name?.substring(0,11)+"...":e.org_person_name,`(${e.ageStr||h.calculateAge(e.age)}, ${h.getGender(parseInt(e.org_person_gender.toString()))})`]}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-Gray-500",children:e.org_person_phone})]},e?.person_role_id))]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-row hfl-justify-between hfl-space-x-2 hfl-pt-4",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-h-[40px] hfl-space-y-1",children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-pb-[1px] hfl-text-Gray-600",children:"Gender*"}),t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx(t.ju,{className:`!hfl-h-[40px] hfl-w-44 ${x.gender?"hfl-border-Error-300":""}`,options:[{label:"M",value:"0"},{label:"F",value:"1"},{label:"Other",value:"2"}],value:nt,onChange:e=>he(e),disabled:!1}),!!x.gender&&t.jsxRuntimeExports.jsx("div",{className:"hfl-font-inter hfl-text-1 hfl-font-inter-0 hfl-leading-10 hfl-tracking-1 hfl-text-Error-500",children:x.gender})]})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-space-x-1",children:[t.jsxRuntimeExports.jsx("div",{className:"hfl-space-y-2",children:t.jsxRuntimeExports.jsx(t.ej,{label:"Age or DOB*",className:"hfl-w-20",classNamedoubleInput:"hfl-relative",suffixClassName:"hfl-w-16 hfl-border-0",suffixDropdownClassName:"hfl-ml-[80px]",input1value:l.age,input2value:N,end_icon:"hx_down",errorMsg:x.age?x.age:void 0,inputProps:{type:"number",min:0,maxLength:3,placeholder:"Age",onChange:e=>{i("age",e.target.value.replace(/[^0-9]/g,"")),E(s=>({...s,dob:""}))},onBlur:()=>{c(e=>({...e,age:I(N)}))}},onlySuffixDropdownItemsAllowed:!0,suffixInputProps:{placeholder:"Select format"},suffixOptions:[{label:"Years",value:"years"},{label:"Weeks",value:"weeks"},{label:"Months",value:"months"},{label:"Days",value:"days"}],handleValChange:e=>{i("age",e),c(s=>({...s,age:I(N)}))},handleSuffixValChange:e=>{be(e),c(s=>({...s,age:I(e)}))},onSuffixDropdownClick:e=>{be(e.label),E(s=>({...s,age_selector:e.value,dob:""})),c(s=>({...s,age:I(e.value)}))}})}),t.jsxRuntimeExports.jsx("div",{className:"hfl-mt-[24px] hfl-space-y-1",children:t.jsxRuntimeExports.jsx(t.ZC,{className:"hfl-relative",placeholder:"DOB",width:"8em",height:"!hfl-h-[40px]",label:"",labelSize:"Text sm",labelColor:"hfl-text-Gray-700",selectDate:l?.dob&&h.isValidDate(new Date(l?.dob))?new Date(K.dayjs(new Date(l?.dob)).format("DD-MMM-YYYY")):"",dateVar:e=>{E(s=>({...s,dob:K.dayjs(e).format("YYYY-MM-DD"),age:""})),c(s=>({...s,age:""}))},isborderRequired:!0,maxDate:new Date})})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-space-y-1",children:t.jsxRuntimeExports.jsx(t.Ap,{value:{label:l?.patient_preferred_language?p.DefinedLanguages[l.patient_preferred_language]:"English"},placeholder:"English",label:"Preferred Language",onChange:e=>{i("patient_preferred_language",e.value)},options:Object.keys(p.DefinedLanguages).map(e=>({label:p.DefinedLanguages[e],value:e})),className:"!hfl-h-[40px] hfl-w-[200px]","data-qa":"dropdown-language"})})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-row hfl-justify-between hfl-pb-6 hfl-pt-6",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-w-6/12 hfl-flex-col ",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-relative",children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"City",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.city,placeholder:"Enter City",onChange:e=>{i("city",e.target.value),le(!0),gt(e)},onBlur:e=>{e.stopPropagation(),le(!1)}},width:23.5+"em"}),tt&&re&&re.length>0&&t.jsxRuntimeExports.jsx("div",{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 ",children:re.map(e=>t.jsxRuntimeExports.jsx(t.ks,{label:e,className:"hfl-text-Primary-700",onSelect:()=>ut(e)}))})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-pt-4",children:t.jsxRuntimeExports.jsx(t.Ps,{className:"hfl-mb-3",label:"Pin",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.pincode,placeholder:"Enter Pin",onChange:e=>{i("pincode",e.target.value)}},width:22.5+"em"})})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-h-full hfl-flex-col",style:{height:"100%"},children:t.jsxRuntimeExports.jsx(t.bu,{className:"hfl-w-[355px]",label:"Address",inputProps:{value:l?.address,placeholder:"Enter Address",onChange:e=>{i("address",e.target.value)}},isDynamicHeight:!0,"data-qa":"enter-address"})})]}),xe?t.jsxRuntimeExports.jsx(kt,{setEditPatient:ze,editPatient:G,createAsNew:qe,setCreateAsNew:Ue,showEditPrompt:xe}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{}),_e?t.jsxRuntimeExports.jsxs("div",{className:"",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-stroke-Gray-200 hfl-stroke-1 hfl-pb-6",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-relative",children:[t.jsxRuntimeExports.jsx("span",{className:"hfl-absolute hfl-left-0 hfl-right-0 hfl-top-1/2 hfl-h-px hfl-bg-Gray-200"}),t.jsxRuntimeExports.jsx("span",{className:"hfl-relative hfl-bg-White hfl-px-4",children:t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text sm",className:"hfl-ml-2 hfl-inline hfl-bg-White hfl-text-Gray-400",children:"Marital Status"})})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-space-x-1",children:[t.jsxRuntimeExports.jsx("div",{className:"hfl-space-y-2",children:t.jsxRuntimeExports.jsx(t.Ap,{value:{label:l.marital_status&&p.MARITAL_STATUS.find(e=>e===l.marital_status)||""},placeholder:"Marital Status",label:"Marital Status",onChange:e=>{i("marital_status",e.label)},options:p.MARITAL_STATUS.map(e=>({label:e,value:e})),className:"!hfl-h-[40px] hfl-w-[200px]","data-qa":"marital-status"})}),t.jsxRuntimeExports.jsx("div",{className:"hfl-mt-[24px] hfl-flex hfl-space-y-2",children:t.jsxRuntimeExports.jsx(t.ZC,{className:"hfl-relative",placeholder:"Since",width:"8em",height:"!hfl-h-[40px]",label:"",labelSize:"Text sm",labelColor:"hfl-text-Gray-700",selectDate:l?.married_since&&h.isValidDate(new Date(l?.married_since))?new Date(K.dayjs(new Date(l?.married_since)).format("DD-MMM-YYYY")):"",dateVar:e=>{E(s=>({...s,married_since:K.dayjs(e).format("YYYY-MM-DD")}))},isborderRequired:!0,maxDate:new Date})})]}),t.jsxRuntimeExports.jsx(t.Ap,{label:"Blood Group",placeholder:"Enter blood group",value:{label:l.blood_group&&p.bloodGroups.find(e=>e.value===l.blood_group)?.label||"Blood group"},onChange:e=>{i("blood_group",e.value)},options:p.bloodGroups,className:"!hfl-h-11 hfl-w-[370px]","data-qa":"blood-group"})]}),l?.marital_status!==p.MARITAL_STATUS[0]&&t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-4",children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"Spouse Name",start_icon:"hx_person",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l.spouse_name,placeholder:"Enter Spouse Name",onChange:e=>{i("spouse_name",e.target.value)}},width:"21em"}),t.jsxRuntimeExports.jsx(t.Ap,{label:"Spouse Blood Group",placeholder:"Enter blood group",value:{label:l.spouse_blood_group?p.bloodGroups.find(e=>e.value===l.spouse_blood_group)?.label||"Spouse Blood group":"Blood group"},onChange:e=>{i("spouse_blood_group",e.value)},options:p.bloodGroups,className:"!hfl-h-11 hfl-w-[370px]","data-qa":"blood-group"})]})]}),t.jsxRuntimeExports.jsx(Me,{}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between hfl-pt-6",children:t.jsxRuntimeExports.jsx(t.ej,{classNameDatePicker:"hfl-relative",classNamedoubleInput:"hfl-relative",label:"Referred By",input1value:l.ref_doc_name,input2value:l.ref_doc_spec,end_icon:"hx_down",inputProps:{placeholder:"Doctor Name"},suffixInputProps:{placeholder:"Speciality"},className:"hfl-w-48",suffixClassName:"hfl-w-[100px]",suffixDropdownClassName:"hfl-ml-[160px]",options:lt,suffixOptions:p.SpecialityList,handleValChange:e=>{i("ref_doc_name",e)},handleSuffixValChange:e=>{i("ref_doc_spec",e.value)},onDropdownClick:e=>{i("ref_doc_name",e.doctor_name),i("refDocId",e.doctor_id),i("ref_doc_spec",e.specialist)},onSuffixDropdownClick:e=>{i("ref_doc_spec",e.value)}})}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-row hfl-justify-between hfl-pb-6 hfl-pt-4",children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"Existing ID (if any)",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.existingBidStr,placeholder:"Enter ID",onChange:e=>{i("existingBidStr",e.target.value)}},width:"23em"}),t.jsxRuntimeExports.jsx(t.Ps,{label:"Email",showEmailSuggestions:!0,labelColor:"hfl-text-Gray-600",errorMsg:x.email?x.email:void 0,labelSize:"Text sm",start_icon:"hx_mail",inputProps:{value:l.email,placeholder:"Enter Email",onChange:e=>{i("email",e.target.value.trim())},onBlur:e=>{e.target.value&&!Oe.create$6().email().isValidSync(e.target.value)?c(s=>({...s,email:"Email format is wrong"})):c(s=>({...s,email:""}))}},width:20.5+"em"})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-inline-flex hfl-flex-row hfl-flex-wrap hfl-justify-between hfl-gap-y-6 hfl-py-6",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-1 hfl-flex-row hfl-justify-between",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-relative",children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"Channel (How did the patient hear about you?)",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.throughChannel,placeholder:"Enter Channel",onChange:e=>{i("throughChannel",e.target.value),te(!0),xt(e)},onBlur:e=>{e.stopPropagation(),te(!1)}},width:"22em"}),Xe&&Q&&Q.length>0&&t.jsxRuntimeExports.jsx("div",{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 ",children:Q.map(e=>{const{title:s,...r}=e;return t.jsxRuntimeExports.jsx(t.ks,{label:s,className:"hfl-text-Primary-700",...r,onSelect:()=>ct({value:e.value})},e.value)})})]}),t.jsxRuntimeExports.jsx(t.Ps,{label:"C/O",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.careOf,placeholder:"Enter C/O",onChange:e=>{i("careOf",e.target.value)}},width:"22em"})]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-relative",children:[t.jsxRuntimeExports.jsx(t.Ps,{label:"Occupation",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l?.occupation,placeholder:"Enter Occupation",onChange:e=>{i("occupation",e.target.value),se(!0),mt(e)},onBlur:e=>{e.stopPropagation(),se(!1)}},width:"22em"}),et&&X&&X.length>0&&t.jsxRuntimeExports.jsx("div",{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 ",children:X.map(e=>t.jsxRuntimeExports.jsx(t.ks,{label:e,className:"hfl-text-Primary-700",onSelect:()=>pt(e)}))})]}),t.jsxRuntimeExports.jsx(t.Ps,{label:"Tag",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l.tag,placeholder:"Enter Tag",onChange:e=>{i("tag",e.target.value)}},width:"22em"}),t.jsxRuntimeExports.jsx(t.Ps,{label:"Mobile 2",labelColor:"hfl-text-Gray-600",labelSize:"Text sm",inputProps:{value:l.phoneSecondary,maxLength:10,placeholder:"Enter Secondary Number",onChange:e=>{i("phoneSecondary",e.target.value.replace(/[^0-9]/g,""))}},width:"22em"}),t.jsxRuntimeExports.jsx(t.Ps,{label:"Aadhar Number",labelColor:"hfl-text-Gray-600",errorMsg:x.aadhar_number?x.aadhar_number:void 0,labelSize:"Text sm",inputProps:{value:l.aadhar_number,placeholder:"Aadhar Card Number",maxLength:12,onChange:e=>{i("aadhar_number",e.target.value)},onBlur:()=>{c(e=>({...e,aadhar_number:l.aadhar_number&&l.aadhar_number.length!=12?"Please enter 12 digit aadhar number":""}))}},width:"22em"}),t.jsxRuntimeExports.jsx("div",{className:"hfl-grid hfl-grid-cols-2 hfl-gap-x-11 hfl-gap-y-6",children:Bt()})]}),t.jsxRuntimeExports.jsx(Me,{}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-flex-col hfl-items-start hfl-justify-start hfl-pt-3",children:t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-h-[153px] hfl-w-[200px] hfl-items-center hfl-justify-center
|
|
2
|
+
hfl-rounded-3xl hfl-border-4
|
|
3
|
+
hfl-border-White hfl-bg-Primary-50 hfl-shadow-lg`,children:[t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-flex-col hfl-items-center hfl-justify-between
|
|
4
|
+
${me?"":"hfl-hidden"}`,children:[t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Primary",size:"lg",textField:"Camera",className:"hfl-mb-2",onClick:Ct,icon:"Left",iconFile:"hx_camera"}),t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsx("input",{id:"upload-local-file",type:"file",style:{display:"none"},accept:"image/*",onChange:St}),t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",size:"lg",textField:"Upload",icon:"Left",iconFile:"hx_image-add",onClick:Pt})]})]}),t.jsxRuntimeExports.jsxs("div",{className:`hfl-relative hfl-flex
|
|
5
|
+
${we?"":"hfl-hidden"}`,children:[t.jsxRuntimeExports.jsx("canvas",{ref:ve,style:{display:"none"}}),t.jsxRuntimeExports.jsx("video",{ref:D,className:"hfl-object-fit hfl-h-full hfl-w-full hfl-rounded-3xl",autoPlay:!0}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-absolute hfl-bottom-0 hfl-left-0 hfl-right-0 hfl-flex hfl-justify-around",children:[t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Primary",size:"lg",textField:"Cancel",className:"hfl-mb-2 hfl-bg-Error-600 hover:hfl-bg-Error-700",onClick:Ge}),t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Primary",size:"lg",textField:"Capture",className:"hfl-mb-2 hfl-bg-Primary-600",onClick:Nt})]})]}),t.jsxRuntimeExports.jsx("div",{className:me||w||we?"hfl-hidden":"",onClick:()=>{oe(!0),L(!0)},"data-qa":"profile-img",children:t.jsxRuntimeExports.jsxs("svg",{width:"76",height:"72",viewBox:"0 0 76 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsxRuntimeExports.jsx("path",{opacity:"0.4",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",fill:"#396CE8"}),t.jsxRuntimeExports.jsx("path",{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",fill:"#396CE8"}),t.jsxRuntimeExports.jsx("path",{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",fill:"#396CE8"}),t.jsxRuntimeExports.jsx("path",{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",fill:"#396CE8"})]})}),t.jsxRuntimeExports.jsxs("div",{className:`hfl-relative hfl-h-full hfl-w-full
|
|
6
|
+
${w?"":"hfl-hidden"}`,children:[t.jsxRuntimeExports.jsx("img",{src:w,alt:"ProfilePicturePreview",className:"hfl-h-full hfl-w-full hfl-rounded-3xl hfl-object-cover"}),t.jsxRuntimeExports.jsx("div",{className:`hfl-absolute hfl-right-2 hfl-top-2 hfl-flex hfl-h-[40px]
|
|
7
|
+
hfl-w-[40px] hfl-cursor-pointer hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-White`,onClick:()=>{oe(!0),Ge()},children:t.jsxRuntimeExports.jsx("i",{className:"hx_delete hfl-text-[22px]"})})]})]})})]}):t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-row hfl-items-center hfl-justify-center",children:[t.jsxRuntimeExports.jsxs(t.bs,{variant:"Regular",type:"Text md",children:["If you want to add more details,"," "]}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Medium",type:"Text md",className:"hfl-cursor-pointer hfl-text-Primary-700",onClick:()=>{je(!0)},children:"Click Here"})]})]}),t.jsxRuntimeExports.jsx("div",{className:`${_e?"":"hfl-flex hfl-w-full"} hfl-sticky hfl-bottom-0 hfl-bg-White`,children:Z?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{}):t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-h-[118px] hfl-w-full hfl-flex-col hfl-items-center hfl-justify-center hfl-gap-1",style:{boxShadow:"-3px -1px 4px rgba(0, 0, 0, 0.25)"},children:[window.location?.href.indexOf("/frontdesk")==-1&&t.jsxRuntimeExports.jsx(t.Ku,{disabled:Ce,hierarchy:"Primary",size:"sm",textField:"Add & Create Rx",className:"hfl-bg-Primary-600",onClick:()=>{Ce||(Y(!0),J("Rx"),G?pe("Rx"):W(!1,"Rx"))}}),t.jsxRuntimeExports.jsx("div",{children:window.location?.href.indexOf("/frontdesk")==-1&&t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",children:"or"})}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-start hfl-gap-2",children:[t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",size:"sm",textField:"Add & Create Bill",className:"hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",onClick:()=>{J("Bill"),G?pe("Bill"):W(!1,"Bill")}}),t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",size:"sm",textField:"Add & Create Appointment",className:"hfl-w-[190px] hfl-flex-1 hfl-justify-center hfl-text-Primary-700",onClick:()=>{J("Appointment"),G?pe("Appointment"):W(!1,"Appointment")}})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-absolute hfl-z-[100]",children:t.jsxRuntimeExports.jsx(t.qh,{toastList:ot})})]})})]})})};exports.PatientAddEdit=Gt;
|