@bahmni/registration-app 0.0.1-dev.155 → 0.0.1-dev.157

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,15 +1,15 @@
1
- import { jsx as s, jsxs as p, Fragment as P } from "react/jsx-runtime";
2
- import { u as ee, h as re, w as ae, Y as te, W as oe, K as ne, U as se, e as de, i as me, C as ie, z as U, a as le, G as ce, b as ue, c as be, V as q, d as pe, g as _e, f as L, P as fe, M as $e, x as he, F as ve } from "./index-Bnufarzo.js";
3
- import { useQueryClient as ge, useQuery as C } from "@tanstack/react-query";
4
- import { useState as K, useMemo as g, useCallback as A } from "react";
5
- const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Fe = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", xe = "_abnormalValue_1pd36_102", De = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
1
+ import { jsx as s, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
+ import { u as ee, h as re, w as ae, J as te, Y as oe, G as ne, K as se, e as de, i as me, C as ie, z as U, a as le, b as ce, c as ue, M as be, V as q, d as pe, g as _e, f as A, F as fe, N as $e, j as ge, U as ve } from "./index-Dt74mG6I.js";
3
+ import { useQueryClient as he, useQuery as C } from "@tanstack/react-query";
4
+ import { useState as K, useMemo as h, useCallback as R } from "react";
5
+ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Ae = "_observation_1pd36_30", Fe = "_groupContainer_1pd36_39", Le = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: ye,
8
8
  formContent: Ce,
9
- formDetailsContainer: Ae,
10
- observation: Le,
11
- groupContainer: Re,
12
- rowContainer: Fe,
9
+ formDetailsContainer: Re,
10
+ observation: Ae,
11
+ groupContainer: Fe,
12
+ rowContainer: Le,
13
13
  groupLabel: Me,
14
14
  rowLabel: Oe,
15
15
  rowValue: Ve,
@@ -17,13 +17,13 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
17
17
  memberRow: Te,
18
18
  memberLabel: Se,
19
19
  memberValue: we,
20
- abnormalValue: xe,
21
- commentSection: De,
20
+ abnormalValue: De,
21
+ commentSection: Ge,
22
22
  commentText: Ee,
23
- nestedGroup: Ge,
23
+ nestedGroup: xe,
24
24
  nestedGroupLabel: Be,
25
25
  nestedGroupMembers: Ue
26
- }, k = (e) => {
26
+ }, j = (e) => {
27
27
  const r = fe(e);
28
28
  return r === "Image" ? /* @__PURE__ */ s(
29
29
  $e,
@@ -32,11 +32,11 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
32
32
  alt: e,
33
33
  id: `${e}-img`
34
34
  }
35
- ) : r === "Video" ? /* @__PURE__ */ s(he, { id: `${e}-video`, videoSrc: e }) : e;
36
- }, H = (e) => {
35
+ ) : r === "Video" ? /* @__PURE__ */ s(ge, { id: `${e}-video`, videoSrc: e }) : e;
36
+ }, k = (e) => {
37
37
  const r = e.observationValue?.unit, n = e.observationValue?.referenceRange?.low?.value, a = e.observationValue?.referenceRange?.high?.value, d = n != null, c = a != null, m = d && c ? ` (${n} - ${a})` : d ? ` (>${n})` : c ? ` (<${a})` : "", t = e.observationValue?.isAbnormal === !0;
38
38
  return { units: r, rangeString: m, isAbnormal: t };
39
- }, j = ({
39
+ }, P = ({
40
40
  member: e,
41
41
  depth: r = 0,
42
42
  memberIndex: n = 0,
@@ -66,7 +66,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
66
66
  className: o.nestedGroupMembers,
67
67
  "data-testid": `${t}obs-nested-group-members-${m}-${n}`,
68
68
  children: e.members?.map((N, y) => /* @__PURE__ */ s(
69
- j,
69
+ P,
70
70
  {
71
71
  member: N,
72
72
  depth: r + 1,
@@ -80,8 +80,8 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
80
80
  ]
81
81
  }
82
82
  );
83
- const { units: b, rangeString: h, isAbnormal: _ } = H(e), f = e.observationValue?.value?.toString(), $ = f ? k(f) : null;
84
- return /* @__PURE__ */ p(P, { children: [
83
+ const { units: b, rangeString: g, isAbnormal: _ } = k(e), f = e.observationValue?.value?.toString(), $ = f ? j(f) : null;
84
+ return /* @__PURE__ */ p(H, { children: [
85
85
  /* @__PURE__ */ p(
86
86
  "div",
87
87
  {
@@ -92,21 +92,21 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
92
92
  /* @__PURE__ */ p(
93
93
  "p",
94
94
  {
95
- className: L(
95
+ className: A(
96
96
  o.memberLabel,
97
97
  _ ? o.abnormalValue : ""
98
98
  ),
99
99
  "data-testid": `${t}obs-member-label-${m}-${n}`,
100
100
  children: [
101
101
  m,
102
- h
102
+ g
103
103
  ]
104
104
  }
105
105
  ),
106
106
  /* @__PURE__ */ p(
107
107
  "div",
108
108
  {
109
- className: L(
109
+ className: A(
110
110
  o.memberValue,
111
111
  _ ? o.abnormalValue : ""
112
112
  ),
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
139
139
  formName: n = "",
140
140
  comment: a
141
141
  }) => {
142
- const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = H(e), b = n ? `${n}-` : "", h = e.observationValue?.value?.toString(), _ = h ? k(h) : null;
142
+ const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = k(e), b = n ? `${n}-` : "", g = e.observationValue?.value?.toString(), _ = g ? j(g) : null;
143
143
  return /* @__PURE__ */ p(
144
144
  "div",
145
145
  {
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
155
155
  /* @__PURE__ */ p(
156
156
  "p",
157
157
  {
158
- className: L(
158
+ className: A(
159
159
  d ? o.groupLabel : o.rowLabel,
160
160
  !d && t ? o.abnormalValue : ""
161
161
  ),
@@ -172,7 +172,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
172
172
  className: o.groupMembers,
173
173
  "data-testid": `${b}observation-group-members-${e.display}-${r}`,
174
174
  children: e.members?.map((f, $) => /* @__PURE__ */ s(
175
- j,
175
+ P,
176
176
  {
177
177
  member: f,
178
178
  depth: 0,
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
185
185
  ) : /* @__PURE__ */ p(
186
186
  "div",
187
187
  {
188
- className: L(
188
+ className: A(
189
189
  o.rowValue,
190
190
  t ? o.abnormalValue : ""
191
191
  ),
@@ -216,16 +216,16 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
216
216
  );
217
217
  }, Ke = (e) => e ? e.extension?.find(
218
218
  (r) => r.url === ve
219
- )?.valueString : void 0, Pe = (e) => {
219
+ )?.valueString : void 0, He = (e) => {
220
220
  if (e)
221
221
  return e.note?.[0]?.text;
222
- }, ke = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, O = (e, r) => {
223
- const n = ke(e, r);
222
+ }, je = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, O = (e, r) => {
223
+ const n = je(e, r);
224
224
  return n ? {
225
225
  formFieldPath: Ke(n),
226
- comment: Pe(n)
226
+ comment: He(n)
227
227
  } : {};
228
- }, He = (e, r) => {
228
+ }, ke = (e, r) => {
229
229
  if (!e?.entry || !r)
230
230
  return [];
231
231
  const n = pe(e);
@@ -247,42 +247,42 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
247
247
  ].filter(
248
248
  ({ formFieldPath: a }) => !a || a.includes(r)
249
249
  );
250
- }, We = ({
250
+ }, Je = ({
251
251
  episodeOfCareUuids: e,
252
252
  encounterUuids: r,
253
253
  config: n
254
254
  }) => {
255
- const { t: a } = ee(), d = re(), [c, m] = K(!1), [t, b] = K(null), h = n?.numberOfVisits, _ = ae(
255
+ const { t: a } = ee(), d = re(), [c, m] = K(!1), [t, b] = K(null), g = n?.numberOfVisits, _ = ae(
256
256
  e,
257
257
  r
258
- ), f = ge(), {
258
+ ), f = he(), {
259
259
  data: $ = [],
260
260
  isLoading: N,
261
261
  isError: y,
262
- error: Y,
263
- refetch: z
262
+ error: z,
263
+ refetch: Y
264
264
  } = C({
265
265
  queryKey: ["forms", d, e],
266
- queryFn: () => te(d, void 0, h),
266
+ queryFn: () => te(d, void 0, g),
267
267
  enabled: !!d && !_
268
- }), V = g(() => !r || r.length === 0 ? $ : $.filter(
268
+ }), V = h(() => !r || r.length === 0 ? $ : $.filter(
269
269
  (i) => r.includes(i.encounterUuid)
270
270
  ), [$, r]), { data: I = [] } = C({
271
271
  queryKey: ["observationForms"],
272
272
  queryFn: () => oe()
273
- }), T = A(
273
+ }), T = R(
274
274
  (i) => I.find((u) => u.name === i)?.uuid,
275
275
  [I]
276
- ), R = g(() => {
276
+ ), F = h(() => {
277
277
  if (t)
278
278
  return T(t.formName);
279
279
  }, [t, T]), { isLoading: Q, error: S } = C({
280
- queryKey: ["formMetadata", R],
281
- queryFn: () => ne(R),
282
- enabled: !!R && c
280
+ queryKey: ["formMetadata", F],
281
+ queryFn: () => ne(F),
282
+ enabled: !!F && c
283
283
  }), {
284
- data: F,
285
- isLoading: W,
284
+ data: L,
285
+ isLoading: J,
286
286
  error: w
287
287
  } = C({
288
288
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
@@ -291,26 +291,26 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
291
291
  });
292
292
  de(
293
293
  (i) => {
294
- i.patientUUID === d && i.updatedConcepts.size > 0 && (z(), f.invalidateQueries({ queryKey: ["formsEncounter"] }));
294
+ i.patientUUID === d && i.updatedConcepts.size > 0 && (Y(), f.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
295
295
  },
296
296
  [d]
297
297
  );
298
- const x = g(() => !F || !t?.formName ? [] : He(
299
- F,
298
+ const D = h(() => !L || !t?.formName ? [] : ke(
299
+ L,
300
300
  t.formName
301
- ), [F, t?.formName]), D = g(
301
+ ), [L, t?.formName]), G = h(
302
302
  () => [
303
303
  { key: "recordedOn", header: a("FORM_RECORDED_ON") },
304
304
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
305
305
  ],
306
306
  [a]
307
- ), X = g(
307
+ ), X = h(
308
308
  () => [
309
309
  { key: "recordedOn", sortable: !0 },
310
310
  { key: "recordedBy", sortable: !0 }
311
311
  ],
312
312
  []
313
- ), E = g(() => {
313
+ ), E = h(() => {
314
314
  const i = V.reduce(
315
315
  (u, l) => {
316
316
  const v = l.formName;
@@ -335,32 +335,32 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
335
335
  )
336
336
  })
337
337
  ).sort((u, l) => u.formName.localeCompare(l.formName));
338
- }, [V, a]), G = A((i) => {
338
+ }, [V, a]), x = R((i) => {
339
339
  b(i), m(!0);
340
- }, []), J = A(() => {
340
+ }, []), W = R(() => {
341
341
  m(!1), b(null);
342
- }, []), B = A(
342
+ }, []), B = R(
343
343
  (i, u) => {
344
344
  switch (u) {
345
345
  case "recordedOn":
346
- return /* @__PURE__ */ s(ie, { onClick: () => G(i), children: i.recordedOn });
346
+ return /* @__PURE__ */ s(ie, { onClick: () => x(i), children: i.recordedOn });
347
347
  case "recordedBy":
348
348
  return i.recordedBy;
349
349
  default:
350
350
  return null;
351
351
  }
352
352
  },
353
- [G]
353
+ [x]
354
354
  );
355
- return /* @__PURE__ */ p(P, { children: [
355
+ return /* @__PURE__ */ p(H, { children: [
356
356
  /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: N || y || E.length === 0 || _ ? /* @__PURE__ */ s(
357
357
  U,
358
358
  {
359
- headers: D,
359
+ headers: G,
360
360
  ariaLabel: a("FORMS_HEADING"),
361
361
  rows: [],
362
362
  loading: N,
363
- errorStateMessage: y ? Y?.message : void 0,
363
+ errorStateMessage: y ? z?.message : void 0,
364
364
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
365
365
  renderCell: B,
366
366
  className: o.formsTableBody,
@@ -378,7 +378,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
378
378
  children: /* @__PURE__ */ s(
379
379
  U,
380
380
  {
381
- headers: D,
381
+ headers: G,
382
382
  ariaLabel: a("FORMS_HEADING"),
383
383
  rows: v,
384
384
  loading: !1,
@@ -399,13 +399,13 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
399
399
  {
400
400
  id: "modalIdForActionAreaLayout",
401
401
  open: c,
402
- onRequestClose: J,
402
+ onRequestClose: W,
403
403
  modalHeading: t.formName,
404
404
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
405
405
  passiveModal: !0,
406
406
  size: "md",
407
407
  testId: "form-details-modal",
408
- children: /* @__PURE__ */ s("div", { className: o.formContent, children: Q || W ? /* @__PURE__ */ s(be, { width: "100%", lineCount: 3 }) : S ? /* @__PURE__ */ s("div", { children: q(S).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ s("div", { children: q(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : x.length > 0 ? /* @__PURE__ */ s("div", { className: o.formDetailsContainer, children: x.map(({ obs: i, comment: u }, l) => /* @__PURE__ */ s(
408
+ children: /* @__PURE__ */ s("div", { className: o.formContent, children: Q || J ? /* @__PURE__ */ s(be, { width: "100%", lineCount: 3 }) : S ? /* @__PURE__ */ s("div", { children: q(S).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ s("div", { children: q(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : D.length > 0 ? /* @__PURE__ */ s("div", { className: o.formDetailsContainer, children: D.map(({ obs: i, comment: u }, l) => /* @__PURE__ */ s(
409
409
  qe,
410
410
  {
411
411
  observation: i,
@@ -420,5 +420,5 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
420
420
  ] });
421
421
  };
422
422
  export {
423
- We as default
423
+ Je as default
424
424
  };
@@ -1,25 +1,25 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BbefJEgY.js";
2
- import { l as d, m as f, n as e } from "./index-Bnufarzo.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CTvArhLW.js";
2
+ import { l as d, m as f, o as e } from "./index-Dt74mG6I.js";
3
3
  var p = (a) => {
4
- const [r, t] = c({
4
+ const [r, o] = c({
5
5
  prefix: "TanstackQueryDevtools"
6
6
  }), n = d(), s = f(() => {
7
- const o = r.theme_preference || l;
8
- return o !== "system" ? o : n();
7
+ const t = r.theme_preference || l;
8
+ return t !== "system" ? t : n();
9
9
  });
10
10
  return e(i.Provider, {
11
11
  value: a,
12
12
  get children() {
13
13
  return e(m, {
14
14
  localStore: r,
15
- setLocalStore: t,
15
+ setLocalStore: o,
16
16
  get children() {
17
17
  return e(u.Provider, {
18
18
  value: s,
19
19
  get children() {
20
20
  return e(v, {
21
21
  localStore: r,
22
- setLocalStore: t
22
+ setLocalStore: o
23
23
  });
24
24
  }
25
25
  });
@@ -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-BbefJEgY.js";
2
- import { l as v, m as C, n as e } from "./index-Bnufarzo.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-CTvArhLW.js";
2
+ import { l as v, m as C, o as e } from "./index-Dt74mG6I.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,16 +1,16 @@
1
- import { jsxs as I, jsx as c } from "react/jsx-runtime";
2
- import { h as B, p as V, u as N, j as Q, q as x, e as H, d as K, k as M, t as j, A as w, z, X as G, H as S, Q as P, P as X, L as Y, M as J, x as W } from "./index-Bnufarzo.js";
1
+ import { jsxs as T, jsx as c } from "react/jsx-runtime";
2
+ import { h as B, p as V, u as I, q as x, W as K, e as w, d as z, r as G, n as Q, A as j, z as H, k as M, x as S, t as W, F as P, D as X, N as Y, j as J } from "./index-Dt74mG6I.js";
3
3
  import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
4
4
  import { useRef as te, useEffect as $, useMemo as h } from "react";
5
5
  const A = (t, d, i, l, r) => {
6
- const a = P(t, d), s = a.value, o = X(s);
6
+ const a = W(t, d), s = a.value, o = P(s);
7
7
  let n = s;
8
- o === "Image" && (n = /* @__PURE__ */ c(J, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ c(W, { id: `${s}-video`, videoSrc: s }));
8
+ o === "Image" && (n = /* @__PURE__ */ c(Y, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ c(J, { id: `${s}-video`, videoSrc: s }));
9
9
  const b = r("OBSERVATIONS_RECORDED_BY", {
10
10
  provider: a.provider
11
- }), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", u = l ? `${l}-${v}-${p}-${i}-${d}` : `${v}-${p}-${i}-${d}`;
11
+ }), m = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", u = l ? `${l}-${v}-${m}-${i}-${d}` : `${v}-${m}-${i}-${d}`;
12
12
  return /* @__PURE__ */ c(
13
- Y,
13
+ X,
14
14
  {
15
15
  header: a.header,
16
16
  value: n,
@@ -36,9 +36,9 @@ const A = (t, d, i, l, r) => {
36
36
  groupedData: t,
37
37
  title: d = ""
38
38
  }) => {
39
- const { t: i } = N(), l = (r, a, s) => {
40
- const o = G(r.encounterDetails, i);
41
- return /* @__PURE__ */ I(
39
+ const { t: i } = I(), l = (r, a, s) => {
40
+ const o = M(r.encounterDetails, i);
41
+ return /* @__PURE__ */ T(
42
42
  S,
43
43
  {
44
44
  title: o,
@@ -74,43 +74,43 @@ const A = (t, d, i, l, r) => {
74
74
  )
75
75
  }
76
76
  );
77
- }, se = "_observations_kfbhq_1", oe = "_title_kfbhq_12", T = {
77
+ }, se = "_observations_kfbhq_1", oe = "_title_kfbhq_12", N = {
78
78
  observations: se,
79
79
  title: oe
80
80
  }, ie = (t) => ["conceptUuid", t], ne = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
81
- const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, r = te(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = V(), { t: o } = N(), n = Z({
81
+ const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, r = te(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = V(), { t: o } = I(), n = Z({
82
82
  queries: i.map((e) => ({
83
83
  queryKey: ie(e),
84
- queryFn: () => Q(e),
84
+ queryFn: () => x(e),
85
85
  enabled: !!e
86
86
  }))
87
87
  });
88
88
  $(() => {
89
- n.forEach((e, m) => {
90
- if (e.isError && !r.current.has(m)) {
91
- const C = i[m];
89
+ n.forEach((e, p) => {
90
+ if (e.isError && !r.current.has(p)) {
91
+ const C = i[p];
92
92
  s({
93
93
  title: o("ERROR_DEFAULT_TITLE"),
94
94
  message: o("ERROR_FETCHING_CONCEPT", { conceptName: C }),
95
95
  type: "error"
96
- }), r.current.add(m);
97
- } else e.isError || r.current.delete(m);
96
+ }), r.current.add(p);
97
+ } else e.isError || r.current.delete(p);
98
98
  });
99
99
  }, [n, i]);
100
- const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
100
+ const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), m = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
101
101
  data: u,
102
- isLoading: L,
102
+ isLoading: D,
103
103
  isError: R,
104
104
  refetch: g
105
105
  } = ee({
106
- queryKey: ne(a, p),
107
- queryFn: () => x(a, p),
108
- enabled: !!a && p.length > 0 && v
106
+ queryKey: ne(a, m),
107
+ queryFn: () => K(a, m),
108
+ enabled: !!a && m.length > 0 && v
109
109
  });
110
- H(
110
+ w(
111
111
  (e) => {
112
112
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
113
- (m) => p.includes(m)
113
+ (p) => m.includes(p)
114
114
  ) && g();
115
115
  },
116
116
  [a, g]
@@ -123,39 +123,39 @@ const A = (t, d, i, l, r) => {
123
123
  }, [R]);
124
124
  const f = h(() => {
125
125
  if (!u) return [];
126
- const e = K(u), m = M(e);
127
- return j(m);
128
- }, [u]), q = [
126
+ const e = z(u), p = G(e);
127
+ return Q(p);
128
+ }, [u]), F = [
129
129
  { key: "name", header: "name" },
130
130
  { key: "value", header: "value" },
131
131
  { key: "form", header: "form" }
132
- ], O = L || !v, _ = R && v, D = (!u || u.entry?.length === 0 || p.length === 0) && v, F = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = D ? o("NO_OBSERVATIONS_FOUND") : void 0, k = f.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
133
- return /* @__PURE__ */ I(
132
+ ], O = D || !v, _ = R && v, q = (!u || u.entry?.length === 0 || m.length === 0) && v, L = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? o("NO_OBSERVATIONS_FOUND") : void 0, k = f.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
133
+ return /* @__PURE__ */ T(
134
134
  "div",
135
135
  {
136
136
  id: "observations",
137
137
  "data-testid": E ? `observations-${y}` : "observations",
138
138
  "aria-label": "observations-aria-label",
139
- className: T.observations,
139
+ className: N.observations,
140
140
  children: [
141
141
  /* @__PURE__ */ c(
142
- w,
142
+ j,
143
143
  {
144
144
  id: "observations-title",
145
145
  testId: E ? `observations-title-${y}` : "observations-title",
146
146
  title: y,
147
- className: T.title,
147
+ className: N.title,
148
148
  children: /* @__PURE__ */ c("p", { children: y })
149
149
  }
150
150
  ),
151
151
  k ? /* @__PURE__ */ c(re, { groupedData: f, title: y }) : /* @__PURE__ */ c(
152
- z,
152
+ H,
153
153
  {
154
- headers: q,
154
+ headers: F,
155
155
  rows: [],
156
156
  ariaLabel: o("OBSERVATIONS"),
157
157
  loading: O,
158
- errorStateMessage: F,
158
+ errorStateMessage: L,
159
159
  emptyStateMessage: U,
160
160
  dataTestId: "observations-table"
161
161
  }