@bahmni/widgets 0.0.1-dev.154 → 0.0.1-dev.157
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/{FormsTable-rLPw6Nu1.js → FormsTable-BbCN8S0D.js} +69 -69
- package/dist/{Observations-BwD7bytk.js → Observations-uXr6YSmn.js} +25 -25
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts.map +1 -1
- package/dist/{index-D3Mgdxfk.js → index-OaX83Bam.js} +5026 -5005
- package/dist/index.css +1 -1
- package/dist/index.js +13 -13
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsxs as b, jsx as d, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as P, useMemo as
|
|
2
|
+
import { c as C, C as te, N as re, $ as ae, e as oe, a as se, u as ne, i as de, m as ie, p as le, h as ce, o as me, O as ue, y as pe, b as be, t as x, H as fe, d as _e, f as $e, g as ye, j as H, l as ge } from "./index-OaX83Bam.js";
|
|
3
|
+
import { useQueryClient as he, useQuery as F } from "@tanstack/react-query";
|
|
4
|
+
import { useState as P, useMemo as h, useCallback as L } from "react";
|
|
5
5
|
import { useTranslation as ve } from "react-i18next";
|
|
6
|
-
const Ne = "_formsTableBody_1pd36_1",
|
|
6
|
+
const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Fe = "_formContent_1pd36_18", Le = "_formDetailsContainer_1pd36_25", Ce = "_observation_1pd36_30", Me = "_groupContainer_1pd36_39", Re = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", De = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Ie = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", Ge = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", xe = "_nestedGroupMembers_1pd36_141", o = {
|
|
7
7
|
formsTableBody: Ne,
|
|
8
|
-
customAccordianItem:
|
|
9
|
-
formContent:
|
|
10
|
-
formDetailsContainer:
|
|
11
|
-
observation:
|
|
8
|
+
customAccordianItem: Oe,
|
|
9
|
+
formContent: Fe,
|
|
10
|
+
formDetailsContainer: Le,
|
|
11
|
+
observation: Ce,
|
|
12
12
|
groupContainer: Me,
|
|
13
|
-
rowContainer:
|
|
14
|
-
groupLabel:
|
|
15
|
-
rowLabel:
|
|
13
|
+
rowContainer: Re,
|
|
14
|
+
groupLabel: we,
|
|
15
|
+
rowLabel: De,
|
|
16
16
|
rowValue: Te,
|
|
17
17
|
groupMembers: Ve,
|
|
18
18
|
memberRow: Ae,
|
|
19
19
|
memberLabel: Ee,
|
|
20
|
-
memberValue:
|
|
21
|
-
abnormalValue:
|
|
20
|
+
memberValue: Ie,
|
|
21
|
+
abnormalValue: Be,
|
|
22
22
|
commentSection: Se,
|
|
23
23
|
commentText: Ge,
|
|
24
|
-
nestedGroup:
|
|
25
|
-
nestedGroupLabel:
|
|
26
|
-
nestedGroupMembers:
|
|
24
|
+
nestedGroup: qe,
|
|
25
|
+
nestedGroupLabel: Ue,
|
|
26
|
+
nestedGroupMembers: xe
|
|
27
27
|
}, j = (e) => {
|
|
28
28
|
const t = te(e);
|
|
29
29
|
return t === "Image" ? /* @__PURE__ */ d(
|
|
@@ -81,7 +81,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
-
const { units: p, rangeString:
|
|
84
|
+
const { units: p, rangeString: g, isAbnormal: f } = K(e), _ = e.observationValue?.value?.toString(), $ = _ ? j(_) : null;
|
|
85
85
|
return /* @__PURE__ */ b(k, { children: [
|
|
86
86
|
/* @__PURE__ */ b(
|
|
87
87
|
"div",
|
|
@@ -93,21 +93,21 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
93
93
|
/* @__PURE__ */ b(
|
|
94
94
|
"p",
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: C(
|
|
97
97
|
o.memberLabel,
|
|
98
98
|
f ? o.abnormalValue : ""
|
|
99
99
|
),
|
|
100
100
|
"data-testid": `${r}obs-member-label-${i}-${a}`,
|
|
101
101
|
children: [
|
|
102
102
|
i,
|
|
103
|
-
|
|
103
|
+
g
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
107
|
/* @__PURE__ */ b(
|
|
108
108
|
"div",
|
|
109
109
|
{
|
|
110
|
-
className:
|
|
110
|
+
className: C(
|
|
111
111
|
o.memberValue,
|
|
112
112
|
f ? o.abnormalValue : ""
|
|
113
113
|
),
|
|
@@ -140,7 +140,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
140
140
|
formName: a = "",
|
|
141
141
|
comment: n
|
|
142
142
|
}) => {
|
|
143
|
-
const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: r } = K(e), p = a ? `${a}-` : "",
|
|
143
|
+
const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: r } = K(e), p = a ? `${a}-` : "", g = e.observationValue?.value?.toString(), f = g ? j(g) : null;
|
|
144
144
|
return /* @__PURE__ */ b(
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
@@ -156,7 +156,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
156
156
|
/* @__PURE__ */ b(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: C(
|
|
160
160
|
s ? o.groupLabel : o.rowLabel,
|
|
161
161
|
!s && r ? o.abnormalValue : ""
|
|
162
162
|
),
|
|
@@ -186,7 +186,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
186
186
|
) : /* @__PURE__ */ b(
|
|
187
187
|
"div",
|
|
188
188
|
{
|
|
189
|
-
className:
|
|
189
|
+
className: C(
|
|
190
190
|
o.rowValue,
|
|
191
191
|
r ? o.abnormalValue : ""
|
|
192
192
|
),
|
|
@@ -220,7 +220,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
220
220
|
)?.valueString : void 0, ke = (e) => {
|
|
221
221
|
if (e)
|
|
222
222
|
return e.note?.[0]?.text;
|
|
223
|
-
}, je = (e, t) => e.entry?.find((a) => a.resource?.id === t)?.resource,
|
|
223
|
+
}, je = (e, t) => e.entry?.find((a) => a.resource?.id === t)?.resource, D = (e, t) => {
|
|
224
224
|
const a = je(e, t);
|
|
225
225
|
return a ? {
|
|
226
226
|
formFieldPath: Pe(a),
|
|
@@ -232,16 +232,16 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
232
232
|
const a = oe(e);
|
|
233
233
|
return [
|
|
234
234
|
...a.observations.map((s) => {
|
|
235
|
-
const { formFieldPath: c, comment: i } =
|
|
235
|
+
const { formFieldPath: c, comment: i } = D(
|
|
236
236
|
e,
|
|
237
237
|
s.id
|
|
238
238
|
);
|
|
239
239
|
return { obs: s, formFieldPath: c, comment: i };
|
|
240
240
|
}),
|
|
241
241
|
...a.groupedObservations.flatMap((s) => {
|
|
242
|
-
const { formFieldPath: c } =
|
|
242
|
+
const { formFieldPath: c } = D(e, s.id);
|
|
243
243
|
return (s.members ?? []).map((i) => {
|
|
244
|
-
const { comment: r } =
|
|
244
|
+
const { comment: r } = D(e, i.id);
|
|
245
245
|
return { obs: i, formFieldPath: c, comment: r };
|
|
246
246
|
});
|
|
247
247
|
})
|
|
@@ -253,75 +253,75 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
253
253
|
encounterUuids: t,
|
|
254
254
|
config: a
|
|
255
255
|
}) => {
|
|
256
|
-
const { t: n } = ve(), s = ne(), [c, i] = P(!1), [r, p] = P(null),
|
|
256
|
+
const { t: n } = ve(), s = ne(), [c, i] = P(!1), [r, p] = P(null), g = a?.numberOfVisits, f = de(
|
|
257
257
|
e,
|
|
258
258
|
t
|
|
259
|
-
), _ =
|
|
259
|
+
), _ = he(), {
|
|
260
260
|
data: $ = [],
|
|
261
261
|
isLoading: v,
|
|
262
262
|
isError: N,
|
|
263
263
|
error: z,
|
|
264
|
-
refetch:
|
|
265
|
-
} =
|
|
264
|
+
refetch: W
|
|
265
|
+
} = F({
|
|
266
266
|
queryKey: ["forms", s, e],
|
|
267
|
-
queryFn: () => ie(s, void 0,
|
|
267
|
+
queryFn: () => ie(s, void 0, g),
|
|
268
268
|
enabled: !!s && !f
|
|
269
|
-
}), T =
|
|
269
|
+
}), T = h(() => !t || t.length === 0 ? $ : $.filter(
|
|
270
270
|
(l) => t.includes(l.encounterUuid)
|
|
271
|
-
), [$, t]), { data: V = [] } =
|
|
271
|
+
), [$, t]), { data: V = [] } = F({
|
|
272
272
|
queryKey: ["observationForms"],
|
|
273
273
|
queryFn: () => le()
|
|
274
|
-
}), A =
|
|
274
|
+
}), A = L(
|
|
275
275
|
(l) => V.find((m) => m.name === l)?.uuid,
|
|
276
276
|
[V]
|
|
277
|
-
), M =
|
|
277
|
+
), M = h(() => {
|
|
278
278
|
if (r)
|
|
279
279
|
return A(r.formName);
|
|
280
|
-
}, [r, A]), { isLoading:
|
|
280
|
+
}, [r, A]), { isLoading: Y, error: E } = F({
|
|
281
281
|
queryKey: ["formMetadata", M],
|
|
282
282
|
queryFn: () => ce(M),
|
|
283
283
|
enabled: !!M && c
|
|
284
284
|
}), {
|
|
285
|
-
data:
|
|
286
|
-
isLoading:
|
|
287
|
-
error:
|
|
288
|
-
} =
|
|
285
|
+
data: R,
|
|
286
|
+
isLoading: J,
|
|
287
|
+
error: I
|
|
288
|
+
} = F({
|
|
289
289
|
queryKey: ["formsEncounterFHIR", r?.encounterUuid],
|
|
290
290
|
queryFn: () => me(r.encounterUuid),
|
|
291
291
|
enabled: !!r?.encounterUuid && c
|
|
292
292
|
});
|
|
293
293
|
ue(
|
|
294
294
|
(l) => {
|
|
295
|
-
l.patientUUID === s && l.updatedConcepts.size > 0 && (
|
|
295
|
+
l.patientUUID === s && l.updatedConcepts.size > 0 && (W(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
296
296
|
},
|
|
297
297
|
[s]
|
|
298
298
|
);
|
|
299
|
-
const
|
|
300
|
-
|
|
299
|
+
const B = h(() => !R || !r?.formName ? [] : Ke(
|
|
300
|
+
R,
|
|
301
301
|
r.formName
|
|
302
|
-
), [
|
|
302
|
+
), [R, r?.formName]), S = h(
|
|
303
303
|
() => [
|
|
304
304
|
{ key: "recordedOn", header: n("FORM_RECORDED_ON") },
|
|
305
305
|
{ key: "recordedBy", header: n("FORM_RECORDED_BY") }
|
|
306
306
|
],
|
|
307
307
|
[n]
|
|
308
|
-
), X =
|
|
308
|
+
), X = h(
|
|
309
309
|
() => [
|
|
310
310
|
{ key: "recordedOn", sortable: !0 },
|
|
311
311
|
{ key: "recordedBy", sortable: !0 }
|
|
312
312
|
],
|
|
313
313
|
[]
|
|
314
|
-
), G =
|
|
314
|
+
), G = h(() => {
|
|
315
315
|
const l = T.reduce(
|
|
316
316
|
(m, u) => {
|
|
317
|
-
const
|
|
318
|
-
m[
|
|
319
|
-
const
|
|
320
|
-
return m[
|
|
317
|
+
const O = u.formName;
|
|
318
|
+
m[O] ??= [];
|
|
319
|
+
const w = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
|
|
320
|
+
return m[O].push({
|
|
321
321
|
id: u.encounterUuid,
|
|
322
322
|
formName: u.formName,
|
|
323
|
-
recordedOn: pe(u.encounterDateTime, n,
|
|
324
|
-
recordedBy:
|
|
323
|
+
recordedOn: pe(u.encounterDateTime, n, ge).formattedResult,
|
|
324
|
+
recordedBy: w ?? "--",
|
|
325
325
|
encounterDateTime: u.encounterDateTime,
|
|
326
326
|
encounterUuid: u.encounterUuid
|
|
327
327
|
}), m;
|
|
@@ -332,30 +332,30 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
332
332
|
([m, u]) => ({
|
|
333
333
|
formName: m,
|
|
334
334
|
records: u.sort(
|
|
335
|
-
(
|
|
335
|
+
(O, w) => w.encounterDateTime - O.encounterDateTime
|
|
336
336
|
)
|
|
337
337
|
})
|
|
338
338
|
).sort((m, u) => m.formName.localeCompare(u.formName));
|
|
339
|
-
}, [T, n]),
|
|
339
|
+
}, [T, n]), q = L((l) => {
|
|
340
340
|
p(l), i(!0);
|
|
341
|
-
}, []), Z =
|
|
341
|
+
}, []), Z = L(() => {
|
|
342
342
|
i(!1), p(null);
|
|
343
|
-
}, []),
|
|
344
|
-
(l,
|
|
345
|
-
switch (
|
|
343
|
+
}, []), U = L(
|
|
344
|
+
(l, y) => {
|
|
345
|
+
switch (y) {
|
|
346
346
|
case "recordedOn":
|
|
347
|
-
return /* @__PURE__ */ d(be, { onClick: () =>
|
|
347
|
+
return /* @__PURE__ */ d(be, { onClick: () => q(l), children: l.recordedOn });
|
|
348
348
|
case "recordedBy":
|
|
349
349
|
return l.recordedBy;
|
|
350
350
|
default:
|
|
351
351
|
return null;
|
|
352
352
|
}
|
|
353
353
|
},
|
|
354
|
-
[
|
|
354
|
+
[q]
|
|
355
355
|
);
|
|
356
356
|
return /* @__PURE__ */ b(k, { children: [
|
|
357
357
|
/* @__PURE__ */ d("div", { "data-testid": "forms-table", children: v || N || G.length === 0 || f ? /* @__PURE__ */ d(
|
|
358
|
-
|
|
358
|
+
x,
|
|
359
359
|
{
|
|
360
360
|
headers: S,
|
|
361
361
|
ariaLabel: n("FORMS_HEADING"),
|
|
@@ -363,11 +363,11 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
363
363
|
loading: v,
|
|
364
364
|
errorStateMessage: N ? z?.message : void 0,
|
|
365
365
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
366
|
-
renderCell:
|
|
366
|
+
renderCell: U,
|
|
367
367
|
className: o.formsTableBody,
|
|
368
368
|
dataTestId: "forms-table"
|
|
369
369
|
}
|
|
370
|
-
) : /* @__PURE__ */ d(fe, { align: "start", children: G.map((l,
|
|
370
|
+
) : /* @__PURE__ */ d(fe, { align: "start", children: G.map((l, y) => {
|
|
371
371
|
const { formName: m, records: u } = l;
|
|
372
372
|
return /* @__PURE__ */ d(
|
|
373
373
|
_e,
|
|
@@ -375,9 +375,9 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
375
375
|
title: m,
|
|
376
376
|
className: o.customAccordianItem,
|
|
377
377
|
testId: `accordian-title-${m}`,
|
|
378
|
-
open:
|
|
378
|
+
open: y === 0,
|
|
379
379
|
children: /* @__PURE__ */ d(
|
|
380
|
-
|
|
380
|
+
x,
|
|
381
381
|
{
|
|
382
382
|
headers: S,
|
|
383
383
|
ariaLabel: n("FORMS_HEADING"),
|
|
@@ -386,7 +386,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
386
386
|
errorStateMessage: "",
|
|
387
387
|
sortable: X,
|
|
388
388
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
389
|
-
renderCell:
|
|
389
|
+
renderCell: U,
|
|
390
390
|
className: o.formsTableBody,
|
|
391
391
|
dataTestId: `forms-table-${m}`
|
|
392
392
|
}
|
|
@@ -406,13 +406,13 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
|
|
|
406
406
|
passiveModal: !0,
|
|
407
407
|
size: "md",
|
|
408
408
|
testId: "form-details-modal",
|
|
409
|
-
children: /* @__PURE__ */ d("div", { className: o.formContent, children:
|
|
409
|
+
children: /* @__PURE__ */ d("div", { className: o.formContent, children: Y || J ? /* @__PURE__ */ d(ye, { width: "100%", lineCount: 3 }) : E ? /* @__PURE__ */ d("div", { children: H(E).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ d("div", { children: H(I).message ?? n("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ d("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: y }, m) => /* @__PURE__ */ d(
|
|
410
410
|
He,
|
|
411
411
|
{
|
|
412
412
|
observation: l,
|
|
413
413
|
index: m,
|
|
414
414
|
formName: r.formName,
|
|
415
|
-
comment:
|
|
415
|
+
comment: y
|
|
416
416
|
},
|
|
417
417
|
`${l.id}`
|
|
418
418
|
)) }) : /* @__PURE__ */ d("div", { children: n("NO_FORM_DATA_AVAILABLE") }) })
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import { k,
|
|
3
|
-
import { useQueries as
|
|
4
|
-
import { useRef as te, useEffect as
|
|
5
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as d, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { k, _ as S, n as q, C as M, q as V, N as K, $ as Q, u as G, r as H, s as P, v as j, O as z, e as Y, w as J, x as W, B as X, t as Z } from "./index-OaX83Bam.js";
|
|
3
|
+
import { useQueries as x, useQuery as ee } from "@tanstack/react-query";
|
|
4
|
+
import { useRef as te, useEffect as I, useMemo as h } from "react";
|
|
5
|
+
import { useTranslation as D } from "react-i18next";
|
|
6
6
|
const U = (t, c, n, l, o) => {
|
|
7
|
-
const s = q(t, c), r = s.value, a =
|
|
7
|
+
const s = q(t, c), r = s.value, a = M(r);
|
|
8
8
|
let i = r;
|
|
9
9
|
a === "Image" && (i = /* @__PURE__ */ d(K, { imageSrc: r, alt: r, id: `${r}-img` })), a === "Video" && (i = /* @__PURE__ */ d(Q, { id: `${r}-video`, videoSrc: r }));
|
|
10
10
|
const u = o("OBSERVATIONS_RECORDED_BY", {
|
|
11
11
|
provider: s.provider
|
|
12
12
|
}), b = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${m}-${b}-${n}-${c}` : `${m}-${b}-${n}-${c}`;
|
|
13
13
|
return /* @__PURE__ */ d(
|
|
14
|
-
|
|
14
|
+
V,
|
|
15
15
|
{
|
|
16
16
|
header: s.header,
|
|
17
17
|
value: i,
|
|
@@ -37,9 +37,9 @@ const U = (t, c, n, l, o) => {
|
|
|
37
37
|
groupedData: t,
|
|
38
38
|
title: c = ""
|
|
39
39
|
}) => {
|
|
40
|
-
const { t: n } =
|
|
40
|
+
const { t: n } = D(), l = (o, s, r) => {
|
|
41
41
|
const a = k(o.encounterDetails, n);
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ C(
|
|
43
43
|
S,
|
|
44
44
|
{
|
|
45
45
|
title: a,
|
|
@@ -75,18 +75,18 @@ const U = (t, c, n, l, o) => {
|
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}, re = "_observations_kfbhq_1", ae = "_title_kfbhq_12",
|
|
78
|
+
}, re = "_observations_kfbhq_1", ae = "_title_kfbhq_12", N = {
|
|
79
79
|
observations: re,
|
|
80
80
|
title: ae
|
|
81
81
|
}, ne = (t) => ["conceptUuid", t], ie = (t, c) => ["observations", t, ...c], me = ({ config: t }) => {
|
|
82
|
-
const c = t, { conceptNames: n = [], conceptUuid: l = [] } = c, o = te(/* @__PURE__ */ new Set()), s = G(), { addNotification: r } = H(), { t: a } =
|
|
82
|
+
const c = t, { conceptNames: n = [], conceptUuid: l = [] } = c, o = te(/* @__PURE__ */ new Set()), s = G(), { addNotification: r } = H(), { t: a } = D(), i = x({
|
|
83
83
|
queries: n.map((e) => ({
|
|
84
84
|
queryKey: ne(e),
|
|
85
85
|
queryFn: () => P(e),
|
|
86
86
|
enabled: !!e
|
|
87
87
|
}))
|
|
88
88
|
});
|
|
89
|
-
|
|
89
|
+
I(() => {
|
|
90
90
|
i.forEach((e, p) => {
|
|
91
91
|
if (e.isError && !o.current.has(p)) {
|
|
92
92
|
const g = n[p];
|
|
@@ -108,14 +108,14 @@ const U = (t, c, n, l, o) => {
|
|
|
108
108
|
queryFn: () => j(s, b),
|
|
109
109
|
enabled: !!s && b.length > 0 && v
|
|
110
110
|
});
|
|
111
|
-
|
|
111
|
+
z(
|
|
112
112
|
(e) => {
|
|
113
113
|
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
114
114
|
(g) => b.includes(g)
|
|
115
115
|
) && R();
|
|
116
116
|
},
|
|
117
117
|
[s, R]
|
|
118
|
-
),
|
|
118
|
+
), I(() => {
|
|
119
119
|
O && r({
|
|
120
120
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
121
121
|
message: a("ERROR_FETCHING_OBSERVATIONS"),
|
|
@@ -124,35 +124,35 @@ const U = (t, c, n, l, o) => {
|
|
|
124
124
|
}, [O]);
|
|
125
125
|
const T = h(() => {
|
|
126
126
|
if (!m) return [];
|
|
127
|
-
const e =
|
|
128
|
-
return
|
|
129
|
-
}, [m]),
|
|
127
|
+
const e = Y(m), p = J(e);
|
|
128
|
+
return W(p);
|
|
129
|
+
}, [m]), B = [
|
|
130
130
|
{ key: "name", header: "name" },
|
|
131
131
|
{ key: "value", header: "value" },
|
|
132
132
|
{ key: "form", header: "form" }
|
|
133
|
-
], _ = f || !v,
|
|
134
|
-
return /* @__PURE__ */
|
|
133
|
+
], _ = f || !v, $ = O && v, A = (!m || m.entry?.length === 0 || b.length === 0) && v, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, w = T.length > 0 && !_ && !$, E = c.titleTranslationKey, y = E ? a(E) : "";
|
|
134
|
+
return /* @__PURE__ */ C(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "observations",
|
|
138
138
|
"data-testid": E ? `observations-${y}` : "observations",
|
|
139
139
|
"aria-label": "observations-aria-label",
|
|
140
|
-
className:
|
|
140
|
+
className: N.observations,
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ d(
|
|
143
|
-
|
|
143
|
+
X,
|
|
144
144
|
{
|
|
145
145
|
id: "observations-title",
|
|
146
146
|
testId: E ? `observations-title-${y}` : "observations-title",
|
|
147
147
|
title: y,
|
|
148
|
-
className:
|
|
148
|
+
className: N.title,
|
|
149
149
|
children: /* @__PURE__ */ d("p", { children: y })
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
w ? /* @__PURE__ */ d(oe, { groupedData: T, title: y }) : /* @__PURE__ */ d(
|
|
153
|
+
Z,
|
|
154
154
|
{
|
|
155
|
-
headers:
|
|
155
|
+
headers: B,
|
|
156
156
|
rows: [],
|
|
157
157
|
ariaLabel: a("OBSERVATIONS"),
|
|
158
158
|
loading: _,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericServiceRequestTable.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/GenericServiceRequestTable.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"GenericServiceRequestTable.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/GenericServiceRequestTable.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAI/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAahD,eAAO,MAAM,8BAA8B,GACzC,cAAc,MAAM,EACpB,aAAa,MAAM,EACnB,iBAAiB,MAAM,EAAE,6EAEoD,CAAC;AAehF;;;GAGG;AACH,QAAA,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkOrD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|