hplx-feature-library 1.0.175 → 1.0.177
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-GKwgCFa7.cjs +1 -0
- package/dist/{index-nNWK2dDb.js → APIAction-owCQeK4h.js} +1 -1
- package/dist/AllInvestigations/index.js +1 -1
- package/dist/{AllInvestigationsTable-txmu7PTJ.js → AllInvestigationsTable-230u6fB3.js} +40 -38
- package/dist/{AllInvestigationsTable-C7uQ56B0.cjs → AllInvestigationsTable-BDLPOHjr.cjs} +4 -4
- package/dist/NineDots/index.js +4 -0
- package/dist/NineDots-Cy5GdMqh.cjs +3 -0
- package/dist/NineDots-Q7DH5xQq.js +1787 -0
- package/dist/{components → PatientAddEdit/components}/PatientAddEdit.d.ts +1 -1
- package/dist/PatientAddEdit/index.d.ts +1 -0
- package/dist/PatientAddEdit/index.js +2 -1661
- package/dist/PatientAddEdit-D-PuyA4h.cjs +7 -0
- package/dist/PatientAddEdit-MgBWiJqX.js +1665 -0
- package/dist/PatientPopup/components/bills/Bills.d.ts +3 -1
- package/dist/PatientPopup/index.js +1 -1
- package/dist/PatientPopupContainer-BREW2AZX.cjs +36 -0
- package/dist/{PatientPopupContainer-BSWU5CPk.js → PatientPopupContainer-CyTTjYhk.js} +3976 -3967
- package/dist/{PrintModal-BeR4-UcB.js → PrintModal-BR_tTgyn.js} +2 -1
- package/dist/{PrintModal-PPpn_LGy.cjs → PrintModal-CaqANEG3.cjs} +8 -8
- package/dist/{components → SearchPatients/components}/SearchPatients.d.ts +1 -1
- package/dist/SearchPatients/index.d.ts +1 -0
- package/dist/SearchPatients/index.js +4 -0
- package/dist/SearchPatients-BEQ0kjtj.js +233 -0
- package/dist/SearchPatients-eiOJOnND.cjs +1 -0
- package/dist/UserProfile/index.js +4 -0
- package/dist/UserProfile-Bs3EzSqu.js +1761 -0
- package/dist/UserProfile-C4cNhkeg.cjs +14 -0
- package/dist/common-utils-CDvwCtzy.js +2328 -0
- package/dist/common-utils-lI6oOpoS.cjs +6 -0
- package/dist/hplx-feature-library.css +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.esm-BdlMQ1M7.cjs +4 -0
- package/dist/index.esm-Bn1Rklqj.js +1275 -0
- package/dist/index.js +16 -2023
- package/dist/nineDots/{nineDots.d.ts → NineDots.d.ts} +1 -1
- package/dist/nineDots/NineDotsUtils.d.ts +1 -1
- package/dist/nineDots/index.d.ts +1 -0
- package/dist/print-pdf/index.js +1 -1
- package/dist/types/AllInvestigationTypes.d.ts +2 -0
- package/dist/useMediaQuery-CZAbdJzN.js +13 -0
- package/dist/useMediaQuery-D4SIgdMW.cjs +1 -0
- package/dist/userProfile/index.d.ts +1 -0
- package/package.json +22 -11
- package/dist/PatientPopupContainer-nZZA67ZY.cjs +0 -36
- package/dist/index-Cy8OvNyb.cjs +0 -1
- package/dist/index.esm-BJMiy-rl.js +0 -3597
- package/dist/index.esm-DvJKLbVG.cjs +0 -9
- /package/dist/{nineDots → types}/NineDotsTypes.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './components/SearchPatients';
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { j as t, b as r, q as X, K as Y } from "./index-BUI6-03D.js";
|
|
2
|
+
import { useState as o, useRef as k, useCallback as y, useMemo as Z, useEffect as C } from "react";
|
|
3
|
+
import { g as ee } from "./APIAction-owCQeK4h.js";
|
|
4
|
+
import { u as te } from "./useMediaQuery-CZAbdJzN.js";
|
|
5
|
+
import { d as ne, g as re, a as D, E as le } from "./common-utils-CDvwCtzy.js";
|
|
6
|
+
const se = Math.abs(window.orientation || 0) === 90, fe = (T) => {
|
|
7
|
+
const { addPatientHandler: G, disabled: p, manipulateExistingDOM: R, showSearchBar: A, setShowSearchBar: h, variable: L } = T, { window_var: i, token: v, envName: b } = L, [c, d] = o(!1), x = k(null), m = k(null), [U, F] = o(0), [B, a] = o([]), $ = 6, [S, j] = o(""), [z, H] = o([]), [O, N] = o(!0), [M, P] = o([]), f = te("(max-width: 1024px)"), u = (e, n, l, s) => {
|
|
8
|
+
H([{ id: 1, title: e, description: n, type: l, duration: s }]);
|
|
9
|
+
}, _ = y(
|
|
10
|
+
async (e) => {
|
|
11
|
+
try {
|
|
12
|
+
const n = {
|
|
13
|
+
branch_id: i?.org_branch_id_for_seg || "",
|
|
14
|
+
doctor_id: i?.person_id_for_seg || "",
|
|
15
|
+
doctor_role_id: i?.doctor_role_id_for_seg || "",
|
|
16
|
+
term: encodeURIComponent(e),
|
|
17
|
+
limit: 30
|
|
18
|
+
}, l = await ee(n, {
|
|
19
|
+
envName: b,
|
|
20
|
+
token: v
|
|
21
|
+
});
|
|
22
|
+
if (!l) {
|
|
23
|
+
a([]), u("Error", "No response received from server", "Error", 3e3);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const s = l, E = window.filteredUpcomingAppts || [];
|
|
27
|
+
if (s.apiError) {
|
|
28
|
+
a([]), u("Error", s.apiError, "Error", 3e3);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
s?.persons?.length ? (a(s.persons), d(!0), F(Number(s.total_persons))) : a([]), E?.length ? (N(!1), P(E.slice(0, 5))) : (N(!0), P([]));
|
|
32
|
+
} catch (n) {
|
|
33
|
+
console.error(n), u("Error", "Something went wrong while fetching patients", "Error", 3e3);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
b,
|
|
38
|
+
v,
|
|
39
|
+
i?.doctor_role_id_for_seg,
|
|
40
|
+
i?.org_branch_id_for_seg,
|
|
41
|
+
i?.person_id_for_seg
|
|
42
|
+
]
|
|
43
|
+
), K = Z(() => ne((e) => {
|
|
44
|
+
_(e);
|
|
45
|
+
}, 500), [_]), q = (e) => {
|
|
46
|
+
const n = e.currentTarget.value.trim();
|
|
47
|
+
(!isNaN(Number(n.charAt(0))) || n.length >= 2) && K(n);
|
|
48
|
+
}, Q = () => {
|
|
49
|
+
c || _(S);
|
|
50
|
+
}, W = () => {
|
|
51
|
+
p || d((e) => !e);
|
|
52
|
+
}, g = y(
|
|
53
|
+
(e) => {
|
|
54
|
+
m.current && c && !m.current.contains(e.target) && (d(!1), a([]));
|
|
55
|
+
},
|
|
56
|
+
[c]
|
|
57
|
+
);
|
|
58
|
+
C(() => (document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g)), [g, c]);
|
|
59
|
+
const I = (e) => {
|
|
60
|
+
window.location.href.includes("/frontdesk") ? window.patientPopupHandlerFromFD(e.patient_role_id, e.patient_person_id) : D(`viewPatientDashboard.php?pid=${e.patient_role_id}`);
|
|
61
|
+
}, J = async (e) => {
|
|
62
|
+
let n = !0;
|
|
63
|
+
if (typeof window.beforePatientChange == "function" && window.location.pathname == le.visitpad && (n = window.beforePatientChange()), d(!1), a([]), n) {
|
|
64
|
+
window.patient_role_id = e.person_role_id != "0" ? e.person_role_id.toString() : "0", window.patient_person_id = e.person_id != "0" ? e.person_id.toString() : "0";
|
|
65
|
+
const l = (e.person_role_id == "0", e.person_role_id);
|
|
66
|
+
if (l && (R(), window.location.href.indexOf("/frontdesk") !== -1)) {
|
|
67
|
+
window.patientPopupHandlerFromFD(l, e.person_id);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
D(`viewPatientDashboard.php?pid=${l}`);
|
|
71
|
+
}
|
|
72
|
+
}, V = () => {
|
|
73
|
+
W(), G(), j("");
|
|
74
|
+
}, w = y(
|
|
75
|
+
(e) => {
|
|
76
|
+
x.current && !x.current.contains(e.target) && f && h(!1);
|
|
77
|
+
},
|
|
78
|
+
[f, h]
|
|
79
|
+
);
|
|
80
|
+
return C(() => (document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w)), [w]), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
81
|
+
A ? /* @__PURE__ */ t.jsxs(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: `hfl-flex hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-Blue-900 hfl-text-White ${p ? "hfl-pointer-events-none hfl-opacity-60" : ""}`,
|
|
85
|
+
title: p ? "Low internet speed. Feature available only in online mode" : "Search Patient",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ t.jsx(
|
|
88
|
+
"input",
|
|
89
|
+
{
|
|
90
|
+
ref: x,
|
|
91
|
+
type: "text",
|
|
92
|
+
placeholder: "Search Patient 🔍",
|
|
93
|
+
className: `hfl-rounded-full hfl-border-none hfl-bg-Blue-900 hfl-py-2 hfl-pl-4 ${f && !se ? "xxs:hfl-w-[400px]" : "hfl-min-w-[150px]"} sm:hfl-w-full`,
|
|
94
|
+
"data-qa": "testid_patientSearch",
|
|
95
|
+
value: S,
|
|
96
|
+
onKeyUp: q,
|
|
97
|
+
onChange: (e) => j(e.target.value),
|
|
98
|
+
onClick: Q,
|
|
99
|
+
onBlur: () => f && h(!1)
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
f && /* @__PURE__ */ t.jsx(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
className: "hx_close hfl-cursor-pointer hfl-pr-4",
|
|
106
|
+
onClick: () => h((e) => !e)
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
) : /* @__PURE__ */ t.jsxs(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
onClick: () => h((e) => !e),
|
|
115
|
+
className: "hfl-flex hfl-cursor-pointer hfl-flex-col hfl-items-center xs:hfl-mr-1 md:hfl-mr-0",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ t.jsx("i", { className: "hx_search", style: { fontSize: "18px" } }),
|
|
118
|
+
/* @__PURE__ */ t.jsx(r, { variant: "Regular", type: "Text md", children: "Search" })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ t.jsx(X, { toastList: z }),
|
|
123
|
+
/* @__PURE__ */ t.jsxs(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
ref: m,
|
|
127
|
+
className: `hfl-absolute hfl-right-[255px] hfl-top-[50px] hfl-max-h-[400px] hfl-w-[430px] hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Gray-300 hfl-bg-White hfl-shadow-md ${c ? "hfl-block" : "hfl-hidden"}`,
|
|
128
|
+
children: [
|
|
129
|
+
!O && /* @__PURE__ */ t.jsxs("div", { className: "hfl-flex hfl-flex-col", children: [
|
|
130
|
+
/* @__PURE__ */ t.jsxs("div", { className: "hfl-flex hfl-items-center hfl-py-[10px] ", children: [
|
|
131
|
+
/* @__PURE__ */ t.jsx(r, { className: "hfl-px-[12px] hfl-text-Gray-400", variant: "Semibold", type: "Text xs", children: "Upcoming Appointments" }),
|
|
132
|
+
/* @__PURE__ */ t.jsx("a", { href: "viewPatientAppointments.php", children: /* @__PURE__ */ t.jsx("i", { className: "hx_r-open hfl-text-Primary-700" }) })
|
|
133
|
+
] }),
|
|
134
|
+
M.map((e, n) => /* @__PURE__ */ t.jsxs(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: `hfl-flex hfl-cursor-pointer hfl-justify-between hfl-px-[12px] hfl-py-[4px] hover:hfl-bg-Blue_gray-200 ${n % 2 === 1 ? "" : "hfl-bg-Gray-100"}`,
|
|
138
|
+
onClick: () => I(e),
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ t.jsx("div", { className: "hfl-flex hfl-min-w-[92px] hfl-items-center hfl-justify-center hfl-rounded-lg hfl-border hfl-border-Gray-100 hfl-bg-White_20 hfl-p-2", children: /* @__PURE__ */ t.jsx(r, { className: "hfl-whitespace-nowrap hfl-text-Gray-500", variant: "Regular", type: "Text lg", children: e.appnt_time }) }),
|
|
141
|
+
/* @__PURE__ */ t.jsxs("div", { className: "hfl-flex hfl-w-full hfl-flex-col hfl-px-3", children: [
|
|
142
|
+
/* @__PURE__ */ t.jsx(r, { variant: "Regular", type: "Text md", className: "hfl-text-Gray-700", children: e.org_person_name }),
|
|
143
|
+
/* @__PURE__ */ t.jsx(r, { variant: "Regular", type: "Text sm", className: "hfl-text-Gray-500", children: e.org_person_phone })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ t.jsx("div", { className: "hfl-flex hfl-items-center", children: /* @__PURE__ */ t.jsx("i", { className: "hx_play-filled hfl-text-Gray-300" }) })
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
e.patient_role_id
|
|
149
|
+
))
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ t.jsxs("div", { className: "hfl-flex hfl-flex-col", children: [
|
|
152
|
+
/* @__PURE__ */ t.jsx(
|
|
153
|
+
r,
|
|
154
|
+
{
|
|
155
|
+
style: { fontSize: "14px" },
|
|
156
|
+
variant: "Semibold",
|
|
157
|
+
type: "Text sm",
|
|
158
|
+
className: "hfl-px-[12px] hfl-py-[8px] hfl-text-Primary-600",
|
|
159
|
+
children: "Patients List"
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ t.jsx("div", { className: "hfl-max-h-[40vh] hfl-overflow-y-auto scrollbar-hide", children: B.map((e, n) => /* @__PURE__ */ t.jsxs(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: `hfl-cursor-pointer hfl-px-[11px] hfl-py-[12px] hfl-leading-9 hover:hfl-bg-Blue_gray-200 ${n % 2 === 1 ? "" : "hfl-bg-Gray-100"}`,
|
|
166
|
+
onClick: () => J(e),
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ t.jsx(
|
|
169
|
+
r,
|
|
170
|
+
{
|
|
171
|
+
variant: "Regular",
|
|
172
|
+
type: "Text sm",
|
|
173
|
+
className: "hfl-inline hfl-uppercase hfl-text-Gray-700",
|
|
174
|
+
style: { fontSize: "14px" },
|
|
175
|
+
children: e.org_person_bid_str ? e.org_person_bid_str + ": " : ""
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ t.jsxs(
|
|
179
|
+
r,
|
|
180
|
+
{
|
|
181
|
+
variant: "Medium",
|
|
182
|
+
type: "Text sm",
|
|
183
|
+
className: " hfl-inline hfl-capitalize hfl-text-Gray-700",
|
|
184
|
+
style: { fontSize: "14px" },
|
|
185
|
+
children: [
|
|
186
|
+
e.org_person_name,
|
|
187
|
+
" ",
|
|
188
|
+
/* @__PURE__ */ t.jsxs("div", { className: "hfl-inline-block", children: [
|
|
189
|
+
"(",
|
|
190
|
+
e.ageStr.split(" ")[0],
|
|
191
|
+
", ",
|
|
192
|
+
re(Number(e.org_person_gender)),
|
|
193
|
+
")"
|
|
194
|
+
] }),
|
|
195
|
+
" "
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ t.jsx(
|
|
200
|
+
r,
|
|
201
|
+
{
|
|
202
|
+
variant: "Regular",
|
|
203
|
+
type: "Text sm",
|
|
204
|
+
className: "hfl-inline-block hfl-text-Gray-700",
|
|
205
|
+
style: { fontSize: "14px" },
|
|
206
|
+
children: e.org_person_phone ? `Ph: ${e.org_person_phone}` : ""
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
e.person_role_id
|
|
212
|
+
)) })
|
|
213
|
+
] }),
|
|
214
|
+
U < $ && /* @__PURE__ */ t.jsx("div", { className: "hfl-flex hfl-justify-center", id: "newPatientAdd", children: /* @__PURE__ */ t.jsx(
|
|
215
|
+
Y,
|
|
216
|
+
{
|
|
217
|
+
hierarchy: "Secondary",
|
|
218
|
+
icon: "Left",
|
|
219
|
+
iconFile: "hx_add",
|
|
220
|
+
onClick: V,
|
|
221
|
+
size: "lg",
|
|
222
|
+
textField: "Create New Patient",
|
|
223
|
+
className: "hfl-flex hfl-w-full hfl-justify-center"
|
|
224
|
+
}
|
|
225
|
+
) })
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
] });
|
|
230
|
+
};
|
|
231
|
+
export {
|
|
232
|
+
fe as S
|
|
233
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./index-DQlbIHh3.cjs"),n=require("react"),K=require("./APIAction-GKwgCFa7.cjs"),W=require("./useMediaQuery-D4SIgdMW.cjs"),p=require("./common-utils-lI6oOpoS.cjs"),J=Math.abs(window.orientation||0)===90,V=N=>{const{addPatientHandler:P,disabled:x,manipulateExistingDOM:k,showSearchBar:C,setShowSearchBar:a,variable:D}=N,{window_var:o,token:w,envName:y}=D,[c,f]=n.useState(!1),d=n.useRef(null),u=n.useRef(null),[T,A]=n.useState(0),[G,l]=n.useState([]),L=6,[v,E]=n.useState(""),[U,F]=n.useState([]),[B,b]=n.useState(!0),[$,R]=n.useState([]),h=W.useMediaQuery("(max-width: 1024px)"),m=(e,s,r,i)=>{F([{id:1,title:e,description:s,type:r,duration:i}])},_=n.useCallback(async e=>{try{const s={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(e),limit:30},r=await K.getPatientList(s,{envName:y,token:w});if(!r){l([]),m("Error","No response received from server","Error",3e3);return}const i=r,S=window.filteredUpcomingAppts||[];if(i.apiError){l([]),m("Error",i.apiError,"Error",3e3);return}i?.persons?.length?(l(i.persons),f(!0),A(Number(i.total_persons))):l([]),S?.length?(b(!1),R(S.slice(0,5))):(b(!0),R([]))}catch(s){console.error(s),m("Error","Something went wrong while fetching patients","Error",3e3)}},[y,w,o?.doctor_role_id_for_seg,o?.org_branch_id_for_seg,o?.person_id_for_seg]),q=n.useMemo(()=>p.debounceFn(e=>{_(e)},500),[_]),z=e=>{const s=e.currentTarget.value.trim();(!isNaN(Number(s.charAt(0)))||s.length>=2)&&q(s)},H=()=>{c||_(v)},O=()=>{x||f(e=>!e)},g=n.useCallback(e=>{u.current&&c&&!u.current.contains(e.target)&&(f(!1),l([]))},[c]);n.useEffect(()=>(document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)),[g,c]);const M=e=>{window.location.href.includes("/frontdesk")?window.patientPopupHandlerFromFD(e.patient_role_id,e.patient_person_id):p.goToPage(`viewPatientDashboard.php?pid=${e.patient_role_id}`)},Q=async e=>{let s=!0;if(typeof window.beforePatientChange=="function"&&window.location.pathname==p.EAPP_ROUTES.visitpad&&(s=window.beforePatientChange()),f(!1),l([]),s){window.patient_role_id=e.person_role_id!="0"?e.person_role_id.toString():"0",window.patient_person_id=e.person_id!="0"?e.person_id.toString():"0";const r=(e.person_role_id=="0",e.person_role_id);if(r&&(k(),window.location.href.indexOf("/frontdesk")!==-1)){window.patientPopupHandlerFromFD(r,e.person_id);return}p.goToPage(`viewPatientDashboard.php?pid=${r}`)}},I=()=>{O(),P(),E("")},j=n.useCallback(e=>{d.current&&!d.current.contains(e.target)&&h&&a(!1)},[h,a]);return n.useEffect(()=>(document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)),[j]),t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[C?t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-items-center hfl-justify-center hfl-rounded-full hfl-bg-Blue-900 hfl-text-White ${x?"hfl-pointer-events-none hfl-opacity-60":""}`,title:x?"Low internet speed. Feature available only in online mode":"Search Patient",children:[t.jsxRuntimeExports.jsx("input",{ref:d,type:"text",placeholder:"Search Patient 🔍",className:`hfl-rounded-full hfl-border-none hfl-bg-Blue-900 hfl-py-2 hfl-pl-4 ${h&&!J?"xxs:hfl-w-[400px]":"hfl-min-w-[150px]"} sm:hfl-w-full`,"data-qa":"testid_patientSearch",value:v,onKeyUp:z,onChange:e=>E(e.target.value),onClick:H,onBlur:()=>h&&a(!1)}),h&&t.jsxRuntimeExports.jsx("div",{className:"hx_close hfl-cursor-pointer hfl-pr-4",onClick:()=>a(e=>!e)})]}):t.jsxRuntimeExports.jsxs("div",{onClick:()=>a(e=>!e),className:"hfl-flex hfl-cursor-pointer hfl-flex-col hfl-items-center xs:hfl-mr-1 md:hfl-mr-0",children:[t.jsxRuntimeExports.jsx("i",{className:"hx_search",style:{fontSize:"18px"}}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",children:"Search"})]}),t.jsxRuntimeExports.jsx(t.qh,{toastList:U}),t.jsxRuntimeExports.jsxs("div",{ref:u,className:`hfl-absolute hfl-right-[255px] hfl-top-[50px] hfl-max-h-[400px] hfl-w-[430px] hfl-overflow-y-auto hfl-rounded-lg hfl-border hfl-border-Gray-300 hfl-bg-White hfl-shadow-md ${c?"hfl-block":"hfl-hidden"}`,children:[!B&&t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-col",children:[t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-items-center hfl-py-[10px] ",children:[t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-px-[12px] hfl-text-Gray-400",variant:"Semibold",type:"Text xs",children:"Upcoming Appointments"}),t.jsxRuntimeExports.jsx("a",{href:"viewPatientAppointments.php",children:t.jsxRuntimeExports.jsx("i",{className:"hx_r-open hfl-text-Primary-700"})})]}),$.map((e,s)=>t.jsxRuntimeExports.jsxs("div",{className:`hfl-flex hfl-cursor-pointer hfl-justify-between hfl-px-[12px] hfl-py-[4px] hover:hfl-bg-Blue_gray-200 ${s%2===1?"":"hfl-bg-Gray-100"}`,onClick:()=>M(e),children:[t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-min-w-[92px] hfl-items-center hfl-justify-center hfl-rounded-lg hfl-border hfl-border-Gray-100 hfl-bg-White_20 hfl-p-2",children:t.jsxRuntimeExports.jsx(t.bs,{className:"hfl-whitespace-nowrap hfl-text-Gray-500",variant:"Regular",type:"Text lg",children:e.appnt_time})}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-w-full hfl-flex-col hfl-px-3",children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text md",className:"hfl-text-Gray-700",children:e.org_person_name}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-text-Gray-500",children:e.org_person_phone})]}),t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-items-center",children:t.jsxRuntimeExports.jsx("i",{className:"hx_play-filled hfl-text-Gray-300"})})]},e.patient_role_id))]}),t.jsxRuntimeExports.jsxs("div",{className:"hfl-flex hfl-flex-col",children:[t.jsxRuntimeExports.jsx(t.bs,{style:{fontSize:"14px"},variant:"Semibold",type:"Text sm",className:"hfl-px-[12px] hfl-py-[8px] hfl-text-Primary-600",children:"Patients List"}),t.jsxRuntimeExports.jsx("div",{className:"hfl-max-h-[40vh] hfl-overflow-y-auto scrollbar-hide",children:G.map((e,s)=>t.jsxRuntimeExports.jsxs("div",{className:`hfl-cursor-pointer hfl-px-[11px] hfl-py-[12px] hfl-leading-9 hover:hfl-bg-Blue_gray-200 ${s%2===1?"":"hfl-bg-Gray-100"}`,onClick:()=>Q(e),children:[t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-inline hfl-uppercase hfl-text-Gray-700",style:{fontSize:"14px"},children:e.org_person_bid_str?e.org_person_bid_str+": ":""}),t.jsxRuntimeExports.jsxs(t.bs,{variant:"Medium",type:"Text sm",className:" hfl-inline hfl-capitalize hfl-text-Gray-700",style:{fontSize:"14px"},children:[e.org_person_name," ",t.jsxRuntimeExports.jsxs("div",{className:"hfl-inline-block",children:["(",e.ageStr.split(" ")[0],", ",p.getGender(Number(e.org_person_gender)),")"]})," "]}),t.jsxRuntimeExports.jsx(t.bs,{variant:"Regular",type:"Text sm",className:"hfl-inline-block hfl-text-Gray-700",style:{fontSize:"14px"},children:e.org_person_phone?`Ph: ${e.org_person_phone}`:""})]},e.person_role_id))})]}),T<L&&t.jsxRuntimeExports.jsx("div",{className:"hfl-flex hfl-justify-center",id:"newPatientAdd",children:t.jsxRuntimeExports.jsx(t.Ku,{hierarchy:"Secondary",icon:"Left",iconFile:"hx_add",onClick:I,size:"lg",textField:"Create New Patient",className:"hfl-flex hfl-w-full hfl-justify-center"})})]})]})};exports.SearchPatients=V;
|