@bahmni/home-app 0.0.1-dev.314 → 0.0.1-dev.315
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/{DocumentsTable-CFMS0Z9e-DzEJKvb-.js → DocumentsTable-Vqt2a9Au-BqvWVvVd.js} +13 -13
- package/dist/FormsTable-Chdn76ek-DM0DtH1X.js +234 -0
- package/dist/{LNWAZHJI-DwcB1_Nl.js → LNWAZHJI-D0IytNdf.js} +2 -2
- package/dist/{MWZ6AO7Z-Bi1eK8Us.js → MWZ6AO7Z-K22-zrPG.js} +2 -2
- package/dist/{Observations-DvN06foI-31uUmKLu.js → Observations-7ynzJK04-DWFmHo_V.js} +34 -34
- package/dist/{YPM2AS64-CwPKOZhi.js → YPM2AS64-BJtfTJL1.js} +138 -138
- package/dist/{index-BPWfnVa5.js → index-D-1eXGIV.js} +25 -25
- package/dist/{index-JsW95gMN.js → index-D3RwPQ83.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-BOqHNyfQ-D0ReAIVb.js +0 -234
|
@@ -95084,7 +95084,7 @@ const Qrt = () => {
|
|
|
95084
95084
|
);
|
|
95085
95085
|
return t;
|
|
95086
95086
|
};
|
|
95087
|
-
L0(() => Promise.resolve().then(() => HI2)), L0(() => Promise.resolve().then(() => JI2)), L0(() => Promise.resolve().then(() => AB2)), L0(() => Promise.resolve().then(() => SB2)), L0(() => import("./DocumentsTable-
|
|
95087
|
+
L0(() => Promise.resolve().then(() => HI2)), L0(() => Promise.resolve().then(() => JI2)), L0(() => Promise.resolve().then(() => AB2)), L0(() => Promise.resolve().then(() => SB2)), L0(() => import("./DocumentsTable-Vqt2a9Au-BqvWVvVd.js")), L0(() => Promise.resolve().then(() => Rj2)), L0(() => import("./FormsTable-Chdn76ek-DM0DtH1X.js")), L0(() => Promise.resolve().then(() => gj2)), L0(() => import("./Observations-7ynzJK04-DWFmHo_V.js")), L0(
|
|
95088
95088
|
() => Promise.resolve().then(() => iq2)
|
|
95089
95089
|
), L0(
|
|
95090
95090
|
() => Promise.resolve().then(() => ZF2)
|
|
@@ -176929,7 +176929,7 @@ var c3t = (t, e = !1) => {
|
|
|
176929
176929
|
const e = sK1(() => {
|
|
176930
176930
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t;
|
|
176931
176931
|
let d;
|
|
176932
|
-
return this.#l ? d = this.#l : (d = lK1(() => import("./LNWAZHJI-
|
|
176932
|
+
return this.#l ? d = this.#l : (d = lK1(() => import("./LNWAZHJI-D0IytNdf.js")), this.#l = d), LK1(this.#h, this.#r), aK1(d, cK1({
|
|
176933
176933
|
get queryFlavor() {
|
|
176934
176934
|
return r.#d;
|
|
176935
176935
|
},
|
|
@@ -177027,7 +177027,7 @@ var c3t = (t, e = !1) => {
|
|
|
177027
177027
|
const e = sK1(() => {
|
|
177028
177028
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t, [d] = this.#l;
|
|
177029
177029
|
let u;
|
|
177030
|
-
return this.#i ? u = this.#i : (u = lK1(() => import("./MWZ6AO7Z-
|
|
177030
|
+
return this.#i ? u = this.#i : (u = lK1(() => import("./MWZ6AO7Z-K22-zrPG.js")), this.#i = u), LK1(this.#h, this.#r), aK1(u, cK1({
|
|
177031
177031
|
get queryFlavor() {
|
|
177032
177032
|
return r.#d;
|
|
177033
177033
|
},
|
|
@@ -177157,7 +177157,7 @@ const trt = {
|
|
|
177157
177157
|
}
|
|
177158
177158
|
}
|
|
177159
177159
|
}, rrt = "home", u3t = "/bahmni/home/index.html#/login", h3t = "/bahmni/home/index.html#/changePassword", p3t = 6, nrt = L0(
|
|
177160
|
-
() => import("./index-
|
|
177160
|
+
() => import("./index-D3RwPQ83.js").then((t) => ({
|
|
177161
177161
|
default: t.HomePage
|
|
177162
177162
|
}))
|
|
177163
177163
|
), ort = [
|
|
@@ -177187,33 +177187,33 @@ function f3t() {
|
|
|
177187
177187
|
] }) }) }) }) }) }) : /* @__PURE__ */ ce(fN1, {});
|
|
177188
177188
|
}
|
|
177189
177189
|
export {
|
|
177190
|
-
|
|
177190
|
+
krt as $,
|
|
177191
177191
|
RC0 as A,
|
|
177192
|
-
|
|
177192
|
+
Prt as B,
|
|
177193
177193
|
h3t as C,
|
|
177194
177194
|
et as D,
|
|
177195
|
-
|
|
177196
|
-
|
|
177197
|
-
|
|
177195
|
+
N0t as E,
|
|
177196
|
+
Frt as F,
|
|
177197
|
+
Wrt as G,
|
|
177198
177198
|
p3t as H,
|
|
177199
|
-
|
|
177200
|
-
|
|
177201
|
-
|
|
177199
|
+
Srt as I,
|
|
177200
|
+
Grt as J,
|
|
177201
|
+
Urt as K,
|
|
177202
177202
|
u3t as L,
|
|
177203
177203
|
vN2 as M,
|
|
177204
|
-
|
|
177204
|
+
Dnt as N,
|
|
177205
177205
|
R0 as O,
|
|
177206
|
-
|
|
177206
|
+
Brt as P,
|
|
177207
177207
|
b$1 as Q,
|
|
177208
|
-
|
|
177208
|
+
ent as R,
|
|
177209
177209
|
AN2 as S,
|
|
177210
|
-
|
|
177211
|
-
|
|
177210
|
+
d3t as T,
|
|
177211
|
+
g0 as U,
|
|
177212
177212
|
aK1 as V,
|
|
177213
177213
|
Bnt as W,
|
|
177214
|
-
|
|
177215
|
-
|
|
177216
|
-
|
|
177214
|
+
Yrt as X,
|
|
177215
|
+
Krt as Y,
|
|
177216
|
+
Irt as Z,
|
|
177217
177217
|
X2 as _,
|
|
177218
177218
|
o8 as a,
|
|
177219
177219
|
O0t as a0,
|
|
@@ -177263,20 +177263,20 @@ export {
|
|
|
177263
177263
|
Utt as ay,
|
|
177264
177264
|
qnt as az,
|
|
177265
177265
|
an as b,
|
|
177266
|
-
|
|
177267
|
-
|
|
177266
|
+
rv as c,
|
|
177267
|
+
mrt as d,
|
|
177268
177268
|
HMe as e,
|
|
177269
177269
|
WH2 as f,
|
|
177270
177270
|
r2 as g,
|
|
177271
177271
|
Tt as h,
|
|
177272
177272
|
yy as i,
|
|
177273
|
-
|
|
177274
|
-
|
|
177273
|
+
jrt as j,
|
|
177274
|
+
Zrt as k,
|
|
177275
177275
|
$nt as l,
|
|
177276
177276
|
rE as m,
|
|
177277
177277
|
Ft as n,
|
|
177278
177278
|
Nr as o,
|
|
177279
|
-
|
|
177279
|
+
_nt as p,
|
|
177280
177280
|
Rnt as q,
|
|
177281
177281
|
Qrt as r,
|
|
177282
177282
|
Ant as s,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as Ne, jsx as ne, Fragment as Xi } from "react/jsx-runtime";
|
|
2
|
-
import { u as ot, l as Qi, A as Ji, i as ec, t as tc, m as rc,
|
|
2
|
+
import { u as ot, l as Qi, A as Ji, i as ec, t as tc, m as rc, p as nc, H as oc, N as hi, q as ac, r as lc, o as ic, C as cc, s as sc, L as fc, y as pc, E as hc, R as uc } from "./index-D-1eXGIV.js";
|
|
3
3
|
import * as X from "react";
|
|
4
4
|
import r, { createContext as at, useContext as $e, Children as q1, useState as pe, useLayoutEffect as V1, useEffect as ie, useMemo as lt, useCallback as Me, useRef as oe, forwardRef as y1, useReducer as dc, cloneElement as G1, isValidElement as wc } from "react";
|
|
5
5
|
import { useQuery as mc } from "@tanstack/react-query";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as k, w as fe, v as ye, h as he, Q as be, k as pe } from "./index-BPWfnVa5.js";
|
|
3
|
-
import { useQueryClient as ge, useQuery as h } from "@tanstack/react-query";
|
|
4
|
-
import { useState as j, useMemo as d, useCallback as b } from "react";
|
|
5
|
-
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
|
|
6
|
-
formsTableBody: Ne,
|
|
7
|
-
customAccordianItem: Oe
|
|
8
|
-
}, Ae = (m) => m ? m.extension?.find(
|
|
9
|
-
(l) => l.url === pe
|
|
10
|
-
)?.valueString : void 0, Ie = ({
|
|
11
|
-
episodeOfCareUuids: m,
|
|
12
|
-
encounterUuids: l,
|
|
13
|
-
config: w
|
|
14
|
-
}) => {
|
|
15
|
-
const { t: n } = te(), c = oe(), [f, T] = j(!1), [o, v] = j(null), {
|
|
16
|
-
numberOfVisits: x,
|
|
17
|
-
hideThumbnail: K = !1,
|
|
18
|
-
forms: y
|
|
19
|
-
} = w ?? {}, F = se(
|
|
20
|
-
m,
|
|
21
|
-
l
|
|
22
|
-
), Q = ge(), {
|
|
23
|
-
data: I = [],
|
|
24
|
-
isLoading: B,
|
|
25
|
-
isError: E,
|
|
26
|
-
error: V,
|
|
27
|
-
refetch: H
|
|
28
|
-
} = h({
|
|
29
|
-
queryKey: ["forms", c, m],
|
|
30
|
-
queryFn: () => ne(c, void 0, x),
|
|
31
|
-
enabled: !!c && !F
|
|
32
|
-
}), L = d(() => {
|
|
33
|
-
let e = I;
|
|
34
|
-
return l && l.length > 0 && (e = e.filter(
|
|
35
|
-
(r) => l.includes(r.encounterUuid)
|
|
36
|
-
)), Array.isArray(y) && y.length > 0 && (e = e.filter(
|
|
37
|
-
(r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
38
|
-
)), e;
|
|
39
|
-
}, [I, l, y]), { data: D = [] } = h({
|
|
40
|
-
queryKey: ["observationForms"],
|
|
41
|
-
queryFn: () => de()
|
|
42
|
-
}), S = b(
|
|
43
|
-
(e) => D.find((r) => r.name === e)?.uuid,
|
|
44
|
-
[D]
|
|
45
|
-
), p = d(() => {
|
|
46
|
-
if (o)
|
|
47
|
-
return S(o.formName);
|
|
48
|
-
}, [o, S]), {
|
|
49
|
-
data: u,
|
|
50
|
-
isLoading: $,
|
|
51
|
-
isError: z,
|
|
52
|
-
error: g
|
|
53
|
-
} = h({
|
|
54
|
-
queryKey: ["formMetadata", p],
|
|
55
|
-
queryFn: () => ie(p),
|
|
56
|
-
enabled: !!p && f
|
|
57
|
-
}), {
|
|
58
|
-
data: N,
|
|
59
|
-
isLoading: G,
|
|
60
|
-
isError: P,
|
|
61
|
-
error: O
|
|
62
|
-
} = h({
|
|
63
|
-
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
64
|
-
queryFn: () => le(o.encounterUuid),
|
|
65
|
-
enabled: !!o?.encounterUuid && f
|
|
66
|
-
});
|
|
67
|
-
ue(
|
|
68
|
-
(e) => {
|
|
69
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (H(), Q.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
|
-
},
|
|
71
|
-
[c]
|
|
72
|
-
);
|
|
73
|
-
const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
74
|
-
const r = Ae(e);
|
|
75
|
-
return !r || r.includes(o.formName);
|
|
76
|
-
}), [N, o?.formName]), J = d(() => {
|
|
77
|
-
if (!u?.schema) return;
|
|
78
|
-
const e = [], r = (a) => {
|
|
79
|
-
(a ?? []).forEach((s) => {
|
|
80
|
-
const t = s;
|
|
81
|
-
t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
return r(
|
|
85
|
-
u.schema.controls ?? []
|
|
86
|
-
), e.length > 0 ? e : void 0;
|
|
87
|
-
}, [u]), W = d(() => {
|
|
88
|
-
if (!u?.schema) return;
|
|
89
|
-
const e = {}, r = (a, s) => {
|
|
90
|
-
for (const t of a)
|
|
91
|
-
if (t.type === "section") {
|
|
92
|
-
const A = t.label?.value ?? "Section";
|
|
93
|
-
r(t.controls ?? [], A);
|
|
94
|
-
} else
|
|
95
|
-
t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
|
|
96
|
-
};
|
|
97
|
-
return r(
|
|
98
|
-
u.schema.controls ?? [],
|
|
99
|
-
null
|
|
100
|
-
), Object.keys(e).length > 0 ? e : void 0;
|
|
101
|
-
}, [u]), X = d(() => {
|
|
102
|
-
if (g)
|
|
103
|
-
return q(g).message;
|
|
104
|
-
if (O)
|
|
105
|
-
return q(O).message;
|
|
106
|
-
}, [g, O]), _ = d(
|
|
107
|
-
() => [
|
|
108
|
-
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
109
|
-
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
110
|
-
],
|
|
111
|
-
[n]
|
|
112
|
-
), Z = d(
|
|
113
|
-
() => [
|
|
114
|
-
{ key: "recordedOn", sortable: !0 },
|
|
115
|
-
{ key: "recordedBy", sortable: !0 }
|
|
116
|
-
],
|
|
117
|
-
[]
|
|
118
|
-
), C = d(() => {
|
|
119
|
-
const e = L.reduce(
|
|
120
|
-
(r, a) => {
|
|
121
|
-
const s = a.formName;
|
|
122
|
-
r[s] ??= [];
|
|
123
|
-
const t = a.providers.map((A) => A.providerName).filter(Boolean).join(", ");
|
|
124
|
-
return r[s].push({
|
|
125
|
-
id: a.encounterUuid,
|
|
126
|
-
formName: a.formName,
|
|
127
|
-
recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
|
|
128
|
-
recordedBy: t ?? "--",
|
|
129
|
-
encounterDateTime: a.encounterDateTime,
|
|
130
|
-
encounterUuid: a.encounterUuid
|
|
131
|
-
}), r;
|
|
132
|
-
},
|
|
133
|
-
{}
|
|
134
|
-
);
|
|
135
|
-
return Object.entries(e).map(
|
|
136
|
-
([r, a]) => ({
|
|
137
|
-
formName: r,
|
|
138
|
-
records: a.sort(
|
|
139
|
-
(s, t) => t.encounterDateTime - s.encounterDateTime
|
|
140
|
-
)
|
|
141
|
-
})
|
|
142
|
-
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
143
|
-
}, [L, n]), R = b((e) => {
|
|
144
|
-
v(e), T(!0);
|
|
145
|
-
}, []), ee = b(() => {
|
|
146
|
-
T(!1), v(null);
|
|
147
|
-
}, []), U = b(
|
|
148
|
-
(e, r) => {
|
|
149
|
-
switch (r) {
|
|
150
|
-
case "recordedOn":
|
|
151
|
-
return /* @__PURE__ */ i(ce, { onClick: () => R(e), children: e.recordedOn });
|
|
152
|
-
case "recordedBy":
|
|
153
|
-
return e.recordedBy;
|
|
154
|
-
default:
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
[R]
|
|
159
|
-
);
|
|
160
|
-
return /* @__PURE__ */ re(ae, { children: [
|
|
161
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || E || C.length === 0 || F ? /* @__PURE__ */ i(
|
|
162
|
-
k,
|
|
163
|
-
{
|
|
164
|
-
headers: _,
|
|
165
|
-
ariaLabel: n("FORMS_HEADING"),
|
|
166
|
-
rows: [],
|
|
167
|
-
loading: B,
|
|
168
|
-
errorStateMessage: E ? V?.message : void 0,
|
|
169
|
-
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
170
|
-
renderCell: U,
|
|
171
|
-
className: M.formsTableBody,
|
|
172
|
-
dataTestId: "forms-table"
|
|
173
|
-
}
|
|
174
|
-
) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
|
|
175
|
-
const { formName: a, records: s } = e;
|
|
176
|
-
return /* @__PURE__ */ i(
|
|
177
|
-
ye,
|
|
178
|
-
{
|
|
179
|
-
title: a,
|
|
180
|
-
className: M.customAccordianItem,
|
|
181
|
-
testId: `accordian-title-${a}`,
|
|
182
|
-
open: r === 0,
|
|
183
|
-
children: /* @__PURE__ */ i(
|
|
184
|
-
k,
|
|
185
|
-
{
|
|
186
|
-
headers: _,
|
|
187
|
-
ariaLabel: n("FORMS_HEADING"),
|
|
188
|
-
rows: s,
|
|
189
|
-
loading: !1,
|
|
190
|
-
errorStateMessage: "",
|
|
191
|
-
sortable: Z,
|
|
192
|
-
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
193
|
-
renderCell: U,
|
|
194
|
-
className: M.formsTableBody,
|
|
195
|
-
dataTestId: `forms-table-${a}`
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
},
|
|
199
|
-
a
|
|
200
|
-
);
|
|
201
|
-
}) }) }),
|
|
202
|
-
f && o && /* @__PURE__ */ i(
|
|
203
|
-
he,
|
|
204
|
-
{
|
|
205
|
-
id: "modalIdForActionAreaLayout",
|
|
206
|
-
portalId: "main-display-area",
|
|
207
|
-
open: f,
|
|
208
|
-
onRequestClose: ee,
|
|
209
|
-
modalHeading: o.formName,
|
|
210
|
-
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
211
|
-
passiveModal: !0,
|
|
212
|
-
size: "md",
|
|
213
|
-
testId: "form-details-modal",
|
|
214
|
-
children: /* @__PURE__ */ i(
|
|
215
|
-
be,
|
|
216
|
-
{
|
|
217
|
-
observations: Y,
|
|
218
|
-
isLoading: $ || G,
|
|
219
|
-
isError: z || P,
|
|
220
|
-
errorMessage: X,
|
|
221
|
-
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
|
-
testIdPrefix: o.formName,
|
|
223
|
-
hideThumbnail: K,
|
|
224
|
-
controlOrder: J,
|
|
225
|
-
sectionMap: W
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
}
|
|
229
|
-
)
|
|
230
|
-
] });
|
|
231
|
-
};
|
|
232
|
-
export {
|
|
233
|
-
Ie as default
|
|
234
|
-
};
|