@argusoft/medplat-duplicate-member-data 0.0.0-stage → 1.0.0
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/DuplicateMemberData-C4MSJxcL.js +1909 -0
- package/dist/DuplicateMemberData-C4MSJxcL.js.map +1 -0
- package/dist/DuplicateMemberDataAnalysis-DgMkbQvu.js +611 -0
- package/dist/DuplicateMemberDataAnalysis-DgMkbQvu.js.map +1 -0
- package/dist/DuplicateProbablesManualReport-8odf91cO.js +847 -0
- package/dist/DuplicateProbablesManualReport-8odf91cO.js.map +1 -0
- package/dist/FilterForm-CfFGDfyP.js +117 -0
- package/dist/FilterForm-CfFGDfyP.js.map +1 -0
- package/dist/ManualDuplicateEntryModal-CLECgPAF.js +195 -0
- package/dist/ManualDuplicateEntryModal-CLECgPAF.js.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -4
- package/README.md +0 -3
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
import { t as ManualDuplicateEntryModal } from "./ManualDuplicateEntryModal-CLECgPAF.js";
|
|
2
|
+
import { Suspense, lazy, useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useSelector } from "react-redux";
|
|
5
|
+
import { useNavigate } from "react-router-dom";
|
|
6
|
+
import Grid from "@mui/material/Grid2";
|
|
7
|
+
import { Box, Button, IconButton, Paper, Typography } from "@mui/material";
|
|
8
|
+
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
|
9
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faChartLine, faChevronLeft, faChevronRight, faMinusCircle, faPlusCircle } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import { execute } from "@/common/services/QueryBuilder";
|
|
12
|
+
import SideOverlay from "@/views/custom-components/SideOverlay";
|
|
13
|
+
import { getAssignedFeatures } from "@/utils/feature";
|
|
14
|
+
import GeneralUtil from "@/common/services/util/GeneralUtil";
|
|
15
|
+
import { useTranslateProvider } from "@/common/languageTranslator/TranslationContext";
|
|
16
|
+
import CustomizedTable from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
|
|
17
|
+
import usePagination from "@/hooks/usePagination";
|
|
18
|
+
import moment from "moment";
|
|
19
|
+
var FilterForm = lazy(() => import("./FilterForm-CfFGDfyP.js")), DEMO_FIELDS = [
|
|
20
|
+
{
|
|
21
|
+
key: "first_name",
|
|
22
|
+
label: "First Name",
|
|
23
|
+
compare: "lowercase"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "middle_name",
|
|
27
|
+
label: "Middle Name",
|
|
28
|
+
compare: "lowercase"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "last_name",
|
|
32
|
+
label: "Last Name",
|
|
33
|
+
compare: "lowercase"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "dob",
|
|
37
|
+
label: "Date of Birth (Age)",
|
|
38
|
+
compare: "exact",
|
|
39
|
+
format: "date"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: "gender",
|
|
43
|
+
label: "Gender",
|
|
44
|
+
compare: "exact"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "unique_health_id",
|
|
48
|
+
label: "Unique Health ID",
|
|
49
|
+
compare: "exact",
|
|
50
|
+
isLink: !0
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "family_id",
|
|
54
|
+
label: "Family ID",
|
|
55
|
+
compare: "exact",
|
|
56
|
+
isLink: !0
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "registered_from",
|
|
60
|
+
label: "Registered From",
|
|
61
|
+
compare: "exact",
|
|
62
|
+
altKey: "module_name"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "phone_number",
|
|
66
|
+
label: "Phone Number",
|
|
67
|
+
compare: "exact"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: "name_as_per_aadhar",
|
|
71
|
+
label: "Name as per Aadhar",
|
|
72
|
+
compare: "lowercase"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: "aadhaar_number_available",
|
|
76
|
+
label: "Aadhar Number Available",
|
|
77
|
+
compare: "exact",
|
|
78
|
+
altKey: "is_aadhar_number_available",
|
|
79
|
+
format: "bool"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: "abha_number",
|
|
83
|
+
label: "ABHA Number",
|
|
84
|
+
compare: "exact"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: "health_id",
|
|
88
|
+
label: "Health ID",
|
|
89
|
+
compare: "exact"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
key: "head_of_family",
|
|
93
|
+
label: "Head of Family",
|
|
94
|
+
compare: "exact",
|
|
95
|
+
altKey: "hof"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "address",
|
|
99
|
+
label: "Address",
|
|
100
|
+
compare: "exact"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: "father_name",
|
|
104
|
+
label: "Father Name",
|
|
105
|
+
compare: "lowercase"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: "mother_name",
|
|
109
|
+
label: "Mother Name",
|
|
110
|
+
compare: "lowercase"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
key: "registered_by",
|
|
114
|
+
label: "Registered By",
|
|
115
|
+
compare: "exact"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
key: "no_of_family_members",
|
|
119
|
+
label: "No. of family members",
|
|
120
|
+
compare: "exact"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
key: "no_of_services_given",
|
|
124
|
+
label: "No. of services given",
|
|
125
|
+
compare: "exact"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: "registered_on",
|
|
129
|
+
label: "Registered On",
|
|
130
|
+
compare: "exact",
|
|
131
|
+
format: "datetime"
|
|
132
|
+
}
|
|
133
|
+
], getMemberDob = (e, t) => e[`DOB ${t}`] || e[`member${t}_dob`] || e[`dob_${t}`] || e[`dob${t}`] || e[`DOB_${t}`] || "", isMember1Valid = (e) => {
|
|
134
|
+
let t = e.is_member1_valid ?? e.is_member_1_valid ?? e.member1_valid ?? e.member_1_valid ?? e["Member 1 Validity"] ?? e["Member 1 Valid"], n = e.is_member2_valid ?? e.is_member_2_valid ?? e.member2_valid ?? e.member_2_valid ?? e["Member 2 Validity"] ?? e["Member 2 Valid"];
|
|
135
|
+
if (t != null) {
|
|
136
|
+
if (t === !0 || t === "true" || t === 1 || t === "1") return !0;
|
|
137
|
+
if (t === !1 || t === "false" || t === 0 || t === "0") return !1;
|
|
138
|
+
}
|
|
139
|
+
if (n != null) {
|
|
140
|
+
if (n === !0 || n === "true" || n === 1 || n === "1") return !1;
|
|
141
|
+
if (n === !1 || n === "false" || n === 0 || n === "0") return !0;
|
|
142
|
+
}
|
|
143
|
+
let r = e["Member 1 State"] ?? e.member_1_state ?? e.status_1 ?? e.member1_status ?? e.m1_state ?? e.m1_status, i = e["Member 2 State"] ?? e.member_2_state ?? e.status_2 ?? e.member2_status ?? e.m2_state ?? e.m2_status;
|
|
144
|
+
return r && String(r).toUpperCase() === "ACTIVE" ? !0 : i && String(i).toUpperCase() === "ACTIVE" || r && (String(r).toUpperCase() === "MERGED" || String(r).toUpperCase() === "INACTIVE") ? !1 : (i && (String(i).toUpperCase() === "MERGED" || String(i).toUpperCase()), !0);
|
|
145
|
+
};
|
|
146
|
+
function DuplicateProbablesManualReport() {
|
|
147
|
+
let n = useNavigate(), { translate: d } = useTranslateProvider(), { user: m } = useSelector((e) => e.Authenticate), [h, g] = useState(!1), [_, v] = useState(!1), [y, b] = useState("list"), [x, S] = useState("orgUnit"), [C, w] = useState(""), [T, E] = useState(m?.minLocationId || 1), [xe, D] = useState(0), [Se] = useState(() => parseInt(localStorage.getItem("recordResolvedSessionCount") || "0", 10)), [Ce, O] = useState(0), [we, k] = useState(0), [A, j] = useState(null), [Te, M] = useState([]), [N, P] = useState(0), [F, I] = useState(!1), [L, R] = useState(null), z = async () => {
|
|
148
|
+
try {
|
|
149
|
+
let { data: e } = await getAssignedFeatures("techo.manage.duplicateMemberData"), t = JSON.parse(e);
|
|
150
|
+
t && R(t);
|
|
151
|
+
} catch (e) {
|
|
152
|
+
console.error(e);
|
|
153
|
+
}
|
|
154
|
+
}, B = GeneralUtil.hasCheckRights(L?.["view.manage.duplicateMemberData"]), [V, H] = useState(!0), U = useCallback(async () => {
|
|
155
|
+
try {
|
|
156
|
+
let e = 0;
|
|
157
|
+
x === "uniqueHealthId" || x === "familyId" ? ((await execute({
|
|
158
|
+
code: "get_count_of_duplicate_records_based_on_unique_health_id_and_family_id",
|
|
159
|
+
parameters: {
|
|
160
|
+
searchBy: x,
|
|
161
|
+
searchString: C
|
|
162
|
+
}
|
|
163
|
+
})).data?.result || []).forEach((t) => {
|
|
164
|
+
e += t.record_count;
|
|
165
|
+
}) : e = (await execute({
|
|
166
|
+
code: "get_count_of_duplicate_records_user_based",
|
|
167
|
+
parameters: {
|
|
168
|
+
logged_in_user: m?.id,
|
|
169
|
+
searchBy: x,
|
|
170
|
+
searchString: C
|
|
171
|
+
}
|
|
172
|
+
})).data?.result?.[0]?.count_of_duplicate_probables || 0, D(e);
|
|
173
|
+
let t = await execute({ code: "get_count_of_duplicate_records" });
|
|
174
|
+
O(t.data?.result?.[0]?.cumulative_duplicates || 0), k(t.data?.result?.[0]?.cumulative_duplicates_resolved || 0);
|
|
175
|
+
} catch (e) {
|
|
176
|
+
console.error(e);
|
|
177
|
+
}
|
|
178
|
+
}, [
|
|
179
|
+
x,
|
|
180
|
+
C,
|
|
181
|
+
m
|
|
182
|
+
]);
|
|
183
|
+
useEffect(() => {
|
|
184
|
+
m && (U(), z());
|
|
185
|
+
}, [m, U]);
|
|
186
|
+
let W = (e, t) => {
|
|
187
|
+
let n = [
|
|
188
|
+
"first_name",
|
|
189
|
+
"middle_name",
|
|
190
|
+
"last_name",
|
|
191
|
+
"name_as_per_aadhar",
|
|
192
|
+
"dob",
|
|
193
|
+
"gender"
|
|
194
|
+
], r = 0;
|
|
195
|
+
n.forEach((n) => {
|
|
196
|
+
let i = e[n], a = t[n];
|
|
197
|
+
[
|
|
198
|
+
"first_name",
|
|
199
|
+
"middle_name",
|
|
200
|
+
"last_name",
|
|
201
|
+
"name_as_per_aadhar"
|
|
202
|
+
].includes(n) ? (i && a && i.toLowerCase() === a.toLowerCase() || i === null && a === null) && r++ : i === a && r++;
|
|
203
|
+
});
|
|
204
|
+
let i = (r / n.length * 100).toFixed(2), a = !!(e.aadhaar_reference_key && t.aadhaar_reference_key && e.aadhaar_reference_key === t.aadhaar_reference_key), s = !!(e.no_of_family_members && t.no_of_family_members && e.no_of_family_members === t.no_of_family_members && e.no_of_family_members > 1), c = !!(e.abha_number && t.abha_number && e.abha_number === t.abha_number), l = moment.duration(moment(t.registered_on).diff(moment(e.registered_on))), u = [
|
|
205
|
+
"years",
|
|
206
|
+
"months",
|
|
207
|
+
"days",
|
|
208
|
+
"hours",
|
|
209
|
+
"minutes",
|
|
210
|
+
"seconds"
|
|
211
|
+
].find((e) => Math.abs(l[e]()) > 0) || "seconds", d = Math.abs(l[u]()), f = `${d} ${u.slice(0, -1)}${d === 1 ? "" : "s"}`;
|
|
212
|
+
u === "years" ? f = `${d} year${d === 1 ? "" : "s"} ${Math.abs(l.months())} month${Math.abs(l.months()) === 1 ? "" : "s"}` : u === "hours" && (f = `${d} hour${d === 1 ? "" : "s"} ${Math.abs(l.minutes())} minute${Math.abs(l.minutes()) === 1 ? "" : "s"}`);
|
|
213
|
+
let p = [];
|
|
214
|
+
return p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
215
|
+
"Considering the Demographics details ",
|
|
216
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
217
|
+
" and",
|
|
218
|
+
" ",
|
|
219
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
220
|
+
" are ",
|
|
221
|
+
/* @__PURE__ */ jsxs("strong", { children: [i, "%"] }),
|
|
222
|
+
" similar."
|
|
223
|
+
] })), c && p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
224
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
225
|
+
" and ",
|
|
226
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
227
|
+
" have same ABHA number."
|
|
228
|
+
] })), a && p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
229
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
230
|
+
" and ",
|
|
231
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
232
|
+
" have same Aadhar reference key, so they are duplicate."
|
|
233
|
+
] })), s && p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
234
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
235
|
+
" and ",
|
|
236
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
237
|
+
" have equal number of family members, so this can be a case of duplicate family entries."
|
|
238
|
+
] })), u === "seconds" ? p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
239
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
240
|
+
" and ",
|
|
241
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
242
|
+
" are created approximately at the same."
|
|
243
|
+
] })) : p.push(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
244
|
+
"The Registration time difference between ",
|
|
245
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 1" }),
|
|
246
|
+
" ",
|
|
247
|
+
"and ",
|
|
248
|
+
/* @__PURE__ */ jsx("strong", { children: "Duplicate 2" }),
|
|
249
|
+
" is ",
|
|
250
|
+
/* @__PURE__ */ jsx("strong", { children: f }),
|
|
251
|
+
"."
|
|
252
|
+
] })), p;
|
|
253
|
+
}, G = (e, t, n) => t == null || n == null ? !1 : e.compare === "lowercase" ? String(t).toLowerCase() === String(n).toLowerCase() : t === n, K = (e, t) => {
|
|
254
|
+
let n = e[t.altKey || t.key];
|
|
255
|
+
if (n == null) return "";
|
|
256
|
+
if (t.format === "date") {
|
|
257
|
+
let e = moment(n);
|
|
258
|
+
if (!e.isValid()) return n;
|
|
259
|
+
let t = moment().diff(e, "years");
|
|
260
|
+
return `${e.format("DD/MM/YYYY")} (${t})`;
|
|
261
|
+
}
|
|
262
|
+
if (t.format === "datetime") {
|
|
263
|
+
let e = moment(n);
|
|
264
|
+
return e.isValid() ? e.format("DD/MM/YYYY HH:mm") : n;
|
|
265
|
+
}
|
|
266
|
+
return t.format === "bool" ? n ? "Yes" : "No" : String(n);
|
|
267
|
+
}, q = async (e, t) => {
|
|
268
|
+
try {
|
|
269
|
+
let n = await execute({
|
|
270
|
+
code: "retrieve_main_member_info",
|
|
271
|
+
parameters: { memberId: e["Member 1 Id"] }
|
|
272
|
+
}), r = await execute({
|
|
273
|
+
code: "retrieve_main_member_info",
|
|
274
|
+
parameters: { memberId: e["Member 2 Id"] }
|
|
275
|
+
}), i = n.data?.result?.[0] || {}, a = r.data?.result?.[0] || {};
|
|
276
|
+
M(W(i, a)), j({
|
|
277
|
+
m1: i,
|
|
278
|
+
m2: a
|
|
279
|
+
}), t !== void 0 && P(t), b("detail");
|
|
280
|
+
} catch (e) {
|
|
281
|
+
console.error(e);
|
|
282
|
+
}
|
|
283
|
+
}, { data: J, fetchNextPage: Ee, hasNextPage: Y, isFetching: De, refetch: X } = usePagination({
|
|
284
|
+
key: [
|
|
285
|
+
"duplicateMembers",
|
|
286
|
+
_,
|
|
287
|
+
x,
|
|
288
|
+
C,
|
|
289
|
+
T
|
|
290
|
+
],
|
|
291
|
+
queryFn: async ({ pageParam: e }) => {
|
|
292
|
+
let t = _ ? !x || x === "orgUnit" ? "getting_resolved_members_location_wise" : x === "mergedBy" ? "getting_duplicate_members_for_merged_by" : "getting_duplicate_members_uhid_family_id_wise_for_resolved" : !x || x === "orgUnit" ? "getting_duplicate_members_location_wise" : "getting_duplicate_members_uhid_family_id_wise", n = {
|
|
293
|
+
limit: 20,
|
|
294
|
+
offset: e?.offset || 0
|
|
295
|
+
};
|
|
296
|
+
x === "orgUnit" ? n.locationId = T : (n.searchBy = x, n.searchString = C, x === "mergedBy" && (n.mergedBy = C));
|
|
297
|
+
let { data: r } = await execute({
|
|
298
|
+
code: t,
|
|
299
|
+
parameters: n
|
|
300
|
+
});
|
|
301
|
+
return r?.result || [];
|
|
302
|
+
},
|
|
303
|
+
limit: 20
|
|
304
|
+
}), Z = J?.pages?.flat() || [], Q = (e, t) => {
|
|
305
|
+
if (!t) return;
|
|
306
|
+
let n = "";
|
|
307
|
+
if (e === "unique_health_id") n = "uniqueHealthId";
|
|
308
|
+
else if (e === "family_id") n = "familyId";
|
|
309
|
+
else return;
|
|
310
|
+
let r = `/ui/medplat/manage/duplicateMemberData?searchBy=${n}&searchString=${t}`;
|
|
311
|
+
window.open(r, "_blank");
|
|
312
|
+
}, $ = {
|
|
313
|
+
box: {
|
|
314
|
+
width: "fit-content",
|
|
315
|
+
backgroundColor: "white",
|
|
316
|
+
borderRadius: 10,
|
|
317
|
+
display: "flex",
|
|
318
|
+
flex: 1,
|
|
319
|
+
cursor: "default",
|
|
320
|
+
transition: "box-shadow 0.3s ease"
|
|
321
|
+
},
|
|
322
|
+
summaryBox: {
|
|
323
|
+
backgroundColor: "var(--color-background2)",
|
|
324
|
+
boxShadow: "0 4px 6px rgba(0,0,0,0.1)",
|
|
325
|
+
borderRadius: 6,
|
|
326
|
+
overflow: "hidden",
|
|
327
|
+
marginBottom: 20
|
|
328
|
+
},
|
|
329
|
+
summaryBoxContent: { padding: 15 },
|
|
330
|
+
analyticsBox: {
|
|
331
|
+
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
332
|
+
color: "white",
|
|
333
|
+
borderRadius: 8,
|
|
334
|
+
overflow: "hidden",
|
|
335
|
+
transition: "transform 0.2s",
|
|
336
|
+
cursor: "pointer"
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
return L !== null && !GeneralUtil.hasCheckRights(L?.["view.manage.duplicateMemberData"]) ? /* @__PURE__ */ jsx(Box, {
|
|
340
|
+
className: "flex justify-center items-center w-full h-[80vh]",
|
|
341
|
+
children: /* @__PURE__ */ jsx(Box, {
|
|
342
|
+
className: "h-80 w-150 flex justify-center items-center border rounded",
|
|
343
|
+
style: { borderColor: "var(--color-gray3)" },
|
|
344
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
345
|
+
variant: "h5",
|
|
346
|
+
className: "text-customBlue",
|
|
347
|
+
children: "You dont have permission to view Duplicate Probables Manual Report"
|
|
348
|
+
})
|
|
349
|
+
})
|
|
350
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
351
|
+
className: "container-fluid report-view",
|
|
352
|
+
style: { padding: "15px" },
|
|
353
|
+
children: [
|
|
354
|
+
y === "list" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Box, {
|
|
355
|
+
sx: {
|
|
356
|
+
display: "flex",
|
|
357
|
+
alignItems: "center",
|
|
358
|
+
gap: 1.5,
|
|
359
|
+
mb: 2
|
|
360
|
+
},
|
|
361
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
362
|
+
onClick: () => n("/ui/medplat/manage/duplicateMemberData"),
|
|
363
|
+
size: "small",
|
|
364
|
+
sx: {
|
|
365
|
+
border: "1px solid var(--color-gray3)",
|
|
366
|
+
borderRadius: 1.5,
|
|
367
|
+
bgcolor: "white",
|
|
368
|
+
width: 32,
|
|
369
|
+
height: 32,
|
|
370
|
+
transition: "all 0.2s ease-in-out",
|
|
371
|
+
"&:hover": {
|
|
372
|
+
bgcolor: "var(--color-gray4)",
|
|
373
|
+
borderColor: "var(--color-gray1)",
|
|
374
|
+
transform: "translateX(-2px)",
|
|
375
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.05)"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
children: /* @__PURE__ */ jsx(ArrowBackIcon, { sx: {
|
|
379
|
+
fontSize: 18,
|
|
380
|
+
color: "var(--color-gray1)"
|
|
381
|
+
} })
|
|
382
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
383
|
+
variant: "h5",
|
|
384
|
+
fontWeight: "bold",
|
|
385
|
+
sx: { color: "var(--color-text)" },
|
|
386
|
+
children: "Duplicate Probables Manual Report"
|
|
387
|
+
})]
|
|
388
|
+
}), /* @__PURE__ */ jsxs(Paper, {
|
|
389
|
+
elevation: 0,
|
|
390
|
+
className: "rounded-lg overflow-hidden border border-gray-200 bg-white",
|
|
391
|
+
children: [/* @__PURE__ */ jsx(Grid, {
|
|
392
|
+
container: !0,
|
|
393
|
+
className: "border-b border-gray-200 px-6 pt-3 gap-8 bg-white",
|
|
394
|
+
children: ["Unresolved Members", "Resolved Members"].map((e, t) => /* @__PURE__ */ jsx(Typography, {
|
|
395
|
+
className: `cursor-pointer pb-3 text-sm font-bold uppercase tracking-wider transition-all duration-200 ${t === 1 === _ ? "text-blue-600 border-b-[3px] border-blue-600 scale-105" : "text-gray-400 hover:text-gray-600 hover:border-b-[3px] hover:border-gray-300"}`,
|
|
396
|
+
onClick: () => v(t === 1),
|
|
397
|
+
style: { transformOrigin: "bottom" },
|
|
398
|
+
children: e
|
|
399
|
+
}, t))
|
|
400
|
+
}), /* @__PURE__ */ jsx(CustomizedTable, {
|
|
401
|
+
columns: _ ? [
|
|
402
|
+
{
|
|
403
|
+
field: "sn",
|
|
404
|
+
label: "S.N",
|
|
405
|
+
width: 50,
|
|
406
|
+
align: "center",
|
|
407
|
+
render: (e, t) => /* @__PURE__ */ jsx("span", {
|
|
408
|
+
style: {
|
|
409
|
+
display: "inline-flex",
|
|
410
|
+
alignItems: "center",
|
|
411
|
+
justifyContent: "center",
|
|
412
|
+
height: "100%",
|
|
413
|
+
width: "100%",
|
|
414
|
+
minHeight: "56px"
|
|
415
|
+
},
|
|
416
|
+
children: t + 1
|
|
417
|
+
})
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
field: "Member 1 Id",
|
|
421
|
+
label: "UNIQUE HEALTH ID 1"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
field: "Member 2 Id",
|
|
425
|
+
label: "UNIQUE HEALTH ID 2"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
field: "Member 1 Name",
|
|
429
|
+
label: "MEMBER 1 NAME",
|
|
430
|
+
align: "center",
|
|
431
|
+
render: (e) => {
|
|
432
|
+
let t = e["Member 1 Name"] || "", n = getMemberDob(e, 1);
|
|
433
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
434
|
+
style: {
|
|
435
|
+
color: isMember1Valid(e) ? "#198754" : "#dc3545",
|
|
436
|
+
fontWeight: "600",
|
|
437
|
+
lineHeight: "1.2",
|
|
438
|
+
textAlign: "center",
|
|
439
|
+
display: "inline-flex",
|
|
440
|
+
flexDirection: "column",
|
|
441
|
+
alignItems: "center",
|
|
442
|
+
justifyContent: "center",
|
|
443
|
+
height: "100%",
|
|
444
|
+
width: "100%",
|
|
445
|
+
minHeight: "56px"
|
|
446
|
+
},
|
|
447
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), n && /* @__PURE__ */ jsxs("span", {
|
|
448
|
+
style: {
|
|
449
|
+
fontSize: "0.75rem",
|
|
450
|
+
opacity: .85
|
|
451
|
+
},
|
|
452
|
+
children: [
|
|
453
|
+
"(",
|
|
454
|
+
n,
|
|
455
|
+
")"
|
|
456
|
+
]
|
|
457
|
+
})]
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
field: "Location Hierarchy",
|
|
463
|
+
label: "LOCATION"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
field: "Member 2 Name",
|
|
467
|
+
label: "MEMBER 2 NAME",
|
|
468
|
+
align: "center",
|
|
469
|
+
render: (e) => {
|
|
470
|
+
let t = e["Member 2 Name"] || "", n = getMemberDob(e, 2);
|
|
471
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
472
|
+
style: {
|
|
473
|
+
color: isMember1Valid(e) ? "#dc3545" : "#198754",
|
|
474
|
+
fontWeight: "600",
|
|
475
|
+
lineHeight: "1.2",
|
|
476
|
+
textAlign: "center",
|
|
477
|
+
display: "inline-flex",
|
|
478
|
+
flexDirection: "column",
|
|
479
|
+
alignItems: "center",
|
|
480
|
+
justifyContent: "center",
|
|
481
|
+
height: "100%",
|
|
482
|
+
width: "100%",
|
|
483
|
+
minHeight: "56px"
|
|
484
|
+
},
|
|
485
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), n && /* @__PURE__ */ jsxs("span", {
|
|
486
|
+
style: {
|
|
487
|
+
fontSize: "0.75rem",
|
|
488
|
+
opacity: .85
|
|
489
|
+
},
|
|
490
|
+
children: [
|
|
491
|
+
"(",
|
|
492
|
+
n,
|
|
493
|
+
")"
|
|
494
|
+
]
|
|
495
|
+
})]
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
field: "merged_by",
|
|
501
|
+
label: "MERGED BY"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
field: "modified_on",
|
|
505
|
+
label: "MERGED ON"
|
|
506
|
+
}
|
|
507
|
+
] : [
|
|
508
|
+
{
|
|
509
|
+
field: "sn",
|
|
510
|
+
label: "S.N",
|
|
511
|
+
width: 50,
|
|
512
|
+
align: "center",
|
|
513
|
+
render: (e, t) => /* @__PURE__ */ jsx("span", {
|
|
514
|
+
style: {
|
|
515
|
+
display: "inline-flex",
|
|
516
|
+
alignItems: "center",
|
|
517
|
+
justifyContent: "center",
|
|
518
|
+
height: "100%",
|
|
519
|
+
width: "100%",
|
|
520
|
+
minHeight: "56px"
|
|
521
|
+
},
|
|
522
|
+
children: t + 1
|
|
523
|
+
})
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
field: "Member 1 Id",
|
|
527
|
+
label: "UNIQUE HEALTH ID 1"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
field: "Member 2 Id",
|
|
531
|
+
label: "UNIQUE HEALTH ID 2"
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
field: "Member 1 Name",
|
|
535
|
+
label: "MEMBER 1 NAME & DOB",
|
|
536
|
+
align: "center",
|
|
537
|
+
render: (e) => {
|
|
538
|
+
let t = e["Member 1 Name"] || "", n = getMemberDob(e, 1);
|
|
539
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
540
|
+
style: {
|
|
541
|
+
textAlign: "center",
|
|
542
|
+
lineHeight: "1.2",
|
|
543
|
+
display: "inline-flex",
|
|
544
|
+
flexDirection: "column",
|
|
545
|
+
alignItems: "center",
|
|
546
|
+
justifyContent: "center",
|
|
547
|
+
height: "100%",
|
|
548
|
+
width: "100%",
|
|
549
|
+
minHeight: "56px"
|
|
550
|
+
},
|
|
551
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), n && /* @__PURE__ */ jsxs("span", {
|
|
552
|
+
style: {
|
|
553
|
+
fontSize: "0.75rem",
|
|
554
|
+
color: "#666"
|
|
555
|
+
},
|
|
556
|
+
children: [
|
|
557
|
+
"(",
|
|
558
|
+
n,
|
|
559
|
+
")"
|
|
560
|
+
]
|
|
561
|
+
})]
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
field: "Member 1 Services",
|
|
567
|
+
label: "MEMBER 1 SERVICES"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
field: "Location Hierarchy",
|
|
571
|
+
label: "LOCATION"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
field: "Member 2 Name",
|
|
575
|
+
label: "MEMBER 2 NAME & DOB",
|
|
576
|
+
align: "center",
|
|
577
|
+
render: (e) => {
|
|
578
|
+
let t = e["Member 2 Name"] || "", n = getMemberDob(e, 2);
|
|
579
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
580
|
+
style: {
|
|
581
|
+
textAlign: "center",
|
|
582
|
+
lineHeight: "1.2",
|
|
583
|
+
display: "inline-flex",
|
|
584
|
+
flexDirection: "column",
|
|
585
|
+
alignItems: "center",
|
|
586
|
+
justifyContent: "center",
|
|
587
|
+
height: "100%",
|
|
588
|
+
width: "100%",
|
|
589
|
+
minHeight: "56px"
|
|
590
|
+
},
|
|
591
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), n && /* @__PURE__ */ jsxs("span", {
|
|
592
|
+
style: {
|
|
593
|
+
fontSize: "0.75rem",
|
|
594
|
+
color: "#666"
|
|
595
|
+
},
|
|
596
|
+
children: [
|
|
597
|
+
"(",
|
|
598
|
+
n,
|
|
599
|
+
")"
|
|
600
|
+
]
|
|
601
|
+
})]
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
field: "Member 2 Services",
|
|
607
|
+
label: "MEMBER 2 SERVICES"
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
tableData: Z,
|
|
611
|
+
onRowClick: q,
|
|
612
|
+
paginationConfig: {
|
|
613
|
+
pagination: !0,
|
|
614
|
+
paginationType: "infinite-scroll",
|
|
615
|
+
loadMore: () => Y && Ee(),
|
|
616
|
+
hasMore: Y,
|
|
617
|
+
rowsPerPageInTable: 20
|
|
618
|
+
},
|
|
619
|
+
isLoading: De
|
|
620
|
+
})]
|
|
621
|
+
})] }) : A && /* @__PURE__ */ jsx("div", {
|
|
622
|
+
className: "row mx-2",
|
|
623
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", {
|
|
624
|
+
className: "row",
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ jsxs("div", {
|
|
627
|
+
className: "col-12",
|
|
628
|
+
children: [
|
|
629
|
+
B && /* @__PURE__ */ jsx("div", {
|
|
630
|
+
className: "section-title d-flex justify-content-end",
|
|
631
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
632
|
+
className: "btn btn-primary",
|
|
633
|
+
onClick: () => I(!0),
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
636
|
+
icon: faPlusCircle,
|
|
637
|
+
className: "mr-1"
|
|
638
|
+
}),
|
|
639
|
+
" ",
|
|
640
|
+
"Add Duplicates"
|
|
641
|
+
]
|
|
642
|
+
})
|
|
643
|
+
}),
|
|
644
|
+
/* @__PURE__ */ jsxs("div", {
|
|
645
|
+
className: "section-title d-flex justify-content-between",
|
|
646
|
+
style: { alignItems: "center" },
|
|
647
|
+
children: [/* @__PURE__ */ jsxs("h4", {
|
|
648
|
+
className: "text mx-3",
|
|
649
|
+
children: [
|
|
650
|
+
"NAME:",
|
|
651
|
+
" ",
|
|
652
|
+
[
|
|
653
|
+
A.m1.first_name,
|
|
654
|
+
A.m1.middle_name,
|
|
655
|
+
A.m1.last_name
|
|
656
|
+
].filter(Boolean).join(" ")
|
|
657
|
+
]
|
|
658
|
+
}), /* @__PURE__ */ jsxs("div", { children: [
|
|
659
|
+
/* @__PURE__ */ jsx("button", {
|
|
660
|
+
className: "btn-arrow",
|
|
661
|
+
onClick: () => N > 0 && q(Z[N - 1], N - 1),
|
|
662
|
+
disabled: N === 0,
|
|
663
|
+
style: {
|
|
664
|
+
border: "1px solid #ccc",
|
|
665
|
+
borderRadius: 1.5,
|
|
666
|
+
padding: "4px 10px",
|
|
667
|
+
marginRight: 4,
|
|
668
|
+
background: "white",
|
|
669
|
+
cursor: N === 0 ? "not-allowed" : "pointer"
|
|
670
|
+
},
|
|
671
|
+
children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faChevronLeft })
|
|
672
|
+
}),
|
|
673
|
+
/* @__PURE__ */ jsx("button", {
|
|
674
|
+
className: "btn-arrow",
|
|
675
|
+
onClick: () => N < Z.length - 1 && q(Z[N + 1], N + 1),
|
|
676
|
+
disabled: N >= Z.length - 1,
|
|
677
|
+
style: {
|
|
678
|
+
border: "1px solid #ccc",
|
|
679
|
+
borderRadius: 1.5,
|
|
680
|
+
padding: "4px 10px",
|
|
681
|
+
marginRight: 8,
|
|
682
|
+
background: "white",
|
|
683
|
+
cursor: N >= Z.length - 1 ? "not-allowed" : "pointer"
|
|
684
|
+
},
|
|
685
|
+
children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faChevronRight })
|
|
686
|
+
}),
|
|
687
|
+
/* @__PURE__ */ jsx("button", {
|
|
688
|
+
className: "btn btn-warning",
|
|
689
|
+
style: { marginRight: 4 },
|
|
690
|
+
children: "Mark Valid"
|
|
691
|
+
}),
|
|
692
|
+
/* @__PURE__ */ jsx("button", {
|
|
693
|
+
className: "btn btn-info",
|
|
694
|
+
children: "Merge"
|
|
695
|
+
})
|
|
696
|
+
] })]
|
|
697
|
+
}),
|
|
698
|
+
/* @__PURE__ */ jsx("div", {
|
|
699
|
+
style: $.summaryBox,
|
|
700
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
701
|
+
style: $.summaryBoxContent,
|
|
702
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
703
|
+
style: {
|
|
704
|
+
listStyleType: "disc",
|
|
705
|
+
marginLeft: 15
|
|
706
|
+
},
|
|
707
|
+
children: Te.map((e, t) => /* @__PURE__ */ jsx("li", {
|
|
708
|
+
style: {
|
|
709
|
+
fontSize: 16,
|
|
710
|
+
color: "#555"
|
|
711
|
+
},
|
|
712
|
+
children: e
|
|
713
|
+
}, t))
|
|
714
|
+
})
|
|
715
|
+
})
|
|
716
|
+
})
|
|
717
|
+
]
|
|
718
|
+
}),
|
|
719
|
+
/* @__PURE__ */ jsx("div", {
|
|
720
|
+
className: "col-12",
|
|
721
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("table", {
|
|
722
|
+
className: "table table-striped table-bordered",
|
|
723
|
+
style: { overflow: "hidden" },
|
|
724
|
+
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
725
|
+
/* @__PURE__ */ jsx("th", {
|
|
726
|
+
style: { minWidth: "23vw" },
|
|
727
|
+
children: "#"
|
|
728
|
+
}),
|
|
729
|
+
/* @__PURE__ */ jsx("th", {
|
|
730
|
+
style: { minWidth: "23vw" },
|
|
731
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
732
|
+
className: "d-flex align-items-center",
|
|
733
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
734
|
+
className: "flex-grow-1",
|
|
735
|
+
children: "Duplicate 1"
|
|
736
|
+
})
|
|
737
|
+
})
|
|
738
|
+
}),
|
|
739
|
+
/* @__PURE__ */ jsx("th", {
|
|
740
|
+
style: { minWidth: "23vw" },
|
|
741
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
742
|
+
className: "d-flex align-items-center",
|
|
743
|
+
children: /* @__PURE__ */ jsx("span", { children: "Duplicate 2" })
|
|
744
|
+
})
|
|
745
|
+
})
|
|
746
|
+
] }) }), /* @__PURE__ */ jsxs("tbody", { children: [/* @__PURE__ */ jsx("tr", {
|
|
747
|
+
onClick: () => H(!V),
|
|
748
|
+
style: { cursor: "pointer" },
|
|
749
|
+
children: /* @__PURE__ */ jsxs("td", {
|
|
750
|
+
colSpan: 3,
|
|
751
|
+
style: { verticalAlign: "middle" },
|
|
752
|
+
children: [
|
|
753
|
+
/* @__PURE__ */ jsx("strong", {
|
|
754
|
+
style: { display: "inline-block" },
|
|
755
|
+
children: "DEMOGRAPHICS"
|
|
756
|
+
}),
|
|
757
|
+
" ",
|
|
758
|
+
/* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
759
|
+
icon: faMinusCircle,
|
|
760
|
+
className: V ? "text-danger" : "text-success",
|
|
761
|
+
style: {
|
|
762
|
+
fontSize: 20,
|
|
763
|
+
display: "inline-block",
|
|
764
|
+
verticalAlign: "middle",
|
|
765
|
+
marginLeft: 6
|
|
766
|
+
}
|
|
767
|
+
})
|
|
768
|
+
]
|
|
769
|
+
})
|
|
770
|
+
}), V && DEMO_FIELDS.map((e) => {
|
|
771
|
+
let t = K(A.m1, e), n = K(A.m2, e), r = A.m1[e.altKey || e.key], i = A.m2[e.altKey || e.key], a = G(e, r, i) ? {
|
|
772
|
+
backgroundColor: "var(--color-gray1)",
|
|
773
|
+
color: "white",
|
|
774
|
+
fontWeight: "bold"
|
|
775
|
+
} : {}, o = e.isLink ? {
|
|
776
|
+
cursor: "pointer",
|
|
777
|
+
color: "var(--color-primary)"
|
|
778
|
+
} : {};
|
|
779
|
+
return /* @__PURE__ */ jsxs("tr", { children: [
|
|
780
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("strong", { children: e.label }) }),
|
|
781
|
+
/* @__PURE__ */ jsx("td", {
|
|
782
|
+
style: {
|
|
783
|
+
...a,
|
|
784
|
+
...o
|
|
785
|
+
},
|
|
786
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
787
|
+
style: o,
|
|
788
|
+
onClick: () => e.isLink && Q(e.key, r),
|
|
789
|
+
children: t
|
|
790
|
+
})
|
|
791
|
+
}),
|
|
792
|
+
/* @__PURE__ */ jsx("td", {
|
|
793
|
+
style: {
|
|
794
|
+
...a,
|
|
795
|
+
...o
|
|
796
|
+
},
|
|
797
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
798
|
+
style: o,
|
|
799
|
+
onClick: () => e.isLink && Q(e.key, i),
|
|
800
|
+
children: n
|
|
801
|
+
})
|
|
802
|
+
})
|
|
803
|
+
] }, e.key);
|
|
804
|
+
})] })]
|
|
805
|
+
}) })
|
|
806
|
+
}),
|
|
807
|
+
/* @__PURE__ */ jsx("div", {
|
|
808
|
+
className: "col-12 d-flex justify-content-end mb-3",
|
|
809
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
810
|
+
className: "btn btn-warning",
|
|
811
|
+
onClick: () => b("list"),
|
|
812
|
+
children: "Back"
|
|
813
|
+
})
|
|
814
|
+
})
|
|
815
|
+
]
|
|
816
|
+
}) })
|
|
817
|
+
}),
|
|
818
|
+
/* @__PURE__ */ jsx(ManualDuplicateEntryModal, {
|
|
819
|
+
open: F,
|
|
820
|
+
onClose: () => I(!1),
|
|
821
|
+
onSuccess: () => {
|
|
822
|
+
U(), X();
|
|
823
|
+
},
|
|
824
|
+
user: m,
|
|
825
|
+
canSave: B
|
|
826
|
+
}),
|
|
827
|
+
/* @__PURE__ */ jsx(Suspense, { children: /* @__PURE__ */ jsx(SideOverlay, {
|
|
828
|
+
title: "Search Members",
|
|
829
|
+
FormBody: FilterForm,
|
|
830
|
+
handleOverlayState: () => g((e) => !e),
|
|
831
|
+
overlayOpen: h,
|
|
832
|
+
ModalProps: { keepMounted: !0 },
|
|
833
|
+
formProps: {
|
|
834
|
+
applyFilters: (e) => {
|
|
835
|
+
S(e.searchBy), w(e.searchString), E(e.locationId), g(!1);
|
|
836
|
+
},
|
|
837
|
+
initialSearchBy: x,
|
|
838
|
+
initialSearchString: C,
|
|
839
|
+
initialLocationId: T
|
|
840
|
+
}
|
|
841
|
+
}) })
|
|
842
|
+
]
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
export { DuplicateProbablesManualReport as default };
|
|
846
|
+
|
|
847
|
+
//# sourceMappingURL=DuplicateProbablesManualReport-8odf91cO.js.map
|