@bahmni/appointments-app 0.0.1-dev.239 → 0.0.1-dev.242

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 { t as K, u as Q, r as W, a as J, N as X, d as Z, o as ee, l as te, H as ae } from "./index-CiSdLjcg.js";
2
+ import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te, e as ae } from "./index-CF3QwtRK.js";
3
3
  import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
4
4
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -33,17 +33,17 @@ const _e = [
33
33
  "uploadedBy",
34
34
  "action"
35
35
  ], 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 }] : [], Ee = ({ config: a, encounterUuids: g }) => {
36
- const [s, w] = l(!1), [o, L] = l(
36
+ const [s, S] = l(!1), [o, L] = l(
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [H, y] = l(void 0), M = h((e) => {
41
- L(e), w(!0);
42
- }, []), V = h(() => {
43
- w(!1), L(null), I(/* @__PURE__ */ new Set());
44
- }, []), b = h((e) => {
40
+ ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), b = h((e) => {
41
+ L(e), S(!0);
42
+ }, []), F = h(() => {
43
+ S(!1), L(null), I(/* @__PURE__ */ new Set());
44
+ }, []), M = h((e) => {
45
45
  I((t) => new Set(t).add(e));
46
- }, []), { data: u, isLoading: F, isError: D, error: v } = J({
46
+ }, []), { data: u, isLoading: H, isError: D, error: v } = J({
47
47
  queryKey: [
48
48
  "documents",
49
49
  E,
@@ -75,9 +75,9 @@ const _e = [
75
75
  if (!s || !o) return;
76
76
  const t = /* @__PURE__ */ new Set(), c = B(o);
77
77
  for (let i = 0; i < c.length; i++) {
78
- const S = j(c[i].url);
78
+ const w = j(c[i].url);
79
79
  try {
80
- (await fetch(S, {
80
+ (await fetch(w, {
81
81
  method: "HEAD",
82
82
  signal: e.signal
83
83
  })).ok || t.add(i);
@@ -124,7 +124,7 @@ const _e = [
124
124
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
125
125
  X,
126
126
  {
127
- onClick: () => M(e),
127
+ onClick: () => b(e),
128
128
  className: d.viewAttachmentsLink,
129
129
  "data-testid": `view-attachments-${e.id}`,
130
130
  children: n("DOCUMENTS_VIEW_ATTACHMENTS")
@@ -134,7 +134,7 @@ const _e = [
134
134
  return null;
135
135
  }
136
136
  },
137
- [M, n]
137
+ [b, n]
138
138
  );
139
139
  return /* @__PURE__ */ p(Y, { children: [
140
140
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
@@ -143,7 +143,7 @@ const _e = [
143
143
  headers: z,
144
144
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
145
145
  rows: P,
146
- loading: F,
146
+ loading: H,
147
147
  errorStateMessage: D ? v?.message : null,
148
148
  sortable: x,
149
149
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
@@ -151,7 +151,7 @@ const _e = [
151
151
  className: d.documentsTableBody,
152
152
  dataTestId: "documents-table",
153
153
  pageSize: m,
154
- totalItems: H,
154
+ totalItems: V,
155
155
  page: C,
156
156
  onPageChange: q
157
157
  }
@@ -162,13 +162,13 @@ const _e = [
162
162
  id: "modalIdForActionAreaLayout",
163
163
  portalId: "main-display-area",
164
164
  open: s,
165
- onRequestClose: V,
165
+ onRequestClose: F,
166
166
  modalHeading: o.documentIdentifier,
167
167
  passiveModal: !0,
168
168
  size: "lg",
169
169
  testId: "document-view-modal",
170
170
  children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: _.map((e, t) => {
171
- const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = R.has(t);
171
+ const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = R.has(t);
172
172
  return c === "#" || O ? /* @__PURE__ */ p(
173
173
  "div",
174
174
  {
@@ -195,13 +195,13 @@ const _e = [
195
195
  "/",
196
196
  _.length
197
197
  ] }),
198
- S ? /* @__PURE__ */ r(
198
+ w ? /* @__PURE__ */ r(
199
199
  "img",
200
200
  {
201
201
  src: c,
202
202
  alt: o.documentIdentifier,
203
203
  className: d.documentImage,
204
- onError: () => b(t)
204
+ onError: () => M(t)
205
205
  }
206
206
  ) : /* @__PURE__ */ r(
207
207
  "iframe",
@@ -209,7 +209,7 @@ const _e = [
209
209
  src: i ? `${c}#toolbar=0` : c,
210
210
  className: d.documentIframe,
211
211
  title: o.documentIdentifier,
212
- onError: () => b(t)
212
+ onError: () => M(t)
213
213
  }
214
214
  )
215
215
  ]
@@ -1,9 +1,9 @@
1
- import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as Z, t as ee, g as re, b as ae, a as c, B as te, V as U, d as oe, N as se, o as S, Q as ne, X as de, l as ie, c as ue, w as me, e as le, E as ce, y as fe, v as ye } from "./index-CiSdLjcg.js";
1
+ import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
2
+ import { u as Z, c as ee, f as re, g as ae, a as c, Q as te, N as U, m as oe, l as se, b as S, x as ne, h as de, w as ie, $ as ue, o as me, i as le, s as ce, j as fe, k as ye } from "./index-CF3QwtRK.js";
3
3
  import { useState as q, useMemo as d, useCallback as f } from "react";
4
- const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
5
- formsTableBody: be,
6
- customAccordianItem: ge
4
+ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
5
+ formsTableBody: pe,
6
+ customAccordianItem: be
7
7
  }, Ne = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
9
  )?.valueString : void 0, Oe = ({
@@ -11,43 +11,43 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
11
11
  encounterUuids: n,
12
12
  config: C
13
13
  }) => {
14
- const { t: o } = Z(), m = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: V, hideThumbnail: k = !1 } = C ?? {}, B = re(
14
+ const { t: o } = Z(), m = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: x, hideThumbnail: k = !1 } = C ?? {}, T = re(
15
15
  u,
16
16
  n
17
- ), w = ae(), {
17
+ ), $ = ae(), {
18
18
  data: y = [],
19
- isLoading: E,
20
- isError: T,
21
- error: H,
22
- refetch: K
19
+ isLoading: B,
20
+ isError: E,
21
+ error: j,
22
+ refetch: w
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
- queryFn: () => le(m, void 0, V),
26
- enabled: !!m && !B
25
+ queryFn: () => le(m, void 0, x),
26
+ enabled: !!m && !T
27
27
  }), F = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
29
  ), [y, n]), { data: _ = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
- }), v = f(
32
+ }), L = f(
33
33
  (e) => _.find((r) => r.name === e)?.uuid,
34
34
  [_]
35
- ), b = d(() => {
35
+ ), p = d(() => {
36
36
  if (t)
37
- return v(t.formName);
38
- }, [t, v]), {
39
- isLoading: Q,
40
- isError: j,
41
- error: g
37
+ return L(t.formName);
38
+ }, [t, L]), {
39
+ isLoading: H,
40
+ isError: K,
41
+ error: b
42
42
  } = c({
43
- queryKey: ["formMetadata", b],
44
- queryFn: () => fe(b),
45
- enabled: !!b && l
43
+ queryKey: ["formMetadata", p],
44
+ queryFn: () => fe(p),
45
+ enabled: !!p && l
46
46
  }), {
47
47
  data: N,
48
- isLoading: x,
49
- isError: $,
50
- error: p
48
+ isLoading: Q,
49
+ isError: V,
50
+ error: g
51
51
  } = c({
52
52
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
53
53
  queryFn: () => ye(t.encounterUuid),
@@ -55,7 +55,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
55
55
  });
56
56
  te(
57
57
  (e) => {
58
- e.patientUUID === m && e.updatedConcepts.size > 0 && (K(), w.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
58
+ e.patientUUID === m && e.updatedConcepts.size > 0 && (w(), $.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
59
  },
60
60
  [m]
61
61
  );
@@ -63,11 +63,11 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
63
63
  const r = Ne(e);
64
64
  return !r || r.includes(t.formName);
65
65
  }), [N, t?.formName]), G = d(() => {
66
+ if (b)
67
+ return U(b).message;
66
68
  if (g)
67
69
  return U(g).message;
68
- if (p)
69
- return U(p).message;
70
- }, [g, p]), L = d(
70
+ }, [b, g]), M = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: o("RECORDED_ON") },
73
73
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -79,12 +79,12 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
79
79
  { key: "recordedBy", sortable: !0 }
80
80
  ],
81
81
  []
82
- ), M = d(() => {
82
+ ), D = d(() => {
83
83
  const e = F.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
87
- const h = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
87
+ const h = a.providers.map((J) => J.providerName).filter(Boolean).join(", ");
88
88
  return r[i].push({
89
89
  id: a.encounterUuid,
90
90
  formName: a.formName,
@@ -104,38 +104,38 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
- }, [F, o]), D = f((e) => {
107
+ }, [F, o]), R = f((e) => {
108
108
  A(e), O(!0);
109
- }, []), X = f(() => {
109
+ }, []), Y = f(() => {
110
110
  O(!1), A(null);
111
- }, []), R = f(
111
+ }, []), v = f(
112
112
  (e, r) => {
113
113
  switch (r) {
114
114
  case "recordedOn":
115
- return /* @__PURE__ */ s(se, { onClick: () => D(e), children: e.recordedOn });
115
+ return /* @__PURE__ */ s(se, { onClick: () => R(e), children: e.recordedOn });
116
116
  case "recordedBy":
117
117
  return e.recordedBy;
118
118
  default:
119
119
  return null;
120
120
  }
121
121
  },
122
- [D]
122
+ [R]
123
123
  );
124
- return /* @__PURE__ */ J(W, { children: [
125
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T || M.length === 0 || B ? /* @__PURE__ */ s(
124
+ return /* @__PURE__ */ W(X, { children: [
125
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || D.length === 0 || T ? /* @__PURE__ */ s(
126
126
  S,
127
127
  {
128
- headers: L,
128
+ headers: M,
129
129
  ariaLabel: o("FORMS_HEADING"),
130
130
  rows: [],
131
- loading: E,
132
- errorStateMessage: T ? H?.message : void 0,
131
+ loading: B,
132
+ errorStateMessage: E ? j?.message : void 0,
133
133
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
134
- renderCell: R,
134
+ renderCell: v,
135
135
  className: I.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
- ) : /* @__PURE__ */ s(ne, { align: "start", children: M.map((e, r) => {
138
+ ) : /* @__PURE__ */ s(ne, { align: "start", children: D.map((e, r) => {
139
139
  const { formName: a, records: i } = e;
140
140
  return /* @__PURE__ */ s(
141
141
  de,
@@ -147,14 +147,14 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
147
147
  children: /* @__PURE__ */ s(
148
148
  S,
149
149
  {
150
- headers: L,
150
+ headers: M,
151
151
  ariaLabel: o("FORMS_HEADING"),
152
152
  rows: i,
153
153
  loading: !1,
154
154
  errorStateMessage: "",
155
155
  sortable: P,
156
156
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
157
- renderCell: R,
157
+ renderCell: v,
158
158
  className: I.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
@@ -169,7 +169,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
169
169
  id: "modalIdForActionAreaLayout",
170
170
  portalId: "main-display-area",
171
171
  open: l,
172
- onRequestClose: X,
172
+ onRequestClose: Y,
173
173
  modalHeading: t.formName,
174
174
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
175
175
  passiveModal: !0,
@@ -179,8 +179,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
179
179
  ue,
180
180
  {
181
181
  observations: z,
182
- isLoading: Q || x,
183
- isError: j || $,
182
+ isLoading: H || Q,
183
+ isError: K || V,
184
184
  errorMessage: G,
185
185
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
186
186
  testIdPrefix: t.formName,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-cFpTk2Qz.js";
2
- import { S as d, W as f, Z as e } from "./index-CiSdLjcg.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BB0oTsZm.js";
2
+ import { W as d, X as f, Y as e } from "./index-CF3QwtRK.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-cFpTk2Qz.js";
2
- import { S as v, W as C, Z as e } from "./index-CiSdLjcg.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-BB0oTsZm.js";
2
+ import { W as v, X as C, Y as e } from "./index-CF3QwtRK.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,11 +1,11 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { t as V, r as x, u as S, f as K, m as Q, a as Y, B as j, z as w, A as z, _ as G, Y as H, o as M, x as J, J as F, h as P, i as W, F as X, j as Z, T as ee, k as ae, n as te } from "./index-CiSdLjcg.js";
3
- import { useRef as se, useEffect as $, useMemo as T } from "react";
2
+ import { c as Q, d as k, u as S, n as H, p as K, a as w, Q as M, q as x, r as G, t as X, H as j, b as z, v as P, Z as D, y as Z, z as Y, R as J, A as W, B as ee, C as ae, D as te } from "./index-CF3QwtRK.js";
3
+ import { useRef as se, useEffect as $, useMemo as R } from "react";
4
4
  const A = (a, n, d, l, b, r) => {
5
- const t = P(a, n, b), s = t.value, i = W(s);
5
+ const t = Z(a, n, b), s = t.value, i = Y(s);
6
6
  let o = s;
7
7
  i === "Image" && (o = /* @__PURE__ */ u(
8
- Z,
8
+ W,
9
9
  {
10
10
  imageSrc: s,
11
11
  alt: s,
@@ -20,15 +20,15 @@ const A = (a, n, d, l, b, r) => {
20
20
  hideThumbnail: r
21
21
  }
22
22
  )), i === "PDF" && (o = /* @__PURE__ */ u(ae, { id: `${s}-pdf`, src: s }));
23
- const m = b("OBSERVATIONS_RECORDED_BY", {
23
+ const p = b("OBSERVATIONS_RECORDED_BY", {
24
24
  provider: t.provider
25
- }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
25
+ }), m = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
26
26
  return /* @__PURE__ */ u(
27
- X,
27
+ J,
28
28
  {
29
29
  header: t.header,
30
30
  value: o,
31
- info: m,
31
+ info: p,
32
32
  id: c,
33
33
  testId: c,
34
34
  ariaLabel: c
@@ -36,7 +36,7 @@ const A = (a, n, d, l, b, r) => {
36
36
  `obs-${a.id}`
37
37
  );
38
38
  }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
39
- F,
39
+ D,
40
40
  {
41
41
  title: a.display,
42
42
  id: `grouped-obs-${a.display}-${l}`,
@@ -59,18 +59,18 @@ const A = (a, n, d, l, b, r) => {
59
59
  hideThumbnail: d
60
60
  }) => {
61
61
  const { t: l } = S(), b = (r, t, s) => {
62
- const i = J(r.encounterDetails, l);
62
+ const i = P(r.encounterDetails, l);
63
63
  return /* @__PURE__ */ N(
64
- F,
64
+ D,
65
65
  {
66
66
  title: i,
67
67
  id: `encounter-${r.encounterId}`,
68
68
  open: t,
69
69
  children: [
70
70
  r.observations.map(
71
- (o, m) => A(
71
+ (o, p) => A(
72
72
  o,
73
- m,
73
+ p,
74
74
  s,
75
75
  n,
76
76
  l,
@@ -78,11 +78,11 @@ const A = (a, n, d, l, b, r) => {
78
78
  )
79
79
  ),
80
80
  r.groupedObservations.map(
81
- (o, m) => re(
81
+ (o, p) => re(
82
82
  o,
83
83
  l,
84
84
  t,
85
- m,
85
+ p,
86
86
  s,
87
87
  n,
88
88
  d
@@ -107,63 +107,63 @@ const A = (a, n, d, l, b, r) => {
107
107
  }, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
108
108
  observations: oe,
109
109
  title: ne
110
- }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], me = ({ config: a }) => {
110
+ }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
111
111
  const n = a, {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
114
  hideThumbnail: b = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = x(), { t: i } = S(), o = K({
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } = k(), { t: i } = S(), o = H({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
- queryFn: () => Q(e),
118
+ queryFn: () => K(e),
119
119
  enabled: !!e
120
120
  }))
121
121
  });
122
122
  $(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const C = d[h];
125
+ const V = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: C }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
132
132
  });
133
133
  }, [o, d]);
134
- const m = T(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = T(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
134
+ const p = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
135
135
  data: c,
136
- isLoading: U,
137
- isError: R,
138
- refetch: f
139
- } = Y({
140
- queryKey: le(t, p),
141
- queryFn: () => te(t, p),
142
- enabled: !!t && p.length > 0 && y
136
+ isLoading: F,
137
+ isError: f,
138
+ refetch: T
139
+ } = w({
140
+ queryKey: le(t, m),
141
+ queryFn: () => te(t, m),
142
+ enabled: !!t && m.length > 0 && y
143
143
  });
144
- j(
144
+ M(
145
145
  (e) => {
146
146
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
147
- (h) => p.includes(h)
148
- ) && f();
147
+ (h) => m.includes(h)
148
+ ) && T();
149
149
  },
150
- [t, f]
150
+ [t, T]
151
151
  ), $(() => {
152
- R && s({
152
+ f && s({
153
153
  title: i("ERROR_DEFAULT_TITLE"),
154
154
  message: i("ERROR_FETCHING_OBSERVATIONS"),
155
155
  type: "error"
156
156
  });
157
- }, [R]);
158
- const g = T(() => {
157
+ }, [f]);
158
+ const g = R(() => {
159
159
  if (!c) return [];
160
- const e = w(c), h = z(e);
161
- return G(h);
162
- }, [c]), D = [
160
+ const e = x(c), h = G(e);
161
+ return X(h);
162
+ }, [c]), C = [
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], _ = U || !y, O = R && y, B = (!c || c.entry?.length === 0 || p.length === 0) && y, L = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, k = B ? i("NO_OBSERVATIONS_FOUND") : void 0, q = g.length > 0 && !_ && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
166
+ ], O = F || !y, _ = f && y, L = (!c || c.entry?.length === 0 || m.length === 0) && y, q = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, B = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
167
167
  return /* @__PURE__ */ N(
168
168
  "div",
169
169
  {
@@ -173,7 +173,7 @@ const A = (a, n, d, l, b, r) => {
173
173
  className: I.observations,
174
174
  children: [
175
175
  /* @__PURE__ */ u(
176
- H,
176
+ j,
177
177
  {
178
178
  id: "observations-title",
179
179
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -182,7 +182,7 @@ const A = (a, n, d, l, b, r) => {
182
182
  children: /* @__PURE__ */ u("p", { children: v })
183
183
  }
184
184
  ),
185
- q ? /* @__PURE__ */ u(
185
+ U ? /* @__PURE__ */ u(
186
186
  ie,
187
187
  {
188
188
  groupedData: g,
@@ -190,14 +190,14 @@ const A = (a, n, d, l, b, r) => {
190
190
  hideThumbnail: b
191
191
  }
192
192
  ) : /* @__PURE__ */ u(
193
- M,
193
+ z,
194
194
  {
195
- headers: D,
195
+ headers: C,
196
196
  rows: [],
197
197
  ariaLabel: i("OBSERVATIONS"),
198
- loading: _,
199
- errorStateMessage: L,
200
- emptyStateMessage: k,
198
+ loading: O,
199
+ errorStateMessage: q,
200
+ emptyStateMessage: B,
201
201
  dataTestId: "observations-table"
202
202
  }
203
203
  )
@@ -207,6 +207,6 @@ const A = (a, n, d, l, b, r) => {
207
207
  };
208
208
  export {
209
209
  de as conceptUuidQueryKeys,
210
- me as default,
210
+ pe as default,
211
211
  le as observationsQueryKeys
212
212
  };
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, W as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-CiSdLjcg.js";
1
+ import { _ as we, a0 as z, a1 as xt, a2 as B, X as q, Y as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-CF3QwtRK.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {