@bahmni/widgets 0.0.1-dev.195 → 0.0.1-dev.197
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-CRIQgRdm.js → DocumentsTable-BH2Lp5eF.js} +7 -7
- package/dist/{FormsTable-Bz8HPevx.js → FormsTable-CMgSIy0l.js} +43 -43
- package/dist/{Observations-DvI9DoSw.js → Observations-o0yfLJhC.js} +26 -26
- package/dist/{index-DfF8askw.js → index-dzifQaG5.js} +33 -33
- package/dist/index.js +7 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { u as V, a as
|
|
2
|
+
import { u as V, a as H, b as P, F as q, j as z, c as G, y as Y } from "./index-dzifQaG5.js";
|
|
3
3
|
import { useQuery as K } from "@tanstack/react-query";
|
|
4
4
|
import { useState as C, useCallback as E, useEffect as M, useMemo as f } from "react";
|
|
5
5
|
import { useTranslation as Q } from "react-i18next";
|
|
@@ -39,16 +39,16 @@ const re = [
|
|
|
39
39
|
null
|
|
40
40
|
), [w, T] = C(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), p = V(), { t: n } = Q(), { addNotification: y } =
|
|
42
|
+
), p = V(), { t: n } = Q(), { addNotification: y } = H(), S = E((e) => {
|
|
43
43
|
O(e), g(!0);
|
|
44
44
|
}, []), b = E(() => {
|
|
45
45
|
g(!1), O(null), T(/* @__PURE__ */ new Set());
|
|
46
46
|
}, []), L = E((e) => {
|
|
47
47
|
T((o) => new Set(o).add(e));
|
|
48
|
-
}, []), { data:
|
|
48
|
+
}, []), { data: j, isLoading: B, isError: I, error: A } = K({
|
|
49
49
|
queryKey: ["documents", p, u],
|
|
50
50
|
enabled: !!p,
|
|
51
|
-
queryFn: () =>
|
|
51
|
+
queryFn: () => P(p, u)
|
|
52
52
|
});
|
|
53
53
|
M(() => {
|
|
54
54
|
I && y({
|
|
@@ -104,7 +104,7 @@ const re = [
|
|
|
104
104
|
return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
|
|
105
105
|
case "action":
|
|
106
106
|
return e.attachments.length > 0 || !!e.documentUrl ? /* @__PURE__ */ s(
|
|
107
|
-
|
|
107
|
+
q,
|
|
108
108
|
{
|
|
109
109
|
onClick: () => S(e),
|
|
110
110
|
className: c.viewAttachmentsLink,
|
|
@@ -124,8 +124,8 @@ const re = [
|
|
|
124
124
|
{
|
|
125
125
|
headers: F,
|
|
126
126
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
127
|
-
rows:
|
|
128
|
-
loading:
|
|
127
|
+
rows: j ?? [],
|
|
128
|
+
loading: B,
|
|
129
129
|
errorStateMessage: I ? A?.message : null,
|
|
130
130
|
sortable: R,
|
|
131
131
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as b, jsx as o, Fragment as
|
|
2
|
-
import { f as
|
|
1
|
+
import { jsxs as b, jsx as o, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { f as K, d as R, Z as ae, r as oe, o as se, e as ne, g as de, i as ie, u as le, h as ce, W as me, K as ue, Y as pe, k as be, l as fe, j as _e, F as ye, c as P, m as he, n as $e, y as ge, D as Ne, R as k } from "./index-dzifQaG5.js";
|
|
3
3
|
import { useQueryClient as ve, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as H, useMemo as g, useCallback as L } from "react";
|
|
5
5
|
import { useTranslation as V } from "react-i18next";
|
|
6
|
-
const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18",
|
|
6
|
+
const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Me = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", De = "_rowContainer_1pd36_43", Te = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", we = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Ee = "_memberRow_1pd36_81", Be = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", qe = "_commentText_1pd36_116", Ue = "_nestedGroup_1pd36_125", xe = "_nestedGroupLabel_1pd36_132", Pe = "_nestedGroupMembers_1pd36_141", s = {
|
|
7
7
|
formsTableBody: Fe,
|
|
8
8
|
customAccordianItem: Oe,
|
|
9
9
|
formContent: Le,
|
|
10
|
-
formDetailsContainer:
|
|
11
|
-
observation:
|
|
10
|
+
formDetailsContainer: Re,
|
|
11
|
+
observation: Me,
|
|
12
12
|
groupContainer: Ce,
|
|
13
13
|
rowContainer: De,
|
|
14
14
|
groupLabel: Te,
|
|
@@ -19,12 +19,12 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
19
19
|
memberLabel: Be,
|
|
20
20
|
memberValue: Ae,
|
|
21
21
|
abnormalValue: Ge,
|
|
22
|
-
commentSection:
|
|
23
|
-
commentText:
|
|
22
|
+
commentSection: Se,
|
|
23
|
+
commentText: qe,
|
|
24
24
|
nestedGroup: Ue,
|
|
25
25
|
nestedGroupLabel: xe,
|
|
26
26
|
nestedGroupMembers: Pe
|
|
27
|
-
},
|
|
27
|
+
}, W = (e) => {
|
|
28
28
|
const r = ae(e);
|
|
29
29
|
return r === "Image" ? /* @__PURE__ */ o(
|
|
30
30
|
oe,
|
|
@@ -40,7 +40,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
40
40
|
n && d ? i = ` (${r} - ${a})` : n ? i = ` (>${r})` : d && (i = ` (<${a})`);
|
|
41
41
|
const u = e.observationValue?.isAbnormal === !0;
|
|
42
42
|
return { rangeString: i, isAbnormal: u };
|
|
43
|
-
},
|
|
43
|
+
}, Y = ({
|
|
44
44
|
member: e,
|
|
45
45
|
depth: r = 0,
|
|
46
46
|
memberIndex: a = 0,
|
|
@@ -70,7 +70,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
70
70
|
className: s.nestedGroupMembers,
|
|
71
71
|
"data-testid": `${c}obs-nested-group-members-${t}-${a}`,
|
|
72
72
|
children: e.members?.map((N, v) => /* @__PURE__ */ o(
|
|
73
|
-
|
|
73
|
+
Y,
|
|
74
74
|
{
|
|
75
75
|
member: N,
|
|
76
76
|
depth: r + 1,
|
|
@@ -84,8 +84,8 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
84
84
|
]
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
|
-
const { rangeString: $, isAbnormal: f } = Q(e), _ =
|
|
88
|
-
return /* @__PURE__ */ b(
|
|
87
|
+
const { rangeString: $, isAbnormal: f } = Q(e), _ = K(e, i), y = _ ? W(_) : null;
|
|
88
|
+
return /* @__PURE__ */ b(j, { children: [
|
|
89
89
|
/* @__PURE__ */ b(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
@@ -96,7 +96,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
96
96
|
/* @__PURE__ */ b(
|
|
97
97
|
"p",
|
|
98
98
|
{
|
|
99
|
-
className:
|
|
99
|
+
className: R(
|
|
100
100
|
s.memberLabel,
|
|
101
101
|
f ? s.abnormalValue : ""
|
|
102
102
|
),
|
|
@@ -110,7 +110,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
110
110
|
/* @__PURE__ */ o(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
|
-
className:
|
|
113
|
+
className: R(
|
|
114
114
|
s.memberValue,
|
|
115
115
|
f ? s.abnormalValue : ""
|
|
116
116
|
),
|
|
@@ -140,7 +140,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
140
140
|
formName: a = "",
|
|
141
141
|
comment: n
|
|
142
142
|
}) => {
|
|
143
|
-
const { t: d } = V(), i = e.members && e.members.length > 0, { rangeString: u, isAbnormal: t } = Q(e), c = a ? `${a}-` : "", $ =
|
|
143
|
+
const { t: d } = V(), i = e.members && e.members.length > 0, { rangeString: u, isAbnormal: t } = Q(e), c = a ? `${a}-` : "", $ = K(e, d), f = $ ? W($) : null;
|
|
144
144
|
return /* @__PURE__ */ b(
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
@@ -156,7 +156,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
156
156
|
/* @__PURE__ */ b(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: R(
|
|
160
160
|
i ? s.groupLabel : s.rowLabel,
|
|
161
161
|
!i && t ? s.abnormalValue : ""
|
|
162
162
|
),
|
|
@@ -173,7 +173,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
173
173
|
className: s.groupMembers,
|
|
174
174
|
"data-testid": `${c}observation-group-members-${e.display}-${r}`,
|
|
175
175
|
children: e.members?.map((_, y) => /* @__PURE__ */ o(
|
|
176
|
-
|
|
176
|
+
Y,
|
|
177
177
|
{
|
|
178
178
|
member: _,
|
|
179
179
|
depth: 0,
|
|
@@ -186,7 +186,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
186
186
|
) : /* @__PURE__ */ o(
|
|
187
187
|
"div",
|
|
188
188
|
{
|
|
189
|
-
className:
|
|
189
|
+
className: R(
|
|
190
190
|
s.rowValue,
|
|
191
191
|
t ? s.abnormalValue : ""
|
|
192
192
|
),
|
|
@@ -214,16 +214,16 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
214
214
|
);
|
|
215
215
|
}, He = (e) => e ? e.extension?.find(
|
|
216
216
|
(a) => a.url === ie
|
|
217
|
-
)?.valueString : void 0,
|
|
217
|
+
)?.valueString : void 0, je = (e) => {
|
|
218
218
|
if (e)
|
|
219
219
|
return e.note?.[0]?.text;
|
|
220
|
-
},
|
|
221
|
-
const a =
|
|
220
|
+
}, Ke = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, T = (e, r) => {
|
|
221
|
+
const a = Ke(e, r);
|
|
222
222
|
return a ? {
|
|
223
223
|
formFieldPath: He(a),
|
|
224
|
-
comment:
|
|
224
|
+
comment: je(a)
|
|
225
225
|
} : {};
|
|
226
|
-
},
|
|
226
|
+
}, We = (e, r) => {
|
|
227
227
|
if (!e?.entry || !r)
|
|
228
228
|
return [];
|
|
229
229
|
const a = de(e);
|
|
@@ -245,7 +245,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
245
245
|
].filter(
|
|
246
246
|
({ formFieldPath: d }) => !d || d.includes(r)
|
|
247
247
|
);
|
|
248
|
-
},
|
|
248
|
+
}, Xe = ({
|
|
249
249
|
episodeOfCareUuids: e,
|
|
250
250
|
encounterUuids: r,
|
|
251
251
|
config: a
|
|
@@ -257,8 +257,8 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
257
257
|
data: y = [],
|
|
258
258
|
isLoading: N,
|
|
259
259
|
isError: v,
|
|
260
|
-
error:
|
|
261
|
-
refetch:
|
|
260
|
+
error: z,
|
|
261
|
+
refetch: Z
|
|
262
262
|
} = O({
|
|
263
263
|
queryKey: ["forms", d, e],
|
|
264
264
|
queryFn: () => me(d, void 0, $),
|
|
@@ -271,16 +271,16 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
271
271
|
}), E = L(
|
|
272
272
|
(l) => I.find((m) => m.name === l)?.uuid,
|
|
273
273
|
[I]
|
|
274
|
-
),
|
|
274
|
+
), M = g(() => {
|
|
275
275
|
if (t)
|
|
276
276
|
return E(t.formName);
|
|
277
277
|
}, [t, E]), { isLoading: J, error: B } = O({
|
|
278
|
-
queryKey: ["formMetadata",
|
|
279
|
-
queryFn: () => pe(
|
|
280
|
-
enabled: !!
|
|
278
|
+
queryKey: ["formMetadata", M],
|
|
279
|
+
queryFn: () => pe(M),
|
|
280
|
+
enabled: !!M && i
|
|
281
281
|
}), {
|
|
282
282
|
data: C,
|
|
283
|
-
isLoading:
|
|
283
|
+
isLoading: X,
|
|
284
284
|
error: A
|
|
285
285
|
} = O({
|
|
286
286
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
@@ -289,14 +289,14 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
289
289
|
});
|
|
290
290
|
fe(
|
|
291
291
|
(l) => {
|
|
292
|
-
l.patientUUID === d && l.updatedConcepts.size > 0 && (
|
|
292
|
+
l.patientUUID === d && l.updatedConcepts.size > 0 && (Z(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
293
293
|
},
|
|
294
294
|
[d]
|
|
295
295
|
);
|
|
296
|
-
const G = g(() => !C || !t?.formName ? [] :
|
|
296
|
+
const G = g(() => !C || !t?.formName ? [] : We(
|
|
297
297
|
C,
|
|
298
298
|
t.formName
|
|
299
|
-
), [C, t?.formName]),
|
|
299
|
+
), [C, t?.formName]), S = g(
|
|
300
300
|
() => [
|
|
301
301
|
{ key: "recordedOn", header: n("FORM_RECORDED_ON") },
|
|
302
302
|
{ key: "recordedBy", header: n("FORM_RECORDED_BY") }
|
|
@@ -308,7 +308,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
308
308
|
{ key: "recordedBy", sortable: !0 }
|
|
309
309
|
],
|
|
310
310
|
[]
|
|
311
|
-
),
|
|
311
|
+
), q = g(() => {
|
|
312
312
|
const l = w.reduce(
|
|
313
313
|
(m, p) => {
|
|
314
314
|
const F = p.formName;
|
|
@@ -350,21 +350,21 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
350
350
|
},
|
|
351
351
|
[U]
|
|
352
352
|
);
|
|
353
|
-
return /* @__PURE__ */ b(
|
|
354
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: N || v ||
|
|
353
|
+
return /* @__PURE__ */ b(j, { children: [
|
|
354
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: N || v || q.length === 0 || f ? /* @__PURE__ */ o(
|
|
355
355
|
P,
|
|
356
356
|
{
|
|
357
|
-
headers:
|
|
357
|
+
headers: S,
|
|
358
358
|
ariaLabel: n("FORMS_HEADING"),
|
|
359
359
|
rows: [],
|
|
360
360
|
loading: N,
|
|
361
|
-
errorStateMessage: v ?
|
|
361
|
+
errorStateMessage: v ? z?.message : void 0,
|
|
362
362
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
363
363
|
renderCell: x,
|
|
364
364
|
className: s.formsTableBody,
|
|
365
365
|
dataTestId: "forms-table"
|
|
366
366
|
}
|
|
367
|
-
) : /* @__PURE__ */ o(he, { align: "start", children:
|
|
367
|
+
) : /* @__PURE__ */ o(he, { align: "start", children: q.map((l, h) => {
|
|
368
368
|
const { formName: m, records: p } = l;
|
|
369
369
|
return /* @__PURE__ */ o(
|
|
370
370
|
$e,
|
|
@@ -376,7 +376,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
376
376
|
children: /* @__PURE__ */ o(
|
|
377
377
|
P,
|
|
378
378
|
{
|
|
379
|
-
headers:
|
|
379
|
+
headers: S,
|
|
380
380
|
ariaLabel: n("FORMS_HEADING"),
|
|
381
381
|
rows: p,
|
|
382
382
|
loading: !1,
|
|
@@ -404,7 +404,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
404
404
|
passiveModal: !0,
|
|
405
405
|
size: "md",
|
|
406
406
|
testId: "form-details-modal",
|
|
407
|
-
children: /* @__PURE__ */ o("div", { className: s.formContent, children: J ||
|
|
407
|
+
children: /* @__PURE__ */ o("div", { className: s.formContent, children: J || X ? /* @__PURE__ */ o(Ne, { width: "100%", lineCount: 3 }) : B ? /* @__PURE__ */ o("div", { children: k(B).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : A ? /* @__PURE__ */ o("div", { children: k(A).message ?? n("ERROR_FETCHING_FORM_DATA") }) : G.length > 0 ? /* @__PURE__ */ o("div", { className: s.formDetailsContainer, children: G.map(({ obs: l, comment: h }, m) => /* @__PURE__ */ o(
|
|
408
408
|
ke,
|
|
409
409
|
{
|
|
410
410
|
observation: l,
|
|
@@ -419,5 +419,5 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
419
419
|
] });
|
|
420
420
|
};
|
|
421
421
|
export {
|
|
422
|
-
|
|
422
|
+
Xe as default
|
|
423
423
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { p as q, q as U, t as M, Z as V, J as k, r as w, o as K, e as G, u as P, a as H, Q as j, U as J, l as Z, g as z, s as Y, v as W, w as X, c as x } from "./index-dzifQaG5.js";
|
|
3
3
|
import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as h } from "react";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
const s =
|
|
5
|
+
import { useTranslation as C } from "react-i18next";
|
|
6
|
+
const D = (t, c, i, l, r) => {
|
|
7
|
+
const s = M(t, c, r), o = s.value, a = V(o);
|
|
8
8
|
let n = o;
|
|
9
|
-
a === "Image" && (n = /* @__PURE__ */ d(
|
|
9
|
+
a === "Image" && (n = /* @__PURE__ */ d(w, { imageSrc: o, alt: o, id: `${o}-img` })), a === "Video" && (n = /* @__PURE__ */ d(K, { id: `${o}-video`, videoSrc: o })), a === "PDF" && (n = /* @__PURE__ */ d(G, { id: `${o}-pdf`, src: o }));
|
|
10
10
|
const u = r("OBSERVATIONS_RECORDED_BY", {
|
|
11
11
|
provider: s.provider
|
|
12
12
|
}), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${p}-${b}-${i}-${c}` : `${p}-${b}-${i}-${c}`;
|
|
13
13
|
return /* @__PURE__ */ d(
|
|
14
|
-
|
|
14
|
+
k,
|
|
15
15
|
{
|
|
16
16
|
header: s.header,
|
|
17
17
|
value: n,
|
|
@@ -23,13 +23,13 @@ const U = (t, c, i, l, r) => {
|
|
|
23
23
|
`obs-${t.id}`
|
|
24
24
|
);
|
|
25
25
|
}, oe = (t, c, i, l, r, s) => /* @__PURE__ */ d(
|
|
26
|
-
|
|
26
|
+
U,
|
|
27
27
|
{
|
|
28
28
|
title: t.display,
|
|
29
29
|
id: `grouped-obs-${t.display}-${l}`,
|
|
30
30
|
open: i,
|
|
31
31
|
children: t.members?.map(
|
|
32
|
-
(o, a) =>
|
|
32
|
+
(o, a) => D(o, a, r, s, c)
|
|
33
33
|
)
|
|
34
34
|
},
|
|
35
35
|
`grouped-obs-${t.id}`
|
|
@@ -37,17 +37,17 @@ const U = (t, c, i, l, r) => {
|
|
|
37
37
|
groupedData: t,
|
|
38
38
|
title: c = ""
|
|
39
39
|
}) => {
|
|
40
|
-
const { t: i } =
|
|
41
|
-
const a =
|
|
40
|
+
const { t: i } = C(), l = (r, s, o) => {
|
|
41
|
+
const a = q(r.encounterDetails, i);
|
|
42
42
|
return /* @__PURE__ */ S(
|
|
43
|
-
|
|
43
|
+
U,
|
|
44
44
|
{
|
|
45
45
|
title: a,
|
|
46
46
|
id: `encounter-${r.encounterId}`,
|
|
47
47
|
open: s,
|
|
48
48
|
children: [
|
|
49
49
|
r.observations.map(
|
|
50
|
-
(n, u) =>
|
|
50
|
+
(n, u) => D(n, u, o, c, i)
|
|
51
51
|
),
|
|
52
52
|
r.groupedObservations.map(
|
|
53
53
|
(n, u) => oe(
|
|
@@ -79,20 +79,20 @@ const U = (t, c, i, l, r) => {
|
|
|
79
79
|
observations: ae,
|
|
80
80
|
title: ne
|
|
81
81
|
}, ie = (t) => ["conceptUuid", t], ce = (t, c) => ["observations", t, ...c], me = ({ config: t }) => {
|
|
82
|
-
const c = t, { conceptNames: i = [], conceptUuid: l = [] } = c, r = se(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } =
|
|
82
|
+
const c = t, { conceptNames: i = [], conceptUuid: l = [] } = c, r = se(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = H(), { t: a } = C(), n = ee({
|
|
83
83
|
queries: i.map((e) => ({
|
|
84
84
|
queryKey: ie(e),
|
|
85
|
-
queryFn: () =>
|
|
85
|
+
queryFn: () => j(e),
|
|
86
86
|
enabled: !!e
|
|
87
87
|
}))
|
|
88
88
|
});
|
|
89
89
|
$(() => {
|
|
90
90
|
n.forEach((e, m) => {
|
|
91
91
|
if (e.isError && !r.current.has(m)) {
|
|
92
|
-
const
|
|
92
|
+
const O = i[m];
|
|
93
93
|
o({
|
|
94
94
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
95
|
-
message: a("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
95
|
+
message: a("ERROR_FETCHING_CONCEPT", { conceptName: O }),
|
|
96
96
|
type: "error"
|
|
97
97
|
}), r.current.add(m);
|
|
98
98
|
} else e.isError || r.current.delete(m);
|
|
@@ -101,36 +101,36 @@ const U = (t, c, i, l, r) => {
|
|
|
101
101
|
const u = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), b = h(() => [.../* @__PURE__ */ new Set([...u, ...l])], [u, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
102
102
|
data: p,
|
|
103
103
|
isLoading: f,
|
|
104
|
-
isError:
|
|
104
|
+
isError: g,
|
|
105
105
|
refetch: R
|
|
106
106
|
} = te({
|
|
107
107
|
queryKey: ce(s, b),
|
|
108
108
|
queryFn: () => J(s, b),
|
|
109
109
|
enabled: !!s && b.length > 0 && v
|
|
110
110
|
});
|
|
111
|
-
|
|
111
|
+
Z(
|
|
112
112
|
(e) => {
|
|
113
113
|
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
114
|
-
(
|
|
114
|
+
(O) => b.includes(O)
|
|
115
115
|
) && R();
|
|
116
116
|
},
|
|
117
117
|
[s, R]
|
|
118
118
|
), $(() => {
|
|
119
|
-
|
|
119
|
+
g && o({
|
|
120
120
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
121
121
|
message: a("ERROR_FETCHING_OBSERVATIONS"),
|
|
122
122
|
type: "error"
|
|
123
123
|
});
|
|
124
|
-
}, [
|
|
124
|
+
}, [g]);
|
|
125
125
|
const T = h(() => {
|
|
126
126
|
if (!p) return [];
|
|
127
|
-
const e = z(p), m =
|
|
128
|
-
return
|
|
127
|
+
const e = z(p), m = Y(e);
|
|
128
|
+
return W(m);
|
|
129
129
|
}, [p]), B = [
|
|
130
130
|
{ key: "name", header: "name" },
|
|
131
131
|
{ key: "value", header: "value" },
|
|
132
132
|
{ key: "form", header: "form" }
|
|
133
|
-
], I = f || !v, _ =
|
|
133
|
+
], I = f || !v, _ = g && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, Q = T.length > 0 && !I && !_, E = c.titleTranslationKey, y = E ? a(E) : "";
|
|
134
134
|
return /* @__PURE__ */ S(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
@@ -140,7 +140,7 @@ const U = (t, c, i, l, r) => {
|
|
|
140
140
|
className: N.observations,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ d(
|
|
143
|
-
|
|
143
|
+
X,
|
|
144
144
|
{
|
|
145
145
|
id: "observations-title",
|
|
146
146
|
testId: E ? `observations-title-${y}` : "observations-title",
|
|
@@ -149,7 +149,7 @@ const U = (t, c, i, l, r) => {
|
|
|
149
149
|
children: /* @__PURE__ */ d("p", { children: y })
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
Q ? /* @__PURE__ */ d(re, { groupedData: T, title: y }) : /* @__PURE__ */ d(
|
|
153
153
|
x,
|
|
154
154
|
{
|
|
155
155
|
headers: B,
|
|
@@ -78835,7 +78835,7 @@ const m0t = [
|
|
|
78835
78835
|
},
|
|
78836
78836
|
{
|
|
78837
78837
|
type: "patientDocuments",
|
|
78838
|
-
component: Ir(() => import("./DocumentsTable-
|
|
78838
|
+
component: Ir(() => import("./DocumentsTable-BH2Lp5eF.js"))
|
|
78839
78839
|
},
|
|
78840
78840
|
{
|
|
78841
78841
|
type: "flowSheet",
|
|
@@ -78843,7 +78843,7 @@ const m0t = [
|
|
|
78843
78843
|
},
|
|
78844
78844
|
{
|
|
78845
78845
|
type: "forms",
|
|
78846
|
-
component: Ir(() => import("./FormsTable-
|
|
78846
|
+
component: Ir(() => import("./FormsTable-CMgSIy0l.js"))
|
|
78847
78847
|
},
|
|
78848
78848
|
{
|
|
78849
78849
|
type: "labOrders",
|
|
@@ -78851,7 +78851,7 @@ const m0t = [
|
|
|
78851
78851
|
},
|
|
78852
78852
|
{
|
|
78853
78853
|
type: "observations",
|
|
78854
|
-
component: Ir(() => import("./Observations-
|
|
78854
|
+
component: Ir(() => import("./Observations-o0yfLJhC.js"))
|
|
78855
78855
|
},
|
|
78856
78856
|
{
|
|
78857
78857
|
type: "ordersControl",
|
|
@@ -78925,31 +78925,31 @@ const pnt = (t) => {
|
|
|
78925
78925
|
export {
|
|
78926
78926
|
cnt as $,
|
|
78927
78927
|
IQe as A,
|
|
78928
|
-
|
|
78928
|
+
zrt as B,
|
|
78929
78929
|
jet as C,
|
|
78930
78930
|
b0t as D,
|
|
78931
|
-
|
|
78931
|
+
hrt as E,
|
|
78932
78932
|
Ec as F,
|
|
78933
|
-
|
|
78934
|
-
|
|
78935
|
-
|
|
78933
|
+
B1t as G,
|
|
78934
|
+
Y1t as H,
|
|
78935
|
+
snt as I,
|
|
78936
78936
|
wqe as J,
|
|
78937
|
-
|
|
78937
|
+
Y0t as K,
|
|
78938
78938
|
a1t as L,
|
|
78939
|
-
|
|
78940
|
-
|
|
78941
|
-
|
|
78939
|
+
Stt as M,
|
|
78940
|
+
bQe as N,
|
|
78941
|
+
tnt as O,
|
|
78942
78942
|
ent as P,
|
|
78943
|
-
|
|
78943
|
+
U0t as Q,
|
|
78944
78944
|
Sr as R,
|
|
78945
78945
|
int as S,
|
|
78946
|
-
|
|
78947
|
-
|
|
78946
|
+
Mhe as T,
|
|
78947
|
+
K0t as U,
|
|
78948
78948
|
T1t as V,
|
|
78949
|
-
|
|
78950
|
-
|
|
78951
|
-
|
|
78952
|
-
|
|
78949
|
+
X0t as W,
|
|
78950
|
+
lnt as X,
|
|
78951
|
+
J0t as Y,
|
|
78952
|
+
q0t as Z,
|
|
78953
78953
|
c0t as _,
|
|
78954
78954
|
Qr as a,
|
|
78955
78955
|
d0t as a0,
|
|
@@ -78965,22 +78965,22 @@ export {
|
|
|
78965
78965
|
vnt as aa,
|
|
78966
78966
|
gnt as ab,
|
|
78967
78967
|
Ent as ac,
|
|
78968
|
-
|
|
78968
|
+
Q0t as b,
|
|
78969
78969
|
xr as c,
|
|
78970
|
-
|
|
78971
|
-
|
|
78970
|
+
bn as d,
|
|
78971
|
+
z0t as e,
|
|
78972
78972
|
q4 as f,
|
|
78973
|
-
|
|
78974
|
-
|
|
78975
|
-
|
|
78976
|
-
|
|
78977
|
-
|
|
78978
|
-
|
|
78979
|
-
|
|
78980
|
-
|
|
78973
|
+
Wtt as g,
|
|
78974
|
+
os as h,
|
|
78975
|
+
W0t as i,
|
|
78976
|
+
Ct as j,
|
|
78977
|
+
G0t as k,
|
|
78978
|
+
f0 as l,
|
|
78979
|
+
I2 as m,
|
|
78980
|
+
Z2 as n,
|
|
78981
78981
|
A0t as o,
|
|
78982
|
-
|
|
78983
|
-
|
|
78982
|
+
rnt as p,
|
|
78983
|
+
x0t as q,
|
|
78984
78984
|
N0t as r,
|
|
78985
78985
|
ont as s,
|
|
78986
78986
|
nnt as t,
|
|
@@ -78989,5 +78989,5 @@ export {
|
|
|
78989
78989
|
m4 as w,
|
|
78990
78990
|
uet as x,
|
|
78991
78991
|
T1 as y,
|
|
78992
|
-
|
|
78992
|
+
Yet as z
|
|
78993
78993
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a3 as s, a1 as t, A as o, a0 as r, x as n, $ as g, C as l,
|
|
1
|
+
import { a3 as s, a1 as t, A as o, a0 as r, x as n, $ as g, C as l, z as P, G as c, L as d, M as v, N as T, O as A, P as b, H as C, I as p, E as f, B as I, S as u, _ as S, V as W, a5 as m, a4 as N, ab as R, aa as D, a7 as U, a8 as x, a9 as y, a6 as L, ac as h, a2 as E, X as G, a as H, u as O, T as V } from "./index-dzifQaG5.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
s as ActivePractitionerContext,
|
|
@@ -25,15 +25,15 @@ export {
|
|
|
25
25
|
m as createConfigHook,
|
|
26
26
|
N as createConfigProvider,
|
|
27
27
|
R as getAllWidgetConfigs,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
D as getAllWidgetTypes,
|
|
29
|
+
U as getWidget,
|
|
30
30
|
x as getWidgetConfig,
|
|
31
31
|
y as hasWidget,
|
|
32
32
|
L as registerWidget,
|
|
33
33
|
h as resetWidgetRegistry,
|
|
34
34
|
E as useActivePractitioner,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
G as useHasPrivilege,
|
|
36
|
+
H as useNotification,
|
|
37
|
+
O as usePatientUUID,
|
|
38
|
+
V as useUserPrivilege
|
|
39
39
|
};
|