@bahmni/clinical-app 0.0.1-dev.266 → 0.0.1-dev.267

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 { d as K, u as Q, a as W, b as J, c as X, m as Z, e as ee, r as te, F as ae } from "./index-BGOFo-Uw.js";
2
+ import { d as K, u as Q, a as W, b as J, c as X, m as Z, e as ee, r as te, F as ae } from "./index-BtzcJ4Ep.js";
3
3
  import { useState as m, 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", me = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -1,30 +1,30 @@
1
1
  import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as Z, d as ee, f as re, g as ae, b as c, X as te, R as v, m as oe, c as se, e as U, A as ne, _ as de, r as ie, Y as ue, I as me, j as le, B as ce, P as fe, k as ye } from "./index-BGOFo-Uw.js";
2
+ import { u as Z, d as ee, f as re, g as ae, b as c, X as te, R as v, m as oe, c as se, e as U, A as ne, _ as de, r as ie, Y as ue, I as me, j as le, B as ce, P as fe, k as ye } from "./index-BtzcJ4Ep.js";
3
3
  import { useState as S, useMemo as d, useCallback as f } from "react";
4
4
  const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A = {
5
5
  formsTableBody: pe,
6
6
  customAccordianItem: be
7
7
  }, ge = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
- )?.valueString : void 0, Oe = ({
9
+ )?.valueString : void 0, he = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
12
  config: C
13
13
  }) => {
14
- const { t: o } = Z(), m = ee(), [l, O] = S(!1), [t, h] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
14
+ const { t: o } = Z(), m = ee(), [l, h] = S(!1), [t, O] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
15
15
  u,
16
16
  n
17
17
  ), H = ae(), {
18
18
  data: y = [],
19
19
  isLoading: _,
20
- isError: T,
20
+ isError: E,
21
21
  error: K,
22
22
  refetch: x
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
25
  queryFn: () => le(m, void 0, k),
26
26
  enabled: !!m && !B
27
- }), E = d(() => !n || n.length === 0 ? y : y.filter(
27
+ }), T = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
29
  ), [y, n]), { data: R = [] } = c({
30
30
  queryKey: ["observationForms"],
@@ -80,7 +80,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
80
80
  ],
81
81
  []
82
82
  ), M = d(() => {
83
- const e = E.reduce(
83
+ const e = T.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
@@ -104,10 +104,10 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
- }, [E, o]), D = f((e) => {
108
- h(e), O(!0);
107
+ }, [T, o]), D = f((e) => {
108
+ O(e), h(!0);
109
109
  }, []), G = f(() => {
110
- O(!1), h(null);
110
+ h(!1), O(null);
111
111
  }, []), q = f(
112
112
  (e, r) => {
113
113
  switch (r) {
@@ -122,14 +122,14 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
122
122
  [D]
123
123
  );
124
124
  return /* @__PURE__ */ J(W, { children: [
125
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || T || M.length === 0 || B ? /* @__PURE__ */ s(
125
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || E || M.length === 0 || B ? /* @__PURE__ */ s(
126
126
  U,
127
127
  {
128
128
  headers: L,
129
129
  ariaLabel: o("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: _,
132
- errorStateMessage: T ? K?.message : void 0,
132
+ errorStateMessage: E ? K?.message : void 0,
133
133
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
134
134
  renderCell: q,
135
135
  className: A.formsTableBody,
@@ -192,5 +192,5 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
192
192
  ] });
193
193
  };
194
194
  export {
195
- Oe as default
195
+ he as default
196
196
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CRgshthb.js";
2
- import { n as p, o as d, p as e } from "./index-BGOFo-Uw.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CVTL7vE4.js";
2
+ import { n as p, o as d, p as e } from "./index-BtzcJ4Ep.js";
3
3
  var f = (a) => {
4
4
  const [r, o] = 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-CRgshthb.js";
2
- import { n as v, o as C, p as e } from "./index-BGOFo-Uw.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-CVTL7vE4.js";
2
+ import { n as v, o as C, p as e } from "./index-BtzcJ4Ep.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,6 +1,6 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { d as V, a as w, u as S, h as q, $ as G, b as H, X as Q, i as X, G as k, J as M, x as W, e as j, W as J, E as D, K as P, v as Y, l as Z, H as z, D as ee, N as ae, Z as te } from "./index-BGOFo-Uw.js";
3
- import { useRef as se, useEffect as O, useMemo as R } from "react";
2
+ import { d as V, a as w, u as S, h as q, $ as G, b as H, X as Q, i as X, G as k, J as M, x as W, e as j, W as J, E as D, K as P, v as Y, l as Z, H as z, D as ee, N as ae, Z as te } from "./index-BtzcJ4Ep.js";
3
+ import { useRef as se, useEffect as f, useMemo as R } from "react";
4
4
  const F = (a, n, d, l, p, r) => {
5
5
  const t = P(a, n, p), s = t.value, i = Y(s);
6
6
  let o = s;
@@ -119,7 +119,7 @@ const F = (a, n, d, l, p, r) => {
119
119
  enabled: !!e
120
120
  }))
121
121
  });
122
- O(() => {
122
+ f(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
125
  const K = d[h];
@@ -148,7 +148,7 @@ const F = (a, n, d, l, p, r) => {
148
148
  ) && g();
149
149
  },
150
150
  [t, g]
151
- ), O(() => {
151
+ ), f(() => {
152
152
  T && s({
153
153
  title: i("ERROR_DEFAULT_TITLE"),
154
154
  message: i("ERROR_FETCHING_OBSERVATIONS"),
@@ -163,7 +163,7 @@ const F = (a, n, d, l, p, r) => {
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], _ = A || !v, f = T && v, C = (!c || c.entry?.length === 0 || m.length === 0) && v, U = f ? i("ERROR_FETCHING_OBSERVATIONS") : null, x = C ? i("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !_ && !f, E = n.titleTranslationKey, y = E ? i(E) : "";
166
+ ], O = A || !v, _ = T && v, C = (!c || c.entry?.length === 0 || m.length === 0) && v, U = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, x = C ? i("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !O && !_, E = n.titleTranslationKey, y = E ? i(E) : "";
167
167
  return /* @__PURE__ */ I(
168
168
  "div",
169
169
  {
@@ -195,7 +195,7 @@ const F = (a, n, d, l, p, r) => {
195
195
  headers: L,
196
196
  rows: [],
197
197
  ariaLabel: i("OBSERVATIONS"),
198
- loading: _,
198
+ loading: O,
199
199
  errorStateMessage: U,
200
200
  emptyStateMessage: x,
201
201
  dataTestId: "observations-table"
@@ -1,4 +1,4 @@
1
- import { q as we, s as z, t as xt, w as B, o as q, p as y, y as Ro, z as ye, S as R, C as _, L as k, M as N, O as A, Q as bs, T as ir, U as $e, V as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-BGOFo-Uw.js";
1
+ import { q as we, s as z, t as xt, w as B, o as q, p as y, y as Ro, z as ye, S as R, C as _, L as k, M as N, O as A, Q as bs, T as ir, U as $e, V as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-BtzcJ4Ep.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {