@bahmni/clinical-app 0.0.1-dev.184 → 0.0.1-dev.186

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 { jsxs as Z, jsx as i, Fragment as Bt } from "react/jsx-runtime";
2
- import { M as Rt, u as It, p as St, a as bt, j as kt, b as Wt, Y as Ut, P as $t, T as o, O as l, G as jt } from "./index-C5-I5K00.js";
2
+ import { M as Rt, u as It, p as St, a as bt, j as kt, b as Wt, Y as Ut, P as $t, T as o, O as l, G as jt } from "./index-BoRekX1d.js";
3
3
  import e, { useState as x, useCallback as V, useEffect as qt, useMemo as u } from "react";
4
4
  var N, A, L, C, y, _, T, O, D, B, R, I, S, b, k, W, U, $, j, q, F, K, P, Y, G, Q, J, X, e2, r2, t2, c2, n2, o2, l2, h2, a2, i2, s2, p2, w2, v2, d2, f2, m2, E2, V2, u2, H2, M2, z2, g2, Z2, x2, N2, A2, L2, C2, y2, _2, T2, O2, D2, B2, R2, I2, S2, b2, k2, W2, U2, $2, j2, q2, F2, K2, P2, Y2, G2, Q2, J2, X2, e1, r1, t1, c1, n1, o1, l1, h1, a1, i1, s1, p1, w1, v1, d1, f1, m1, E1, V1, u1, H1, M1, z1, g1, Z1, x1, N1, A1, L1, C1, y1, _1, T1, O1, D1, B1, R1, I1, S1, b1, k1, W1, U1, $1, j1, q1, F1, K1, P1, Y1, G1, Q1, J1, X1, e0, r0, t0, c0, n0, o0, l0, h0, a0, i0, s0, p0, w0, v0, d0, f0, m0, E0, V0, u0, H0, M0, z0, g0, Z0, x0, N0, A0, L0, C0, y0, _0, T0, O0, D0, B0, R0, I0, S0, b0, k0, W0, U0, $0, j0, q0, F0, K0, P0, Y0, G0, Q0, J0, X0, ee, re, te, ce, ne, oe, le, he, ae, ie, se, pe, we, ve, de, fe, me, Ee, Ve, ue, He, Me, ze, ge, Ze, xe;
5
5
  const Ne = {}, Ft = /* @__PURE__ */ e.forwardRef(function({
@@ -1,8 +1,8 @@
1
1
  import { jsx as s, jsxs as p, Fragment as P } from "react/jsx-runtime";
2
- import { u as ee, M as re, i as ae, c as te, a as A, S as oe, j as ne, C as se, b as U, f as de, m as me, Y as ie, V as le, d as q, e as ce, P as ue, g as F, h as be, y as pe, x as fe, k as _e, F as $e, l as ve, q as ge, K as he, U as ye } from "./index-C5-I5K00.js";
2
+ import { u as ee, M as re, i as ae, c as te, a as A, S as oe, j as ne, C as se, b as U, f as de, m as me, Y as ie, V as le, d as q, e as ce, P as ue, g as F, h as be, y as pe, x as fe, k as _e, F as $e, l as ve, q as ge, K as he, U as Ne } from "./index-BoRekX1d.js";
3
3
  import { useState as z, useMemo as h, useCallback as C } from "react";
4
- const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Me = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", Ie = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", De = "_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", o = {
5
- formsTableBody: Ne,
4
+ const ye = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Me = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", Ie = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", xe = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", we = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", o = {
5
+ formsTableBody: ye,
6
6
  customAccordianItem: Ae,
7
7
  formContent: Ce,
8
8
  formDetailsContainer: Fe,
@@ -14,9 +14,9 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
14
14
  rowValue: Ie,
15
15
  groupMembers: Se,
16
16
  memberRow: Te,
17
- memberLabel: De,
18
- memberValue: we,
19
- abnormalValue: xe,
17
+ memberLabel: xe,
18
+ memberValue: De,
19
+ abnormalValue: we,
20
20
  commentSection: Ee,
21
21
  commentText: Be,
22
22
  nestedGroup: Ge,
@@ -64,15 +64,15 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
64
64
  {
65
65
  className: o.nestedGroupMembers,
66
66
  "data-testid": `${t}obs-nested-group-members-${m}-${n}`,
67
- children: e.members?.map((y, N) => /* @__PURE__ */ s(
67
+ children: e.members?.map((N, y) => /* @__PURE__ */ s(
68
68
  k,
69
69
  {
70
- member: y,
70
+ member: N,
71
71
  depth: r + 1,
72
- memberIndex: N,
72
+ memberIndex: y,
73
73
  formName: a
74
74
  },
75
- `${y.id}`
75
+ `${N.id}`
76
76
  ))
77
77
  }
78
78
  )
@@ -246,7 +246,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
246
246
  ].filter(
247
247
  ({ formFieldPath: a }) => !a || a.includes(r)
248
248
  );
249
- }, Ze = ({
249
+ }, We = ({
250
250
  episodeOfCareUuids: e,
251
251
  encounterUuids: r,
252
252
  config: n
@@ -256,8 +256,8 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
256
256
  r
257
257
  ), _ = te(), {
258
258
  data: $ = [],
259
- isLoading: y,
260
- isError: N,
259
+ isLoading: N,
260
+ isError: y,
261
261
  error: H,
262
262
  refetch: Y
263
263
  } = A({
@@ -281,11 +281,11 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
281
281
  enabled: !!R && c
282
282
  }), {
283
283
  data: L,
284
- isLoading: Z,
285
- error: D
284
+ isLoading: W,
285
+ error: x
286
286
  } = A({
287
287
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
288
- queryFn: () => ye(t.encounterUuid),
288
+ queryFn: () => Ne(t.encounterUuid),
289
289
  enabled: !!t?.encounterUuid && c
290
290
  });
291
291
  oe(
@@ -294,10 +294,10 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
294
294
  },
295
295
  [d]
296
296
  );
297
- const w = h(() => !L || !t?.formName ? [] : ke(
297
+ const D = h(() => !L || !t?.formName ? [] : ke(
298
298
  L,
299
299
  t.formName
300
- ), [L, t?.formName]), x = h(
300
+ ), [L, t?.formName]), w = h(
301
301
  () => [
302
302
  { key: "recordedOn", header: a("FORM_RECORDED_ON") },
303
303
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
@@ -314,7 +314,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
314
314
  (u, l) => {
315
315
  const g = l.formName;
316
316
  u[g] ??= [];
317
- const M = l.providers.map((X) => X.providerName).filter(Boolean).join(", ");
317
+ const M = l.providers.map((Z) => Z.providerName).filter(Boolean).join(", ");
318
318
  return u[g].push({
319
319
  id: l.encounterUuid,
320
320
  formName: l.formName,
@@ -336,7 +336,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
336
336
  ).sort((u, l) => u.formName.localeCompare(l.formName));
337
337
  }, [V, a]), B = C((i) => {
338
338
  b(i), m(!0);
339
- }, []), W = C(() => {
339
+ }, []), X = C(() => {
340
340
  m(!1), b(null);
341
341
  }, []), G = C(
342
342
  (i, u) => {
@@ -352,14 +352,14 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
352
352
  [B]
353
353
  );
354
354
  return /* @__PURE__ */ p(P, { children: [
355
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: y || N || E.length === 0 || f ? /* @__PURE__ */ s(
355
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: N || y || E.length === 0 || f ? /* @__PURE__ */ s(
356
356
  U,
357
357
  {
358
- headers: x,
358
+ headers: w,
359
359
  ariaLabel: a("FORMS_HEADING"),
360
360
  rows: [],
361
- loading: y,
362
- errorStateMessage: N ? H?.message : void 0,
361
+ loading: N,
362
+ errorStateMessage: y ? H?.message : void 0,
363
363
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
364
364
  renderCell: G,
365
365
  className: o.formsTableBody,
@@ -377,7 +377,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
377
377
  children: /* @__PURE__ */ s(
378
378
  U,
379
379
  {
380
- headers: x,
380
+ headers: w,
381
381
  ariaLabel: a("FORMS_HEADING"),
382
382
  rows: g,
383
383
  loading: !1,
@@ -399,13 +399,13 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
399
399
  id: "modalIdForActionAreaLayout",
400
400
  portalId: "main-display-area",
401
401
  open: c,
402
- onRequestClose: W,
402
+ onRequestClose: X,
403
403
  modalHeading: t.formName,
404
404
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
405
405
  passiveModal: !0,
406
406
  size: "md",
407
407
  testId: "form-details-modal",
408
- children: /* @__PURE__ */ s("div", { className: o.formContent, children: Q || Z ? /* @__PURE__ */ s(le, { width: "100%", lineCount: 3 }) : T ? /* @__PURE__ */ s("div", { children: q(T).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : D ? /* @__PURE__ */ s("div", { children: q(D).message ?? a("ERROR_FETCHING_FORM_DATA") }) : w.length > 0 ? /* @__PURE__ */ s("div", { className: o.formDetailsContainer, children: w.map(({ obs: i, comment: u }, l) => /* @__PURE__ */ s(
408
+ children: /* @__PURE__ */ s("div", { className: o.formContent, children: Q || W ? /* @__PURE__ */ s(le, { width: "100%", lineCount: 3 }) : T ? /* @__PURE__ */ s("div", { children: q(T).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : x ? /* @__PURE__ */ s("div", { children: q(x).message ?? a("ERROR_FETCHING_FORM_DATA") }) : D.length > 0 ? /* @__PURE__ */ s("div", { className: o.formDetailsContainer, children: D.map(({ obs: i, comment: u }, l) => /* @__PURE__ */ s(
409
409
  ze,
410
410
  {
411
411
  observation: i,
@@ -420,5 +420,5 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
420
420
  ] });
421
421
  };
422
422
  export {
423
- Ze as default
423
+ We as default
424
424
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D0NXgCAg.js";
2
- import { $ as d, a0 as f, a1 as e } from "./index-C5-I5K00.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CIvJgMR2.js";
2
+ import { $ as d, a0 as f, a1 as e } from "./index-BoRekX1d.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-D0NXgCAg.js";
2
- import { $ as v, a0 as C, a1 as e } from "./index-C5-I5K00.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-CIvJgMR2.js";
2
+ import { $ as v, a0 as C, a1 as e } from "./index-BoRekX1d.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 D, jsx as v } from "react/jsx-runtime";
2
- import { n as U, o as _, r as P, Q as L, c as V, s as K, t as G, v as j, w as W, z as J, A as X, B as T, D as N, E as Y, H as Z, M as ee, p as se, u as M, I as te, a as re, S as ie, e as ne, J as oe, L as ae, R as ue, b as ce, N as le, W as k, X as he, h as de, Z as pe, y as be, x as fe, k as ye, _ as ve } from "./index-C5-I5K00.js";
2
+ import { n as U, o as w, r as P, Q as L, c as V, s as K, t as G, v as j, w as W, z as J, A as X, B as T, D as N, E as Y, H as Z, M as ee, p as se, u as M, I as te, a as re, S as ie, e as ne, J as oe, L as ae, R as ue, b as ce, N as le, W as k, X as he, h as de, Z as pe, y as be, x as fe, k as ye, _ as ve } from "./index-BoRekX1d.js";
3
3
  import * as E from "react";
4
4
  import { useRef as me, useEffect as I, useMemo as C } from "react";
5
5
  function $(e, s) {
@@ -47,7 +47,7 @@ var Oe = class extends U {
47
47
  "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
48
48
  );
49
49
  }
50
- _.batch(() => {
50
+ w.batch(() => {
51
51
  const t = this.#s, i = this.#h(this.#i);
52
52
  this.#u = i, i.forEach(
53
53
  (n) => n.observer.setOptions(n.defaultedQueryOptions)
@@ -123,7 +123,7 @@ var Oe = class extends U {
123
123
  #p() {
124
124
  if (this.hasListeners()) {
125
125
  const e = this.#t, s = this.#c(this.#e, this.#u), t = this.#l(s, this.#n?.combine);
126
- e !== t && _.batch(() => {
126
+ e !== t && w.batch(() => {
127
127
  this.listeners.forEach((i) => {
128
128
  i(this.#e);
129
129
  });
@@ -159,7 +159,7 @@ function ge({
159
159
  ), f = !r && s.subscribed !== !1;
160
160
  E.useSyncExternalStore(
161
161
  E.useCallback(
162
- (l) => f ? n.subscribe(_.batchCalls(l)) : X,
162
+ (l) => f ? n.subscribe(w.batchCalls(l)) : X,
163
163
  [n, f]
164
164
  ),
165
165
  () => n.getCurrentResult(),
@@ -275,10 +275,10 @@ const z = (e, s, t, i, r) => {
275
275
  }, Qe = "_observations_kfbhq_1", Ce = "_title_kfbhq_12", q = {
276
276
  observations: Qe,
277
277
  title: Ce
278
- }, _e = (e) => ["conceptUuid", e], we = (e, s) => ["observations", e, ...s], $e = ({ config: e }) => {
278
+ }, we = (e) => ["conceptUuid", e], _e = (e, s) => ["observations", e, ...s], $e = ({ config: e }) => {
279
279
  const s = e, { conceptNames: t = [], conceptUuid: i = [] } = s, r = me(/* @__PURE__ */ new Set()), o = ee(), { addNotification: a } = se(), { t: n } = M(), u = ge({
280
280
  queries: t.map((c) => ({
281
- queryKey: _e(c),
281
+ queryKey: we(c),
282
282
  queryFn: () => te(c),
283
283
  enabled: !!c
284
284
  }))
@@ -301,7 +301,7 @@ const z = (e, s, t, i, r) => {
301
301
  isError: R,
302
302
  refetch: l
303
303
  } = re({
304
- queryKey: we(o, b),
304
+ queryKey: _e(o, b),
305
305
  queryFn: () => ve(o, b),
306
306
  enabled: !!o && b.length > 0 && f
307
307
  });
@@ -327,7 +327,7 @@ const z = (e, s, t, i, r) => {
327
327
  { key: "name", header: "name" },
328
328
  { key: "value", header: "value" },
329
329
  { key: "form", header: "form" }
330
- ], O = S || !f, w = R && f, A = (!y || y.entry?.length === 0 || b.length === 0) && f, x = w ? n("ERROR_FETCHING_OBSERVATIONS") : null, B = A ? n("NO_OBSERVATIONS_FOUND") : void 0, F = d.length > 0 && !O && !w, Q = s.titleTranslationKey, g = Q ? n(Q) : "";
330
+ ], O = S || !f, _ = R && f, A = (!y || y.entry?.length === 0 || b.length === 0) && f, x = _ ? n("ERROR_FETCHING_OBSERVATIONS") : null, B = A ? n("NO_OBSERVATIONS_FOUND") : void 0, F = d.length > 0 && !O && !_, Q = s.titleTranslationKey, g = Q ? n(Q) : "";
331
331
  return /* @__PURE__ */ D(
332
332
  "div",
333
333
  {
@@ -363,7 +363,7 @@ const z = (e, s, t, i, r) => {
363
363
  );
364
364
  };
365
365
  export {
366
- _e as conceptUuidQueryKeys,
366
+ we as conceptUuidQueryKeys,
367
367
  $e as default,
368
- we as observationsQueryKeys
368
+ _e as observationsQueryKeys
369
369
  };
@@ -1,4 +1,4 @@
1
- import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-C5-I5K00.js";
1
+ import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-BoRekX1d.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {