@bahmni/reports-app 0.0.1-dev.424 → 0.0.1-dev.426

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { g as x, u as G, z as W, H as J, q as X, w as Z, Y as ee, p as te } from "./index-DzhWhDfi.js";
2
+ import { g as x, u as G, z as W, q as J, K as X, w as Z, Y as ee, p as te } from "./index-sQlaThke.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -38,13 +38,13 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, H] = l(k), [V, A] = l(void 0), M = h((e) => {
41
+ ), E = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = h((e) => {
42
42
  U(e), w(!0);
43
- }, []), q = h(() => {
43
+ }, []), F = h(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
45
45
  }, []), v = h((e) => {
46
46
  O((t) => new Set(t).add(e));
47
- }, []), { data: i, isLoading: F, isError: y, error: b } = ae({
47
+ }, []), { data: i, isLoading: H, isError: y, error: b } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  E,
@@ -91,13 +91,13 @@ const Te = [
91
91
  }, [s, o]);
92
92
  const z = h(
93
93
  (e, t) => {
94
- t !== u ? (H(t), C(1), A(void 0)) : C(e);
94
+ t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
97
  ), N = _(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), j = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = _(() => ie(N, n), [N, n]), K = _(
100
+ ), K = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = _(() => ie(N, n), [N, n]), P = _(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -141,18 +141,18 @@ const Te = [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
144
- headers: P,
144
+ headers: j,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: j,
147
- loading: F,
146
+ rows: K,
147
+ loading: H,
148
148
  errorStateMessage: y ? b?.message : null,
149
- sortable: K,
149
+ sortable: P,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
151
  renderCell: Q,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
- totalItems: V,
155
+ totalItems: q,
156
156
  page: f,
157
157
  onPageChange: z
158
158
  }
@@ -163,7 +163,7 @@ const Te = [
163
163
  id: "modalIdForActionAreaLayout",
164
164
  portalId: "main-display-area",
165
165
  open: s,
166
- onRequestClose: q,
166
+ onRequestClose: F,
167
167
  modalHeading: o.documentIdentifier,
168
168
  passiveModal: !0,
169
169
  size: "lg",
@@ -0,0 +1,252 @@
1
+ import { jsx as n, jsxs as V, Fragment as ne } from "react/jsx-runtime";
2
+ import { u as ie, g as de, h as le, Z as me, y as ue, W as ce, e as fe, a as ye, m as ge, f as he, $ as pe, R as Ne, w as Te, C as q, H as $, K as Oe, Y as K, F as Ie, j as be, p as Ee, v as _e, d as Ae } from "./index-sQlaThke.js";
3
+ import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
+ import { useState as j, useMemo as i, useCallback as d } from "react";
5
+ const Ce = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", p = {
6
+ formsTableBody: Ce,
7
+ modalHeading: Fe,
8
+ customAccordianItem: Re
9
+ }, Le = "startConsultation", Me = ({
10
+ episodeOfCareUuids: _,
11
+ encounterUuids: l,
12
+ config: x,
13
+ disableActions: z = !1,
14
+ activeEncounterUuid: y = null
15
+ }) => {
16
+ const { t: o } = ie(), m = de(), [N, A] = j(!1), [t, v] = j(null), {
17
+ numberOfVisits: G,
18
+ hideThumbnail: Q = !1,
19
+ forms: g
20
+ } = x ?? {}, Y = le(
21
+ Ae.EDIT_OBSERVATIONS
22
+ ), { userPrivileges: h } = me(), T = Y && !z && !!y, C = ue(
23
+ _,
24
+ l
25
+ ), W = ve(), {
26
+ data: F = [],
27
+ isLoading: R,
28
+ isError: L,
29
+ error: Z,
30
+ refetch: P
31
+ } = E({
32
+ queryKey: ["forms", m, _],
33
+ queryFn: () => ce(m, void 0, G),
34
+ enabled: !!m && !C
35
+ }), B = i(() => {
36
+ let e = F;
37
+ return l && l.length > 0 && (e = e.filter(
38
+ (r) => l.includes(r.encounterUuid)
39
+ )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
+ (r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
+ )), e;
42
+ }, [F, l, g]), { data: U = [] } = E({
43
+ queryKey: ["observationForms"],
44
+ queryFn: () => fe()
45
+ }), D = d(
46
+ (e) => {
47
+ const r = U.find(
48
+ (s) => s.name.toLowerCase() === e.toLowerCase()
49
+ );
50
+ if (!r?.privileges || r.privileges.length === 0) return !0;
51
+ if (!h || h.length === 0) return !1;
52
+ const a = new Set(h.map((s) => s.name));
53
+ return r.privileges.some(
54
+ (s) => a.has(s.privilegeName) && s.editable
55
+ );
56
+ },
57
+ [U, h]
58
+ ), u = d(
59
+ (e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
60
+ [y, D]
61
+ ), {
62
+ data: O,
63
+ isLoading: J,
64
+ isError: X,
65
+ error: I
66
+ } = E({
67
+ queryKey: ["formsEncounterFHIR", t?.encounterUuid],
68
+ queryFn: () => ye(t.encounterUuid),
69
+ enabled: !!t?.encounterUuid && N
70
+ });
71
+ ge(
72
+ (e) => {
73
+ e.patientUUID === m && (P(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
74
+ },
75
+ [m]
76
+ );
77
+ const ee = i(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? pe(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [O, t?.formName]), re = i(() => {
78
+ if (I)
79
+ return Ne(I).message;
80
+ }, [I]), c = i(
81
+ () => [
82
+ { key: "recordedOn", header: o("RECORDED_ON") },
83
+ { key: "recordedBy", header: o("RECORDED_BY") }
84
+ ],
85
+ [o]
86
+ ), S = i(
87
+ () => [...c, { key: "actions", header: o("ACTIONS") }],
88
+ [c, o]
89
+ ), ae = d(
90
+ (e) => T && e.some((r) => u(r)) ? S : c,
91
+ [T, u, S, c]
92
+ ), oe = c, te = i(
93
+ () => [
94
+ { key: "recordedOn", sortable: !0 },
95
+ { key: "recordedBy", sortable: !0 }
96
+ ],
97
+ []
98
+ ), M = i(() => {
99
+ const e = B.reduce(
100
+ (r, a) => {
101
+ const s = a.formName;
102
+ r[s] ??= [];
103
+ const f = a.providers.map((se) => se.providerName).filter(Boolean).join(", ");
104
+ return r[s].push({
105
+ id: a.encounterUuid,
106
+ formName: a.formName,
107
+ recordedOn: Te(a.encounterDateTime, o, !0).formattedResult,
108
+ recordedBy: f ?? "--",
109
+ encounterDateTime: a.encounterDateTime,
110
+ encounterUuid: a.encounterUuid
111
+ }), r;
112
+ },
113
+ {}
114
+ );
115
+ return Object.entries(e).map(
116
+ ([r, a]) => ({
117
+ formName: r,
118
+ records: a.sort(
119
+ (s, f) => f.encounterDateTime - s.encounterDateTime
120
+ )
121
+ })
122
+ ).sort((r, a) => r.formName.localeCompare(a.formName));
123
+ }, [B, o]), w = d((e) => {
124
+ v(e), A(!0);
125
+ }, []), k = d(() => {
126
+ A(!1), v(null);
127
+ }, []), b = d((e) => {
128
+ globalThis.dispatchEvent(
129
+ new CustomEvent(Le, {
130
+ detail: {
131
+ editOnly: "observationForms",
132
+ editTitle: "EDIT_OBSERVATION_FORM_TITLE",
133
+ sourceEncounterUuid: e.encounterUuid,
134
+ formName: e.formName,
135
+ directFormMode: !0
136
+ }
137
+ })
138
+ );
139
+ }, []), H = d(
140
+ (e, r) => {
141
+ switch (r) {
142
+ case "recordedOn":
143
+ return /* @__PURE__ */ n(Oe, { onClick: () => w(e), children: e.recordedOn });
144
+ case "recordedBy":
145
+ return e.recordedBy;
146
+ case "actions":
147
+ return u(e) ? /* @__PURE__ */ n(
148
+ q,
149
+ {
150
+ label: o("EDIT_OBSERVATION_FORM"),
151
+ kind: "ghost",
152
+ size: "sm",
153
+ testId: `edit-form-${e.encounterUuid}`,
154
+ onClick: () => b(e),
155
+ children: /* @__PURE__ */ n($, {})
156
+ }
157
+ ) : null;
158
+ default:
159
+ return null;
160
+ }
161
+ },
162
+ [w, b, u, o]
163
+ );
164
+ return /* @__PURE__ */ V(ne, { children: [
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || L || M.length === 0 || C ? /* @__PURE__ */ n(
166
+ K,
167
+ {
168
+ headers: oe,
169
+ ariaLabel: o("FORMS_HEADING"),
170
+ rows: [],
171
+ loading: R,
172
+ errorStateMessage: L ? Z?.message : void 0,
173
+ emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
+ renderCell: H,
175
+ className: p.formsTableBody,
176
+ dataTestId: "forms-table"
177
+ }
178
+ ) : /* @__PURE__ */ n(Ie, { align: "start", children: M.map((e, r) => {
179
+ const { formName: a, records: s } = e, f = ae(s);
180
+ return /* @__PURE__ */ n(
181
+ be,
182
+ {
183
+ title: a,
184
+ className: p.customAccordianItem,
185
+ testId: `accordian-title-${a}`,
186
+ open: r === 0,
187
+ children: /* @__PURE__ */ n(
188
+ K,
189
+ {
190
+ headers: f,
191
+ ariaLabel: o("FORMS_HEADING"),
192
+ rows: s,
193
+ loading: !1,
194
+ errorStateMessage: "",
195
+ sortable: te,
196
+ emptyStateMessage: o("FORMS_UNAVAILABLE"),
197
+ renderCell: H,
198
+ className: p.formsTableBody,
199
+ dataTestId: `forms-table-${a}`
200
+ }
201
+ )
202
+ },
203
+ a
204
+ );
205
+ }) }) }),
206
+ N && t && /* @__PURE__ */ n(
207
+ Ee,
208
+ {
209
+ id: "modalIdForActionAreaLayout",
210
+ portalId: "main-display-area",
211
+ open: N,
212
+ onRequestClose: k,
213
+ modalHeading: /* @__PURE__ */ V("div", { className: p.modalHeading, children: [
214
+ /* @__PURE__ */ n("span", { children: t.formName }),
215
+ T && u(t) && /* @__PURE__ */ n(
216
+ q,
217
+ {
218
+ label: o("EDIT_OBSERVATION_FORM"),
219
+ kind: "ghost",
220
+ size: "sm",
221
+ testId: `edit-form-modal-${t.encounterUuid}`,
222
+ onClick: () => {
223
+ k(), b(t);
224
+ },
225
+ children: /* @__PURE__ */ n($, {})
226
+ }
227
+ )
228
+ ] }),
229
+ modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
230
+ passiveModal: !0,
231
+ size: "md",
232
+ testId: "form-details-modal",
233
+ children: /* @__PURE__ */ n(
234
+ _e,
235
+ {
236
+ observations: ee,
237
+ isLoading: J,
238
+ isError: X,
239
+ errorMessage: re,
240
+ emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
241
+ testIdPrefix: t.formName,
242
+ hideThumbnail: Q,
243
+ formName: t.formName
244
+ }
245
+ )
246
+ }
247
+ )
248
+ ] });
249
+ };
250
+ export {
251
+ Me as default
252
+ };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B3xeYlPj.js";
2
- import { W as d, a0 as f, a1 as e } from "./index-DzhWhDfi.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-qIz-az0f.js";
2
+ import { T as d, V as f, _ as e } from "./index-sQlaThke.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
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-B3xeYlPj.js";
2
- import { W as v, a0 as C, a1 as e } from "./index-DzhWhDfi.js";
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-qIz-az0f.js";
2
+ import { T as v, V as C, _ as e } from "./index-sQlaThke.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -0,0 +1,246 @@
1
+ import { jsxs as S, jsx as o } from "react/jsx-runtime";
2
+ import { g as x, z as M, u as U, b as j, y as G, U as H, c as Y, m as J, t as P, o as W, r as X, n as Z, i as ee, Y as ae, Q as se, k as V, l as re, s as te, w as ie, x as ne, A as oe, S as de, D as le } from "./index-sQlaThke.js";
3
+ import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
4
+ import { useRef as me, useEffect as L, useMemo as E } from "react";
5
+ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
+ observations: pe,
7
+ title: be,
8
+ wrapper: he,
9
+ secondary: ve
10
+ }, B = (s, l, n, 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__ */ o(
14
+ oe,
15
+ {
16
+ imageSrc: e,
17
+ alt: e,
18
+ id: `${e}-img`,
19
+ hideThumbnail: r
20
+ }
21
+ )), m === "Video" && (i = /* @__PURE__ */ o(
22
+ de,
23
+ {
24
+ id: `${e}-video`,
25
+ videoSrc: e,
26
+ hideThumbnail: r
27
+ }
28
+ )), m === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
29
+ const p = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
30
+ /* @__PURE__ */ o("span", { children: t.header.display }),
31
+ t.header.referenceRange && /* @__PURE__ */ o("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, f = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
35
+ /* @__PURE__ */ o("span", { children: c }),
36
+ b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
37
+ ] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
38
+ return /* @__PURE__ */ o(
39
+ ne,
40
+ {
41
+ header: p,
42
+ value: i,
43
+ info: f,
44
+ id: R,
45
+ testId: R,
46
+ ariaLabel: R
47
+ },
48
+ `obs-${s.id}`
49
+ );
50
+ }, ye = (s, l, n, d, u, r, t) => /* @__PURE__ */ o(
51
+ V,
52
+ {
53
+ title: s.display,
54
+ id: `grouped-obs-${s.display}-${d}`,
55
+ open: n,
56
+ children: s.members?.map(
57
+ (e, m) => B(
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: n
72
+ }) => {
73
+ const { t: d } = U(), u = (r, t, e) => {
74
+ const m = se(r.encounterDetails, d);
75
+ return /* @__PURE__ */ S(
76
+ V,
77
+ {
78
+ title: m,
79
+ id: `encounter-${r.encounterId}`,
80
+ open: t,
81
+ children: [
82
+ r.observations.map(
83
+ (i, p) => B(
84
+ i,
85
+ p,
86
+ e,
87
+ l,
88
+ d,
89
+ n
90
+ )
91
+ ),
92
+ r.groupedObservations.map(
93
+ (i, p) => ye(
94
+ i,
95
+ d,
96
+ t,
97
+ p,
98
+ e,
99
+ l,
100
+ n
101
+ )
102
+ )
103
+ ]
104
+ },
105
+ `encounter-${r.encounterId}`
106
+ );
107
+ };
108
+ return /* @__PURE__ */ o(
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, n, d) => [
120
+ "observations",
121
+ s,
122
+ ...l,
123
+ n,
124
+ d
125
+ ], Se = ({
126
+ config: s,
127
+ episodeOfCareUuids: l,
128
+ encounterUuids: n
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 = x(), { addNotification: p } = M(), { t: c } = U(), b = ce({
136
+ queries: u.map((a) => ({
137
+ queryKey: Re(a),
138
+ queryFn: () => j(a),
139
+ enabled: !!a
140
+ }))
141
+ });
142
+ L(() => {
143
+ const a = b.some((z) => z.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 f = E(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = E(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), v = E(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", F = G(
151
+ l,
152
+ n
153
+ ), {
154
+ data: _,
155
+ isLoading: w,
156
+ isError: I,
157
+ refetch: N
158
+ } = ue({
159
+ queryKey: _e(
160
+ i,
161
+ h,
162
+ n,
163
+ e
164
+ ),
165
+ queryFn: () => R ? H(
166
+ i,
167
+ h,
168
+ n
169
+ ) : Y(
170
+ i,
171
+ h,
172
+ n
173
+ ),
174
+ enabled: !!i && h.length > 0 && v && !F
175
+ });
176
+ J(
177
+ (a) => {
178
+ a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
+ (y) => h.includes(y)
180
+ ) && N();
181
+ },
182
+ [i, N]
183
+ ), L(() => {
184
+ I && p({
185
+ title: c("ERROR_DEFAULT_TITLE"),
186
+ message: c("ERROR_FETCHING_OBSERVATIONS"),
187
+ type: "error"
188
+ });
189
+ }, [I]);
190
+ const $ = E(() => {
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]), k = [
197
+ { key: "name", header: "name" },
198
+ { key: "value", header: "value" },
199
+ { key: "form", header: "form" }
200
+ ], A = w || !v, D = I && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, Q = C ? c("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, g = d.titleTranslationKey, T = g ? c(g) : "";
201
+ return /* @__PURE__ */ S(
202
+ "div",
203
+ {
204
+ id: "observations",
205
+ "data-testid": g ? `observations-${T}` : "observations",
206
+ "aria-label": "observations-aria-label",
207
+ className: O.observations,
208
+ children: [
209
+ /* @__PURE__ */ o(
210
+ ee,
211
+ {
212
+ id: "observations-title",
213
+ testId: g ? `observations-title-${T}` : "observations-title",
214
+ title: T,
215
+ className: O.title,
216
+ children: /* @__PURE__ */ o("p", { children: T })
217
+ }
218
+ ),
219
+ q ? /* @__PURE__ */ o(
220
+ Oe,
221
+ {
222
+ groupedData: $,
223
+ title: T,
224
+ hideThumbnail: t
225
+ }
226
+ ) : /* @__PURE__ */ o(
227
+ ae,
228
+ {
229
+ headers: k,
230
+ rows: [],
231
+ ariaLabel: c("OBSERVATIONS"),
232
+ loading: A,
233
+ errorStateMessage: K,
234
+ emptyStateMessage: Q ?? c("NO_OBSERVATIONS_AVAILABLE"),
235
+ dataTestId: "observations-table"
236
+ }
237
+ )
238
+ ]
239
+ }
240
+ );
241
+ };
242
+ export {
243
+ Re as conceptUuidQueryKeys,
244
+ Se as default,
245
+ _e as observationsQueryKeys
246
+ };
@@ -1,22 +1,22 @@
1
1
  import { jsx as a, jsxs as t } from "react/jsx-runtime";
2
- import { u as E, o as c, r as i, t as P, x as A, G as b, J as m, I as d, K as L, N as l, U as B, $ as O } from "./index-DzhWhDfi.js";
2
+ import { u as T, B as c, M as i, E as P, G as A, I as b, J as L, X as d, L as m, N as l, O as B, P as O } from "./index-sQlaThke.js";
3
3
  import { useMemo as h, useCallback as S } from "react";
4
4
  import "@tanstack/react-query";
5
5
  import { useLocation as g, useNavigate as u } from "react-router-dom";
6
- const y = "ReportsPage-module_page__ewRXe", M = "ReportsPage-module_panel__HFBCt", s = {
7
- page: y,
8
- panel: M
9
- }, o = 1, C = 0, f = () => {
10
- const { t: e } = E(), n = g(), r = u(), R = h(
6
+ const M = "ReportsPage-module_page__ewRXe", y = "ReportsPage-module_panel__HFBCt", s = {
7
+ page: M,
8
+ panel: y
9
+ }, o = 1, C = 0, x = () => {
10
+ const { t: e } = T(), n = g(), r = u(), R = h(
11
11
  () => [
12
12
  { id: "home", label: e("REPORTS_HOME_LABEL"), href: c },
13
13
  { id: "reports", label: e("REPORTS_LABEL"), isCurrentPage: !0 }
14
14
  ],
15
15
  [e]
16
16
  ), _ = n.pathname === i ? o : C, p = S(
17
- ({ selectedIndex: T }) => {
17
+ ({ selectedIndex: E }) => {
18
18
  r(
19
- T === o ? i : P
19
+ E === o ? i : P
20
20
  );
21
21
  },
22
22
  [r]
@@ -48,7 +48,7 @@ const y = "ReportsPage-module_page__ewRXe", M = "ReportsPage-module_panel__HFBCt
48
48
  className: s.page,
49
49
  children: /* @__PURE__ */ t(b, { selectedIndex: _, onChange: p, children: [
50
50
  /* @__PURE__ */ t(
51
- m,
51
+ L,
52
52
  {
53
53
  id: "reports-tab-list",
54
54
  "data-testid": "reports-tab-list-test-id",
@@ -75,7 +75,7 @@ const y = "ReportsPage-module_page__ewRXe", M = "ReportsPage-module_panel__HFBCt
75
75
  ]
76
76
  }
77
77
  ),
78
- /* @__PURE__ */ t(L, { children: [
78
+ /* @__PURE__ */ t(m, { children: [
79
79
  /* @__PURE__ */ a(
80
80
  l,
81
81
  {
@@ -104,6 +104,6 @@ const y = "ReportsPage-module_page__ewRXe", M = "ReportsPage-module_panel__HFBCt
104
104
  );
105
105
  };
106
106
  export {
107
- f as ReportsPage,
108
- f as default
107
+ x as ReportsPage,
108
+ x as default
109
109
  };
@@ -1,4 +1,4 @@
1
- import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-DzhWhDfi.js";
1
+ import { a0 as we, a1 as z, a2 as xt, a3 as B, V as q, _ as y, a4 as Ro, a5 as ye, a6 as R, a7 as _, a8 as k, a9 as N, aa as A, ab as bs, ac as ir, ad as $e, ae as G, af as Hn, ag as Vn, ah as dt, ai as D, aj as xs, ak as cn, al as Be, am as ws, an as qt, ao as zt, ap as $s, aq as Cs, ar as $n, as as Ss, at as Nr, au as Bt, av as zo, aw as ks, ax as Es, ay as j, az as Gr, aA as Ms, aB as Ds, aC as sr, aD as As, aE as Ts, aF as zn, aG as Fs, aH as Is, aI as Z, aJ as Ps, aK as Ls } from "./index-sQlaThke.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {