@bahmni/clinical-app 0.0.1-dev.347 → 0.0.1-dev.349
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-C3T8THlO.js → ConsultationPage-3qK8RV6o.js} +12794 -12401
- package/dist/{DocumentsTable-D-yL-evA-B1fwtgFW.js → DocumentsTable-CUERw540-DNwq47jg.js} +56 -56
- package/dist/FormsTable-BiSt9X9y-GfSnOhAP.js +293 -0
- package/dist/{LNWAZHJI-imGBWvAi.js → LNWAZHJI-DklJAly_.js} +2 -2
- package/dist/{MWZ6AO7Z-CaczTOj3.js → MWZ6AO7Z-pJNxlx6T.js} +2 -2
- package/dist/{Observations-CiATLznu-n-AeVz43.js → Observations-DG-AmCpd-BuJ3kLZo.js} +51 -51
- package/dist/{YPM2AS64-BSKjhDOv.js → YPM2AS64-CWWMfFV2.js} +181 -181
- package/dist/components/dashboardSection/DashboardSection.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationForms.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts +85 -0
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsPanel.d.ts.map +1 -1
- package/dist/components/patientHeader/ConsultationActionButton.d.ts.map +1 -1
- package/dist/events/startConsultation/models.d.ts +4 -0
- package/dist/events/startConsultation/models.d.ts.map +1 -1
- package/dist/hook-Dfbe9Yfh.js +12 -0
- package/dist/hooks/useObservationFormData.d.ts.map +1 -1
- package/dist/{index-C9yfr1HV.js → index-BmPRpoe2.js} +25 -24
- package/dist/{index-CjEhPxaX.js → index-DhSka-Il.js} +4 -3
- package/dist/{index-DUVzEfOd.js → index-aVz5vm6R.js} +56194 -59858
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +5 -0
- package/dist/locales/locale_es.json +5 -0
- package/dist/services/encounterBundleService.d.ts.map +1 -1
- package/dist/utils/fhir/observationResourceCreator.d.ts +19 -5
- package/dist/utils/fhir/observationResourceCreator.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-BbwKhyCn-DTJMxF2E.js +0 -232
- package/dist/hook-CQJXPLXP.js +0 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { f as Q, o as V, u as S, A as K, N as G, G as M, Z as j, k as w, B as x, O as H, Q as Z, $ as z, s as q, I as P, h as J, i as X, j as Y, l as W, m as ee } from "./index-aVz5vm6R.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as I, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const t =
|
|
4
|
+
import { useRef as se, useEffect as I, useMemo as O } from "react";
|
|
5
|
+
const L = (a, n, d, l, b, r) => {
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = J(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
Y,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -14,7 +14,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
14
14
|
hideThumbnail: r
|
|
15
15
|
}
|
|
16
16
|
)), o === "Video" && (i = /* @__PURE__ */ u(
|
|
17
|
-
|
|
17
|
+
W,
|
|
18
18
|
{
|
|
19
19
|
id: `${s}-video`,
|
|
20
20
|
videoSrc: s,
|
|
@@ -23,9 +23,9 @@ const D = (a, n, d, l, b, r) => {
|
|
|
23
23
|
)), o === "PDF" && (i = /* @__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
|
+
X,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: i,
|
|
@@ -37,13 +37,13 @@ const D = (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
|
+
q,
|
|
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, o) =>
|
|
46
|
+
(s, o) => L(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -59,17 +59,17 @@ const D = (a, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
63
|
-
const o =
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
62
|
+
const { t: l } = S(), b = (r, t, s) => {
|
|
63
|
+
const o = z(r.encounterDetails, l);
|
|
64
|
+
return /* @__PURE__ */ N(
|
|
65
|
+
q,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => L(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -105,7 +105,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
105
105
|
)
|
|
106
106
|
}
|
|
107
107
|
);
|
|
108
|
-
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z",
|
|
108
|
+
}, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", _ = {
|
|
109
109
|
observations: ie,
|
|
110
110
|
title: ne
|
|
111
111
|
}, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
|
|
@@ -113,91 +113,91 @@ const D = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } = V(), { t: o } = S(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => K(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
I(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const k = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: o("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: A,
|
|
138
|
+
isError: R,
|
|
139
|
+
refetch: T
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
143
|
-
enabled: !!t && p.length > 0 &&
|
|
142
|
+
queryFn: () => G(t, p),
|
|
143
|
+
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
M(
|
|
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
|
), I(() => {
|
|
153
|
-
|
|
153
|
+
R && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [R]);
|
|
159
|
+
const f = O(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = j(c), h = w(e);
|
|
162
|
+
return x(h);
|
|
163
|
+
}, [c]), D = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], $ = A || !y, g = R && y, F = (!c || c.entry?.length === 0 || p.length === 0) && y, B = g ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = F ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !$ && !g, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid": E ? `observations-${
|
|
172
|
+
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
|
-
className:
|
|
174
|
+
className: _.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
177
|
H,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId: E ? `observations-title-${
|
|
181
|
-
title:
|
|
182
|
-
className:
|
|
183
|
-
children: /* @__PURE__ */ u("p", { children:
|
|
180
|
+
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
|
+
title: v,
|
|
182
|
+
className: _.title,
|
|
183
|
+
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
U ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
190
|
-
title:
|
|
189
|
+
groupedData: f,
|
|
190
|
+
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
Z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: D,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
199
|
+
loading: $,
|
|
200
|
+
errorStateMessage: B,
|
|
201
201
|
emptyStateMessage: C,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|