@bahmni/clinical-app 0.0.1-dev.328 → 0.0.1-dev.329

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
- import { jsx as r, jsxs as p, Fragment as Q } from "react/jsx-runtime";
2
- import { n as G, u as W, o as Y, w as J, f as X, g as Z, O as ee, p as te } from "./index-BHPHdADf.js";
1
+ import { jsx as r, jsxs as p, Fragment as G } from "react/jsx-runtime";
2
+ import { n as Q, u as W, o as Y, w as J, f as X, g as Z, O as ee, p as te } from "./index-CPZMkmDc.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as N, useMemo as _ } 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", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -38,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, D] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
41
+ ), E = Q(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
42
42
  U(e), w(!0);
43
43
  }, []), H = h(() => {
44
44
  w(!1), U(null), D(/* @__PURE__ */ new Set());
@@ -137,7 +137,7 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ p(Q, { children: [
140
+ return /* @__PURE__ */ p(G, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
@@ -1,42 +1,42 @@
1
1
  import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
2
- import { u as te, n as oe, N as se, a as ne, e as de, m as ie, b as le, j as me, D as q, g as ue, f as ce, O as x, v as fe, E as ye, p as be, c as pe, d as ge } from "./index-BHPHdADf.js";
2
+ import { u as te, n as oe, N as se, a as ne, e as de, m as ie, b as le, j as me, D as q, g as ue, f as ce, O as x, v as fe, E as ye, p as be, c as pe, d as ge } from "./index-CPZMkmDc.js";
3
3
  import { useQueryClient as he, useQuery as b } from "@tanstack/react-query";
4
4
  import { useState as j, useMemo as d, useCallback as p } from "react";
5
- const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", v = {
5
+ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", E = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: Oe
8
8
  }, Ae = (u) => u ? u.extension?.find(
9
9
  (l) => l.url === ge
10
- )?.valueString : void 0, De = ({
10
+ )?.valueString : void 0, Fe = ({
11
11
  episodeOfCareUuids: u,
12
12
  encounterUuids: l,
13
13
  config: k
14
14
  }) => {
15
- const { t: n } = te(), c = oe(), [f, E] = j(!1), [o, I] = j(null), {
15
+ const { t: n } = te(), c = oe(), [f, T] = j(!1), [o, v] = j(null), {
16
16
  numberOfVisits: w,
17
17
  hideThumbnail: H = !1,
18
18
  forms: y
19
- } = k ?? {}, T = se(
19
+ } = k ?? {}, I = se(
20
20
  u,
21
21
  l
22
22
  ), K = he(), {
23
- data: D = [],
24
- isLoading: F,
25
- isError: L,
23
+ data: F = [],
24
+ isLoading: L,
25
+ isError: B,
26
26
  error: V,
27
27
  refetch: $
28
28
  } = b({
29
29
  queryKey: ["forms", c, u],
30
30
  queryFn: () => ne(c, void 0, w),
31
- enabled: !!c && !T
32
- }), B = d(() => {
33
- let e = D;
31
+ enabled: !!c && !I
32
+ }), D = d(() => {
33
+ let e = F;
34
34
  return l && l.length > 0 && (e = e.filter(
35
35
  (r) => l.includes(r.encounterUuid)
36
36
  )), Array.isArray(y) && y.length > 0 && (e = e.filter(
37
37
  (r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
- }, [D, l, y]), { data: M = [] } = b({
39
+ }, [F, l, y]), { data: M = [] } = b({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => de()
42
42
  }), S = p(
@@ -57,7 +57,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
57
57
  }), {
58
58
  data: N,
59
59
  isLoading: Q,
60
- isError: Y,
60
+ isError: P,
61
61
  error: O
62
62
  } = b({
63
63
  queryKey: ["formsEncounterFHIR", o?.encounterUuid],
@@ -70,10 +70,10 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
70
70
  },
71
71
  [c]
72
72
  );
73
- const J = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
73
+ const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
74
74
  const r = Ae(e);
75
75
  return !r || r.includes(o.formName);
76
- }), [N, o?.formName]), P = d(() => {
76
+ }), [N, o?.formName]), J = d(() => {
77
77
  if (!m?.schema) return;
78
78
  const e = [], r = (a) => {
79
79
  (a ?? []).forEach((s) => {
@@ -116,7 +116,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
116
116
  ],
117
117
  []
118
118
  ), C = d(() => {
119
- const e = B.reduce(
119
+ const e = D.reduce(
120
120
  (r, a) => {
121
121
  const s = a.formName;
122
122
  r[s] ??= [];
@@ -140,10 +140,10 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
140
140
  )
141
141
  })
142
142
  ).sort((r, a) => r.formName.localeCompare(a.formName));
143
- }, [B, n]), R = p((e) => {
144
- I(e), E(!0);
143
+ }, [D, n]), R = p((e) => {
144
+ v(e), T(!0);
145
145
  }, []), ee = p(() => {
146
- E(!1), I(null);
146
+ T(!1), v(null);
147
147
  }, []), U = p(
148
148
  (e, r) => {
149
149
  switch (r) {
@@ -158,17 +158,17 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
158
158
  [R]
159
159
  );
160
160
  return /* @__PURE__ */ re(ae, { children: [
161
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || L || C.length === 0 || T ? /* @__PURE__ */ i(
161
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || C.length === 0 || I ? /* @__PURE__ */ i(
162
162
  x,
163
163
  {
164
164
  headers: _,
165
165
  ariaLabel: n("FORMS_HEADING"),
166
166
  rows: [],
167
- loading: F,
168
- errorStateMessage: L ? V?.message : void 0,
167
+ loading: L,
168
+ errorStateMessage: B ? V?.message : void 0,
169
169
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
170
170
  renderCell: U,
171
- className: v.formsTableBody,
171
+ className: E.formsTableBody,
172
172
  dataTestId: "forms-table"
173
173
  }
174
174
  ) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
@@ -177,7 +177,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
177
177
  ye,
178
178
  {
179
179
  title: a,
180
- className: v.customAccordianItem,
180
+ className: E.customAccordianItem,
181
181
  testId: `accordian-title-${a}`,
182
182
  open: r === 0,
183
183
  children: /* @__PURE__ */ i(
@@ -191,7 +191,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
191
191
  sortable: Z,
192
192
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
193
193
  renderCell: U,
194
- className: v.formsTableBody,
194
+ className: E.formsTableBody,
195
195
  dataTestId: `forms-table-${a}`
196
196
  }
197
197
  )
@@ -214,14 +214,14 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
214
214
  children: /* @__PURE__ */ i(
215
215
  pe,
216
216
  {
217
- observations: J,
217
+ observations: Y,
218
218
  isLoading: z || Q,
219
- isError: G || Y,
219
+ isError: G || P,
220
220
  errorMessage: X,
221
221
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
222
222
  testIdPrefix: o.formName,
223
223
  hideThumbnail: H,
224
- controlOrder: P,
224
+ controlOrder: J,
225
225
  sectionMap: W
226
226
  }
227
227
  )
@@ -230,5 +230,5 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
230
230
  ] });
231
231
  };
232
232
  export {
233
- De as default
233
+ Fe as default
234
234
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cqh6aPgw.js";
2
- import { bC as d, bD as f, bE as e } from "./index-BHPHdADf.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DPvc2F0O.js";
2
+ import { bD as d, bE as f, bF as e } from "./index-CPZMkmDc.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-Cqh6aPgw.js";
2
- import { bC as C, bD as v, bE as e } from "./index-BHPHdADf.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-DPvc2F0O.js";
2
+ import { bD as v, bE as C, bF as e } from "./index-CPZMkmDc.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), a = C(), l = v(() => {
6
+ }), a = v(), l = C(() => {
7
7
  const n = r.theme_preference || c;
8
8
  return n !== "system" ? n : a();
9
9
  });
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { n as B, o as M, u as N, h as K, i as k, j as H, H as Q, M as j, x as P, k as w, O as G, V as z, q as x, l as J, C as Y, r as W, _ as X, P as Z, R as ee } from "./index-BHPHdADf.js";
2
+ import { n as B, o as M, u as N, h as K, i as k, j as H, H as Q, M as j, x as P, k as w, O as G, V as z, q as x, l as J, C as Y, r as W, _ as X, P as Z, R as ee } from "./index-CPZMkmDc.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as E } from "react";
5
5
  const C = (t, n, d, l, b, r) => {
@@ -1,4 +1,4 @@
1
- import { bF as we, bG as z, bH as xt, bI as B, bD as q, bE as y, bJ as Ro, bK as ye, bL as R, bM as _, bN as k, bO as N, bP as A, bQ as bs, bR as ir, bS as $e, bT as U, bU as Hn, bV as Vn, bW as dt, bX as D, bY as xs, bZ as cn, b_ as Be, b$ as ws, c0 as qt, c1 as zt, c2 as $s, c3 as Cs, c4 as $n, c5 as Ss, c6 as Nr, c7 as Bt, c8 as zo, c9 as ks, ca as Es, cb as j, cc as Ur, cd as Ms, ce as Ds, cf as sr, cg as As, ch as Ts, ci as zn, cj as Fs, ck as Is, cl as Z, cm as Ps, cn as Ls } from "./index-BHPHdADf.js";
1
+ import { bG as we, bH as z, bI as xt, bJ as B, bE as q, bF as y, bK as Ro, bL as ye, bM as R, bN as _, bO as k, bP as N, bQ as A, bR as bs, bS as ir, bT as $e, bU as U, bV as Hn, bW as Vn, bX as dt, bY as D, bZ as xs, b_ as cn, b$ as Be, c0 as ws, c1 as qt, c2 as zt, c3 as $s, c4 as Cs, c5 as $n, c6 as Ss, c7 as Nr, c8 as Bt, c9 as zo, ca as ks, cb as Es, cc as j, cd as Ur, ce as Ms, cf as Ds, cg as sr, ch as As, ci as Ts, cj as zn, ck as Fs, cl as Is, cm as Z, cn as Ps, co as Ls } from "./index-CPZMkmDc.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAUjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAiBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAicvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAWjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAiBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CA8cvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { bA as i, bB as o } from "./index-BHPHdADf.js";
1
+ import { bB as i, bC as o } from "./index-CPZMkmDc.js";
2
2
  import "react";
3
3
  const l = i(
4
4
  o,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { u as r, co as o, cp as l, cq as c, b1 as m, b2 as g, cr as h, cs as b, ct as p, aF as u } from "./index-BHPHdADf.js";
2
+ import { u as r, cp as o, cq as l, cr as c, b1 as m, b2 as g, cs as h, ct as b, cu as p, aF as u } from "./index-CPZMkmDc.js";
3
3
  import { Suspense as $ } from "react";
4
4
  const _ = "index-module_loading__FAL7n", E = "index-module_message__KjCnF", t = {
5
5
  loading: _,