@bahmni/clinical-app 0.0.1-dev.442 → 0.0.1-dev.443
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-C2iwAovC.js → ConsultationPage-h4Wbbjin.js} +10313 -10313
- package/dist/{DocumentsTable-v84RmXjK-GOlv1ior.js → DocumentsTable-v6NhgJsj-CIaPNCj0.js} +6 -6
- package/dist/{FormsTable-nHUlMFve-EVRk_DGl.js → FormsTable-DiD-aWUg-Z6mluyhh.js} +32 -32
- package/dist/{LNWAZHJI-CwpiQkt5.js → LNWAZHJI-LQzuej-S.js} +2 -2
- package/dist/{MWZ6AO7Z-CAcXB62l.js → MWZ6AO7Z-CS2VgCHg.js} +2 -2
- package/dist/{Observations-j0hpIS7w-20OdMS44.js → Observations-B2kwkXq0-BxI2RskT.js} +8 -8
- package/dist/{YPM2AS64-CACpDKFs.js → YPM2AS64-DZIFSK2p.js} +1 -1
- package/dist/{hook-CovTOTdy.js → hook-CdnuMa2Z.js} +1 -1
- package/dist/{index-DUipt5G5.js → index-D9IwfHx_.js} +34898 -34938
- package/dist/{index-4P1hmC-C.js → index-DK6oFPyP.js} +15 -15
- package/dist/{index-BSNKwD2R.js → index-LSVmX4V0.js} +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as d, jsxs as h, Fragment as
|
|
2
|
-
import { d as
|
|
1
|
+
import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { d as G, u as J, z as W, a as Y, J as X, h as Z, $ as ee, b as te } from "./index-D9IwfHx_.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 = {
|
|
@@ -38,7 +38,7 @@ const Te = [
|
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g =
|
|
41
|
+
), g = G(), { t: n } = J(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
@@ -106,7 +106,7 @@ const Te = [
|
|
|
106
106
|
), T = p(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), Q = _(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,7 +137,7 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */ h(
|
|
140
|
+
return /* @__PURE__ */ h(x, { children: [
|
|
141
141
|
/* @__PURE__ */ d("div", { "data-testid": "documents-table", children: /* @__PURE__ */ d(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -148,7 +148,7 @@ const Te = [
|
|
|
148
148
|
errorStateMessage: y ? b?.message : null,
|
|
149
149
|
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: Q,
|
|
152
152
|
className: r.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { u as ie, d as de, c as le, k as me, H as ue, o as ce, E as fe, Q as ye, w as Te, D as he, R as Ne, e as ge, h as pe, L as V, T as $, J as Oe, $ as K, W as be, q as
|
|
3
|
-
import { useQueryClient as
|
|
2
|
+
import { u as ie, d as de, c as le, k as me, H as ue, o as ce, E as fe, Q as ye, w as Te, D as he, R as Ne, e as ge, h as pe, L as V, T as $, J as Oe, $ as K, W as be, q as Ie, b as Ee, f as _e, g as Ae } from "./index-D9IwfHx_.js";
|
|
3
|
+
import { useQueryClient as Re, useQuery as E } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as i, useCallback as d } from "react";
|
|
5
5
|
const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", ve = "FormsTable-module_customAccordianItem__isszs", N = {
|
|
6
6
|
formsTableBody: Le,
|
|
7
7
|
modalHeading: Ce,
|
|
8
8
|
customAccordianItem: ve
|
|
9
|
-
},
|
|
10
|
-
episodeOfCareUuids:
|
|
9
|
+
}, Be = "startConsultation", Me = ({
|
|
10
|
+
episodeOfCareUuids: _,
|
|
11
11
|
encounterUuids: l,
|
|
12
12
|
config: z,
|
|
13
13
|
disableActions: j = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [g,
|
|
16
|
+
const { t: o } = ie(), m = de(), [g, A] = Q(!1), [t, R] = Q(null), {
|
|
17
17
|
numberOfVisits: x,
|
|
18
18
|
hideThumbnail: G = !1,
|
|
19
19
|
forms: T
|
|
20
20
|
} = z ?? {}, J = le(
|
|
21
|
-
|
|
21
|
+
Ae.EDIT_OBSERVATIONS
|
|
22
22
|
), { userPrivileges: h } = me(), p = J && !j && !!y, L = ue(
|
|
23
|
-
|
|
23
|
+
_,
|
|
24
24
|
l
|
|
25
|
-
),
|
|
25
|
+
), P = Re(), {
|
|
26
26
|
data: C = [],
|
|
27
27
|
isLoading: v,
|
|
28
|
-
isError:
|
|
29
|
-
error:
|
|
28
|
+
isError: B,
|
|
29
|
+
error: W,
|
|
30
30
|
refetch: Y
|
|
31
|
-
} =
|
|
32
|
-
queryKey: ["forms", m,
|
|
31
|
+
} = E({
|
|
32
|
+
queryKey: ["forms", m, _],
|
|
33
33
|
queryFn: () => ce(m, void 0, x),
|
|
34
34
|
enabled: !!m && !L
|
|
35
|
-
}),
|
|
35
|
+
}), D = i(() => {
|
|
36
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(T) && T.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => T.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [C, l, T]), { data:
|
|
42
|
+
}, [C, l, T]), { data: F = [] } = E({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => fe()
|
|
45
45
|
}), U = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = F.find(
|
|
48
48
|
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
49
|
);
|
|
50
50
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -54,7 +54,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
54
54
|
(s) => a.has(s.privilegeName) && s.editable
|
|
55
55
|
);
|
|
56
56
|
},
|
|
57
|
-
[
|
|
57
|
+
[F, h]
|
|
58
58
|
), u = d(
|
|
59
59
|
(e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
|
|
60
60
|
[y, U]
|
|
@@ -63,14 +63,14 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
63
63
|
isLoading: X,
|
|
64
64
|
isError: Z,
|
|
65
65
|
error: b
|
|
66
|
-
} =
|
|
66
|
+
} = E({
|
|
67
67
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
68
|
queryFn: () => ye(t.encounterUuid),
|
|
69
69
|
enabled: !!t?.encounterUuid && g
|
|
70
70
|
});
|
|
71
71
|
Te(
|
|
72
72
|
(e) => {
|
|
73
|
-
e.patientUUID === m && (Y(),
|
|
73
|
+
e.patientUUID === m && (Y(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
74
|
},
|
|
75
75
|
[m]
|
|
76
76
|
);
|
|
@@ -96,7 +96,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
96
96
|
],
|
|
97
97
|
[]
|
|
98
98
|
), M = i(() => {
|
|
99
|
-
const e =
|
|
99
|
+
const e = D.reduce(
|
|
100
100
|
(r, a) => {
|
|
101
101
|
const s = a.formName;
|
|
102
102
|
r[s] ??= [];
|
|
@@ -120,13 +120,13 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
120
120
|
)
|
|
121
121
|
})
|
|
122
122
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [
|
|
124
|
-
|
|
123
|
+
}, [D, o]), k = d((e) => {
|
|
124
|
+
R(e), A(!0);
|
|
125
125
|
}, []), w = d(() => {
|
|
126
|
-
|
|
127
|
-
}, []),
|
|
126
|
+
A(!1), R(null);
|
|
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",
|
|
@@ -151,7 +151,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
151
151
|
kind: "ghost",
|
|
152
152
|
size: "sm",
|
|
153
153
|
testId: `edit-form-${e.encounterUuid}`,
|
|
154
|
-
onClick: () =>
|
|
154
|
+
onClick: () => I(e),
|
|
155
155
|
children: /* @__PURE__ */ n($, {})
|
|
156
156
|
}
|
|
157
157
|
) : null;
|
|
@@ -159,17 +159,17 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
[k,
|
|
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: v ||
|
|
165
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || B || M.length === 0 || L ? /* @__PURE__ */ n(
|
|
166
166
|
K,
|
|
167
167
|
{
|
|
168
168
|
headers: oe,
|
|
169
169
|
ariaLabel: o("FORMS_HEADING"),
|
|
170
170
|
rows: [],
|
|
171
171
|
loading: v,
|
|
172
|
-
errorStateMessage:
|
|
172
|
+
errorStateMessage: B ? W?.message : void 0,
|
|
173
173
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
174
174
|
renderCell: H,
|
|
175
175
|
className: N.formsTableBody,
|
|
@@ -178,7 +178,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
178
178
|
) : /* @__PURE__ */ n(be, { align: "start", children: M.map((e, r) => {
|
|
179
179
|
const { formName: a, records: s } = e, f = ae(s);
|
|
180
180
|
return /* @__PURE__ */ n(
|
|
181
|
-
|
|
181
|
+
Ie,
|
|
182
182
|
{
|
|
183
183
|
title: a,
|
|
184
184
|
className: N.customAccordianItem,
|
|
@@ -204,7 +204,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
204
204
|
);
|
|
205
205
|
}) }) }),
|
|
206
206
|
g && t && /* @__PURE__ */ n(
|
|
207
|
-
|
|
207
|
+
Ee,
|
|
208
208
|
{
|
|
209
209
|
id: "modalIdForActionAreaLayout",
|
|
210
210
|
portalId: "main-display-area",
|
|
@@ -220,7 +220,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
220
220
|
size: "sm",
|
|
221
221
|
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
222
222
|
onClick: () => {
|
|
223
|
-
w(),
|
|
223
|
+
w(), I(t);
|
|
224
224
|
},
|
|
225
225
|
children: /* @__PURE__ */ n($, {})
|
|
226
226
|
}
|
|
@@ -231,7 +231,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
|
|
|
231
231
|
size: "md",
|
|
232
232
|
testId: "form-details-modal",
|
|
233
233
|
children: /* @__PURE__ */ n(
|
|
234
|
-
|
|
234
|
+
_e,
|
|
235
235
|
{
|
|
236
236
|
observations: ee,
|
|
237
237
|
isLoading: X,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { c3 as d, c4 as f, c5 as e } from "./index-
|
|
1
|
+
import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DZIFSK2p.js";
|
|
2
|
+
import { c3 as d, c4 as f, c5 as e } from "./index-D9IwfHx_.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = s({
|
|
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 { c3 as v, c4 as C, c5 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-DZIFSK2p.js";
|
|
2
|
+
import { c3 as v, c4 as C, c5 as e } from "./index-D9IwfHx_.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 S, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d as H, z as x, u as V, t as M, H as j, n as G, r as J, w as X, p as P, i as Y, j as W, m as Z, l as ee, $ as ae, s as se, S as B, v as te, x as re, h as ie, y as oe, A as ne, B as de, X as le } from "./index-
|
|
2
|
+
import { d as H, z as x, u as V, t as M, H as j, n as G, r as J, w as X, p as P, i as Y, j as W, m as Z, l as ee, $ as ae, s as se, S as B, v as te, x as re, h as ie, y as oe, A as ne, B as de, X as le } from "./index-D9IwfHx_.js";
|
|
3
3
|
import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as L, 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
|
+
}, w = (s, l, o, 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__ */ n(
|
|
@@ -54,7 +54,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
54
54
|
id: `grouped-obs-${s.display}-${d}`,
|
|
55
55
|
open: o,
|
|
56
56
|
children: s.members?.map(
|
|
57
|
-
(e, p) =>
|
|
57
|
+
(e, p) => w(
|
|
58
58
|
e,
|
|
59
59
|
p,
|
|
60
60
|
c,
|
|
@@ -80,7 +80,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
80
80
|
open: r,
|
|
81
81
|
children: [
|
|
82
82
|
t.observations.map(
|
|
83
|
-
(i, m) =>
|
|
83
|
+
(i, m) => w(
|
|
84
84
|
i,
|
|
85
85
|
m,
|
|
86
86
|
e,
|
|
@@ -147,12 +147,12 @@ 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 T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), f = e === "latest" || e === "latest-encounter",
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), f = e === "latest" || e === "latest-encounter", F = j(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: R,
|
|
155
|
-
isLoading:
|
|
155
|
+
isLoading: U,
|
|
156
156
|
isError: I,
|
|
157
157
|
refetch: N
|
|
158
158
|
} = ce({
|
|
@@ -171,7 +171,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
h,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && h.length > 0 && v && !
|
|
174
|
+
enabled: !!i && h.length > 0 && v && !F
|
|
175
175
|
});
|
|
176
176
|
X(
|
|
177
177
|
(a) => {
|
|
@@ -197,7 +197,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = U || !v, D = I && v, K = (!R || R.entry?.length === 0 || h.length === 0) && v, k = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, q = K ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !A && !D, E = d.titleTranslationKey, _ = E ? u(E) : "";
|
|
201
201
|
return /* @__PURE__ */ S(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-
|
|
1
|
+
import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-D9IwfHx_.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|