hplx-feature-library 1.0.203 → 1.0.204
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/PatientPopup/index.js +1 -1
- package/dist/{PatientPopupContainer-Cwv4GWjB.cjs → PatientPopupContainer-Aw9enNFI.cjs} +6 -6
- package/dist/{PatientPopupContainer-AprY0NY2.js → PatientPopupContainer-D6vQiUn0.js} +468 -487
- package/dist/{PrintModal-DFzssQg2.js → PrintModal-Cu-pvQwE.js} +7 -7
- package/dist/index.js +2 -2
- package/dist/print-pdf/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e, b as D, g as xn, t as Ln, K as Fe, h as kn, P as Tt, Z as Or, k as ll, a as Oa, e as hr, A as ur, c as vn, N as _n, O as Ul, E as yn, q as Vn } from "./index-Bd0CDVpH.js";
|
|
2
|
-
import cl, { createContext as On, useContext as
|
|
2
|
+
import cl, { createContext as On, useContext as Lt, useState as z, forwardRef as Wn, useRef as Mr, useEffect as Ke, useCallback as Vt, useMemo as Kt, useReducer as Wa } from "react";
|
|
3
3
|
import { n as Ga, R as Ct, h as za, c as zn, v as an, j as nn, i as Yn } from "./common-utils-Dq5TMP7t.js";
|
|
4
|
-
import { G as qn, a as $n, b as Un, c as bn, U as Ya, d as Zn, e as wn, f as Kn, g as Cn, h as Xn, i as Jn, j as Qn, k as ei, l as ti, m as ri, n as
|
|
4
|
+
import { G as qn, a as $n, b as Un, c as bn, U as Ya, d as Zn, e as wn, f as Kn, g as Cn, h as Xn, i as Jn, j as Qn, k as ei, l as ti, m as ri, n as jn, D as li, o as ai, p as ni, q as ii, r as si, s as oi, V as ci, t as Rn, u as di, v as ui, w as fi, x as hi, y as pi, z as mi, A as gi, B as xi, C as vi, F as At, E as _i, H as yi, I as bi, T as It, W as Pn, J as Sn, K as wi, L as Ci, M as ji, P as Ri } from "./PrintModal-Cu-pvQwE.js";
|
|
5
5
|
import { d as Be } from "./dayjs.min-D52_GdfV.js";
|
|
6
6
|
import { G as Pi, f as Si, h as sn, i as Ni } from "./APIAction-l6i46qgX.js";
|
|
7
7
|
import { a as Di, H as Ai, D as Na, M as Da, b as Wl, S as Ii, C as Aa, O as Ia } from "./CommonConstant-Bj7SvPfU.js";
|
|
@@ -339,7 +339,7 @@ const rl = {
|
|
|
339
339
|
}, $a = async (s, u, d) => {
|
|
340
340
|
try {
|
|
341
341
|
const n = await Ct(d.token, d.envName).get(
|
|
342
|
-
`${
|
|
342
|
+
`${ri}?order_item_id=${s}&patient_role_id=${u}&org_branch_id=${d.window_var.org_branch_id_for_seg}`
|
|
343
343
|
), { data: v } = n || {};
|
|
344
344
|
return Promise.resolve(v);
|
|
345
345
|
} catch (n) {
|
|
@@ -357,7 +357,7 @@ const rl = {
|
|
|
357
357
|
}, ki = async (s, u, d) => {
|
|
358
358
|
try {
|
|
359
359
|
const n = await Ct(d.token, d.envName).get(
|
|
360
|
-
`${
|
|
360
|
+
`${ti}/${s}/${u}?doctor_role_id=${d.window_var.doctor_role_id_for_seg}&doctor_id=${d.window_var.person_id_for_seg}&org_branch_id=${d.window_var.org_branch_id_for_seg}`
|
|
361
361
|
), { data: v } = n || {};
|
|
362
362
|
return Promise.resolve(v);
|
|
363
363
|
} catch (n) {
|
|
@@ -441,7 +441,7 @@ const rl = {
|
|
|
441
441
|
}, Dn = async (s, u, d, n, v, w) => {
|
|
442
442
|
try {
|
|
443
443
|
const a = await Ct(w.token, w.envName).delete(
|
|
444
|
-
`${
|
|
444
|
+
`${li}?deleting_person_role_id=${w.window_var.doctor_role_id_for_seg}&mode=${v}&order_id=${s}&order_item_id=${u}&org_branch_id=${w.window_var.org_branch_id_for_seg}&patient_role_id=${d}&reason=${n}`
|
|
445
445
|
), { data: A } = a || {};
|
|
446
446
|
return Promise.resolve(A);
|
|
447
447
|
} catch (a) {
|
|
@@ -565,7 +565,7 @@ const rl = {
|
|
|
565
565
|
drawing_board: !0
|
|
566
566
|
},
|
|
567
567
|
visit_id: d
|
|
568
|
-
}, w = await Ct(n.token, n.envName).post(
|
|
568
|
+
}, w = await Ct(n.token, n.envName).post(ai, {
|
|
569
569
|
...v
|
|
570
570
|
}), { data: a } = w || {};
|
|
571
571
|
return Promise.resolve(a);
|
|
@@ -615,7 +615,7 @@ const rl = {
|
|
|
615
615
|
}, Xi = async (s) => {
|
|
616
616
|
try {
|
|
617
617
|
const u = await za(s.token, s.envName).post(
|
|
618
|
-
|
|
618
|
+
ei
|
|
619
619
|
), { data: d } = u || {}, { apiError: n } = d || {};
|
|
620
620
|
if (n)
|
|
621
621
|
throw new Error(n);
|
|
@@ -801,7 +801,7 @@ const rl = {
|
|
|
801
801
|
try {
|
|
802
802
|
const u = {
|
|
803
803
|
doctor_id: s.window_var.person_id_for_seg
|
|
804
|
-
}, d = await Ct(s.token, s.envName).post(
|
|
804
|
+
}, d = await Ct(s.token, s.envName).post(Jn, { ...u }), { data: n, status: v } = d || {};
|
|
805
805
|
if (v !== 200)
|
|
806
806
|
throw new Error("error");
|
|
807
807
|
return Promise.resolve(n);
|
|
@@ -829,7 +829,7 @@ const rl = {
|
|
|
829
829
|
doctor_role_id: s.window_var.doctor_role_id_for_seg,
|
|
830
830
|
master_tests_needed: !1
|
|
831
831
|
}, d = await Ct(s.token, s.envName).post(
|
|
832
|
-
|
|
832
|
+
Qn,
|
|
833
833
|
{
|
|
834
834
|
...u
|
|
835
835
|
}
|
|
@@ -898,7 +898,7 @@ function ms() {
|
|
|
898
898
|
})(ps, function() {
|
|
899
899
|
var d = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, v = /\d/, w = /\d\d/, a = /\d\d?/, A = /\d*[^-_:/,()\s\d]+/, S = {}, h = function(N) {
|
|
900
900
|
return (N = +N) + (N > 68 ? 1900 : 2e3);
|
|
901
|
-
},
|
|
901
|
+
}, Y = function(N) {
|
|
902
902
|
return function(P) {
|
|
903
903
|
this[N] = +P;
|
|
904
904
|
};
|
|
@@ -920,7 +920,7 @@ function ms() {
|
|
|
920
920
|
}
|
|
921
921
|
} else B = N === (P ? "pm" : "PM");
|
|
922
922
|
return B;
|
|
923
|
-
},
|
|
923
|
+
}, O = { A: [A, function(N) {
|
|
924
924
|
this.afternoon = k(N, !1);
|
|
925
925
|
}], a: [A, function(N) {
|
|
926
926
|
this.afternoon = k(N, !0);
|
|
@@ -932,10 +932,10 @@ function ms() {
|
|
|
932
932
|
this.milliseconds = 10 * +N;
|
|
933
933
|
}], SSS: [/\d{3}/, function(N) {
|
|
934
934
|
this.milliseconds = +N;
|
|
935
|
-
}], s: [a,
|
|
935
|
+
}], s: [a, Y("seconds")], ss: [a, Y("seconds")], m: [a, Y("minutes")], mm: [a, Y("minutes")], H: [a, Y("hours")], h: [a, Y("hours")], HH: [a, Y("hours")], hh: [a, Y("hours")], D: [a, Y("day")], DD: [w, Y("day")], Do: [A, function(N) {
|
|
936
936
|
var P = S.ordinal, B = N.match(/\d+/);
|
|
937
937
|
if (this.day = B[0], P) for (var b = 1; b <= 31; b += 1) P(b).replace(/\[|\]/g, "") === N && (this.day = b);
|
|
938
|
-
}], w: [a,
|
|
938
|
+
}], w: [a, Y("week")], ww: [w, Y("week")], M: [a, Y("month")], MM: [w, Y("month")], MMM: [A, function(N) {
|
|
939
939
|
var P = L("months"), B = (L("monthsShort") || P.map(function(b) {
|
|
940
940
|
return b.slice(0, 3);
|
|
941
941
|
})).indexOf(N) + 1;
|
|
@@ -945,28 +945,28 @@ function ms() {
|
|
|
945
945
|
var P = L("months").indexOf(N) + 1;
|
|
946
946
|
if (P < 1) throw new Error();
|
|
947
947
|
this.month = P % 12 || P;
|
|
948
|
-
}], Y: [/[+-]?\d+/,
|
|
948
|
+
}], Y: [/[+-]?\d+/, Y("year")], YY: [w, function(N) {
|
|
949
949
|
this.year = h(N);
|
|
950
|
-
}], YYYY: [/\d{4}/,
|
|
950
|
+
}], YYYY: [/\d{4}/, Y("year")], Z: x, ZZ: x };
|
|
951
951
|
function I(N) {
|
|
952
952
|
var P, B;
|
|
953
953
|
P = N, B = S && S.formats;
|
|
954
|
-
for (var b = (N = P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(ie,
|
|
954
|
+
for (var b = (N = P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(ie, W, ge) {
|
|
955
955
|
var be = ge && ge.toUpperCase();
|
|
956
|
-
return
|
|
956
|
+
return W || B[ge] || d[ge] || B[be].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(ue, Le, ne) {
|
|
957
957
|
return Le || ne.slice(1);
|
|
958
958
|
});
|
|
959
959
|
})).match(n), Q = b.length, F = 0; F < Q; F += 1) {
|
|
960
|
-
var M = b[F], V =
|
|
960
|
+
var M = b[F], V = O[M], te = V && V[0], q = V && V[1];
|
|
961
961
|
b[F] = q ? { regex: te, parser: q } : M.replace(/^\[|\]$/g, "");
|
|
962
962
|
}
|
|
963
963
|
return function(ie) {
|
|
964
|
-
for (var
|
|
964
|
+
for (var W = {}, ge = 0, be = 0; ge < Q; ge += 1) {
|
|
965
965
|
var ue = b[ge];
|
|
966
966
|
if (typeof ue == "string") be += ue.length;
|
|
967
967
|
else {
|
|
968
968
|
var Le = ue.regex, ne = ue.parser, $ = ie.slice(be), de = Le.exec($)[0];
|
|
969
|
-
ne.call(
|
|
969
|
+
ne.call(W, de), ie = ie.replace(de, "");
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
return function(H) {
|
|
@@ -975,7 +975,7 @@ function ms() {
|
|
|
975
975
|
var Me = H.hours;
|
|
976
976
|
Re ? Me < 12 && (H.hours += 12) : Me === 12 && (H.hours = 0), delete H.afternoon;
|
|
977
977
|
}
|
|
978
|
-
}(
|
|
978
|
+
}(W), W;
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
981
|
return function(N, P, B) {
|
|
@@ -986,12 +986,12 @@ function ms() {
|
|
|
986
986
|
this.$u = V;
|
|
987
987
|
var q = te[1];
|
|
988
988
|
if (typeof q == "string") {
|
|
989
|
-
var ie = te[2] === !0,
|
|
990
|
-
|
|
989
|
+
var ie = te[2] === !0, W = te[3] === !0, ge = ie || W, be = te[2];
|
|
990
|
+
W && (be = te[2]), S = this.$locale(), !ie && be && (S = B.Ls[be]), this.$d = function($, de, H, Re) {
|
|
991
991
|
try {
|
|
992
992
|
if (["x", "X"].indexOf(de) > -1) return new Date((de === "X" ? 1e3 : 1) * $);
|
|
993
|
-
var Me = I(de)($), ke = Me.year, pt = Me.month, ft = Me.day, it = Me.hours, Ve = Me.minutes, mt = Me.seconds, St = Me.milliseconds, xt = Me.zone, Gt = Me.week,
|
|
994
|
-
ke && !pt || (Ue = pt > 0 ? pt - 1 :
|
|
993
|
+
var Me = I(de)($), ke = Me.year, pt = Me.month, ft = Me.day, it = Me.hours, Ve = Me.minutes, mt = Me.seconds, St = Me.milliseconds, xt = Me.zone, Gt = Me.week, kt = /* @__PURE__ */ new Date(), T = ft || (ke || pt ? 1 : kt.getDate()), Ie = ke || kt.getFullYear(), Ue = 0;
|
|
994
|
+
ke && !pt || (Ue = pt > 0 ? pt - 1 : kt.getMonth());
|
|
995
995
|
var le, J = it || 0, K = Ve || 0, oe = mt || 0, Te = St || 0;
|
|
996
996
|
return xt ? new Date(Date.UTC(Ie, Ue, T, J, K, oe, Te + 60 * xt.offset * 1e3)) : H ? new Date(Date.UTC(Ie, Ue, T, J, K, oe, Te)) : (le = new Date(Ie, Ue, T, J, K, oe, Te), Gt && (le = Re(le).week(Gt).toDate()), le);
|
|
997
997
|
} catch {
|
|
@@ -1042,13 +1042,13 @@ const In = (...s) => {
|
|
|
1042
1042
|
bill_create_status: !1,
|
|
1043
1043
|
bill_create_message: ""
|
|
1044
1044
|
};
|
|
1045
|
-
const
|
|
1045
|
+
const Y = s.appnt_time_time + " " + s.appnt_time_format;
|
|
1046
1046
|
try {
|
|
1047
1047
|
if (!s.appnt_doctor_role_id) {
|
|
1048
1048
|
d("Error", "Doctor name is missing", "Error", 3e3);
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
if (!new RegExp(/^(0?[1-9]|1[012])(:[0-5]\d) [APap][mM]$/).test(
|
|
1051
|
+
if (!new RegExp(/^(0?[1-9]|1[012])(:[0-5]\d) [APap][mM]$/).test(Y)) {
|
|
1052
1052
|
d("Error", "Error in time format", "Error", 3e3);
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
@@ -1059,7 +1059,7 @@ const In = (...s) => {
|
|
|
1059
1059
|
const {
|
|
1060
1060
|
item_quantity: L,
|
|
1061
1061
|
order_unit_item_price: k,
|
|
1062
|
-
order_item_discount:
|
|
1062
|
+
order_item_discount: O,
|
|
1063
1063
|
order_item_service_tax: I,
|
|
1064
1064
|
order_item_service_tax_percentage: N = 0,
|
|
1065
1065
|
order_item_price: P
|
|
@@ -1067,7 +1067,7 @@ const In = (...s) => {
|
|
|
1067
1067
|
if (!u && In(
|
|
1068
1068
|
L,
|
|
1069
1069
|
k,
|
|
1070
|
-
|
|
1070
|
+
O,
|
|
1071
1071
|
I,
|
|
1072
1072
|
P
|
|
1073
1073
|
)) {
|
|
@@ -1079,7 +1079,7 @@ const In = (...s) => {
|
|
|
1079
1079
|
order_item_service_tax: Math.floor(
|
|
1080
1080
|
k * L * 0.01 * N
|
|
1081
1081
|
),
|
|
1082
|
-
appnt_time: Be(
|
|
1082
|
+
appnt_time: Be(Y, "hh:mm A").format("HH:mm:ss")
|
|
1083
1083
|
}, s.appnt_id.length)
|
|
1084
1084
|
try {
|
|
1085
1085
|
const B = await Yi(
|
|
@@ -1132,7 +1132,7 @@ const In = (...s) => {
|
|
|
1132
1132
|
const {
|
|
1133
1133
|
item_quantity: S,
|
|
1134
1134
|
order_unit_item_price: h,
|
|
1135
|
-
order_item_service_tax_percentage:
|
|
1135
|
+
order_item_service_tax_percentage: Y = 0,
|
|
1136
1136
|
order_item_discount: x,
|
|
1137
1137
|
order_item_service_tax: L,
|
|
1138
1138
|
order_item_price: k
|
|
@@ -1150,7 +1150,7 @@ const In = (...s) => {
|
|
|
1150
1150
|
s = {
|
|
1151
1151
|
...s,
|
|
1152
1152
|
order_item_service_tax: Math.floor(
|
|
1153
|
-
h * S * 0.01 *
|
|
1153
|
+
h * S * 0.01 * Y
|
|
1154
1154
|
)
|
|
1155
1155
|
};
|
|
1156
1156
|
try {
|
|
@@ -1336,10 +1336,10 @@ const In = (...s) => {
|
|
|
1336
1336
|
return "";
|
|
1337
1337
|
}
|
|
1338
1338
|
}, ws = (s) => {
|
|
1339
|
-
const { handleCurrentWindow: u, setShowPatientPopModal: d, patientIDs: n, redirectionPage: v, closePrintModal: w } = s, a =
|
|
1339
|
+
const { handleCurrentWindow: u, setShowPatientPopModal: d, patientIDs: n, redirectionPage: v, closePrintModal: w } = s, a = Lt(Mt);
|
|
1340
1340
|
if (!a)
|
|
1341
1341
|
throw new Error("PatientPopupHeader must be used within an AppContext.Provider");
|
|
1342
|
-
const { currentWindow: A, patientDetails: S, docPreference: h, billPreferences:
|
|
1342
|
+
const { currentWindow: A, patientDetails: S, docPreference: h, billPreferences: Y, setLastBillPaymentData: x, variable: L } = a, { name: k, age: O, gender: I, image_link: N, org_person_bid_str: P, org_person_dob: B, honorific: b } = S || {};
|
|
1343
1343
|
window.patientPopupClosehandler = () => {
|
|
1344
1344
|
if (d(!1), w(), x({
|
|
1345
1345
|
created_on: "",
|
|
@@ -1389,7 +1389,7 @@ const In = (...s) => {
|
|
|
1389
1389
|
children: [
|
|
1390
1390
|
Gn(I) || /* @__PURE__ */ e.jsx("div", { className: "hfl-top-1 hfl-h-3 hfl-w-10 hfl-rounded-3xl hfl-bg-Gray-100" }),
|
|
1391
1391
|
/* @__PURE__ */ e.jsx("div", { className: "hfl-h-[18px] hfl-w-[1px] hfl-bg-Gray-200" }),
|
|
1392
|
-
|
|
1392
|
+
O ? typeof O == "number" ? `${O} Years` : wr(`${O}`) : B && wr(B) || /* @__PURE__ */ e.jsx("div", { className: "hfl-h-3 hfl-w-12 hfl-rounded-3xl hfl-bg-Gray-100" }),
|
|
1393
1393
|
/* @__PURE__ */ e.jsx("div", { className: "hfl-h-[18px] hfl-w-[1px] hfl-bg-Gray-200" }),
|
|
1394
1394
|
P || /* @__PURE__ */ e.jsx("div", { className: "hfl-top-1 hfl-h-3 hfl-w-10 hfl-rounded-3xl hfl-bg-Gray-100" })
|
|
1395
1395
|
]
|
|
@@ -1497,7 +1497,7 @@ const In = (...s) => {
|
|
|
1497
1497
|
icon: A === Rt[6] ? "hx_patient-lab-filled" : "hx_patient-lab",
|
|
1498
1498
|
onClickHandler: () => u(Rt[6]),
|
|
1499
1499
|
label: "Lab",
|
|
1500
|
-
isRequired: L.window_var.permit_lab_tech === "1" ||
|
|
1500
|
+
isRequired: L.window_var.permit_lab_tech === "1" || Y?.features?.enable_lis_v1 === !0,
|
|
1501
1501
|
isSelected: A === Rt[6],
|
|
1502
1502
|
data_qa: "lab-tab"
|
|
1503
1503
|
}
|
|
@@ -1555,12 +1555,12 @@ const In = (...s) => {
|
|
|
1555
1555
|
/* @__PURE__ */ e.jsx("div", { className: "flex hfl-top-0 hfl-pt-3 ", children: /* @__PURE__ */ e.jsx(kn, { className: "hfl-bg-Gray-200", rows: 10, suffixPlaceholder: "Load Message Template from right" }) }),
|
|
1556
1556
|
/* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-justify-end hfl-pt-[160px] ", children: /* @__PURE__ */ e.jsx(Fe, { hierarchy: "Primary", size: "lg", textField: "Send Message" }) })
|
|
1557
1557
|
] }), js = (s) => {
|
|
1558
|
-
const { patientAbhaDetails: u, savePatientDetailsHandler: d, setPatientAbhaDetails: n, patientData: v } = s, { showToast: w, patientIDs: a, variable: A } =
|
|
1558
|
+
const { patientAbhaDetails: u, savePatientDetailsHandler: d, setPatientAbhaDetails: n, patientData: v } = s, { showToast: w, patientIDs: a, variable: A } = Lt(Mt) || {}, [S, h] = z(""), [Y, x] = z(""), [L, k] = z(), O = async (I = !1) => {
|
|
1559
1559
|
try {
|
|
1560
1560
|
if (L?.status && !I) {
|
|
1561
1561
|
const N = await ss(
|
|
1562
1562
|
L.abha_address,
|
|
1563
|
-
|
|
1563
|
+
Y,
|
|
1564
1564
|
a?.patientRoleID || "",
|
|
1565
1565
|
a?.patientID || "",
|
|
1566
1566
|
A
|
|
@@ -1653,7 +1653,7 @@ const In = (...s) => {
|
|
|
1653
1653
|
type: "Text sm",
|
|
1654
1654
|
className: "hfl-flex hfl-cursor-pointer hfl-items-center hfl-gap-1 hfl-text-1 hfl-text-Primary-600",
|
|
1655
1655
|
onClick: async () => {
|
|
1656
|
-
await
|
|
1656
|
+
await O(!0);
|
|
1657
1657
|
},
|
|
1658
1658
|
children: [
|
|
1659
1659
|
/* @__PURE__ */ e.jsx("div", { className: "hx_rewind hfl-font-bold hfl-text-3" }),
|
|
@@ -1669,7 +1669,7 @@ const In = (...s) => {
|
|
|
1669
1669
|
Tt,
|
|
1670
1670
|
{
|
|
1671
1671
|
inputProps: {
|
|
1672
|
-
value:
|
|
1672
|
+
value: Y,
|
|
1673
1673
|
onChange: (I) => {
|
|
1674
1674
|
x(I.target.value);
|
|
1675
1675
|
},
|
|
@@ -1688,7 +1688,7 @@ const In = (...s) => {
|
|
|
1688
1688
|
size: "sm",
|
|
1689
1689
|
textField: L?.status ? "Submit OTP" : "Verify ABHA",
|
|
1690
1690
|
onClick: async () => {
|
|
1691
|
-
await
|
|
1691
|
+
await O();
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
1694
|
)
|
|
@@ -1704,17 +1704,17 @@ const In = (...s) => {
|
|
|
1704
1704
|
validators: A,
|
|
1705
1705
|
setValidators: S,
|
|
1706
1706
|
billPreferences: h,
|
|
1707
|
-
isAbhaVerified:
|
|
1707
|
+
isAbhaVerified: Y,
|
|
1708
1708
|
isPartnerServiceEnabled: x,
|
|
1709
1709
|
insuranceData: L,
|
|
1710
1710
|
partnerConfig: k,
|
|
1711
|
-
verifyInsuranceHandler:
|
|
1711
|
+
verifyInsuranceHandler: O,
|
|
1712
1712
|
policyNumberErrorMessage: I,
|
|
1713
1713
|
selectedInsuranceDetails: N,
|
|
1714
1714
|
setSelectedInsuranceDetails: P,
|
|
1715
1715
|
insuranceDivRef: B,
|
|
1716
1716
|
patientCustomFieldData: b
|
|
1717
|
-
} = s, [Q, F] =
|
|
1717
|
+
} = s, [Q, F] = z(!1), [M, V] = z([]), [te, q] = z([]), [ie, W] = z(!1), [ge, be] = z(!1), [ue, Le] = z([]), ne = h?.permissions?.edit_patient_name, {
|
|
1718
1718
|
phone_number: $,
|
|
1719
1719
|
age: de,
|
|
1720
1720
|
org_person_dob: H,
|
|
@@ -1729,7 +1729,7 @@ const In = (...s) => {
|
|
|
1729
1729
|
spouse_blood_group: St,
|
|
1730
1730
|
org_person_bid_str: xt,
|
|
1731
1731
|
ref_doc_name: Gt,
|
|
1732
|
-
ref_doc_spec:
|
|
1732
|
+
ref_doc_spec: kt,
|
|
1733
1733
|
email: T,
|
|
1734
1734
|
phone_secondary: Ie,
|
|
1735
1735
|
pincode: Ue,
|
|
@@ -1739,7 +1739,7 @@ const In = (...s) => {
|
|
|
1739
1739
|
tag: oe,
|
|
1740
1740
|
image_link: Te,
|
|
1741
1741
|
aadhar_number: Se
|
|
1742
|
-
} = u, [gt, nr] =
|
|
1742
|
+
} = u, [gt, nr] = z(Re), [_t, Xt] = z("Years"), [Ot, sr] = z(""), [or, fr] = z(!1), [Cr, mr] = z([]), _r = Mr(), yt = (G, _e) => {
|
|
1743
1743
|
d((jt) => ({ ...jt, [G]: _e })), G == "gender" && _e == "" ? S((jt) => ({
|
|
1744
1744
|
...jt,
|
|
1745
1745
|
gender: "Select Gender"
|
|
@@ -1757,7 +1757,7 @@ const In = (...s) => {
|
|
|
1757
1757
|
const { value: _e } = G.target, jt = bt(_e);
|
|
1758
1758
|
V(jt);
|
|
1759
1759
|
}, yr = (G) => {
|
|
1760
|
-
yt("occupation", G.trim()),
|
|
1760
|
+
yt("occupation", G.trim()), W(!1);
|
|
1761
1761
|
}, jr = (G) => {
|
|
1762
1762
|
yt("city", G.trim()), be(!1);
|
|
1763
1763
|
}, gr = (G) => {
|
|
@@ -1827,7 +1827,7 @@ const In = (...s) => {
|
|
|
1827
1827
|
custom_fields: tr
|
|
1828
1828
|
};
|
|
1829
1829
|
});
|
|
1830
|
-
}, Ht =
|
|
1830
|
+
}, Ht = Vt(() => b?.map((G) => {
|
|
1831
1831
|
const { id: _e, type: jt, title: $t } = G || {};
|
|
1832
1832
|
if (!_e || !jt || !$t) return null;
|
|
1833
1833
|
const tr = u.custom_fields?.find((lr) => lr.id === _e)?.value || "";
|
|
@@ -1910,7 +1910,7 @@ const In = (...s) => {
|
|
|
1910
1910
|
inputProps: {
|
|
1911
1911
|
type: "text",
|
|
1912
1912
|
value: ke,
|
|
1913
|
-
disabled:
|
|
1913
|
+
disabled: Y,
|
|
1914
1914
|
placeholder: "Enter Name",
|
|
1915
1915
|
onChange: (G) => {
|
|
1916
1916
|
yt("name", G.target.value);
|
|
@@ -2016,7 +2016,7 @@ const In = (...s) => {
|
|
|
2016
2016
|
end_icon: "hx_down",
|
|
2017
2017
|
errorMsg: !!A.age && A.age,
|
|
2018
2018
|
inputProps: {
|
|
2019
|
-
disabled:
|
|
2019
|
+
disabled: Y,
|
|
2020
2020
|
type: "number",
|
|
2021
2021
|
min: 0,
|
|
2022
2022
|
maxLength: 3,
|
|
@@ -2036,7 +2036,7 @@ const In = (...s) => {
|
|
|
2036
2036
|
},
|
|
2037
2037
|
onlySuffixDropdownItemsAllowed: !0,
|
|
2038
2038
|
suffixInputProps: {
|
|
2039
|
-
disabled:
|
|
2039
|
+
disabled: Y,
|
|
2040
2040
|
placeholder: "Select format"
|
|
2041
2041
|
},
|
|
2042
2042
|
suffixOptions: [
|
|
@@ -2074,7 +2074,7 @@ const In = (...s) => {
|
|
|
2074
2074
|
{
|
|
2075
2075
|
className: "hfl-relative",
|
|
2076
2076
|
placeholder: "DOB",
|
|
2077
|
-
disable:
|
|
2077
|
+
disable: Y,
|
|
2078
2078
|
width: "8em",
|
|
2079
2079
|
height: "!hfl-h-[40px]",
|
|
2080
2080
|
label: "",
|
|
@@ -2338,7 +2338,7 @@ const In = (...s) => {
|
|
|
2338
2338
|
classNamedoubleInput: "hfl-relative",
|
|
2339
2339
|
label: "Referred By",
|
|
2340
2340
|
input1value: Gt,
|
|
2341
|
-
input2value:
|
|
2341
|
+
input2value: kt,
|
|
2342
2342
|
end_icon: "hx_down",
|
|
2343
2343
|
inputProps: { placeholder: "Doctor Name" },
|
|
2344
2344
|
suffixInputProps: { placeholder: "Speciality" },
|
|
@@ -2466,10 +2466,10 @@ const In = (...s) => {
|
|
|
2466
2466
|
value: u?.occupation,
|
|
2467
2467
|
placeholder: "Enter Occupation",
|
|
2468
2468
|
onChange: (G) => {
|
|
2469
|
-
yt("occupation", G.target.value),
|
|
2469
|
+
yt("occupation", G.target.value), W(!0), gr(G);
|
|
2470
2470
|
},
|
|
2471
2471
|
onBlur: (G) => {
|
|
2472
|
-
G.stopPropagation(),
|
|
2472
|
+
G.stopPropagation(), W(!1);
|
|
2473
2473
|
}
|
|
2474
2474
|
},
|
|
2475
2475
|
width: 23.5 + "em"
|
|
@@ -2628,7 +2628,7 @@ const In = (...s) => {
|
|
|
2628
2628
|
className: "hfl-ml-4 hfl-px-4 hfl-py-[1.2rem]",
|
|
2629
2629
|
hierarchy: "Primary",
|
|
2630
2630
|
size: "md",
|
|
2631
|
-
onClick: () =>
|
|
2631
|
+
onClick: () => O(N),
|
|
2632
2632
|
textField: u?.insurance_details?.policy_id ? "Verified" : "Verify",
|
|
2633
2633
|
style: {
|
|
2634
2634
|
pointerEvents: u?.insurance_details?.policy_id ? "none" : "unset"
|
|
@@ -2645,17 +2645,17 @@ const In = (...s) => {
|
|
|
2645
2645
|
] })
|
|
2646
2646
|
] }) });
|
|
2647
2647
|
}), Ps = (s) => {
|
|
2648
|
-
const { getPatientDetails: u, setPatientAbhaDetails: d, patientAbhaDetails: n, isPartnerServiceEnabled: v, partnerConfig: w } = s, [a, A] =
|
|
2648
|
+
const { getPatientDetails: u, setPatientAbhaDetails: d, patientAbhaDetails: n, isPartnerServiceEnabled: v, partnerConfig: w } = s, [a, A] = z(""), [S, h] = z(!1), [Y, x] = z(!1), [L, k] = z(!1), [O, I] = z([]), [N, P] = z([]), B = Mr(null), b = Mr(null), [Q, F] = z("profile"), {
|
|
2649
2649
|
docPreference: M,
|
|
2650
2650
|
patientDetails: V,
|
|
2651
2651
|
preferences: te,
|
|
2652
2652
|
patientIDs: q,
|
|
2653
2653
|
billPreferences: ie,
|
|
2654
2654
|
// ppEventProps,
|
|
2655
|
-
showToast:
|
|
2655
|
+
showToast: W,
|
|
2656
2656
|
patientCustomFieldData: ge,
|
|
2657
2657
|
variable: be
|
|
2658
|
-
} =
|
|
2658
|
+
} = Lt(Mt) || {}, ue = V?.org_person_bid_str || "", [Le, ne] = z([]), [$, de] = z(""), [H, Re] = z({ partner_name: "", policy_company: "", policy_id: "" }), Me = Mr(null), [ke, pt] = z({
|
|
2659
2659
|
name: "",
|
|
2660
2660
|
phone_number: "",
|
|
2661
2661
|
age: "",
|
|
@@ -2672,7 +2672,7 @@ const In = (...s) => {
|
|
|
2672
2672
|
]
|
|
2673
2673
|
},
|
|
2674
2674
|
oe
|
|
2675
|
-
), [it, Ve] =
|
|
2675
|
+
), [it, Ve] = z(V), mt = async () => {
|
|
2676
2676
|
try {
|
|
2677
2677
|
h(!1);
|
|
2678
2678
|
const oe = await navigator.mediaDevices.getUserMedia({ video: !0 });
|
|
@@ -2695,8 +2695,8 @@ const In = (...s) => {
|
|
|
2695
2695
|
}, xt = () => {
|
|
2696
2696
|
document.getElementById("upload-local-file")?.click();
|
|
2697
2697
|
}, Gt = () => {
|
|
2698
|
-
|
|
2699
|
-
},
|
|
2698
|
+
W?.("Success", "Image deleted successfully", "Success", 3e3), h(!0), A(""), k(!1), T();
|
|
2699
|
+
}, kt = (oe) => {
|
|
2700
2700
|
A(oe), h(!1), k(!1);
|
|
2701
2701
|
}, T = () => {
|
|
2702
2702
|
if (b.current && b.current.srcObject) {
|
|
@@ -2754,7 +2754,7 @@ const In = (...s) => {
|
|
|
2754
2754
|
be
|
|
2755
2755
|
), { data: Se } = Te || {};
|
|
2756
2756
|
if (Se.status_code === 200)
|
|
2757
|
-
de(""),
|
|
2757
|
+
de(""), W?.("Insurance Verified Successfully", "", "Success", 3e3);
|
|
2758
2758
|
else if (Se?.error || Te?.status === 500)
|
|
2759
2759
|
throw de("Policy Number is Incorrect"), console.log(Se?.error), new Error(Se?.error);
|
|
2760
2760
|
}
|
|
@@ -2762,15 +2762,15 @@ const In = (...s) => {
|
|
|
2762
2762
|
const Se = new FormData();
|
|
2763
2763
|
Se.append("pid", oe), Se.append("bidstr", Te), Se.append("imgData", a);
|
|
2764
2764
|
const gt = await ts(Se, be);
|
|
2765
|
-
gt.apiError &&
|
|
2765
|
+
gt.apiError && W?.("Error", gt.apiError, "Error", 3e3);
|
|
2766
2766
|
}, J = async (oe) => {
|
|
2767
2767
|
const Te = new FormData();
|
|
2768
2768
|
Te.append("pid", oe);
|
|
2769
2769
|
const Se = await Si(Te, be);
|
|
2770
|
-
Se.apiError &&
|
|
2770
|
+
Se.apiError && W("Error", Se.apiError, "Error", 3e3);
|
|
2771
2771
|
}, K = async (oe = it?.name ?? "", Te = it?.org_person_dob ?? "") => {
|
|
2772
2772
|
if (!it || !q?.patientRoleID) {
|
|
2773
|
-
|
|
2773
|
+
W?.("Error", "Patient data not available.", "Error", 3e3);
|
|
2774
2774
|
return;
|
|
2775
2775
|
}
|
|
2776
2776
|
const Se = {
|
|
@@ -2779,9 +2779,9 @@ const In = (...s) => {
|
|
|
2779
2779
|
org_person_dob: Te
|
|
2780
2780
|
};
|
|
2781
2781
|
try {
|
|
2782
|
-
it.image_link && !a ? await J(q.patientRoleID) : a &&
|
|
2782
|
+
it.image_link && !a ? await J(q.patientRoleID) : a && Y && (await le(q.patientRoleID, ue), x(!1));
|
|
2783
2783
|
const gt = await Ki(Se, be, q);
|
|
2784
|
-
gt.status ? (
|
|
2784
|
+
gt.status ? (W?.("Success", gt.message, "Success", 3e3), u(q.patientRoleID)) : W?.("Error", gt.message, "Error", 3e3);
|
|
2785
2785
|
} catch (gt) {
|
|
2786
2786
|
console.error("Error updating patient details:", gt);
|
|
2787
2787
|
}
|
|
@@ -2805,9 +2805,9 @@ const In = (...s) => {
|
|
|
2805
2805
|
setPatientData: Ve,
|
|
2806
2806
|
patientData: it,
|
|
2807
2807
|
preferences: te,
|
|
2808
|
-
referredByDocList:
|
|
2808
|
+
referredByDocList: O,
|
|
2809
2809
|
throughChannelList: N,
|
|
2810
|
-
showImageFromLink:
|
|
2810
|
+
showImageFromLink: kt,
|
|
2811
2811
|
setValidators: pt,
|
|
2812
2812
|
validators: ke,
|
|
2813
2813
|
billPreferences: ie,
|
|
@@ -3057,12 +3057,12 @@ function Ns() {
|
|
|
3057
3057
|
return typeof o == "symbol" ? o : String(o);
|
|
3058
3058
|
}
|
|
3059
3059
|
n = n && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
3060
|
-
var h = { init: "init" },
|
|
3060
|
+
var h = { init: "init" }, Y = function(t) {
|
|
3061
3061
|
var o = t.value;
|
|
3062
3062
|
return o === void 0 ? "" : o;
|
|
3063
3063
|
}, x = function() {
|
|
3064
3064
|
return n.createElement(n.Fragment, null, " ");
|
|
3065
|
-
}, L = { Cell:
|
|
3065
|
+
}, L = { Cell: Y, width: 150, minWidth: 0, maxWidth: Number.MAX_SAFE_INTEGER };
|
|
3066
3066
|
function k() {
|
|
3067
3067
|
for (var t = arguments.length, o = new Array(t), f = 0; f < t; f++) o[f] = arguments[f];
|
|
3068
3068
|
return o.reduce(function(p, C) {
|
|
@@ -3070,7 +3070,7 @@ function Ns() {
|
|
|
3070
3070
|
return p = a({}, p, {}, A(C, ["style", "className"])), _ && (p.style = p.style ? a({}, p.style || {}, {}, _ || {}) : _), j && (p.className = p.className ? p.className + " " + j : j), p.className === "" && delete p.className, p;
|
|
3071
3071
|
}, {});
|
|
3072
3072
|
}
|
|
3073
|
-
var
|
|
3073
|
+
var O = function(t, o) {
|
|
3074
3074
|
return o === void 0 && (o = {}), function(f) {
|
|
3075
3075
|
return f === void 0 && (f = {}), [].concat(t, [f]).reduce(function(p, C) {
|
|
3076
3076
|
return function _(j, U, X) {
|
|
@@ -3171,7 +3171,7 @@ function Ns() {
|
|
|
3171
3171
|
if (!o) throw console.error(t), new Error("A column ID (or string accessor) is required!");
|
|
3172
3172
|
return Object.assign(t, { id: o, accessor: f }), t;
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function W(t, o) {
|
|
3175
3175
|
if (!o) throw new Error();
|
|
3176
3176
|
return Object.assign(t, a({ Header: x, Footer: x }, L, {}, o, {}, t)), Object.assign(t, { originalWidth: t.width }), t;
|
|
3177
3177
|
}
|
|
@@ -3187,7 +3187,7 @@ function Ns() {
|
|
|
3187
3187
|
});
|
|
3188
3188
|
C.forEach(function(he) {
|
|
3189
3189
|
var pe, ae = [].concat(ee).reverse()[0];
|
|
3190
|
-
xe && (he.parent ? pe = a({}, he.parent, { originalId: he.parent.id, id: he.parent.id + "_" + j(), headers: [he] }, f(he)) : pe =
|
|
3190
|
+
xe && (he.parent ? pe = a({}, he.parent, { originalId: he.parent.id, id: he.parent.id + "_" + j(), headers: [he] }, f(he)) : pe = W(a({ originalId: he.id + "_placeholder", id: he.id + "_placeholder_" + j(), placeholderOf: he, headers: [he] }, f(he)), o), ae && ae.originalId === pe.originalId ? ae.headers.push(he) : ee.push(pe)), X.headers.push(he);
|
|
3191
3191
|
}), p.push(X), C = ee;
|
|
3192
3192
|
}; C.length; ) U();
|
|
3193
3193
|
return p.reverse();
|
|
@@ -3243,12 +3243,12 @@ function Ns() {
|
|
|
3243
3243
|
return a({ key: "footerGroup_" + o.index }, t);
|
|
3244
3244
|
}, Gt = function(t, o) {
|
|
3245
3245
|
return a({ key: "row_" + o.row.id, role: "row" }, t);
|
|
3246
|
-
},
|
|
3246
|
+
}, kt = function(t, o) {
|
|
3247
3247
|
var f = o.cell;
|
|
3248
3248
|
return a({ key: "cell_" + f.row.id + "_" + f.column.id, role: "cell" }, t);
|
|
3249
3249
|
};
|
|
3250
3250
|
function T() {
|
|
3251
|
-
return { useOptions: [], stateReducers: [], useControlledState: [], columns: [], columnsDeps: [], allColumns: [], allColumnsDeps: [], accessValue: [], materializedColumns: [], materializedColumnsDeps: [], useInstanceAfterData: [], visibleColumns: [], visibleColumnsDeps: [], headerGroups: [], headerGroupsDeps: [], useInstanceBeforeDimensions: [], useInstance: [], prepareRow: [], getTableProps: [ft], getTableBodyProps: [it], getHeaderGroupProps: [St], getFooterGroupProps: [xt], getHeaderProps: [Ve], getFooterProps: [mt], getRowProps: [Gt], getCellProps: [
|
|
3251
|
+
return { useOptions: [], stateReducers: [], useControlledState: [], columns: [], columnsDeps: [], allColumns: [], allColumnsDeps: [], accessValue: [], materializedColumns: [], materializedColumnsDeps: [], useInstanceAfterData: [], visibleColumns: [], visibleColumnsDeps: [], headerGroups: [], headerGroupsDeps: [], useInstanceBeforeDimensions: [], useInstance: [], prepareRow: [], getTableProps: [ft], getTableBodyProps: [it], getHeaderGroupProps: [St], getFooterGroupProps: [xt], getHeaderProps: [Ve], getFooterProps: [mt], getRowProps: [Gt], getCellProps: [kt], useFinalInstance: [] };
|
|
3252
3252
|
}
|
|
3253
3253
|
h.resetHiddenColumns = "resetHiddenColumns", h.toggleHideColumn = "toggleHideColumn", h.setHiddenColumns = "setHiddenColumns", h.toggleHideAllColumns = "toggleHideAllColumns";
|
|
3254
3254
|
var Ie = function(t) {
|
|
@@ -3303,11 +3303,11 @@ function Ns() {
|
|
|
3303
3303
|
return p({ type: h.setHiddenColumns, value: Ne });
|
|
3304
3304
|
}, [p]), ae = n.useCallback(function(Ne) {
|
|
3305
3305
|
return p({ type: h.toggleHideAllColumns, value: Ne });
|
|
3306
|
-
}, [p]), fe =
|
|
3306
|
+
}, [p]), fe = O(_().getToggleHideAllColumnsProps, { instance: ee() });
|
|
3307
3307
|
f.forEach(function(Ne) {
|
|
3308
3308
|
Ne.toggleHidden = function(Oe) {
|
|
3309
3309
|
p({ type: h.toggleHideColumn, columnId: Ne.id, value: Oe });
|
|
3310
|
-
}, Ne.getToggleHiddenProps =
|
|
3310
|
+
}, Ne.getToggleHiddenProps = O(_().getToggleHiddenProps, { instance: ee(), column: Ne });
|
|
3311
3311
|
});
|
|
3312
3312
|
var Ce = b(X);
|
|
3313
3313
|
F(function() {
|
|
@@ -3420,14 +3420,14 @@ function Ns() {
|
|
|
3420
3420
|
qe = Math.max(qe, Pt.length);
|
|
3421
3421
|
}), qe;
|
|
3422
3422
|
}(fe);
|
|
3423
|
-
}, [fe]), Ee = b(t), Qe =
|
|
3423
|
+
}, [fe]), Ee = b(t), Qe = O(pe().getToggleAllRowsExpandedProps, { instance: Ee() });
|
|
3424
3424
|
Object.assign(t, { preExpandedRows: f, expandedRows: ve, rows: ve, expandedDepth: rt, isAllRowsExpanded: Oe, toggleRowExpanded: at, toggleAllRowsExpanded: We, getToggleAllRowsExpandedProps: Qe });
|
|
3425
3425
|
}
|
|
3426
3426
|
function cr(t, o) {
|
|
3427
3427
|
var f = o.instance.getHooks, p = o.instance;
|
|
3428
3428
|
t.toggleRowExpanded = function(C) {
|
|
3429
3429
|
return p.toggleRowExpanded(t.id, C);
|
|
3430
|
-
}, t.getToggleRowExpandedProps =
|
|
3430
|
+
}, t.getToggleRowExpandedProps = O(f().getToggleRowExpandedProps, { instance: p, row: t });
|
|
3431
3431
|
}
|
|
3432
3432
|
var yr = function(t, o, f) {
|
|
3433
3433
|
return t = t.filter(function(p) {
|
|
@@ -3753,7 +3753,7 @@ function Ns() {
|
|
|
3753
3753
|
fe({ type: h.setGroupBy, value: c });
|
|
3754
3754
|
}, [fe]);
|
|
3755
3755
|
j.forEach(function(c) {
|
|
3756
|
-
c.getGroupByToggleProps =
|
|
3756
|
+
c.getGroupByToggleProps = O(We().getGroupByToggleProps, { instance: ve(), header: c });
|
|
3757
3757
|
});
|
|
3758
3758
|
var Qe = n.useMemo(function() {
|
|
3759
3759
|
if (ee || !ae.length) return [f, p, C, dr, Hr, p, C];
|
|
@@ -3911,7 +3911,7 @@ function Ns() {
|
|
|
3911
3911
|
return We(qe.id, c, i);
|
|
3912
3912
|
}, qe.clearSortBy = function() {
|
|
3913
3913
|
ae({ type: h.clearSortBy, columnId: qe.id });
|
|
3914
|
-
}), qe.getSortByToggleProps =
|
|
3914
|
+
}), qe.getSortByToggleProps = O(Ce().getSortByToggleProps, { instance: ve(), column: qe });
|
|
3915
3915
|
var l = pe.find(function(c) {
|
|
3916
3916
|
return c.id === wt;
|
|
3917
3917
|
});
|
|
@@ -4100,7 +4100,7 @@ function Ns() {
|
|
|
4100
4100
|
return t.togglePivot(fe.id);
|
|
4101
4101
|
}), fe.Aggregated = fe.Aggregated || fe.Cell;
|
|
4102
4102
|
}), p.forEach(function(fe) {
|
|
4103
|
-
fe.getPivotToggleProps =
|
|
4103
|
+
fe.getPivotToggleProps = O(C().getPivotToggleProps, { instance: pe(), header: fe });
|
|
4104
4104
|
});
|
|
4105
4105
|
var ae = b(X);
|
|
4106
4106
|
F(function() {
|
|
@@ -4209,14 +4209,14 @@ function Ns() {
|
|
|
4209
4209
|
return ae({ type: h.toggleAllPageRowsSelected, value: Xe });
|
|
4210
4210
|
}, [ae]), Ee = n.useCallback(function(Xe, Pt) {
|
|
4211
4211
|
return ae({ type: h.toggleRowSelected, id: Xe, value: Pt });
|
|
4212
|
-
}, [ae]), Qe = b(t), vt =
|
|
4212
|
+
}, [ae]), Qe = b(t), vt = O(p().getToggleAllRowsSelectedProps, { instance: Qe() }), qe = O(p().getToggleAllPageRowsSelectedProps, { instance: Qe() });
|
|
4213
4213
|
Object.assign(t, { selectedFlatRows: Ne, isAllRowsSelected: Oe, isAllPageRowsSelected: at, toggleRowSelected: Ee, toggleAllRowsSelected: ve, getToggleAllRowsSelectedProps: vt, getToggleAllPageRowsSelectedProps: qe, toggleAllPageRowsSelected: rt });
|
|
4214
4214
|
}
|
|
4215
4215
|
function ma(t, o) {
|
|
4216
4216
|
var f = o.instance;
|
|
4217
4217
|
t.toggleRowSelected = function(p) {
|
|
4218
4218
|
return f.toggleRowSelected(t.id, p);
|
|
4219
|
-
}, t.getToggleRowSelectedProps =
|
|
4219
|
+
}, t.getToggleRowSelectedProps = O(f.getHooks().getToggleRowSelectedProps, { instance: f, row: t });
|
|
4220
4220
|
}
|
|
4221
4221
|
var Sl = function(t) {
|
|
4222
4222
|
return {};
|
|
@@ -4362,7 +4362,7 @@ function Ns() {
|
|
|
4362
4362
|
var o = t.flatHeaders, f = t.disableResizing, p = t.getHooks, C = t.state.columnResizing, _ = b(t);
|
|
4363
4363
|
o.forEach(function(j) {
|
|
4364
4364
|
var U = ue(j.disableResizing !== !0 && void 0, f !== !0 && void 0, !0);
|
|
4365
|
-
j.canResize = U, j.width = C.columnWidths[j.id] || j.originalWidth || j.width, j.isResizing = C.isResizingColumn === j.id, U && (j.getResizerProps =
|
|
4365
|
+
j.canResize = U, j.width = C.columnWidths[j.id] || j.originalWidth || j.width, j.isResizing = C.isResizingColumn === j.id, U && (j.getResizerProps = O(p().getResizerProps, { instance: _(), header: j }));
|
|
4366
4366
|
});
|
|
4367
4367
|
};
|
|
4368
4368
|
function wa(t) {
|
|
@@ -4477,7 +4477,7 @@ function Ns() {
|
|
|
4477
4477
|
var o, f = (o = document.getElementById("header-cell-" + t)) == null ? void 0 : o.offsetWidth;
|
|
4478
4478
|
if (f !== void 0) return f;
|
|
4479
4479
|
}
|
|
4480
|
-
d._UNSTABLE_usePivotColumns = qr, d.actions = h, d.defaultColumn = L, d.defaultGroupByFn = gl, d.defaultOrderByFn = yl, d.defaultRenderer =
|
|
4480
|
+
d._UNSTABLE_usePivotColumns = qr, d.actions = h, d.defaultColumn = L, d.defaultGroupByFn = gl, d.defaultOrderByFn = yl, d.defaultRenderer = Y, d.emptyRenderer = x, d.ensurePluginOrder = P, d.flexRender = V, d.functionalUpdate = B, d.loopHooks = N, d.makePropGetter = O, d.makeRenderer = M, d.reduceHooks = I, d.safeUseLayoutEffect = Q, d.useAbsoluteLayout = Gl, d.useAsyncDebounce = function(t, o) {
|
|
4481
4481
|
o === void 0 && (o = 0);
|
|
4482
4482
|
var f = n.useRef({}), p = b(t), C = b(o);
|
|
4483
4483
|
return n.useCallback(function() {
|
|
@@ -4553,7 +4553,7 @@ function Ns() {
|
|
|
4553
4553
|
Object.assign(_(), { rows: qe, initialRows: [].concat(qe), flatRows: Xe, rowsById: Pt }), N(j().useInstanceAfterData, _());
|
|
4554
4554
|
var tt = n.useMemo(function() {
|
|
4555
4555
|
return I(j().visibleColumns, Qe, { instance: _() }).map(function(m) {
|
|
4556
|
-
return
|
|
4556
|
+
return W(m, he);
|
|
4557
4557
|
});
|
|
4558
4558
|
}, [j, Qe, _, he].concat(I(j().visibleColumnsDeps, [], { instance: _() })));
|
|
4559
4559
|
Qe = n.useMemo(function() {
|
|
@@ -4586,7 +4586,7 @@ function Ns() {
|
|
|
4586
4586
|
}, [tt, l]), _().visibleColumns = tt;
|
|
4587
4587
|
var c = sr(r), i = c[0], g = c[1], y = c[2];
|
|
4588
4588
|
return _().totalColumnsMinWidth = i, _().totalColumnsWidth = g, _().totalColumnsMaxWidth = y, N(j().useInstance, _()), [].concat(_().flatHeaders, _().allColumns).forEach(function(m) {
|
|
4589
|
-
m.render = M(_(), m), m.getHeaderProps =
|
|
4589
|
+
m.render = M(_(), m), m.getHeaderProps = O(j().getHeaderProps, { instance: _(), column: m }), m.getFooterProps = O(j().getFooterProps, { instance: _(), column: m });
|
|
4590
4590
|
}), _().headerGroups = n.useMemo(function() {
|
|
4591
4591
|
return wt.filter(function(m, R) {
|
|
4592
4592
|
return m.headers = m.headers.filter(function(E) {
|
|
@@ -4595,18 +4595,18 @@ function Ns() {
|
|
|
4595
4595
|
return ye.headers ? Z(ye.headers) : ye.isVisible;
|
|
4596
4596
|
}).length;
|
|
4597
4597
|
}(E.headers) : E.isVisible;
|
|
4598
|
-
}), !!m.headers.length && (m.getHeaderGroupProps =
|
|
4598
|
+
}), !!m.headers.length && (m.getHeaderGroupProps = O(j().getHeaderGroupProps, { instance: _(), headerGroup: m, index: R }), m.getFooterGroupProps = O(j().getFooterGroupProps, { instance: _(), headerGroup: m, index: R }), !0);
|
|
4599
4599
|
});
|
|
4600
4600
|
}, [wt, _, j]), _().footerGroups = [].concat(_().headerGroups).reverse(), _().prepareRow = n.useCallback(function(m) {
|
|
4601
|
-
m.getRowProps =
|
|
4601
|
+
m.getRowProps = O(j().getRowProps, { instance: _(), row: m }), m.allCells = Qe.map(function(R) {
|
|
4602
4602
|
var E = m.values[R.id], Z = { column: R, row: m, value: E };
|
|
4603
|
-
return Z.getCellProps =
|
|
4603
|
+
return Z.getCellProps = O(j().getCellProps, { instance: _(), cell: Z }), Z.render = M(_(), R, { row: m, cell: Z, value: E }), Z;
|
|
4604
4604
|
}), m.cells = tt.map(function(R) {
|
|
4605
4605
|
return m.allCells.find(function(E) {
|
|
4606
4606
|
return E.column.id === R.id;
|
|
4607
4607
|
});
|
|
4608
4608
|
}), N(j().prepareRow, m, { instance: _() });
|
|
4609
|
-
}, [j, _, Qe, tt]), _().getTableProps =
|
|
4609
|
+
}, [j, _, Qe, tt]), _().getTableProps = O(j().getTableProps, { instance: _() }), _().getTableBodyProps = O(j().getTableBodyProps, { instance: _() }), N(j().useFinalInstance, _()), _();
|
|
4610
4610
|
}, Object.defineProperty(d, "__esModule", { value: !0 });
|
|
4611
4611
|
});
|
|
4612
4612
|
}(il, il.exports)), il.exports;
|
|
@@ -4673,14 +4673,14 @@ function As() {
|
|
|
4673
4673
|
var l = S(r, "string");
|
|
4674
4674
|
return typeof l == "symbol" ? l : String(l);
|
|
4675
4675
|
}
|
|
4676
|
-
var
|
|
4676
|
+
var Y = "Renderer Error ☝️", x = {
|
|
4677
4677
|
init: "init"
|
|
4678
4678
|
}, L = function(l) {
|
|
4679
4679
|
var c = l.value, i = c === void 0 ? "" : c;
|
|
4680
4680
|
return i;
|
|
4681
4681
|
}, k = function() {
|
|
4682
4682
|
return n.createElement(n.Fragment, null, " ");
|
|
4683
|
-
},
|
|
4683
|
+
}, O = {
|
|
4684
4684
|
Cell: L,
|
|
4685
4685
|
width: 150,
|
|
4686
4686
|
minWidth: 0,
|
|
@@ -4814,13 +4814,13 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
4814
4814
|
g === void 0 && (g = {});
|
|
4815
4815
|
var y = typeof i == "string" ? l[i] : i;
|
|
4816
4816
|
if (typeof y > "u")
|
|
4817
|
-
throw console.info(l), new Error(
|
|
4818
|
-
return
|
|
4817
|
+
throw console.info(l), new Error(Y);
|
|
4818
|
+
return W(y, a({}, r, {
|
|
4819
4819
|
column: l
|
|
4820
4820
|
}, c, {}, g));
|
|
4821
4821
|
};
|
|
4822
4822
|
}
|
|
4823
|
-
function
|
|
4823
|
+
function W(r, l) {
|
|
4824
4824
|
return ge(r) ? n.createElement(r, l) : r;
|
|
4825
4825
|
}
|
|
4826
4826
|
function ge(r) {
|
|
@@ -4871,7 +4871,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
4871
4871
|
// Make sure there is a fallback header, just in case
|
|
4872
4872
|
Header: k,
|
|
4873
4873
|
Footer: k
|
|
4874
|
-
},
|
|
4874
|
+
}, O, {}, l, {}, r)), Object.assign(r, {
|
|
4875
4875
|
originalWidth: r.width
|
|
4876
4876
|
}), r;
|
|
4877
4877
|
}
|
|
@@ -4983,11 +4983,11 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
4983
4983
|
}
|
|
4984
4984
|
return xt = r, xt;
|
|
4985
4985
|
}
|
|
4986
|
-
var
|
|
4986
|
+
var kt = /\[/g, T = /\]/g;
|
|
4987
4987
|
function Ie(r) {
|
|
4988
4988
|
return Ue(r).map(function(l) {
|
|
4989
4989
|
return String(l).replace(".", "_");
|
|
4990
|
-
}).join(".").replace(
|
|
4990
|
+
}).join(".").replace(kt, ".").replace(T, "").split(".");
|
|
4991
4991
|
}
|
|
4992
4992
|
function Ue(r, l) {
|
|
4993
4993
|
if (l === void 0 && (l = []), !Array.isArray(r))
|
|
@@ -6210,7 +6210,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
6210
6210
|
string: ha,
|
|
6211
6211
|
number: jl
|
|
6212
6212
|
});
|
|
6213
|
-
x.resetSortBy = "resetSortBy", x.setSortBy = "setSortBy", x.toggleSortBy = "toggleSortBy", x.clearSortBy = "clearSortBy",
|
|
6213
|
+
x.resetSortBy = "resetSortBy", x.setSortBy = "setSortBy", x.toggleSortBy = "toggleSortBy", x.clearSortBy = "clearSortBy", O.sortType = "alphanumeric", O.sortDescFirst = !1;
|
|
6214
6214
|
var Pl = function(l) {
|
|
6215
6215
|
l.getSortByToggleProps = [ma], l.stateReducers.push(Sl), l.useInstance.push(Nl);
|
|
6216
6216
|
};
|
|
@@ -6907,7 +6907,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
6907
6907
|
});
|
|
6908
6908
|
}, [l]);
|
|
6909
6909
|
}
|
|
6910
|
-
|
|
6910
|
+
O.canResize = !0, x.columnStartResizing = "columnStartResizing", x.columnResizing = "columnResizing", x.columnDoneResizing = "columnDoneResizing", x.resetResize = "resetResize";
|
|
6911
6911
|
var j = function(l) {
|
|
6912
6912
|
l.getResizerProps = [U], l.getHeaderProps.push({
|
|
6913
6913
|
style: {
|
|
@@ -7285,7 +7285,7 @@ This usually means you need to need to name your plugin hook by setting the 'plu
|
|
|
7285
7285
|
if (c !== void 0)
|
|
7286
7286
|
return c;
|
|
7287
7287
|
}
|
|
7288
|
-
d._UNSTABLE_usePivotColumns = Il, d.actions = x, d.defaultColumn =
|
|
7288
|
+
d._UNSTABLE_usePivotColumns = Il, d.actions = x, d.defaultColumn = O, d.defaultGroupByFn = wl, d.defaultOrderByFn = Ur, d.defaultRenderer = L, d.emptyRenderer = k, d.ensurePluginOrder = Q, d.flexRender = W, d.functionalUpdate = F, d.loopHooks = b, d.makePropGetter = P, d.makeRenderer = ie, d.reduceHooks = B, d.safeUseLayoutEffect = V, d.useAbsoluteLayout = ae, d.useAsyncDebounce = q, d.useBlockLayout = Oe, d.useColumnOrder = f, d.useExpanded = dt, d.useFilters = pl, d.useFlexLayout = at, d.useGetLatest = M, d.useGlobalFilter = ml, d.useGridLayout = vt, d.useGroupBy = qr, d.useMountedLayoutEffect = te, d.usePagination = Dl, d.useResizeColumns = j, d.useRowSelect = Jr, d.useRowState = kl, d.useSortBy = Pl, d.useTable = Rr, Object.defineProperty(d, "__esModule", { value: !0 });
|
|
7289
7289
|
});
|
|
7290
7290
|
}(sl, sl.exports)), sl.exports;
|
|
7291
7291
|
}
|
|
@@ -7305,7 +7305,7 @@ const Bs = ({
|
|
|
7305
7305
|
setTableData: A,
|
|
7306
7306
|
handleRightSegment: S
|
|
7307
7307
|
}) => {
|
|
7308
|
-
const h = Mr(null), [
|
|
7308
|
+
const h = Mr(null), [Y, x] = z(n?.original?.service_name || ""), [L, k] = z(!1), [O, I] = z([]), [N, P] = z(!1), B = Vt(
|
|
7309
7309
|
(M) => {
|
|
7310
7310
|
h.current && !h.current.contains(M.target) && (N && v && x(""), k(!1));
|
|
7311
7311
|
},
|
|
@@ -7317,7 +7317,7 @@ const Bs = ({
|
|
|
7317
7317
|
const b = (M) => {
|
|
7318
7318
|
if (P(!0), k(!0), u?.length > 0) {
|
|
7319
7319
|
const te = u.filter((q) => q.service_name.toLowerCase().includes(M.target.value.toLowerCase())).sort((q, ie) => {
|
|
7320
|
-
const
|
|
7320
|
+
const W = M.target.value.toLowerCase(), ge = q.service_name.toLowerCase().startsWith(W), be = ie.service_name.toLowerCase().startsWith(W);
|
|
7321
7321
|
return ge && !be ? -1 : !ge && be ? 1 : q.service_name.localeCompare(ie.service_name);
|
|
7322
7322
|
});
|
|
7323
7323
|
I(te);
|
|
@@ -7369,7 +7369,7 @@ const Bs = ({
|
|
|
7369
7369
|
{
|
|
7370
7370
|
type: "text",
|
|
7371
7371
|
className: `hfl-flex-1 focus-visible:hfl-outline-0 ${n?.original?.order_item_id ? "hfl-bg-Gray-50 hfl-caret-Gray-50" : ""}`,
|
|
7372
|
-
value:
|
|
7372
|
+
value: Y,
|
|
7373
7373
|
onChange: (M) => {
|
|
7374
7374
|
n?.original?.order_item_id || (b(M), w(M, "service_name", a));
|
|
7375
7375
|
},
|
|
@@ -7398,7 +7398,7 @@ const Bs = ({
|
|
|
7398
7398
|
{
|
|
7399
7399
|
ref: h,
|
|
7400
7400
|
className: "hfl-absolute hfl-right-0 hfl-z-10 hfl-max-h-[270px] hfl-w-[330px] hfl-overflow-scroll hfl-overflow-x-hidden hfl-rounded-lg hfl-border-1 hfl-border-Gray-200 hfl-bg-White hfl-shadow-md",
|
|
7401
|
-
children:
|
|
7401
|
+
children: O.map((M, V) => /* @__PURE__ */ e.jsx(
|
|
7402
7402
|
ll,
|
|
7403
7403
|
{
|
|
7404
7404
|
label: M.service_name,
|
|
@@ -7416,7 +7416,7 @@ const Bs = ({
|
|
|
7416
7416
|
)
|
|
7417
7417
|
] });
|
|
7418
7418
|
}, mn = (s) => {
|
|
7419
|
-
if (!
|
|
7419
|
+
if (!Lt(Mt))
|
|
7420
7420
|
throw new Error("AddBillsTable must be used within an PatientPopupContext.Provider");
|
|
7421
7421
|
const {
|
|
7422
7422
|
patientIDs: d,
|
|
@@ -7429,18 +7429,18 @@ const Bs = ({
|
|
|
7429
7429
|
// ppEventProps,
|
|
7430
7430
|
getAndSetServiceListArr: S,
|
|
7431
7431
|
variable: h
|
|
7432
|
-
} =
|
|
7433
|
-
isDisabled:
|
|
7432
|
+
} = Lt(Mt), {
|
|
7433
|
+
isDisabled: Y = !1,
|
|
7434
7434
|
addBillButton: x,
|
|
7435
7435
|
tableBodyData: L,
|
|
7436
7436
|
handleEditRow: k,
|
|
7437
|
-
handleRightSegment:
|
|
7437
|
+
handleRightSegment: O,
|
|
7438
7438
|
tableData: I,
|
|
7439
7439
|
setTableData: N,
|
|
7440
7440
|
setEditRowId: P,
|
|
7441
7441
|
getBillSummarydata: B,
|
|
7442
7442
|
refreshBillsList: b
|
|
7443
|
-
} = s, Q = Kt(() => I.length >= 0 && !
|
|
7443
|
+
} = s, Q = Kt(() => I.length >= 0 && !Y ? I.map((H) => ({
|
|
7444
7444
|
...H,
|
|
7445
7445
|
order_item_service_tax: Math.floor(H?.order_item_service_tax),
|
|
7446
7446
|
deleted: !1
|
|
@@ -7484,7 +7484,7 @@ const Bs = ({
|
|
|
7484
7484
|
]);
|
|
7485
7485
|
};
|
|
7486
7486
|
Ke(() => {
|
|
7487
|
-
L?.length > 0 && !
|
|
7487
|
+
L?.length > 0 && !Y && N(L);
|
|
7488
7488
|
}, [L]);
|
|
7489
7489
|
const M = (H, Re, Me) => {
|
|
7490
7490
|
const { value: ke } = H.target;
|
|
@@ -7543,10 +7543,10 @@ const Bs = ({
|
|
|
7543
7543
|
currRowData: H,
|
|
7544
7544
|
rowId: H.id,
|
|
7545
7545
|
options: n?.service_list,
|
|
7546
|
-
isDisabled:
|
|
7546
|
+
isDisabled: Y,
|
|
7547
7547
|
handleValueChange: M,
|
|
7548
7548
|
setTableData: N,
|
|
7549
|
-
handleRightSegment:
|
|
7549
|
+
handleRightSegment: O
|
|
7550
7550
|
}
|
|
7551
7551
|
)
|
|
7552
7552
|
}
|
|
@@ -7674,9 +7674,9 @@ const Bs = ({
|
|
|
7674
7674
|
children: /* @__PURE__ */ e.jsx(
|
|
7675
7675
|
"i",
|
|
7676
7676
|
{
|
|
7677
|
-
className: ` ${
|
|
7677
|
+
className: ` ${Y ? "hx_delete hfl-text-White" : "hx_delete"} ${parseInt(H?.original?.balance_amount) >= parseInt(H?.original?.net_amount) ? "" : " hfl-cursor-not-allowed hfl-opacity-20"} `,
|
|
7678
7678
|
onClick: (Re) => {
|
|
7679
|
-
Re.stopPropagation(),
|
|
7679
|
+
Re.stopPropagation(), O(), q(H, H.id);
|
|
7680
7680
|
}
|
|
7681
7681
|
}
|
|
7682
7682
|
)
|
|
@@ -7685,9 +7685,9 @@ const Bs = ({
|
|
|
7685
7685
|
}
|
|
7686
7686
|
],
|
|
7687
7687
|
[w, A, n?.service_list]
|
|
7688
|
-
),
|
|
7688
|
+
), W = Kt(() => Y ? L : Q, [Q, L]), { getTableProps: ge, getTableBodyProps: be, headerGroups: ue, rows: Le, prepareRow: ne } = ul.useTable({
|
|
7689
7689
|
columns: ie,
|
|
7690
|
-
data:
|
|
7690
|
+
data: W
|
|
7691
7691
|
}), $ = (H) => {
|
|
7692
7692
|
const Re = [];
|
|
7693
7693
|
return H?.headers?.length && H.headers.map((Me) => {
|
|
@@ -7722,7 +7722,7 @@ const Bs = ({
|
|
|
7722
7722
|
...ke.getCellProps(),
|
|
7723
7723
|
className: `hfl-relative hfl-border-1 hfl-border-Gray-200 hfl-px-2 hfl-text-left ${pt == 1 && Re?.original?.order_item_id ? "hfl-bg-Gray-50" : ""} `,
|
|
7724
7724
|
onClick: (ft) => {
|
|
7725
|
-
pt === 6 ? (ft.stopPropagation(),
|
|
7725
|
+
pt === 6 ? (ft.stopPropagation(), O()) : V(Re);
|
|
7726
7726
|
},
|
|
7727
7727
|
children: /* @__PURE__ */ e.jsx(D, { variant: "Regular", type: "Text sm", className: "", children: ke.render("Cell") })
|
|
7728
7728
|
}
|
|
@@ -7734,7 +7734,7 @@ const Bs = ({
|
|
|
7734
7734
|
};
|
|
7735
7735
|
return Ke(() => {
|
|
7736
7736
|
x && I[I.length - 1]?.order_item_id && F();
|
|
7737
|
-
}, [I, L]), /* @__PURE__ */ e.jsx("div", { className: `${
|
|
7737
|
+
}, [I, L]), /* @__PURE__ */ e.jsx("div", { className: `${Y ? " hfl-pointer-events-none" : "hfl-cursor-pointer"}`, children: /* @__PURE__ */ e.jsxs(
|
|
7738
7738
|
"table",
|
|
7739
7739
|
{
|
|
7740
7740
|
...ge(),
|
|
@@ -7780,11 +7780,11 @@ const Bs = ({
|
|
|
7780
7780
|
showRefund: A = !0,
|
|
7781
7781
|
showDepositRefund: S = !1,
|
|
7782
7782
|
isPayDue: h,
|
|
7783
|
-
getBillSummarydata:
|
|
7783
|
+
getBillSummarydata: Y,
|
|
7784
7784
|
getPastDueAmount: x,
|
|
7785
7785
|
handleRightSegment: L,
|
|
7786
7786
|
serviceItem: k,
|
|
7787
|
-
date:
|
|
7787
|
+
date: O,
|
|
7788
7788
|
refreshBillsList: I,
|
|
7789
7789
|
deleteLastPaymemntMode: N = !1,
|
|
7790
7790
|
setDeleteLastPaymentMode: P = () => {
|
|
@@ -7797,13 +7797,13 @@ const Bs = ({
|
|
|
7797
7797
|
if (a) return "discount";
|
|
7798
7798
|
if (A) return "refund";
|
|
7799
7799
|
if (S) return "deposit_refund";
|
|
7800
|
-
}, { patientIDs: F, showToast: M, billPreferences: V, getLastBillsPaymentData: te, variable: q } =
|
|
7800
|
+
}, { patientIDs: F, showToast: M, billPreferences: V, getLastBillsPaymentData: te, variable: q } = Lt(Mt) || {}, [ie, W] = z(Q()), [ge, be] = z([]), [ue, Le] = z([{ id: 1, item_level: "0", bill_level: "0" }]), [ne, $] = z([{ id: 1, label: "CASH", value: "0", detail: "" }]), [de, H] = z(!1), Re = {
|
|
7801
7801
|
color: "#98A2B3",
|
|
7802
7802
|
fontFamily: "Inter",
|
|
7803
7803
|
fontSize: "14px",
|
|
7804
7804
|
fontWeight: 400,
|
|
7805
7805
|
lineHeight: "18px"
|
|
7806
|
-
}, [Me, ke] =
|
|
7806
|
+
}, [Me, ke] = z(""), [pt, ft] = z(""), it = Vt(
|
|
7807
7807
|
(le, J) => {
|
|
7808
7808
|
if (P(!1), le === "payment" || le === "deposit") {
|
|
7809
7809
|
const K = [...ge];
|
|
@@ -7838,7 +7838,7 @@ const Bs = ({
|
|
|
7838
7838
|
]);
|
|
7839
7839
|
}
|
|
7840
7840
|
}, [V]);
|
|
7841
|
-
const [Ve, mt] =
|
|
7841
|
+
const [Ve, mt] = z(!0), St = () => {
|
|
7842
7842
|
mt((le) => !le);
|
|
7843
7843
|
}, xt = [
|
|
7844
7844
|
{ key: "deposit", label: "Add Deposit" },
|
|
@@ -7847,8 +7847,8 @@ const Bs = ({
|
|
|
7847
7847
|
{ key: "refund", label: "Refund" },
|
|
7848
7848
|
{ key: "deposit_refund", label: "Refund" }
|
|
7849
7849
|
].filter((le) => le.key === "payment" ? w : le.key === "discount" ? a : le.key === "refund" ? A : le.key === "deposit" ? v : le.key === "deposit_refund" ? S : !0), Gt = (le) => {
|
|
7850
|
-
|
|
7851
|
-
},
|
|
7850
|
+
W(le);
|
|
7851
|
+
}, kt = (le) => {
|
|
7852
7852
|
const J = (le === "payment" ? ge.length : le === "discount" ? ue.length : ne.length) + 1;
|
|
7853
7853
|
le === "payment" && w && ge.length < 2 ? be([
|
|
7854
7854
|
...ge,
|
|
@@ -7872,7 +7872,7 @@ const Bs = ({
|
|
|
7872
7872
|
d?.bill_summary ? le = Object.entries(d?.bill_summary).map(([Te, Se]) => ({
|
|
7873
7873
|
order_id: Se?.order_id,
|
|
7874
7874
|
amount: Number(Se?.balance_amount),
|
|
7875
|
-
order_date: Be(
|
|
7875
|
+
order_date: Be(O).format("YYYY-MM-DD"),
|
|
7876
7876
|
service_category_id: Number(Te)
|
|
7877
7877
|
})).filter((Te) => Te.amount !== 0) : d?.balance_amount && le.push({ amount: parseInt(d?.balance_amount) });
|
|
7878
7878
|
const J = h ? (n?.bill_amount_details ?? []).map((Te) => ({
|
|
@@ -7880,7 +7880,7 @@ const Bs = ({
|
|
|
7880
7880
|
amount: Number(Te.balance_amount) || 0
|
|
7881
7881
|
})) : [];
|
|
7882
7882
|
return [...le, ...J].reduce((Te, Se) => Te + Se.amount, 0);
|
|
7883
|
-
}, [d, h, n?.bill_amount_details,
|
|
7883
|
+
}, [d, h, n?.bill_amount_details, O]), Ie = Vt(() => B <= T ? B : T, [T, B]);
|
|
7884
7884
|
Ke(() => {
|
|
7885
7885
|
const le = Ie();
|
|
7886
7886
|
ie !== "deposit" && ie !== "deposit_refund" && be((J) => {
|
|
@@ -8057,7 +8057,7 @@ const Bs = ({
|
|
|
8057
8057
|
"div",
|
|
8058
8058
|
{
|
|
8059
8059
|
className: "hfl-inline-flex hfl-cursor-pointer hfl-items-center hfl-text-Primary-600",
|
|
8060
|
-
onClick: () =>
|
|
8060
|
+
onClick: () => kt(ie),
|
|
8061
8061
|
"data-qa": "payment-mode",
|
|
8062
8062
|
children: [
|
|
8063
8063
|
/* @__PURE__ */ e.jsx("div", { className: "hx_add-circle hfl-text-3" }),
|
|
@@ -8079,7 +8079,7 @@ const Bs = ({
|
|
|
8079
8079
|
const le = Object.entries(d?.bill_summary).map(([Se, gt]) => ({
|
|
8080
8080
|
order_id: gt?.order_id,
|
|
8081
8081
|
amount: Number(gt?.balance_amount),
|
|
8082
|
-
order_date: Be(
|
|
8082
|
+
order_date: Be(O).format("YYYY-MM-DD"),
|
|
8083
8083
|
service_category_id: +Se
|
|
8084
8084
|
})).filter((Se) => Se.amount !== 0), J = h ? n?.bill_amount_details.map((Se) => ({
|
|
8085
8085
|
order_id: Se.order_id,
|
|
@@ -8106,7 +8106,7 @@ const Bs = ({
|
|
|
8106
8106
|
F?.patientRoleID || "",
|
|
8107
8107
|
q
|
|
8108
8108
|
);
|
|
8109
|
-
Se ? (it("payment", 1), M("Success", Se?.message, "Success", 3e3), b?.((gt) => !gt),
|
|
8109
|
+
Se ? (it("payment", 1), M("Success", Se?.message, "Success", 3e3), b?.((gt) => !gt), Y?.(), I?.(O), x?.(), await te(F?.patientRoleID || ""), L(), H(!1)) : (H(!1), M("Error", "Something went wrong please try again", "Error", 3e3));
|
|
8110
8110
|
}
|
|
8111
8111
|
else
|
|
8112
8112
|
M(
|
|
@@ -8150,7 +8150,7 @@ const Bs = ({
|
|
|
8150
8150
|
} catch (K) {
|
|
8151
8151
|
H(!1), M("Error", K.data.message, "Error", 3e3);
|
|
8152
8152
|
}
|
|
8153
|
-
le && (it("payment", 1), M("Success", le?.message, "Success", 3e3),
|
|
8153
|
+
le && (it("payment", 1), M("Success", le?.message, "Success", 3e3), Y?.(), I?.(O), x?.(), await te(F?.patientRoleID || ""), L(), H(!1));
|
|
8154
8154
|
}
|
|
8155
8155
|
}
|
|
8156
8156
|
}
|
|
@@ -8223,7 +8223,7 @@ const Bs = ({
|
|
|
8223
8223
|
} catch (K) {
|
|
8224
8224
|
H(!1), console.error("Error in updateBill", K);
|
|
8225
8225
|
}
|
|
8226
|
-
le && (M("Success", le?.message, "Success", 3e3),
|
|
8226
|
+
le && (M("Success", le?.message, "Success", 3e3), Y?.(), I?.(O), x?.(), L(), H(!1));
|
|
8227
8227
|
}
|
|
8228
8228
|
}
|
|
8229
8229
|
)
|
|
@@ -8330,7 +8330,7 @@ const Bs = ({
|
|
|
8330
8330
|
"div",
|
|
8331
8331
|
{
|
|
8332
8332
|
className: "hfl-inline-flex hfl-cursor-pointer hfl-items-center hfl-text-Primary-600 ",
|
|
8333
|
-
onClick: () =>
|
|
8333
|
+
onClick: () => kt("refund"),
|
|
8334
8334
|
children: [
|
|
8335
8335
|
/* @__PURE__ */ e.jsx("div", { className: "hx_add-circle hfl-text-3" }),
|
|
8336
8336
|
/* @__PURE__ */ e.jsx(D, { variant: "Medium", type: "Text xs", children: "Refund Mode" })
|
|
@@ -8370,7 +8370,7 @@ const Bs = ({
|
|
|
8370
8370
|
} catch (K) {
|
|
8371
8371
|
console.error("Error in update refund", K), H(!1);
|
|
8372
8372
|
}
|
|
8373
|
-
le && (M("Success", le?.message, "Success", 3e3),
|
|
8373
|
+
le && (M("Success", le?.message, "Success", 3e3), Y?.(), I?.(O), x?.(), L(), H(!1));
|
|
8374
8374
|
}
|
|
8375
8375
|
}
|
|
8376
8376
|
)
|
|
@@ -8468,7 +8468,7 @@ const Bs = ({
|
|
|
8468
8468
|
"div",
|
|
8469
8469
|
{
|
|
8470
8470
|
className: "hfl-inline-flex hfl-cursor-pointer hfl-items-center hfl-text-Primary-600 ",
|
|
8471
|
-
onClick: () =>
|
|
8471
|
+
onClick: () => kt("deposit_refund"),
|
|
8472
8472
|
children: [
|
|
8473
8473
|
/* @__PURE__ */ e.jsx("div", { className: "hx_add-circle hfl-text-3" }),
|
|
8474
8474
|
/* @__PURE__ */ e.jsx(D, { variant: "Medium", type: "Text xs", children: "Refund Mode" })
|
|
@@ -8521,12 +8521,12 @@ const Bs = ({
|
|
|
8521
8521
|
handleServiceItem: A,
|
|
8522
8522
|
pastDueData: S,
|
|
8523
8523
|
summaryData: h,
|
|
8524
|
-
getBillSummarydata:
|
|
8524
|
+
getBillSummarydata: Y,
|
|
8525
8525
|
getPastDueAmount: x,
|
|
8526
8526
|
refreshBillsList: L,
|
|
8527
8527
|
walletBalance: k = 0,
|
|
8528
|
-
setRefreshWallet:
|
|
8529
|
-
} = s, [I, N] =
|
|
8528
|
+
setRefreshWallet: O
|
|
8529
|
+
} = s, [I, N] = z(!1), [P, B] = z(!1), b = () => {
|
|
8530
8530
|
B(!0), N(!0);
|
|
8531
8531
|
}, Q = () => {
|
|
8532
8532
|
B(!0), N(!1);
|
|
@@ -8811,14 +8811,14 @@ const Bs = ({
|
|
|
8811
8811
|
showRefund: a,
|
|
8812
8812
|
summaryData: h,
|
|
8813
8813
|
date: u,
|
|
8814
|
-
getBillSummarydata:
|
|
8814
|
+
getBillSummarydata: Y,
|
|
8815
8815
|
handleRightSegment: n,
|
|
8816
8816
|
getPastDueAmount: x,
|
|
8817
8817
|
refreshBillsList: L,
|
|
8818
8818
|
deleteLastPaymemntMode: P,
|
|
8819
8819
|
setDeleteLastPaymentMode: B,
|
|
8820
8820
|
walletBalance: k,
|
|
8821
|
-
setRefreshWallet:
|
|
8821
|
+
setRefreshWallet: O
|
|
8822
8822
|
}
|
|
8823
8823
|
)
|
|
8824
8824
|
] }),
|
|
@@ -8862,7 +8862,7 @@ const Bs = ({
|
|
|
8862
8862
|
setTableData: a,
|
|
8863
8863
|
refreshBillsList: A,
|
|
8864
8864
|
handleRevertEdit: S
|
|
8865
|
-
} = s, { patientIDs: h, showToast:
|
|
8865
|
+
} = s, { patientIDs: h, showToast: Y, doctorListArr: x, billPreferences: L, formattedService: k, ppEventProps: O, variable: I } = Lt(Mt), [N, P] = z(), B = {
|
|
8866
8866
|
bill_item_details: {
|
|
8867
8867
|
doctor_name: I.window_var.doc_name_for_seg,
|
|
8868
8868
|
referrer_doctor_role_id: I.window_var.doctor_role_id_for_seg,
|
|
@@ -8878,7 +8878,7 @@ const Bs = ({
|
|
|
8878
8878
|
},
|
|
8879
8879
|
appnt_doctor_role_id: ""
|
|
8880
8880
|
}
|
|
8881
|
-
}, [b, Q] =
|
|
8881
|
+
}, [b, Q] = z(() => ({
|
|
8882
8882
|
...u,
|
|
8883
8883
|
...B
|
|
8884
8884
|
})), F = (te, q) => {
|
|
@@ -8889,10 +8889,10 @@ const Bs = ({
|
|
|
8889
8889
|
} : ie = {
|
|
8890
8890
|
doctor_name: q.docName,
|
|
8891
8891
|
referrer_doctor_role_id: q.docRoleID
|
|
8892
|
-
}, Q((
|
|
8893
|
-
...
|
|
8892
|
+
}, Q((W) => ({
|
|
8893
|
+
...W,
|
|
8894
8894
|
bill_item_details: {
|
|
8895
|
-
...
|
|
8895
|
+
...W.bill_item_details,
|
|
8896
8896
|
...ie
|
|
8897
8897
|
}
|
|
8898
8898
|
}));
|
|
@@ -9036,16 +9036,16 @@ const Bs = ({
|
|
|
9036
9036
|
onClick: async () => {
|
|
9037
9037
|
const te = await Ka(
|
|
9038
9038
|
b,
|
|
9039
|
-
|
|
9039
|
+
Y,
|
|
9040
9040
|
h.patientRoleID,
|
|
9041
9041
|
Be(v).format("YYYY-MM-DD"),
|
|
9042
|
-
|
|
9042
|
+
O,
|
|
9043
9043
|
Dt[2],
|
|
9044
9044
|
I
|
|
9045
9045
|
);
|
|
9046
9046
|
b.bill_item_details.lab_owner_name && as(b.bill_item_details.lab_owner_name, h?.patientRoleID || "", I), te && (a(
|
|
9047
9047
|
(q) => q.map(
|
|
9048
|
-
(ie,
|
|
9048
|
+
(ie, W) => w == W.toString() ? {
|
|
9049
9049
|
...ie,
|
|
9050
9050
|
order_item_id: te.order_item_id || b.order_item_id
|
|
9051
9051
|
} : ie
|
|
@@ -9080,17 +9080,17 @@ const Bs = ({
|
|
|
9080
9080
|
formattedService: a,
|
|
9081
9081
|
ppEventProps: A,
|
|
9082
9082
|
variable: S
|
|
9083
|
-
} =
|
|
9083
|
+
} = Lt(Mt), {
|
|
9084
9084
|
bill_date: h,
|
|
9085
|
-
handleRightSegment:
|
|
9085
|
+
handleRightSegment: Y,
|
|
9086
9086
|
getBillSummarydata: x,
|
|
9087
9087
|
editedTableData: L,
|
|
9088
9088
|
setTableData: k,
|
|
9089
|
-
editRowId:
|
|
9089
|
+
editRowId: O,
|
|
9090
9090
|
refreshBillsList: I,
|
|
9091
9091
|
handleRevertEdit: N,
|
|
9092
9092
|
checkAppointmentForBilling: P
|
|
9093
|
-
} = s, [B, b] =
|
|
9093
|
+
} = s, [B, b] = z([]), Q = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
9094
9094
|
hour: "numeric",
|
|
9095
9095
|
minute: "numeric",
|
|
9096
9096
|
hour12: !0
|
|
@@ -9109,7 +9109,7 @@ const Bs = ({
|
|
|
9109
9109
|
appnt_service_id: L?.service_id || "",
|
|
9110
9110
|
appnt_service_name: L?.service_name || "",
|
|
9111
9111
|
...L
|
|
9112
|
-
}, [V, te] =
|
|
9112
|
+
}, [V, te] = z(M), [q, ie] = z(!1), W = async () => {
|
|
9113
9113
|
if (L?.order_item_id)
|
|
9114
9114
|
try {
|
|
9115
9115
|
const $ = await $a(
|
|
@@ -9129,7 +9129,7 @@ const Bs = ({
|
|
|
9129
9129
|
service_name: mt
|
|
9130
9130
|
} = $.data, { appointment_details: St, doctor_name: xt } = Me, {
|
|
9131
9131
|
appnt_id: Gt,
|
|
9132
|
-
appnt_date:
|
|
9132
|
+
appnt_date: kt = Be().format("YYYY-MM-DD"),
|
|
9133
9133
|
appnt_time: T,
|
|
9134
9134
|
appnt_status: Ie,
|
|
9135
9135
|
appnt_duration: Ue,
|
|
@@ -9149,7 +9149,7 @@ const Bs = ({
|
|
|
9149
9149
|
patient_role_id: d.patientRoleID,
|
|
9150
9150
|
appnt_doctor_role_id: le,
|
|
9151
9151
|
appnt_service_id: Re,
|
|
9152
|
-
appnt_date:
|
|
9152
|
+
appnt_date: kt,
|
|
9153
9153
|
appnt_time: T,
|
|
9154
9154
|
appnt_status: Ie,
|
|
9155
9155
|
appnt_duration: Ue,
|
|
@@ -9176,9 +9176,9 @@ const Bs = ({
|
|
|
9176
9176
|
Ke(() => {
|
|
9177
9177
|
L && te({ ...V, ...L });
|
|
9178
9178
|
}, [L]), Ke(() => {
|
|
9179
|
-
|
|
9179
|
+
W();
|
|
9180
9180
|
}, [V.order_item_id]);
|
|
9181
|
-
const [ge, be] =
|
|
9181
|
+
const [ge, be] = z(!1), ue = ($, de) => {
|
|
9182
9182
|
te((H) => ({
|
|
9183
9183
|
...H,
|
|
9184
9184
|
[$]: de
|
|
@@ -9227,7 +9227,7 @@ const Bs = ({
|
|
|
9227
9227
|
{
|
|
9228
9228
|
className: "hx_close hfl-flex-shrink-0 hfl-cursor-pointer hfl-text-4",
|
|
9229
9229
|
onClick: () => {
|
|
9230
|
-
|
|
9230
|
+
Y(), N();
|
|
9231
9231
|
}
|
|
9232
9232
|
}
|
|
9233
9233
|
)
|
|
@@ -9417,7 +9417,7 @@ const Bs = ({
|
|
|
9417
9417
|
icon: "No",
|
|
9418
9418
|
className: "hfl-flex-1 hfl-items-center hfl-justify-center hfl-border hfl-border-Gray-300 hfl-bg-White hfl-text-Gray-700 hover:hfl-bg-Gray-100",
|
|
9419
9419
|
onClick: () => {
|
|
9420
|
-
|
|
9420
|
+
Y(), be(!1);
|
|
9421
9421
|
}
|
|
9422
9422
|
}
|
|
9423
9423
|
),
|
|
@@ -9438,7 +9438,7 @@ const Bs = ({
|
|
|
9438
9438
|
A,
|
|
9439
9439
|
Dt[0],
|
|
9440
9440
|
S
|
|
9441
|
-
) &&
|
|
9441
|
+
) && Y();
|
|
9442
9442
|
else {
|
|
9443
9443
|
const $ = await Bn(
|
|
9444
9444
|
V,
|
|
@@ -9453,7 +9453,7 @@ const Bs = ({
|
|
|
9453
9453
|
);
|
|
9454
9454
|
$ && (k(
|
|
9455
9455
|
(de) => de.map(
|
|
9456
|
-
(H, Re) =>
|
|
9456
|
+
(H, Re) => O == Re.toString() ? {
|
|
9457
9457
|
...H,
|
|
9458
9458
|
order_item_id: $.order_item_id || V.order_item_id
|
|
9459
9459
|
} : H
|
|
@@ -9463,7 +9463,7 @@ const Bs = ({
|
|
|
9463
9463
|
order_item_id: $.order_item_id,
|
|
9464
9464
|
appnt_id: $.appnt_id,
|
|
9465
9465
|
order_id: $.order_id
|
|
9466
|
-
})), $.order_item_id && $.appnt_id &&
|
|
9466
|
+
})), $.order_item_id && $.appnt_id && Y());
|
|
9467
9467
|
}
|
|
9468
9468
|
x(), I(h), P();
|
|
9469
9469
|
},
|
|
@@ -9490,7 +9490,7 @@ const Bs = ({
|
|
|
9490
9490
|
icon: "Left",
|
|
9491
9491
|
iconFile: "hx_arrow-left hfl-text-Gray-500",
|
|
9492
9492
|
onClick: () => {
|
|
9493
|
-
ge ? be(!1) :
|
|
9493
|
+
ge ? be(!1) : Y(), N();
|
|
9494
9494
|
}
|
|
9495
9495
|
}
|
|
9496
9496
|
) })
|
|
@@ -9505,7 +9505,7 @@ const Bs = ({
|
|
|
9505
9505
|
editRowId: a,
|
|
9506
9506
|
refreshBillsList: A,
|
|
9507
9507
|
handleRevertEdit: S
|
|
9508
|
-
} = s, { patientIDs: h, showToast:
|
|
9508
|
+
} = s, { patientIDs: h, showToast: Y, doctorListArr: x, billPreferences: L, formattedService: k, ppEventProps: O, variable: I } = Lt(Mt) || {}, N = {
|
|
9509
9509
|
bill_item_details: {
|
|
9510
9510
|
appointment_details: {
|
|
9511
9511
|
appnt_id: "",
|
|
@@ -9521,10 +9521,10 @@ const Bs = ({
|
|
|
9521
9521
|
lab_owner_id: "",
|
|
9522
9522
|
appnt_doctor_role_id: ""
|
|
9523
9523
|
}
|
|
9524
|
-
}, [P, B] =
|
|
9524
|
+
}, [P, B] = z({
|
|
9525
9525
|
...d,
|
|
9526
9526
|
...N
|
|
9527
|
-
}), b =
|
|
9527
|
+
}), b = Vt(async () => {
|
|
9528
9528
|
if (d?.order_item_id)
|
|
9529
9529
|
try {
|
|
9530
9530
|
const F = await $a(
|
|
@@ -9638,10 +9638,10 @@ const Bs = ({
|
|
|
9638
9638
|
onClick: async () => {
|
|
9639
9639
|
const F = await Ka(
|
|
9640
9640
|
P,
|
|
9641
|
-
|
|
9641
|
+
Y,
|
|
9642
9642
|
h?.patientRoleID || "",
|
|
9643
9643
|
Be(v).format("YYYY-MM-DD"),
|
|
9644
|
-
|
|
9644
|
+
O,
|
|
9645
9645
|
Dt[1],
|
|
9646
9646
|
I
|
|
9647
9647
|
);
|
|
@@ -9695,12 +9695,12 @@ function Vs() {
|
|
|
9695
9695
|
S.parse = function(I) {
|
|
9696
9696
|
I.utc && (this.$u = !0), this.$utils().u(I.$offset) || (this.$offset = I.$offset), h.call(this, I);
|
|
9697
9697
|
};
|
|
9698
|
-
var
|
|
9698
|
+
var Y = S.init;
|
|
9699
9699
|
S.init = function() {
|
|
9700
9700
|
if (this.$u) {
|
|
9701
9701
|
var I = this.$d;
|
|
9702
9702
|
this.$y = I.getUTCFullYear(), this.$M = I.getUTCMonth(), this.$D = I.getUTCDate(), this.$W = I.getUTCDay(), this.$H = I.getUTCHours(), this.$m = I.getUTCMinutes(), this.$s = I.getUTCSeconds(), this.$ms = I.getUTCMilliseconds();
|
|
9703
|
-
} else
|
|
9703
|
+
} else Y.call(this);
|
|
9704
9704
|
};
|
|
9705
9705
|
var x = S.utcOffset;
|
|
9706
9706
|
S.utcOffset = function(I, N) {
|
|
@@ -9738,11 +9738,11 @@ function Vs() {
|
|
|
9738
9738
|
S.toDate = function(I) {
|
|
9739
9739
|
return I === "s" && this.$offset ? A(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : k.call(this);
|
|
9740
9740
|
};
|
|
9741
|
-
var
|
|
9741
|
+
var O = S.diff;
|
|
9742
9742
|
S.diff = function(I, N, P) {
|
|
9743
|
-
if (I && this.$u === I.$u) return
|
|
9743
|
+
if (I && this.$u === I.$u) return O.call(this, I, N, P);
|
|
9744
9744
|
var B = this.local(), b = A(I).local();
|
|
9745
|
-
return
|
|
9745
|
+
return O.call(B, b, N, P);
|
|
9746
9746
|
};
|
|
9747
9747
|
};
|
|
9748
9748
|
});
|
|
@@ -9761,13 +9761,13 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
9761
9761
|
handleRightSegment: A,
|
|
9762
9762
|
getBillSummarydata: S,
|
|
9763
9763
|
getPastDueAmount: h,
|
|
9764
|
-
refreshBillsList:
|
|
9764
|
+
refreshBillsList: Y,
|
|
9765
9765
|
closePrintModal: x,
|
|
9766
9766
|
setRefreshWallet: L
|
|
9767
|
-
} = s, k =
|
|
9767
|
+
} = s, k = Lt(Mt);
|
|
9768
9768
|
if (!k)
|
|
9769
9769
|
throw new Error("ServiceLevelBillSummary must be used within an AppContext.Provider");
|
|
9770
|
-
const { patientDetails:
|
|
9770
|
+
const { patientDetails: O, patientIDs: I, billPreferences: N, setShowPrintModal: P, currentWindow: B, showPrintModal: b, variable: Q } = k, F = () => {
|
|
9771
9771
|
switch (w) {
|
|
9772
9772
|
case Dt[0]:
|
|
9773
9773
|
return "Consultation Bill";
|
|
@@ -9780,7 +9780,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
9780
9780
|
}
|
|
9781
9781
|
}, M = async (V, te, q) => {
|
|
9782
9782
|
if (b?.visible && x(), !u) return;
|
|
9783
|
-
const ie = await Tn(u.order_id, I?.patientRoleID || "", Q),
|
|
9783
|
+
const ie = await Tn(u.order_id, I?.patientRoleID || "", Q), W = d.map((ke) => ({
|
|
9784
9784
|
serviceName: ke.service_name,
|
|
9785
9785
|
price: +ke.order_unit_item_price,
|
|
9786
9786
|
gst: +ke.order_item_service_tax,
|
|
@@ -9800,20 +9800,20 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
9800
9800
|
balanceAmount: ue,
|
|
9801
9801
|
refundAmount: be
|
|
9802
9802
|
}, Re = [
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9803
|
+
O?.age && typeof O.age == "number" ? `${O.age}y` : O?.org_person_dob ? wr(O.org_person_dob) : "",
|
|
9804
|
+
O?.gender ? dl[O.gender] : "",
|
|
9805
|
+
O?.blood_group
|
|
9806
9806
|
].filter(Boolean).join(", "), Me = {
|
|
9807
|
-
name: `${pr(
|
|
9807
|
+
name: `${pr(O?.name ?? "")}${Re ? ` (${Re})` : ""}`,
|
|
9808
9808
|
billDate: Be(u.order_date).format("DD-MMM-YYYY"),
|
|
9809
|
-
mobileNumber:
|
|
9810
|
-
email:
|
|
9809
|
+
mobileNumber: O?.phone_number ?? "",
|
|
9810
|
+
email: O?.email ?? "",
|
|
9811
9811
|
billNumber: u.order_id_str,
|
|
9812
|
-
patientId:
|
|
9812
|
+
patientId: O?.org_person_bid_str ?? "",
|
|
9813
9813
|
patientIdForEmail: I?.patientRoleID ?? "",
|
|
9814
9814
|
billStatus: ue === 0 ? "PAID" : "UNPAID",
|
|
9815
|
-
address: [
|
|
9816
|
-
referredBy: ie?.lab_owner_name ? pr(ie.lab_owner_name) :
|
|
9815
|
+
address: [O?.address, O?.city, O?.pincode].filter(Boolean).join(", "),
|
|
9816
|
+
referredBy: ie?.lab_owner_name ? pr(ie.lab_owner_name) : O?.ref_doc_name ? pr(O.ref_doc_name) : "--"
|
|
9817
9817
|
};
|
|
9818
9818
|
P({
|
|
9819
9819
|
printDataFrom: "patient_popup",
|
|
@@ -9829,7 +9829,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
9829
9829
|
showPrintPreviewForBill: te,
|
|
9830
9830
|
preferences: { ...N?.print?.bill, ...N?.org_details },
|
|
9831
9831
|
billSummaryDetails: de,
|
|
9832
|
-
billServiceDetails:
|
|
9832
|
+
billServiceDetails: W,
|
|
9833
9833
|
billPatientDetails: Me,
|
|
9834
9834
|
isWholeBill: !1,
|
|
9835
9835
|
payloadDataforEmail: {
|
|
@@ -9928,7 +9928,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
9928
9928
|
serviceItem: w,
|
|
9929
9929
|
getPastDueAmount: h,
|
|
9930
9930
|
date: a,
|
|
9931
|
-
refreshBillsList:
|
|
9931
|
+
refreshBillsList: Y,
|
|
9932
9932
|
setRefreshWallet: L,
|
|
9933
9933
|
walletBalance: n
|
|
9934
9934
|
}
|
|
@@ -10017,7 +10017,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10017
10017
|
}
|
|
10018
10018
|
) })
|
|
10019
10019
|
] }), Ws = ({ closePrintModal: s }) => {
|
|
10020
|
-
if (!
|
|
10020
|
+
if (!Lt(Mt))
|
|
10021
10021
|
throw new Error("AddBills component must be used within an PatientPopupContext.Provider");
|
|
10022
10022
|
const {
|
|
10023
10023
|
patientDetails: u,
|
|
@@ -10030,16 +10030,16 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10030
10030
|
showToast: A,
|
|
10031
10031
|
// currentWindow,
|
|
10032
10032
|
variable: S
|
|
10033
|
-
} =
|
|
10033
|
+
} = Lt(Mt), [h, Y] = z(/* @__PURE__ */ new Date()), [x, L] = z(), [k, O] = z(ht[0]), [I, N] = z([]), [P, B] = z([]), [b, Q] = z(""), [F, M] = z(), [V, te] = z(!1), [q, ie] = z(Ba), [W, ge] = z("-1"), [be, ue] = z({
|
|
10034
10034
|
bill_summary: {},
|
|
10035
10035
|
status: !1,
|
|
10036
10036
|
message: ""
|
|
10037
|
-
}), [Le, ne] =
|
|
10037
|
+
}), [Le, ne] = z(!1), [$, de] = z(0), H = (T) => {
|
|
10038
10038
|
Q(T);
|
|
10039
10039
|
}, Re = async (T) => {
|
|
10040
10040
|
a(!0);
|
|
10041
10041
|
try {
|
|
10042
|
-
await ft(T),
|
|
10042
|
+
await ft(T), Y(T);
|
|
10043
10043
|
} catch (Ie) {
|
|
10044
10044
|
console.error(Ie);
|
|
10045
10045
|
}
|
|
@@ -10056,36 +10056,36 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10056
10056
|
console.error("Error in getBillSummary API Call:", T);
|
|
10057
10057
|
}
|
|
10058
10058
|
}, ke = () => {
|
|
10059
|
-
ie((T) => P.length > +
|
|
10060
|
-
...T.slice(0, +
|
|
10059
|
+
ie((T) => P.length > +W && +W >= 0 ? [
|
|
10060
|
+
...T.slice(0, +W),
|
|
10061
10061
|
{
|
|
10062
|
-
order_id: P[
|
|
10063
|
-
order_date: P[
|
|
10064
|
-
order_created_on: P[
|
|
10065
|
-
service_category: P[
|
|
10066
|
-
service_category_id: P[
|
|
10067
|
-
order_id_str: P[
|
|
10068
|
-
order_total: P[
|
|
10069
|
-
order_paid_amount: P[
|
|
10070
|
-
order_item_sum_discount: P[
|
|
10071
|
-
order_discount: P[
|
|
10072
|
-
refund_amount: P[
|
|
10073
|
-
order_service_tax: P[
|
|
10074
|
-
balance_amount: P[
|
|
10075
|
-
net_bill_amount: P[
|
|
10076
|
-
order_item_id: P[
|
|
10077
|
-
service_id: P[
|
|
10078
|
-
service_name: P[
|
|
10079
|
-
item_quantity: P[
|
|
10080
|
-
order_unit_item_price: P[
|
|
10081
|
-
order_item_price: P[
|
|
10082
|
-
order_item_discount: P[
|
|
10083
|
-
order_item_service_tax: "" + Math.floor(P[
|
|
10084
|
-
order_item_service_tax_percent: P[
|
|
10085
|
-
net_amount: P[
|
|
10086
|
-
created_on: P[
|
|
10062
|
+
order_id: P[W].order_id,
|
|
10063
|
+
order_date: P[W].order_date,
|
|
10064
|
+
order_created_on: P[W].order_created_on,
|
|
10065
|
+
service_category: P[W].service_category,
|
|
10066
|
+
service_category_id: P[W].service_category_id,
|
|
10067
|
+
order_id_str: P[W].order_id_str,
|
|
10068
|
+
order_total: P[W].order_total,
|
|
10069
|
+
order_paid_amount: P[W].order_paid_amount,
|
|
10070
|
+
order_item_sum_discount: P[W].order_item_sum_discount,
|
|
10071
|
+
order_discount: P[W].order_discount,
|
|
10072
|
+
refund_amount: P[W].refund_amount,
|
|
10073
|
+
order_service_tax: P[W].order_service_tax,
|
|
10074
|
+
balance_amount: P[W].balance_amount,
|
|
10075
|
+
net_bill_amount: P[W].net_bill_amount,
|
|
10076
|
+
order_item_id: P[W].order_item_id,
|
|
10077
|
+
service_id: P[W]?.service_id,
|
|
10078
|
+
service_name: P[W].service_name,
|
|
10079
|
+
item_quantity: P[W].item_quantity,
|
|
10080
|
+
order_unit_item_price: P[W].order_unit_item_price,
|
|
10081
|
+
order_item_price: P[W].order_item_price,
|
|
10082
|
+
order_item_discount: P[W].order_item_discount,
|
|
10083
|
+
order_item_service_tax: "" + Math.floor(P[W].order_item_service_tax),
|
|
10084
|
+
order_item_service_tax_percent: P[W].order_item_service_tax_percent,
|
|
10085
|
+
net_amount: P[W].net_amount,
|
|
10086
|
+
created_on: P[W].created_on
|
|
10087
10087
|
},
|
|
10088
|
-
...T.slice(+
|
|
10088
|
+
...T.slice(+W + 1)
|
|
10089
10089
|
] : T);
|
|
10090
10090
|
}, pt = async () => {
|
|
10091
10091
|
try {
|
|
@@ -10153,7 +10153,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10153
10153
|
Ke(() => {
|
|
10154
10154
|
it();
|
|
10155
10155
|
}, [Le]);
|
|
10156
|
-
const Ve =
|
|
10156
|
+
const Ve = Vt(async () => {
|
|
10157
10157
|
try {
|
|
10158
10158
|
const T = await La(
|
|
10159
10159
|
Be(h).format("YYYY-MM-DD"),
|
|
@@ -10170,7 +10170,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10170
10170
|
Ve();
|
|
10171
10171
|
}, [Ve]);
|
|
10172
10172
|
const mt = (T = ht[0]) => {
|
|
10173
|
-
|
|
10173
|
+
O(T);
|
|
10174
10174
|
}, St = (T) => {
|
|
10175
10175
|
switch (T?.original?.service_category.toLowerCase()) {
|
|
10176
10176
|
case Dt[0].toLowerCase():
|
|
@@ -10186,7 +10186,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10186
10186
|
mt(ht[0]);
|
|
10187
10187
|
break;
|
|
10188
10188
|
}
|
|
10189
|
-
}, xt = (T, Ie) => Ie.reduce((Ue, le) => Ue + (parseInt(be.bill_summary[le]?.[T] || "0") || 0), 0), Gt = (T, Ie) => Ie.map((Ue) => be.bill_summary[Ue]?.[T]).filter((Ue) => Ue),
|
|
10189
|
+
}, xt = (T, Ie) => Ie.reduce((Ue, le) => Ue + (parseInt(be.bill_summary[le]?.[T] || "0") || 0), 0), Gt = (T, Ie) => Ie.map((Ue) => be.bill_summary[Ue]?.[T]).filter((Ue) => Ue), kt = async (T, Ie, Ue) => {
|
|
10190
10190
|
if (w?.visible && s(), be?.bill_summary && Object.keys(be?.bill_summary).length > 0) {
|
|
10191
10191
|
const le = await vs(
|
|
10192
10192
|
Gt("order_id", T),
|
|
@@ -10277,7 +10277,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10277
10277
|
{
|
|
10278
10278
|
selectDate: new Date(Be(h).format("DD-MMM-YYYY")),
|
|
10279
10279
|
dateVar: (T) => {
|
|
10280
|
-
|
|
10280
|
+
Y(T), Re(T);
|
|
10281
10281
|
},
|
|
10282
10282
|
maxDate: /* @__PURE__ */ new Date()
|
|
10283
10283
|
}
|
|
@@ -10368,7 +10368,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10368
10368
|
date: h,
|
|
10369
10369
|
rightSegment: k,
|
|
10370
10370
|
handleRightSegment: mt,
|
|
10371
|
-
billSummaryClicked: (T, Ie, Ue) =>
|
|
10371
|
+
billSummaryClicked: (T, Ie, Ue) => kt(T, Ie, Ue),
|
|
10372
10372
|
showDiscount: !1,
|
|
10373
10373
|
showRefund: !1,
|
|
10374
10374
|
handleServiceItem: H,
|
|
@@ -10403,9 +10403,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10403
10403
|
bill_date: h,
|
|
10404
10404
|
handleRightSegment: mt,
|
|
10405
10405
|
getBillSummarydata: Me,
|
|
10406
|
-
editedTableData: q?.[
|
|
10406
|
+
editedTableData: q?.[W],
|
|
10407
10407
|
setTableData: ie,
|
|
10408
|
-
editRowId:
|
|
10408
|
+
editRowId: W,
|
|
10409
10409
|
handleRevertEdit: ke,
|
|
10410
10410
|
refreshBillsList: ft,
|
|
10411
10411
|
checkAppointmentForBilling: pt
|
|
@@ -10417,9 +10417,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10417
10417
|
order_date: h,
|
|
10418
10418
|
handleRightSegment: mt,
|
|
10419
10419
|
getBillSummarydata: Me,
|
|
10420
|
-
editedTableData: q?.[
|
|
10420
|
+
editedTableData: q?.[W],
|
|
10421
10421
|
setTableData: ie,
|
|
10422
|
-
editRowId:
|
|
10422
|
+
editRowId: W,
|
|
10423
10423
|
refreshBillsList: ft,
|
|
10424
10424
|
handleRevertEdit: ke
|
|
10425
10425
|
}
|
|
@@ -10429,10 +10429,10 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10429
10429
|
{
|
|
10430
10430
|
order_date: h,
|
|
10431
10431
|
handleRightSegment: mt,
|
|
10432
|
-
editedTableData: q?.[
|
|
10432
|
+
editedTableData: q?.[W],
|
|
10433
10433
|
getBillSummarydata: Me,
|
|
10434
10434
|
setTableData: ie,
|
|
10435
|
-
editRowId:
|
|
10435
|
+
editRowId: W,
|
|
10436
10436
|
refreshBillsList: ft,
|
|
10437
10437
|
handleRevertEdit: ke
|
|
10438
10438
|
}
|
|
@@ -10449,7 +10449,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10449
10449
|
] })
|
|
10450
10450
|
] });
|
|
10451
10451
|
}, Va = (s) => {
|
|
10452
|
-
const { appointments: u, isDisabled: d, handleAppointData: n, leftNav: v, today: w } = s, a =
|
|
10452
|
+
const { appointments: u, isDisabled: d, handleAppointData: n, leftNav: v, today: w } = s, a = Vt(
|
|
10453
10453
|
(N) => {
|
|
10454
10454
|
n(N);
|
|
10455
10455
|
},
|
|
@@ -10568,10 +10568,10 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10568
10568
|
}
|
|
10569
10569
|
],
|
|
10570
10570
|
[a, d, v]
|
|
10571
|
-
), S = Kt(() => u || [], [u]), { getTableProps: h, getTableBodyProps:
|
|
10571
|
+
), S = Kt(() => u || [], [u]), { getTableProps: h, getTableBodyProps: Y, headerGroups: x, rows: L, prepareRow: k } = ul.useTable({
|
|
10572
10572
|
columns: A,
|
|
10573
10573
|
data: S
|
|
10574
|
-
}),
|
|
10574
|
+
}), O = (N) => {
|
|
10575
10575
|
const P = [];
|
|
10576
10576
|
return N?.headers?.length && N.headers.map((B) => {
|
|
10577
10577
|
P.push(
|
|
@@ -10632,10 +10632,10 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10632
10632
|
{
|
|
10633
10633
|
...N.getHeaderGroupProps(),
|
|
10634
10634
|
className: "hfl-h-9 hfl-rounded-lg hfl-bg-Blue_gray-50 hfl-py-2",
|
|
10635
|
-
children:
|
|
10635
|
+
children: O(N)
|
|
10636
10636
|
}
|
|
10637
10637
|
)) }),
|
|
10638
|
-
/* @__PURE__ */ e.jsx("tbody", { ...
|
|
10638
|
+
/* @__PURE__ */ e.jsx("tbody", { ...Y(), className: "hfl-rounded-lg hfl-border-1 hfl-border-Gray-200", children: I() })
|
|
10639
10639
|
]
|
|
10640
10640
|
}
|
|
10641
10641
|
)
|
|
@@ -10660,11 +10660,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10660
10660
|
v && /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-items-center hfl-justify-center", children: /* @__PURE__ */ e.jsx(yn, { size: "xxs", progress: 10, spinnerMode: !0 }) })
|
|
10661
10661
|
] });
|
|
10662
10662
|
}, zs = (s) => {
|
|
10663
|
-
const { handleAddNewAppnt: u, handleAppointData: d, sortAppointments: n } = s, [v, w] =
|
|
10663
|
+
const { handleAddNewAppnt: u, handleAppointData: d, sortAppointments: n } = s, [v, w] = z(), [a, A] = z(1), [S, h] = z([]), [Y, x] = z([]), [L, k] = z(""), { patientIDs: O, setLoading: I, variable: N } = Lt(Mt), P = async (B) => {
|
|
10664
10664
|
let b = B;
|
|
10665
10665
|
if (I(!0), b <= Math.ceil((v?.total_records || 0) / 10)) {
|
|
10666
10666
|
if (b = B + 1, b !== B) {
|
|
10667
|
-
const Q = await Zl("all",
|
|
10667
|
+
const Q = await Zl("all", O?.patientRoleID || "", b, 10, !1, N);
|
|
10668
10668
|
h((F) => [
|
|
10669
10669
|
...F,
|
|
10670
10670
|
...Q.appointments.filter((M) => M.appnt_date >= Be(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"))
|
|
@@ -10681,7 +10681,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10681
10681
|
I(!0);
|
|
10682
10682
|
const B = async () => {
|
|
10683
10683
|
try {
|
|
10684
|
-
const b = await Zl("all",
|
|
10684
|
+
const b = await Zl("all", O?.patientRoleID || "", 1, 10, !1, N);
|
|
10685
10685
|
b && (w(b), h(
|
|
10686
10686
|
b?.appointments?.filter((Q) => Q.appnt_date >= Be(/* @__PURE__ */ new Date()).format("YYYY-MM-DD"))
|
|
10687
10687
|
), x(
|
|
@@ -10692,7 +10692,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10692
10692
|
}
|
|
10693
10693
|
};
|
|
10694
10694
|
I(!1), B();
|
|
10695
|
-
}, [
|
|
10695
|
+
}, [O?.patientRoleID, I, N]), /* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-flex-col", children: [
|
|
10696
10696
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-max-h-[550px] hfl-w-full hfl-flex-col hfl-overflow-y-scroll", children: [
|
|
10697
10697
|
S.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
10698
10698
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-w-full hfl-items-center hfl-justify-between hfl-px-3 hfl-py-2 ", children: [
|
|
@@ -10719,7 +10719,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10719
10719
|
}
|
|
10720
10720
|
) })
|
|
10721
10721
|
] }),
|
|
10722
|
-
|
|
10722
|
+
Y.length > 0 && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
10723
10723
|
/* @__PURE__ */ e.jsx(
|
|
10724
10724
|
D,
|
|
10725
10725
|
{
|
|
@@ -10738,7 +10738,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10738
10738
|
Va,
|
|
10739
10739
|
{
|
|
10740
10740
|
isDisabled: !0,
|
|
10741
|
-
appointments:
|
|
10741
|
+
appointments: Y,
|
|
10742
10742
|
handleAppointData: d
|
|
10743
10743
|
}
|
|
10744
10744
|
)
|
|
@@ -10746,7 +10746,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10746
10746
|
)
|
|
10747
10747
|
] })
|
|
10748
10748
|
] }),
|
|
10749
|
-
|
|
10749
|
+
Y.length > 0 || S.length > 0 ? /* @__PURE__ */ e.jsx("div", { className: "hfl-px-6 hfl-py-2", children: /* @__PURE__ */ e.jsx(
|
|
10750
10750
|
fl,
|
|
10751
10751
|
{
|
|
10752
10752
|
currentPage: a,
|
|
@@ -10768,11 +10768,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10768
10768
|
docPreference: A,
|
|
10769
10769
|
formattedService: S,
|
|
10770
10770
|
ppEventProps: h,
|
|
10771
|
-
getAndSetServiceListArr:
|
|
10771
|
+
getAndSetServiceListArr: Y,
|
|
10772
10772
|
variable: x
|
|
10773
|
-
} =
|
|
10773
|
+
} = Lt(Mt), [L, k] = z(
|
|
10774
10774
|
x.window_var?.partner_service_enabled === "1" && u?.insurance_details?.policy_id?.length ? !0 : a?.billing?.prepaid_consultation !== "1"
|
|
10775
|
-
), [
|
|
10775
|
+
), [O, I] = z("today"), [N, P] = z(!1), [B, b] = z([]), Q = (/* @__PURE__ */ new Date()).toLocaleString("en-US", {
|
|
10776
10776
|
hour: "numeric",
|
|
10777
10777
|
minute: "numeric",
|
|
10778
10778
|
hour12: !0
|
|
@@ -10824,12 +10824,12 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10824
10824
|
x.window_var.doctor_role_id_for_seg,
|
|
10825
10825
|
x.window_var.role_id
|
|
10826
10826
|
]
|
|
10827
|
-
), [V, te] =
|
|
10827
|
+
), [V, te] = z(M), [q, ie] = z(!1);
|
|
10828
10828
|
Ke(() => {
|
|
10829
10829
|
k(
|
|
10830
10830
|
x.window_var?.partner_service_enabled === "1" && u?.insurance_details?.policy_id ? !0 : a?.billing?.prepaid_consultation !== "1"
|
|
10831
10831
|
);
|
|
10832
|
-
}, [N, a,
|
|
10832
|
+
}, [N, a, O, u, x.window_var?.partner_service_enabled]), Ke(() => {
|
|
10833
10833
|
ie((T) => L && T);
|
|
10834
10834
|
}, [L]), Ke(() => {
|
|
10835
10835
|
if (!+V?.order_item_id && !V?.order_unit_item_price) {
|
|
@@ -10850,7 +10850,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10850
10850
|
V.appnt_service_id,
|
|
10851
10851
|
S
|
|
10852
10852
|
]);
|
|
10853
|
-
const
|
|
10853
|
+
const W = Vt(
|
|
10854
10854
|
(T) => {
|
|
10855
10855
|
const { order_unit_item_price: Ie = 0, item_quantity: Ue = 0, order_item_discount: le = 0, appnt_service_id: J } = T;
|
|
10856
10856
|
if (!J) return;
|
|
@@ -10911,7 +10911,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10911
10911
|
order_item_discount: J,
|
|
10912
10912
|
order_item_service_tax_percentage: Te
|
|
10913
10913
|
};
|
|
10914
|
-
te(Se),
|
|
10914
|
+
te(Se), W(Se);
|
|
10915
10915
|
} else
|
|
10916
10916
|
T === "appnt_date" && Ie > Be().format("YYYY-MM-DD") && (k(!0), L || s("Error", "Cannot add bill for future appointments. Continue without billing?", "Error", 5e3)), te((Ue) => ({ ...Ue, [T]: Ie }));
|
|
10917
10917
|
}, Le = () => {
|
|
@@ -10922,12 +10922,12 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
10922
10922
|
te((Ue) => ({ ...Ue, [Ie]: T }));
|
|
10923
10923
|
};
|
|
10924
10924
|
Ke(() => {
|
|
10925
|
-
|
|
10925
|
+
W(V);
|
|
10926
10926
|
}, [
|
|
10927
10927
|
V.order_unit_item_price,
|
|
10928
10928
|
V.item_quantity,
|
|
10929
10929
|
V.order_item_discount,
|
|
10930
|
-
|
|
10930
|
+
W,
|
|
10931
10931
|
V
|
|
10932
10932
|
]);
|
|
10933
10933
|
const de = (T) => [...T].sort((Ie, Ue) => new Date(Ie.appnt_date).getTime() - new Date(Ue.appnt_date).getTime()), H = Kt(
|
|
@@ -11076,7 +11076,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11076
11076
|
}, St = (T, Ie, Ue) => /* @__PURE__ */ e.jsxs(
|
|
11077
11077
|
"div",
|
|
11078
11078
|
{
|
|
11079
|
-
className: `hfl-flex hfl-w-[60px] hfl-flex-col hfl-items-center hfl-rounded hfl-px-1 hfl-py-2 hfl-text-center ${
|
|
11079
|
+
className: `hfl-flex hfl-w-[60px] hfl-flex-col hfl-items-center hfl-rounded hfl-px-1 hfl-py-2 hfl-text-center ${O === T ? "hfl-bg-Primary-50 hfl-text-Primary-600" : ""} hfl-cursor-pointer`,
|
|
11080
11080
|
onClick: () => I(T),
|
|
11081
11081
|
"data-qa": T,
|
|
11082
11082
|
children: [
|
|
@@ -11085,16 +11085,16 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11085
11085
|
]
|
|
11086
11086
|
},
|
|
11087
11087
|
T
|
|
11088
|
-
), xt =
|
|
11088
|
+
), xt = Vt(() => {
|
|
11089
11089
|
I("today"), te(M), P(!0);
|
|
11090
|
-
}, [M]), Gt =
|
|
11090
|
+
}, [M]), Gt = Vt(async () => {
|
|
11091
11091
|
w(!0);
|
|
11092
11092
|
try {
|
|
11093
11093
|
const T = await Zl(
|
|
11094
|
-
|
|
11094
|
+
O == "today" ? Be().format("YYYY-MM-DD") : "all",
|
|
11095
11095
|
v?.patientRoleID || "",
|
|
11096
11096
|
1,
|
|
11097
|
-
|
|
11097
|
+
O == "today" ? 100 : 10,
|
|
11098
11098
|
!1,
|
|
11099
11099
|
x
|
|
11100
11100
|
);
|
|
@@ -11104,13 +11104,13 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11104
11104
|
} catch {
|
|
11105
11105
|
w(!1), console.log("error in getAppointmentsList API Call");
|
|
11106
11106
|
}
|
|
11107
|
-
}, [xt,
|
|
11107
|
+
}, [xt, O, v?.patientRoleID, w, x]);
|
|
11108
11108
|
Ke(() => {
|
|
11109
11109
|
N || Gt();
|
|
11110
11110
|
}, [N, Gt]), Ke(() => {
|
|
11111
|
-
|
|
11112
|
-
}, [Gt,
|
|
11113
|
-
const
|
|
11111
|
+
O === "today" && Gt();
|
|
11112
|
+
}, [Gt, O]);
|
|
11113
|
+
const kt = async () => {
|
|
11114
11114
|
V.appnt_date > Be().format("YYYY-MM-DD") && (k(!0), L || s("Error", "Cannot add bill for future appointments. Continue without billing?", "Error", 5e3)), await Bn(
|
|
11115
11115
|
V,
|
|
11116
11116
|
L || V.appnt_date > Be().format("YYYY-MM-DD"),
|
|
@@ -11128,7 +11128,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11128
11128
|
St("today", "hx_calendar-add hfl-text-5", "Today's Appts"),
|
|
11129
11129
|
St("all", "hx_calendar hfl-text-5", "All Appts")
|
|
11130
11130
|
] }),
|
|
11131
|
-
|
|
11131
|
+
O === "today" && /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-flex-1 hfl-flex-col hfl-items-center hfl-gap-6 hfl-overflow-y-auto", children: B.length <= 0 || N ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
11132
11132
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-items-center hfl-gap-2 hfl-self-stretch hfl-bg-Gray-100 hfl-p-2", children: [
|
|
11133
11133
|
/* @__PURE__ */ e.jsx(D, { variant: "Semibold", type: "Text lg", className: "hfl-flex-1", children: V.appnt_id.length ? "Update Appointment" : "New Appointment" }),
|
|
11134
11134
|
/* @__PURE__ */ e.jsx(
|
|
@@ -11255,7 +11255,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11255
11255
|
suffixInputProps: {
|
|
11256
11256
|
placeholder: "Service Name",
|
|
11257
11257
|
onClick: async () => {
|
|
11258
|
-
n?.service_list?.length ||
|
|
11258
|
+
n?.service_list?.length || Y();
|
|
11259
11259
|
}
|
|
11260
11260
|
},
|
|
11261
11261
|
className: "hfl-hidden hfl-w-12 hfl-text-ellipsis hfl-bg-Gray-50 hfl-text-Gray-500 ",
|
|
@@ -11403,7 +11403,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11403
11403
|
size: "md",
|
|
11404
11404
|
textField: V.appnt_id.length ? "Update Appointment" : "Book Appointment",
|
|
11405
11405
|
icon: "No",
|
|
11406
|
-
onClick:
|
|
11406
|
+
onClick: kt,
|
|
11407
11407
|
className: "hfl-w-[150px] hfl-items-center hfl-justify-center hfl-bg-Primary-600 hfl-text-White_20 hover:hfl-bg-Primary-800",
|
|
11408
11408
|
"data-qa": "book-appointment"
|
|
11409
11409
|
}
|
|
@@ -11431,13 +11431,13 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11431
11431
|
Va,
|
|
11432
11432
|
{
|
|
11433
11433
|
today: !0,
|
|
11434
|
-
leftNav:
|
|
11434
|
+
leftNav: O,
|
|
11435
11435
|
appointments: de(B),
|
|
11436
11436
|
handleAppointData: be
|
|
11437
11437
|
}
|
|
11438
11438
|
) })
|
|
11439
11439
|
] }) }),
|
|
11440
|
-
|
|
11440
|
+
O === "all" && /* @__PURE__ */ e.jsx(
|
|
11441
11441
|
zs,
|
|
11442
11442
|
{
|
|
11443
11443
|
sortAppointments: de,
|
|
@@ -11451,9 +11451,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11451
11451
|
columns: s,
|
|
11452
11452
|
data: u
|
|
11453
11453
|
}), A = (h) => {
|
|
11454
|
-
const
|
|
11454
|
+
const Y = [];
|
|
11455
11455
|
return h?.headers?.length && h.headers.map((x) => {
|
|
11456
|
-
|
|
11456
|
+
Y.push(
|
|
11457
11457
|
/* @__PURE__ */ e.jsx(
|
|
11458
11458
|
"th",
|
|
11459
11459
|
{
|
|
@@ -11463,18 +11463,18 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11463
11463
|
}
|
|
11464
11464
|
)
|
|
11465
11465
|
);
|
|
11466
|
-
}),
|
|
11466
|
+
}), Y;
|
|
11467
11467
|
}, S = () => {
|
|
11468
11468
|
const h = [];
|
|
11469
|
-
return w.map((
|
|
11470
|
-
a(
|
|
11469
|
+
return w.map((Y, x) => {
|
|
11470
|
+
a(Y), h.push(
|
|
11471
11471
|
/* @__PURE__ */ e.jsx(
|
|
11472
11472
|
"tr",
|
|
11473
11473
|
{
|
|
11474
11474
|
id: x.toString(),
|
|
11475
|
-
...
|
|
11476
|
-
className: `${
|
|
11477
|
-
children:
|
|
11475
|
+
...Y.getRowProps(),
|
|
11476
|
+
className: `${Y.original.appnt_status === 1 ? "hfl-bg-Gray-50 hfl-text-Gray-400 hover:hfl-bg-White hover:hfl-text-Gray-500" : "hfl-bg-White"} hfl-group hfl-border-t-1 hfl-border-Gray-200`,
|
|
11477
|
+
children: Y.cells.map((L, k) => /* @__PURE__ */ e.jsx(
|
|
11478
11478
|
"td",
|
|
11479
11479
|
{
|
|
11480
11480
|
"data-qa": x + 1 + "-" + (k + 1),
|
|
@@ -11485,7 +11485,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11485
11485
|
{
|
|
11486
11486
|
variant: "Regular",
|
|
11487
11487
|
type: "Text sm",
|
|
11488
|
-
className: `hfl-text-[13px] ${
|
|
11488
|
+
className: `hfl-text-[13px] ${Y.original.appnt_status === 1 ? "hfl-text-Gray-300 group-hover:hfl-text-Gray-500" : "hfl-text-Gray-500"}`,
|
|
11489
11489
|
children: L.render("Cell")
|
|
11490
11490
|
}
|
|
11491
11491
|
)
|
|
@@ -11530,8 +11530,8 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11530
11530
|
// patientDetails,
|
|
11531
11531
|
// ppEventProps,
|
|
11532
11532
|
preferences: h,
|
|
11533
|
-
variable:
|
|
11534
|
-
} =
|
|
11533
|
+
variable: Y
|
|
11534
|
+
} = Lt(Mt), [x, L] = Wa(
|
|
11535
11535
|
(q, ie) => ({
|
|
11536
11536
|
...q,
|
|
11537
11537
|
...ie
|
|
@@ -11542,7 +11542,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11542
11542
|
pastVisits: [],
|
|
11543
11543
|
isVisitLoading: !1
|
|
11544
11544
|
}
|
|
11545
|
-
), { pastVisits: k, currentPage:
|
|
11545
|
+
), { pastVisits: k, currentPage: O, isVisitLoading: I, totalRecord: N } = x, P = Vt(
|
|
11546
11546
|
async (q) => {
|
|
11547
11547
|
if (a?.patientRoleID)
|
|
11548
11548
|
try {
|
|
@@ -11551,11 +11551,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11551
11551
|
Gi,
|
|
11552
11552
|
q,
|
|
11553
11553
|
a.patientRoleID,
|
|
11554
|
-
|
|
11555
|
-
),
|
|
11554
|
+
Y
|
|
11555
|
+
), W = ie?.visits ?? [];
|
|
11556
11556
|
L({
|
|
11557
11557
|
currentPage: q,
|
|
11558
|
-
pastVisits: q === 1 ?
|
|
11558
|
+
pastVisits: q === 1 ? W : [...k, ...W],
|
|
11559
11559
|
isVisitLoading: !1,
|
|
11560
11560
|
totalRecord: +ie.total_visit_count
|
|
11561
11561
|
});
|
|
@@ -11563,92 +11563,69 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11563
11563
|
console.error("Failed to fetch visits:", ie), L({ isVisitLoading: !1 });
|
|
11564
11564
|
}
|
|
11565
11565
|
},
|
|
11566
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11567
11566
|
[a?.patientRoleID]
|
|
11568
|
-
), B =
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
q.original.visit_date,
|
|
11575
|
-
a.patientRoleID,
|
|
11576
|
-
q.original.visit_id,
|
|
11577
|
-
O
|
|
11578
|
-
))?.visits?.[0];
|
|
11579
|
-
if (!be)
|
|
11580
|
-
throw new Error("Visit details not found.");
|
|
11581
|
-
let ue = null;
|
|
11582
|
-
const { doctor_id: Le = "", doctor_role_id: ne = "" } = be;
|
|
11583
|
-
O.window_var.doctor_role_id_for_seg !== ne ? ue = await v({
|
|
11584
|
-
doc_id: Le,
|
|
11585
|
-
doc_rid: ne
|
|
11586
|
-
}) : h && await w(h, h.printDefaultPrefIndex, ne, !1), u(be.latest_visit_metadata || {}), A({
|
|
11587
|
-
printDataFrom: "patient_popup",
|
|
11588
|
-
visible: !0,
|
|
11589
|
-
whichPreview: "offlinePrint",
|
|
11590
|
-
printData: "",
|
|
11591
|
-
visitId: be.visit_id,
|
|
11592
|
-
visit_date: be.visit_date,
|
|
11593
|
-
visit_number: N - q.index,
|
|
11594
|
-
currentPrintTime: 0,
|
|
11595
|
-
printType: "visit",
|
|
11596
|
-
details: be,
|
|
11597
|
-
visitpadPref: ue,
|
|
11598
|
-
appointmentInfo: {
|
|
11599
|
-
appnt_id: q.original.appnt_id || "",
|
|
11600
|
-
appnt_type: q.original.appnt_type || ""
|
|
11601
|
-
},
|
|
11602
|
-
trackEventHandler: () => {
|
|
11603
|
-
}
|
|
11604
|
-
// Provide a default no-op function
|
|
11605
|
-
}), S(z);
|
|
11606
|
-
} catch (ge) {
|
|
11607
|
-
console.error("Failed to prepare print data:", ge);
|
|
11608
|
-
} finally {
|
|
11609
|
-
L({ isVisitLoading: !1 });
|
|
11610
|
-
}
|
|
11611
|
-
}
|
|
11612
|
-
},
|
|
11613
|
-
[
|
|
11614
|
-
s,
|
|
11615
|
-
v,
|
|
11616
|
-
O,
|
|
11567
|
+
), B = async (q, ie, W = !0, ge) => {
|
|
11568
|
+
s(), L({
|
|
11569
|
+
isVisitLoading: !0
|
|
11570
|
+
});
|
|
11571
|
+
const be = await $i(
|
|
11572
|
+
q.original.visit_date,
|
|
11617
11573
|
a.patientRoleID,
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11624
|
-
|
|
11625
|
-
|
|
11574
|
+
q.original.visit_id,
|
|
11575
|
+
Y
|
|
11576
|
+
);
|
|
11577
|
+
L({
|
|
11578
|
+
isVisitLoading: !1
|
|
11579
|
+
});
|
|
11580
|
+
let ue = null;
|
|
11581
|
+
const { doctor_id: Le = "", doctor_role_id: ne = "" } = be?.visits?.[0] ?? {};
|
|
11582
|
+
window.doctor_role_id_for_seg != ne ? ue = await v({
|
|
11583
|
+
doc_id: Le,
|
|
11584
|
+
doc_rid: ne
|
|
11585
|
+
}) : await w(h, h.printDefaultPrefIndex, ne, !1), be && (u(be?.latest_visit_metadata), be?.visits[0] && (A({
|
|
11586
|
+
printDataFrom: "patient_popup",
|
|
11587
|
+
visible: !0,
|
|
11588
|
+
whichPreview: "offlinePrint",
|
|
11589
|
+
printData: "",
|
|
11590
|
+
visitId: be?.visits[0]?.visit_id,
|
|
11591
|
+
visit_date: be?.visits[0]?.visit_date,
|
|
11592
|
+
visit_number: ge,
|
|
11593
|
+
currentPrintTime: 0,
|
|
11594
|
+
printType: "visit",
|
|
11595
|
+
details: be?.visits[0],
|
|
11596
|
+
visitpadPref: ue,
|
|
11597
|
+
appointmentInfo: {
|
|
11598
|
+
appnt_id: k?.[q?.index]?.appnt_id || "",
|
|
11599
|
+
appnt_type: k?.[q?.index]?.appnt_type || ""
|
|
11600
|
+
}
|
|
11601
|
+
}), S(W)));
|
|
11602
|
+
}, b = Vt(async () => {
|
|
11626
11603
|
try {
|
|
11627
|
-
const q = await ds(
|
|
11628
|
-
q.transalation_records.forEach((
|
|
11629
|
-
ie[
|
|
11604
|
+
const q = await ds(Y), ie = {};
|
|
11605
|
+
q.transalation_records.forEach((W) => {
|
|
11606
|
+
ie[W.language] = W;
|
|
11630
11607
|
}), n(ie);
|
|
11631
11608
|
} catch (q) {
|
|
11632
11609
|
console.error("Failed to get custom translations:", q);
|
|
11633
11610
|
}
|
|
11634
|
-
}, [n,
|
|
11611
|
+
}, [n, Y]), Q = Vt(async () => {
|
|
11635
11612
|
try {
|
|
11636
|
-
const q = await fs(
|
|
11613
|
+
const q = await fs(Y);
|
|
11637
11614
|
if (q?.test_ranges) {
|
|
11638
|
-
const ie = q.test_ranges.map((
|
|
11639
|
-
test_id:
|
|
11640
|
-
test_names:
|
|
11641
|
-
test_range_rule:
|
|
11642
|
-
test_range_text:
|
|
11643
|
-
test_units:
|
|
11644
|
-
value:
|
|
11615
|
+
const ie = q.test_ranges.map((W) => ({
|
|
11616
|
+
test_id: W.test_id,
|
|
11617
|
+
test_names: W.test_names,
|
|
11618
|
+
test_range_rule: W.test_range_rule,
|
|
11619
|
+
test_range_text: W.test_range_text,
|
|
11620
|
+
test_units: W.test_units,
|
|
11621
|
+
value: W.test_names
|
|
11645
11622
|
}));
|
|
11646
11623
|
d(ie);
|
|
11647
11624
|
}
|
|
11648
11625
|
} catch (q) {
|
|
11649
11626
|
console.error("Failed to get investigation test names:", q);
|
|
11650
11627
|
}
|
|
11651
|
-
}, [d,
|
|
11628
|
+
}, [d, Y]);
|
|
11652
11629
|
Ke(() => {
|
|
11653
11630
|
P(1), b(), Q();
|
|
11654
11631
|
}, [b, Q]);
|
|
@@ -11724,7 +11701,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11724
11701
|
textField: "Print",
|
|
11725
11702
|
iconFile: "hx_print",
|
|
11726
11703
|
icon: "Left",
|
|
11727
|
-
onClick: () =>
|
|
11704
|
+
onClick: () => {
|
|
11705
|
+
B(q, "VISIT_PRINT", !1, N - q.index);
|
|
11706
|
+
},
|
|
11728
11707
|
className: "hfl-w-[74px]",
|
|
11729
11708
|
"data-qa": "to-print"
|
|
11730
11709
|
}
|
|
@@ -11737,7 +11716,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11737
11716
|
textField: "Share",
|
|
11738
11717
|
iconFile: "hx_share",
|
|
11739
11718
|
icon: "Left",
|
|
11740
|
-
onClick: () =>
|
|
11719
|
+
onClick: () => {
|
|
11720
|
+
B(q, "VISIT_SHARE", !0, N - q.index);
|
|
11721
|
+
},
|
|
11741
11722
|
className: "hfl-w-[74px]",
|
|
11742
11723
|
"data-qa": "to-share"
|
|
11743
11724
|
}
|
|
@@ -11749,11 +11730,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11749
11730
|
), V = Kt(() => k, [k]), te = async () => {
|
|
11750
11731
|
if (!a?.patientRoleID) return;
|
|
11751
11732
|
let q = "../ipdv2/viewPatientsCase";
|
|
11752
|
-
if (
|
|
11733
|
+
if (Y.window_var?.enable_ipd_v2 !== "1") {
|
|
11753
11734
|
q = "../ipd/viewPatientsCase.php";
|
|
11754
11735
|
try {
|
|
11755
|
-
const ie = await Ji(
|
|
11756
|
-
q =
|
|
11736
|
+
const ie = await Ji(Y, a.patientRoleID), { status: W = 0, case_id: ge = 0 } = ie, be = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
11737
|
+
q = W && ge ? `../ipd/viewPatientRecords.php?pid=${a.patientRoleID}&case_id=${ge}` : `../ipd/viewAddPatientsCase.php?pid=${a.patientRoleID}&date=${be}`;
|
|
11757
11738
|
} catch (ie) {
|
|
11758
11739
|
console.error("Failed to get IPD Case by PID:", ie);
|
|
11759
11740
|
}
|
|
@@ -11763,7 +11744,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11763
11744
|
return /* @__PURE__ */ e.jsxs("div", { className: "hfl-mx-[12%] hfl-h-[69vh] hfl-overflow-auto hfl-py-[20px]", children: [
|
|
11764
11745
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-items-center hfl-justify-between hfl-pb-2", children: [
|
|
11765
11746
|
/* @__PURE__ */ e.jsx(D, { variant: "Semibold", type: "Text md", className: "hfl-text-Gray-600", children: "Past Visits" }),
|
|
11766
|
-
|
|
11747
|
+
Y.window_var.ipd_module === "1" && /* @__PURE__ */ e.jsx(
|
|
11767
11748
|
Fe,
|
|
11768
11749
|
{
|
|
11769
11750
|
hierarchy: "Primary",
|
|
@@ -11782,9 +11763,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11782
11763
|
/* @__PURE__ */ e.jsx(
|
|
11783
11764
|
fl,
|
|
11784
11765
|
{
|
|
11785
|
-
currentPage:
|
|
11766
|
+
currentPage: O,
|
|
11786
11767
|
totalRecord: N,
|
|
11787
|
-
handleLoadMore: () => P(
|
|
11768
|
+
handleLoadMore: () => P(O + 1),
|
|
11788
11769
|
isLoading: I,
|
|
11789
11770
|
currentTotal: V.length
|
|
11790
11771
|
}
|
|
@@ -11933,16 +11914,16 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11933
11914
|
patientIDs: A,
|
|
11934
11915
|
patientDetails: S,
|
|
11935
11916
|
billPreferences: h,
|
|
11936
|
-
setShowPrintModal:
|
|
11917
|
+
setShowPrintModal: Y,
|
|
11937
11918
|
showPrintModal: x,
|
|
11938
11919
|
// setLoading,
|
|
11939
11920
|
// ppEventProps,
|
|
11940
11921
|
// currentWindow,
|
|
11941
11922
|
variable: L
|
|
11942
|
-
} =
|
|
11923
|
+
} = Lt(Mt) || {}, k = ({ label: b, className: Q }) => /* @__PURE__ */ e.jsx("th", { className: Q, children: /* @__PURE__ */ e.jsxs(D, { variant: "Semibold", type: "Text sm", className: "hfl-text-Gray-600", children: [
|
|
11943
11924
|
" ",
|
|
11944
11925
|
b
|
|
11945
|
-
] }) }),
|
|
11926
|
+
] }) }), O = (b) => {
|
|
11946
11927
|
switch (b) {
|
|
11947
11928
|
case Dt[0]:
|
|
11948
11929
|
return "hx_service-appointment-filled hfl-text-Primary-500";
|
|
@@ -11983,7 +11964,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
11983
11964
|
dl[S?.gender] ?? "",
|
|
11984
11965
|
S?.blood_group
|
|
11985
11966
|
].filter((ie) => ie).join(", ");
|
|
11986
|
-
|
|
11967
|
+
Y({
|
|
11987
11968
|
printDataFrom: "patient_popup",
|
|
11988
11969
|
visible: !0,
|
|
11989
11970
|
whichPreview: Q,
|
|
@@ -12102,7 +12083,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12102
12083
|
) }),
|
|
12103
12084
|
/* @__PURE__ */ e.jsx("td", { rowSpan: b.order_items.length, className: `${P.td} hfl-w-[70px]`, children: /* @__PURE__ */ e.jsx(D, { variant: "Regular", type: "Text sm", children: b.order_id_str }) }),
|
|
12104
12085
|
/* @__PURE__ */ e.jsx("td", { rowSpan: b.order_items.length, className: `${P.td} hfl-w-[70px]`, children: /* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-items-center", children: [
|
|
12105
|
-
/* @__PURE__ */ e.jsx("i", { className: ` hfl-flex ${
|
|
12086
|
+
/* @__PURE__ */ e.jsx("i", { className: ` hfl-flex ${O(b.service_category)}` }),
|
|
12106
12087
|
/* @__PURE__ */ e.jsxs(D, { variant: "Regular", type: "Text sm", className: "hfl-truncate", children: [
|
|
12107
12088
|
" ",
|
|
12108
12089
|
I(b.service_category)
|
|
@@ -12182,7 +12163,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12182
12163
|
orderItemsIndex: w,
|
|
12183
12164
|
// handleDeleteItem,
|
|
12184
12165
|
getBillsList: a
|
|
12185
|
-
} = s, { patientIDs: A, showToast: S, variable: h } =
|
|
12166
|
+
} = s, { patientIDs: A, showToast: S, variable: h } = Lt(Mt) || {}, [Y, x] = z("");
|
|
12186
12167
|
return /* @__PURE__ */ e.jsxs("div", { className: "hfl-relative hfl-h-full hfl-bg-Error-25", children: [
|
|
12187
12168
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-h-8 hfl-shrink-0 hfl-items-center hfl-justify-between hfl-gap-2 hfl-border-b-1 hfl-border-b-Gray-200 hfl-px-2", children: [
|
|
12188
12169
|
/* @__PURE__ */ e.jsxs(D, { variant: "Medium", type: "Text lg", className: "hfl-flex", children: [
|
|
@@ -12215,7 +12196,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12215
12196
|
className: "hfl-w-[100%]",
|
|
12216
12197
|
rows: 4,
|
|
12217
12198
|
inputProps: {
|
|
12218
|
-
value:
|
|
12199
|
+
value: Y,
|
|
12219
12200
|
placeholder: "Enter Reason",
|
|
12220
12201
|
onChange: (L) => {
|
|
12221
12202
|
x(L.target.value);
|
|
@@ -12254,7 +12235,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12254
12235
|
n?.bill_list?.[v].order_id,
|
|
12255
12236
|
n?.bill_list?.[v].order_items[w].order_item_id,
|
|
12256
12237
|
A?.patientRoleID || "",
|
|
12257
|
-
|
|
12238
|
+
Y,
|
|
12258
12239
|
"0",
|
|
12259
12240
|
// mode
|
|
12260
12241
|
h
|
|
@@ -12285,22 +12266,22 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12285
12266
|
) })
|
|
12286
12267
|
] });
|
|
12287
12268
|
}, Js = "data:image/svg+xml,%3csvg%20width='87'%20height='86'%20viewBox='0%200%2087%2086'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cellipse%20opacity='0.1'%20cx='43.5'%20cy='83.42'%20rx='43.5'%20ry='2.58'%20fill='%234E5BA6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M33.6751%2018.92C34.2431%2016.9347%2036.0897%2015.48%2038.2799%2015.48H55.9277C54.4566%2016.3563%2053.188%2017.5313%2052.2081%2018.92H33.6751ZM51.1971%2020.64H25.6649C22.782%2020.64%2020.445%2022.9502%2020.445%2025.8V57.62H47.4149H47.8499C48.3304%2057.62%2048.7199%2058.005%2048.7199%2058.48V62.995C48.7199%2066.676%2051.7387%2069.66%2055.4624%2069.66C59.1862%2069.66%2062.2049%2066.676%2062.2049%2062.995V37.84C55.4781%2037.84%2050.0249%2032.4495%2050.0249%2025.8C50.0249%2023.9534%2050.4455%2022.2039%2051.1971%2020.64ZM63.9449%2037.7181V61.8486C66.4138%2061.4392%2068.2949%2059.3168%2068.2949%2056.76V36.2293C66.9805%2036.9809%2065.5108%2037.4967%2063.9449%2037.7181ZM70.0349%2035.0228V56.76C70.0349%2060.2756%2067.3674%2063.1753%2063.924%2063.5893C63.6156%2067.9429%2059.9451%2071.38%2055.4624%2071.38C55.3865%2071.38%2055.3108%2071.379%2055.2354%2071.377L55.2449%2071.38H23.925C19.1201%2071.38%2015.225%2067.5296%2015.225%2062.78V61.06C15.225%2059.1601%2016.783%2057.62%2018.705%2057.62V25.8C18.705%2022.0003%2021.821%2018.92%2025.6649%2018.92H31.8855C32.49%2015.9759%2035.1232%2013.76%2038.2799%2013.76H61.3349V13.7902C61.6223%2013.7702%2061.9124%2013.76%2062.2049%2013.76C68.9318%2013.76%2074.3849%2019.1505%2074.3849%2025.8C74.3849%2029.5023%2072.6945%2032.8142%2070.0349%2035.0228ZM10.44%2066.005C10.44%2065.6488%2010.7321%2065.36%2011.0925%2065.36C11.4528%2065.36%2011.745%2065.6488%2011.745%2066.005V66.22C11.745%2070.9696%2015.6401%2074.82%2020.445%2074.82H22.4459C22.7823%2074.82%2023.055%2075.0895%2023.055%2075.422C23.055%2075.7545%2022.7823%2076.024%2022.4459%2076.024H20.445C14.6698%2076.024%2010.44%2071.9104%2010.44%2066.22V66.005ZM11.0925%2063.64C9.77111%2063.64%208.69995%2064.6988%208.69995%2066.005V66.22C8.69995%2072.8786%2013.7274%2077.744%2020.445%2077.744H22.4459C23.7433%2077.744%2024.795%2076.7044%2024.795%2075.422C24.795%2074.1396%2023.7433%2073.1%2022.4459%2073.1H20.445C16.601%2073.1%2013.485%2070.0197%2013.485%2066.22V66.005C13.485%2064.6988%2012.4138%2063.64%2011.0925%2063.64ZM24.795%2043.43C24.795%2042.2426%2025.7687%2041.28%2026.9699%2041.28H40.0199C41.2212%2041.28%2042.195%2042.2426%2042.195%2043.43C42.195%2044.6174%2041.2212%2045.58%2040.0199%2045.58H26.9699C25.7687%2045.58%2024.795%2044.6174%2024.795%2043.43ZM26.9699%2043C26.7297%2043%2026.535%2043.1925%2026.535%2043.43C26.535%2043.6675%2026.7297%2043.86%2026.9699%2043.86H40.0199C40.2602%2043.86%2040.4549%2043.6675%2040.4549%2043.43C40.4549%2043.1925%2040.2602%2043%2040.0199%2043H26.9699ZM32.15%2037.9752C32.2163%2038.0407%2032.3208%2038.0735%2032.4635%2038.0735C32.5859%2038.0735%2032.6751%2038.0407%2032.7312%2037.9752C32.7923%2037.9097%2032.8229%2037.8064%2032.8229%2037.6653V37.0531C33.297%2037.0027%2033.7277%2036.8691%2034.1152%2036.6525C34.5026%2036.4307%2034.8135%2036.1082%2035.048%2035.685C35.2876%2035.2566%2035.4074%2034.7275%2035.4074%2034.0977C35.4074%2033.5534%2035.2825%2033.105%2035.0327%2032.7522C34.783%2032.3944%2034.4924%2032.1198%2034.161%2031.9283C33.8297%2031.7368%2033.3837%2031.5202%2032.8229%2031.2783V29.2375C33.0778%2029.2476%2033.2919%2029.2753%2033.4652%2029.3206C33.6436%2029.366%2033.8246%2029.4239%2034.0081%2029.4945C34.1356%2029.5449%2034.2197%2029.5701%2034.2604%2029.5701C34.3624%2029.5701%2034.4695%2029.4995%2034.5816%2029.3584C34.6988%2029.2173%2034.7983%2029.0535%2034.8798%2028.8671C34.9614%2028.6756%2035.0022%2028.5194%2035.0022%2028.3985C35.0022%2028.2624%2034.9079%2028.1264%2034.7192%2027.9903C34.5357%2027.8543%2034.2757%2027.7384%2033.9393%2027.6426C33.6079%2027.5469%2033.2358%2027.4914%2032.8229%2027.4763V27.0606C32.8229%2026.9145%2032.7923%2026.8112%2032.7312%2026.7507C32.67%2026.6902%2032.5655%2026.66%2032.4176%2026.66C32.2953%2026.66%2032.2035%2026.6927%2032.1424%2026.7583C32.0812%2026.8187%2032.0506%2026.9195%2032.0506%2027.0606V27.4839C31.5561%2027.5393%2031.1024%2027.6728%2030.6895%2027.8845C30.2817%2028.0961%2029.9529%2028.3985%2029.7031%2028.7915C29.4585%2029.1795%2029.3361%2029.6557%2029.3361%2030.2201C29.3361%2030.8147%2029.4661%2031.2985%2029.7261%2031.6713C29.9912%2032.0392%2030.2996%2032.3189%2030.6513%2032.5103C31.0081%2032.6968%2031.4746%2032.8958%2032.0506%2033.1075V35.3221C31.7346%2035.3221%2031.444%2035.2793%2031.1789%2035.1936C30.9189%2035.108%2030.6513%2034.9971%2030.376%2034.8611C30.1823%2034.7603%2030.0549%2034.7099%2029.9937%2034.7099C29.902%2034.7099%2029.7873%2034.7804%2029.6496%2034.9215C29.512%2035.0576%2029.3922%2035.2214%2029.2902%2035.4128C29.1934%2035.6043%2029.1449%2035.7656%2029.1449%2035.8966C29.1449%2036.0528%2029.2596%2036.2191%2029.489%2036.3955C29.7235%2036.5718%2030.06%2036.7255%2030.4984%2036.8565C30.9419%2036.9825%2031.4593%2037.0556%2032.0506%2037.0757V37.6653C32.0506%2037.8064%2032.0837%2037.9097%2032.15%2037.9752ZM31.5001%2029.6154C31.602%2029.4793%2031.7855%2029.3786%2032.0506%2029.3131V30.9306C31.8212%2030.7996%2031.6453%2030.6635%2031.523%2030.5224C31.4058%2030.3813%2031.3471%2030.2151%2031.3471%2030.0236C31.3471%2029.8825%2031.3981%2029.7464%2031.5001%2029.6154ZM33.2511%2034.8611C33.1441%2034.9971%2033.0013%2035.1004%2032.8229%2035.171V33.4703C33.2154%2033.692%2033.4117%2033.9843%2033.4117%2034.3471C33.4117%2034.5537%2033.3582%2034.725%2033.2511%2034.8611ZM24.795%2050.31C24.795%2049.1226%2025.7687%2048.16%2026.9699%2048.16H53.07C54.2712%2048.16%2055.2449%2049.1226%2055.2449%2050.31C55.2449%2051.4974%2054.2712%2052.46%2053.07%2052.46H26.9699C25.7687%2052.46%2024.795%2051.4974%2024.795%2050.31ZM26.9699%2049.88C26.7297%2049.88%2026.535%2050.0725%2026.535%2050.31C26.535%2050.5475%2026.7297%2050.74%2026.9699%2050.74H53.07C53.3102%2050.74%2053.5049%2050.5475%2053.5049%2050.31C53.5049%2050.0725%2053.3102%2049.88%2053.07%2049.88H26.9699ZM51.7649%2025.8C51.7649%2020.1004%2056.4391%2015.48%2062.2049%2015.48C67.9708%2015.48%2072.6449%2020.1004%2072.6449%2025.8C72.6449%2031.4996%2067.9708%2036.12%2062.2049%2036.12C56.4391%2036.12%2051.7649%2031.4996%2051.7649%2025.8ZM60.0299%2020.21C60.0299%2019.0226%2061.0037%2018.06%2062.2049%2018.06C63.4062%2018.06%2064.3799%2019.0226%2064.3799%2020.21V25.37C64.3799%2026.5574%2063.4062%2027.52%2062.2049%2027.52C61.0037%2027.52%2060.0299%2026.5574%2060.0299%2025.37V20.21ZM62.2049%2019.78C61.9647%2019.78%2061.7699%2019.9725%2061.7699%2020.21V25.37C61.7699%2025.6075%2061.9647%2025.8%2062.2049%2025.8C62.4452%2025.8%2062.6399%2025.6075%2062.6399%2025.37V20.21C62.6399%2019.9725%2062.4452%2019.78%2062.2049%2019.78ZM62.2049%2033.54C61.0037%2033.54%2060.0299%2032.5774%2060.0299%2031.39C60.0299%2030.2026%2061.0037%2029.24%2062.2049%2029.24C63.4062%2029.24%2064.3799%2030.2026%2064.3799%2031.39C64.3799%2032.5774%2063.4062%2033.54%2062.2049%2033.54ZM61.7699%2031.39C61.7699%2031.6275%2061.9647%2031.82%2062.2049%2031.82C62.4452%2031.82%2062.6399%2031.6275%2062.6399%2031.39C62.6399%2031.1525%2062.4452%2030.96%2062.2049%2030.96C61.9647%2030.96%2061.7699%2031.1525%2061.7699%2031.39Z'%20fill='%23AFB5D9'/%3e%3c/svg%3e", Qs = (s) => {
|
|
12288
|
-
const { closePrintModal: u, handleCurrentWindow: d, billIdToOpen: n, onBillHandled: v } = s, [w, a] =
|
|
12269
|
+
const { closePrintModal: u, handleCurrentWindow: d, billIdToOpen: n, onBillHandled: v } = s, [w, a] = z(), [A, S] = z(""), [h, Y] = z(""), [x, L] = z(), [k, O] = z(), [I, N] = z(1), [P, B] = z([]), [b, Q] = z(-1), [F, M] = z(-1), [V, te] = z(0), [q, ie] = z(0), [W, ge] = z(!1), be = Lt(Mt);
|
|
12289
12270
|
if (!be)
|
|
12290
12271
|
throw new Error("Bills component must be used within an AppContext.Provider");
|
|
12291
|
-
const { patientIDs: ue, setLoading: Le, variable: ne } = be, $ = (Ve) => te(Ve), de = (Ve = ht[0]) => S(Ve), H = (Ve) =>
|
|
12272
|
+
const { patientIDs: ue, setLoading: Le, variable: ne } = be, $ = (Ve) => te(Ve), de = (Ve = ht[0]) => S(Ve), H = (Ve) => Y(Ve), Re = (Ve) => {
|
|
12292
12273
|
L(Ve), H(Ve?.service_category ?? ""), S(ht[1]);
|
|
12293
12274
|
}, Me = (Ve, mt) => {
|
|
12294
12275
|
Q(Ve), M(mt);
|
|
12295
|
-
}, ke =
|
|
12276
|
+
}, ke = Vt(async () => {
|
|
12296
12277
|
if (ue?.patientRoleID)
|
|
12297
12278
|
try {
|
|
12298
12279
|
const Ve = await La(Be().format("YYYY-MM-DD"), ue.patientRoleID, !1, ne);
|
|
12299
|
-
|
|
12280
|
+
O(Ve);
|
|
12300
12281
|
} catch (Ve) {
|
|
12301
12282
|
console.error("Error in getPastDueAmount API Call:", Ve);
|
|
12302
12283
|
}
|
|
12303
|
-
}, [ue.patientRoleID, ne]), pt =
|
|
12284
|
+
}, [ue.patientRoleID, ne]), pt = Vt(async () => {
|
|
12304
12285
|
if (ue?.patientRoleID)
|
|
12305
12286
|
try {
|
|
12306
12287
|
const Ve = await Za(ue.patientRoleID, ne);
|
|
@@ -12308,7 +12289,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12308
12289
|
} catch (Ve) {
|
|
12309
12290
|
console.error("Error fetching wallet balance:", Ve), ie(0);
|
|
12310
12291
|
}
|
|
12311
|
-
}, [ue.patientRoleID, ne]), ft =
|
|
12292
|
+
}, [ue.patientRoleID, ne]), ft = Vt(async () => {
|
|
12312
12293
|
if (ue?.patientRoleID) {
|
|
12313
12294
|
Le(!0);
|
|
12314
12295
|
try {
|
|
@@ -12339,7 +12320,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12339
12320
|
ke(), ft();
|
|
12340
12321
|
}, [ke, ft]), Ke(() => {
|
|
12341
12322
|
pt();
|
|
12342
|
-
}, [pt,
|
|
12323
|
+
}, [pt, W]), Ke(() => {
|
|
12343
12324
|
if (n && P.length) {
|
|
12344
12325
|
const Ve = P.find((mt) => mt.order_id_str === n);
|
|
12345
12326
|
Ve && (Re(Ve), v?.());
|
|
@@ -12478,9 +12459,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12478
12459
|
transactionType: v,
|
|
12479
12460
|
refreshPaymentData: w
|
|
12480
12461
|
}) => {
|
|
12481
|
-
const { showToast: a, variable: A } =
|
|
12462
|
+
const { showToast: a, variable: A } = Lt(Mt) || {}, [S, h] = z({
|
|
12482
12463
|
paymentMethod: n
|
|
12483
|
-
}),
|
|
12464
|
+
}), Y = async () => {
|
|
12484
12465
|
const x = await hs(d, S.paymentMethod, v, A);
|
|
12485
12466
|
x.status ? (a("Update Success", x.message, "Success", 3e3), w?.()) : a("Update Failed", x.message, "Error", 3e3), u({ show: !1, payment_id: "", mode: "", payment_type: "" });
|
|
12486
12467
|
};
|
|
@@ -12535,7 +12516,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12535
12516
|
size: "sm",
|
|
12536
12517
|
textField: "Save",
|
|
12537
12518
|
className: "hfl-bg-Blue-600",
|
|
12538
|
-
onClick:
|
|
12519
|
+
onClick: Y
|
|
12539
12520
|
}
|
|
12540
12521
|
)
|
|
12541
12522
|
] })
|
|
@@ -12550,7 +12531,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12550
12531
|
getTypeColor: a,
|
|
12551
12532
|
refreshPaymentData: A
|
|
12552
12533
|
}) => {
|
|
12553
|
-
const [S, h] =
|
|
12534
|
+
const [S, h] = z({ show: !1, payment_id: "", mode: "", payment_type: "" }), Y = Mr(null), x = (k) => {
|
|
12554
12535
|
switch (k) {
|
|
12555
12536
|
case "1":
|
|
12556
12537
|
return "Consultation";
|
|
@@ -12574,7 +12555,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12574
12555
|
}
|
|
12575
12556
|
};
|
|
12576
12557
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
12577
|
-
u.length > 0 && u.map((k,
|
|
12558
|
+
u.length > 0 && u.map((k, O) => /* @__PURE__ */ e.jsx(cl.Fragment, { children: /* @__PURE__ */ e.jsxs("tr", { className: "hfl-border-1", children: [
|
|
12578
12559
|
/* @__PURE__ */ e.jsx(
|
|
12579
12560
|
"td",
|
|
12580
12561
|
{
|
|
@@ -12602,7 +12583,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12602
12583
|
onClick: () => {
|
|
12603
12584
|
v(k);
|
|
12604
12585
|
},
|
|
12605
|
-
"data-qa":
|
|
12586
|
+
"data-qa": O + 1 + "-bill-amount",
|
|
12606
12587
|
children: "₹" + k.paid_amount
|
|
12607
12588
|
}
|
|
12608
12589
|
) })
|
|
@@ -12675,16 +12656,16 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12675
12656
|
{
|
|
12676
12657
|
className: " hx_delete hfl-flex hfl-cursor-pointer hfl-text-2",
|
|
12677
12658
|
onClick: (I) => {
|
|
12678
|
-
I.stopPropagation(), n(), d(k,
|
|
12659
|
+
I.stopPropagation(), n(), d(k, O);
|
|
12679
12660
|
},
|
|
12680
|
-
"data-qa":
|
|
12661
|
+
"data-qa": O + 1 + "-delete-transaction"
|
|
12681
12662
|
}
|
|
12682
12663
|
) })
|
|
12683
|
-
] }, `${
|
|
12664
|
+
] }, `${O}`) }, O)),
|
|
12684
12665
|
S.show && /* @__PURE__ */ e.jsx(
|
|
12685
12666
|
Bi,
|
|
12686
12667
|
{
|
|
12687
|
-
childModalRef:
|
|
12668
|
+
childModalRef: Y,
|
|
12688
12669
|
backdropClasses: "",
|
|
12689
12670
|
clickOutsideHandler: () => {
|
|
12690
12671
|
},
|
|
@@ -12694,7 +12675,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12694
12675
|
children: /* @__PURE__ */ e.jsx(
|
|
12695
12676
|
eo,
|
|
12696
12677
|
{
|
|
12697
|
-
reference:
|
|
12678
|
+
reference: Y,
|
|
12698
12679
|
closeModalHandler: h,
|
|
12699
12680
|
payment_id: S.payment_id,
|
|
12700
12681
|
currentMode: S.mode,
|
|
@@ -12721,7 +12702,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12721
12702
|
showPrintModal: h
|
|
12722
12703
|
// setLoading,
|
|
12723
12704
|
// ppEventProps,
|
|
12724
|
-
} =
|
|
12705
|
+
} = Lt(Mt), Y = async (x, L, k, O) => {
|
|
12725
12706
|
h?.visible && n();
|
|
12726
12707
|
const N = [
|
|
12727
12708
|
w?.age && typeof w?.age == "number" ? `${w?.age}y` : w?.org_person_dob ? wr(w?.org_person_dob) : "",
|
|
@@ -12761,7 +12742,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12761
12742
|
}
|
|
12762
12743
|
},
|
|
12763
12744
|
trackEventHandler: () => {
|
|
12764
|
-
console.log(
|
|
12745
|
+
console.log(O);
|
|
12765
12746
|
}
|
|
12766
12747
|
});
|
|
12767
12748
|
};
|
|
@@ -12790,7 +12771,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12790
12771
|
"i",
|
|
12791
12772
|
{
|
|
12792
12773
|
className: " hx_print-filled hfl-cursor-pointer hfl-text-2 hfl-text-Gray-500",
|
|
12793
|
-
onClick: () =>
|
|
12774
|
+
onClick: () => Y(
|
|
12794
12775
|
x,
|
|
12795
12776
|
"billPrintPreview",
|
|
12796
12777
|
!1,
|
|
@@ -12823,7 +12804,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12823
12804
|
closePrintModal: a,
|
|
12824
12805
|
patient_entity_id: A,
|
|
12825
12806
|
refreshPaymentData: S
|
|
12826
|
-
} = s, { patientIDs: h, showToast:
|
|
12807
|
+
} = s, { patientIDs: h, showToast: Y, variable: x } = Lt(Mt) || {};
|
|
12827
12808
|
Be.extend(Qa);
|
|
12828
12809
|
const L = async (B, b) => {
|
|
12829
12810
|
let Q = "";
|
|
@@ -12837,7 +12818,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12837
12818
|
h?.patientRoleID || "",
|
|
12838
12819
|
x
|
|
12839
12820
|
);
|
|
12840
|
-
F.status && (
|
|
12821
|
+
F.status && (Y("Success", F?.message, "Success", 3e3), d((M) => {
|
|
12841
12822
|
try {
|
|
12842
12823
|
const V = [...M];
|
|
12843
12824
|
return V.splice(b, 1), V;
|
|
@@ -12859,7 +12840,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12859
12840
|
default:
|
|
12860
12841
|
return "";
|
|
12861
12842
|
}
|
|
12862
|
-
},
|
|
12843
|
+
}, O = (B) => {
|
|
12863
12844
|
switch (B) {
|
|
12864
12845
|
case "DEPOSIT":
|
|
12865
12846
|
case "P":
|
|
@@ -12956,7 +12937,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
12956
12937
|
handleDeleteRow: L,
|
|
12957
12938
|
handleRightSegment: n,
|
|
12958
12939
|
handleRowClick: v,
|
|
12959
|
-
getTypeColor:
|
|
12940
|
+
getTypeColor: O,
|
|
12960
12941
|
getType: k,
|
|
12961
12942
|
refreshPaymentData: S
|
|
12962
12943
|
}
|
|
@@ -13003,20 +12984,20 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13003
12984
|
showPrintModal: w
|
|
13004
12985
|
// setLoading,
|
|
13005
12986
|
// ppEventProps,
|
|
13006
|
-
} =
|
|
12987
|
+
} = Lt(Mt) || {}, {
|
|
13007
12988
|
handleRightSegment: a,
|
|
13008
12989
|
// bill_date,
|
|
13009
12990
|
closePrintModal: A,
|
|
13010
12991
|
summaryData: S,
|
|
13011
12992
|
patient_entity_id: h
|
|
13012
|
-
} = s,
|
|
12993
|
+
} = s, Y = async (x, L) => {
|
|
13013
12994
|
w?.visible && A();
|
|
13014
|
-
const
|
|
12995
|
+
const O = [
|
|
13015
12996
|
u?.age && typeof u?.age == "number" ? `${u?.age}y` : u?.org_person_dob ? wr(u?.org_person_dob) : "",
|
|
13016
12997
|
dl[u?.gender] ?? "",
|
|
13017
12998
|
u?.blood_group
|
|
13018
12999
|
].filter((N) => N).join(", "), I = {
|
|
13019
|
-
name: pr(u?.name) + (
|
|
13000
|
+
name: pr(u?.name) + (O ? ` (${O}) ` : ""),
|
|
13020
13001
|
billDate: Be(S?.transaction_time).format("DD-MMM-YYYY"),
|
|
13021
13002
|
mobileNumber: u?.phone_number,
|
|
13022
13003
|
email: u?.email,
|
|
@@ -13114,7 +13095,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13114
13095
|
size: "md",
|
|
13115
13096
|
textField: "Print",
|
|
13116
13097
|
icon: "Left",
|
|
13117
|
-
onClick: () =>
|
|
13098
|
+
onClick: () => Y(
|
|
13118
13099
|
"billPrintPreview",
|
|
13119
13100
|
!1
|
|
13120
13101
|
),
|
|
@@ -13129,7 +13110,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13129
13110
|
size: "md",
|
|
13130
13111
|
textField: "Share",
|
|
13131
13112
|
icon: "Left",
|
|
13132
|
-
onClick: () =>
|
|
13113
|
+
onClick: () => Y(
|
|
13133
13114
|
"billSharePreview",
|
|
13134
13115
|
!0
|
|
13135
13116
|
),
|
|
@@ -13140,11 +13121,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13140
13121
|
] })
|
|
13141
13122
|
] });
|
|
13142
13123
|
}, so = ({ closePrintModal: s }) => {
|
|
13143
|
-
const [u, d] =
|
|
13124
|
+
const [u, d] = z(
|
|
13144
13125
|
br[Ir.consultation_lab_other_services].key
|
|
13145
|
-
), [n, v] =
|
|
13126
|
+
), [n, v] = z(
|
|
13146
13127
|
null
|
|
13147
|
-
), [w, a] =
|
|
13128
|
+
), [w, a] = z(ht[5]), [A, S] = z(""), [h, Y] = z(), [x, L] = z([]), [k, O] = z(1), [I, N] = z(), { setLoading: P, patientIDs: B, variable: b } = Lt(Mt), [Q, F] = z(0), [M, V] = z(!1), te = Vt(async () => {
|
|
13148
13129
|
try {
|
|
13149
13130
|
if (P(!0), B?.patientRoleID) {
|
|
13150
13131
|
const $ = await Ha(B.patientRoleID, 1, 10, b);
|
|
@@ -13154,7 +13135,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13154
13135
|
} catch {
|
|
13155
13136
|
v(null), L([]), P(!1), console.log("error in getPaymentsList API Call");
|
|
13156
13137
|
}
|
|
13157
|
-
}, [B.patientRoleID, P, b]), q =
|
|
13138
|
+
}, [B.patientRoleID, P, b]), q = Vt(async () => {
|
|
13158
13139
|
try {
|
|
13159
13140
|
P(!0);
|
|
13160
13141
|
const $ = await ka(B?.patientRoleID || "", 1, 10, b);
|
|
@@ -13164,11 +13145,11 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13164
13145
|
}
|
|
13165
13146
|
}, [B?.patientRoleID, P, b]), ie = ($ = ht[5]) => {
|
|
13166
13147
|
a($);
|
|
13167
|
-
},
|
|
13148
|
+
}, W = ($) => {
|
|
13168
13149
|
S($);
|
|
13169
13150
|
}, ge = async ($) => {
|
|
13170
|
-
if (
|
|
13171
|
-
if (
|
|
13151
|
+
if (Y($), u === br[Ir.consultation_lab_other_services].key) {
|
|
13152
|
+
if (W(Dt[parseInt($?.service_category_id) - 1]), a(ht[1]), $?.order_id) {
|
|
13172
13153
|
const de = await ue($.order_id);
|
|
13173
13154
|
N(de);
|
|
13174
13155
|
}
|
|
@@ -13181,7 +13162,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13181
13162
|
let H, Re;
|
|
13182
13163
|
u == br[Ir.deposit_refund].key ? (H = await ka(B?.patientRoleID || "", de, 10, b), Re = [...x, ...H.wallet_transactions]) : (H = await Ha(B?.patientRoleID || "", de, 10, b), Re = [...x, ...H.data]), L(Re);
|
|
13183
13164
|
}
|
|
13184
|
-
|
|
13165
|
+
O(de);
|
|
13185
13166
|
}
|
|
13186
13167
|
P(!1);
|
|
13187
13168
|
}, ue = async ($) => {
|
|
@@ -13195,7 +13176,7 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13195
13176
|
} catch {
|
|
13196
13177
|
console.log("Error in Loading Bill Details from Bill Id");
|
|
13197
13178
|
}
|
|
13198
|
-
}, Le =
|
|
13179
|
+
}, Le = Vt(async () => {
|
|
13199
13180
|
const $ = await Za(B?.patientRoleID || "", b);
|
|
13200
13181
|
F($?.wallet_balance || 0);
|
|
13201
13182
|
}, [B?.patientRoleID, b]), ne = ($) => {
|
|
@@ -13320,9 +13301,9 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13320
13301
|
columns: s,
|
|
13321
13302
|
data: u
|
|
13322
13303
|
}), A = (h) => {
|
|
13323
|
-
const
|
|
13304
|
+
const Y = [];
|
|
13324
13305
|
return h?.headers?.length && h.headers.map((x) => {
|
|
13325
|
-
|
|
13306
|
+
Y.push(
|
|
13326
13307
|
/* @__PURE__ */ e.jsx(
|
|
13327
13308
|
"th",
|
|
13328
13309
|
{
|
|
@@ -13332,18 +13313,18 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13332
13313
|
}
|
|
13333
13314
|
)
|
|
13334
13315
|
);
|
|
13335
|
-
}),
|
|
13316
|
+
}), Y;
|
|
13336
13317
|
}, S = () => {
|
|
13337
13318
|
const h = [];
|
|
13338
|
-
return w.map((
|
|
13339
|
-
a(
|
|
13319
|
+
return w.map((Y, x) => {
|
|
13320
|
+
a(Y), h.push(
|
|
13340
13321
|
/* @__PURE__ */ e.jsx(
|
|
13341
13322
|
"tr",
|
|
13342
13323
|
{
|
|
13343
13324
|
id: x.toString(),
|
|
13344
|
-
...
|
|
13325
|
+
...Y.getRowProps(),
|
|
13345
13326
|
className: "hfl-bg-White hfl-group hfl-border-t-1 hfl-border-Gray-200",
|
|
13346
|
-
children:
|
|
13327
|
+
children: Y.cells.map((L, k) => /* @__PURE__ */ e.jsx(
|
|
13347
13328
|
"td",
|
|
13348
13329
|
{
|
|
13349
13330
|
"data-qa": x + 1 + "-" + (k + 1),
|
|
@@ -13376,13 +13357,13 @@ const Qa = /* @__PURE__ */ xn(Os), en = (s) => {
|
|
|
13376
13357
|
}
|
|
13377
13358
|
) });
|
|
13378
13359
|
}, oo = (s) => {
|
|
13379
|
-
const { visits: u = [], setPdfUrl: d, pdfUrl: n } = s, [v, w] =
|
|
13360
|
+
const { visits: u = [], setPdfUrl: d, pdfUrl: n } = s, [v, w] = z([]);
|
|
13380
13361
|
return Ke(() => {
|
|
13381
13362
|
w(co(u));
|
|
13382
13363
|
}, []), /* @__PURE__ */ e.jsx("div", { children: v && v.length && v.map(
|
|
13383
13364
|
(a, A) => a.reports.length > 0 && a.reports.map((S, h) => {
|
|
13384
|
-
const
|
|
13385
|
-
S.label = `${new Date(
|
|
13365
|
+
const Y = a.date || "No date available";
|
|
13366
|
+
S.label = `${new Date(Y).toLocaleDateString()}${a.reports.length > 1 ? ` - ${h + 1}` : ""}`;
|
|
13386
13367
|
const { lab_number: x, label: L, message: k = "" } = S;
|
|
13387
13368
|
return /* @__PURE__ */ e.jsx(
|
|
13388
13369
|
"div",
|
|
@@ -13435,7 +13416,7 @@ ${x}`,
|
|
|
13435
13416
|
openLISReportHandler: a = () => {
|
|
13436
13417
|
},
|
|
13437
13418
|
variable: A
|
|
13438
|
-
} = s, { org_person_bid_str: S = "", email: h = "", phone_number:
|
|
13419
|
+
} = s, { org_person_bid_str: S = "", email: h = "", phone_number: Y = "", patient_id: x, name: L = "" } = d, [k, O] = z(), [I, N] = z(n), [P, B] = z(!0), [b, Q] = z(!1), [F, M] = z(""), [V, te] = z(h), [q, ie] = z(Y), [W, ge] = z(!1), be = (de) => {
|
|
13439
13420
|
const { value: H } = de.target;
|
|
13440
13421
|
Q(!!H && !ol().email().isValidSync(H)), te(H);
|
|
13441
13422
|
}, ue = (de) => {
|
|
@@ -13447,7 +13428,7 @@ ${x}`,
|
|
|
13447
13428
|
try {
|
|
13448
13429
|
B(!0);
|
|
13449
13430
|
const H = await Sn(S, A), { visits: Re = [] } = H;
|
|
13450
|
-
|
|
13431
|
+
O(H), Re.length && Re[0]?.reports?.length ? N(Re[0].reports[0]) : B(!1);
|
|
13451
13432
|
} catch (H) {
|
|
13452
13433
|
console.error("Error:", H), B(!1);
|
|
13453
13434
|
}
|
|
@@ -13609,7 +13590,7 @@ ${x}`,
|
|
|
13609
13590
|
label: "Phone Number",
|
|
13610
13591
|
height: "hfl-h-10 hfl-border-Purple-200 hfl-h-10 hfl-border-Purple-200",
|
|
13611
13592
|
start_icon: "hx_phone",
|
|
13612
|
-
errorMsg:
|
|
13593
|
+
errorMsg: W && F !== "phone" ? "Invalid Phone Number" : void 0,
|
|
13613
13594
|
inputProps: {
|
|
13614
13595
|
placeholder: "Enter Phone Number",
|
|
13615
13596
|
onFocus: () => M("phone"),
|
|
@@ -13651,7 +13632,7 @@ ${x}`,
|
|
|
13651
13632
|
hierarchy: "Primary",
|
|
13652
13633
|
size: "lg",
|
|
13653
13634
|
textField: "WhatsApp",
|
|
13654
|
-
disabled: !q ||
|
|
13635
|
+
disabled: !q || W || P,
|
|
13655
13636
|
icon: "Left",
|
|
13656
13637
|
onClick: () => ne(I, "SMS/WA"),
|
|
13657
13638
|
iconFile: "hfl-mr-2",
|
|
@@ -13696,7 +13677,7 @@ ${x}`,
|
|
|
13696
13677
|
}
|
|
13697
13678
|
);
|
|
13698
13679
|
}, fo = (s) => {
|
|
13699
|
-
const { patientDetails: u, showToast: d, variable: n } = s, [v, w] =
|
|
13680
|
+
const { patientDetails: u, showToast: d, variable: n } = s, [v, w] = z(!1), [a, A] = z(""), { org_person_bid_str: S = "" } = u, h = Wa(
|
|
13700
13681
|
(Q, F) => ({ ...Q, ...F }),
|
|
13701
13682
|
{
|
|
13702
13683
|
currentPage: 1,
|
|
@@ -13704,9 +13685,9 @@ ${x}`,
|
|
|
13704
13685
|
LabRecords: [],
|
|
13705
13686
|
isLabTableLoading: !1
|
|
13706
13687
|
}
|
|
13707
|
-
), [
|
|
13688
|
+
), [Y, x] = h, { LabRecords: L, currentPage: k, isLabTableLoading: O } = Y, I = (Q, F) => {
|
|
13708
13689
|
Q === "print_pdf" ? window.open(F.report_link, "_blank") : Q === "print_preview" && (w(!0), A(F));
|
|
13709
|
-
}, N =
|
|
13690
|
+
}, N = Vt(
|
|
13710
13691
|
async (Q) => {
|
|
13711
13692
|
try {
|
|
13712
13693
|
x({
|
|
@@ -13814,7 +13795,7 @@ ${x}`,
|
|
|
13814
13795
|
}
|
|
13815
13796
|
) })
|
|
13816
13797
|
] }),
|
|
13817
|
-
b.length === 0 && !
|
|
13798
|
+
b.length === 0 && !O && /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-h-[calc(100%_-_80px)] hfl-flex-col hfl-items-center hfl-justify-center hfl-gap-4", children: /* @__PURE__ */ e.jsx(
|
|
13818
13799
|
D,
|
|
13819
13800
|
{
|
|
13820
13801
|
variant: "Regular",
|
|
@@ -13823,7 +13804,7 @@ ${x}`,
|
|
|
13823
13804
|
children: "These are no Reports for the Patient"
|
|
13824
13805
|
}
|
|
13825
13806
|
) }),
|
|
13826
|
-
|
|
13807
|
+
O && /* @__PURE__ */ e.jsx(
|
|
13827
13808
|
"div",
|
|
13828
13809
|
{
|
|
13829
13810
|
className: "hfl-flex hfl-h-[calc(100%_-_80px)] hfl-flex-col hfl-items-center hfl-justify-center hfl-gap-4",
|
|
@@ -13844,7 +13825,7 @@ ${x}`,
|
|
|
13844
13825
|
});
|
|
13845
13826
|
}), u;
|
|
13846
13827
|
}, po = (s) => {
|
|
13847
|
-
const { setHplxLabModalOpen: u, patientDetails: d, showHPLXPrintPreview: n, reportsData: v, showToast: w, envName: a } = s, { patient_role_id: A = "", email: S = "", phone_number: h = "", name:
|
|
13828
|
+
const { setHplxLabModalOpen: u, patientDetails: d, showHPLXPrintPreview: n, reportsData: v, showToast: w, envName: a } = s, { patient_role_id: A = "", email: S = "", phone_number: h = "", name: Y = "" } = d, { order_date: x, report_id: L } = v, [k, O] = z(!1), [I, N] = z(""), [P, B] = z(S), [b, Q] = z(h), [F, M] = z(!1), [V, te] = z(null), [q, ie] = z("");
|
|
13848
13829
|
Ke(() => {
|
|
13849
13830
|
A && x && (async () => {
|
|
13850
13831
|
const ne = {
|
|
@@ -13864,12 +13845,12 @@ ${x}`,
|
|
|
13864
13845
|
}
|
|
13865
13846
|
})();
|
|
13866
13847
|
}, [A, x]);
|
|
13867
|
-
const
|
|
13848
|
+
const W = async (Le) => {
|
|
13868
13849
|
try {
|
|
13869
13850
|
const ne = {
|
|
13870
13851
|
created_by: window.doctor_role_id_for_seg,
|
|
13871
13852
|
dynamicFieldValue: {
|
|
13872
|
-
patient_name:
|
|
13853
|
+
patient_name: Y,
|
|
13873
13854
|
url: q,
|
|
13874
13855
|
email_attachment_urls: q,
|
|
13875
13856
|
email_attachment_file_names: "Lab-Report.pdf"
|
|
@@ -13897,7 +13878,7 @@ ${x}`,
|
|
|
13897
13878
|
}
|
|
13898
13879
|
}, ge = (Le) => {
|
|
13899
13880
|
const { value: ne } = Le.target;
|
|
13900
|
-
|
|
13881
|
+
O(!!ne && !ol().email().isValidSync(ne)), B(ne);
|
|
13901
13882
|
}, be = (Le) => {
|
|
13902
13883
|
const { value: ne } = Le.target;
|
|
13903
13884
|
M(!!ne && !ol().min(10).max(10).isValidSync(ne)), Q(ne);
|
|
@@ -14023,7 +14004,7 @@ ${x}`,
|
|
|
14023
14004
|
textField: "Email",
|
|
14024
14005
|
disabled: !P || k,
|
|
14025
14006
|
icon: "Left",
|
|
14026
|
-
onClick: () =>
|
|
14007
|
+
onClick: () => W("Email"),
|
|
14027
14008
|
iconFile: "hx_mail hfl-text-4 hfl-text-4",
|
|
14028
14009
|
className: "hfl-border-Blue-300 hfl-items-center hfl-justify-center hfl-border hfl-px-10"
|
|
14029
14010
|
}
|
|
@@ -14037,7 +14018,7 @@ ${x}`,
|
|
|
14037
14018
|
textField: "WhatsApp",
|
|
14038
14019
|
disabled: !b || F,
|
|
14039
14020
|
icon: "Left",
|
|
14040
|
-
onClick: () =>
|
|
14021
|
+
onClick: () => W("WA"),
|
|
14041
14022
|
iconFile: "hfl-mr-2",
|
|
14042
14023
|
className: "hfl-border-blue-300 hfl-items-center hfl-justify-center hfl-border hfl-px-10"
|
|
14043
14024
|
}
|
|
@@ -14079,7 +14060,7 @@ ${x}`,
|
|
|
14079
14060
|
}
|
|
14080
14061
|
);
|
|
14081
14062
|
}, mo = (s) => {
|
|
14082
|
-
const { patientDetails: u, showToast: d, variable: n } = s, [v, w] =
|
|
14063
|
+
const { patientDetails: u, showToast: d, variable: n } = s, [v, w] = z(!1), [a, A] = z(!0), [S, h] = z({}), Y = Wa(
|
|
14083
14064
|
(M, V) => ({ ...M, ...V }),
|
|
14084
14065
|
{
|
|
14085
14066
|
currentPage: 1,
|
|
@@ -14087,13 +14068,13 @@ ${x}`,
|
|
|
14087
14068
|
LabRecords: [],
|
|
14088
14069
|
isLabTableLoading: !1
|
|
14089
14070
|
}
|
|
14090
|
-
), [x, L] =
|
|
14071
|
+
), [x, L] = Y, { LabRecords: k, currentPage: O, isLabTableLoading: I, totalRecord: N } = x, P = {
|
|
14091
14072
|
order_date: "100px",
|
|
14092
14073
|
test: "350px"
|
|
14093
14074
|
// status: '200px',
|
|
14094
14075
|
}, B = (M, V) => {
|
|
14095
14076
|
w(!0), A(M), h(V);
|
|
14096
|
-
}, b =
|
|
14077
|
+
}, b = Vt(
|
|
14097
14078
|
async (M) => {
|
|
14098
14079
|
L({ isLabTableLoading: !0 });
|
|
14099
14080
|
try {
|
|
@@ -14113,8 +14094,8 @@ ${x}`,
|
|
|
14113
14094
|
[L, u?.patient_role_id, n]
|
|
14114
14095
|
);
|
|
14115
14096
|
Ke(() => {
|
|
14116
|
-
b(
|
|
14117
|
-
}, [
|
|
14097
|
+
b(O);
|
|
14098
|
+
}, [O, b]);
|
|
14118
14099
|
const Q = Kt(
|
|
14119
14100
|
() => [
|
|
14120
14101
|
{
|
|
@@ -14185,9 +14166,9 @@ ${x}`,
|
|
|
14185
14166
|
/* @__PURE__ */ e.jsx("div", { className: "hfl-mt-2", children: /* @__PURE__ */ e.jsx(
|
|
14186
14167
|
fl,
|
|
14187
14168
|
{
|
|
14188
|
-
currentPage:
|
|
14169
|
+
currentPage: O,
|
|
14189
14170
|
totalRecord: N,
|
|
14190
|
-
handleLoadMore: () => b(
|
|
14171
|
+
handleLoadMore: () => b(O + 1),
|
|
14191
14172
|
isLoading: I,
|
|
14192
14173
|
currentTotal: F.length
|
|
14193
14174
|
}
|
|
@@ -14223,12 +14204,12 @@ ${x}`,
|
|
|
14223
14204
|
)
|
|
14224
14205
|
] });
|
|
14225
14206
|
}, go = (s) => {
|
|
14226
|
-
const { showToast: u } = s, { patientDetails: d, billPreferences: n, variable: v } =
|
|
14207
|
+
const { showToast: u } = s, { patientDetails: d, billPreferences: n, variable: v } = Lt(Mt) || {}, [w, a] = z(""), A = n?.features?.enable_lis_v1 ?? !1, S = v.window_var.permit_lab_tech == "1";
|
|
14227
14208
|
Ke(() => {
|
|
14228
14209
|
A && S || A ? a(rl[ar.lis_report].key) : S && a(rl[ar.healthplix_report].key);
|
|
14229
14210
|
}, [A, S]);
|
|
14230
|
-
const h = (
|
|
14231
|
-
a(
|
|
14211
|
+
const h = (Y) => {
|
|
14212
|
+
a(Y);
|
|
14232
14213
|
};
|
|
14233
14214
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-h-[73.55vh] hfl-bg-White", children: /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-w-[913px] hfl-flex-col hfl-justify-start hfl-px-4 hfl-py-2", children: A || S ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
14234
14215
|
/* @__PURE__ */ e.jsxs("div", { className: "hfl-flex hfl-items-center", children: [
|
|
@@ -14261,7 +14242,7 @@ ${x}`,
|
|
|
14261
14242
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "hfl-flex hfl-h-full hfl-items-center hfl-justify-center", children: /* @__PURE__ */ e.jsx(D, { variant: "Regular", type: "Text lg", className: "hfl-text-Gray-500", children: "Lab is not active." }) }) }) }) });
|
|
14262
14243
|
};
|
|
14263
14244
|
function No({ variable: s }) {
|
|
14264
|
-
const { window_var: u, token: d, envName: n, IMGREP_DIRECTORY: v } = s, w = qa("(max-width: 1080px)"), a = Mr(null), [A, S] =
|
|
14245
|
+
const { window_var: u, token: d, envName: n, IMGREP_DIRECTORY: v } = s, w = qa("(max-width: 1080px)"), a = Mr(null), [A, S] = z(!1), [h, Y] = z(!1), [x, L] = z([]), [k, O] = z(Rt[2]), [I, N] = z(), [P, B] = z(), [b, Q] = z(), [F, M] = z(), [V, te] = z(), [q, ie] = z(), [W, ge] = z({
|
|
14265
14246
|
printDataFrom: "",
|
|
14266
14247
|
visible: !1,
|
|
14267
14248
|
whichPreview: "offlinePrint",
|
|
@@ -14274,17 +14255,17 @@ function No({ variable: s }) {
|
|
|
14274
14255
|
printType: "bill",
|
|
14275
14256
|
trackEventHandler: () => {
|
|
14276
14257
|
}
|
|
14277
|
-
}), [be, ue] =
|
|
14258
|
+
}), [be, ue] = z(""), [Le, ne] = z("en"), [$, de] = z(), [H, Re] = z(), [Me, ke] = z(), [pt, ft] = z({
|
|
14278
14259
|
patient_id: "",
|
|
14279
14260
|
patient_registered_date: "",
|
|
14280
14261
|
patient_age: "",
|
|
14281
14262
|
patient_gender: ""
|
|
14282
|
-
}), it = window?.partner_config ? JSON.parse(window?.partner_config) : {}, [Ve, mt] =
|
|
14263
|
+
}), it = window?.partner_config ? JSON.parse(window?.partner_config) : {}, [Ve, mt] = z([]), { patient_preferred_language: St } = V || {}, {
|
|
14283
14264
|
visit_pad_json: xt,
|
|
14284
14265
|
visitpad_order: Gt,
|
|
14285
|
-
org_person_sign_text:
|
|
14266
|
+
org_person_sign_text: kt,
|
|
14286
14267
|
org_person_signature_url: T
|
|
14287
|
-
} = b || {}, { add_lang_change: Ie, defaultLanguage: Ue } = typeof xt == "string" && xt && JSON.parse(xt) || {}, { rows: le } = Ue || {}, [J, K] =
|
|
14268
|
+
} = b || {}, { add_lang_change: Ie, defaultLanguage: Ue } = typeof xt == "string" && xt && JSON.parse(xt) || {}, { rows: le } = Ue || {}, [J, K] = z(!1), [oe, Te] = z({}), [Se, gt] = z([]), [nr, _t] = z({}), [Xt, Ot] = z({
|
|
14288
14269
|
created_on: "",
|
|
14289
14270
|
category_name: ""
|
|
14290
14271
|
});
|
|
@@ -14298,7 +14279,7 @@ function No({ variable: s }) {
|
|
|
14298
14279
|
value: bt
|
|
14299
14280
|
}));
|
|
14300
14281
|
}, [q]);
|
|
14301
|
-
const sr =
|
|
14282
|
+
const sr = Vt(
|
|
14302
14283
|
(ct) => {
|
|
14303
14284
|
Mi({ callback: (dt) => {
|
|
14304
14285
|
te(dt), ft({
|
|
@@ -14311,7 +14292,7 @@ function No({ variable: s }) {
|
|
|
14311
14292
|
},
|
|
14312
14293
|
[te]
|
|
14313
14294
|
), or = (ct) => {
|
|
14314
|
-
cr(),
|
|
14295
|
+
cr(), O(ct);
|
|
14315
14296
|
}, fr = (ct, bt, dt, Nt) => {
|
|
14316
14297
|
const Yt = Date.now();
|
|
14317
14298
|
L((Wt) => [
|
|
@@ -14330,7 +14311,7 @@ function No({ variable: s }) {
|
|
|
14330
14311
|
Ke(() => {
|
|
14331
14312
|
Gt && xt && mt(un(Gt, xt));
|
|
14332
14313
|
}, [b, xt, Gt]);
|
|
14333
|
-
const Cr =
|
|
14314
|
+
const Cr = Vt(() => {
|
|
14334
14315
|
ne(
|
|
14335
14316
|
typeof St == "string" && St.length >= 2 ? St : typeof le == "string" && le.length >= 2 ? le : "en"
|
|
14336
14317
|
);
|
|
@@ -14400,7 +14381,7 @@ function No({ variable: s }) {
|
|
|
14400
14381
|
window.patientPopupHandler = async (ct, bt, dt, Nt, Yt, Wt, qt) => {
|
|
14401
14382
|
S(!0), ue(ct), M({ patientRoleID: bt, patientID: dt }), a.current = qt ?? null, await mr(Nt, Nt.printDefaultPrefIndex, "", !1);
|
|
14402
14383
|
try {
|
|
14403
|
-
|
|
14384
|
+
O(
|
|
14404
14385
|
Rt.includes(Wt?.toLowerCase() ?? "") ? Wt.toLowerCase() : Rt[2]
|
|
14405
14386
|
), sr(bt), Li(s).then(B), qi("patient_config", s).then(ie), sn(
|
|
14406
14387
|
"print_configs",
|
|
@@ -14491,7 +14472,7 @@ function No({ variable: s }) {
|
|
|
14491
14472
|
currentWindow: k,
|
|
14492
14473
|
patientDetails: V,
|
|
14493
14474
|
setShowPrintModal: ge,
|
|
14494
|
-
showPrintModal:
|
|
14475
|
+
showPrintModal: W,
|
|
14495
14476
|
setEndConsultationClicked: K,
|
|
14496
14477
|
doctorListArr: P,
|
|
14497
14478
|
docPreference: $,
|
|
@@ -14499,7 +14480,7 @@ function No({ variable: s }) {
|
|
|
14499
14480
|
patientIDs: F,
|
|
14500
14481
|
showToast: fr,
|
|
14501
14482
|
isLoading: h,
|
|
14502
|
-
setLoading:
|
|
14483
|
+
setLoading: Y,
|
|
14503
14484
|
formattedService: H,
|
|
14504
14485
|
ppEventProps: pt,
|
|
14505
14486
|
getAndSetServiceListArr: yt,
|
|
@@ -14607,68 +14588,68 @@ function No({ variable: s }) {
|
|
|
14607
14588
|
)
|
|
14608
14589
|
}
|
|
14609
14590
|
),
|
|
14610
|
-
|
|
14591
|
+
W?.visible && /* @__PURE__ */ e.jsx(
|
|
14611
14592
|
Ri,
|
|
14612
14593
|
{
|
|
14613
14594
|
modalProps: {
|
|
14614
14595
|
mfePrefix: "hfl",
|
|
14615
|
-
printType:
|
|
14596
|
+
printType: W.printType,
|
|
14616
14597
|
onCloseModal: cr,
|
|
14617
14598
|
showToast: fr,
|
|
14618
|
-
currentPrintTime:
|
|
14619
|
-
whichPreview:
|
|
14599
|
+
currentPrintTime: W.currentPrintTime,
|
|
14600
|
+
whichPreview: W.whichPreview,
|
|
14620
14601
|
envName: s
|
|
14621
14602
|
},
|
|
14622
|
-
billPrintProps:
|
|
14623
|
-
billPatientDetails:
|
|
14624
|
-
billServiceDetails:
|
|
14625
|
-
billSummaryDetails:
|
|
14603
|
+
billPrintProps: W.printType === "bill" || W.printType === "bill_deposit_refund" ? {
|
|
14604
|
+
billPatientDetails: W.details.billPatientDetails,
|
|
14605
|
+
billServiceDetails: W.details.billServiceDetails,
|
|
14606
|
+
billSummaryDetails: W.details.billSummaryDetails,
|
|
14626
14607
|
preferences: {
|
|
14627
14608
|
...q?.print?.bill,
|
|
14628
14609
|
...q?.org_details,
|
|
14629
14610
|
...q?.branch_details,
|
|
14630
14611
|
doc_sign_img: T,
|
|
14631
|
-
doc_sign_text:
|
|
14612
|
+
doc_sign_text: kt
|
|
14632
14613
|
},
|
|
14633
|
-
showPrintPreviewForBill:
|
|
14634
|
-
isWholeBill:
|
|
14635
|
-
payloadDataforEmail:
|
|
14636
|
-
printDataFrom:
|
|
14637
|
-
depositRefundBillDetails:
|
|
14614
|
+
showPrintPreviewForBill: W.details.showPrintPreviewForBill,
|
|
14615
|
+
isWholeBill: W.details.isWholeBill,
|
|
14616
|
+
payloadDataforEmail: W.details.payloadDataforEmail,
|
|
14617
|
+
printDataFrom: W.printDataFrom,
|
|
14618
|
+
depositRefundBillDetails: W.details.depositRefundBillDetails
|
|
14638
14619
|
} : void 0,
|
|
14639
14620
|
optionFormProps: {
|
|
14640
14621
|
selectedLanguage: Le,
|
|
14641
|
-
showLanguageDropDown:
|
|
14622
|
+
showLanguageDropDown: W.printType === "visit" && Ie?.print === "1" || W.printType === "visit" && window.role_id != "11",
|
|
14642
14623
|
showPrintPrefDropDown: !0,
|
|
14643
14624
|
setSelectedLanguage: (ct) => ne(ct),
|
|
14644
14625
|
googleReview: !1,
|
|
14645
14626
|
showEmailInput: !0,
|
|
14646
|
-
showPhoneInput:
|
|
14627
|
+
showPhoneInput: W.printType === "visit"
|
|
14647
14628
|
},
|
|
14648
14629
|
ampEventProps: {
|
|
14649
14630
|
vpEventProps: "",
|
|
14650
14631
|
setvpEventProps: () => {
|
|
14651
14632
|
},
|
|
14652
14633
|
trackEventHandler: (ct) => {
|
|
14653
|
-
|
|
14634
|
+
W.trackEventHandler?.(ct);
|
|
14654
14635
|
}
|
|
14655
14636
|
},
|
|
14656
|
-
visitpadProps:
|
|
14657
|
-
printDataFrom:
|
|
14637
|
+
visitpadProps: W.printType === "visit" ? {
|
|
14638
|
+
printDataFrom: W.printDataFrom,
|
|
14658
14639
|
patientDetails: V,
|
|
14659
|
-
visitDetails:
|
|
14640
|
+
visitDetails: W.details,
|
|
14660
14641
|
offlineMode: !1,
|
|
14661
|
-
visitId:
|
|
14662
|
-
preferences:
|
|
14642
|
+
visitId: W.visitId,
|
|
14643
|
+
preferences: W?.visitpadPref || b,
|
|
14663
14644
|
// If the logged in doc is printing his own visit use pref else showPrintModal?.visitpadPref
|
|
14664
14645
|
endConsultationClicked: J,
|
|
14665
|
-
visitDate:
|
|
14666
|
-
visitPadOrder:
|
|
14667
|
-
|
|
14668
|
-
|
|
14646
|
+
visitDate: W.visit_date,
|
|
14647
|
+
visitPadOrder: W?.visitpadPref?.visitpad_order ? un(
|
|
14648
|
+
W?.visitpadPref?.visitpad_order,
|
|
14649
|
+
W?.visitpadPref?.visit_pad_json
|
|
14669
14650
|
) : Ve,
|
|
14670
14651
|
// If the logged in doc is printing his own visit use visitPadOrder else showPrintModal?.visitpadPref?. visitpad_order
|
|
14671
|
-
visitNumber:
|
|
14652
|
+
visitNumber: W.visit_number,
|
|
14672
14653
|
customTranslations: oe,
|
|
14673
14654
|
latestMetaData: nr,
|
|
14674
14655
|
investigationDropdown: Se,
|
|
@@ -14678,7 +14659,7 @@ function No({ variable: s }) {
|
|
|
14678
14659
|
updateVPPrefUsingDocPref: mr,
|
|
14679
14660
|
patientCustomFields: yr
|
|
14680
14661
|
} : void 0,
|
|
14681
|
-
appointmentInfoProps:
|
|
14662
|
+
appointmentInfoProps: W.printType === "visit" && W.printDataFrom === "patient_popup" ? W.appointmentInfo : void 0
|
|
14682
14663
|
}
|
|
14683
14664
|
)
|
|
14684
14665
|
] }) }),
|