@bahmni/clinical-app 0.0.1-dev.211 → 0.0.1-dev.212

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 { c as K, u as Q, e as W, a as X, V as J, C as Z, x as ee, L as te, b as ae } from "./index-Bx_lE4tb.js";
2
+ import { c as K, u as Q, e as W, a as X, V as J, C as Z, x as ee, L as te, b as ae } from "./index-DG493aaS.js";
3
3
  import { useState as l, useCallback as h, useEffect as C, 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", le = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -20,10 +20,10 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
20
20
  function j(a) {
21
21
  return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
22
22
  }
23
- function ue(a, E) {
23
+ function ue(a, g) {
24
24
  return a.map((s) => ({
25
25
  key: s,
26
- header: E(me[s])
26
+ header: g(me[s])
27
27
  }));
28
28
  }
29
29
  const _e = [
@@ -32,12 +32,12 @@ const _e = [
32
32
  "uploadedOn",
33
33
  "uploadedBy",
34
34
  "action"
35
- ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], ge = ({ config: a, encounterUuids: E }) => {
35
+ ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ee = ({ config: a, encounterUuids: g }) => {
36
36
  const [s, L] = l(!1), [o, w] = l(
37
37
  null
38
38
  ), [R, f] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [I, A] = l(1), [m, V] = l($), [k, y] = l(void 0), b = h((e) => {
40
+ ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [I, A] = l(1), [m, V] = l($), [k, y] = l(void 0), b = h((e) => {
41
41
  w(e), L(!0);
42
42
  }, []), F = h(() => {
43
43
  L(!1), w(null), f(/* @__PURE__ */ new Set());
@@ -46,15 +46,15 @@ const _e = [
46
46
  }, []), { data: u, isLoading: H, isError: D, error: v } = X({
47
47
  queryKey: [
48
48
  "documents",
49
- g,
50
49
  E,
50
+ g,
51
51
  I,
52
52
  m
53
53
  ],
54
- enabled: !!g,
54
+ enabled: !!E,
55
55
  queryFn: () => ae(
56
- g,
57
56
  E,
57
+ g,
58
58
  m,
59
59
  I
60
60
  )
@@ -63,7 +63,7 @@ const _e = [
63
63
  u && y(u.total);
64
64
  }, [u]), C(() => {
65
65
  A(1), y(void 0);
66
- }, [g]), C(() => {
66
+ }, [E]), C(() => {
67
67
  D && U({
68
68
  title: n("ERROR_DEFAULT_TITLE"),
69
69
  message: v?.message ?? "",
@@ -222,5 +222,5 @@ const _e = [
222
222
  ] });
223
223
  };
224
224
  export {
225
- ge as default
225
+ Ee as default
226
226
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as p, Fragment as P } from "react/jsx-runtime";
2
- import { u as O, c as ae, d as te, f as oe, a as L, w as ne, C as se, V as de, x as q, Z as me, k as ie, L as le, D as ce, g as k, o as ue, G as K, M as A, t as be, $ as pe, I as _e, S as fe, n as $e, l as he, i as ge, s as ve, h as ye } from "./index-Bx_lE4tb.js";
2
+ import { u as O, c as ae, d as te, f as oe, a as L, w as ne, C as se, V as de, x as q, Z as me, k as ie, L as le, D as ce, g as k, o as ue, G as K, M as A, t as be, $ as pe, I as _e, S as fe, n as $e, l as he, i as ge, s as ve, h as ye } from "./index-DG493aaS.js";
3
3
  import { useState as H, useMemo as v, useCallback as C } from "react";
4
4
  const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", De = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", Ve = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", xe = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
5
5
  formsTableBody: Ne,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BGJVOAxj.js";
2
- import { B as d, E as f, F as e } from "./index-Bx_lE4tb.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Bxwdu-cd.js";
2
+ import { B as d, E as f, F as e } from "./index-DG493aaS.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-BGJVOAxj.js";
2
- import { B as v, E as C, F as e } from "./index-Bx_lE4tb.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-Bxwdu-cd.js";
2
+ import { B as v, E as C, F as e } from "./index-DG493aaS.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,7 +1,7 @@
1
1
  import { jsxs as T, jsx as l } from "react/jsx-runtime";
2
- import { c as V, e as k, u as S, j as w, r as x, a as K, w as Q, o as j, m as z, p as G, y as H, x as M, q as P, R as N, v as Y, t as J, z as W, $ as X, I as Z, S as ee, A as te } from "./index-Bx_lE4tb.js";
2
+ import { c as V, e as k, u as S, j as x, r as w, a as K, w as M, o as Q, m as j, p as G, y as H, x as z, q as P, R as N, v as Y, t as J, z as W, $ as X, I as Z, S as ee, A as te } from "./index-DG493aaS.js";
3
3
  import { useRef as ae, useEffect as _, useMemo as h } from "react";
4
- const q = (t, d, i, u, r) => {
4
+ const A = (t, d, i, u, r) => {
5
5
  const a = Y(t, d, r), s = a.value, o = J(s);
6
6
  let n = s;
7
7
  o === "Image" && (n = /* @__PURE__ */ l(X, { imageSrc: s, alt: s, id: `${s}-img` })), o === "Video" && (n = /* @__PURE__ */ l(Z, { id: `${s}-video`, videoSrc: s })), o === "PDF" && (n = /* @__PURE__ */ l(ee, { id: `${s}-pdf`, src: s }));
@@ -27,7 +27,7 @@ const q = (t, d, i, u, r) => {
27
27
  id: `grouped-obs-${t.display}-${u}`,
28
28
  open: i,
29
29
  children: t.members?.map(
30
- (s, o) => q(s, o, r, a, d)
30
+ (s, o) => A(s, o, r, a, d)
31
31
  )
32
32
  },
33
33
  `grouped-obs-${t.id}`
@@ -45,7 +45,7 @@ const q = (t, d, i, u, r) => {
45
45
  open: a,
46
46
  children: [
47
47
  r.observations.map(
48
- (n, b) => q(n, b, s, d, i)
48
+ (n, b) => A(n, b, s, d, i)
49
49
  ),
50
50
  r.groupedObservations.map(
51
51
  (n, b) => se(
@@ -77,10 +77,10 @@ const q = (t, d, i, u, r) => {
77
77
  observations: oe,
78
78
  title: ne
79
79
  }, ie = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
80
- const d = t, { conceptNames: i = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = V(), { addNotification: s } = k(), { t: o } = S(), n = w({
80
+ const d = t, { conceptNames: i = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = V(), { addNotification: s } = k(), { t: o } = S(), n = x({
81
81
  queries: i.map((e) => ({
82
82
  queryKey: ie(e),
83
- queryFn: () => x(e),
83
+ queryFn: () => w(e),
84
84
  enabled: !!e
85
85
  }))
86
86
  });
@@ -98,7 +98,7 @@ const q = (t, d, i, u, r) => {
98
98
  }, [n, i]);
99
99
  const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
100
100
  data: c,
101
- isLoading: A,
101
+ isLoading: D,
102
102
  isError: E,
103
103
  refetch: f
104
104
  } = K({
@@ -106,7 +106,7 @@ const q = (t, d, i, u, r) => {
106
106
  queryFn: () => te(a, p),
107
107
  enabled: !!a && p.length > 0 && v
108
108
  });
109
- Q(
109
+ M(
110
110
  (e) => {
111
111
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
112
112
  (m) => p.includes(m)
@@ -122,13 +122,13 @@ const q = (t, d, i, u, r) => {
122
122
  }, [E]);
123
123
  const g = h(() => {
124
124
  if (!c) return [];
125
- const e = j(c), m = z(e);
125
+ const e = Q(c), m = j(e);
126
126
  return G(m);
127
- }, [c]), D = [
127
+ }, [c]), F = [
128
128
  { key: "name", header: "name" },
129
129
  { key: "value", header: "value" },
130
130
  { key: "form", header: "form" }
131
- ], $ = A || !v, O = E && v, F = (!c || c.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = F ? o("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, R = d.titleTranslationKey, y = R ? o(R) : "";
131
+ ], $ = D || !v, O = E && v, q = (!c || c.entry?.length === 0 || p.length === 0) && v, L = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? o("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !$ && !O, R = d.titleTranslationKey, y = R ? o(R) : "";
132
132
  return /* @__PURE__ */ T(
133
133
  "div",
134
134
  {
@@ -148,9 +148,9 @@ const q = (t, d, i, u, r) => {
148
148
  }
149
149
  ),
150
150
  C ? /* @__PURE__ */ l(re, { groupedData: g, title: y }) : /* @__PURE__ */ l(
151
- M,
151
+ z,
152
152
  {
153
- headers: D,
153
+ headers: F,
154
154
  rows: [],
155
155
  ariaLabel: o("OBSERVATIONS"),
156
156
  loading: $,
@@ -1,4 +1,4 @@
1
- import { H as we, J as z, K as xt, N as B, E as q, F as y, P as Ro, O as ye, Q as R, T as _, U as k, W as N, X as A, Y as bs, _ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Os } from "./index-Bx_lE4tb.js";
1
+ import { H as we, J as z, K as xt, N as B, E as q, F as y, P as Ro, O as ye, Q as R, T as _, U as k, W as N, X as A, Y as bs, _ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Os } from "./index-DG493aaS.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {