@bahmni/widgets 0.0.1-dev.393 → 0.0.1-dev.395

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.
Files changed (57) hide show
  1. package/dist/{DocumentsTable--8cFcxlU.js → DocumentsTable-BpARTXTl.js} +22 -22
  2. package/dist/{FormsTable-Cb0LQ05L.js → FormsTable-D4zbh5tX.js} +31 -31
  3. package/dist/{Observations-BfsRzyun.js → Observations-Cmzh0iQR.js} +19 -19
  4. package/dist/{index-D0pXmjaC.js → index-3sJOmuAn.js} +8110 -8109
  5. package/dist/index.js +13 -13
  6. package/dist/search/commonSearch/{CriterionRow.d.ts → components/CriterionRow.d.ts} +1 -1
  7. package/dist/search/commonSearch/components/CriterionRow.d.ts.map +1 -0
  8. package/dist/search/commonSearch/components/DateCriterionInput.d.ts.map +1 -0
  9. package/dist/search/commonSearch/components/LookupCriterionInput.d.ts.map +1 -0
  10. package/dist/search/commonSearch/components/NumericCriterionInput.d.ts.map +1 -0
  11. package/dist/search/commonSearch/components/OptionsCriterionInput.d.ts.map +1 -0
  12. package/dist/search/commonSearch/{ResultsTable.d.ts → components/ResultsTable.d.ts} +1 -1
  13. package/dist/search/commonSearch/components/ResultsTable.d.ts.map +1 -0
  14. package/dist/search/commonSearch/{SearchForm.d.ts → components/SearchForm.d.ts} +1 -1
  15. package/dist/search/commonSearch/components/SearchForm.d.ts.map +1 -0
  16. package/dist/search/commonSearch/{SearchSummary.d.ts → components/SearchSummary.d.ts} +1 -1
  17. package/dist/search/commonSearch/components/SearchSummary.d.ts.map +1 -0
  18. package/dist/search/commonSearch/components/TextCriterionInput.d.ts.map +1 -0
  19. package/dist/search/commonSearch/components/index.d.ts.map +1 -0
  20. package/dist/search/searchPatient/SearchPatient.d.ts.map +1 -1
  21. package/dist/search/searchPatient/{appointmentSearchResultActionHandler.d.ts → actions/appointmentSearchResultActionHandler.d.ts} +1 -1
  22. package/dist/search/searchPatient/actions/appointmentSearchResultActionHandler.d.ts.map +1 -0
  23. package/dist/search/searchPatient/components/PatientSearchResults.d.ts.map +1 -0
  24. package/dist/search/searchPatient/components/SearchPatientInput.d.ts.map +1 -0
  25. package/dist/search/searchPatient/strategies/AppointmentSearchStrategy.d.ts +1 -1
  26. package/dist/search/searchPatient/strategies/AppointmentSearchStrategy.d.ts.map +1 -1
  27. package/dist/search/searchPatient/strategies/AttributeSearchStrategy.d.ts +1 -1
  28. package/dist/search/searchPatient/strategies/AttributeSearchStrategy.d.ts.map +1 -1
  29. package/dist/search/searchPatient/strategies/NameOrIdSearchStrategy.d.ts +1 -1
  30. package/dist/search/searchPatient/strategies/NameOrIdSearchStrategy.d.ts.map +1 -1
  31. package/dist/search/searchPatient/strategies/SearchStrategy.interface.d.ts.map +1 -0
  32. package/dist/search/searchPatient/strategies/SearchStrategyRegistry.d.ts +1 -1
  33. package/dist/search/searchPatient/strategies/SearchStrategyRegistry.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/dist/search/commonSearch/CriterionRow.d.ts.map +0 -1
  36. package/dist/search/commonSearch/ResultsTable.d.ts.map +0 -1
  37. package/dist/search/commonSearch/SearchForm.d.ts.map +0 -1
  38. package/dist/search/commonSearch/SearchSummary.d.ts.map +0 -1
  39. package/dist/search/commonSearch/inputs/DateCriterionInput.d.ts.map +0 -1
  40. package/dist/search/commonSearch/inputs/LookupCriterionInput.d.ts.map +0 -1
  41. package/dist/search/commonSearch/inputs/NumericCriterionInput.d.ts.map +0 -1
  42. package/dist/search/commonSearch/inputs/OptionsCriterionInput.d.ts.map +0 -1
  43. package/dist/search/commonSearch/inputs/TextCriterionInput.d.ts.map +0 -1
  44. package/dist/search/commonSearch/inputs/index.d.ts.map +0 -1
  45. package/dist/search/searchPatient/PatientSearchResults.d.ts.map +0 -1
  46. package/dist/search/searchPatient/SearchPatientInput.d.ts.map +0 -1
  47. package/dist/search/searchPatient/SearchStrategy.interface.d.ts.map +0 -1
  48. package/dist/search/searchPatient/appointmentSearchResultActionHandler.d.ts.map +0 -1
  49. /package/dist/search/commonSearch/{inputs → components}/DateCriterionInput.d.ts +0 -0
  50. /package/dist/search/commonSearch/{inputs → components}/LookupCriterionInput.d.ts +0 -0
  51. /package/dist/search/commonSearch/{inputs → components}/NumericCriterionInput.d.ts +0 -0
  52. /package/dist/search/commonSearch/{inputs → components}/OptionsCriterionInput.d.ts +0 -0
  53. /package/dist/search/commonSearch/{inputs → components}/TextCriterionInput.d.ts +0 -0
  54. /package/dist/search/commonSearch/{inputs → components}/index.d.ts +0 -0
  55. /package/dist/search/searchPatient/{PatientSearchResults.d.ts → components/PatientSearchResults.d.ts} +0 -0
  56. /package/dist/search/searchPatient/{SearchPatientInput.d.ts → components/SearchPatientInput.d.ts} +0 -0
  57. /package/dist/search/searchPatient/{SearchStrategy.interface.d.ts → strategies/SearchStrategy.interface.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
2
- import { u as W, a as X, N as J, m as Z, V as x, b as ee, F as te } from "./index-D0pXmjaC.js";
1
+ import { jsx as r, jsxs as T, Fragment as Q } from "react/jsx-runtime";
2
+ import { u as W, a as X, L as J, m as Z, Y as x, b as ee, F as te } from "./index-3sJOmuAn.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";
@@ -35,22 +35,22 @@ const Te = [
35
35
  "uploadedOn",
36
36
  "uploadedBy"
37
37
  ], _e = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (n) => n.attachments.length > 0 ? n.attachments : n.documentUrl ? [{ url: n.documentUrl, contentType: n.contentType }] : [], Ie = ({ config: n, encounterUuids: f }) => {
38
- const [d, L] = l(!1), [s, U] = l(
38
+ const [d, M] = l(!1), [s, U] = l(
39
39
  null
40
- ), [V, N] = l(
40
+ ), [P, A] = l(
41
41
  /* @__PURE__ */ new Set()
42
- ), E = W(), { t: o } = ae(), { addNotification: w } = X(), P = Number(n?.pageSize) || 5, [A, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
43
- U(e), L(!0);
42
+ ), E = W(), { t: o } = ae(), { addNotification: w } = X(), V = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(V), [k, O] = l(void 0), v = _((e) => {
43
+ U(e), M(!0);
44
44
  }, []), z = _(() => {
45
- L(!1), U(null), N(/* @__PURE__ */ new Set());
45
+ M(!1), U(null), A(/* @__PURE__ */ new Set());
46
46
  }, []), F = _((e) => {
47
- N((t) => new Set(t).add(e));
47
+ A((t) => new Set(t).add(e));
48
48
  }, []), { data: i, isLoading: H, isError: S, error: b } = ne({
49
49
  queryKey: [
50
50
  "documents",
51
51
  E,
52
52
  f,
53
- A,
53
+ N,
54
54
  u
55
55
  ],
56
56
  enabled: !!E,
@@ -58,7 +58,7 @@ const Te = [
58
58
  E,
59
59
  f,
60
60
  u,
61
- A
61
+ N
62
62
  )
63
63
  });
64
64
  I(() => {
@@ -83,11 +83,11 @@ const Te = [
83
83
  method: "HEAD",
84
84
  signal: e.signal
85
85
  })).ok || a.add(m);
86
- } catch (M) {
87
- M instanceof Error && M.name !== "AbortError" && a.add(m);
86
+ } catch (L) {
87
+ L instanceof Error && L.name !== "AbortError" && a.add(m);
88
88
  }
89
89
  }
90
- e.signal.aborted || N(a);
90
+ e.signal.aborted || A(a);
91
91
  })(), () => e.abort();
92
92
  }, [d, s]);
93
93
  const q = _(
@@ -98,7 +98,7 @@ const Te = [
98
98
  ), D = p(
99
99
  () => n?.fields ?? Te,
100
100
  [n?.fields]
101
- ), j = p(() => [...i?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [i]), K = p(() => he(D, o), [D, o]), G = p(
101
+ ), Y = p(() => [...i?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [i]), j = p(() => he(D, o), [D, o]), K = p(
102
102
  () => D.map((e) => ({
103
103
  key: e,
104
104
  sortable: e !== "attachments"
@@ -107,7 +107,7 @@ const Te = [
107
107
  ), h = p(
108
108
  () => s ? B(s) : [],
109
109
  [s]
110
- ), Q = _(
110
+ ), G = _(
111
111
  (e, t) => {
112
112
  switch (t) {
113
113
  case "documentIdentifier":
@@ -138,23 +138,23 @@ const Te = [
138
138
  },
139
139
  [v, o]
140
140
  );
141
- return /* @__PURE__ */ T(Y, { children: [
141
+ return /* @__PURE__ */ T(Q, { children: [
142
142
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
143
143
  ee,
144
144
  {
145
- headers: K,
145
+ headers: j,
146
146
  ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
147
- rows: j,
147
+ rows: Y,
148
148
  loading: H,
149
149
  errorStateMessage: S ? b?.message : null,
150
- sortable: G,
150
+ sortable: K,
151
151
  emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
152
- renderCell: Q,
152
+ renderCell: G,
153
153
  className: c.documentsTableBody,
154
154
  dataTestId: "documents-table",
155
155
  pageSize: u,
156
156
  totalItems: k,
157
- page: A,
157
+ page: N,
158
158
  onPageChange: q
159
159
  }
160
160
  ) }),
@@ -170,7 +170,7 @@ const Te = [
170
170
  size: "lg",
171
171
  testId: "document-view-modal",
172
172
  children: /* @__PURE__ */ r("div", { className: c.documentViewerContainer, children: h.map((e, t) => {
173
- const a = R(e.url), g = e.contentType?.toLowerCase().includes("pdf"), m = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), y = V.has(t);
173
+ const a = R(e.url), g = e.contentType?.toLowerCase().includes("pdf"), m = (e.contentType?.toLowerCase().includes("image") ?? !1) || _e.test(e.url ?? ""), y = P.has(t);
174
174
  return a === "#" || y ? /* @__PURE__ */ T(
175
175
  "div",
176
176
  {
@@ -1,26 +1,26 @@
1
1
  import { jsx as i, jsxs as $, Fragment as ge } from "react/jsx-runtime";
2
- import { u as be, c as Oe, d as Ne, e as Ee, f as ve, n as Te, s as Fe, g as Ie, v as Ae, h as _e, i as Re, Y as G, V as De, C as K, B as z, m as Me, b as Q, r as Le, j as Be, F as Ce, O as Se, k as Ue } from "./index-D0pXmjaC.js";
2
+ import { u as be, c as Oe, d as Ne, f as Ee, l as Te, i as ve, e as Fe, B as Ie, O as Ae, g as _e, h as Re, j as G, Y as De, C as K, k as z, m as Me, b as Y, r as Be, n as Le, F as Ce, o as Se, p as Ue } from "./index-3sJOmuAn.js";
3
3
  import { useQueryClient as ke, useQuery as E } from "@tanstack/react-query";
4
- import { useState as Y, useMemo as d, useCallback as c } from "react";
4
+ import { useState as Q, useMemo as d, useCallback as c } from "react";
5
5
  import { useTranslation as we } from "react-i18next";
6
- const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", v = {
6
+ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", T = {
7
7
  formsTableBody: He,
8
- modalHeading: Ve,
9
- customAccordianItem: qe
10
- }, Pe = "startConsultation", ze = ({
8
+ modalHeading: qe,
9
+ customAccordianItem: Pe
10
+ }, Ve = "startConsultation", ze = ({
11
11
  episodeOfCareUuids: D,
12
12
  encounterUuids: m,
13
13
  config: W,
14
14
  disableActions: J = !1,
15
15
  activeEncounterUuid: y = null
16
16
  }) => {
17
- const { t: n } = we(), u = be(), [g, M] = Y(!1), [a, L] = Y(null), {
17
+ const { t: n } = we(), u = be(), [g, M] = Q(!1), [a, B] = Q(null), {
18
18
  numberOfVisits: X,
19
19
  hideThumbnail: Z = !1,
20
20
  forms: b
21
21
  } = W ?? {}, ee = Oe(
22
22
  Ue.EDIT_OBSERVATIONS
23
- ), { userPrivileges: O } = Ne(), T = ee && !J && !!y, B = Ee(
23
+ ), { userPrivileges: O } = Ne(), v = ee && !J && !!y, L = Ee(
24
24
  D,
25
25
  m
26
26
  ), re = ke(), {
@@ -31,8 +31,8 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
31
31
  refetch: oe
32
32
  } = E({
33
33
  queryKey: ["forms", u, D],
34
- queryFn: () => ve(u, void 0, X),
35
- enabled: !!u && !B
34
+ queryFn: () => Te(u, void 0, X),
35
+ enabled: !!u && !L
36
36
  }), k = d(() => {
37
37
  let e = C;
38
38
  return m && m.length > 0 && (e = e.filter(
@@ -42,7 +42,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
42
42
  )), e;
43
43
  }, [C, m, b]), { data: N = [] } = E({
44
44
  queryKey: ["observationForms"],
45
- queryFn: () => Te()
45
+ queryFn: () => ve()
46
46
  }), w = c(
47
47
  (e) => {
48
48
  const r = N.find((t) => t.name === e);
@@ -135,19 +135,19 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
135
135
  { key: "recordedBy", header: n("RECORDED_BY") }
136
136
  ],
137
137
  [n]
138
- ), V = d(
138
+ ), q = d(
139
139
  () => [...h, { key: "actions", header: n("ACTIONS") }],
140
140
  [h, n]
141
141
  ), fe = c(
142
- (e) => T && e.some((o) => f(o)) ? V : h,
143
- [T, f, V, h]
142
+ (e) => v && e.some((o) => f(o)) ? q : h,
143
+ [v, f, q, h]
144
144
  ), he = h, pe = d(
145
145
  () => [
146
146
  { key: "recordedOn", sortable: !0 },
147
147
  { key: "recordedBy", sortable: !0 }
148
148
  ],
149
149
  []
150
- ), q = d(() => {
150
+ ), P = d(() => {
151
151
  const e = k.reduce(
152
152
  (o, t) => {
153
153
  const s = t.formName;
@@ -172,13 +172,13 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
172
172
  )
173
173
  })
174
174
  ).sort((o, t) => o.formName.localeCompare(t.formName));
175
- }, [k, n]), P = c((e) => {
176
- L(e), M(!0);
175
+ }, [k, n]), V = c((e) => {
176
+ B(e), M(!0);
177
177
  }, []), j = c(() => {
178
- M(!1), L(null);
178
+ M(!1), B(null);
179
179
  }, []), R = c((e) => {
180
180
  globalThis.dispatchEvent(
181
- new CustomEvent(Pe, {
181
+ new CustomEvent(Ve, {
182
182
  detail: {
183
183
  editOnly: "observationForms",
184
184
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -192,7 +192,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
192
192
  (e, r) => {
193
193
  switch (r) {
194
194
  case "recordedOn":
195
- return /* @__PURE__ */ i(Me, { onClick: () => P(e), children: e.recordedOn });
195
+ return /* @__PURE__ */ i(Me, { onClick: () => V(e), children: e.recordedOn });
196
196
  case "recordedBy":
197
197
  return e.recordedBy;
198
198
  case "actions":
@@ -211,11 +211,11 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
211
211
  return null;
212
212
  }
213
213
  },
214
- [P, R, f, n]
214
+ [V, R, f, n]
215
215
  );
216
216
  return /* @__PURE__ */ $(ge, { children: [
217
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: S || U || q.length === 0 || B ? /* @__PURE__ */ i(
218
- Q,
217
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: S || U || P.length === 0 || L ? /* @__PURE__ */ i(
218
+ Y,
219
219
  {
220
220
  headers: he,
221
221
  ariaLabel: n("FORMS_HEADING"),
@@ -224,20 +224,20 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
224
224
  errorStateMessage: U ? te?.message : void 0,
225
225
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
226
226
  renderCell: x,
227
- className: v.formsTableBody,
227
+ className: T.formsTableBody,
228
228
  dataTestId: "forms-table"
229
229
  }
230
- ) : /* @__PURE__ */ i(Le, { align: "start", children: q.map((e, r) => {
230
+ ) : /* @__PURE__ */ i(Be, { align: "start", children: P.map((e, r) => {
231
231
  const { formName: o, records: t } = e, s = fe(t);
232
232
  return /* @__PURE__ */ i(
233
- Be,
233
+ Le,
234
234
  {
235
235
  title: o,
236
- className: v.customAccordianItem,
236
+ className: T.customAccordianItem,
237
237
  testId: `accordian-title-${o}`,
238
238
  open: r === 0,
239
239
  children: /* @__PURE__ */ i(
240
- Q,
240
+ Y,
241
241
  {
242
242
  headers: s,
243
243
  ariaLabel: n("FORMS_HEADING"),
@@ -247,7 +247,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
247
247
  sortable: pe,
248
248
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
249
249
  renderCell: x,
250
- className: v.formsTableBody,
250
+ className: T.formsTableBody,
251
251
  dataTestId: `forms-table-${o}`
252
252
  }
253
253
  )
@@ -262,9 +262,9 @@ const He = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
262
262
  portalId: "main-display-area",
263
263
  open: g,
264
264
  onRequestClose: j,
265
- modalHeading: /* @__PURE__ */ $("div", { className: v.modalHeading, children: [
265
+ modalHeading: /* @__PURE__ */ $("div", { className: T.modalHeading, children: [
266
266
  /* @__PURE__ */ i("span", { children: a.formName }),
267
- T && f(a) && /* @__PURE__ */ i(
267
+ v && f(a) && /* @__PURE__ */ i(
268
268
  K,
269
269
  {
270
270
  label: n("EDIT_OBSERVATION_FORM"),
@@ -1,8 +1,8 @@
1
- import { jsx as d, jsxs as U } from "react/jsx-runtime";
2
- import { l as V, z as D, t as w, U as Q, o as q, y as k, p as z, q as G, u as P, a as H, _ as j, w as J, v as Y, x as W, A as X, D as Z, E as x, b as ee } from "./index-D0pXmjaC.js";
1
+ import { jsx as d, jsxs as D } from "react/jsx-runtime";
2
+ import { q as M, z as C, t as w, V as Q, s as q, y as k, N as z, v as G, u as P, a as H, R as j, w as J, O as Y, x as W, A as X, D as Z, E as x, b as ee } from "./index-3sJOmuAn.js";
3
3
  import { useQueries as te, useQuery as se } from "@tanstack/react-query";
4
4
  import { useRef as oe, useEffect as N, useMemo as h } from "react";
5
- import { useTranslation as C } from "react-i18next";
5
+ import { useTranslation as U } from "react-i18next";
6
6
  const A = (t, i, c, l, u, r) => {
7
7
  const s = w(t, i, u), o = s.value, a = Q(o);
8
8
  let n = o;
@@ -38,7 +38,7 @@ const A = (t, i, c, l, u, r) => {
38
38
  `obs-${t.id}`
39
39
  );
40
40
  }, re = (t, i, c, l, u, r, s) => /* @__PURE__ */ d(
41
- D,
41
+ C,
42
42
  {
43
43
  title: t.display,
44
44
  id: `grouped-obs-${t.display}-${l}`,
@@ -60,10 +60,10 @@ const A = (t, i, c, l, u, r) => {
60
60
  title: i = "",
61
61
  hideThumbnail: c
62
62
  }) => {
63
- const { t: l } = C(), u = (r, s, o) => {
64
- const a = V(r.encounterDetails, l);
65
- return /* @__PURE__ */ U(
66
- D,
63
+ const { t: l } = U(), u = (r, s, o) => {
64
+ const a = M(r.encounterDetails, l);
65
+ return /* @__PURE__ */ D(
66
+ C,
67
67
  {
68
68
  title: a,
69
69
  id: `encounter-${r.encounterId}`,
@@ -114,7 +114,7 @@ const A = (t, i, c, l, u, r) => {
114
114
  conceptNames: c = [],
115
115
  conceptUuid: l = [],
116
116
  hideThumbnail: u = !1
117
- } = i, r = oe(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = H(), { t: a } = C(), n = te({
117
+ } = i, r = oe(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = H(), { t: a } = U(), n = te({
118
118
  queries: c.map((e) => ({
119
119
  queryKey: ce(e),
120
120
  queryFn: () => j(e),
@@ -124,10 +124,10 @@ const A = (t, i, c, l, u, r) => {
124
124
  N(() => {
125
125
  n.forEach((e, v) => {
126
126
  if (e.isError && !r.current.has(v)) {
127
- const R = c[v];
127
+ const g = c[v];
128
128
  o({
129
129
  title: a("ERROR_DEFAULT_TITLE"),
130
- message: a("ERROR_FETCHING_CONCEPT", { conceptName: R }),
130
+ message: a("ERROR_FETCHING_CONCEPT", { conceptName: g }),
131
131
  type: "error"
132
132
  }), r.current.add(v);
133
133
  } else e.isError || r.current.delete(v);
@@ -136,7 +136,7 @@ const A = (t, i, c, l, u, r) => {
136
136
  const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), m = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), y = h(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
137
137
  data: p,
138
138
  isLoading: f,
139
- isError: g,
139
+ isError: R,
140
140
  refetch: T
141
141
  } = se({
142
142
  queryKey: le(s, m),
@@ -146,17 +146,17 @@ const A = (t, i, c, l, u, r) => {
146
146
  Y(
147
147
  (e) => {
148
148
  e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
149
- (R) => m.includes(R)
149
+ (g) => m.includes(g)
150
150
  ) && T();
151
151
  },
152
152
  [s, T]
153
153
  ), N(() => {
154
- g && o({
154
+ R && o({
155
155
  title: a("ERROR_DEFAULT_TITLE"),
156
156
  message: a("ERROR_FETCHING_OBSERVATIONS"),
157
157
  type: "error"
158
158
  });
159
- }, [g]);
159
+ }, [R]);
160
160
  const _ = h(() => {
161
161
  if (!p) return [];
162
162
  const e = W(p), v = X(e);
@@ -165,8 +165,8 @@ const A = (t, i, c, l, u, r) => {
165
165
  { key: "name", header: "name" },
166
166
  { key: "value", header: "value" },
167
167
  { key: "form", header: "form" }
168
- ], I = f || !y, $ = g && y, L = (!p || p.entry?.length === 0 || m.length === 0) && y, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, K = L ? a("NO_OBSERVATIONS_FOUND") : void 0, M = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
169
- return /* @__PURE__ */ U(
168
+ ], I = f || !y, $ = R && y, L = (!p || p.entry?.length === 0 || m.length === 0) && y, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? a("NO_OBSERVATIONS_FOUND") : void 0, K = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
169
+ return /* @__PURE__ */ D(
170
170
  "div",
171
171
  {
172
172
  id: "observations",
@@ -184,7 +184,7 @@ const A = (t, i, c, l, u, r) => {
184
184
  children: /* @__PURE__ */ d("p", { children: E })
185
185
  }
186
186
  ),
187
- M ? /* @__PURE__ */ d(
187
+ K ? /* @__PURE__ */ d(
188
188
  ae,
189
189
  {
190
190
  groupedData: _,
@@ -199,7 +199,7 @@ const A = (t, i, c, l, u, r) => {
199
199
  ariaLabel: a("OBSERVATIONS"),
200
200
  loading: I,
201
201
  errorStateMessage: F,
202
- emptyStateMessage: K,
202
+ emptyStateMessage: V,
203
203
  dataTestId: "observations-table"
204
204
  }
205
205
  )