@bahmni/clinical-app 0.0.1-dev.412 → 0.0.1-dev.414
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-CfQteuY7.js → ConsultationPage-BESi0mob.js} +3108 -3108
- package/dist/{DocumentsTable-d1TJP4VT-1UJAI1FZ.js → DocumentsTable-C_8zPark-DHgBZ9hp.js} +1 -1
- package/dist/{FormsTable-CieUtVH3-C02PjiAA.js → FormsTable-XGVu_1HW-5xemwYs4.js} +61 -61
- package/dist/{LNWAZHJI-CS8wnS3M.js → LNWAZHJI-Bk8jQRiq.js} +2 -2
- package/dist/{MWZ6AO7Z-Ca-d4_qu.js → MWZ6AO7Z-DUXMkCvA.js} +2 -2
- package/dist/Observations-CygRW6N8-BjGLv4GH.js +246 -0
- package/dist/{YPM2AS64-wMYNmB67.js → YPM2AS64-B3vowWLx.js} +1 -1
- package/dist/{hook-GLReIHWd.js → hook-f0EB0w5u.js} +1 -1
- package/dist/{index-DKf0o4F9.js → index-CFb7GLxI.js} +6 -6
- package/dist/{index-CJB4S9Uw.js → index-DLQ6oq1j.js} +8904 -8897
- package/dist/{index-BOGGGNuc.js → index-E1rQQ_dv.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/package.json +1 -1
- package/dist/Observations-ChKkOtyn-NxwoxOdZ.js +0 -246
package/dist/index.js
CHANGED
|
@@ -267,6 +267,7 @@
|
|
|
267
267
|
"GLOBAL_ACTION_USER": "User",
|
|
268
268
|
"HOME_LABEL": "Home",
|
|
269
269
|
"IMMUNIZATION_HISTORY_WIDGET_ADD_BUTTON": "Add Immunization History",
|
|
270
|
+
"IMMUNIZATION_HISTORY_WIDGET_ADD_WAIVER_BUTTON": "Add Immunization Waiver",
|
|
270
271
|
"IMMUNIZATION_HISTORY_WIDGET_ADMINISTERED_TABLE_ARIA": "Administered immunizations table",
|
|
271
272
|
"IMMUNIZATION_HISTORY_WIDGET_ADMINISTERED_TAB_TITLE": "Vaccination summary",
|
|
272
273
|
"IMMUNIZATION_HISTORY_WIDGET_COL_ADMINISTERED_LOCATION": "Administered location",
|
|
@@ -276,6 +276,7 @@
|
|
|
276
276
|
"GLOBAL_ACTION_USER": "Usuario",
|
|
277
277
|
"HOME_LABEL": "Inicio",
|
|
278
278
|
"IMMUNIZATION_HISTORY_WIDGET_ADD_BUTTON": "Agregar inmunización",
|
|
279
|
+
"IMMUNIZATION_HISTORY_WIDGET_ADD_WAIVER_BUTTON": "Agregar exención de inmunización",
|
|
279
280
|
"IMMUNIZATION_HISTORY_WIDGET_ADMINISTERED_TABLE_ARIA": "Tabla de inmunizaciones administradas",
|
|
280
281
|
"IMMUNIZATION_HISTORY_WIDGET_ADMINISTERED_TAB_TITLE": "Resumen de vacunación",
|
|
281
282
|
"IMMUNIZATION_HISTORY_WIDGET_COL_ADMINISTERED_LOCATION": "Lugar de administración",
|
package/package.json
CHANGED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { v as G, z as H, u as V, j as Q, b as M, k as j, l as Y, m as J, E as P, H as W, n as X, o as Z, r as ee, Y as ae, x as se, B, C as re, D as te, w as ie, G as oe, I as ne, J as de, N as le } from "./index-CJB4S9Uw.js";
|
|
3
|
-
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
|
-
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
|
|
6
|
-
observations: pe,
|
|
7
|
-
title: be,
|
|
8
|
-
wrapper: ve,
|
|
9
|
-
secondary: he
|
|
10
|
-
}, U = (s, l, o, d, u, r) => {
|
|
11
|
-
const t = re(s, l, u), e = t.value, m = te(e);
|
|
12
|
-
let i = e;
|
|
13
|
-
m === "Image" && (i = /* @__PURE__ */ n(
|
|
14
|
-
ne,
|
|
15
|
-
{
|
|
16
|
-
imageSrc: e,
|
|
17
|
-
alt: e,
|
|
18
|
-
id: `${e}-img`,
|
|
19
|
-
hideThumbnail: r
|
|
20
|
-
}
|
|
21
|
-
)), m === "Video" && (i = /* @__PURE__ */ n(
|
|
22
|
-
de,
|
|
23
|
-
{
|
|
24
|
-
id: `${e}-video`,
|
|
25
|
-
videoSrc: e,
|
|
26
|
-
hideThumbnail: r
|
|
27
|
-
}
|
|
28
|
-
)), m === "PDF" && (i = /* @__PURE__ */ n(le, { id: `${e}-pdf`, src: e }));
|
|
29
|
-
const p = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
30
|
-
/* @__PURE__ */ n("span", { children: t.header.display }),
|
|
31
|
-
t.header.referenceRange && /* @__PURE__ */ n("span", { className: O.secondary, children: t.header.referenceRange })
|
|
32
|
-
] }), c = u("OBSERVATIONS_RECORDED_BY", {
|
|
33
|
-
provider: t.provider
|
|
34
|
-
}), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0, T = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
|
|
35
|
-
/* @__PURE__ */ n("span", { children: c }),
|
|
36
|
-
b && /* @__PURE__ */ n("span", { className: O.secondary, children: b })
|
|
37
|
-
] }), v = s.display, h = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${h}-${v}-${o}-${l}` : `${h}-${v}-${o}-${l}`;
|
|
38
|
-
return /* @__PURE__ */ n(
|
|
39
|
-
oe,
|
|
40
|
-
{
|
|
41
|
-
header: p,
|
|
42
|
-
value: i,
|
|
43
|
-
info: T,
|
|
44
|
-
id: R,
|
|
45
|
-
testId: R,
|
|
46
|
-
ariaLabel: R
|
|
47
|
-
},
|
|
48
|
-
`obs-${s.id}`
|
|
49
|
-
);
|
|
50
|
-
}, ye = (s, l, o, d, u, r, t) => /* @__PURE__ */ n(
|
|
51
|
-
B,
|
|
52
|
-
{
|
|
53
|
-
title: s.display,
|
|
54
|
-
id: `grouped-obs-${s.display}-${d}`,
|
|
55
|
-
open: o,
|
|
56
|
-
children: s.members?.map(
|
|
57
|
-
(e, m) => U(
|
|
58
|
-
e,
|
|
59
|
-
m,
|
|
60
|
-
u,
|
|
61
|
-
r,
|
|
62
|
-
l,
|
|
63
|
-
t
|
|
64
|
-
)
|
|
65
|
-
)
|
|
66
|
-
},
|
|
67
|
-
`grouped-obs-${s.id}`
|
|
68
|
-
), Oe = ({
|
|
69
|
-
groupedData: s,
|
|
70
|
-
title: l = "",
|
|
71
|
-
hideThumbnail: o
|
|
72
|
-
}) => {
|
|
73
|
-
const { t: d } = V(), u = (r, t, e) => {
|
|
74
|
-
const m = se(r.encounterDetails, d);
|
|
75
|
-
return /* @__PURE__ */ I(
|
|
76
|
-
B,
|
|
77
|
-
{
|
|
78
|
-
title: m,
|
|
79
|
-
id: `encounter-${r.encounterId}`,
|
|
80
|
-
open: t,
|
|
81
|
-
children: [
|
|
82
|
-
r.observations.map(
|
|
83
|
-
(i, p) => U(
|
|
84
|
-
i,
|
|
85
|
-
p,
|
|
86
|
-
e,
|
|
87
|
-
l,
|
|
88
|
-
d,
|
|
89
|
-
o
|
|
90
|
-
)
|
|
91
|
-
),
|
|
92
|
-
r.groupedObservations.map(
|
|
93
|
-
(i, p) => ye(
|
|
94
|
-
i,
|
|
95
|
-
d,
|
|
96
|
-
t,
|
|
97
|
-
p,
|
|
98
|
-
e,
|
|
99
|
-
l,
|
|
100
|
-
o
|
|
101
|
-
)
|
|
102
|
-
)
|
|
103
|
-
]
|
|
104
|
-
},
|
|
105
|
-
`encounter-${r.encounterId}`
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
return /* @__PURE__ */ n(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
id: "obs-by-encounter",
|
|
112
|
-
"data-testid": "obs-by-encounter-test-id",
|
|
113
|
-
"aria-label": "obs-by-encounter-aria-label",
|
|
114
|
-
children: s.map(
|
|
115
|
-
(r, t) => u(r, t === 0, t)
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}, Re = (s) => ["conceptUuid", s], _e = (s, l, o, d) => [
|
|
120
|
-
"observations",
|
|
121
|
-
s,
|
|
122
|
-
...l,
|
|
123
|
-
o,
|
|
124
|
-
d
|
|
125
|
-
], Ie = ({
|
|
126
|
-
config: s,
|
|
127
|
-
episodeOfCareUuids: l,
|
|
128
|
-
encounterUuids: o
|
|
129
|
-
}) => {
|
|
130
|
-
const d = s, {
|
|
131
|
-
conceptNames: u = [],
|
|
132
|
-
conceptUuid: r = [],
|
|
133
|
-
hideThumbnail: t = !1,
|
|
134
|
-
scope: e = "all"
|
|
135
|
-
} = d, m = me(/* @__PURE__ */ new Set()), i = G(), { addNotification: p } = H(), { t: c } = V(), b = ce({
|
|
136
|
-
queries: u.map((a) => ({
|
|
137
|
-
queryKey: Re(a),
|
|
138
|
-
queryFn: () => Q(a),
|
|
139
|
-
enabled: !!a
|
|
140
|
-
}))
|
|
141
|
-
});
|
|
142
|
-
L(() => {
|
|
143
|
-
const a = b.some((x) => x.isError), y = m.current.size > 0;
|
|
144
|
-
a && !y ? (p({
|
|
145
|
-
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
|
-
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
|
-
type: "error"
|
|
148
|
-
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
|
-
}, [b, p, c]);
|
|
150
|
-
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), h = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", w = M(
|
|
151
|
-
l,
|
|
152
|
-
o
|
|
153
|
-
), {
|
|
154
|
-
data: _,
|
|
155
|
-
isLoading: F,
|
|
156
|
-
isError: N,
|
|
157
|
-
refetch: S
|
|
158
|
-
} = ue({
|
|
159
|
-
queryKey: _e(
|
|
160
|
-
i,
|
|
161
|
-
v,
|
|
162
|
-
o,
|
|
163
|
-
e
|
|
164
|
-
),
|
|
165
|
-
queryFn: () => R ? j(
|
|
166
|
-
i,
|
|
167
|
-
v,
|
|
168
|
-
o
|
|
169
|
-
) : Y(
|
|
170
|
-
i,
|
|
171
|
-
v,
|
|
172
|
-
o
|
|
173
|
-
),
|
|
174
|
-
enabled: !!i && v.length > 0 && h && !w
|
|
175
|
-
});
|
|
176
|
-
J(
|
|
177
|
-
(a) => {
|
|
178
|
-
a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
|
|
179
|
-
(y) => v.includes(y)
|
|
180
|
-
) && S();
|
|
181
|
-
},
|
|
182
|
-
[i, S]
|
|
183
|
-
), L(() => {
|
|
184
|
-
N && p({
|
|
185
|
-
title: c("ERROR_DEFAULT_TITLE"),
|
|
186
|
-
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
187
|
-
type: "error"
|
|
188
|
-
});
|
|
189
|
-
}, [N]);
|
|
190
|
-
const $ = g(() => {
|
|
191
|
-
if (!_) return [];
|
|
192
|
-
let a = P(_);
|
|
193
|
-
e === "latest-encounter" && (a = W(a));
|
|
194
|
-
const y = X(a);
|
|
195
|
-
return Z(y);
|
|
196
|
-
}, [_, e]), C = [
|
|
197
|
-
{ key: "name", header: "name" },
|
|
198
|
-
{ key: "value", header: "value" },
|
|
199
|
-
{ key: "form", header: "form" }
|
|
200
|
-
], A = F || !h, D = N && h, k = (!_ || _.entry?.length === 0 || v.length === 0) && h, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, z = k ? c("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, f = d.titleTranslationKey, E = f ? c(f) : "";
|
|
201
|
-
return /* @__PURE__ */ I(
|
|
202
|
-
"div",
|
|
203
|
-
{
|
|
204
|
-
id: "observations",
|
|
205
|
-
"data-testid": f ? `observations-${E}` : "observations",
|
|
206
|
-
"aria-label": "observations-aria-label",
|
|
207
|
-
className: O.observations,
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ n(
|
|
210
|
-
ee,
|
|
211
|
-
{
|
|
212
|
-
id: "observations-title",
|
|
213
|
-
testId: f ? `observations-title-${E}` : "observations-title",
|
|
214
|
-
title: E,
|
|
215
|
-
className: O.title,
|
|
216
|
-
children: /* @__PURE__ */ n("p", { children: E })
|
|
217
|
-
}
|
|
218
|
-
),
|
|
219
|
-
q ? /* @__PURE__ */ n(
|
|
220
|
-
Oe,
|
|
221
|
-
{
|
|
222
|
-
groupedData: $,
|
|
223
|
-
title: E,
|
|
224
|
-
hideThumbnail: t
|
|
225
|
-
}
|
|
226
|
-
) : /* @__PURE__ */ n(
|
|
227
|
-
ae,
|
|
228
|
-
{
|
|
229
|
-
headers: C,
|
|
230
|
-
rows: [],
|
|
231
|
-
ariaLabel: c("OBSERVATIONS"),
|
|
232
|
-
loading: A,
|
|
233
|
-
errorStateMessage: K,
|
|
234
|
-
emptyStateMessage: z ?? c("NO_OBSERVATIONS_AVAILABLE"),
|
|
235
|
-
dataTestId: "observations-table"
|
|
236
|
-
}
|
|
237
|
-
)
|
|
238
|
-
]
|
|
239
|
-
}
|
|
240
|
-
);
|
|
241
|
-
};
|
|
242
|
-
export {
|
|
243
|
-
Re as conceptUuidQueryKeys,
|
|
244
|
-
Ie as default,
|
|
245
|
-
_e as observationsQueryKeys
|
|
246
|
-
};
|