@bahmni/widgets 0.0.1-dev.129 → 0.0.1-dev.130

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,10 +1,10 @@
1
- import { jsxs as b, jsx as a, Fragment as Q } from "react/jsx-runtime";
2
- import { c as M, u as Y, L as W, H as Z, F as ee, V as te, k as re, J as oe, l as ae, K as U, m as se, w as ne, p as ce, X as de, a as k, o as le } from "./index-DN-Xic0O.js";
1
+ import { jsxs as b, jsx as a, Fragment as Y } from "react/jsx-runtime";
2
+ import { c as L, u as J, x as W, z as Z, H as ee, B as te, M as re, X as oe, l as ae, K as U, g as se, a as ne, p as de, b as ce, d as q, e as le } from "./index-BSN2bEIC.js";
3
3
  import { useQuery as h } from "@tanstack/react-query";
4
- import { useState as q, useMemo as g, useCallback as L } from "react";
4
+ import { useState as H, useMemo as g, useCallback as M } from "react";
5
5
  import { createPortal as me } from "react-dom";
6
6
  import { useTranslation as ie } from "react-i18next";
7
- const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ye = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", Le = "_groupMembers_1pd36_75", Me = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Te = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Fe = "_nestedGroup_1pd36_125", Ce = "_nestedGroupLabel_1pd36_132", ve = "_nestedGroupMembers_1pd36_141", o = {
7
+ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ye = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", Me = "_groupMembers_1pd36_75", Le = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Te = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Ce = "_nestedGroup_1pd36_125", Fe = "_nestedGroupLabel_1pd36_132", ve = "_nestedGroupMembers_1pd36_141", o = {
8
8
  formsTableBody: ue,
9
9
  customAccordianItem: pe,
10
10
  formContent: be,
@@ -15,23 +15,23 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
15
15
  groupLabel: $e,
16
16
  rowLabel: ye,
17
17
  rowValue: he,
18
- groupMembers: Le,
19
- memberRow: Me,
18
+ groupMembers: Me,
19
+ memberRow: Le,
20
20
  memberLabel: Ae,
21
21
  memberValue: De,
22
22
  abnormalValue: Te,
23
23
  commentSection: Oe,
24
24
  commentText: Re,
25
- nestedGroup: Fe,
26
- nestedGroupLabel: Ce,
25
+ nestedGroup: Ce,
26
+ nestedGroupLabel: Fe,
27
27
  nestedGroupMembers: ve
28
- }, we = "ABNORMAL", H = (e) => {
29
- const s = e.concept?.units, d = e.concept?.lowNormal, t = e.concept?.hiNormal, u = d != null, n = t != null, l = u && n ? ` (${d} - ${t})` : u ? ` (>${d})` : n ? ` (<${t})` : "", r = e.interpretation && e.interpretation.toUpperCase() === we;
28
+ }, we = "ABNORMAL", P = (e) => {
29
+ const s = e.concept?.units, c = e.concept?.lowNormal, t = e.concept?.hiNormal, u = c != null, n = t != null, l = u && n ? ` (${c} - ${t})` : u ? ` (>${c})` : n ? ` (<${t})` : "", r = e.interpretation && e.interpretation.toUpperCase() === we;
30
30
  return { units: s, rangeString: l, isAbnormal: r };
31
- }, P = ({
31
+ }, k = ({
32
32
  member: e,
33
33
  depth: s = 0,
34
- memberIndex: d = 0,
34
+ memberIndex: c = 0,
35
35
  formName: t = ""
36
36
  }) => {
37
37
  const u = e.groupMembers && e.groupMembers.length > 0, n = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name, l = t ? `${t}-` : "";
@@ -40,13 +40,13 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
40
40
  "div",
41
41
  {
42
42
  className: o.nestedGroup,
43
- "data-testid": `${l}obs-nested-group-${n}-${d}`,
43
+ "data-testid": `${l}obs-nested-group-${n}-${c}`,
44
44
  children: [
45
45
  /* @__PURE__ */ a(
46
46
  "div",
47
47
  {
48
48
  className: o.nestedGroupLabel,
49
- "data-testid": `${l}obs-nested-group-label-${n}-${d}`,
49
+ "data-testid": `${l}obs-nested-group-label-${n}-${c}`,
50
50
  style: { paddingLeft: `${s * 16}px` },
51
51
  children: n
52
52
  }
@@ -55,9 +55,9 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
55
55
  "div",
56
56
  {
57
57
  className: o.nestedGroupMembers,
58
- "data-testid": `${l}obs-nested-group-members-${n}-${d}`,
58
+ "data-testid": `${l}obs-nested-group-members-${n}-${c}`,
59
59
  children: e.groupMembers?.map((N, $) => /* @__PURE__ */ a(
60
- P,
60
+ k,
61
61
  {
62
62
  member: N,
63
63
  depth: s + 1,
@@ -71,22 +71,22 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
71
71
  ]
72
72
  }
73
73
  );
74
- const { units: r, rangeString: _, isAbnormal: f } = H(e);
74
+ const { units: r, rangeString: _, isAbnormal: f } = P(e);
75
75
  return /* @__PURE__ */ b(
76
76
  "div",
77
77
  {
78
78
  className: o.memberRow,
79
- "data-testid": `${l}obs-member-row-${n}-${d}`,
79
+ "data-testid": `${l}obs-member-row-${n}-${c}`,
80
80
  style: { paddingLeft: `${s * 16}px` },
81
81
  children: [
82
82
  /* @__PURE__ */ b(
83
83
  "p",
84
84
  {
85
- className: M(
85
+ className: L(
86
86
  o.memberLabel,
87
87
  f ? o.abnormalValue : ""
88
88
  ),
89
- "data-testid": `${l}obs-member-label-${n}-${d}`,
89
+ "data-testid": `${l}obs-member-label-${n}-${c}`,
90
90
  children: [
91
91
  n,
92
92
  _
@@ -96,11 +96,11 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
96
96
  /* @__PURE__ */ b(
97
97
  "p",
98
98
  {
99
- className: M(
99
+ className: L(
100
100
  o.memberValue,
101
101
  f ? o.abnormalValue : ""
102
102
  ),
103
- "data-testid": `${l}obs-member-value-${n}-${d}`,
103
+ "data-testid": `${l}obs-member-value-${n}-${c}`,
104
104
  children: [
105
105
  e.valueAsString,
106
106
  r && ` ${r}`
@@ -113,9 +113,9 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
113
113
  }, Ee = ({
114
114
  observation: e,
115
115
  index: s,
116
- formName: d = ""
116
+ formName: c = ""
117
117
  }) => {
118
- const t = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: n, isAbnormal: l } = H(e), r = d ? `${d}-` : "";
118
+ const t = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: n, isAbnormal: l } = P(e), r = c ? `${c}-` : "";
119
119
  return /* @__PURE__ */ b(
120
120
  "div",
121
121
  {
@@ -131,7 +131,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
131
131
  /* @__PURE__ */ b(
132
132
  "p",
133
133
  {
134
- className: M(
134
+ className: L(
135
135
  t ? o.groupLabel : o.rowLabel,
136
136
  !t && l ? o.abnormalValue : ""
137
137
  ),
@@ -148,12 +148,12 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
148
148
  className: o.groupMembers,
149
149
  "data-testid": `${r}observation-group-members-${e.conceptNameToDisplay}-${s}`,
150
150
  children: e.groupMembers?.map((_, f) => /* @__PURE__ */ a(
151
- P,
151
+ k,
152
152
  {
153
153
  member: _,
154
154
  depth: 0,
155
155
  memberIndex: f,
156
- formName: d
156
+ formName: c
157
157
  },
158
158
  `${_.concept.uuid}`
159
159
  ))
@@ -161,7 +161,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
161
161
  ) : /* @__PURE__ */ b(
162
162
  "p",
163
163
  {
164
- className: M(
164
+ className: L(
165
165
  o.rowValue,
166
166
  l ? o.abnormalValue : ""
167
167
  ),
@@ -190,12 +190,12 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
190
190
  },
191
191
  `${e.concept.uuid}-${s}`
192
192
  );
193
- }, qe = ({
193
+ }, He = ({
194
194
  episodeOfCareUuids: e,
195
195
  encounterUuids: s,
196
- config: d
196
+ config: c
197
197
  }) => {
198
- const { t } = ie(), u = Y(), [n, l] = q(!1), [r, _] = q(null), f = d?.numberOfVisits, N = W(
198
+ const { t } = ie(), u = J(), [n, l] = H(!1), [r, _] = H(null), f = c?.numberOfVisits, N = W(
199
199
  e,
200
200
  s
201
201
  ), {
@@ -207,19 +207,19 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
207
207
  queryKey: ["forms", u, e],
208
208
  queryFn: () => Z(u, void 0, f),
209
209
  enabled: !!u && !N
210
- }), F = g(() => !s || s.length === 0 ? $ : $.filter(
211
- (c) => s.includes(c.encounterUuid)
212
- ), [$, s]), { data: C = [] } = h({
210
+ }), C = g(() => !s || s.length === 0 ? $ : $.filter(
211
+ (d) => s.includes(d.encounterUuid)
212
+ ), [$, s]), { data: F = [] } = h({
213
213
  queryKey: ["observationForms"],
214
214
  queryFn: () => ee()
215
- }), v = L(
216
- (c) => C.find((m) => m.name === c)?.uuid,
217
- [C]
215
+ }), v = M(
216
+ (d) => F.find((m) => m.name === d)?.uuid,
217
+ [F]
218
218
  ), A = g(() => {
219
219
  if (r)
220
220
  return v(r.formName);
221
221
  }, [r, v]), {
222
- data: Ie,
222
+ data: Be,
223
223
  isLoading: j,
224
224
  error: w
225
225
  } = h({
@@ -228,32 +228,32 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
228
228
  enabled: !!A && n
229
229
  }), {
230
230
  data: D,
231
- isLoading: J,
231
+ isLoading: x,
232
232
  error: E
233
233
  } = h({
234
234
  queryKey: ["formsEncounter", r?.encounterUuid],
235
235
  queryFn: () => re(r.encounterUuid, !0),
236
236
  enabled: !!r?.encounterUuid && n
237
- }), I = g(() => !D?.observations || !r?.formName ? [] : D.observations.filter(
237
+ }), B = g(() => !D?.observations || !r?.formName ? [] : D.observations.filter(
238
238
  (p) => "formFieldPath" in p && typeof p.formFieldPath == "string" && p.formFieldPath.includes(r.formName)
239
- ), [D?.observations, r?.formName]), V = g(
239
+ ), [D?.observations, r?.formName]), I = g(
240
240
  () => [
241
241
  { key: "recordedOn", header: t("FORM_RECORDED_ON") },
242
242
  { key: "recordedBy", header: t("FORM_RECORDED_BY") }
243
243
  ],
244
244
  [t]
245
- ), X = g(
245
+ ), z = g(
246
246
  () => [
247
247
  { key: "recordedOn", sortable: !0 },
248
248
  { key: "recordedBy", sortable: !0 }
249
249
  ],
250
250
  []
251
- ), B = g(() => {
252
- const c = F.reduce(
251
+ ), V = g(() => {
252
+ const d = C.reduce(
253
253
  (m, i) => {
254
254
  const y = i.formName;
255
255
  m[y] ??= [];
256
- const T = i.providers.map((z) => z.providerName).filter(Boolean).join(", ");
256
+ const T = i.providers.map((Q) => Q.providerName).filter(Boolean).join(", ");
257
257
  return m[y].push({
258
258
  id: i.encounterUuid,
259
259
  formName: i.formName,
@@ -265,7 +265,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
265
265
  },
266
266
  {}
267
267
  );
268
- return Object.entries(c).map(
268
+ return Object.entries(d).map(
269
269
  ([m, i]) => ({
270
270
  formName: m,
271
271
  records: i.sort(
@@ -273,28 +273,28 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
273
273
  )
274
274
  })
275
275
  ).sort((m, i) => m.formName.localeCompare(i.formName));
276
- }, [F, t]), S = L((c) => {
277
- _(c), l(!0);
278
- }, []), x = L(() => {
276
+ }, [C, t]), S = M((d) => {
277
+ _(d), l(!0);
278
+ }, []), X = M(() => {
279
279
  l(!1), _(null);
280
- }, []), G = L(
281
- (c, p) => {
280
+ }, []), G = M(
281
+ (d, p) => {
282
282
  switch (p) {
283
283
  case "recordedOn":
284
- return /* @__PURE__ */ a(ae, { onClick: () => S(c), children: c.recordedOn });
284
+ return /* @__PURE__ */ a(ae, { onClick: () => S(d), children: d.recordedOn });
285
285
  case "recordedBy":
286
- return c.recordedBy;
286
+ return d.recordedBy;
287
287
  default:
288
288
  return null;
289
289
  }
290
290
  },
291
291
  [S]
292
292
  );
293
- return /* @__PURE__ */ b(Q, { children: [
294
- /* @__PURE__ */ a("div", { "data-testid": "forms-table", children: O || R || B.length === 0 || N ? /* @__PURE__ */ a(
293
+ return /* @__PURE__ */ b(Y, { children: [
294
+ /* @__PURE__ */ a("div", { "data-testid": "forms-table", children: O || R || V.length === 0 || N ? /* @__PURE__ */ a(
295
295
  U,
296
296
  {
297
- headers: V,
297
+ headers: I,
298
298
  ariaLabel: t("FORMS_HEADING"),
299
299
  rows: [],
300
300
  loading: O,
@@ -304,8 +304,8 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
304
304
  className: o.formsTableBody,
305
305
  dataTestId: "forms-table"
306
306
  }
307
- ) : /* @__PURE__ */ a(se, { align: "start", children: B.map((c, p) => {
308
- const { formName: m, records: i } = c;
307
+ ) : /* @__PURE__ */ a(se, { align: "start", children: V.map((d, p) => {
308
+ const { formName: m, records: i } = d;
309
309
  return /* @__PURE__ */ a(
310
310
  ne,
311
311
  {
@@ -316,12 +316,12 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
316
316
  children: /* @__PURE__ */ a(
317
317
  U,
318
318
  {
319
- headers: V,
319
+ headers: I,
320
320
  ariaLabel: t("FORMS_HEADING"),
321
321
  rows: i,
322
322
  loading: !1,
323
323
  errorStateMessage: "",
324
- sortable: X,
324
+ sortable: z,
325
325
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
326
326
  renderCell: G,
327
327
  className: o.formsTableBody,
@@ -334,24 +334,24 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
334
334
  }) }) }),
335
335
  n && r && me(
336
336
  /* @__PURE__ */ a(
337
- ce,
337
+ de,
338
338
  {
339
339
  id: "modalIdForActionAreaLayout",
340
340
  open: n,
341
- onRequestClose: x,
341
+ onRequestClose: X,
342
342
  modalHeading: r.formName,
343
343
  modalLabel: `${r.recordedOn} | ${r.recordedBy}`,
344
344
  passiveModal: !0,
345
345
  size: "md",
346
346
  testId: "form-details-modal",
347
- children: /* @__PURE__ */ a("div", { className: o.formContent, children: j || J ? /* @__PURE__ */ a(de, { width: "100%", lineCount: 3 }) : w ? /* @__PURE__ */ a("div", { children: k(w).message ?? t("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ a("div", { children: k(E).message ?? t("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ a("div", { className: o.formDetailsContainer, children: I.map((c, p) => /* @__PURE__ */ a(
347
+ children: /* @__PURE__ */ a("div", { className: o.formContent, children: j || x ? /* @__PURE__ */ a(ce, { width: "100%", lineCount: 3 }) : w ? /* @__PURE__ */ a("div", { children: q(w).message ?? t("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ a("div", { children: q(E).message ?? t("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ a("div", { className: o.formDetailsContainer, children: B.map((d, p) => /* @__PURE__ */ a(
348
348
  Ee,
349
349
  {
350
- observation: c,
350
+ observation: d,
351
351
  index: p,
352
352
  formName: r.formName
353
353
  },
354
- `${c.concept.uuid}`
354
+ `${d.concept.uuid}`
355
355
  )) }) : /* @__PURE__ */ a("div", { children: t("NO_FORM_DATA_AVAILABLE") }) })
356
356
  }
357
357
  ),
@@ -360,5 +360,5 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
360
360
  ] });
361
361
  };
362
362
  export {
363
- qe as default
363
+ He as default
364
364
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as v, jsxs as _ } from "react/jsx-runtime";
2
- import { Y as F, b as N, d as K, C as q, e as Q, f as k, u as G, g as H, h as P, I as x, S as Y, K as j } from "./index-DN-Xic0O.js";
2
+ import { J as F, L as N, f as K, h as k, i as q, V as Q, u as G, j as P, k as x, C as H, T as j, K as Y } from "./index-BSN2bEIC.js";
3
3
  import { useQueries as z, useQuery as J } from "@tanstack/react-query";
4
- import { useRef as W, useEffect as T, useMemo as y } from "react";
4
+ import { useRef as W, useEffect as S, useMemo as y } from "react";
5
5
  import { useTranslation as A } from "react-i18next";
6
6
  const X = "normal", Z = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? F(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
7
7
  if (!e.observationValue?.value)
@@ -181,12 +181,12 @@ function de(e) {
181
181
  const w = (e, n, t, s, r) => {
182
182
  const o = se(e, n), i = o.value, a = K(i);
183
183
  let u = i;
184
- a === "Image" && (u = /* @__PURE__ */ v(Q, { imageSrc: i, alt: i, id: `${i}-img` })), a === "Video" && (u = /* @__PURE__ */ v(k, { id: `${i}-video`, videoSrc: i }));
184
+ a === "Image" && (u = /* @__PURE__ */ v(q, { imageSrc: i, alt: i, id: `${i}-img` })), a === "Video" && (u = /* @__PURE__ */ v(Q, { id: `${i}-video`, videoSrc: i }));
185
185
  const c = r("OBSERVATIONS_RECORDED_BY", {
186
186
  provider: o.provider
187
187
  }), d = e.display, f = e.observationValue?.isAbnormal ? "abnormal-obs" : "obs", m = s ? `${s}-${f}-${d}-${t}-${n}` : `${f}-${d}-${t}-${n}`;
188
188
  return /* @__PURE__ */ v(
189
- q,
189
+ k,
190
190
  {
191
191
  header: o.header,
192
192
  value: u,
@@ -254,20 +254,20 @@ const w = (e, n, t, s, r) => {
254
254
  observations: fe,
255
255
  title: ge
256
256
  }, me = (e) => ["conceptUuid", e], be = (e, n) => ["observations", e, ...n], $e = ({ config: e }) => {
257
- const n = e, { conceptNames: t = [], conceptUuid: s = [] } = n, r = W(/* @__PURE__ */ new Set()), o = G(), { addNotification: i } = H(), { t: a } = A(), u = z({
257
+ const n = e, { conceptNames: t = [], conceptUuid: s = [] } = n, r = W(/* @__PURE__ */ new Set()), o = G(), { addNotification: i } = P(), { t: a } = A(), u = z({
258
258
  queries: t.map((l) => ({
259
259
  queryKey: me(l),
260
- queryFn: () => P(l),
260
+ queryFn: () => x(l),
261
261
  enabled: !!l
262
262
  }))
263
263
  });
264
- T(() => {
264
+ S(() => {
265
265
  u.forEach((l, g) => {
266
266
  if (l.isError && !r.current.has(g)) {
267
- const L = t[g];
267
+ const U = t[g];
268
268
  i({
269
269
  title: a("ERROR_DEFAULT_TITLE"),
270
- message: a("ERROR_FETCHING_CONCEPT", { conceptName: L }),
270
+ message: a("ERROR_FETCHING_CONCEPT", { conceptName: U }),
271
271
  type: "error"
272
272
  }), r.current.add(g);
273
273
  } else l.isError || r.current.delete(g);
@@ -279,10 +279,10 @@ const w = (e, n, t, s, r) => {
279
279
  isError: E
280
280
  } = J({
281
281
  queryKey: be(o, d),
282
- queryFn: () => x(o, d),
282
+ queryFn: () => H(o, d),
283
283
  enabled: !!o && d.length > 0 && p
284
284
  });
285
- T(() => {
285
+ S(() => {
286
286
  E && i({
287
287
  title: a("ERROR_DEFAULT_TITLE"),
288
288
  message: a("ERROR_FETCHING_OBSERVATIONS"),
@@ -297,7 +297,7 @@ const w = (e, n, t, s, r) => {
297
297
  { key: "name", header: "name" },
298
298
  { key: "value", header: "value" },
299
299
  { key: "form", header: "form" }
300
- ], $ = m || !p, S = E && p, V = (!f || f.entry?.length === 0 || d.length === 0) && p, B = S ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = V ? a("NO_OBSERVATIONS_FOUND") : void 0, U = R.length > 0 && !$ && !S, h = n.titleTranslationKey, b = h ? a(h) : "";
300
+ ], $ = m || !p, T = E && p, V = (!f || f.entry?.length === 0 || d.length === 0) && p, B = T ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = V ? a("NO_OBSERVATIONS_FOUND") : void 0, L = R.length > 0 && !$ && !T, h = n.titleTranslationKey, b = h ? a(h) : "";
301
301
  return /* @__PURE__ */ _(
302
302
  "div",
303
303
  {
@@ -307,7 +307,7 @@ const w = (e, n, t, s, r) => {
307
307
  className: I.observations,
308
308
  children: [
309
309
  /* @__PURE__ */ v(
310
- Y,
310
+ j,
311
311
  {
312
312
  id: "observations-title",
313
313
  testId: h ? `observations-title-${b}` : "observations-title",
@@ -316,8 +316,8 @@ const w = (e, n, t, s, r) => {
316
316
  children: /* @__PURE__ */ v("p", { children: b })
317
317
  }
318
318
  ),
319
- U ? /* @__PURE__ */ v(pe, { groupedData: R, title: b }) : /* @__PURE__ */ v(
320
- j,
319
+ L ? /* @__PURE__ */ v(pe, { groupedData: R, title: b }) : /* @__PURE__ */ v(
320
+ Y,
321
321
  {
322
322
  headers: C,
323
323
  rows: [],