@bahmni/clinical-app 0.0.1-dev.278 → 0.0.1-dev.280

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 T, Fragment as x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, p as J, b as X, m as Z, c as ee, n as te } from "./index-_ys4AfcI.js";
2
+ import { u as G, a as W, h as Y, p as J, b as X, m as Z, c as ee, n as te } from "./index-BAGx7MPS.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as O, useMemo as h } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", ce = "DocumentsTable-module_attachmentError__RI4U2", me = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as W, Fragment as Z } from "react/jsx-runtime";
2
- import { a as ee, u as re, g as ae, d as oe, e as te, f as se, i as ne, j as de, R as S, m as ie, b as me, c as U, C as ue, T as le, n as ce, t as fe, s as ye } from "./index-_ys4AfcI.js";
2
+ import { a as ee, u as re, v as ae, d as oe, e as te, f as se, g as ne, i as de, R as S, m as ie, b as me, c as U, C as ue, T as le, n as ce, t as fe, s as ye } from "./index-BAGx7MPS.js";
3
3
  import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as y } from "react";
5
5
  const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_customAccordianItem__isszs", A = {
@@ -10,42 +10,42 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
10
10
  )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
- config: j
13
+ config: k
14
14
  }) => {
15
15
  const { t } = ee(), u = re(), [l, T] = q(!1), [o, O] = q(null), {
16
- numberOfVisits: k,
17
- hideThumbnail: w = !1,
16
+ numberOfVisits: w,
17
+ hideThumbnail: H = !1,
18
18
  forms: c
19
- } = j ?? {}, I = ae(
19
+ } = k ?? {}, I = ae(
20
20
  m,
21
21
  n
22
- ), H = be(), {
22
+ ), K = be(), {
23
23
  data: F = [],
24
24
  isLoading: L,
25
- isError: B,
26
- error: K,
25
+ isError: v,
26
+ error: j,
27
27
  refetch: x
28
28
  } = f({
29
29
  queryKey: ["forms", u, m],
30
- queryFn: () => oe(u, void 0, k),
30
+ queryFn: () => oe(u, void 0, w),
31
31
  enabled: !!u && !I
32
- }), C = d(() => {
32
+ }), B = d(() => {
33
33
  let e = F;
34
34
  return n && n.length > 0 && (e = e.filter(
35
35
  (r) => n.includes(r.encounterUuid)
36
36
  )), Array.isArray(c) && c.length > 0 && (e = e.filter(
37
37
  (r) => c.some((a) => a.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
- }, [F, n, c]), { data: E = [] } = f({
39
+ }, [F, n, c]), { data: C = [] } = f({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => te()
42
- }), M = y(
43
- (e) => E.find((r) => r.name === e)?.uuid,
44
- [E]
42
+ }), E = y(
43
+ (e) => C.find((r) => r.name === e)?.uuid,
44
+ [C]
45
45
  ), b = d(() => {
46
46
  if (o)
47
- return M(o.formName);
48
- }, [o, M]), {
47
+ return E(o.formName);
48
+ }, [o, E]), {
49
49
  isLoading: V,
50
50
  isError: $,
51
51
  error: g
@@ -65,7 +65,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
65
65
  });
66
66
  de(
67
67
  (e) => {
68
- e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
68
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
69
69
  },
70
70
  [u]
71
71
  );
@@ -77,7 +77,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
77
77
  return S(g).message;
78
78
  if (h)
79
79
  return S(h).message;
80
- }, [g, h]), R = d(
80
+ }, [g, h]), M = d(
81
81
  () => [
82
82
  { key: "recordedOn", header: t("RECORDED_ON") },
83
83
  { key: "recordedBy", header: t("RECORDED_BY") }
@@ -89,8 +89,8 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
89
89
  { key: "recordedBy", sortable: !0 }
90
90
  ],
91
91
  []
92
- ), _ = d(() => {
93
- const e = C.reduce(
92
+ ), R = d(() => {
93
+ const e = B.reduce(
94
94
  (r, a) => {
95
95
  const i = a.formName;
96
96
  r[i] ??= [];
@@ -114,7 +114,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
114
114
  )
115
115
  })
116
116
  ).sort((r, a) => r.formName.localeCompare(a.formName));
117
- }, [C, t]), v = y((e) => {
117
+ }, [B, t]), _ = y((e) => {
118
118
  O(e), T(!0);
119
119
  }, []), J = y(() => {
120
120
  T(!1), O(null);
@@ -122,30 +122,30 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
122
122
  (e, r) => {
123
123
  switch (r) {
124
124
  case "recordedOn":
125
- return /* @__PURE__ */ s(me, { onClick: () => v(e), children: e.recordedOn });
125
+ return /* @__PURE__ */ s(me, { onClick: () => _(e), children: e.recordedOn });
126
126
  case "recordedBy":
127
127
  return e.recordedBy;
128
128
  default:
129
129
  return null;
130
130
  }
131
131
  },
132
- [v]
132
+ [_]
133
133
  );
134
134
  return /* @__PURE__ */ W(Z, { children: [
135
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || _.length === 0 || I ? /* @__PURE__ */ s(
135
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: L || v || R.length === 0 || I ? /* @__PURE__ */ s(
136
136
  U,
137
137
  {
138
- headers: R,
138
+ headers: M,
139
139
  ariaLabel: t("FORMS_HEADING"),
140
140
  rows: [],
141
141
  loading: L,
142
- errorStateMessage: B ? K?.message : void 0,
142
+ errorStateMessage: v ? j?.message : void 0,
143
143
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
144
144
  renderCell: D,
145
145
  className: A.formsTableBody,
146
146
  dataTestId: "forms-table"
147
147
  }
148
- ) : /* @__PURE__ */ s(ue, { align: "start", children: _.map((e, r) => {
148
+ ) : /* @__PURE__ */ s(ue, { align: "start", children: R.map((e, r) => {
149
149
  const { formName: a, records: i } = e;
150
150
  return /* @__PURE__ */ s(
151
151
  le,
@@ -157,7 +157,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
157
157
  children: /* @__PURE__ */ s(
158
158
  U,
159
159
  {
160
- headers: R,
160
+ headers: M,
161
161
  ariaLabel: t("FORMS_HEADING"),
162
162
  rows: i,
163
163
  loading: !1,
@@ -194,7 +194,7 @@ const ge = "FormsTable-module_formsTableBody__SvGha", pe = "FormsTable-module_cu
194
194
  errorMessage: P,
195
195
  emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
196
196
  testIdPrefix: o.formName,
197
- hideThumbnail: w
197
+ hideThumbnail: H
198
198
  }
199
199
  )
200
200
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DGTqDb2V.js";
2
- import { r as d, A as f, D as e } from "./index-_ys4AfcI.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DTwVqfGF.js";
2
+ import { r as d, A as f, D as e } from "./index-BAGx7MPS.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-DGTqDb2V.js";
2
- import { r as v, A as C, D as e } from "./index-_ys4AfcI.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-DTwVqfGF.js";
2
+ import { r as v, A as C, D as e } from "./index-BAGx7MPS.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { u as q, h as w, a as S, k as K, l as k, j as x, v as z, E as M, y as P, z as j, c as G, w as H, P as L, o as J, x as Y, q as W, _ as X, B as Z, L as ee } from "./index-_ys4AfcI.js";
2
+ import { u as q, h as w, a as S, j as K, l as k, i as x, k as z, E as M, y as P, z as j, c as G, w as H, P as L, o as J, x as Y, q as W, _ as X, B as Z, L as ee } from "./index-BAGx7MPS.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as R } from "react";
5
5
  const D = (a, n, d, l, b, r) => {
@@ -1,4 +1,4 @@
1
- import { F as we, G as z, H as xt, I as B, A as q, D as y, J as Ro, K as ye, S as R, M as _, N as k, O as N, Q as A, U as bs, V as ir, W as $e, X as U, Y as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Os } from "./index-_ys4AfcI.js";
1
+ import { F as we, G as z, H as xt, I as B, A as q, D as y, J as Ro, K as ye, S as R, M as _, N as k, O as N, Q as A, U as bs, V as ir, W as $e, X as U, Y as Hn, Z as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Os } from "./index-BAGx7MPS.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {