@bahmni/widgets 0.0.1-dev.184 → 0.0.1-dev.186

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,30 +1,30 @@
1
- import { jsxs as b, jsx as n, Fragment as H } from "react/jsx-runtime";
2
- import { d as M, Q as re, e as te, f as ae, r as oe, g as se, Y as ne, u as de, A as ie, M as le, L as ce, h as me, O as ue, K as pe, k as be, P as fe, _ as U, j as _e, G as he, b as $e, T as ye, l as k, c as ge } from "./index--PbXuF2w.js";
3
- import { useQueryClient as ve, useQuery as L } from "@tanstack/react-query";
4
- import { useState as x, useMemo as g, useCallback as F } from "react";
1
+ import { jsxs as b, jsx as n, Fragment as k } from "react/jsx-runtime";
2
+ import { d as M, Z as re, o as te, e as ae, l as oe, f as se, J as ne, u as de, N as ie, q as le, g as ce, x as me, P as ue, X as pe, M as be, j as fe, s as P, G as _e, Y as $e, b as ye, O as he, T as U, c as ge } from "./index-BpiNllc0.js";
3
+ import { useQueryClient as ve, useQuery as F } from "@tanstack/react-query";
4
+ import { useState as H, useMemo as g, useCallback as L } from "react";
5
5
  import { useTranslation as Ne } from "react-i18next";
6
- const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe = "_formContent_1pd36_18", Me = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Te = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", De = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ae = "_groupMembers_1pd36_75", Ie = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Be = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", Pe = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", ke = "_nestedGroupMembers_1pd36_141", o = {
6
+ const Oe = "_formsTableBody_1pd36_1", Fe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Me = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", we = "_rowContainer_1pd36_43", De = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Be = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", qe = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Pe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
7
7
  formsTableBody: Oe,
8
- customAccordianItem: Le,
9
- formContent: Fe,
8
+ customAccordianItem: Fe,
9
+ formContent: Le,
10
10
  formDetailsContainer: Me,
11
11
  observation: Re,
12
12
  groupContainer: Ce,
13
- rowContainer: Te,
14
- groupLabel: we,
15
- rowLabel: De,
13
+ rowContainer: we,
14
+ groupLabel: De,
15
+ rowLabel: Te,
16
16
  rowValue: Ve,
17
- groupMembers: Ae,
18
- memberRow: Ie,
17
+ groupMembers: Ie,
18
+ memberRow: Ae,
19
19
  memberLabel: Ee,
20
20
  memberValue: Be,
21
21
  abnormalValue: Ge,
22
22
  commentSection: Se,
23
- commentText: Pe,
24
- nestedGroup: qe,
25
- nestedGroupLabel: Ue,
26
- nestedGroupMembers: ke
27
- }, K = (e) => {
23
+ commentText: qe,
24
+ nestedGroup: xe,
25
+ nestedGroupLabel: Pe,
26
+ nestedGroupMembers: Ue
27
+ }, j = (e) => {
28
28
  const r = re(e);
29
29
  return r === "Image" ? /* @__PURE__ */ n(
30
30
  te,
@@ -34,7 +34,7 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
34
34
  id: `${e}-img`
35
35
  }
36
36
  ) : r === "Video" ? /* @__PURE__ */ n(ae, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ n(oe, { id: `${e}-pdf`, src: e }) : e;
37
- }, j = (e) => {
37
+ }, K = (e) => {
38
38
  const r = e.observationValue?.unit, a = e.observationValue?.referenceRange?.low?.value, d = e.observationValue?.referenceRange?.high?.value, s = a != null, c = d != null, i = s && c ? ` (${a} - ${d})` : s ? ` (>${a})` : c ? ` (<${d})` : "", t = e.observationValue?.isAbnormal === !0;
39
39
  return { units: r, rangeString: i, isAbnormal: t };
40
40
  }, Q = ({
@@ -81,8 +81,8 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
81
81
  ]
82
82
  }
83
83
  );
84
- const { units: p, rangeString: y, isAbnormal: f } = j(e), _ = e.observationValue?.value?.toString(), h = _ ? K(_) : null;
85
- return /* @__PURE__ */ b(H, { children: [
84
+ const { units: p, rangeString: h, isAbnormal: f } = K(e), _ = e.observationValue?.value?.toString(), $ = _ ? j(_) : null;
85
+ return /* @__PURE__ */ b(k, { children: [
86
86
  /* @__PURE__ */ b(
87
87
  "div",
88
88
  {
@@ -100,7 +100,7 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
100
100
  "data-testid": `${t}obs-member-label-${i}-${a}`,
101
101
  children: [
102
102
  i,
103
- y
103
+ h
104
104
  ]
105
105
  }
106
106
  ),
@@ -113,7 +113,7 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
113
113
  ),
114
114
  "data-testid": `${t}obs-member-value-${i}-${a}`,
115
115
  children: [
116
- h,
116
+ $,
117
117
  p && ` ${p}`
118
118
  ]
119
119
  }
@@ -134,13 +134,13 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
134
134
  }
135
135
  )
136
136
  ] });
137
- }, xe = ({
137
+ }, He = ({
138
138
  observation: e,
139
139
  index: r,
140
140
  formName: a = "",
141
141
  comment: d
142
142
  }) => {
143
- const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: t } = j(e), p = a ? `${a}-` : "", y = e.observationValue?.value?.toString(), f = y ? K(y) : null;
143
+ const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: t } = K(e), p = a ? `${a}-` : "", h = e.observationValue?.value?.toString(), f = h ? j(h) : null;
144
144
  return /* @__PURE__ */ b(
145
145
  "div",
146
146
  {
@@ -172,12 +172,12 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
172
172
  {
173
173
  className: o.groupMembers,
174
174
  "data-testid": `${p}observation-group-members-${e.display}-${r}`,
175
- children: e.members?.map((_, h) => /* @__PURE__ */ n(
175
+ children: e.members?.map((_, $) => /* @__PURE__ */ n(
176
176
  Q,
177
177
  {
178
178
  member: _,
179
179
  depth: 0,
180
- memberIndex: h,
180
+ memberIndex: $,
181
181
  formName: a
182
182
  },
183
183
  `${_.id}`
@@ -215,16 +215,16 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
215
215
  },
216
216
  `${e.id}-${r}`
217
217
  );
218
- }, He = (e) => e ? e.extension?.find(
218
+ }, ke = (e) => e ? e.extension?.find(
219
219
  (a) => a.url === ne
220
- )?.valueString : void 0, Ke = (e) => {
220
+ )?.valueString : void 0, je = (e) => {
221
221
  if (e)
222
222
  return e.note?.[0]?.text;
223
- }, je = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, w = (e, r) => {
224
- const a = je(e, r);
223
+ }, Ke = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, D = (e, r) => {
224
+ const a = Ke(e, r);
225
225
  return a ? {
226
- formFieldPath: He(a),
227
- comment: Ke(a)
226
+ formFieldPath: ke(a),
227
+ comment: je(a)
228
228
  } : {};
229
229
  }, Qe = (e, r) => {
230
230
  if (!e?.entry || !r)
@@ -232,60 +232,60 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
232
232
  const a = se(e);
233
233
  return [
234
234
  ...a.observations.map((s) => {
235
- const { formFieldPath: c, comment: i } = w(
235
+ const { formFieldPath: c, comment: i } = D(
236
236
  e,
237
237
  s.id
238
238
  );
239
239
  return { obs: s, formFieldPath: c, comment: i };
240
240
  }),
241
241
  ...a.groupedObservations.flatMap((s) => {
242
- const { formFieldPath: c } = w(e, s.id);
242
+ const { formFieldPath: c } = D(e, s.id);
243
243
  return (s.members ?? []).map((i) => {
244
- const { comment: t } = w(e, i.id);
244
+ const { comment: t } = D(e, i.id);
245
245
  return { obs: i, formFieldPath: c, comment: t };
246
246
  });
247
247
  })
248
248
  ].filter(
249
249
  ({ formFieldPath: s }) => !s || s.includes(r)
250
250
  );
251
- }, Ze = ({
251
+ }, We = ({
252
252
  episodeOfCareUuids: e,
253
253
  encounterUuids: r,
254
254
  config: a
255
255
  }) => {
256
- const { t: d } = Ne(), s = de(), [c, i] = x(!1), [t, p] = x(null), y = a?.numberOfVisits, f = ie(
256
+ const { t: d } = Ne(), s = de(), [c, i] = H(!1), [t, p] = H(null), h = a?.numberOfVisits, f = ie(
257
257
  e,
258
258
  r
259
259
  ), _ = ve(), {
260
- data: h = [],
260
+ data: $ = [],
261
261
  isLoading: v,
262
262
  isError: N,
263
263
  error: Y,
264
264
  refetch: z
265
- } = L({
265
+ } = F({
266
266
  queryKey: ["forms", s, e],
267
- queryFn: () => le(s, void 0, y),
267
+ queryFn: () => le(s, void 0, h),
268
268
  enabled: !!s && !f
269
- }), D = g(() => !r || r.length === 0 ? h : h.filter(
269
+ }), T = g(() => !r || r.length === 0 ? $ : $.filter(
270
270
  (l) => r.includes(l.encounterUuid)
271
- ), [h, r]), { data: V = [] } = L({
271
+ ), [$, r]), { data: V = [] } = F({
272
272
  queryKey: ["observationForms"],
273
273
  queryFn: () => ce()
274
- }), A = F(
274
+ }), I = L(
275
275
  (l) => V.find((m) => m.name === l)?.uuid,
276
276
  [V]
277
277
  ), R = g(() => {
278
278
  if (t)
279
- return A(t.formName);
280
- }, [t, A]), { isLoading: W, error: I } = L({
279
+ return I(t.formName);
280
+ }, [t, I]), { isLoading: J, error: A } = F({
281
281
  queryKey: ["formMetadata", R],
282
282
  queryFn: () => me(R),
283
283
  enabled: !!R && c
284
284
  }), {
285
285
  data: C,
286
- isLoading: J,
286
+ isLoading: X,
287
287
  error: E
288
- } = L({
288
+ } = F({
289
289
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
290
290
  queryFn: () => ue(t.encounterUuid),
291
291
  enabled: !!t?.encounterUuid && c
@@ -305,23 +305,23 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
305
305
  { key: "recordedBy", header: d("FORM_RECORDED_BY") }
306
306
  ],
307
307
  [d]
308
- ), X = g(
308
+ ), Z = g(
309
309
  () => [
310
310
  { key: "recordedOn", sortable: !0 },
311
311
  { key: "recordedBy", sortable: !0 }
312
312
  ],
313
313
  []
314
314
  ), S = g(() => {
315
- const l = D.reduce(
315
+ const l = T.reduce(
316
316
  (m, u) => {
317
317
  const O = u.formName;
318
318
  m[O] ??= [];
319
- const T = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
319
+ const w = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
320
320
  return m[O].push({
321
321
  id: u.encounterUuid,
322
322
  formName: u.formName,
323
323
  recordedOn: be(u.encounterDateTime, d, ge).formattedResult,
324
- recordedBy: T ?? "--",
324
+ recordedBy: w ?? "--",
325
325
  encounterDateTime: u.encounterDateTime,
326
326
  encounterUuid: u.encounterUuid
327
327
  }), m;
@@ -332,30 +332,30 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
332
332
  ([m, u]) => ({
333
333
  formName: m,
334
334
  records: u.sort(
335
- (O, T) => T.encounterDateTime - O.encounterDateTime
335
+ (O, w) => w.encounterDateTime - O.encounterDateTime
336
336
  )
337
337
  })
338
338
  ).sort((m, u) => m.formName.localeCompare(u.formName));
339
- }, [D, d]), P = F((l) => {
339
+ }, [T, d]), q = L((l) => {
340
340
  p(l), i(!0);
341
- }, []), Z = F(() => {
341
+ }, []), W = L(() => {
342
342
  i(!1), p(null);
343
- }, []), q = F(
344
- (l, $) => {
345
- switch ($) {
343
+ }, []), x = L(
344
+ (l, y) => {
345
+ switch (y) {
346
346
  case "recordedOn":
347
- return /* @__PURE__ */ n(fe, { onClick: () => P(l), children: l.recordedOn });
347
+ return /* @__PURE__ */ n(fe, { onClick: () => q(l), children: l.recordedOn });
348
348
  case "recordedBy":
349
349
  return l.recordedBy;
350
350
  default:
351
351
  return null;
352
352
  }
353
353
  },
354
- [P]
354
+ [q]
355
355
  );
356
- return /* @__PURE__ */ b(H, { children: [
356
+ return /* @__PURE__ */ b(k, { children: [
357
357
  /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: v || N || S.length === 0 || f ? /* @__PURE__ */ n(
358
- U,
358
+ P,
359
359
  {
360
360
  headers: G,
361
361
  ariaLabel: d("FORMS_HEADING"),
@@ -363,30 +363,30 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
363
363
  loading: v,
364
364
  errorStateMessage: N ? Y?.message : void 0,
365
365
  emptyStateMessage: d("FORMS_UNAVAILABLE"),
366
- renderCell: q,
366
+ renderCell: x,
367
367
  className: o.formsTableBody,
368
368
  dataTestId: "forms-table"
369
369
  }
370
- ) : /* @__PURE__ */ n(_e, { align: "start", children: S.map((l, $) => {
370
+ ) : /* @__PURE__ */ n(_e, { align: "start", children: S.map((l, y) => {
371
371
  const { formName: m, records: u } = l;
372
372
  return /* @__PURE__ */ n(
373
- he,
373
+ $e,
374
374
  {
375
375
  title: m,
376
376
  className: o.customAccordianItem,
377
377
  testId: `accordian-title-${m}`,
378
- open: $ === 0,
378
+ open: y === 0,
379
379
  children: /* @__PURE__ */ n(
380
- U,
380
+ P,
381
381
  {
382
382
  headers: G,
383
383
  ariaLabel: d("FORMS_HEADING"),
384
384
  rows: u,
385
385
  loading: !1,
386
386
  errorStateMessage: "",
387
- sortable: X,
387
+ sortable: Z,
388
388
  emptyStateMessage: d("FORMS_UNAVAILABLE"),
389
- renderCell: q,
389
+ renderCell: x,
390
390
  className: o.formsTableBody,
391
391
  dataTestId: `forms-table-${m}`
392
392
  }
@@ -396,24 +396,24 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
396
396
  );
397
397
  }) }) }),
398
398
  c && t && /* @__PURE__ */ n(
399
- $e,
399
+ ye,
400
400
  {
401
401
  id: "modalIdForActionAreaLayout",
402
402
  portalId: "main-display-area",
403
403
  open: c,
404
- onRequestClose: Z,
404
+ onRequestClose: W,
405
405
  modalHeading: t.formName,
406
406
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
407
407
  passiveModal: !0,
408
408
  size: "md",
409
409
  testId: "form-details-modal",
410
- children: /* @__PURE__ */ n("div", { className: o.formContent, children: W || J ? /* @__PURE__ */ n(ye, { width: "100%", lineCount: 3 }) : I ? /* @__PURE__ */ n("div", { children: k(I).message ?? d("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ n("div", { children: k(E).message ?? d("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ n("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: $ }, m) => /* @__PURE__ */ n(
411
- xe,
410
+ children: /* @__PURE__ */ n("div", { className: o.formContent, children: J || X ? /* @__PURE__ */ n(he, { width: "100%", lineCount: 3 }) : A ? /* @__PURE__ */ n("div", { children: U(A).message ?? d("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ n("div", { children: U(E).message ?? d("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ n("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: y }, m) => /* @__PURE__ */ n(
411
+ He,
412
412
  {
413
413
  observation: l,
414
414
  index: m,
415
415
  formName: t.formName,
416
- comment: $
416
+ comment: y
417
417
  },
418
418
  `${l.id}`
419
419
  )) }) : /* @__PURE__ */ n("div", { children: d("NO_FORM_DATA_AVAILABLE") }) })
@@ -422,5 +422,5 @@ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe =
422
422
  ] });
423
423
  };
424
424
  export {
425
- Ze as default
425
+ We as default
426
426
  };
@@ -1,17 +1,17 @@
1
1
  import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
- import { m as K, n as C, t as Q, Q as w, o as M, e as V, f as k, r as G, u as P, a as H, q as j, R as z, K as Y, g as J, p as W, s as X, v as Z, _ as x } from "./index--PbXuF2w.js";
2
+ import { h as k, k as C, t as M, Z as V, m as q, o as K, e as Q, l as G, u as P, a as j, n as H, p as X, X as Z, f as z, r as Y, v as J, w as W, s as x } from "./index-BpiNllc0.js";
3
3
  import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as E } from "react";
5
5
  import { useTranslation as D } from "react-i18next";
6
6
  const U = (t, c, i, l, a) => {
7
- const s = Q(t, c), o = s.value, r = w(o);
7
+ const s = M(t, c), o = s.value, r = V(o);
8
8
  let n = o;
9
- r === "Image" && (n = /* @__PURE__ */ d(V, { imageSrc: o, alt: o, id: `${o}-img` })), r === "Video" && (n = /* @__PURE__ */ d(k, { id: `${o}-video`, videoSrc: o })), r === "PDF" && (n = /* @__PURE__ */ d(G, { id: `${o}-pdf`, src: o }));
9
+ r === "Image" && (n = /* @__PURE__ */ d(K, { imageSrc: o, alt: o, id: `${o}-img` })), r === "Video" && (n = /* @__PURE__ */ d(Q, { id: `${o}-video`, videoSrc: o })), r === "PDF" && (n = /* @__PURE__ */ d(G, { id: `${o}-pdf`, src: o }));
10
10
  const u = a("OBSERVATIONS_RECORDED_BY", {
11
11
  provider: s.provider
12
12
  }), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${p}-${b}-${i}-${c}` : `${p}-${b}-${i}-${c}`;
13
13
  return /* @__PURE__ */ d(
14
- M,
14
+ q,
15
15
  {
16
16
  header: s.header,
17
17
  value: n,
@@ -38,7 +38,7 @@ const U = (t, c, i, l, a) => {
38
38
  title: c = ""
39
39
  }) => {
40
40
  const { t: i } = D(), l = (a, s, o) => {
41
- const r = K(a.encounterDetails, i);
41
+ const r = k(a.encounterDetails, i);
42
42
  return /* @__PURE__ */ S(
43
43
  C,
44
44
  {
@@ -79,10 +79,10 @@ const U = (t, c, i, l, a) => {
79
79
  observations: ae,
80
80
  title: ne
81
81
  }, ie = (t) => ["conceptUuid", t], ce = (t, c) => ["observations", t, ...c], me = ({ config: t }) => {
82
- const c = t, { conceptNames: i = [], conceptUuid: l = [] } = c, a = se(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = H(), { t: r } = D(), n = ee({
82
+ const c = t, { conceptNames: i = [], conceptUuid: l = [] } = c, a = se(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = j(), { t: r } = D(), n = ee({
83
83
  queries: i.map((e) => ({
84
84
  queryKey: ie(e),
85
- queryFn: () => j(e),
85
+ queryFn: () => H(e),
86
86
  enabled: !!e
87
87
  }))
88
88
  });
@@ -102,19 +102,19 @@ const U = (t, c, i, l, a) => {
102
102
  data: p,
103
103
  isLoading: f,
104
104
  isError: O,
105
- refetch: R
105
+ refetch: T
106
106
  } = te({
107
107
  queryKey: ce(s, b),
108
- queryFn: () => z(s, b),
108
+ queryFn: () => X(s, b),
109
109
  enabled: !!s && b.length > 0 && v
110
110
  });
111
- Y(
111
+ Z(
112
112
  (e) => {
113
113
  e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
114
114
  (g) => b.includes(g)
115
- ) && R();
115
+ ) && T();
116
116
  },
117
- [s, R]
117
+ [s, T]
118
118
  ), $(() => {
119
119
  O && o({
120
120
  title: r("ERROR_DEFAULT_TITLE"),
@@ -122,15 +122,15 @@ const U = (t, c, i, l, a) => {
122
122
  type: "error"
123
123
  });
124
124
  }, [O]);
125
- const T = E(() => {
125
+ const R = E(() => {
126
126
  if (!p) return [];
127
- const e = J(p), m = W(e);
128
- return X(m);
127
+ const e = z(p), m = Y(e);
128
+ return J(m);
129
129
  }, [p]), B = [
130
130
  { key: "name", header: "name" },
131
131
  { key: "value", header: "value" },
132
132
  { key: "form", header: "form" }
133
- ], _ = f || !v, I = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = I ? r("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? r("NO_OBSERVATIONS_FOUND") : void 0, q = T.length > 0 && !_ && !I, h = c.titleTranslationKey, y = h ? r(h) : "";
133
+ ], I = f || !v, _ = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? r("ERROR_FETCHING_OBSERVATIONS") : null, w = A ? r("NO_OBSERVATIONS_FOUND") : void 0, L = R.length > 0 && !I && !_, h = c.titleTranslationKey, y = h ? r(h) : "";
134
134
  return /* @__PURE__ */ S(
135
135
  "div",
136
136
  {
@@ -140,7 +140,7 @@ const U = (t, c, i, l, a) => {
140
140
  className: N.observations,
141
141
  children: [
142
142
  /* @__PURE__ */ d(
143
- Z,
143
+ W,
144
144
  {
145
145
  id: "observations-title",
146
146
  testId: h ? `observations-title-${y}` : "observations-title",
@@ -149,15 +149,15 @@ const U = (t, c, i, l, a) => {
149
149
  children: /* @__PURE__ */ d("p", { children: y })
150
150
  }
151
151
  ),
152
- q ? /* @__PURE__ */ d(re, { groupedData: T, title: y }) : /* @__PURE__ */ d(
152
+ L ? /* @__PURE__ */ d(re, { groupedData: R, title: y }) : /* @__PURE__ */ d(
153
153
  x,
154
154
  {
155
155
  headers: B,
156
156
  rows: [],
157
157
  ariaLabel: r("OBSERVATIONS"),
158
- loading: _,
158
+ loading: I,
159
159
  errorStateMessage: F,
160
- emptyStateMessage: L,
160
+ emptyStateMessage: w,
161
161
  dataTestId: "observations-table"
162
162
  }
163
163
  )
@@ -62650,7 +62650,7 @@ const Qn = "/openmrs/auth?requested_document=/document_images/", Uct = "_thumbna
62650
62650
  }
62651
62651
  )
62652
62652
  ] });
62653
- }, Gct = "_fileTileButton_1l0yx_1", Jct = "_modalIframeContainer_1l0yx_28", Xct = "_modalIframe_1l0yx_28", nc = {
62653
+ }, Gct = "_fileTileButton_io1kl_1", Jct = "_modalIframeContainer_io1kl_28", Xct = "_modalIframe_io1kl_28", nc = {
62654
62654
  fileTileButton: Gct,
62655
62655
  modalIframeContainer: Jct,
62656
62656
  modalIframe: Xct
@@ -95446,10 +95446,10 @@ const iCt = () => {
95446
95446
  "useActivePractitioner must be used within ActivePractitionerProvider"
95447
95447
  );
95448
95448
  return r;
95449
- }, czt = "_emptyState_tom6f_1", hzt = "_emptyStateTitle_tom6f_6", dzt = "_emptyStateBody_tom6f_14", Zc = {
95450
- emptyState: czt,
95451
- emptyStateTitle: hzt,
95452
- emptyStateBody: dzt
95449
+ }, czt = "_errorState_15v6j_1", hzt = "_errorStateTitle_15v6j_6", dzt = "_errorStateBody_15v6j_14", Zc = {
95450
+ errorState: czt,
95451
+ errorStateTitle: hzt,
95452
+ errorStateBody: dzt
95453
95453
  };
95454
95454
  function sCt(r) {
95455
95455
  const {
@@ -95477,7 +95477,7 @@ function sCt(r) {
95477
95477
  id: `${i}-error`,
95478
95478
  "data-testid": `${i}-error-test-id`,
95479
95479
  "aria-label": f("ERROR_CONFIG_TITLE", { config: s }),
95480
- className: Zc.emptyState,
95480
+ className: Zc.errorState,
95481
95481
  children: [
95482
95482
  /* @__PURE__ */ ae(
95483
95483
  C3,
@@ -95486,7 +95486,7 @@ function sCt(r) {
95486
95486
  md: 8,
95487
95487
  lg: 16,
95488
95488
  xlg: 16,
95489
- className: Zc.emptyStateTitle,
95489
+ className: Zc.errorStateTitle,
95490
95490
  children: f("ERROR_CONFIG_TITLE", { config: s })
95491
95491
  }
95492
95492
  ),
@@ -95497,7 +95497,7 @@ function sCt(r) {
95497
95497
  md: 8,
95498
95498
  lg: 16,
95499
95499
  xlg: 16,
95500
- className: Zc.emptyStateBody,
95500
+ className: Zc.errorStateBody,
95501
95501
  children: f("ERROR_CONFIG_GENERIC_MESSAGE", { config: s })
95502
95502
  }
95503
95503
  )
@@ -95542,7 +95542,7 @@ const uzt = [
95542
95542
  },
95543
95543
  {
95544
95544
  type: "patientDocuments",
95545
- component: J1(() => import("./DocumentsTable-CDZQ6GOb.js"))
95545
+ component: J1(() => import("./DocumentsTable-CvuLG_h7.js"))
95546
95546
  },
95547
95547
  {
95548
95548
  type: "flowSheet",
@@ -95550,7 +95550,7 @@ const uzt = [
95550
95550
  },
95551
95551
  {
95552
95552
  type: "forms",
95553
- component: J1(() => import("./FormsTable-A2NBji_5.js"))
95553
+ component: J1(() => import("./FormsTable-B4YN4flO.js"))
95554
95554
  },
95555
95555
  {
95556
95556
  type: "labOrders",
@@ -95558,7 +95558,7 @@ const uzt = [
95558
95558
  },
95559
95559
  {
95560
95560
  type: "observations",
95561
- component: J1(() => import("./Observations-BuA-9JTj.js"))
95561
+ component: J1(() => import("./Observations-o12chqhF.js"))
95562
95562
  },
95563
95563
  {
95564
95564
  type: "ordersControl",
@@ -95631,33 +95631,33 @@ const cCt = (r) => {
95631
95631
  };
95632
95632
  export {
95633
95633
  szt as $,
95634
- sl as A,
95635
- zAt as B,
95634
+ $Mt as A,
95635
+ INt as B,
95636
95636
  sNt as C,
95637
95637
  fNt as D,
95638
95638
  wAt as E,
95639
- o_t as F,
95640
- wNe as G,
95641
- Z_t as H,
95639
+ Z_t as F,
95640
+ mNe as G,
95641
+ q_t as H,
95642
95642
  T as I,
95643
- Jzt as J,
95644
- Sr as K,
95645
- Kzt as L,
95646
- Gzt as M,
95647
- q_t as N,
95648
- qzt as O,
95649
- T3 as P,
95650
- jzt as Q,
95651
- Uzt as R,
95643
+ Wzt as J,
95644
+ aCt as K,
95645
+ o_t as L,
95646
+ j1 as M,
95647
+ sl as N,
95648
+ Hzt as O,
95649
+ qzt as P,
95650
+ Jzt as Q,
95651
+ zAt as R,
95652
95652
  oCt as S,
95653
- Hzt as T,
95654
- aCt as U,
95653
+ Y1 as T,
95654
+ yMt as U,
95655
95655
  C_t as V,
95656
- yMt as W,
95657
- Qzt as X,
95658
- Wzt as Y,
95659
- Y_t as Z,
95660
- a0 as _,
95656
+ Qzt as W,
95657
+ Sr as X,
95658
+ wNe as Y,
95659
+ jzt as Z,
95660
+ Y_t as _,
95661
95661
  p0 as a,
95662
95662
  lzt as a0,
95663
95663
  iCt as a1,
@@ -95674,26 +95674,26 @@ export {
95674
95674
  Y0 as b,
95675
95675
  jAe as c,
95676
95676
  gt as d,
95677
- Mzt as e,
95678
- xzt as f,
95679
- JNt as g,
95680
- Yzt as h,
95677
+ xzt as e,
95678
+ JNt as f,
95679
+ Kzt as g,
95680
+ eCt as h,
95681
95681
  O as i,
95682
- mNe as j,
95683
- j1 as k,
95684
- Y1 as l,
95685
- eCt as m,
95686
- yzt as n,
95687
- Act as o,
95688
- rCt as p,
95689
- Fzt as q,
95690
- bzt as r,
95691
- nCt as s,
95682
+ T3 as j,
95683
+ yzt as k,
95684
+ bzt as l,
95685
+ Act as m,
95686
+ Fzt as n,
95687
+ Mzt as o,
95688
+ Uzt as p,
95689
+ Gzt as q,
95690
+ rCt as r,
95691
+ a0 as s,
95692
95692
  tCt as t,
95693
95693
  M0 as u,
95694
- $5 as v,
95695
- Xzt as w,
95696
- $Mt as x,
95697
- Cxt as y,
95698
- INt as z
95694
+ nCt as v,
95695
+ $5 as w,
95696
+ Yzt as x,
95697
+ Xzt as y,
95698
+ Cxt as z
95699
95699
  };