@bahmni/admin-app 0.0.1-dev.438 → 0.0.1-dev.439
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/{AdminDashboard-BuNMtWKS.js → AdminDashboard-CULvIpd5.js} +1 -1
- package/dist/{AuditLog-gKpGSqpo.js → AuditLog-DkTbV9BG.js} +16 -16
- package/dist/{CsvUpload-Bb4yhx-_.js → CsvUpload-DkuV4Ixd.js} +1 -1
- package/dist/{DocumentsTable-CBaZduLC-Cx2QKer5.js → DocumentsTable-DOPEQt14-D496l9qY.js} +1 -1
- package/dist/{FormsTable-BYeW3DRV-VtgD2frM.js → FormsTable-5kbGeeFq-2NxLFWoa.js} +29 -29
- package/dist/{LNWAZHJI-gt0aLoTx.js → LNWAZHJI-DL7T8niD.js} +2 -2
- package/dist/{MWZ6AO7Z-DV7e_IYu.js → MWZ6AO7Z-DQwcZPbL.js} +2 -2
- package/dist/{Observations-Brw1YHvF-D5Xx2Fwy.js → Observations-BUz9smcC-AopQYTP_.js} +25 -25
- package/dist/{YPM2AS64-DdbQ53ga.js → YPM2AS64-CUMbqjIc.js} +1 -1
- package/dist/{index-zul2tc9C.js → index-DCAEnw_P.js} +556 -550
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { y as o, C as a, D as s, E as N } from "./index-
|
|
2
|
+
import { y as o, C as a, D as s, E as N } from "./index-DCAEnw_P.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
5
|
const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as l, useRef as
|
|
2
|
+
import { N as ee, G as te, V as se, I as K, u as ae, K as ne, Q as re, y as ie, S as oe, X as ue, Z as de, _ as C, a0 as v, a1 as le } from "./index-DCAEnw_P.js";
|
|
3
|
+
import { useState as l, useRef as U, useEffect as G, useMemo as ce, useCallback as me } from "react";
|
|
4
4
|
import { useQuery as _e } from "@tanstack/react-query";
|
|
5
|
-
const
|
|
5
|
+
const k = Symbol.for("constructDateFrom");
|
|
6
6
|
function y(e, t) {
|
|
7
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
7
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && k in e ? e[k](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
8
8
|
}
|
|
9
9
|
function w(e, t) {
|
|
10
10
|
return y(e, e);
|
|
@@ -38,9 +38,9 @@ const Le = (e, t) => {
|
|
|
38
38
|
startTime: "00:00",
|
|
39
39
|
username: "",
|
|
40
40
|
patientId: ""
|
|
41
|
-
}), [r, a] = l(0), [i, u] = l(0), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [F, g] = l(!1), [O, M] = l(1), I =
|
|
41
|
+
}), [r, a] = l(0), [i, u] = l(0), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [F, g] = l(!1), [O, M] = l(1), I = U(1), s = (c) => {
|
|
42
42
|
I.current = c, M(c);
|
|
43
|
-
}, o =
|
|
43
|
+
}, o = U(0), [n, j] = l(null), B = U(null), { data: N, isLoading: Q, isFetching: L, isError: X } = _e({
|
|
44
44
|
queryKey: ["auditLogs", n?.requestId],
|
|
45
45
|
queryFn: () => te(n.params),
|
|
46
46
|
enabled: !!n,
|
|
@@ -48,10 +48,10 @@ const Le = (e, t) => {
|
|
|
48
48
|
// (and audit logs must always be fetched fresh). Drop entries as soon as
|
|
49
49
|
// they become inactive instead of retaining them for the default gcTime.
|
|
50
50
|
gcTime: 0
|
|
51
|
-
}), T = (c,
|
|
51
|
+
}), T = (c, H, m, D, h, $) => {
|
|
52
52
|
o.current += 1, j({
|
|
53
53
|
action: c,
|
|
54
|
-
params:
|
|
54
|
+
params: H,
|
|
55
55
|
alwaysReplace: m,
|
|
56
56
|
defaultFirstIndex: D,
|
|
57
57
|
defaultLastIndex: h,
|
|
@@ -67,9 +67,9 @@ const Le = (e, t) => {
|
|
|
67
67
|
0,
|
|
68
68
|
q
|
|
69
69
|
);
|
|
70
|
-
},
|
|
70
|
+
}, V = () => !!r || !!i, Z = () => {
|
|
71
71
|
if (!L) {
|
|
72
|
-
if (!
|
|
72
|
+
if (!V()) {
|
|
73
73
|
x();
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
@@ -90,7 +90,7 @@ const Le = (e, t) => {
|
|
|
90
90
|
}
|
|
91
91
|
}, W = () => {
|
|
92
92
|
if (!L) {
|
|
93
|
-
if (!
|
|
93
|
+
if (!V()) {
|
|
94
94
|
x();
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
@@ -256,7 +256,7 @@ const Le = (e, t) => {
|
|
|
256
256
|
t.startDate?.getTime() ?? "empty"
|
|
257
257
|
),
|
|
258
258
|
/* @__PURE__ */ d(
|
|
259
|
-
|
|
259
|
+
C,
|
|
260
260
|
{
|
|
261
261
|
id: "audit-log-start-time",
|
|
262
262
|
type: "time",
|
|
@@ -270,7 +270,7 @@ const Le = (e, t) => {
|
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
272
|
/* @__PURE__ */ d(
|
|
273
|
-
|
|
273
|
+
C,
|
|
274
274
|
{
|
|
275
275
|
id: "audit-log-username",
|
|
276
276
|
labelText: e("USERNAME_FILTER_LABEL"),
|
|
@@ -284,7 +284,7 @@ const Le = (e, t) => {
|
|
|
284
284
|
}
|
|
285
285
|
),
|
|
286
286
|
/* @__PURE__ */ d(
|
|
287
|
-
|
|
287
|
+
C,
|
|
288
288
|
{
|
|
289
289
|
id: "audit-log-patient-id",
|
|
290
290
|
labelText: e("PATIENT_ID_FILTER_LABEL"),
|
|
@@ -298,7 +298,7 @@ const Le = (e, t) => {
|
|
|
298
298
|
}
|
|
299
299
|
),
|
|
300
300
|
/* @__PURE__ */ d(
|
|
301
|
-
|
|
301
|
+
v,
|
|
302
302
|
{
|
|
303
303
|
kind: "tertiary",
|
|
304
304
|
onClick: O,
|
|
@@ -308,7 +308,7 @@ const Le = (e, t) => {
|
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
310
|
/* @__PURE__ */ d(
|
|
311
|
-
|
|
311
|
+
v,
|
|
312
312
|
{
|
|
313
313
|
kind: "primary",
|
|
314
314
|
onClick: g,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { d as G, u as W, z as Y, R as J, s as X, h as Z, $ as ee, a as te } from "./index-
|
|
2
|
+
import { d as G, u as W, z as Y, R as J, s as X, h as Z, $ as ee, a as te } from "./index-DCAEnw_P.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { u as ie, d as de, g as le, k as me, H as ue, L as ce, b as fe, A as ye, w as ge, M as he, l as Ne, c as
|
|
2
|
+
import { u as ie, d as de, g as le, k as me, H as ue, L as ce, b as fe, A as ye, w as ge, M as he, l as Ne, c as Te, h as pe, e as V, x as $, s as Oe, $ as x, W as be, q as Ie, a as Ae, f as Ee, J as _e } from "./index-DCAEnw_P.js";
|
|
3
3
|
import { useQueryClient as Le, useQuery as A } from "@tanstack/react-query";
|
|
4
4
|
import { useState as K, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
7
|
-
modalHeading:
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
},
|
|
5
|
+
const ve = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", N = {
|
|
6
|
+
formsTableBody: ve,
|
|
7
|
+
modalHeading: Ce,
|
|
8
|
+
customAccordianItem: Re
|
|
9
|
+
}, Be = "startConsultation", Se = ({
|
|
10
10
|
episodeOfCareUuids: E,
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: j,
|
|
13
13
|
disableActions: z = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [
|
|
16
|
+
const { t: o } = ie(), m = de(), [T, _] = K(!1), [s, L] = K(null), {
|
|
17
17
|
numberOfVisits: Q,
|
|
18
18
|
hideThumbnail: G = !1,
|
|
19
19
|
forms: g
|
|
20
20
|
} = j ?? {}, J = le(
|
|
21
21
|
_e.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: h } = me(),
|
|
22
|
+
), { userPrivileges: h } = me(), p = J && !z && !!y, v = ue(
|
|
23
23
|
E,
|
|
24
24
|
l
|
|
25
25
|
), W = Le(), {
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
28
|
-
isError:
|
|
26
|
+
data: C = [],
|
|
27
|
+
isLoading: R,
|
|
28
|
+
isError: B,
|
|
29
29
|
error: P,
|
|
30
30
|
refetch: Y
|
|
31
31
|
} = A({
|
|
32
32
|
queryKey: ["forms", m, E],
|
|
33
33
|
queryFn: () => ce(m, void 0, Q),
|
|
34
|
-
enabled: !!m && !
|
|
34
|
+
enabled: !!m && !v
|
|
35
35
|
}), F = i(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = C;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(g) && g.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [C, l, g]), { data: M = [] } = A({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
45
|
}), U = d(
|
|
@@ -59,14 +59,14 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
59
59
|
(e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
|
|
60
60
|
[y, U]
|
|
61
61
|
), {
|
|
62
|
-
data:
|
|
62
|
+
data: O,
|
|
63
63
|
isLoading: X,
|
|
64
64
|
isError: Z,
|
|
65
65
|
error: b
|
|
66
66
|
} = A({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(s.encounterUuid),
|
|
69
|
-
enabled: !!s?.encounterUuid &&
|
|
69
|
+
enabled: !!s?.encounterUuid && T
|
|
70
70
|
});
|
|
71
71
|
ge(
|
|
72
72
|
(e) => {
|
|
@@ -74,9 +74,9 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
77
|
-
const ee = i(() => !
|
|
77
|
+
const ee = i(() => !O?.entry || !s?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? Ne(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [O, s?.formName]), re = i(() => {
|
|
78
78
|
if (b)
|
|
79
|
-
return
|
|
79
|
+
return Te(b).message;
|
|
80
80
|
}, [b]), c = i(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
@@ -87,8 +87,8 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
87
87
|
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
88
|
[c, o]
|
|
89
89
|
), ae = d(
|
|
90
|
-
(e) =>
|
|
91
|
-
[
|
|
90
|
+
(e) => p && e.some((r) => u(r)) ? D : c,
|
|
91
|
+
[p, u, D, c]
|
|
92
92
|
), oe = c, se = i(
|
|
93
93
|
() => [
|
|
94
94
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -104,7 +104,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
104
104
|
return r[t].push({
|
|
105
105
|
id: a.encounterUuid,
|
|
106
106
|
formName: a.formName,
|
|
107
|
-
recordedOn:
|
|
107
|
+
recordedOn: pe(a.encounterDateTime, o, !0).formattedResult,
|
|
108
108
|
recordedBy: f ?? "--",
|
|
109
109
|
encounterDateTime: a.encounterDateTime,
|
|
110
110
|
encounterUuid: a.encounterUuid
|
|
@@ -126,7 +126,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
126
126
|
_(!1), L(null);
|
|
127
127
|
}, []), I = d((e) => {
|
|
128
128
|
globalThis.dispatchEvent(
|
|
129
|
-
new CustomEvent(
|
|
129
|
+
new CustomEvent(Be, {
|
|
130
130
|
detail: {
|
|
131
131
|
editOnly: "observationForms",
|
|
132
132
|
editTitle: "EDIT_OBSERVATION_FORM_TITLE",
|
|
@@ -140,7 +140,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
140
140
|
(e, r) => {
|
|
141
141
|
switch (r) {
|
|
142
142
|
case "recordedOn":
|
|
143
|
-
return /* @__PURE__ */ n(
|
|
143
|
+
return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
|
|
144
144
|
case "recordedBy":
|
|
145
145
|
return e.recordedBy;
|
|
146
146
|
case "actions":
|
|
@@ -162,14 +162,14 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
162
162
|
[k, I, u, o]
|
|
163
163
|
);
|
|
164
164
|
return /* @__PURE__ */ q(ne, { children: [
|
|
165
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || B || S.length === 0 || v ? /* @__PURE__ */ n(
|
|
166
166
|
x,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
|
-
loading:
|
|
172
|
-
errorStateMessage:
|
|
171
|
+
loading: R,
|
|
172
|
+
errorStateMessage: B ? P?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
174
|
renderCell: H,
|
|
175
175
|
className: N.formsTableBody,
|
|
@@ -203,16 +203,16 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
|
|
|
203
203
|
a
|
|
204
204
|
);
|
|
205
205
|
}) }) }),
|
|
206
|
-
|
|
206
|
+
T && s && /* @__PURE__ */ n(
|
|
207
207
|
Ae,
|
|
208
208
|
{
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
211
|
-
open:
|
|
211
|
+
open: T,
|
|
212
212
|
onRequestClose: w,
|
|
213
213
|
modalHeading: /* @__PURE__ */ q("div", { className: N.modalHeading, children: [
|
|
214
214
|
/* @__PURE__ */ n("span", { children: s.formName }),
|
|
215
|
-
|
|
215
|
+
p && u(s) && /* @__PURE__ */ n(
|
|
216
216
|
V,
|
|
217
217
|
{
|
|
218
218
|
label: o("EDIT_OBSERVATION_FORM"),
|
|
@@ -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 { a2 as d, a3 as f, a4 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CUMbqjIc.js";
|
|
2
|
+
import { a2 as d, a3 as f, a4 as e } from "./index-DCAEnw_P.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 { a2 as v, a3 as C, a4 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-CUMbqjIc.js";
|
|
2
|
+
import { a2 as v, a3 as C, a4 as e } from "./index-DCAEnw_P.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as I, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { d as Q, z as j, u as L,
|
|
2
|
+
import { d as Q, z as j, u as L, i as G, H as M, O as P, T as x, w as Y, P as J, U as W, F as X, j as Z, m as ee, $ as ae, n as se, o as U, B as te, Y as re, h as ie, p as ne, r as oe, t as de, v as le } from "./index-DCAEnw_P.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as D, useMemo as g } from "react";
|
|
5
5
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
|
|
@@ -7,7 +7,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
7
7
|
title: be,
|
|
8
8
|
wrapper: he,
|
|
9
9
|
secondary: ve
|
|
10
|
-
},
|
|
10
|
+
}, F = (s, l, n, d, c, t) => {
|
|
11
11
|
const r = te(s, l, c), e = r.value, p = re(e);
|
|
12
12
|
let i = e;
|
|
13
13
|
p === "Image" && (i = /* @__PURE__ */ o(
|
|
@@ -31,7 +31,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
31
31
|
r.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: r.header.referenceRange })
|
|
32
32
|
] }), u = c("OBSERVATIONS_RECORDED_BY", {
|
|
33
33
|
provider: r.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0,
|
|
34
|
+
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
35
|
/* @__PURE__ */ o("span", { children: u }),
|
|
36
36
|
b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
|
|
37
37
|
] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
|
|
@@ -40,7 +40,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
40
40
|
{
|
|
41
41
|
header: m,
|
|
42
42
|
value: i,
|
|
43
|
-
info:
|
|
43
|
+
info: f,
|
|
44
44
|
id: R,
|
|
45
45
|
testId: R,
|
|
46
46
|
ariaLabel: R
|
|
@@ -48,13 +48,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
48
48
|
`obs-${s.id}`
|
|
49
49
|
);
|
|
50
50
|
}, ye = (s, l, n, d, c, t, r) => /* @__PURE__ */ o(
|
|
51
|
-
|
|
51
|
+
U,
|
|
52
52
|
{
|
|
53
53
|
title: s.display,
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: n,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, p) =>
|
|
57
|
+
(e, p) => F(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -73,14 +73,14 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
73
73
|
const { t: d } = L(), c = (t, r, e) => {
|
|
74
74
|
const p = se(t.encounterDetails, d);
|
|
75
75
|
return /* @__PURE__ */ I(
|
|
76
|
-
|
|
76
|
+
U,
|
|
77
77
|
{
|
|
78
78
|
title: p,
|
|
79
79
|
id: `encounter-${t.encounterId}`,
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, m) =>
|
|
83
|
+
(i, m) => F(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -116,7 +116,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
116
116
|
)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
}, Re = (s) => ["conceptUuid", s],
|
|
119
|
+
}, Re = (s) => ["conceptUuid", s], Te = (s, l, n, d) => [
|
|
120
120
|
"observations",
|
|
121
121
|
s,
|
|
122
122
|
...l,
|
|
@@ -135,7 +135,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
135
135
|
} = d, p = pe(/* @__PURE__ */ new Set()), i = Q(), { addNotification: m } = j(), { t: u } = L(), b = ue({
|
|
136
136
|
queries: c.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => G(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
@@ -147,26 +147,26 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
147
147
|
type: "error"
|
|
148
148
|
}), p.current.add(0)) : !a && y && p.current.clear();
|
|
149
149
|
}, [b, m, u]);
|
|
150
|
-
const
|
|
150
|
+
const f = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...f, ...t])], [f, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = M(
|
|
151
151
|
l,
|
|
152
152
|
n
|
|
153
153
|
), {
|
|
154
|
-
data:
|
|
154
|
+
data: T,
|
|
155
155
|
isLoading: w,
|
|
156
156
|
isError: S,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ce({
|
|
159
|
-
queryKey:
|
|
159
|
+
queryKey: Te(
|
|
160
160
|
i,
|
|
161
161
|
h,
|
|
162
162
|
n,
|
|
163
163
|
e
|
|
164
164
|
),
|
|
165
|
-
queryFn: () => R ?
|
|
165
|
+
queryFn: () => R ? P(
|
|
166
166
|
i,
|
|
167
167
|
h,
|
|
168
168
|
n
|
|
169
|
-
) :
|
|
169
|
+
) : x(
|
|
170
170
|
i,
|
|
171
171
|
h,
|
|
172
172
|
n
|
|
@@ -188,21 +188,21 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
188
188
|
});
|
|
189
189
|
}, [S]);
|
|
190
190
|
const $ = g(() => {
|
|
191
|
-
if (!
|
|
192
|
-
let a = J(
|
|
191
|
+
if (!T) return [];
|
|
192
|
+
let a = J(T);
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [
|
|
196
|
+
}, [T, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A = w || !v, B = S && v, q = (!
|
|
200
|
+
], A = w || !v, B = S && v, q = (!T || T.entry?.length === 0 || h.length === 0) && v, C = B ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = q ? u("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !B, E = d.titleTranslationKey, _ = E ? u(E) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
204
204
|
id: "observations",
|
|
205
|
-
"data-testid": E ? `observations-${
|
|
205
|
+
"data-testid": E ? `observations-${_}` : "observations",
|
|
206
206
|
"aria-label": "observations-aria-label",
|
|
207
207
|
className: O.observations,
|
|
208
208
|
children: [
|
|
@@ -210,17 +210,17 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
210
210
|
ee,
|
|
211
211
|
{
|
|
212
212
|
id: "observations-title",
|
|
213
|
-
testId: E ? `observations-title-${
|
|
214
|
-
title:
|
|
213
|
+
testId: E ? `observations-title-${_}` : "observations-title",
|
|
214
|
+
title: _,
|
|
215
215
|
className: O.title,
|
|
216
|
-
children: /* @__PURE__ */ o("p", { children:
|
|
216
|
+
children: /* @__PURE__ */ o("p", { children: _ })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
219
|
z ? /* @__PURE__ */ o(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
223
|
-
title:
|
|
223
|
+
title: _,
|
|
224
224
|
hideThumbnail: r
|
|
225
225
|
}
|
|
226
226
|
) : /* @__PURE__ */ o(
|
|
@@ -242,5 +242,5 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
242
242
|
export {
|
|
243
243
|
Re as conceptUuidQueryKeys,
|
|
244
244
|
Ie as default,
|
|
245
|
-
|
|
245
|
+
Te as observationsQueryKeys
|
|
246
246
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a5 as we, a6 as z, a7 as xt, a8 as B, a3 as q, a4 as y, a9 as Ro, aa as ye, ab as R, ac as _, ad as k, ae as N, af as A, ag as bs, ah as ir, ai as $e, aj as G, ak as Hn, al as Vn, am as dt, an as D, ao as xs, ap as cn, aq as Be, ar as ws, as as qt, at as zt, au as $s, av as Cs, aw as $n, ax as Ss, ay as Nr, az as Bt, aA as zo, aB as ks, aC as Es, aD as j, aE as Gr, aF as Ms, aG as Ds, aH as sr, aI as As, aJ as Ts, aK as zn, aL as Fs, aM as Is, aN as Z, aO as Ps, aP as Ls } from "./index-
|
|
1
|
+
import { a5 as we, a6 as z, a7 as xt, a8 as B, a3 as q, a4 as y, a9 as Ro, aa as ye, ab as R, ac as _, ad as k, ae as N, af as A, ag as bs, ah as ir, ai as $e, aj as G, ak as Hn, al as Vn, am as dt, an as D, ao as xs, ap as cn, aq as Be, ar as ws, as as qt, at as zt, au as $s, av as Cs, aw as $n, ax as Ss, ay as Nr, az as Bt, aA as zo, aB as ks, aC as Es, aD as j, aE as Gr, aF as Ms, aG as Ds, aH as sr, aI as As, aJ as Ts, aK as zn, aL as Fs, aM as Is, aN as Z, aO as Ps, aP as Ls } from "./index-DCAEnw_P.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|