@bahmni/widgets 0.0.1-dev.418 → 0.0.1-dev.419
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-Cci6r3Sr.js → DocumentsTable-DqmH8Fxj.js} +7 -7
- package/dist/{FormsTable-CfuNWw4R.js → FormsTable-cov-e4_0.js} +70 -70
- package/dist/{Observations-DBOAaBWK.js → Observations-By1U1Mnx.js} +14 -14
- package/dist/{index-DMFHvgl8.js → index-BPLc87jq.js} +31 -31
- package/dist/index.js +15 -15
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as J, a as W, J as X, V as Z, i as x, b as ee, F as te } from "./index-BPLc87jq.js";
|
|
3
3
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
|
|
5
5
|
import { useTranslation as ae } from "react-i18next";
|
|
@@ -39,7 +39,7 @@ const Te = [
|
|
|
39
39
|
null
|
|
40
40
|
), [V, A] = l(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), E =
|
|
42
|
+
), E = J(), { t: o } = ae(), { addNotification: w } = W(), P = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
|
|
43
43
|
U(e), L(!0);
|
|
44
44
|
}, []), z = _(() => {
|
|
45
45
|
L(!1), U(null), A(/* @__PURE__ */ new Set());
|
|
@@ -54,7 +54,7 @@ const Te = [
|
|
|
54
54
|
u
|
|
55
55
|
],
|
|
56
56
|
enabled: !!E,
|
|
57
|
-
queryFn: () =>
|
|
57
|
+
queryFn: () => X(
|
|
58
58
|
E,
|
|
59
59
|
f,
|
|
60
60
|
u,
|
|
@@ -98,7 +98,7 @@ const Te = [
|
|
|
98
98
|
), D = p(
|
|
99
99
|
() => n?.fields ?? Te,
|
|
100
100
|
[n?.fields]
|
|
101
|
-
),
|
|
101
|
+
), j = p(() => [...i?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [i]), K = p(() => he(D, o), [D, o]), G = p(
|
|
102
102
|
() => D.map((e) => ({
|
|
103
103
|
key: e,
|
|
104
104
|
sortable: e !== "attachments"
|
|
@@ -142,12 +142,12 @@ const Te = [
|
|
|
142
142
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
143
143
|
ee,
|
|
144
144
|
{
|
|
145
|
-
headers:
|
|
145
|
+
headers: K,
|
|
146
146
|
ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
|
|
147
|
-
rows:
|
|
147
|
+
rows: j,
|
|
148
148
|
loading: H,
|
|
149
149
|
errorStateMessage: S ? b?.message : null,
|
|
150
|
-
sortable:
|
|
150
|
+
sortable: G,
|
|
151
151
|
emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
|
|
152
152
|
renderCell: Q,
|
|
153
153
|
className: c.documentsTableBody,
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as n, jsxs as $, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as
|
|
2
|
+
import { u as Oe, c as Ne, d as pe, A as Te, O as Ee, T as Fe, S as Ie, e as Ae, f as _e, g as ve, h as Re, j as De, G as j, i as Me, C as K, B as z, V as Le, b as Q, r as Se, k as Be, F as Ce, l as Ue, m as we } from "./index-BPLc87jq.js";
|
|
3
|
+
import { useQueryClient as Ve, useQuery as N } from "@tanstack/react-query";
|
|
4
4
|
import { useState as W, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
formsTableBody:
|
|
5
|
+
import { useTranslation as ke } from "react-i18next";
|
|
6
|
+
const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", p = {
|
|
7
|
+
formsTableBody: He,
|
|
8
8
|
modalHeading: qe,
|
|
9
9
|
customAccordianItem: Pe
|
|
10
|
-
},
|
|
10
|
+
}, Ge = "startConsultation", Qe = ({
|
|
11
11
|
episodeOfCareUuids: R,
|
|
12
12
|
encounterUuids: m,
|
|
13
13
|
config: Y,
|
|
14
14
|
disableActions: J = !1,
|
|
15
15
|
activeEncounterUuid: b = null
|
|
16
16
|
}) => {
|
|
17
|
-
const { t:
|
|
17
|
+
const { t: s } = ke(), c = Oe(), [y, D] = W(!1), [o, M] = W(null), {
|
|
18
18
|
numberOfVisits: X,
|
|
19
19
|
hideThumbnail: Z = !1,
|
|
20
20
|
forms: h
|
|
21
|
-
} = Y ?? {}, ee =
|
|
21
|
+
} = Y ?? {}, ee = Ne(
|
|
22
22
|
we.EDIT_OBSERVATIONS
|
|
23
23
|
), { userPrivileges: g } = pe(), T = ee && !J && !!b, L = Te(
|
|
24
24
|
R,
|
|
25
25
|
m
|
|
26
|
-
), re =
|
|
26
|
+
), re = Ve(), {
|
|
27
27
|
data: S = [],
|
|
28
28
|
isLoading: B,
|
|
29
29
|
isError: C,
|
|
30
30
|
error: te,
|
|
31
31
|
refetch: ae
|
|
32
|
-
} =
|
|
32
|
+
} = N({
|
|
33
33
|
queryKey: ["forms", c, R],
|
|
34
34
|
queryFn: () => Ee(c, void 0, X),
|
|
35
35
|
enabled: !!c && !L
|
|
@@ -40,12 +40,12 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
40
40
|
)), Array.isArray(h) && h.length > 0 && (e = e.filter(
|
|
41
41
|
(r) => h.some((t) => t.toLowerCase() === r.formName.toLowerCase())
|
|
42
42
|
)), e;
|
|
43
|
-
}, [S, m, h]), { data:
|
|
43
|
+
}, [S, m, h]), { data: O = [] } = N({
|
|
44
44
|
queryKey: ["observationForms"],
|
|
45
45
|
queryFn: () => Fe()
|
|
46
46
|
}), w = d(
|
|
47
47
|
(e) => {
|
|
48
|
-
const r =
|
|
48
|
+
const r = O.find((a) => a.name === e);
|
|
49
49
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
50
50
|
if (!g || g.length === 0) return !1;
|
|
51
51
|
const t = new Set(g.map((a) => a.name));
|
|
@@ -53,22 +53,22 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
53
53
|
(a) => t.has(a.privilegeName) && a.editable
|
|
54
54
|
);
|
|
55
55
|
},
|
|
56
|
-
[
|
|
56
|
+
[O, g]
|
|
57
57
|
), u = d(
|
|
58
58
|
(e) => !b || e.encounterUuid !== b ? !1 : w(e.formName),
|
|
59
59
|
[b, w]
|
|
60
|
-
),
|
|
61
|
-
(e) =>
|
|
62
|
-
[
|
|
60
|
+
), V = d(
|
|
61
|
+
(e) => O.find((t) => t.name === e)?.uuid,
|
|
62
|
+
[O]
|
|
63
63
|
), E = i(() => {
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
}, [
|
|
67
|
-
data:
|
|
68
|
-
isLoading:
|
|
69
|
-
isError:
|
|
64
|
+
if (o)
|
|
65
|
+
return V(o.formName);
|
|
66
|
+
}, [o, V]), {
|
|
67
|
+
data: k,
|
|
68
|
+
isLoading: oe,
|
|
69
|
+
isError: se,
|
|
70
70
|
error: F
|
|
71
|
-
} =
|
|
71
|
+
} = N({
|
|
72
72
|
queryKey: ["formMetadata", E],
|
|
73
73
|
queryFn: () => Ie(E),
|
|
74
74
|
enabled: !!E && y
|
|
@@ -76,38 +76,38 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
76
76
|
data: I,
|
|
77
77
|
isLoading: ne,
|
|
78
78
|
isError: ie,
|
|
79
|
-
error:
|
|
80
|
-
} =
|
|
81
|
-
queryKey: ["formsEncounterFHIR",
|
|
82
|
-
queryFn: () =>
|
|
83
|
-
enabled: !!
|
|
79
|
+
error: A
|
|
80
|
+
} = N({
|
|
81
|
+
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
82
|
+
queryFn: () => Ae(o.encounterUuid),
|
|
83
|
+
enabled: !!o?.encounterUuid && y
|
|
84
84
|
});
|
|
85
|
-
|
|
85
|
+
_e(
|
|
86
86
|
(e) => {
|
|
87
87
|
e.patientUUID === c && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
88
88
|
},
|
|
89
89
|
[c]
|
|
90
90
|
);
|
|
91
|
-
const de = i(() => !I?.entry || !
|
|
92
|
-
() => De(
|
|
93
|
-
[
|
|
91
|
+
const de = i(() => !I?.entry || !o?.formName ? [] : I.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => ve(r) ? Re(r)?.toLowerCase() === o.formName.toLowerCase() : !0), [I, o?.formName]), { controlOrder: le, sectionMap: me, conceptDatatypeMap: ce } = i(
|
|
92
|
+
() => De(k?.schema),
|
|
93
|
+
[k]
|
|
94
94
|
), ue = i(() => {
|
|
95
95
|
if (F)
|
|
96
96
|
return j(F).message;
|
|
97
|
-
if (
|
|
98
|
-
return j(
|
|
99
|
-
}, [F,
|
|
97
|
+
if (A)
|
|
98
|
+
return j(A).message;
|
|
99
|
+
}, [F, A]), f = i(
|
|
100
100
|
() => [
|
|
101
|
-
{ key: "recordedOn", header:
|
|
102
|
-
{ key: "recordedBy", header:
|
|
101
|
+
{ key: "recordedOn", header: s("RECORDED_ON") },
|
|
102
|
+
{ key: "recordedBy", header: s("RECORDED_BY") }
|
|
103
103
|
],
|
|
104
|
-
[
|
|
105
|
-
),
|
|
106
|
-
() => [...f, { key: "actions", header:
|
|
107
|
-
[f,
|
|
104
|
+
[s]
|
|
105
|
+
), H = i(
|
|
106
|
+
() => [...f, { key: "actions", header: s("ACTIONS") }],
|
|
107
|
+
[f, s]
|
|
108
108
|
), fe = d(
|
|
109
|
-
(e) => T && e.some((t) => u(t)) ?
|
|
110
|
-
[T, u,
|
|
109
|
+
(e) => T && e.some((t) => u(t)) ? H : f,
|
|
110
|
+
[T, u, H, f]
|
|
111
111
|
), be = f, ye = i(
|
|
112
112
|
() => [
|
|
113
113
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -123,7 +123,7 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
123
123
|
return t[l].push({
|
|
124
124
|
id: a.encounterUuid,
|
|
125
125
|
formName: a.formName,
|
|
126
|
-
recordedOn: Me(a.encounterDateTime,
|
|
126
|
+
recordedOn: Me(a.encounterDateTime, s, !0).formattedResult,
|
|
127
127
|
recordedBy: v ?? "--",
|
|
128
128
|
encounterDateTime: a.encounterDateTime,
|
|
129
129
|
encounterUuid: a.encounterUuid
|
|
@@ -139,13 +139,13 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
139
139
|
)
|
|
140
140
|
})
|
|
141
141
|
).sort((t, a) => t.formName.localeCompare(a.formName));
|
|
142
|
-
}, [U,
|
|
142
|
+
}, [U, s]), P = d((e) => {
|
|
143
143
|
M(e), D(!0);
|
|
144
|
-
}, []),
|
|
144
|
+
}, []), G = d(() => {
|
|
145
145
|
D(!1), M(null);
|
|
146
|
-
}, []),
|
|
146
|
+
}, []), _ = d((e) => {
|
|
147
147
|
globalThis.dispatchEvent(
|
|
148
|
-
new CustomEvent(
|
|
148
|
+
new CustomEvent(Ge, {
|
|
149
149
|
detail: {
|
|
150
150
|
editOnly: "observationForms",
|
|
151
151
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -155,7 +155,7 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
155
155
|
}
|
|
156
156
|
})
|
|
157
157
|
);
|
|
158
|
-
}, []),
|
|
158
|
+
}, []), x = d(
|
|
159
159
|
(e, r) => {
|
|
160
160
|
switch (r) {
|
|
161
161
|
case "recordedOn":
|
|
@@ -166,11 +166,11 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
166
166
|
return u(e) ? /* @__PURE__ */ n(
|
|
167
167
|
K,
|
|
168
168
|
{
|
|
169
|
-
label:
|
|
169
|
+
label: s("EDIT_OBSERVATION_FORM"),
|
|
170
170
|
kind: "ghost",
|
|
171
171
|
size: "sm",
|
|
172
172
|
testId: `edit-form-${e.encounterUuid}`,
|
|
173
|
-
onClick: () =>
|
|
173
|
+
onClick: () => _(e),
|
|
174
174
|
children: /* @__PURE__ */ n(z, {})
|
|
175
175
|
}
|
|
176
176
|
) : null;
|
|
@@ -178,19 +178,19 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
|
-
[P,
|
|
181
|
+
[P, _, u, s]
|
|
182
182
|
);
|
|
183
183
|
return /* @__PURE__ */ $(ge, { children: [
|
|
184
184
|
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || C || q.length === 0 || L ? /* @__PURE__ */ n(
|
|
185
185
|
Q,
|
|
186
186
|
{
|
|
187
187
|
headers: be,
|
|
188
|
-
ariaLabel:
|
|
188
|
+
ariaLabel: s("FORMS_HEADING"),
|
|
189
189
|
rows: [],
|
|
190
190
|
loading: B,
|
|
191
191
|
errorStateMessage: C ? te?.message : void 0,
|
|
192
|
-
emptyStateMessage:
|
|
193
|
-
renderCell:
|
|
192
|
+
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
193
|
+
renderCell: x,
|
|
194
194
|
className: p.formsTableBody,
|
|
195
195
|
dataTestId: "forms-table"
|
|
196
196
|
}
|
|
@@ -207,13 +207,13 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
207
207
|
Q,
|
|
208
208
|
{
|
|
209
209
|
headers: l,
|
|
210
|
-
ariaLabel:
|
|
210
|
+
ariaLabel: s("FORMS_HEADING"),
|
|
211
211
|
rows: a,
|
|
212
212
|
loading: !1,
|
|
213
213
|
errorStateMessage: "",
|
|
214
214
|
sortable: ye,
|
|
215
|
-
emptyStateMessage:
|
|
216
|
-
renderCell:
|
|
215
|
+
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
216
|
+
renderCell: x,
|
|
217
217
|
className: p.formsTableBody,
|
|
218
218
|
dataTestId: `forms-table-${t}`
|
|
219
219
|
}
|
|
@@ -222,30 +222,30 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
222
222
|
t
|
|
223
223
|
);
|
|
224
224
|
}) }) }),
|
|
225
|
-
y &&
|
|
225
|
+
y && o && /* @__PURE__ */ n(
|
|
226
226
|
Ce,
|
|
227
227
|
{
|
|
228
228
|
id: "modalIdForActionAreaLayout",
|
|
229
229
|
portalId: "main-display-area",
|
|
230
230
|
open: y,
|
|
231
|
-
onRequestClose:
|
|
231
|
+
onRequestClose: G,
|
|
232
232
|
modalHeading: /* @__PURE__ */ $("div", { className: p.modalHeading, children: [
|
|
233
|
-
/* @__PURE__ */ n("span", { children:
|
|
234
|
-
T && u(
|
|
233
|
+
/* @__PURE__ */ n("span", { children: o.formName }),
|
|
234
|
+
T && u(o) && /* @__PURE__ */ n(
|
|
235
235
|
K,
|
|
236
236
|
{
|
|
237
|
-
label:
|
|
237
|
+
label: s("EDIT_OBSERVATION_FORM"),
|
|
238
238
|
kind: "ghost",
|
|
239
239
|
size: "sm",
|
|
240
|
-
testId: `edit-form-modal-${
|
|
240
|
+
testId: `edit-form-modal-${o.encounterUuid}`,
|
|
241
241
|
onClick: () => {
|
|
242
|
-
|
|
242
|
+
G(), _(o);
|
|
243
243
|
},
|
|
244
244
|
children: /* @__PURE__ */ n(z, {})
|
|
245
245
|
}
|
|
246
246
|
)
|
|
247
247
|
] }),
|
|
248
|
-
modalLabel: `${
|
|
248
|
+
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
249
249
|
passiveModal: !0,
|
|
250
250
|
size: "md",
|
|
251
251
|
testId: "form-details-modal",
|
|
@@ -253,11 +253,11 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
253
253
|
Ue,
|
|
254
254
|
{
|
|
255
255
|
observations: de,
|
|
256
|
-
isLoading:
|
|
257
|
-
isError:
|
|
256
|
+
isLoading: oe || ne,
|
|
257
|
+
isError: se || ie,
|
|
258
258
|
errorMessage: ue,
|
|
259
|
-
emptyStateMessage:
|
|
260
|
-
testIdPrefix:
|
|
259
|
+
emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
|
|
260
|
+
testIdPrefix: o.formName,
|
|
261
261
|
hideThumbnail: Z,
|
|
262
262
|
controlOrder: le,
|
|
263
263
|
sectionMap: me,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as i, jsxs as N } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { n as z, D as F, t as G, o as H, i as P, p as j, q as x, R as J, s as Y, u as W, a as X, v as Z, A as ee, w as se, x as te, f as re, y as ae, z as oe, E as ne, H as ie, I as ce, b as le } from "./index-BPLc87jq.js";
|
|
3
3
|
import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as C, useMemo as I } from "react";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as V } from "react-i18next";
|
|
6
6
|
const be = "Observations-module_observations__RKSyo", me = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
|
|
7
7
|
observations: be,
|
|
8
8
|
title: me,
|
|
9
9
|
wrapper: ve,
|
|
10
10
|
secondary: ye
|
|
11
|
-
},
|
|
11
|
+
}, w = (t, l, n, c, u, r) => {
|
|
12
12
|
const a = G(t, l, u), e = a.value, p = H(e);
|
|
13
13
|
let o = e;
|
|
14
14
|
p === "Image" && (o = /* @__PURE__ */ i(
|
|
@@ -35,7 +35,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
35
35
|
}), m = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
|
|
36
36
|
/* @__PURE__ */ i("span", { children: d }),
|
|
37
37
|
m && /* @__PURE__ */ i("span", { className: y.secondary, children: m })
|
|
38
|
-
] }), v = t.display,
|
|
38
|
+
] }), v = t.display, g = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = c ? `${c}-${g}-${v}-${n}-${l}` : `${g}-${v}-${n}-${l}`;
|
|
39
39
|
return /* @__PURE__ */ i(
|
|
40
40
|
j,
|
|
41
41
|
{
|
|
@@ -55,7 +55,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
55
55
|
id: `grouped-obs-${t.display}-${c}`,
|
|
56
56
|
open: n,
|
|
57
57
|
children: t.members?.map(
|
|
58
|
-
(e, p) =>
|
|
58
|
+
(e, p) => w(
|
|
59
59
|
e,
|
|
60
60
|
p,
|
|
61
61
|
u,
|
|
@@ -71,7 +71,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
71
71
|
title: l = "",
|
|
72
72
|
hideThumbnail: n
|
|
73
73
|
}) => {
|
|
74
|
-
const { t: c } =
|
|
74
|
+
const { t: c } = V(), u = (r, a, e) => {
|
|
75
75
|
const p = z(r.encounterDetails, c);
|
|
76
76
|
return /* @__PURE__ */ N(
|
|
77
77
|
F,
|
|
@@ -81,7 +81,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
81
81
|
open: a,
|
|
82
82
|
children: [
|
|
83
83
|
r.observations.map(
|
|
84
|
-
(o, b) =>
|
|
84
|
+
(o, b) => w(
|
|
85
85
|
o,
|
|
86
86
|
b,
|
|
87
87
|
e,
|
|
@@ -133,7 +133,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
133
133
|
conceptUuid: r = [],
|
|
134
134
|
hideThumbnail: a = !1,
|
|
135
135
|
scope: e = "all"
|
|
136
|
-
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } =
|
|
136
|
+
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } = V(), m = de({
|
|
137
137
|
queries: u.map((s) => ({
|
|
138
138
|
queryKey: Ee(s),
|
|
139
139
|
queryFn: () => Z(s),
|
|
@@ -148,12 +148,12 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
148
148
|
type: "error"
|
|
149
149
|
}), p.current.add(0)) : !s && R && p.current.clear();
|
|
150
150
|
}, [m, b, d]);
|
|
151
|
-
const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]),
|
|
151
|
+
const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
|
|
152
152
|
l,
|
|
153
153
|
n
|
|
154
154
|
), {
|
|
155
155
|
data: E,
|
|
156
|
-
isLoading:
|
|
156
|
+
isLoading: U,
|
|
157
157
|
isError: S,
|
|
158
158
|
refetch: D
|
|
159
159
|
} = ue({
|
|
@@ -163,7 +163,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
163
163
|
n,
|
|
164
164
|
e
|
|
165
165
|
),
|
|
166
|
-
queryFn: () =>
|
|
166
|
+
queryFn: () => g ? se(
|
|
167
167
|
o,
|
|
168
168
|
v,
|
|
169
169
|
n
|
|
@@ -198,12 +198,12 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
198
198
|
{ key: "name", header: "name" },
|
|
199
199
|
{ key: "value", header: "value" },
|
|
200
200
|
{ key: "form", header: "form" }
|
|
201
|
-
], L =
|
|
201
|
+
], L = U || !f, B = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, Q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !L && !B, T = c.titleTranslationKey, h = T ? d(T) : "";
|
|
202
202
|
return /* @__PURE__ */ N(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
205
205
|
id: "observations",
|
|
206
|
-
"data-testid":
|
|
206
|
+
"data-testid": T ? `observations-${h}` : "observations",
|
|
207
207
|
"aria-label": "observations-aria-label",
|
|
208
208
|
className: y.observations,
|
|
209
209
|
children: [
|
|
@@ -211,7 +211,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
|
|
|
211
211
|
ce,
|
|
212
212
|
{
|
|
213
213
|
id: "observations-title",
|
|
214
|
-
testId:
|
|
214
|
+
testId: T ? `observations-title-${h}` : "observations-title",
|
|
215
215
|
title: h,
|
|
216
216
|
className: y.title,
|
|
217
217
|
children: /* @__PURE__ */ i("p", { children: h })
|
|
@@ -114905,7 +114905,7 @@ const y01 = [
|
|
|
114905
114905
|
},
|
|
114906
114906
|
{
|
|
114907
114907
|
type: "patientDocuments",
|
|
114908
|
-
component: l0(() => import("./DocumentsTable-
|
|
114908
|
+
component: l0(() => import("./DocumentsTable-DqmH8Fxj.js"))
|
|
114909
114909
|
},
|
|
114910
114910
|
{
|
|
114911
114911
|
type: "flowSheet",
|
|
@@ -114913,7 +114913,7 @@ const y01 = [
|
|
|
114913
114913
|
},
|
|
114914
114914
|
{
|
|
114915
114915
|
type: "forms",
|
|
114916
|
-
component: l0(() => import("./FormsTable-
|
|
114916
|
+
component: l0(() => import("./FormsTable-cov-e4_0.js"))
|
|
114917
114917
|
},
|
|
114918
114918
|
{
|
|
114919
114919
|
type: "labOrders",
|
|
@@ -114921,7 +114921,7 @@ const y01 = [
|
|
|
114921
114921
|
},
|
|
114922
114922
|
{
|
|
114923
114923
|
type: "observations",
|
|
114924
|
-
component: l0(() => import("./Observations-
|
|
114924
|
+
component: l0(() => import("./Observations-By1U1Mnx.js"))
|
|
114925
114925
|
},
|
|
114926
114926
|
{
|
|
114927
114927
|
type: "ordersControl",
|
|
@@ -115275,33 +115275,33 @@ const fPe = o.createContext(void 0), $01 = () => {
|
|
|
115275
115275
|
};
|
|
115276
115276
|
export {
|
|
115277
115277
|
hBe as $,
|
|
115278
|
-
|
|
115278
|
+
vi as A,
|
|
115279
115279
|
Vc as B,
|
|
115280
115280
|
A2 as C,
|
|
115281
115281
|
Y01 as D,
|
|
115282
|
-
|
|
115282
|
+
_r1 as E,
|
|
115283
115283
|
p0 as F,
|
|
115284
|
-
|
|
115285
|
-
|
|
115286
|
-
|
|
115287
|
-
|
|
115288
|
-
|
|
115289
|
-
|
|
115290
|
-
|
|
115291
|
-
|
|
115292
|
-
|
|
115284
|
+
S1 as G,
|
|
115285
|
+
Cr1 as H,
|
|
115286
|
+
di as I,
|
|
115287
|
+
Er1 as J,
|
|
115288
|
+
bMt as K,
|
|
115289
|
+
yr1 as L,
|
|
115290
|
+
Mr1 as M,
|
|
115291
|
+
djt as N,
|
|
115292
|
+
vr1 as O,
|
|
115293
115293
|
br1 as P,
|
|
115294
|
-
|
|
115294
|
+
kjt as Q,
|
|
115295
115295
|
LIe as R,
|
|
115296
|
-
|
|
115297
|
-
|
|
115298
|
-
|
|
115296
|
+
NTt as S,
|
|
115297
|
+
JZe as T,
|
|
115298
|
+
pUt as U,
|
|
115299
115299
|
qr as V,
|
|
115300
|
-
|
|
115301
|
-
|
|
115302
|
-
|
|
115303
|
-
|
|
115304
|
-
|
|
115300
|
+
UUt as W,
|
|
115301
|
+
XUt as X,
|
|
115302
|
+
nGt as Y,
|
|
115303
|
+
eWt as Z,
|
|
115304
|
+
gKt as _,
|
|
115305
115305
|
z1 as a,
|
|
115306
115306
|
KKt as a0,
|
|
115307
115307
|
BYt as a1,
|
|
@@ -115345,24 +115345,24 @@ export {
|
|
|
115345
115345
|
Y1 as b,
|
|
115346
115346
|
i8 as c,
|
|
115347
115347
|
en as d,
|
|
115348
|
-
|
|
115348
|
+
uTt as e,
|
|
115349
115349
|
mr as f,
|
|
115350
115350
|
dBe as g,
|
|
115351
115351
|
VGt as h,
|
|
115352
|
-
|
|
115353
|
-
|
|
115352
|
+
wt as i,
|
|
115353
|
+
yGt as j,
|
|
115354
115354
|
Fo as k,
|
|
115355
|
-
|
|
115356
|
-
|
|
115357
|
-
|
|
115355
|
+
h8 as l,
|
|
115356
|
+
Dr1 as m,
|
|
115357
|
+
xr1 as n,
|
|
115358
115358
|
k9e as o,
|
|
115359
115359
|
Ryt as p,
|
|
115360
115360
|
TIe as q,
|
|
115361
115361
|
Po as r,
|
|
115362
|
-
|
|
115362
|
+
OIe as s,
|
|
115363
115363
|
Nr1 as t,
|
|
115364
115364
|
v0 as u,
|
|
115365
|
-
|
|
115365
|
+
mr1 as v,
|
|
115366
115366
|
gr1 as w,
|
|
115367
115367
|
wr1 as x,
|
|
115368
115368
|
Ar1 as y,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as o, ag as r,
|
|
1
|
+
import { ai as o, ag as r, Q as n, af as g, U as c, Z as l, m as d, a8 as P, ao as m, W as v, K as C, X as u, L as A, M as T, a3 as b, a6 as p, a0 as N, az as S, aB as W, aC as h, Y as I, aa as L, ab as U, l as f, P as D, a5 as R, a7 as y, $ as _, _ as x, a1 as O, a4 as E, ax as k, aw as F, ae as G, a2 as H, an as M, ak as V, aj as j, j as q, h as w, au as z, at as B, am as K, aq as Y, ar as Q, as as X, al as Z, ap as $, N as J, av as aa, ah as ea, a9 as sa, ac as ta, c as ia, aA as oa, a as ra, ad as na, u as ga, ay as ca, d as la } from "./index-BPLc87jq.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "@tanstack/react-query";
|
|
@@ -30,9 +30,9 @@ export {
|
|
|
30
30
|
D as PatientDetails,
|
|
31
31
|
R as PatientProgramsTable,
|
|
32
32
|
y as ProgramDetails,
|
|
33
|
-
|
|
33
|
+
_ as RadiologyInvestigationReport,
|
|
34
34
|
x as RadiologyInvestigationTable,
|
|
35
|
-
|
|
35
|
+
O as SearchPatient,
|
|
36
36
|
E as TaskList,
|
|
37
37
|
k as UserActionProvider,
|
|
38
38
|
F as UserGlobalAction,
|
|
@@ -40,18 +40,18 @@ export {
|
|
|
40
40
|
H as VitalFlowSheet,
|
|
41
41
|
M as clearSearchWidgetRegistry,
|
|
42
42
|
V as createConfigHook,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
43
|
+
j as createConfigProvider,
|
|
44
|
+
q as deriveFormSchemaData,
|
|
45
|
+
w as extractFormName,
|
|
46
|
+
z as getAllWidgetConfigs,
|
|
47
|
+
B as getAllWidgetTypes,
|
|
48
|
+
K as getSearchWidget,
|
|
49
|
+
Y as getWidget,
|
|
50
|
+
Q as getWidgetConfig,
|
|
51
|
+
X as hasWidget,
|
|
52
|
+
Z as registerSearchWidget,
|
|
53
|
+
$ as registerWidget,
|
|
54
|
+
J as renderDocumentTile,
|
|
55
55
|
aa as resetWidgetRegistry,
|
|
56
56
|
ea as useActivePractitioner,
|
|
57
57
|
sa as useCommandPalette,
|