@bahmni/clinical-app 0.0.1-dev.372 → 0.0.1-dev.373
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/{ConsultationPage-BLYFKrw8.js → ConsultationPage-BGYw1Lyi.js} +55 -55
- package/dist/{DocumentsTable-CJDKfTCd-PhD_VqGg.js → DocumentsTable-DvzP4zA0-SCplv32I.js} +14 -14
- package/dist/{FormsTable-CbqIREzM-p3skNj4B.js → FormsTable-BexiFTEe-B2rMaDDD.js} +77 -77
- package/dist/{LNWAZHJI-DmaAcpq_.js → LNWAZHJI-DS5U3Oud.js} +2 -2
- package/dist/{MWZ6AO7Z-DqlTLIaM.js → MWZ6AO7Z-CnnAEK95.js} +2 -2
- package/dist/{Observations-DtVG5HBx-CFKxJPDS.js → Observations-DIntvvSw-BtjJonqG.js} +65 -65
- package/dist/{YPM2AS64-B09hwU1A.js → YPM2AS64-5oAqPQDc.js} +1 -1
- package/dist/{hook-BVh7Tcva.js → hook-CgKQ6WAl.js} +1 -1
- package/dist/{index-CPurGlza.js → index-Db-dpLuX.js} +5 -5
- package/dist/{index-xyOlNGgA.js → index-DzbMZloO.js} +4 -4
- package/dist/{index-DFdBXY1N.js → index-p757R1Oj.js} +32320 -32308
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const ke = "FormsTable-module_formsTableBody__SvGha",
|
|
1
|
+
import { jsx as i, jsxs as j, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import { u as be, g as ye, H as pe, Q as Ne, f as Oe, c as Te, d as Ie, M as Ee, t as Ae, m as _e, S as ve, T as Se, s as z, b as Fe, e as K, n as Q, a as Ce, W as Y, I as Re, k as Be, p as Le, J as Me, P as Ue } from "./index-p757R1Oj.js";
|
|
3
|
+
import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
|
|
4
|
+
import { useState as G, useMemo as d, useCallback as l } from "react";
|
|
5
|
+
const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
6
|
formsTableBody: ke,
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
7
|
+
modalHeading: qe,
|
|
8
|
+
customAccordianItem: He
|
|
9
|
+
}, we = "startConsultation", je = ({
|
|
10
10
|
episodeOfCareUuids: C,
|
|
11
11
|
encounterUuids: u,
|
|
12
|
-
config:
|
|
12
|
+
config: J,
|
|
13
13
|
disableActions: W = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } =
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
19
|
-
forms:
|
|
20
|
-
} =
|
|
16
|
+
const { t: n } = be(), c = ye(), [b, R] = G(!1), [s, B] = G(null), {
|
|
17
|
+
numberOfVisits: X,
|
|
18
|
+
hideThumbnail: Z = !1,
|
|
19
|
+
forms: y
|
|
20
|
+
} = J ?? {}, ee = pe(
|
|
21
21
|
Ue.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: p } = Ne(),
|
|
22
|
+
), { userPrivileges: p } = Ne(), I = ee && !W && !!h, L = Oe(
|
|
23
23
|
C,
|
|
24
24
|
u
|
|
25
|
-
), re =
|
|
26
|
-
data:
|
|
25
|
+
), re = De(), {
|
|
26
|
+
data: M = [],
|
|
27
27
|
isLoading: U,
|
|
28
|
-
isError:
|
|
28
|
+
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = O({
|
|
32
32
|
queryKey: ["forms", c, C],
|
|
33
|
-
queryFn: () =>
|
|
34
|
-
enabled: !!c && !
|
|
33
|
+
queryFn: () => Te(c, void 0, X),
|
|
34
|
+
enabled: !!c && !L
|
|
35
35
|
}), k = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = M;
|
|
37
37
|
return u && u.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => u.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(
|
|
40
|
-
(r) =>
|
|
39
|
+
)), Array.isArray(y) && y.length > 0 && (e = e.filter(
|
|
40
|
+
(r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [M, u, y]), { data: N = [] } = O({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
45
|
-
}),
|
|
44
|
+
queryFn: () => Ie()
|
|
45
|
+
}), q = l(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = N.find((a) => a.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,15 +54,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[N, p]
|
|
56
56
|
), f = l(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
59
|
-
),
|
|
57
|
+
(e) => !h || e.encounterUuid !== h ? !1 : q(e.formName),
|
|
58
|
+
[h, q]
|
|
59
|
+
), H = l(
|
|
60
60
|
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[N]
|
|
62
62
|
), E = d(() => {
|
|
63
63
|
if (s)
|
|
64
|
-
return
|
|
65
|
-
}, [s,
|
|
64
|
+
return H(s.formName);
|
|
65
|
+
}, [s, H]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
@@ -70,7 +70,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
70
70
|
} = O({
|
|
71
71
|
queryKey: ["formMetadata", E],
|
|
72
72
|
queryFn: () => Ee(E),
|
|
73
|
-
enabled: !!E &&
|
|
73
|
+
enabled: !!E && b
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
@@ -79,7 +79,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
79
79
|
} = O({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
81
|
queryFn: () => Ae(s.encounterUuid),
|
|
82
|
-
enabled: !!s?.encounterUuid &&
|
|
82
|
+
enabled: !!s?.encounterUuid && b
|
|
83
83
|
});
|
|
84
84
|
_e(
|
|
85
85
|
(e) => {
|
|
@@ -87,7 +87,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
87
87
|
},
|
|
88
88
|
[c]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ve(e) ?
|
|
90
|
+
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ve(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
|
|
91
91
|
if (!m?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((a) => {
|
|
@@ -103,8 +103,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
103
103
|
const e = {}, r = (o, a) => {
|
|
104
104
|
for (const t of o)
|
|
105
105
|
if (t.type === "section") {
|
|
106
|
-
const
|
|
107
|
-
r(t.controls ?? [],
|
|
106
|
+
const F = t.label?.value ?? "Section";
|
|
107
|
+
r(t.controls ?? [], F);
|
|
108
108
|
} else
|
|
109
109
|
t.id != null && a && (e[String(t.id)] = a), t.controls && r(t.controls, a);
|
|
110
110
|
};
|
|
@@ -117,34 +117,34 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
117
117
|
return z(A).message;
|
|
118
118
|
if (v)
|
|
119
119
|
return z(v).message;
|
|
120
|
-
}, [A, v]),
|
|
120
|
+
}, [A, v]), g = d(
|
|
121
121
|
() => [
|
|
122
122
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
123
123
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
124
124
|
],
|
|
125
125
|
[n]
|
|
126
|
-
),
|
|
127
|
-
() => [...
|
|
128
|
-
[
|
|
126
|
+
), w = d(
|
|
127
|
+
() => [...g, { key: "actions", header: n("ACTIONS") }],
|
|
128
|
+
[g, n]
|
|
129
129
|
), ce = l(
|
|
130
|
-
(e) =>
|
|
131
|
-
[
|
|
132
|
-
), fe =
|
|
130
|
+
(e) => I && e.some((r) => f(r)) ? w : g,
|
|
131
|
+
[I, f, w, g]
|
|
132
|
+
), fe = g, ge = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
135
135
|
{ key: "recordedBy", sortable: !0 }
|
|
136
136
|
],
|
|
137
137
|
[]
|
|
138
|
-
),
|
|
138
|
+
), V = d(() => {
|
|
139
139
|
const e = k.reduce(
|
|
140
140
|
(r, o) => {
|
|
141
141
|
const a = o.formName;
|
|
142
142
|
r[a] ??= [];
|
|
143
|
-
const t = o.providers.map((
|
|
143
|
+
const t = o.providers.map((F) => F.providerName).filter(Boolean).join(", ");
|
|
144
144
|
return r[a].push({
|
|
145
145
|
id: o.encounterUuid,
|
|
146
146
|
formName: o.formName,
|
|
147
|
-
recordedOn:
|
|
147
|
+
recordedOn: Fe(o.encounterDateTime, n, !0).formattedResult,
|
|
148
148
|
recordedBy: t ?? "--",
|
|
149
149
|
encounterDateTime: o.encounterDateTime,
|
|
150
150
|
encounterUuid: o.encounterUuid
|
|
@@ -162,11 +162,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
163
|
}, [k, n]), $ = l((e) => {
|
|
164
164
|
B(e), R(!0);
|
|
165
|
-
}, []),
|
|
165
|
+
}, []), x = l(() => {
|
|
166
166
|
R(!1), B(null);
|
|
167
|
-
}, []),
|
|
167
|
+
}, []), S = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
|
-
new CustomEvent(
|
|
169
|
+
new CustomEvent(we, {
|
|
170
170
|
detail: {
|
|
171
171
|
editOnly: "observationForms",
|
|
172
172
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -176,7 +176,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
178
|
);
|
|
179
|
-
}, []),
|
|
179
|
+
}, []), P = l(
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
@@ -191,51 +191,51 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
191
191
|
kind: "ghost",
|
|
192
192
|
size: "sm",
|
|
193
193
|
testId: `edit-form-${e.encounterUuid}`,
|
|
194
|
-
onClick: () =>
|
|
195
|
-
children: /* @__PURE__ */ i(
|
|
194
|
+
onClick: () => S(e),
|
|
195
|
+
children: /* @__PURE__ */ i(Q, {})
|
|
196
196
|
}
|
|
197
197
|
) : null;
|
|
198
198
|
default:
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[$,
|
|
202
|
+
[$, S, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U ||
|
|
206
|
-
|
|
204
|
+
return /* @__PURE__ */ j(he, { children: [
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || L ? /* @__PURE__ */ i(
|
|
206
|
+
Y,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
209
209
|
ariaLabel: n("FORMS_HEADING"),
|
|
210
210
|
rows: [],
|
|
211
211
|
loading: U,
|
|
212
|
-
errorStateMessage:
|
|
212
|
+
errorStateMessage: D ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
|
-
renderCell:
|
|
215
|
-
className:
|
|
214
|
+
renderCell: P,
|
|
215
|
+
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
|
-
) : /* @__PURE__ */ i(Re, { align: "start", children:
|
|
218
|
+
) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
|
|
219
219
|
const { formName: o, records: a } = e, t = ce(a);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
221
|
Be,
|
|
222
222
|
{
|
|
223
223
|
title: o,
|
|
224
|
-
className:
|
|
224
|
+
className: T.customAccordianItem,
|
|
225
225
|
testId: `accordian-title-${o}`,
|
|
226
226
|
open: r === 0,
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
228
|
-
|
|
228
|
+
Y,
|
|
229
229
|
{
|
|
230
230
|
headers: t,
|
|
231
231
|
ariaLabel: n("FORMS_HEADING"),
|
|
232
232
|
rows: a,
|
|
233
233
|
loading: !1,
|
|
234
234
|
errorStateMessage: "",
|
|
235
|
-
sortable:
|
|
235
|
+
sortable: ge,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
|
-
renderCell:
|
|
238
|
-
className:
|
|
237
|
+
renderCell: P,
|
|
238
|
+
className: T.formsTableBody,
|
|
239
239
|
dataTestId: `forms-table-${o}`
|
|
240
240
|
}
|
|
241
241
|
)
|
|
@@ -243,16 +243,16 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
243
243
|
o
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
b && s && /* @__PURE__ */ i(
|
|
247
|
+
Le,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
|
-
open:
|
|
252
|
-
onRequestClose:
|
|
253
|
-
modalHeading: /* @__PURE__ */
|
|
251
|
+
open: b,
|
|
252
|
+
onRequestClose: x,
|
|
253
|
+
modalHeading: /* @__PURE__ */ j("div", { className: T.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
|
-
|
|
255
|
+
I && f(s) && /* @__PURE__ */ i(
|
|
256
256
|
K,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
@@ -260,9 +260,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
260
260
|
size: "sm",
|
|
261
261
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
262
262
|
onClick: () => {
|
|
263
|
-
|
|
263
|
+
x(), S(s);
|
|
264
264
|
},
|
|
265
|
-
children: /* @__PURE__ */ i(
|
|
265
|
+
children: /* @__PURE__ */ i(Q, {})
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
] }),
|
|
@@ -271,7 +271,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
271
271
|
size: "md",
|
|
272
272
|
testId: "form-details-modal",
|
|
273
273
|
children: /* @__PURE__ */ i(
|
|
274
|
-
|
|
274
|
+
Me,
|
|
275
275
|
{
|
|
276
276
|
observations: de,
|
|
277
277
|
isLoading: te || ne,
|
|
@@ -279,7 +279,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
279
279
|
errorMessage: ue,
|
|
280
280
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
281
281
|
testIdPrefix: s.formName,
|
|
282
|
-
hideThumbnail:
|
|
282
|
+
hideThumbnail: Z,
|
|
283
283
|
controlOrder: le,
|
|
284
284
|
sectionMap: me
|
|
285
285
|
}
|
|
@@ -289,5 +289,5 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
289
289
|
] });
|
|
290
290
|
};
|
|
291
291
|
export {
|
|
292
|
-
|
|
292
|
+
je as default
|
|
293
293
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { bT as d, bU as f, bV as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-5oAqPQDc.js";
|
|
2
|
+
import { bT as d, bU as f, bV as e } from "./index-p757R1Oj.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { bT as v, bU as C, bV as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-5oAqPQDc.js";
|
|
2
|
+
import { bT as v, bU as C, bV as e } from "./index-p757R1Oj.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { g as
|
|
1
|
+
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { g as K, G as q, u as N, V as G, h as k, m as H, R as M, D as Q, i as j, j as w, W as x, O as z, r as D, L as P, E as W, Z, l as J, o as X, q as ee } from "./index-p757R1Oj.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const t = P(a, n, b), s = t.value,
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as E } from "react";
|
|
5
|
+
const L = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, i = W(s);
|
|
7
|
+
let o = s;
|
|
8
|
+
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
|
+
J,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
13
13
|
id: `${s}-img`,
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
|
-
)),
|
|
17
|
-
|
|
16
|
+
)), i === "Video" && (o = /* @__PURE__ */ u(
|
|
17
|
+
X,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
21
21
|
hideThumbnail: r
|
|
22
22
|
}
|
|
23
|
-
)),
|
|
23
|
+
)), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
|
|
24
24
|
const m = b("OBSERVATIONS_RECORDED_BY", {
|
|
25
25
|
provider: t.provider
|
|
26
|
-
}), p = a.display,
|
|
26
|
+
}), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
Z,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
|
-
value:
|
|
31
|
+
value: o,
|
|
32
32
|
info: m,
|
|
33
33
|
id: c,
|
|
34
34
|
testId: c,
|
|
@@ -37,15 +37,15 @@ const C = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
D,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s,
|
|
46
|
+
(s, i) => L(
|
|
47
47
|
s,
|
|
48
|
-
|
|
48
|
+
i,
|
|
49
49
|
b,
|
|
50
50
|
r,
|
|
51
51
|
n,
|
|
@@ -54,23 +54,23 @@ const C = (a, n, d, l, b, r) => {
|
|
|
54
54
|
)
|
|
55
55
|
},
|
|
56
56
|
`grouped-obs-${a.id}`
|
|
57
|
-
),
|
|
57
|
+
), ie = ({
|
|
58
58
|
groupedData: a,
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = N(), b = (r, t, s) => {
|
|
63
|
-
const
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
63
|
+
const i = z(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ I(
|
|
65
|
+
D,
|
|
66
66
|
{
|
|
67
|
-
title:
|
|
67
|
+
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(
|
|
73
|
-
|
|
72
|
+
(o, m) => L(
|
|
73
|
+
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
76
76
|
n,
|
|
@@ -79,8 +79,8 @@ const C = (a, n, d, l, b, r) => {
|
|
|
79
79
|
)
|
|
80
80
|
),
|
|
81
81
|
r.groupedObservations.map(
|
|
82
|
-
(
|
|
83
|
-
|
|
82
|
+
(o, m) => re(
|
|
83
|
+
o,
|
|
84
84
|
l,
|
|
85
85
|
t,
|
|
86
86
|
m,
|
|
@@ -105,100 +105,100 @@ const C = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
},
|
|
109
|
-
observations:
|
|
108
|
+
}, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
|
|
109
|
+
observations: oe,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
112
112
|
const n = a, {
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = q(), { t: i } = N(), o = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => G(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
|
-
|
|
124
|
+
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const B = d[h];
|
|
127
127
|
s({
|
|
128
|
-
title:
|
|
129
|
-
message:
|
|
128
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
|
-
}, [
|
|
135
|
-
const m =
|
|
134
|
+
}, [o, d]);
|
|
135
|
+
const m = E(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = E(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: F,
|
|
138
|
+
isError: O,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
142
|
queryFn: () => k(t, p),
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
H(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && T();
|
|
150
150
|
},
|
|
151
|
-
[t,
|
|
151
|
+
[t, T]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
154
|
-
title:
|
|
155
|
-
message:
|
|
153
|
+
O && s({
|
|
154
|
+
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
|
+
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const g =
|
|
158
|
+
}, [O]);
|
|
159
|
+
const g = E(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
161
|
+
const e = M(c), h = Q(e);
|
|
162
162
|
return j(h);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), A = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], f =
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], f = F || !y, _ = O && y, V = (!c || c.entry?.length === 0 || p.length === 0) && y, Y = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = V ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !f && !_, v = n.titleTranslationKey, R = v ? i(v) : "";
|
|
168
|
+
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": v ? `observations-${R}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: S.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
177
|
w,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
181
|
-
title:
|
|
182
|
-
className:
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
180
|
+
testId: v ? `observations-title-${R}` : "observations-title",
|
|
181
|
+
title: R,
|
|
182
|
+
className: S.title,
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: R })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
|
+
ie,
|
|
188
188
|
{
|
|
189
189
|
groupedData: g,
|
|
190
|
-
title:
|
|
190
|
+
title: R,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
x,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: A,
|
|
197
197
|
rows: [],
|
|
198
|
-
ariaLabel:
|
|
198
|
+
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: f,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: Y,
|
|
201
|
+
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bW as we, bX as z, bY as xt, bZ as B, bU as q, bV as y, b_ as Ro, b$ as ye, c0 as R, c1 as _, c2 as k, c3 as N, c4 as A, c5 as bs, c6 as ir, c7 as $e, c8 as U, c9 as Hn, ca as Vn, cb as dt, cc as D, cd as xs, ce as cn, cf as Be, cg as ws, ch as qt, ci as zt, cj as $s, ck as Cs, cl as $n, cm as Ss, cn as Nr, co as Bt, cp as zo, cq as ks, cr as Es, cs as j, ct as Ur, cu as Ms, cv as Ds, cw as sr, cx as As, cy as Ts, cz as zn, cA as Fs, cB as Is, cC as Z, cD as Ps, cE as Ls } from "./index-
|
|
1
|
+
import { bW as we, bX as z, bY as xt, bZ as B, bU as q, bV as y, b_ as Ro, b$ as ye, c0 as R, c1 as _, c2 as k, c3 as N, c4 as A, c5 as bs, c6 as ir, c7 as $e, c8 as U, c9 as Hn, ca as Vn, cb as dt, cc as D, cd as xs, ce as cn, cf as Be, cg as ws, ch as qt, ci as zt, cj as $s, ck as Cs, cl as $n, cm as Ss, cn as Nr, co as Bt, cp as zo, cq as ks, cr as Es, cs as j, ct as Ur, cu as Ms, cv as Ds, cw as sr, cx as As, cy as Ts, cz as zn, cA as Fs, cB as Is, cC as Z, cD as Ps, cE as Ls } from "./index-p757R1Oj.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as g,
|
|
2
|
+
import { u as g, Q as u, bE as b, bO as f, bP as p, bQ as _, aG as x, bK as N } from "./index-p757R1Oj.js";
|
|
3
3
|
import { lazy as E, useMemo as n, Suspense as h } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
|
-
import { u as C } from "./hook-
|
|
5
|
+
import { u as C } from "./hook-CgKQ6WAl.js";
|
|
6
6
|
const L = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": E(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-DzbMZloO.js")
|
|
9
9
|
)
|
|
10
10
|
}, v = "index-module_page__16xxw", H = "index-module_loading__wNI-4", I = "index-module_message__Ib5Iw", t = {
|
|
11
11
|
page: v,
|
|
12
12
|
loading: H,
|
|
13
13
|
message: I
|
|
14
|
-
},
|
|
14
|
+
}, Q = () => {
|
|
15
15
|
const { t: a } = g(), { clinicalConfig: l } = C(), { userPrivileges: o } = u(), d = n(
|
|
16
16
|
() => [
|
|
17
17
|
{ id: "home", label: a("HOME_LABEL"), href: b },
|
|
@@ -76,5 +76,5 @@ const L = {
|
|
|
76
76
|
);
|
|
77
77
|
};
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
Q as default
|
|
80
80
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { u as r, cF as l, cG as o, cH as c, b7 as m, b8 as g, cI as p, cJ as h, cK as b, aG as u } from "./index-
|
|
2
|
+
import { u as r, cF as l, cG as o, cH as c, b7 as m, b8 as g, cI as p, cJ as h, cK as b, aG as u } from "./index-p757R1Oj.js";
|
|
3
3
|
import { Suspense as _ } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
|
-
const
|
|
6
|
-
loading:
|
|
7
|
-
message:
|
|
5
|
+
const $ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", H = "index-module_panel__j5vTu", s = {
|
|
6
|
+
loading: $,
|
|
7
|
+
message: E,
|
|
8
8
|
panel: H
|
|
9
9
|
}, w = ({ extensions: i }) => {
|
|
10
10
|
const { t: n } = r();
|