@bahmni/widgets 0.0.1-dev.419 → 0.0.1-dev.423

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 T, Fragment as Y } from "react/jsx-runtime";
2
- import { u as J, a as W, J as X, V as Z, i as x, b as ee, F as te } from "./index-BPLc87jq.js";
2
+ import { u as W, a as X, r as J, V as Z, h as x, b as ee, F as te } from "./index-Bt6J9dni.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -39,7 +39,7 @@ const Te = [
39
39
  null
40
40
  ), [V, A] = l(
41
41
  /* @__PURE__ */ new Set()
42
- ), E = J(), { t: o } = ae(), { addNotification: w } = W(), P = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
42
+ ), E = W(), { t: o } = ae(), { addNotification: w } = X(), P = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
43
43
  U(e), L(!0);
44
44
  }, []), z = _(() => {
45
45
  L(!1), U(null), A(/* @__PURE__ */ new Set());
@@ -54,7 +54,7 @@ const Te = [
54
54
  u
55
55
  ],
56
56
  enabled: !!E,
57
- queryFn: () => X(
57
+ queryFn: () => J(
58
58
  E,
59
59
  f,
60
60
  u,
@@ -1,51 +1,51 @@
1
- import { jsx as n, jsxs as $, Fragment as ge } from "react/jsx-runtime";
2
- import { u as Oe, c as Ne, d as pe, A as Te, O as Ee, T as Fe, S as Ie, e as Ae, f as _e, g as ve, h as Re, j as De, G as j, i as Me, C as K, B as z, V as Le, b as Q, r as Se, k as Be, F as Ce, l as Ue, m as we } from "./index-BPLc87jq.js";
3
- import { useQueryClient as Ve, useQuery as N } from "@tanstack/react-query";
1
+ import { jsx as n, jsxs as K, Fragment as ge } from "react/jsx-runtime";
2
+ import { u as Ne, c as Oe, d as pe, C as Ee, D as Te, $ as Fe, N as Ie, f as Ae, K as _e, e as ve, g as De, i as Re, G as x, h as Me, j, B as z, V as Le, b as Q, k as Be, l as Ce, F as Se, O as Ue, m as we } from "./index-Bt6J9dni.js";
3
+ import { useQueryClient as ke, useQuery as O } from "@tanstack/react-query";
4
4
  import { useState as W, useMemo as i, useCallback as d } from "react";
5
- import { useTranslation as ke } from "react-i18next";
6
- const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", p = {
7
- formsTableBody: He,
5
+ import { useTranslation as He } from "react-i18next";
6
+ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", p = {
7
+ formsTableBody: Ve,
8
8
  modalHeading: qe,
9
9
  customAccordianItem: Pe
10
- }, Ge = "startConsultation", Qe = ({
11
- episodeOfCareUuids: R,
10
+ }, $e = "startConsultation", Qe = ({
11
+ episodeOfCareUuids: D,
12
12
  encounterUuids: m,
13
13
  config: Y,
14
14
  disableActions: J = !1,
15
15
  activeEncounterUuid: b = null
16
16
  }) => {
17
- const { t: s } = ke(), c = Oe(), [y, D] = W(!1), [o, M] = W(null), {
17
+ const { t: s } = He(), c = Ne(), [h, R] = W(!1), [o, M] = W(null), {
18
18
  numberOfVisits: X,
19
19
  hideThumbnail: Z = !1,
20
- forms: h
21
- } = Y ?? {}, ee = Ne(
20
+ forms: y
21
+ } = Y ?? {}, ee = Oe(
22
22
  we.EDIT_OBSERVATIONS
23
- ), { userPrivileges: g } = pe(), T = ee && !J && !!b, L = Te(
24
- R,
23
+ ), { userPrivileges: g } = pe(), E = ee && !J && !!b, L = Ee(
24
+ D,
25
25
  m
26
- ), re = Ve(), {
27
- data: S = [],
28
- isLoading: B,
29
- isError: C,
26
+ ), re = ke(), {
27
+ data: B = [],
28
+ isLoading: C,
29
+ isError: S,
30
30
  error: te,
31
31
  refetch: ae
32
- } = N({
33
- queryKey: ["forms", c, R],
34
- queryFn: () => Ee(c, void 0, X),
32
+ } = O({
33
+ queryKey: ["forms", c, D],
34
+ queryFn: () => Te(c, void 0, X),
35
35
  enabled: !!c && !L
36
36
  }), U = i(() => {
37
- let e = S;
37
+ let e = B;
38
38
  return m && m.length > 0 && (e = e.filter(
39
39
  (r) => m.includes(r.encounterUuid)
40
- )), Array.isArray(h) && h.length > 0 && (e = e.filter(
41
- (r) => h.some((t) => t.toLowerCase() === r.formName.toLowerCase())
40
+ )), Array.isArray(y) && y.length > 0 && (e = e.filter(
41
+ (r) => y.some((t) => t.toLowerCase() === r.formName.toLowerCase())
42
42
  )), e;
43
- }, [S, m, h]), { data: O = [] } = N({
43
+ }, [B, m, y]), { data: N = [] } = O({
44
44
  queryKey: ["observationForms"],
45
45
  queryFn: () => Fe()
46
46
  }), w = d(
47
47
  (e) => {
48
- const r = O.find((a) => a.name === e);
48
+ const r = N.find((a) => a.name === e);
49
49
  if (!r?.privileges || r.privileges.length === 0) return !0;
50
50
  if (!g || g.length === 0) return !1;
51
51
  const t = new Set(g.map((a) => a.name));
@@ -53,34 +53,34 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
53
53
  (a) => t.has(a.privilegeName) && a.editable
54
54
  );
55
55
  },
56
- [O, g]
56
+ [N, g]
57
57
  ), u = d(
58
58
  (e) => !b || e.encounterUuid !== b ? !1 : w(e.formName),
59
59
  [b, w]
60
- ), V = d(
61
- (e) => O.find((t) => t.name === e)?.uuid,
62
- [O]
63
- ), E = i(() => {
60
+ ), k = d(
61
+ (e) => N.find((t) => t.name === e)?.uuid,
62
+ [N]
63
+ ), T = i(() => {
64
64
  if (o)
65
- return V(o.formName);
66
- }, [o, V]), {
67
- data: k,
65
+ return k(o.formName);
66
+ }, [o, k]), {
67
+ data: H,
68
68
  isLoading: oe,
69
69
  isError: se,
70
70
  error: F
71
- } = N({
72
- queryKey: ["formMetadata", E],
73
- queryFn: () => Ie(E),
74
- enabled: !!E && y
71
+ } = O({
72
+ queryKey: ["formMetadata", T],
73
+ queryFn: () => Ie(T),
74
+ enabled: !!T && h
75
75
  }), {
76
76
  data: I,
77
77
  isLoading: ne,
78
78
  isError: ie,
79
79
  error: A
80
- } = N({
80
+ } = O({
81
81
  queryKey: ["formsEncounterFHIR", o?.encounterUuid],
82
82
  queryFn: () => Ae(o.encounterUuid),
83
- enabled: !!o?.encounterUuid && y
83
+ enabled: !!o?.encounterUuid && h
84
84
  });
85
85
  _e(
86
86
  (e) => {
@@ -88,27 +88,27 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
88
88
  },
89
89
  [c]
90
90
  );
91
- const de = i(() => !I?.entry || !o?.formName ? [] : I.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => ve(r) ? Re(r)?.toLowerCase() === o.formName.toLowerCase() : !0), [I, o?.formName]), { controlOrder: le, sectionMap: me, conceptDatatypeMap: ce } = i(
92
- () => De(k?.schema),
93
- [k]
91
+ const de = i(() => !I?.entry || !o?.formName ? [] : I.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => ve(r) ? De(r)?.toLowerCase() === o.formName.toLowerCase() : !0), [I, o?.formName]), { controlOrder: le, sectionMap: me, conceptDatatypeMap: ce } = i(
92
+ () => Re(H?.schema),
93
+ [H]
94
94
  ), ue = i(() => {
95
95
  if (F)
96
- return j(F).message;
96
+ return x(F).message;
97
97
  if (A)
98
- return j(A).message;
98
+ return x(A).message;
99
99
  }, [F, A]), f = i(
100
100
  () => [
101
101
  { key: "recordedOn", header: s("RECORDED_ON") },
102
102
  { key: "recordedBy", header: s("RECORDED_BY") }
103
103
  ],
104
104
  [s]
105
- ), H = i(
105
+ ), V = i(
106
106
  () => [...f, { key: "actions", header: s("ACTIONS") }],
107
107
  [f, s]
108
108
  ), fe = d(
109
- (e) => T && e.some((t) => u(t)) ? H : f,
110
- [T, u, H, f]
111
- ), be = f, ye = i(
109
+ (e) => E && e.some((t) => u(t)) ? V : f,
110
+ [E, u, V, f]
111
+ ), be = f, he = i(
112
112
  () => [
113
113
  { key: "recordedOn", sortable: !0 },
114
114
  { key: "recordedBy", sortable: !0 }
@@ -119,7 +119,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
119
119
  (t, a) => {
120
120
  const l = a.formName;
121
121
  t[l] ??= [];
122
- const v = a.providers.map((he) => he.providerName).filter(Boolean).join(", ");
122
+ const v = a.providers.map((ye) => ye.providerName).filter(Boolean).join(", ");
123
123
  return t[l].push({
124
124
  id: a.encounterUuid,
125
125
  formName: a.formName,
@@ -140,12 +140,12 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
140
140
  })
141
141
  ).sort((t, a) => t.formName.localeCompare(a.formName));
142
142
  }, [U, s]), P = d((e) => {
143
- M(e), D(!0);
144
- }, []), G = d(() => {
145
- D(!1), M(null);
143
+ M(e), R(!0);
144
+ }, []), $ = d(() => {
145
+ R(!1), M(null);
146
146
  }, []), _ = d((e) => {
147
147
  globalThis.dispatchEvent(
148
- new CustomEvent(Ge, {
148
+ new CustomEvent($e, {
149
149
  detail: {
150
150
  editOnly: "observationForms",
151
151
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -155,7 +155,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
155
155
  }
156
156
  })
157
157
  );
158
- }, []), x = d(
158
+ }, []), G = d(
159
159
  (e, r) => {
160
160
  switch (r) {
161
161
  case "recordedOn":
@@ -164,7 +164,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
164
164
  return e.recordedBy;
165
165
  case "actions":
166
166
  return u(e) ? /* @__PURE__ */ n(
167
- K,
167
+ j,
168
168
  {
169
169
  label: s("EDIT_OBSERVATION_FORM"),
170
170
  kind: "ghost",
@@ -180,24 +180,24 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
180
180
  },
181
181
  [P, _, u, s]
182
182
  );
183
- return /* @__PURE__ */ $(ge, { children: [
184
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || C || q.length === 0 || L ? /* @__PURE__ */ n(
183
+ return /* @__PURE__ */ K(ge, { children: [
184
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: C || S || q.length === 0 || L ? /* @__PURE__ */ n(
185
185
  Q,
186
186
  {
187
187
  headers: be,
188
188
  ariaLabel: s("FORMS_HEADING"),
189
189
  rows: [],
190
- loading: B,
191
- errorStateMessage: C ? te?.message : void 0,
190
+ loading: C,
191
+ errorStateMessage: S ? te?.message : void 0,
192
192
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
193
- renderCell: x,
193
+ renderCell: G,
194
194
  className: p.formsTableBody,
195
195
  dataTestId: "forms-table"
196
196
  }
197
- ) : /* @__PURE__ */ n(Se, { align: "start", children: q.map((e, r) => {
197
+ ) : /* @__PURE__ */ n(Be, { align: "start", children: q.map((e, r) => {
198
198
  const { formName: t, records: a } = e, l = fe(a);
199
199
  return /* @__PURE__ */ n(
200
- Be,
200
+ Ce,
201
201
  {
202
202
  title: t,
203
203
  className: p.customAccordianItem,
@@ -211,9 +211,9 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
211
211
  rows: a,
212
212
  loading: !1,
213
213
  errorStateMessage: "",
214
- sortable: ye,
214
+ sortable: he,
215
215
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
216
- renderCell: x,
216
+ renderCell: G,
217
217
  className: p.formsTableBody,
218
218
  dataTestId: `forms-table-${t}`
219
219
  }
@@ -222,24 +222,24 @@ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
222
222
  t
223
223
  );
224
224
  }) }) }),
225
- y && o && /* @__PURE__ */ n(
226
- Ce,
225
+ h && o && /* @__PURE__ */ n(
226
+ Se,
227
227
  {
228
228
  id: "modalIdForActionAreaLayout",
229
229
  portalId: "main-display-area",
230
- open: y,
231
- onRequestClose: G,
232
- modalHeading: /* @__PURE__ */ $("div", { className: p.modalHeading, children: [
230
+ open: h,
231
+ onRequestClose: $,
232
+ modalHeading: /* @__PURE__ */ K("div", { className: p.modalHeading, children: [
233
233
  /* @__PURE__ */ n("span", { children: o.formName }),
234
- T && u(o) && /* @__PURE__ */ n(
235
- K,
234
+ E && u(o) && /* @__PURE__ */ n(
235
+ j,
236
236
  {
237
237
  label: s("EDIT_OBSERVATION_FORM"),
238
238
  kind: "ghost",
239
239
  size: "sm",
240
240
  testId: `edit-form-modal-${o.encounterUuid}`,
241
241
  onClick: () => {
242
- G(), _(o);
242
+ $(), _(o);
243
243
  },
244
244
  children: /* @__PURE__ */ n(z, {})
245
245
  }
@@ -1,14 +1,14 @@
1
- import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { n as z, D as F, t as G, o as H, i as P, p as j, q as x, R as J, s as Y, u as W, a as X, v as Z, A as ee, w as se, x as te, f as re, y as ae, z as oe, E as ne, H as ie, I as ce, b as le } from "./index-BPLc87jq.js";
1
+ import { jsx as i, jsxs as S } from "react/jsx-runtime";
2
+ import { n as z, o as F, t as G, p as H, h as P, q as j, T as x, R as J, S as Y, u as W, a as X, s as Z, C as ee, v as se, w as te, K as re, x as ae, y as oe, z as ne, A as ie, E as ce, b as le } from "./index-Bt6J9dni.js";
3
3
  import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
4
4
  import { useRef as pe, useEffect as C, useMemo as I } from "react";
5
- import { useTranslation as V } from "react-i18next";
5
+ import { useTranslation as w } from "react-i18next";
6
6
  const be = "Observations-module_observations__RKSyo", me = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
7
7
  observations: be,
8
8
  title: me,
9
9
  wrapper: ve,
10
10
  secondary: ye
11
- }, w = (t, l, n, c, u, r) => {
11
+ }, U = (t, l, n, c, u, r) => {
12
12
  const a = G(t, l, u), e = a.value, p = H(e);
13
13
  let o = e;
14
14
  p === "Image" && (o = /* @__PURE__ */ i(
@@ -27,24 +27,24 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
27
27
  hideThumbnail: r
28
28
  }
29
29
  )), p === "PDF" && (o = /* @__PURE__ */ i(Y, { id: `${e}-pdf`, src: e }));
30
- const b = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
30
+ const b = /* @__PURE__ */ S("div", { className: y.wrapper, children: [
31
31
  /* @__PURE__ */ i("span", { children: a.header.display }),
32
32
  a.header.referenceRange && /* @__PURE__ */ i("span", { className: y.secondary, children: a.header.referenceRange })
33
33
  ] }), d = u("OBSERVATIONS_RECORDED_BY", {
34
34
  provider: a.provider
35
- }), m = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
35
+ }), m = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ S("div", { className: y.wrapper, children: [
36
36
  /* @__PURE__ */ i("span", { children: d }),
37
37
  m && /* @__PURE__ */ i("span", { className: y.secondary, children: m })
38
- ] }), v = t.display, g = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = c ? `${c}-${g}-${v}-${n}-${l}` : `${g}-${v}-${n}-${l}`;
38
+ ] }), v = t.display, T = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", h = c ? `${c}-${T}-${v}-${n}-${l}` : `${T}-${v}-${n}-${l}`;
39
39
  return /* @__PURE__ */ i(
40
40
  j,
41
41
  {
42
42
  header: b,
43
43
  value: o,
44
44
  info: _,
45
- id: O,
46
- testId: O,
47
- ariaLabel: O
45
+ id: h,
46
+ testId: h,
47
+ ariaLabel: h
48
48
  },
49
49
  `obs-${t.id}`
50
50
  );
@@ -55,7 +55,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
55
55
  id: `grouped-obs-${t.display}-${c}`,
56
56
  open: n,
57
57
  children: t.members?.map(
58
- (e, p) => w(
58
+ (e, p) => U(
59
59
  e,
60
60
  p,
61
61
  u,
@@ -66,14 +66,14 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
66
66
  )
67
67
  },
68
68
  `grouped-obs-${t.id}`
69
- ), Oe = ({
69
+ ), he = ({
70
70
  groupedData: t,
71
71
  title: l = "",
72
72
  hideThumbnail: n
73
73
  }) => {
74
- const { t: c } = V(), u = (r, a, e) => {
74
+ const { t: c } = w(), u = (r, a, e) => {
75
75
  const p = z(r.encounterDetails, c);
76
- return /* @__PURE__ */ N(
76
+ return /* @__PURE__ */ S(
77
77
  F,
78
78
  {
79
79
  title: p,
@@ -81,7 +81,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
81
81
  open: a,
82
82
  children: [
83
83
  r.observations.map(
84
- (o, b) => w(
84
+ (o, b) => U(
85
85
  o,
86
86
  b,
87
87
  e,
@@ -117,13 +117,13 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
117
117
  )
118
118
  }
119
119
  );
120
- }, Ee = (t) => ["conceptUuid", t], he = (t, l, n, c) => [
120
+ }, Oe = (t) => ["conceptUuid", t], Ee = (t, l, n, c) => [
121
121
  "observations",
122
122
  t,
123
123
  ...l,
124
124
  n,
125
125
  c
126
- ], Ne = ({
126
+ ], Se = ({
127
127
  config: t,
128
128
  episodeOfCareUuids: l,
129
129
  encounterUuids: n
@@ -133,9 +133,9 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
133
133
  conceptUuid: r = [],
134
134
  hideThumbnail: a = !1,
135
135
  scope: e = "all"
136
- } = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } = V(), m = de({
136
+ } = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } = w(), m = de({
137
137
  queries: u.map((s) => ({
138
- queryKey: Ee(s),
138
+ queryKey: Oe(s),
139
139
  queryFn: () => Z(s),
140
140
  enabled: !!s
141
141
  }))
@@ -148,22 +148,22 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
148
148
  type: "error"
149
149
  }), p.current.add(0)) : !s && R && p.current.clear();
150
150
  }, [m, b, d]);
151
- const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
151
+ const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), T = e === "latest" || e === "latest-encounter", h = ee(
152
152
  l,
153
153
  n
154
154
  ), {
155
- data: E,
156
- isLoading: U,
157
- isError: S,
155
+ data: O,
156
+ isLoading: V,
157
+ isError: N,
158
158
  refetch: D
159
159
  } = ue({
160
- queryKey: he(
160
+ queryKey: Ee(
161
161
  o,
162
162
  v,
163
163
  n,
164
164
  e
165
165
  ),
166
- queryFn: () => g ? se(
166
+ queryFn: () => T ? se(
167
167
  o,
168
168
  v,
169
169
  n
@@ -172,7 +172,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
172
172
  v,
173
173
  n
174
174
  ),
175
- enabled: !!o && v.length > 0 && f && !O
175
+ enabled: !!o && v.length > 0 && f && !h
176
176
  });
177
177
  re(
178
178
  (s) => {
@@ -182,28 +182,28 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
182
182
  },
183
183
  [o, D]
184
184
  ), C(() => {
185
- S && b({
185
+ N && b({
186
186
  title: d("ERROR_DEFAULT_TITLE"),
187
187
  message: d("ERROR_FETCHING_OBSERVATIONS"),
188
188
  type: "error"
189
189
  });
190
- }, [S]);
190
+ }, [N]);
191
191
  const A = I(() => {
192
- if (!E) return [];
193
- let s = ae(E);
192
+ if (!O) return [];
193
+ let s = ae(O);
194
194
  e === "latest-encounter" && (s = oe(s));
195
195
  const R = ne(s);
196
196
  return ie(R);
197
- }, [E, e]), K = [
197
+ }, [O, e]), K = [
198
198
  { key: "name", header: "name" },
199
199
  { key: "value", header: "value" },
200
200
  { key: "form", header: "form" }
201
- ], L = U || !f, B = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, Q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !L && !B, T = c.titleTranslationKey, h = T ? d(T) : "";
202
- return /* @__PURE__ */ N(
201
+ ], L = V || !f, B = N && f, M = (!O || O.entry?.length === 0 || v.length === 0) && f, k = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, Q = A.length > 0 && !L && !B, g = c.titleTranslationKey, E = g ? d(g) : "";
202
+ return /* @__PURE__ */ S(
203
203
  "div",
204
204
  {
205
205
  id: "observations",
206
- "data-testid": T ? `observations-${h}` : "observations",
206
+ "data-testid": g ? `observations-${E}` : "observations",
207
207
  "aria-label": "observations-aria-label",
208
208
  className: y.observations,
209
209
  children: [
@@ -211,17 +211,17 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
211
211
  ce,
212
212
  {
213
213
  id: "observations-title",
214
- testId: T ? `observations-title-${h}` : "observations-title",
215
- title: h,
214
+ testId: g ? `observations-title-${E}` : "observations-title",
215
+ title: E,
216
216
  className: y.title,
217
- children: /* @__PURE__ */ i("p", { children: h })
217
+ children: /* @__PURE__ */ i("p", { children: E })
218
218
  }
219
219
  ),
220
- k ? /* @__PURE__ */ i(
221
- Oe,
220
+ Q ? /* @__PURE__ */ i(
221
+ he,
222
222
  {
223
223
  groupedData: A,
224
- title: h,
224
+ title: E,
225
225
  hideThumbnail: a
226
226
  }
227
227
  ) : /* @__PURE__ */ i(
@@ -231,8 +231,8 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
231
231
  rows: [],
232
232
  ariaLabel: d("OBSERVATIONS"),
233
233
  loading: L,
234
- errorStateMessage: q,
235
- emptyStateMessage: Q ?? d("NO_OBSERVATIONS_AVAILABLE"),
234
+ errorStateMessage: k,
235
+ emptyStateMessage: q ?? d("NO_OBSERVATIONS_AVAILABLE"),
236
236
  dataTestId: "observations-table"
237
237
  }
238
238
  )
@@ -241,7 +241,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
241
241
  );
242
242
  };
243
243
  export {
244
- Ee as conceptUuidQueryKeys,
245
- Ne as default,
246
- he as observationsQueryKeys
244
+ Oe as conceptUuidQueryKeys,
245
+ Se as default,
246
+ Ee as observationsQueryKeys
247
247
  };