@bahmni/clinical-app 0.0.1-dev.440 → 0.0.1-dev.441

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 d, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-qHxzHYCk.js";
2
+ import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-CXVD8oVf.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-qHxzHYCk.js";
2
+ import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-CXVD8oVf.js";
3
3
  import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
4
  import { useState as j, useMemo as d, useCallback as i } from "react";
5
- const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", g = {
6
- formsTableBody: Le,
7
- modalHeading: Re,
8
- customAccordianItem: Be
5
+ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", g = {
6
+ formsTableBody: Be,
7
+ modalHeading: Le,
8
+ customAccordianItem: Re
9
9
  }, Ce = "startConsultation", Me = ({
10
10
  episodeOfCareUuids: _,
11
11
  encounterUuids: l,
@@ -19,27 +19,27 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
19
19
  forms: N
20
20
  } = x ?? {}, W = le(
21
21
  Ae.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = me(), p = W && !z && !!y, L = ue(
22
+ ), { userPrivileges: h } = me(), p = W && !z && !!y, B = ue(
23
23
  _,
24
24
  l
25
25
  ), P = ve(), {
26
- data: R = [],
27
- isLoading: B,
26
+ data: L = [],
27
+ isLoading: R,
28
28
  isError: C,
29
29
  error: Y,
30
30
  refetch: J
31
31
  } = E({
32
32
  queryKey: ["forms", m, _],
33
33
  queryFn: () => ce(m, void 0, Q),
34
- enabled: !!m && !L
34
+ enabled: !!m && !B
35
35
  }), F = d(() => {
36
- let e = R;
36
+ let e = L;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
39
  )), Array.isArray(N) && N.length > 0 && (e = e.filter(
40
40
  (r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [R, l, N]), { data: D = [] } = E({
42
+ }, [L, l, N]), { data: D = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
45
  }), U = i(
@@ -120,9 +120,9 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
120
120
  )
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
- }, [F, o]), w = i((e) => {
123
+ }, [F, o]), k = i((e) => {
124
124
  v(e), A(!0);
125
- }, []), k = i(() => {
125
+ }, []), w = i(() => {
126
126
  A(!1), v(null);
127
127
  }, []), I = i((e) => {
128
128
  globalThis.dispatchEvent(
@@ -140,7 +140,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
140
140
  (e, r) => {
141
141
  switch (r) {
142
142
  case "recordedOn":
143
- return /* @__PURE__ */ n(Oe, { onClick: () => w(e), children: e.recordedOn });
143
+ return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
144
144
  case "recordedBy":
145
145
  return e.recordedBy;
146
146
  case "actions":
@@ -159,16 +159,16 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
159
159
  return null;
160
160
  }
161
161
  },
162
- [w, I, u, o]
162
+ [k, I, u, o]
163
163
  );
164
164
  return /* @__PURE__ */ q(ne, { children: [
165
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || C || M.length === 0 || L ? /* @__PURE__ */ n(
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || C || M.length === 0 || B ? /* @__PURE__ */ n(
166
166
  K,
167
167
  {
168
168
  headers: oe,
169
169
  ariaLabel: o("FORMS_HEADING"),
170
170
  rows: [],
171
- loading: B,
171
+ loading: R,
172
172
  errorStateMessage: C ? Y?.message : void 0,
173
173
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
174
  renderCell: H,
@@ -209,7 +209,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
209
209
  id: "modalIdForActionAreaLayout",
210
210
  portalId: "main-display-area",
211
211
  open: T,
212
- onRequestClose: k,
212
+ onRequestClose: w,
213
213
  modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
214
214
  /* @__PURE__ */ n("span", { children: t.formName }),
215
215
  p && u(t) && /* @__PURE__ */ n(
@@ -220,7 +220,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
220
220
  size: "sm",
221
221
  testId: `edit-form-modal-${t.encounterUuid}`,
222
222
  onClick: () => {
223
- k(), I(t);
223
+ w(), I(t);
224
224
  },
225
225
  children: /* @__PURE__ */ n($, {})
226
226
  }
@@ -1,5 +1,5 @@
1
- import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BO9HNslJ.js";
2
- import { c3 as d, c4 as f, c5 as e } from "./index-qHxzHYCk.js";
1
+ import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DHndX1Gs.js";
2
+ import { c3 as d, c4 as f, c5 as e } from "./index-CXVD8oVf.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = s({
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-BO9HNslJ.js";
2
- import { c3 as v, c4 as C, c5 as e } from "./index-qHxzHYCk.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-DHndX1Gs.js";
2
+ import { c3 as v, c4 as C, c5 as e } from "./index-CXVD8oVf.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,13 +1,13 @@
1
1
  import { jsxs as I, jsx as o } from "react/jsx-runtime";
2
- import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-qHxzHYCk.js";
2
+ import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-CXVD8oVf.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
- import { useRef as me, useEffect as L, useMemo as g } from "react";
4
+ import { useRef as me, useEffect as D, useMemo as g } from "react";
5
5
  const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
6
  observations: pe,
7
7
  title: be,
8
8
  wrapper: he,
9
9
  secondary: ve
10
- }, V = (s, l, n, d, c, t) => {
10
+ }, w = (s, l, n, d, c, t) => {
11
11
  const r = te(s, l, c), e = r.value, m = re(e);
12
12
  let i = e;
13
13
  m === "Image" && (i = /* @__PURE__ */ o(
@@ -54,7 +54,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
54
54
  id: `grouped-obs-${s.display}-${d}`,
55
55
  open: n,
56
56
  children: s.members?.map(
57
- (e, m) => V(
57
+ (e, m) => w(
58
58
  e,
59
59
  m,
60
60
  c,
@@ -80,7 +80,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
80
80
  open: r,
81
81
  children: [
82
82
  t.observations.map(
83
- (i, p) => V(
83
+ (i, p) => w(
84
84
  i,
85
85
  p,
86
86
  e,
@@ -139,7 +139,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
139
139
  enabled: !!a
140
140
  }))
141
141
  });
142
- L(() => {
142
+ D(() => {
143
143
  const a = b.some((z) => z.isError), y = m.current.size > 0;
144
144
  a && !y ? (p({
145
145
  title: u("ERROR_DEFAULT_TITLE"),
@@ -152,9 +152,9 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
152
152
  n
153
153
  ), {
154
154
  data: _,
155
- isLoading: w,
155
+ isLoading: V,
156
156
  isError: S,
157
- refetch: N
157
+ refetch: $
158
158
  } = ce({
159
159
  queryKey: _e(
160
160
  i,
@@ -177,17 +177,17 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
177
177
  (a) => {
178
178
  a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
179
  (y) => h.includes(y)
180
- ) && N();
180
+ ) && $();
181
181
  },
182
- [i, N]
183
- ), L(() => {
182
+ [i, $]
183
+ ), D(() => {
184
184
  S && p({
185
185
  title: u("ERROR_DEFAULT_TITLE"),
186
186
  message: u("ERROR_FETCHING_OBSERVATIONS"),
187
187
  type: "error"
188
188
  });
189
189
  }, [S]);
190
- const $ = g(() => {
190
+ const N = g(() => {
191
191
  if (!_) return [];
192
192
  let a = P(_);
193
193
  e === "latest-encounter" && (a = X(a));
@@ -197,7 +197,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], A = w || !v, D = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
200
+ ], A = V || !v, L = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = L ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = N.length > 0 && !A && !L, T = d.titleTranslationKey, f = T ? u(T) : "";
201
201
  return /* @__PURE__ */ I(
202
202
  "div",
203
203
  {
@@ -219,7 +219,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
219
219
  q ? /* @__PURE__ */ o(
220
220
  Oe,
221
221
  {
222
- groupedData: $,
222
+ groupedData: N,
223
223
  title: f,
224
224
  hideThumbnail: r
225
225
  }
@@ -1,4 +1,4 @@
1
- import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-qHxzHYCk.js";
1
+ import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-CXVD8oVf.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
- import { c1 as i, c2 as o } from "./index-qHxzHYCk.js";
1
+ import { c1 as i, c2 as o } from "./index-CXVD8oVf.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -115687,7 +115687,7 @@ const AL0 = [
115687
115687
  },
115688
115688
  {
115689
115689
  type: "patientDocuments",
115690
- component: P0(() => import("./DocumentsTable-CirHKvw9-C14hnZnd.js"))
115690
+ component: P0(() => import("./DocumentsTable-BCWUH3WY-yIxEOeqS.js"))
115691
115691
  },
115692
115692
  {
115693
115693
  type: "flowSheet",
@@ -115695,7 +115695,7 @@ const AL0 = [
115695
115695
  },
115696
115696
  {
115697
115697
  type: "forms",
115698
- component: P0(() => import("./FormsTable-CqUGhZ65-mzxEMwwT.js"))
115698
+ component: P0(() => import("./FormsTable-Bb-cDsSI-D6U8Jnch.js"))
115699
115699
  },
115700
115700
  {
115701
115701
  type: "labOrders",
@@ -115703,7 +115703,7 @@ const AL0 = [
115703
115703
  },
115704
115704
  {
115705
115705
  type: "observations",
115706
- component: P0(() => import("./Observations-BhAU90jX-s1YfkDul.js"))
115706
+ component: P0(() => import("./Observations-B5TN5tfi-DBfEHkT6.js"))
115707
115707
  },
115708
115708
  {
115709
115709
  type: "ordersControl",
@@ -211860,7 +211860,7 @@ var N1r = (t, e = !1) => {
211860
211860
  const e = of2(() => {
211861
211861
  const r = this, [n] = this.#n, [a] = this.#o, [l] = this.#a, [c] = this.#l, [i] = this.#p, [s] = this.#e;
211862
211862
  let d;
211863
- return this.#c ? d = this.#c : (d = rf2(() => import("./LNWAZHJI-DCXOn2QA.js")), this.#c = d), zf2(this.#h, this.#r), ef2(d, tf2({
211863
+ return this.#c ? d = this.#c : (d = rf2(() => import("./LNWAZHJI-BzOZnN3F.js")), this.#c = d), zf2(this.#h, this.#r), ef2(d, tf2({
211864
211864
  get queryFlavor() {
211865
211865
  return r.#d;
211866
211866
  },
@@ -211958,7 +211958,7 @@ var N1r = (t, e = !1) => {
211958
211958
  const e = of2(() => {
211959
211959
  const r = this, [n] = this.#n, [a] = this.#o, [l] = this.#a, [c] = this.#l, [i] = this.#p, [s] = this.#e, [d] = this.#c;
211960
211960
  let u;
211961
- return this.#i ? u = this.#i : (u = rf2(() => import("./MWZ6AO7Z-DDPI1559.js")), this.#i = u), zf2(this.#h, this.#r), ef2(u, tf2({
211961
+ return this.#i ? u = this.#i : (u = rf2(() => import("./MWZ6AO7Z-C-pbv8MM.js")), this.#i = u), zf2(this.#h, this.#r), ef2(u, tf2({
211962
211962
  get queryFlavor() {
211963
211963
  return r.#d;
211964
211964
  },
@@ -212114,7 +212114,7 @@ const FJt = {
212114
212114
  id: "clinical-config",
212115
212115
  name: "Clinical Config",
212116
212116
  displayName: "ClinicalConfigProvider"
212117
- }), nXt = P0(() => import("./ConsultationPage-BYmrmLYy.js")), oXt = P0(() => import("./index-CUk3F169.js")), aXt = [
212117
+ }), nXt = P0(() => import("./ConsultationPage-DlEUYH9D.js")), oXt = P0(() => import("./index-DIdgceKI.js")), aXt = [
212118
212118
  {
212119
212119
  path: ":patientUuid",
212120
212120
  component: nXt
@@ -1,11 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { u as g, k as u, bQ as b, b_ as f, b$ as x, c0 as _, aO as p, bW as N } from "./index-qHxzHYCk.js";
2
+ import { u as g, k as u, bQ as b, b_ as f, b$ as x, c0 as _, aO as p, bW as N } from "./index-CXVD8oVf.js";
3
3
  import { lazy as h, useMemo as t, Suspense as C } from "react";
4
4
  import "@tanstack/react-query";
5
- import { u as E } from "./hook-D8h3x6mN.js";
5
+ import { u as E } from "./hook-CTrQG8ZB.js";
6
6
  const L = {
7
7
  "org.bahmni.clinical.v2.search": h(
8
- () => import("./index-CUDJLcGC.js")
8
+ () => import("./index-Da-7cqE_.js")
9
9
  )
10
10
  }, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", O = "index-module_message__Ib5Iw", l = {
11
11
  page: v,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { u as r, cR as l, cS as o, cT as c, bg as m, bh as g, cU as h, cV as p, cW as b, aO as u } from "./index-qHxzHYCk.js";
2
+ import { u as r, cR as l, cS as o, cT as c, bg as m, bh as g, cU as h, cV as p, cW as b, aO as u } from "./index-CXVD8oVf.js";
3
3
  import { Suspense as _ } from "react";
4
4
  import "@tanstack/react-query";
5
5
  const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { cX as c } from "./index-qHxzHYCk.js";
1
+ import { cX as c } from "./index-CXVD8oVf.js";
2
2
  export {
3
3
  c as ClinicalApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/clinical-app",
3
- "version": "0.0.1-dev.440",
3
+ "version": "0.0.1-dev.441",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",