@bahmni/clinical-app 0.0.1-dev.275 → 0.0.1-dev.277

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 x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, f as J, b as X, m as Z, c as ee, n as te } from "./index-BVbeiVWG.js";
2
+ import { u as G, a as W, h as Y, f as J, b as X, m as Z, c as ee, n as te } from "./index-Bn_FvR7Q.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", 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 X, Fragment as Z } from "react/jsx-runtime";
2
- import { a as ee, u as re, g as ae, p as oe, d as te, e as se, i as ne, j as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, t as fe, l as ye } from "./index-BVbeiVWG.js";
2
+ import { a as ee, u as re, g as ae, p as oe, d as te, e as se, i as ne, j as de, R as S, m as ie, b as me, c as U, T as ue, C as le, n as ce, t as fe, l as ye } from "./index-Bn_FvR7Q.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 pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D5mWCuyJ.js";
2
- import { w as d, z as f, D as e } from "./index-BVbeiVWG.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cid41j6e.js";
2
+ import { w as d, z as f, D as e } from "./index-Bn_FvR7Q.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-D5mWCuyJ.js";
2
- import { w as v, z as C, D as e } from "./index-BVbeiVWG.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-Cid41j6e.js";
2
+ import { w as v, z as C, D as e } from "./index-Bn_FvR7Q.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 k, a as S, s as x, k as j, j as M, E as Q, y as X, V as w, A as G, c as H, o as z, q as L, v as P, x as J, r as Y, _ as W, B as Z, L as ee } from "./index-BVbeiVWG.js";
2
+ import { u as q, h as k, a as S, s as x, k as j, j as M, E as Q, y as X, V as w, A as G, c as H, o as z, q as L, v as P, x as J, r as Y, _ as W, B as Z, L as ee } from "./index-Bn_FvR7Q.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 A = (a, n, d, l, b, r) => {
@@ -1,4 +1,4 @@
1
- import { F as we, G as z, H as xt, I as B, z as q, D as y, P as Ro, J as ye, S as R, K as _, M as k, N, O as A, Q as bs, U 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-BVbeiVWG.js";
1
+ import { F as we, G as z, H as xt, I as B, z as q, D as y, P as Ro, J as ye, S as R, K as _, M as k, N, O as A, Q as bs, U 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-Bn_FvR7Q.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ObservationFormsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAuClC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ObservationFormsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAiDlC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -13,6 +13,7 @@ export declare function usePinnedObservationForms(availableForms: ObservationFor
13
13
  title: string;
14
14
  message: string;
15
15
  } | null;
16
+ refetch: () => void;
16
17
  };
17
18
  export {};
18
19
  //# sourceMappingURL=usePinnedObservationForms.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePinnedObservationForms.d.ts","sourceRoot":"","sources":["../../src/hooks/usePinnedObservationForms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAOtE,UAAU,gCAAgC;IACxC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,oDAAoD;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,eAAe,EAAE,EACjC,OAAO,CAAC,EAAE,gCAAgC;;wCAgFjB,eAAe,EAAE;;;eA3EE,MAAM;iBAAW,MAAM;;EA0GpE"}
1
+ {"version":3,"file":"usePinnedObservationForms.d.ts","sourceRoot":"","sources":["../../src/hooks/usePinnedObservationForms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAOtE,UAAU,gCAAgC;IACxC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,oDAAoD;IACpD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AACD,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,eAAe,EAAE,EACjC,OAAO,CAAC,EAAE,gCAAgC;;wCAgFjB,eAAe,EAAE;;;eA3EE,MAAM;iBAAW,MAAM;;;EA+GpE"}
@@ -169791,7 +169791,7 @@ const zpt = [
169791
169791
  },
169792
169792
  {
169793
169793
  type: "patientDocuments",
169794
- component: lazy$1(() => import("./DocumentsTable-CQlB57O3-CvKkkJ_i.js"))
169794
+ component: lazy$1(() => import("./DocumentsTable-CQlB57O3-C_AxP2Zg.js"))
169795
169795
  },
169796
169796
  {
169797
169797
  type: "flowSheet",
@@ -169799,7 +169799,7 @@ const zpt = [
169799
169799
  },
169800
169800
  {
169801
169801
  type: "forms",
169802
- component: lazy$1(() => import("./FormsTable-ByelMt32-BHgzNltm.js"))
169802
+ component: lazy$1(() => import("./FormsTable-ByelMt32-DCOKIEZL.js"))
169803
169803
  },
169804
169804
  {
169805
169805
  type: "labOrders",
@@ -169807,7 +169807,7 @@ const zpt = [
169807
169807
  },
169808
169808
  {
169809
169809
  type: "observations",
169810
- component: lazy$1(() => import("./Observations-C-8hfaLy-DD2V6z3n.js"))
169810
+ component: lazy$1(() => import("./Observations-C-8hfaLy-DwATxw2q.js"))
169811
169811
  },
169812
169812
  {
169813
169813
  type: "ordersControl",
@@ -171713,7 +171713,7 @@ var displayValue = (t, e = !1) => {
171713
171713
  const e = render(() => {
171714
171714
  const n = this, [r] = this.#r, [a] = this.#a, [l] = this.#o, [c] = this.#l, [g] = this.#h, [A] = this.#e;
171715
171715
  let w;
171716
- return this.#i ? w = this.#i : (w = lazy(() => import("./LNWAZHJI-CmMSiHDu.js")), this.#i = w), setupStyleSheet(this.#d, this.#n), createComponent(w, mergeProps({
171716
+ return this.#i ? w = this.#i : (w = lazy(() => import("./LNWAZHJI-DV4GMs1N.js")), this.#i = w), setupStyleSheet(this.#d, this.#n), createComponent(w, mergeProps({
171717
171717
  get queryFlavor() {
171718
171718
  return n.#f;
171719
171719
  },
@@ -171811,7 +171811,7 @@ var displayValue = (t, e = !1) => {
171811
171811
  const e = render(() => {
171812
171812
  const n = this, [r] = this.#r, [a] = this.#a, [l] = this.#o, [c] = this.#l, [g] = this.#h, [A] = this.#e, [w] = this.#i;
171813
171813
  let _;
171814
- return this.#s ? _ = this.#s : (_ = lazy(() => import("./MWZ6AO7Z-DVasR7iK.js")), this.#s = _), setupStyleSheet(this.#d, this.#n), createComponent(_, mergeProps({
171814
+ return this.#s ? _ = this.#s : (_ = lazy(() => import("./MWZ6AO7Z-CRmpbDu1.js")), this.#s = _), setupStyleSheet(this.#d, this.#n), createComponent(_, mergeProps({
171815
171815
  get queryFlavor() {
171816
171816
  return n.#f;
171817
171817
  },
@@ -229310,32 +229310,32 @@ function usePinnedObservationForms(t, e) {
229310
229310
  }, [t]), useEffect(() => {
229311
229311
  n !== b.current && (g(!1), l([]), w(null), b.current = null);
229312
229312
  }, [n]), useEffect(() => {
229313
- const O = async () => {
229313
+ const z = async () => {
229314
229314
  if (!n) {
229315
229315
  g(!0), b.current = null;
229316
229316
  return;
229317
229317
  }
229318
229318
  w(null);
229319
229319
  try {
229320
- const z = await loadPinnedForms(n), $ = _.current;
229321
- if (z.length > 0 && $.length > 0) {
229322
- const S = $.filter(
229323
- (x) => z.includes(x.name)
229320
+ const $ = await loadPinnedForms(n), S = _.current;
229321
+ if ($.length > 0 && S.length > 0) {
229322
+ const x = S.filter(
229323
+ (H) => $.includes(H.name)
229324
229324
  );
229325
- l(S);
229325
+ l(x);
229326
229326
  } else
229327
229327
  l([]);
229328
- } catch (z) {
229329
- const $ = Mr$1(z);
229330
- w($), l([]);
229328
+ } catch ($) {
229329
+ const S = Mr$1($);
229330
+ w(S), l([]);
229331
229331
  } finally {
229332
229332
  g(!0), b.current = n;
229333
229333
  }
229334
229334
  };
229335
- c || r || (n ? t.length > 0 ? O() : (g(!0), l([]), b.current = n) : (g(!0), b.current = null));
229335
+ c || r || (n ? t.length > 0 ? z() : (g(!0), l([]), b.current = n) : (g(!0), b.current = null));
229336
229336
  }, [t.length, c, n, r]);
229337
229337
  const M = useCallback(
229338
- async (O) => {
229338
+ async (z) => {
229339
229339
  if (!n) {
229340
229340
  w({
229341
229341
  title: "Unable to save pinned forms",
@@ -229343,20 +229343,22 @@ function usePinnedObservationForms(t, e) {
229343
229343
  });
229344
229344
  return;
229345
229345
  }
229346
- l(O);
229346
+ l(z);
229347
229347
  try {
229348
229348
  await savePinnedForms(
229349
229349
  n,
229350
- O.map((z) => z.name)
229350
+ z.map(($) => $.name)
229351
229351
  );
229352
- } catch (z) {
229353
- const $ = Mr$1(z);
229354
- w($);
229352
+ } catch ($) {
229353
+ const S = Mr$1($);
229354
+ w(S);
229355
229355
  }
229356
229356
  },
229357
229357
  [n]
229358
- );
229359
- return { pinnedForms: a, updatePinnedForms: M, isLoading: !c, error: A };
229358
+ ), V = useCallback(() => {
229359
+ g(!1), b.current = null;
229360
+ }, []);
229361
+ return { pinnedForms: a, updatePinnedForms: M, isLoading: !c, error: A, refetch: V };
229360
229362
  }
229361
229363
  const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0bI", observationFormsTitle = "ObservationForms-module_observationFormsTitle__J5ply", styles$7 = {
229362
229364
  observationFormsTile,
@@ -229542,26 +229544,29 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
229542
229544
  );
229543
229545
  ObservationForms.displayName = "ObservationForms";
229544
229546
  const ObservationFormsPanel = () => {
229545
- const { user: t } = M6t(), { episodeOfCare: e } = useClinicalAppData(), n = e.map((V) => V.uuid), {
229547
+ const { user: t } = M6t(), { episodeOfCare: e } = useClinicalAppData(), n = e.map(($) => $.uuid), {
229546
229548
  forms: r,
229547
229549
  isLoading: a,
229548
229550
  error: l
229549
229551
  } = useObservationFormsSearch("", n), {
229550
229552
  pinnedForms: c,
229551
229553
  updatePinnedForms: g,
229552
- isLoading: A
229554
+ isLoading: A,
229555
+ refetch: w
229553
229556
  } = usePinnedObservationForms(r, {
229554
229557
  userUuid: t?.uuid,
229555
229558
  isFormsLoading: a
229556
- }), { selectedForms: w, addForm: _, removeForm: b } = useObservationFormsStore();
229557
- return /* @__PURE__ */ jsx(
229559
+ }), { selectedForms: _, addForm: b, removeForm: M, viewingForm: V } = useObservationFormsStore(), O = useRef(V);
229560
+ return useEffect(() => {
229561
+ O.current && !V && w(), O.current = V;
229562
+ }, [V, w]), /* @__PURE__ */ jsx(
229558
229563
  ObservationForms,
229559
229564
  {
229560
- onFormSelect: (V) => {
229561
- _(V);
229565
+ onFormSelect: ($) => {
229566
+ b($);
229562
229567
  },
229563
- selectedForms: w,
229564
- onRemoveForm: b,
229568
+ selectedForms: _,
229569
+ onRemoveForm: M,
229565
229570
  pinnedForms: c,
229566
229571
  updatePinnedForms: g,
229567
229572
  isPinnedFormsLoading: A,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { at as i } from "./index-BVbeiVWG.js";
1
+ import { at as i } from "./index-Bn_FvR7Q.js";
2
2
  export {
3
3
  i 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.275",
3
+ "version": "0.0.1-dev.277",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",