@bahmni/widgets 0.0.1-dev.186 → 0.0.1-dev.187
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/{DocumentsTable-CvuLG_h7.js → DocumentsTable-BXOwjkeG.js} +2193 -2082
- package/dist/{FormsTable-B4YN4flO.js → FormsTable-lwNcLVVv.js} +47 -47
- package/dist/{Observations-o12chqhF.js → Observations-BIS0am83.js} +26 -26
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts +2 -3
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts.map +1 -1
- package/dist/genericServiceRequest/utils.d.ts.map +1 -1
- package/dist/{index-BpiNllc0.js → index-DwHCZ4D7.js} +40052 -54316
- package/dist/index.js +11 -11
- package/dist/labinvestigation/LabInvestigation.d.ts.map +1 -1
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts +2 -3
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as b, jsx as n, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as b, jsx as n, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import { c as M, Z as re, X as te, e as ae, d as oe, f as se, J as ne, u as de, N as ie, q as le, g as ce, x as me, h as ue, j as pe, M as be, R as fe, t as P, B as _e, k as he, b as $e, _ as ye, T as U, i as ge } from "./index-DwHCZ4D7.js";
|
|
3
3
|
import { useQueryClient as ve, useQuery as F } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as k, useMemo as g, useCallback as L } from "react";
|
|
5
5
|
import { useTranslation as Ne } from "react-i18next";
|
|
6
|
-
const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Me = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", we = "_rowContainer_1pd36_43", De = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67",
|
|
6
|
+
const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Me = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", we = "_rowContainer_1pd36_43", De = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Be = "_groupMembers_1pd36_75", Ie = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", Ee = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", qe = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Pe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
|
|
7
7
|
formsTableBody: Oe,
|
|
8
8
|
customAccordianItem: Fe,
|
|
9
9
|
formContent: Le,
|
|
@@ -14,10 +14,10 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
14
14
|
groupLabel: De,
|
|
15
15
|
rowLabel: Te,
|
|
16
16
|
rowValue: Ve,
|
|
17
|
-
groupMembers:
|
|
18
|
-
memberRow:
|
|
19
|
-
memberLabel:
|
|
20
|
-
memberValue:
|
|
17
|
+
groupMembers: Be,
|
|
18
|
+
memberRow: Ie,
|
|
19
|
+
memberLabel: Ae,
|
|
20
|
+
memberValue: Ee,
|
|
21
21
|
abnormalValue: Ge,
|
|
22
22
|
commentSection: Se,
|
|
23
23
|
commentText: qe,
|
|
@@ -81,8 +81,8 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
|
-
const { units: p, rangeString:
|
|
85
|
-
return /* @__PURE__ */ b(
|
|
84
|
+
const { units: p, rangeString: y, isAbnormal: f } = K(e), _ = e.observationValue?.value?.toString(), h = _ ? j(_) : null;
|
|
85
|
+
return /* @__PURE__ */ b(H, { children: [
|
|
86
86
|
/* @__PURE__ */ b(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
@@ -100,7 +100,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
100
100
|
"data-testid": `${t}obs-member-label-${i}-${a}`,
|
|
101
101
|
children: [
|
|
102
102
|
i,
|
|
103
|
-
|
|
103
|
+
y
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
106
|
),
|
|
@@ -113,7 +113,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
113
113
|
),
|
|
114
114
|
"data-testid": `${t}obs-member-value-${i}-${a}`,
|
|
115
115
|
children: [
|
|
116
|
-
|
|
116
|
+
h,
|
|
117
117
|
p && ` ${p}`
|
|
118
118
|
]
|
|
119
119
|
}
|
|
@@ -134,13 +134,13 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
134
134
|
}
|
|
135
135
|
)
|
|
136
136
|
] });
|
|
137
|
-
},
|
|
137
|
+
}, ke = ({
|
|
138
138
|
observation: e,
|
|
139
139
|
index: r,
|
|
140
140
|
formName: a = "",
|
|
141
141
|
comment: d
|
|
142
142
|
}) => {
|
|
143
|
-
const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: t } = K(e), p = a ? `${a}-` : "",
|
|
143
|
+
const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: t } = K(e), p = a ? `${a}-` : "", y = e.observationValue?.value?.toString(), f = y ? j(y) : null;
|
|
144
144
|
return /* @__PURE__ */ b(
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
@@ -172,12 +172,12 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
172
172
|
{
|
|
173
173
|
className: o.groupMembers,
|
|
174
174
|
"data-testid": `${p}observation-group-members-${e.display}-${r}`,
|
|
175
|
-
children: e.members?.map((_,
|
|
175
|
+
children: e.members?.map((_, h) => /* @__PURE__ */ n(
|
|
176
176
|
Q,
|
|
177
177
|
{
|
|
178
178
|
member: _,
|
|
179
179
|
depth: 0,
|
|
180
|
-
memberIndex:
|
|
180
|
+
memberIndex: h,
|
|
181
181
|
formName: a
|
|
182
182
|
},
|
|
183
183
|
`${_.id}`
|
|
@@ -215,7 +215,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
215
215
|
},
|
|
216
216
|
`${e.id}-${r}`
|
|
217
217
|
);
|
|
218
|
-
},
|
|
218
|
+
}, He = (e) => e ? e.extension?.find(
|
|
219
219
|
(a) => a.url === ne
|
|
220
220
|
)?.valueString : void 0, je = (e) => {
|
|
221
221
|
if (e)
|
|
@@ -223,7 +223,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
223
223
|
}, Ke = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, D = (e, r) => {
|
|
224
224
|
const a = Ke(e, r);
|
|
225
225
|
return a ? {
|
|
226
|
-
formFieldPath:
|
|
226
|
+
formFieldPath: He(a),
|
|
227
227
|
comment: je(a)
|
|
228
228
|
} : {};
|
|
229
229
|
}, Qe = (e, r) => {
|
|
@@ -248,43 +248,43 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
248
248
|
].filter(
|
|
249
249
|
({ formFieldPath: s }) => !s || s.includes(r)
|
|
250
250
|
);
|
|
251
|
-
},
|
|
251
|
+
}, Ye = ({
|
|
252
252
|
episodeOfCareUuids: e,
|
|
253
253
|
encounterUuids: r,
|
|
254
254
|
config: a
|
|
255
255
|
}) => {
|
|
256
|
-
const { t: d } = Ne(), s = de(), [c, i] =
|
|
256
|
+
const { t: d } = Ne(), s = de(), [c, i] = k(!1), [t, p] = k(null), y = a?.numberOfVisits, f = ie(
|
|
257
257
|
e,
|
|
258
258
|
r
|
|
259
259
|
), _ = ve(), {
|
|
260
|
-
data:
|
|
260
|
+
data: h = [],
|
|
261
261
|
isLoading: v,
|
|
262
262
|
isError: N,
|
|
263
|
-
error:
|
|
263
|
+
error: X,
|
|
264
264
|
refetch: z
|
|
265
265
|
} = F({
|
|
266
266
|
queryKey: ["forms", s, e],
|
|
267
|
-
queryFn: () => le(s, void 0,
|
|
267
|
+
queryFn: () => le(s, void 0, y),
|
|
268
268
|
enabled: !!s && !f
|
|
269
|
-
}), T = g(() => !r || r.length === 0 ?
|
|
269
|
+
}), T = g(() => !r || r.length === 0 ? h : h.filter(
|
|
270
270
|
(l) => r.includes(l.encounterUuid)
|
|
271
|
-
), [
|
|
271
|
+
), [h, r]), { data: V = [] } = F({
|
|
272
272
|
queryKey: ["observationForms"],
|
|
273
273
|
queryFn: () => ce()
|
|
274
|
-
}),
|
|
274
|
+
}), B = L(
|
|
275
275
|
(l) => V.find((m) => m.name === l)?.uuid,
|
|
276
276
|
[V]
|
|
277
277
|
), R = g(() => {
|
|
278
278
|
if (t)
|
|
279
|
-
return
|
|
280
|
-
}, [t,
|
|
279
|
+
return B(t.formName);
|
|
280
|
+
}, [t, B]), { isLoading: J, error: I } = F({
|
|
281
281
|
queryKey: ["formMetadata", R],
|
|
282
282
|
queryFn: () => me(R),
|
|
283
283
|
enabled: !!R && c
|
|
284
284
|
}), {
|
|
285
285
|
data: C,
|
|
286
|
-
isLoading:
|
|
287
|
-
error:
|
|
286
|
+
isLoading: Z,
|
|
287
|
+
error: A
|
|
288
288
|
} = F({
|
|
289
289
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
290
290
|
queryFn: () => ue(t.encounterUuid),
|
|
@@ -296,7 +296,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
296
296
|
},
|
|
297
297
|
[s]
|
|
298
298
|
);
|
|
299
|
-
const
|
|
299
|
+
const E = g(() => !C || !t?.formName ? [] : Qe(
|
|
300
300
|
C,
|
|
301
301
|
t.formName
|
|
302
302
|
), [C, t?.formName]), G = g(
|
|
@@ -305,7 +305,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
305
305
|
{ key: "recordedBy", header: d("FORM_RECORDED_BY") }
|
|
306
306
|
],
|
|
307
307
|
[d]
|
|
308
|
-
),
|
|
308
|
+
), W = g(
|
|
309
309
|
() => [
|
|
310
310
|
{ key: "recordedOn", sortable: !0 },
|
|
311
311
|
{ key: "recordedBy", sortable: !0 }
|
|
@@ -338,11 +338,11 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
338
338
|
).sort((m, u) => m.formName.localeCompare(u.formName));
|
|
339
339
|
}, [T, d]), q = L((l) => {
|
|
340
340
|
p(l), i(!0);
|
|
341
|
-
}, []),
|
|
341
|
+
}, []), Y = L(() => {
|
|
342
342
|
i(!1), p(null);
|
|
343
343
|
}, []), x = L(
|
|
344
|
-
(l,
|
|
345
|
-
switch (
|
|
344
|
+
(l, $) => {
|
|
345
|
+
switch ($) {
|
|
346
346
|
case "recordedOn":
|
|
347
347
|
return /* @__PURE__ */ n(fe, { onClick: () => q(l), children: l.recordedOn });
|
|
348
348
|
case "recordedBy":
|
|
@@ -353,7 +353,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
353
353
|
},
|
|
354
354
|
[q]
|
|
355
355
|
);
|
|
356
|
-
return /* @__PURE__ */ b(
|
|
356
|
+
return /* @__PURE__ */ b(H, { children: [
|
|
357
357
|
/* @__PURE__ */ n("div", { "data-testid": "forms-table", children: v || N || S.length === 0 || f ? /* @__PURE__ */ n(
|
|
358
358
|
P,
|
|
359
359
|
{
|
|
@@ -361,21 +361,21 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
361
361
|
ariaLabel: d("FORMS_HEADING"),
|
|
362
362
|
rows: [],
|
|
363
363
|
loading: v,
|
|
364
|
-
errorStateMessage: N ?
|
|
364
|
+
errorStateMessage: N ? X?.message : void 0,
|
|
365
365
|
emptyStateMessage: d("FORMS_UNAVAILABLE"),
|
|
366
366
|
renderCell: x,
|
|
367
367
|
className: o.formsTableBody,
|
|
368
368
|
dataTestId: "forms-table"
|
|
369
369
|
}
|
|
370
|
-
) : /* @__PURE__ */ n(_e, { align: "start", children: S.map((l,
|
|
370
|
+
) : /* @__PURE__ */ n(_e, { align: "start", children: S.map((l, $) => {
|
|
371
371
|
const { formName: m, records: u } = l;
|
|
372
372
|
return /* @__PURE__ */ n(
|
|
373
|
-
|
|
373
|
+
he,
|
|
374
374
|
{
|
|
375
375
|
title: m,
|
|
376
376
|
className: o.customAccordianItem,
|
|
377
377
|
testId: `accordian-title-${m}`,
|
|
378
|
-
open:
|
|
378
|
+
open: $ === 0,
|
|
379
379
|
children: /* @__PURE__ */ n(
|
|
380
380
|
P,
|
|
381
381
|
{
|
|
@@ -384,7 +384,7 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
384
384
|
rows: u,
|
|
385
385
|
loading: !1,
|
|
386
386
|
errorStateMessage: "",
|
|
387
|
-
sortable:
|
|
387
|
+
sortable: W,
|
|
388
388
|
emptyStateMessage: d("FORMS_UNAVAILABLE"),
|
|
389
389
|
renderCell: x,
|
|
390
390
|
className: o.formsTableBody,
|
|
@@ -396,24 +396,24 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
396
396
|
);
|
|
397
397
|
}) }) }),
|
|
398
398
|
c && t && /* @__PURE__ */ n(
|
|
399
|
-
|
|
399
|
+
$e,
|
|
400
400
|
{
|
|
401
401
|
id: "modalIdForActionAreaLayout",
|
|
402
402
|
portalId: "main-display-area",
|
|
403
403
|
open: c,
|
|
404
|
-
onRequestClose:
|
|
404
|
+
onRequestClose: Y,
|
|
405
405
|
modalHeading: t.formName,
|
|
406
406
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
407
407
|
passiveModal: !0,
|
|
408
408
|
size: "md",
|
|
409
409
|
testId: "form-details-modal",
|
|
410
|
-
children: /* @__PURE__ */ n("div", { className: o.formContent, children: J ||
|
|
411
|
-
|
|
410
|
+
children: /* @__PURE__ */ n("div", { className: o.formContent, children: J || Z ? /* @__PURE__ */ n(ye, { width: "100%", lineCount: 3 }) : I ? /* @__PURE__ */ n("div", { children: U(I).message ?? d("ERROR_FETCHING_FORM_METADATA") }) : A ? /* @__PURE__ */ n("div", { children: U(A).message ?? d("ERROR_FETCHING_FORM_DATA") }) : E.length > 0 ? /* @__PURE__ */ n("div", { className: o.formDetailsContainer, children: E.map(({ obs: l, comment: $ }, m) => /* @__PURE__ */ n(
|
|
411
|
+
ke,
|
|
412
412
|
{
|
|
413
413
|
observation: l,
|
|
414
414
|
index: m,
|
|
415
415
|
formName: t.formName,
|
|
416
|
-
comment:
|
|
416
|
+
comment: $
|
|
417
417
|
},
|
|
418
418
|
`${l.id}`
|
|
419
419
|
)) }) : /* @__PURE__ */ n("div", { children: d("NO_FORM_DATA_AVAILABLE") }) })
|
|
@@ -422,5 +422,5 @@ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le =
|
|
|
422
422
|
] });
|
|
423
423
|
};
|
|
424
424
|
export {
|
|
425
|
-
|
|
425
|
+
Ye as default
|
|
426
426
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as l, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { l as M, m as C, n as Q, Z as V, G as k, X as q, e as G, d as K, u as j, a as P, o as H, p as X, j as Z, f as z, r as J, s as Y, v as W, t as x } from "./index-DwHCZ4D7.js";
|
|
3
3
|
import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as E } from "react";
|
|
5
5
|
import { useTranslation as D } from "react-i18next";
|
|
6
|
-
const U = (t, c, i,
|
|
7
|
-
const s =
|
|
6
|
+
const U = (t, c, i, d, a) => {
|
|
7
|
+
const s = Q(t, c), o = s.value, r = V(o);
|
|
8
8
|
let n = o;
|
|
9
|
-
r === "Image" && (n = /* @__PURE__ */
|
|
9
|
+
r === "Image" && (n = /* @__PURE__ */ l(q, { imageSrc: o, alt: o, id: `${o}-img` })), r === "Video" && (n = /* @__PURE__ */ l(G, { id: `${o}-video`, videoSrc: o })), r === "PDF" && (n = /* @__PURE__ */ l(K, { id: `${o}-pdf`, src: o }));
|
|
10
10
|
const u = a("OBSERVATIONS_RECORDED_BY", {
|
|
11
11
|
provider: s.provider
|
|
12
|
-
}), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
12
|
+
}), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = d ? `${d}-${p}-${b}-${i}-${c}` : `${p}-${b}-${i}-${c}`;
|
|
13
|
+
return /* @__PURE__ */ l(
|
|
14
|
+
k,
|
|
15
15
|
{
|
|
16
16
|
header: s.header,
|
|
17
17
|
value: n,
|
|
@@ -22,11 +22,11 @@ const U = (t, c, i, l, a) => {
|
|
|
22
22
|
},
|
|
23
23
|
`obs-${t.id}`
|
|
24
24
|
);
|
|
25
|
-
}, oe = (t, c, i,
|
|
25
|
+
}, oe = (t, c, i, d, a, s) => /* @__PURE__ */ l(
|
|
26
26
|
C,
|
|
27
27
|
{
|
|
28
28
|
title: t.display,
|
|
29
|
-
id: `grouped-obs-${t.display}-${
|
|
29
|
+
id: `grouped-obs-${t.display}-${d}`,
|
|
30
30
|
open: i,
|
|
31
31
|
children: t.members?.map(
|
|
32
32
|
(o, r) => U(o, r, a, s, c)
|
|
@@ -37,8 +37,8 @@ const U = (t, c, i, l, a) => {
|
|
|
37
37
|
groupedData: t,
|
|
38
38
|
title: c = ""
|
|
39
39
|
}) => {
|
|
40
|
-
const { t: i } = D(),
|
|
41
|
-
const r =
|
|
40
|
+
const { t: i } = D(), d = (a, s, o) => {
|
|
41
|
+
const r = M(a.encounterDetails, i);
|
|
42
42
|
return /* @__PURE__ */ S(
|
|
43
43
|
C,
|
|
44
44
|
{
|
|
@@ -64,14 +64,14 @@ const U = (t, c, i, l, a) => {
|
|
|
64
64
|
`encounter-${a.encounterId}`
|
|
65
65
|
);
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ l(
|
|
68
68
|
"div",
|
|
69
69
|
{
|
|
70
70
|
id: "obs-by-encounter",
|
|
71
71
|
"data-testid": "obs-by-encounter-test-id",
|
|
72
72
|
"aria-label": "obs-by-encounter-aria-label",
|
|
73
73
|
children: t.map(
|
|
74
|
-
(a, s) =>
|
|
74
|
+
(a, s) => d(a, s === 0, s)
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
77
|
);
|
|
@@ -79,7 +79,7 @@ const U = (t, c, i, l, a) => {
|
|
|
79
79
|
observations: ae,
|
|
80
80
|
title: ne
|
|
81
81
|
}, ie = (t) => ["conceptUuid", t], ce = (t, c) => ["observations", t, ...c], me = ({ config: t }) => {
|
|
82
|
-
const c = t, { conceptNames: i = [], conceptUuid:
|
|
82
|
+
const c = t, { conceptNames: i = [], conceptUuid: d = [] } = c, a = se(/* @__PURE__ */ new Set()), s = j(), { addNotification: o } = P(), { t: r } = D(), n = ee({
|
|
83
83
|
queries: i.map((e) => ({
|
|
84
84
|
queryKey: ie(e),
|
|
85
85
|
queryFn: () => H(e),
|
|
@@ -98,7 +98,7 @@ const U = (t, c, i, l, a) => {
|
|
|
98
98
|
} else e.isError || a.current.delete(m);
|
|
99
99
|
});
|
|
100
100
|
}, [n, i]);
|
|
101
|
-
const u = E(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), b = E(() => [.../* @__PURE__ */ new Set([...u, ...
|
|
101
|
+
const u = E(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), b = E(() => [.../* @__PURE__ */ new Set([...u, ...d])], [u, d]), v = E(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
102
102
|
data: p,
|
|
103
103
|
isLoading: f,
|
|
104
104
|
isError: O,
|
|
@@ -124,32 +124,32 @@ const U = (t, c, i, l, a) => {
|
|
|
124
124
|
}, [O]);
|
|
125
125
|
const R = E(() => {
|
|
126
126
|
if (!p) return [];
|
|
127
|
-
const e = z(p), m =
|
|
128
|
-
return
|
|
127
|
+
const e = z(p), m = J(e);
|
|
128
|
+
return Y(m);
|
|
129
129
|
}, [p]), B = [
|
|
130
130
|
{ key: "name", header: "name" },
|
|
131
131
|
{ key: "value", header: "value" },
|
|
132
132
|
{ key: "form", header: "form" }
|
|
133
|
-
], I = f || !v, _ = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? r("ERROR_FETCHING_OBSERVATIONS") : null,
|
|
133
|
+
], I = f || !v, _ = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? r("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? r("NO_OBSERVATIONS_FOUND") : void 0, w = R.length > 0 && !I && !_, y = c.titleTranslationKey, h = y ? r(y) : "";
|
|
134
134
|
return /* @__PURE__ */ S(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "observations",
|
|
138
|
-
"data-testid":
|
|
138
|
+
"data-testid": y ? `observations-${h}` : "observations",
|
|
139
139
|
"aria-label": "observations-aria-label",
|
|
140
140
|
className: N.observations,
|
|
141
141
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ l(
|
|
143
143
|
W,
|
|
144
144
|
{
|
|
145
145
|
id: "observations-title",
|
|
146
|
-
testId:
|
|
147
|
-
title:
|
|
146
|
+
testId: y ? `observations-title-${h}` : "observations-title",
|
|
147
|
+
title: h,
|
|
148
148
|
className: N.title,
|
|
149
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ l("p", { children: h })
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
w ? /* @__PURE__ */ l(re, { groupedData: R, title: h }) : /* @__PURE__ */ l(
|
|
153
153
|
x,
|
|
154
154
|
{
|
|
155
155
|
headers: B,
|
|
@@ -157,7 +157,7 @@ const U = (t, c, i, l, a) => {
|
|
|
157
157
|
ariaLabel: r("OBSERVATIONS"),
|
|
158
158
|
loading: I,
|
|
159
159
|
errorStateMessage: F,
|
|
160
|
-
emptyStateMessage:
|
|
160
|
+
emptyStateMessage: L,
|
|
161
161
|
dataTestId: "observations-table"
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -2,9 +2,8 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { WidgetProps } from '../registry/model';
|
|
3
3
|
export declare const genericServiceRequestQueryKeys: (categoryUuid: string, patientUUID: string, encounterUuids?: string[]) => readonly ["genericServiceRequest", string, string, string[] | undefined];
|
|
4
4
|
/**
|
|
5
|
-
* Component to display patient service requests
|
|
6
|
-
*
|
|
7
|
-
* (stat before routine) as a tiebreaker for items with the same orderedDate.
|
|
5
|
+
* Component to display patient service requests grouped by date in accordion format
|
|
6
|
+
* Each accordion item contains a SortableDataTable with service requests for that date
|
|
8
7
|
*/
|
|
9
8
|
declare const GenericServiceRequestTable: React.FC<WidgetProps>;
|
|
10
9
|
export default GenericServiceRequestTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericServiceRequestTable.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/GenericServiceRequestTable.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,MAAM,KAAG,MAE5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,uBAAuB,EAAE,KAClC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/genericServiceRequest/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GAAI,UAAU,MAAM,KAAG,MAE5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,uBAAuB,EAAE,KAClC,uBAAuB,EAOzB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,GACjD,UAAU,uBAAuB,EAAE,KAClC,uBAAuB,EAMzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,GAC7B,uBAAuB,EAAE,CA6B3B"}
|