@bahmni/clinical-app 0.0.1-dev.296 → 0.0.1-dev.297

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 h, Fragment as x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, B as J, w as X, m as Z, c as ee, n as te } from "./index-CXQdJ3ps.js";
2
+ import { u as G, a as W, h as Y, B as J, w as X, m as Z, c as ee, n as te } from "./index-CaDZ9Qhz.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as N, useMemo as p } 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 = {
@@ -1,8 +1,8 @@
1
1
  import { jsx as s, jsxs as X, Fragment as W } from "react/jsx-runtime";
2
- import { a as ee, u as re, v as ae, k as oe, I as te, Z as se, S as ne, e as de, _ as D, m as ie, w as me, c as U, O as ue, L as le, n as ce, q as fe, R as ye } from "./index-CXQdJ3ps.js";
2
+ import { a as ee, u as re, v as ae, k as oe, I as te, Z as se, S as ne, e as de, _ as D, m as ie, w as me, c as U, O as ue, L as le, n as ce, K as fe, R as ye } from "./index-CaDZ9Qhz.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
- const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
5
+ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", O = {
6
6
  formsTableBody: pe,
7
7
  customAccordianItem: ge
8
8
  }, Ne = (m) => m ? m.extension?.find(
@@ -12,7 +12,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
12
12
  encounterUuids: n,
13
13
  config: H
14
14
  }) => {
15
- const { t } = ee(), u = re(), [l, O] = q(!1), [o, I] = q(null), {
15
+ const { t } = ee(), u = re(), [l, A] = q(!1), [o, I] = q(null), {
16
16
  numberOfVisits: k,
17
17
  hideThumbnail: w = !1,
18
18
  forms: c
@@ -29,23 +29,23 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
29
29
  queryKey: ["forms", u, m],
30
30
  queryFn: () => oe(u, void 0, k),
31
31
  enabled: !!u && !L
32
- }), v = d(() => {
32
+ }), M = d(() => {
33
33
  let e = T;
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
- }, [T, n, c]), { data: B = [] } = f({
39
+ }, [T, n, c]), { data: v = [] } = f({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => te()
42
- }), E = y(
43
- (e) => B.find((r) => r.name === e)?.uuid,
44
- [B]
42
+ }), B = y(
43
+ (e) => v.find((r) => r.name === e)?.uuid,
44
+ [v]
45
45
  ), b = d(() => {
46
46
  if (o)
47
- return E(o.formName);
48
- }, [o, E]), {
47
+ return B(o.formName);
48
+ }, [o, B]), {
49
49
  isLoading: V,
50
50
  isError: $,
51
51
  error: p
@@ -77,7 +77,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
77
77
  return D(p).message;
78
78
  if (N)
79
79
  return D(N).message;
80
- }, [p, N]), M = d(
80
+ }, [p, N]), E = d(
81
81
  () => [
82
82
  { key: "recordedOn", header: t("RECORDED_ON") },
83
83
  { key: "recordedBy", header: t("RECORDED_BY") }
@@ -90,7 +90,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
90
90
  ],
91
91
  []
92
92
  ), R = d(() => {
93
- const e = v.reduce(
93
+ const e = M.reduce(
94
94
  (r, a) => {
95
95
  const i = a.formName;
96
96
  r[i] ??= [];
@@ -114,10 +114,10 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
114
114
  )
115
115
  })
116
116
  ).sort((r, a) => r.formName.localeCompare(a.formName));
117
- }, [v, t]), S = y((e) => {
118
- I(e), O(!0);
117
+ }, [M, t]), S = y((e) => {
118
+ I(e), A(!0);
119
119
  }, []), Z = y(() => {
120
- O(!1), I(null);
120
+ A(!1), I(null);
121
121
  }, []), C = y(
122
122
  (e, r) => {
123
123
  switch (r) {
@@ -135,14 +135,14 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
135
135
  /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ || R.length === 0 || L ? /* @__PURE__ */ s(
136
136
  U,
137
137
  {
138
- headers: M,
138
+ headers: E,
139
139
  ariaLabel: t("FORMS_HEADING"),
140
140
  rows: [],
141
141
  loading: F,
142
142
  errorStateMessage: _ ? j?.message : void 0,
143
143
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
144
144
  renderCell: C,
145
- className: A.formsTableBody,
145
+ className: O.formsTableBody,
146
146
  dataTestId: "forms-table"
147
147
  }
148
148
  ) : /* @__PURE__ */ s(ue, { align: "start", children: R.map((e, r) => {
@@ -151,13 +151,13 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
151
151
  le,
152
152
  {
153
153
  title: a,
154
- className: A.customAccordianItem,
154
+ className: O.customAccordianItem,
155
155
  testId: `accordian-title-${a}`,
156
156
  open: r === 0,
157
157
  children: /* @__PURE__ */ s(
158
158
  U,
159
159
  {
160
- headers: M,
160
+ headers: E,
161
161
  ariaLabel: t("FORMS_HEADING"),
162
162
  rows: i,
163
163
  loading: !1,
@@ -165,7 +165,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
165
165
  sortable: Y,
166
166
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
167
167
  renderCell: C,
168
- className: A.formsTableBody,
168
+ className: O.formsTableBody,
169
169
  dataTestId: `forms-table-${a}`
170
170
  }
171
171
  )
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-oEkjyVbG.js";
2
- import { j as d, l as f, o as e } from "./index-CXQdJ3ps.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CyW_tsfn.js";
2
+ import { j as d, l as f, o as e } from "./index-CaDZ9Qhz.js";
3
3
  var p = (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-oEkjyVbG.js";
2
- import { j as v, l as C, o as e } from "./index-CXQdJ3ps.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-CyW_tsfn.js";
2
+ import { j as v, l as C, o as e } from "./index-CaDZ9Qhz.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,8 +1,8 @@
1
- import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { u as B, h as V, a as S, D as w, $ as G, e as k, b as z, K as Q, G as x, z as M, c as j, U as P, d as D, W, f as J, g as Y, H as X, i as Z, N as ee } from "./index-CXQdJ3ps.js";
1
+ import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
+ import { u as B, h as V, a as N, D as w, $ as G, e as M, q as k, b as z, G as Q, z as x, c as j, U as P, d as D, W, f as J, g as Y, M as X, i as Z, A as ee } from "./index-CaDZ9Qhz.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
- const H = (a, n, d, l, b, r) => {
5
+ const A = (a, n, d, l, b, r) => {
6
6
  const t = W(a, n, b), s = t.value, o = J(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
@@ -43,7 +43,7 @@ const H = (a, n, d, l, b, r) => {
43
43
  id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
45
  children: a.members?.map(
46
- (s, o) => H(
46
+ (s, o) => A(
47
47
  s,
48
48
  o,
49
49
  b,
@@ -59,9 +59,9 @@ const H = (a, n, d, l, b, r) => {
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
- const { t: l } = S(), b = (r, t, s) => {
62
+ const { t: l } = N(), b = (r, t, s) => {
63
63
  const o = P(r.encounterDetails, l);
64
- return /* @__PURE__ */ N(
64
+ return /* @__PURE__ */ S(
65
65
  D,
66
66
  {
67
67
  title: o,
@@ -69,7 +69,7 @@ const H = (a, n, d, l, b, r) => {
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => H(
72
+ (i, m) => A(
73
73
  i,
74
74
  m,
75
75
  s,
@@ -113,7 +113,7 @@ const H = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = V(), { t: o } = S(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = V(), { t: o } = N(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => w(e),
@@ -134,7 +134,7 @@ const H = (a, n, d, l, b, r) => {
134
134
  }, [i, d]);
135
135
  const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: F,
137
+ isLoading: H,
138
138
  isError: T,
139
139
  refetch: g
140
140
  } = te({
@@ -142,7 +142,7 @@ const H = (a, n, d, l, b, r) => {
142
142
  queryFn: () => G(t, p),
143
143
  enabled: !!t && p.length > 0 && y
144
144
  });
145
- k(
145
+ M(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
@@ -158,14 +158,14 @@ const H = (a, n, d, l, b, r) => {
158
158
  }, [T]);
159
159
  const O = R(() => {
160
160
  if (!c) return [];
161
- const e = z(c), h = Q(e);
162
- return x(h);
163
- }, [c]), L = [
161
+ const e = k(c), h = z(e);
162
+ return Q(h);
163
+ }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], $ = F || !y, f = T && y, U = (!c || c.entry?.length === 0 || p.length === 0) && y, A = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, C = O.length > 0 && !$ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
- return /* @__PURE__ */ N(
167
+ ], $ = H || !y, f = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, U = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = L ? o("NO_OBSERVATIONS_FOUND") : void 0, C = O.length > 0 && !$ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
+ return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
@@ -174,7 +174,7 @@ const H = (a, n, d, l, b, r) => {
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- M,
177
+ x,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -193,11 +193,11 @@ const H = (a, n, d, l, b, r) => {
193
193
  ) : /* @__PURE__ */ u(
194
194
  j,
195
195
  {
196
- headers: L,
196
+ headers: F,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
199
  loading: $,
200
- errorStateMessage: A,
200
+ errorStateMessage: U,
201
201
  emptyStateMessage: K,
202
202
  dataTestId: "observations-table"
203
203
  }
@@ -1,4 +1,4 @@
1
- import { p as we, r as z, s as xt, t as B, l as q, o as y, P as Ro, x as ye, y as R, A as _, C as k, E as N, F as A, J as bs, M as ir, Q as $e, T as U, V as Hn, X as Vn, Y 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 Ls } from "./index-CXQdJ3ps.js";
1
+ import { p as we, r as z, s as xt, t as B, l as q, o as y, P as Ro, x as ye, y as R, C as _, E as k, F as N, H as A, J as bs, N as ir, Q as $e, T as U, V as Hn, X as Vn, Y 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 Ls } from "./index-CaDZ9Qhz.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,4 +1,4 @@
1
- export declare const BAHMNI_CLINICAL_PATH = "/bahmni/clinical/index.html";
1
+ export declare const BAHMNI_CLINICAL_PATH = "/bahmni/clinical/index.html#/v2/patient/search";
2
2
  export declare const ENCOUNTER_CONCEPTS_URL: string;
3
3
  export declare const BAHMNI_USER_LOCATION_COOKIE_NAME = "bahmni.user.location";
4
4
  export declare const PROVIDER_RESOURCE_URL: (userUUID: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAClE,eAAO,MAAM,sBAAsB,QAEuC,CAAC;AAE3E,eAAO,MAAM,gCAAgC,yBAAyB,CAAC;AAEvE,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,WACyB,CAAC;AAEhF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WACuB,CAAC;AAE1E,eAAO,MAAM,uBAAuB,QAA0C,CAAC;AAC/E,eAAO,MAAM,oBAAoB,QAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,QACuB,CAAC;AAC1D,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,eAAO,MAAM,2BAA2B,4CACG,CAAC;AAE5C,eAAO,MAAM,sBAAsB,8DAAqD,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,mDACiB,CAAC;AACnD,eAAO,MAAM,sBAAsB,QAEuC,CAAC;AAE3E,eAAO,MAAM,gCAAgC,yBAAyB,CAAC;AAEvE,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,WACyB,CAAC;AAEhF,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WACuB,CAAC;AAE1E,eAAO,MAAM,uBAAuB,QAA0C,CAAC;AAC/E,eAAO,MAAM,oBAAoB,QAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,QACuB,CAAC;AAC1D,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,eAAO,MAAM,2BAA2B,4CACG,CAAC;AAE5C,eAAO,MAAM,sBAAsB,8DAAqD,CAAC"}