@bahmni/registration-app 0.0.1-dev.246 → 0.0.1-dev.256

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 { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-DEREz8wc.js";
2
+ import { c as K, u as Q, d as W, y as J, l as X, m as Z, a as ee, w as te } from "./index-BuWaqG5L.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as O, useMemo as T } from "react";
5
5
  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 = {
@@ -38,11 +38,11 @@ const _e = [
38
38
  null
39
39
  ), [R, I] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), 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
+ ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, y] = l(1), [m, k] = l($), [V, A] = l(void 0), M = h((e) => {
42
42
  L(e), S(!0);
43
43
  }, []), F = h(() => {
44
44
  S(!1), L(null), I(/* @__PURE__ */ new Set());
45
- }, []), M = h((e) => {
45
+ }, []), b = h((e) => {
46
46
  I((t) => new Set(t).add(e));
47
47
  }, []), { data: u, isLoading: H, isError: D, error: v } = ae({
48
48
  queryKey: [
@@ -61,9 +61,9 @@ const _e = [
61
61
  )
62
62
  });
63
63
  O(() => {
64
- u && y(u.total);
64
+ u && A(u.total);
65
65
  }, [u]), O(() => {
66
- A(1), y(void 0);
66
+ y(1), A(void 0);
67
67
  }, [E]), O(() => {
68
68
  D && U({
69
69
  title: n("ERROR_DEFAULT_TITLE"),
@@ -91,7 +91,7 @@ const _e = [
91
91
  }, [s, o]);
92
92
  const q = h(
93
93
  (e, t) => {
94
- t !== m ? (k(t), A(1), y(void 0)) : A(e);
94
+ t !== m ? (k(t), y(1), A(void 0)) : y(e);
95
95
  },
96
96
  [m]
97
97
  ), f = T(
@@ -125,7 +125,7 @@ const _e = [
125
125
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
126
126
  X,
127
127
  {
128
- onClick: () => b(e),
128
+ onClick: () => M(e),
129
129
  className: d.viewAttachmentsLink,
130
130
  "data-testid": `view-attachments-${e.id}`,
131
131
  children: n("DOCUMENTS_VIEW_ATTACHMENTS")
@@ -135,7 +135,7 @@ const _e = [
135
135
  return null;
136
136
  }
137
137
  },
138
- [b, n]
138
+ [M, n]
139
139
  );
140
140
  return /* @__PURE__ */ p(Y, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
@@ -202,7 +202,7 @@ const _e = [
202
202
  src: c,
203
203
  alt: o.documentIdentifier,
204
204
  className: d.documentImage,
205
- onError: () => M(t)
205
+ onError: () => b(t)
206
206
  }
207
207
  ) : /* @__PURE__ */ r(
208
208
  "iframe",
@@ -210,7 +210,7 @@ const _e = [
210
210
  src: i ? `${c}#toolbar=0` : c,
211
211
  className: d.documentIframe,
212
212
  title: o.documentIdentifier,
213
- onError: () => M(t)
213
+ onError: () => b(t)
214
214
  }
215
215
  )
216
216
  ]
@@ -1,54 +1,54 @@
1
- import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as X, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-DEREz8wc.js";
1
+ import { jsx as s, jsxs as W, Fragment as J } from "react/jsx-runtime";
2
+ import { u as Z, c as ee, b as re, E as ae, g as te, v as oe, e as se, X as ne, L as U, m as de, l as ie, a as S, x as me, N as ue, w as le, $ as ce, f as fe } from "./index-BuWaqG5L.js";
3
3
  import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as f } from "react";
5
5
  const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
6
6
  formsTableBody: pe,
7
7
  customAccordianItem: be
8
- }, Ne = (m) => m ? m.extension?.find(
8
+ }, ge = (m) => m ? m.extension?.find(
9
9
  (n) => n.url === fe
10
10
  )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
13
  config: C
14
14
  }) => {
15
- const { t: o } = X(), u = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: x = !1 } = C ?? {}, T = re(
15
+ const { t: o } = Z(), u = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: w = !1 } = C ?? {}, E = re(
16
16
  m,
17
17
  n
18
- ), $ = ye(), {
18
+ ), x = ye(), {
19
19
  data: y = [],
20
20
  isLoading: B,
21
- isError: E,
22
- error: w,
21
+ isError: L,
22
+ error: $,
23
23
  refetch: H
24
24
  } = c({
25
25
  queryKey: ["forms", u, m],
26
26
  queryFn: () => ae(u, void 0, k),
27
- enabled: !!u && !T
28
- }), _ = d(() => !n || n.length === 0 ? y : y.filter(
27
+ enabled: !!u && !E
28
+ }), T = d(() => !n || n.length === 0 ? y : y.filter(
29
29
  (e) => n.includes(e.encounterUuid)
30
- ), [y, n]), { data: D = [] } = c({
30
+ ), [y, n]), { data: _ = [] } = c({
31
31
  queryKey: ["observationForms"],
32
32
  queryFn: () => te()
33
- }), F = f(
34
- (e) => D.find((r) => r.name === e)?.uuid,
35
- [D]
33
+ }), v = f(
34
+ (e) => _.find((r) => r.name === e)?.uuid,
35
+ [_]
36
36
  ), p = d(() => {
37
37
  if (t)
38
- return F(t.formName);
39
- }, [t, F]), {
38
+ return v(t.formName);
39
+ }, [t, v]), {
40
40
  isLoading: K,
41
- isError: Q,
41
+ isError: j,
42
42
  error: b
43
43
  } = c({
44
44
  queryKey: ["formMetadata", p],
45
45
  queryFn: () => oe(p),
46
46
  enabled: !!p && l
47
47
  }), {
48
- data: N,
49
- isLoading: j,
50
- isError: V,
51
- error: g
48
+ data: g,
49
+ isLoading: V,
50
+ isError: Q,
51
+ error: N
52
52
  } = c({
53
53
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
54
54
  queryFn: () => se(t.encounterUuid),
@@ -56,19 +56,19 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
56
56
  });
57
57
  ne(
58
58
  (e) => {
59
- e.patientUUID === u && e.updatedConcepts.size > 0 && (H(), $.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (H(), x.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
60
60
  },
61
61
  [u]
62
62
  );
63
- const z = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
64
- const r = Ne(e);
63
+ const z = d(() => !g?.entry || !t?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
64
+ const r = ge(e);
65
65
  return !r || r.includes(t.formName);
66
- }), [N, t?.formName]), G = d(() => {
66
+ }), [g, t?.formName]), G = d(() => {
67
67
  if (b)
68
68
  return U(b).message;
69
- if (g)
70
- return U(g).message;
71
- }, [b, g]), L = d(
69
+ if (N)
70
+ return U(N).message;
71
+ }, [b, N]), F = d(
72
72
  () => [
73
73
  { key: "recordedOn", header: o("RECORDED_ON") },
74
74
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -81,11 +81,11 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
81
81
  ],
82
82
  []
83
83
  ), M = d(() => {
84
- const e = _.reduce(
84
+ const e = T.reduce(
85
85
  (r, a) => {
86
86
  const i = a.formName;
87
87
  r[i] ??= [];
88
- const h = a.providers.map((Z) => Z.providerName).filter(Boolean).join(", ");
88
+ const h = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
89
89
  return r[i].push({
90
90
  id: a.encounterUuid,
91
91
  formName: a.formName,
@@ -105,34 +105,34 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
105
105
  )
106
106
  })
107
107
  ).sort((r, a) => r.formName.localeCompare(a.formName));
108
- }, [_, o]), R = f((e) => {
108
+ }, [T, o]), D = f((e) => {
109
109
  I(e), A(!0);
110
- }, []), Y = f(() => {
110
+ }, []), X = f(() => {
111
111
  A(!1), I(null);
112
- }, []), v = f(
112
+ }, []), R = f(
113
113
  (e, r) => {
114
114
  switch (r) {
115
115
  case "recordedOn":
116
- return /* @__PURE__ */ s(ie, { onClick: () => R(e), children: e.recordedOn });
116
+ return /* @__PURE__ */ s(ie, { onClick: () => D(e), children: e.recordedOn });
117
117
  case "recordedBy":
118
118
  return e.recordedBy;
119
119
  default:
120
120
  return null;
121
121
  }
122
122
  },
123
- [R]
123
+ [D]
124
124
  );
125
- return /* @__PURE__ */ J(W, { children: [
126
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || M.length === 0 || T ? /* @__PURE__ */ s(
125
+ return /* @__PURE__ */ W(J, { children: [
126
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || L || M.length === 0 || E ? /* @__PURE__ */ s(
127
127
  S,
128
128
  {
129
- headers: L,
129
+ headers: F,
130
130
  ariaLabel: o("FORMS_HEADING"),
131
131
  rows: [],
132
132
  loading: B,
133
- errorStateMessage: E ? w?.message : void 0,
133
+ errorStateMessage: L ? $?.message : void 0,
134
134
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
135
- renderCell: v,
135
+ renderCell: R,
136
136
  className: O.formsTableBody,
137
137
  dataTestId: "forms-table"
138
138
  }
@@ -148,14 +148,14 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
148
148
  children: /* @__PURE__ */ s(
149
149
  S,
150
150
  {
151
- headers: L,
151
+ headers: F,
152
152
  ariaLabel: o("FORMS_HEADING"),
153
153
  rows: i,
154
154
  loading: !1,
155
155
  errorStateMessage: "",
156
156
  sortable: P,
157
157
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
158
- renderCell: v,
158
+ renderCell: R,
159
159
  className: O.formsTableBody,
160
160
  dataTestId: `forms-table-${a}`
161
161
  }
@@ -170,7 +170,7 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
170
170
  id: "modalIdForActionAreaLayout",
171
171
  portalId: "main-display-area",
172
172
  open: l,
173
- onRequestClose: Y,
173
+ onRequestClose: X,
174
174
  modalHeading: t.formName,
175
175
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
176
176
  passiveModal: !0,
@@ -180,12 +180,12 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
180
180
  ce,
181
181
  {
182
182
  observations: z,
183
- isLoading: K || j,
184
- isError: Q || V,
183
+ isLoading: K || V,
184
+ isError: j || Q,
185
185
  errorMessage: G,
186
186
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
187
187
  testIdPrefix: t.formName,
188
- hideThumbnail: x
188
+ hideThumbnail: w
189
189
  }
190
190
  )
191
191
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-zIdfseOL.js";
2
- import { B as d, C as f, D as e } from "./index-DEREz8wc.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-C1IfqwdX.js";
2
+ import { s as d, t as f, A as e } from "./index-BuWaqG5L.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -27,7 +27,7 @@ var p = (a) => {
27
27
  });
28
28
  }
29
29
  });
30
- }, P = p;
30
+ }, C = p;
31
31
  export {
32
- P as default
32
+ C as default
33
33
  };
@@ -1,9 +1,9 @@
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-zIdfseOL.js";
2
- import { B as C, C as v, D as e } from "./index-DEREz8wc.js";
1
+ import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-C1IfqwdX.js";
2
+ import { s as v, t as C, A as e } from "./index-BuWaqG5L.js";
3
3
  var h = (t) => {
4
- const [r, o] = s({
4
+ const [r, o] = l({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), a = C(), l = v(() => {
6
+ }), a = v(), s = C(() => {
7
7
  const n = r.theme_preference || c;
8
8
  return n !== "system" ? n : a();
9
9
  });
@@ -16,7 +16,7 @@ var h = (t) => {
16
16
  setLocalStore: o,
17
17
  get children() {
18
18
  return e(i.Provider, {
19
- value: l,
19
+ value: s,
20
20
  get children() {
21
21
  return e(m, {
22
22
  get children() {
@@ -1,76 +1,76 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { c as Q, d as V, u as S, n as H, j as K, Q as w, k as j, p as x, q as G, H as M, b as X, r as z, Z as A, t as P, v as Z, R as Y, y as J, z as W, A as ee } from "./index-DEREz8wc.js";
3
- import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as O, useMemo as R } from "react";
5
- const D = (t, n, d, l, b, r) => {
6
- const a = P(t, n, b), s = a.value, i = Z(s);
7
- let o = s;
8
- i === "Image" && (o = /* @__PURE__ */ u(
9
- J,
2
+ import { c as V, d as H, u as S, p as K, h as M, X as Q, i as X, j as x, z as j, H as w, a as z, k as G, Y as D, M as Y, o as P, R as J, n as W, q as Z, r as ee } from "./index-BuWaqG5L.js";
3
+ import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
+ import { useRef as se, useEffect as $, useMemo as R } from "react";
5
+ const F = (a, n, d, l, b, r) => {
6
+ const t = Y(a, n, b), s = t.value, o = P(s);
7
+ let i = s;
8
+ o === "Image" && (i = /* @__PURE__ */ u(
9
+ W,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
13
13
  id: `${s}-img`,
14
14
  hideThumbnail: r
15
15
  }
16
- )), i === "Video" && (o = /* @__PURE__ */ u(
17
- W,
16
+ )), o === "Video" && (i = /* @__PURE__ */ u(
17
+ Z,
18
18
  {
19
19
  id: `${s}-video`,
20
20
  videoSrc: s,
21
21
  hideThumbnail: r
22
22
  }
23
- )), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
23
+ )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
24
  const p = b("OBSERVATIONS_RECORDED_BY", {
25
- provider: a.provider
26
- }), m = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
25
+ provider: t.provider
26
+ }), m = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ J,
29
29
  {
30
- header: a.header,
31
- value: o,
30
+ header: t.header,
31
+ value: i,
32
32
  info: p,
33
33
  id: c,
34
34
  testId: c,
35
35
  ariaLabel: c
36
36
  },
37
- `obs-${t.id}`
37
+ `obs-${a.id}`
38
38
  );
39
- }, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
40
- A,
39
+ }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
40
+ D,
41
41
  {
42
- title: t.display,
43
- id: `grouped-obs-${t.display}-${l}`,
42
+ title: a.display,
43
+ id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
- children: t.members?.map(
46
- (s, i) => D(
45
+ children: a.members?.map(
46
+ (s, o) => F(
47
47
  s,
48
- i,
48
+ o,
49
49
  b,
50
50
  r,
51
51
  n,
52
- a
52
+ t
53
53
  )
54
54
  )
55
55
  },
56
- `grouped-obs-${t.id}`
57
- ), ie = ({
58
- groupedData: t,
56
+ `grouped-obs-${a.id}`
57
+ ), oe = ({
58
+ groupedData: a,
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
- const { t: l } = S(), b = (r, a, s) => {
63
- const i = z(r.encounterDetails, l);
62
+ const { t: l } = S(), b = (r, t, s) => {
63
+ const o = G(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ N(
65
- A,
65
+ D,
66
66
  {
67
- title: i,
67
+ title: o,
68
68
  id: `encounter-${r.encounterId}`,
69
- open: a,
69
+ open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (o, p) => D(
73
- o,
72
+ (i, p) => F(
73
+ i,
74
74
  p,
75
75
  s,
76
76
  n,
@@ -79,10 +79,10 @@ const D = (t, n, d, l, b, r) => {
79
79
  )
80
80
  ),
81
81
  r.groupedObservations.map(
82
- (o, p) => re(
83
- o,
82
+ (i, p) => re(
83
+ i,
84
84
  l,
85
- a,
85
+ t,
86
86
  p,
87
87
  s,
88
88
  n,
@@ -100,71 +100,71 @@ const D = (t, n, d, l, b, r) => {
100
100
  id: "obs-by-encounter",
101
101
  "data-testid": "obs-by-encounter-test-id",
102
102
  "aria-label": "obs-by-encounter-aria-label",
103
- children: t.map(
104
- (r, a) => b(r, a === 0, a)
103
+ children: a.map(
104
+ (r, t) => b(r, t === 0, t)
105
105
  )
106
106
  }
107
107
  );
108
- }, oe = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
109
- observations: oe,
108
+ }, ie = "_observations_kfbhq_1", ne = "_title_kfbhq_12", I = {
109
+ observations: ie,
110
110
  title: ne
111
- }, de = (t) => ["conceptUuid", t], le = (t, n) => ["observations", t, ...n], me = ({ config: t }) => {
112
- const n = t, {
111
+ }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], me = ({ config: a }) => {
112
+ const n = a, {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), a = Q(), { addNotification: s } = V(), { t: i } = S(), o = te({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = H(), { t: o } = S(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => H(e),
119
+ queryFn: () => K(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- O(() => {
124
- o.forEach((e, h) => {
123
+ $(() => {
124
+ i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
126
  const B = d[h];
127
127
  s({
128
- title: i("ERROR_DEFAULT_TITLE"),
129
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
128
+ title: o("ERROR_DEFAULT_TITLE"),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
133
133
  });
134
- }, [o, d]);
135
- 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]), {
134
+ }, [i, d]);
135
+ const p = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: F,
137
+ isLoading: q,
138
138
  isError: f,
139
- refetch: g
140
- } = ae({
141
- queryKey: le(a, m),
142
- queryFn: () => K(a, m),
143
- enabled: !!a && m.length > 0 && y
139
+ refetch: T
140
+ } = te({
141
+ queryKey: le(t, m),
142
+ queryFn: () => M(t, m),
143
+ enabled: !!t && m.length > 0 && y
144
144
  });
145
- w(
145
+ Q(
146
146
  (e) => {
147
- e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
147
+ e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => m.includes(h)
149
- ) && g();
149
+ ) && T();
150
150
  },
151
- [a, g]
152
- ), O(() => {
151
+ [t, T]
152
+ ), $(() => {
153
153
  f && s({
154
- title: i("ERROR_DEFAULT_TITLE"),
155
- message: i("ERROR_FETCHING_OBSERVATIONS"),
154
+ title: o("ERROR_DEFAULT_TITLE"),
155
+ message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
158
  }, [f]);
159
- const T = R(() => {
159
+ const g = R(() => {
160
160
  if (!c) return [];
161
- const e = j(c), h = x(e);
162
- return G(h);
163
- }, [c]), q = [
161
+ const e = X(c), h = x(e);
162
+ return j(h);
163
+ }, [c]), A = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], _ = F || !y, $ = f && y, L = (!c || c.entry?.length === 0 || m.length === 0) && y, k = $ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = T.length > 0 && !_ && !$, E = n.titleTranslationKey, v = E ? i(E) : "";
167
+ ], O = q || !y, _ = f && y, L = (!c || c.entry?.length === 0 || m.length === 0) && y, k = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const D = (t, n, d, l, b, r) => {
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- M,
177
+ w,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -184,19 +184,19 @@ const D = (t, n, d, l, b, r) => {
184
184
  }
185
185
  ),
186
186
  U ? /* @__PURE__ */ u(
187
- ie,
187
+ oe,
188
188
  {
189
- groupedData: T,
189
+ groupedData: g,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- X,
194
+ z,
195
195
  {
196
- headers: q,
196
+ headers: A,
197
197
  rows: [],
198
- ariaLabel: i("OBSERVATIONS"),
199
- loading: _,
198
+ ariaLabel: o("OBSERVATIONS"),
199
+ loading: O,
200
200
  errorStateMessage: k,
201
201
  emptyStateMessage: C,
202
202
  dataTestId: "observations-table"