@bahmni/clinical-app 0.0.1-dev.277 → 0.0.1-dev.280

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,7 +1,7 @@
1
- import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, f as J, b as X, m as Z, c as ee, n as te } from "./index-Bn_FvR7Q.js";
1
+ import { jsx as r, jsxs as T, Fragment as x } from "react/jsx-runtime";
2
+ import { u as G, a as W, h as Y, p as J, b as X, m as Z, c as ee, n as te } from "./index-BAGx7MPS.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
- import { useState as l, useCallback as h, useEffect as N, useMemo as _ } from "react";
4
+ import { useState as l, useCallback as _, useEffect as O, useMemo as h } 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", ce = "DocumentsTable-module_attachmentError__RI4U2", me = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
6
6
  documentsTableBody: ne,
7
7
  viewAttachmentsLink: oe,
@@ -21,56 +21,56 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
21
21
  function R(a) {
22
22
  return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
23
23
  }
24
- function ie(a, g) {
24
+ function ie(a, E) {
25
25
  return a.map((s) => ({
26
26
  key: s,
27
- header: g(ue[s])
27
+ header: E(ue[s])
28
28
  }));
29
29
  }
30
- const Te = [
30
+ const pe = [
31
31
  "documentIdentifier",
32
32
  "documentType",
33
33
  "uploadedOn",
34
34
  "uploadedBy",
35
35
  "action"
36
- ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
36
+ ], Te = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ie = ({ config: a, encounterUuids: E }) => {
37
37
  const [s, w] = l(!1), [o, U] = l(
38
38
  null
39
- ), [$, O] = l(
39
+ ), [$, D] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [D, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
41
+ ), g = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
42
42
  U(e), w(!0);
43
- }, []), q = h(() => {
44
- w(!1), U(null), O(/* @__PURE__ */ new Set());
45
- }, []), v = h((e) => {
46
- O((t) => new Set(t).add(e));
43
+ }, []), q = _(() => {
44
+ w(!1), U(null), D(/* @__PURE__ */ new Set());
45
+ }, []), v = _((e) => {
46
+ D((t) => new Set(t).add(e));
47
47
  }, []), { data: i, isLoading: H, isError: b, error: y } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
- E,
51
50
  g,
52
- D,
51
+ E,
52
+ f,
53
53
  u
54
54
  ],
55
- enabled: !!E,
55
+ enabled: !!g,
56
56
  queryFn: () => J(
57
- E,
58
57
  g,
58
+ E,
59
59
  u,
60
- D
60
+ f
61
61
  )
62
62
  });
63
- N(() => {
63
+ O(() => {
64
64
  i && A(i.total);
65
- }, [i]), N(() => {
65
+ }, [i]), O(() => {
66
66
  C(1), A(void 0);
67
- }, [E]), N(() => {
67
+ }, [g]), O(() => {
68
68
  b && L({
69
69
  title: n("ERROR_DEFAULT_TITLE"),
70
70
  message: y?.message ?? "",
71
71
  type: "error"
72
72
  });
73
- }, [b, y, L, n]), N(() => {
73
+ }, [b, y, L, n]), O(() => {
74
74
  const e = new AbortController();
75
75
  return (async () => {
76
76
  if (!s || !o) return;
@@ -82,31 +82,31 @@ const Te = [
82
82
  method: "HEAD",
83
83
  signal: e.signal
84
84
  })).ok || t.add(m);
85
- } catch (I) {
86
- I instanceof Error && I.name !== "AbortError" && t.add(m);
85
+ } catch (N) {
86
+ N instanceof Error && N.name !== "AbortError" && t.add(m);
87
87
  }
88
88
  }
89
- e.signal.aborted || O(t);
89
+ e.signal.aborted || D(t);
90
90
  })(), () => e.abort();
91
91
  }, [s, o]);
92
- const j = h(
92
+ const j = _(
93
93
  (e, t) => {
94
94
  t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
- ), f = _(
98
- () => a?.fields ?? Te,
97
+ ), I = h(
98
+ () => a?.fields ?? pe,
99
99
  [a?.fields]
100
- ), P = _(() => [...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]), z = _(() => ie(f, n), [f, n]), K = _(
101
- () => f.map((e) => ({
100
+ ), P = h(() => [...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]), z = h(() => ie(I, n), [I, n]), K = h(
101
+ () => I.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "action"
104
104
  })),
105
- [f]
106
- ), T = _(
105
+ [I]
106
+ ), p = h(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), Q = h(
109
+ ), Q = _(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -137,7 +137,7 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ p(x, { children: [
140
+ return /* @__PURE__ */ T(x, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
@@ -153,7 +153,7 @@ const Te = [
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
155
  totalItems: F,
156
- page: D,
156
+ page: f,
157
157
  onPageChange: j
158
158
  }
159
159
  ) }),
@@ -168,33 +168,33 @@ const Te = [
168
168
  passiveModal: !0,
169
169
  size: "lg",
170
170
  testId: "document-view-modal",
171
- children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
172
- const c = R(e.url), m = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), I = $.has(t);
173
- return c === "#" || I ? /* @__PURE__ */ p(
171
+ children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: p.map((e, t) => {
172
+ const c = R(e.url), m = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || Te.test(e.url ?? ""), N = $.has(t);
173
+ return c === "#" || N ? /* @__PURE__ */ T(
174
174
  "div",
175
175
  {
176
176
  className: d.attachmentError,
177
177
  "data-testid": `attachment-error-${t}`,
178
178
  children: [
179
- T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
179
+ p.length > 1 && /* @__PURE__ */ T("p", { className: d.attachmentCounter, children: [
180
180
  t + 1,
181
181
  "/",
182
- T.length
182
+ p.length
183
183
  ] }),
184
184
  /* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
185
185
  ]
186
186
  },
187
187
  `${o.id}-${e.url}`
188
- ) : /* @__PURE__ */ p(
188
+ ) : /* @__PURE__ */ T(
189
189
  "div",
190
190
  {
191
191
  className: d.attachmentItem,
192
192
  "data-testid": `attachment-item-${t}`,
193
193
  children: [
194
- T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
194
+ p.length > 1 && /* @__PURE__ */ T("p", { className: d.attachmentCounter, children: [
195
195
  t + 1,
196
196
  "/",
197
- T.length
197
+ p.length
198
198
  ] }),
199
199
  S ? /* @__PURE__ */ r(
200
200
  "img",
@@ -223,5 +223,5 @@ const Te = [
223
223
  ] });
224
224
  };
225
225
  export {
226
- fe as default
226
+ Ie as default
227
227
  };
@@ -1,60 +1,60 @@
1
- import { jsx as s, jsxs as X, Fragment as Z } from "react/jsx-runtime";
2
- import { a as ee, u as re, g as ae, p as oe, d as te, e as se, i as ne, j as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, t as fe, l as ye } from "./index-Bn_FvR7Q.js";
1
+ import { jsx as s, jsxs as W, Fragment as Z } from "react/jsx-runtime";
2
+ import { a as ee, u as re, v as ae, d as oe, e as te, f as se, g as ne, i as de, R as S, m as ie, b as me, c as U, C as ue, T as le, n as ce, t as fe, s as ye } from "./index-BAGx7MPS.js";
3
3
  import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as y } from "react";
5
- const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
6
- formsTableBody: pe,
7
- customAccordianItem: ge
5
+ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_customAccordianItem__isszs", A = {
6
+ formsTableBody: ge,
7
+ customAccordianItem: pe
8
8
  }, he = (m) => m ? m.extension?.find(
9
9
  (n) => n.url === ye
10
10
  )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
- config: j
13
+ config: k
14
14
  }) => {
15
15
  const { t } = ee(), u = re(), [l, T] = q(!1), [o, O] = q(null), {
16
- numberOfVisits: k,
17
- hideThumbnail: w = !1,
16
+ numberOfVisits: w,
17
+ hideThumbnail: H = !1,
18
18
  forms: c
19
- } = j ?? {}, I = ae(
19
+ } = k ?? {}, I = ae(
20
20
  m,
21
21
  n
22
- ), H = be(), {
22
+ ), K = be(), {
23
23
  data: F = [],
24
24
  isLoading: L,
25
- isError: B,
26
- error: K,
25
+ isError: v,
26
+ error: j,
27
27
  refetch: x
28
28
  } = f({
29
29
  queryKey: ["forms", u, m],
30
- queryFn: () => oe(u, void 0, k),
30
+ queryFn: () => oe(u, void 0, w),
31
31
  enabled: !!u && !I
32
- }), C = d(() => {
32
+ }), B = d(() => {
33
33
  let e = F;
34
34
  return n && n.length > 0 && (e = e.filter(
35
35
  (r) => n.includes(r.encounterUuid)
36
36
  )), Array.isArray(c) && c.length > 0 && (e = e.filter(
37
37
  (r) => c.some((a) => a.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
- }, [F, n, c]), { data: E = [] } = f({
39
+ }, [F, n, c]), { data: C = [] } = f({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => te()
42
- }), R = y(
43
- (e) => E.find((r) => r.name === e)?.uuid,
44
- [E]
42
+ }), E = y(
43
+ (e) => C.find((r) => r.name === e)?.uuid,
44
+ [C]
45
45
  ), b = d(() => {
46
46
  if (o)
47
- return R(o.formName);
48
- }, [o, R]), {
47
+ return E(o.formName);
48
+ }, [o, E]), {
49
49
  isLoading: V,
50
50
  isError: $,
51
- error: p
51
+ error: g
52
52
  } = f({
53
53
  queryKey: ["formMetadata", b],
54
54
  queryFn: () => se(b),
55
55
  enabled: !!b && l
56
56
  }), {
57
- data: g,
57
+ data: p,
58
58
  isLoading: z,
59
59
  isError: G,
60
60
  error: h
@@ -65,19 +65,19 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
65
65
  });
66
66
  de(
67
67
  (e) => {
68
- e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
68
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
69
69
  },
70
70
  [u]
71
71
  );
72
- const Q = d(() => !g?.entry || !o?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
72
+ const Q = d(() => !p?.entry || !o?.formName ? [] : p.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
73
73
  const r = he(e);
74
74
  return !r || r.includes(o.formName);
75
- }), [g, o?.formName]), P = d(() => {
76
- if (p)
77
- return S(p).message;
75
+ }), [p, o?.formName]), P = d(() => {
76
+ if (g)
77
+ return S(g).message;
78
78
  if (h)
79
79
  return S(h).message;
80
- }, [p, h]), _ = d(
80
+ }, [g, h]), M = d(
81
81
  () => [
82
82
  { key: "recordedOn", header: t("RECORDED_ON") },
83
83
  { key: "recordedBy", header: t("RECORDED_BY") }
@@ -89,12 +89,12 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
89
89
  { key: "recordedBy", sortable: !0 }
90
90
  ],
91
91
  []
92
- ), M = d(() => {
93
- const e = C.reduce(
92
+ ), R = d(() => {
93
+ const e = B.reduce(
94
94
  (r, a) => {
95
95
  const i = a.formName;
96
96
  r[i] ??= [];
97
- const N = a.providers.map((W) => W.providerName).filter(Boolean).join(", ");
97
+ const N = a.providers.map((X) => X.providerName).filter(Boolean).join(", ");
98
98
  return r[i].push({
99
99
  id: a.encounterUuid,
100
100
  formName: a.formName,
@@ -114,7 +114,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
114
114
  )
115
115
  })
116
116
  ).sort((r, a) => r.formName.localeCompare(a.formName));
117
- }, [C, t]), v = y((e) => {
117
+ }, [B, t]), _ = y((e) => {
118
118
  O(e), T(!0);
119
119
  }, []), J = y(() => {
120
120
  T(!1), O(null);
@@ -122,30 +122,30 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
122
122
  (e, r) => {
123
123
  switch (r) {
124
124
  case "recordedOn":
125
- return /* @__PURE__ */ s(me, { onClick: () => v(e), children: e.recordedOn });
125
+ return /* @__PURE__ */ s(me, { onClick: () => _(e), children: e.recordedOn });
126
126
  case "recordedBy":
127
127
  return e.recordedBy;
128
128
  default:
129
129
  return null;
130
130
  }
131
131
  },
132
- [v]
132
+ [_]
133
133
  );
134
- return /* @__PURE__ */ X(Z, { children: [
135
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || M.length === 0 || I ? /* @__PURE__ */ s(
134
+ return /* @__PURE__ */ W(Z, { children: [
135
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: L || v || R.length === 0 || I ? /* @__PURE__ */ s(
136
136
  U,
137
137
  {
138
- headers: _,
138
+ headers: M,
139
139
  ariaLabel: t("FORMS_HEADING"),
140
140
  rows: [],
141
141
  loading: L,
142
- errorStateMessage: B ? K?.message : void 0,
142
+ errorStateMessage: v ? j?.message : void 0,
143
143
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
144
144
  renderCell: D,
145
145
  className: A.formsTableBody,
146
146
  dataTestId: "forms-table"
147
147
  }
148
- ) : /* @__PURE__ */ s(ue, { align: "start", children: M.map((e, r) => {
148
+ ) : /* @__PURE__ */ s(ue, { align: "start", children: R.map((e, r) => {
149
149
  const { formName: a, records: i } = e;
150
150
  return /* @__PURE__ */ s(
151
151
  le,
@@ -157,7 +157,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
157
157
  children: /* @__PURE__ */ s(
158
158
  U,
159
159
  {
160
- headers: _,
160
+ headers: M,
161
161
  ariaLabel: t("FORMS_HEADING"),
162
162
  rows: i,
163
163
  loading: !1,
@@ -194,7 +194,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
194
194
  errorMessage: P,
195
195
  emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
196
196
  testIdPrefix: o.formName,
197
- hideThumbnail: w
197
+ hideThumbnail: H
198
198
  }
199
199
  )
200
200
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cid41j6e.js";
2
- import { w as d, z as f, D as e } from "./index-Bn_FvR7Q.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DTwVqfGF.js";
2
+ import { r as d, A as f, D as e } from "./index-BAGx7MPS.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-Cid41j6e.js";
2
- import { w as v, z as C, D as e } from "./index-Bn_FvR7Q.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-DTwVqfGF.js";
2
+ import { r as v, A as C, D as e } from "./index-BAGx7MPS.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,12 +1,12 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { u as q, h as k, a as S, s as x, k as j, j as M, E as Q, y as X, V as w, A as G, c as H, o as z, q as L, v as P, x as J, r as Y, _ as W, B as Z, L as ee } from "./index-Bn_FvR7Q.js";
2
+ import { u as q, h as w, a as S, j as K, l as k, i as x, k as z, E as M, y as P, z as j, c as G, w as H, P as L, o as J, x as Y, q as W, _ as X, B as Z, L as ee } from "./index-BAGx7MPS.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as R } from "react";
5
- const A = (a, n, d, l, b, r) => {
6
- const t = P(a, n, b), s = t.value, o = J(s);
5
+ const D = (a, n, d, l, b, r) => {
6
+ const t = J(a, n, b), s = t.value, o = Y(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
- W,
9
+ X,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
@@ -25,7 +25,7 @@ const A = (a, n, d, l, b, r) => {
25
25
  provider: t.provider
26
26
  }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ W,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -43,7 +43,7 @@ const A = (a, n, d, l, b, r) => {
43
43
  id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
45
  children: a.members?.map(
46
- (s, o) => A(
46
+ (s, o) => D(
47
47
  s,
48
48
  o,
49
49
  b,
@@ -60,7 +60,7 @@ const A = (a, n, d, l, b, r) => {
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = S(), b = (r, t, s) => {
63
- const o = z(r.encounterDetails, l);
63
+ const o = H(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ N(
65
65
  L,
66
66
  {
@@ -69,7 +69,7 @@ const A = (a, n, d, l, b, r) => {
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => A(
72
+ (i, m) => D(
73
73
  i,
74
74
  m,
75
75
  s,
@@ -113,20 +113,20 @@ const A = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = k(), { t: o } = S(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = w(), { t: o } = S(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => x(e),
119
+ queryFn: () => K(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
123
  $(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const K = d[h];
126
+ const V = d[h];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: K }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -134,15 +134,15 @@ const A = (a, n, d, l, b, r) => {
134
134
  }, [i, d]);
135
135
  const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: D,
137
+ isLoading: F,
138
138
  isError: T,
139
139
  refetch: g
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
- queryFn: () => j(t, p),
142
+ queryFn: () => k(t, p),
143
143
  enabled: !!t && p.length > 0 && y
144
144
  });
145
- M(
145
+ x(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
@@ -158,13 +158,13 @@ const A = (a, n, d, l, b, r) => {
158
158
  }, [T]);
159
159
  const O = R(() => {
160
160
  if (!c) return [];
161
- const e = Q(c), h = X(e);
162
- return w(h);
163
- }, [c]), F = [
161
+ const e = z(c), h = M(e);
162
+ return P(h);
163
+ }, [c]), A = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], _ = D || !y, f = T && y, B = (!c || c.entry?.length === 0 || p.length === 0) && y, V = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = B ? o("NO_OBSERVATIONS_FOUND") : void 0, U = O.length > 0 && !_ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], _ = F || !y, f = T && y, B = (!c || c.entry?.length === 0 || p.length === 0) && y, C = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, Q = B ? o("NO_OBSERVATIONS_FOUND") : void 0, U = O.length > 0 && !_ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const A = (a, n, d, l, b, r) => {
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- G,
177
+ j,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -191,14 +191,14 @@ const A = (a, n, d, l, b, r) => {
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- H,
194
+ G,
195
195
  {
196
- headers: F,
196
+ headers: A,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
199
  loading: _,
200
- errorStateMessage: V,
201
- emptyStateMessage: C,
200
+ errorStateMessage: C,
201
+ emptyStateMessage: Q,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { F as we, G as z, H as xt, I as B, z as q, D as y, P as Ro, J as ye, S as R, K as _, M as k, N, O as A, Q as bs, U as ir, W as $e, X as U, Y as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Os } from "./index-Bn_FvR7Q.js";
1
+ import { F as we, G as z, H as xt, I as B, A as q, D as y, J as Ro, K as ye, S as R, M as _, N as k, O as N, Q as A, U as bs, V as ir, W as $e, X as U, Y as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Os } from "./index-BAGx7MPS.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {