@bahmni/appointments-app 0.0.1-dev.230 → 0.0.1-dev.231

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 _, Fragment as Y } from "react/jsx-runtime";
2
- import { t as K, u as Q, r as W, a as J, x as X, N as Z, o as ee, s as te, p as ae } from "./index-D9l2Pf2N.js";
2
+ import { t as K, u as Q, r as W, a as J, x as X, V as Z, o as ee, s as te, p as ae } from "./index-C5kAkfzb.js";
3
3
  import { useState as l, useCallback as h, useEffect as f, 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,
@@ -37,7 +37,7 @@ const pe = [
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), M = h((e) => {
40
+ ), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, V] = l($), [k, y] = l(void 0), M = h((e) => {
41
41
  L(e), w(!0);
42
42
  }, []), F = h(() => {
43
43
  w(!1), L(null), I(/* @__PURE__ */ new Set());
@@ -90,7 +90,7 @@ const pe = [
90
90
  }, [s, o]);
91
91
  const q = h(
92
92
  (e, t) => {
93
- t !== m ? (k(t), A(1), y(void 0)) : A(e);
93
+ t !== m ? (V(t), A(1), y(void 0)) : A(e);
94
94
  },
95
95
  [m]
96
96
  ), N = T(
@@ -151,7 +151,7 @@ const pe = [
151
151
  className: d.documentsTableBody,
152
152
  dataTestId: "documents-table",
153
153
  pageSize: m,
154
- totalItems: V,
154
+ totalItems: k,
155
155
  page: C,
156
156
  onPageChange: q
157
157
  }
@@ -1,25 +1,25 @@
1
1
  import { jsx as o, jsxs as W, Fragment as X } from "react/jsx-runtime";
2
- import { u as Z, t as ee, g as re, b as ae, a as c, k as te, V as v, N as se, x as oe, o as q, J as ne, Q as de, s as ie, c as ue, d as me, h as le, e as ce, f as fe, i as ye } from "./index-D9l2Pf2N.js";
2
+ import { u as Z, t as ee, g as re, b as ae, a as c, k as te, c as v, V as se, x as oe, o as q, J as ne, Q as de, s as ie, d as ue, e as me, h as le, f as ce, i as fe, j as ye } from "./index-C5kAkfzb.js";
3
3
  import { useState as C, useMemo as d, useCallback as f } from "react";
4
- const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
4
+ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
5
5
  formsTableBody: be,
6
- customAccordianItem: Ne
7
- }, ge = (u) => u ? u.extension?.find(
6
+ customAccordianItem: ge
7
+ }, he = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
9
  )?.valueString : void 0, Oe = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
12
  config: S
13
13
  }) => {
14
- const { t: s } = Z(), m = ee(), [l, O] = C(!1), [t, A] = C(null), { numberOfVisits: k, hideThumbnail: x = !1 } = S ?? {}, T = re(
14
+ const { t: s } = Z(), m = ee(), [l, O] = C(!1), [t, A] = C(null), { numberOfVisits: k, hideThumbnail: V = !1 } = S ?? {}, T = re(
15
15
  u,
16
16
  n
17
- ), V = ae(), {
17
+ ), x = ae(), {
18
18
  data: y = [],
19
19
  isLoading: B,
20
20
  isError: E,
21
- error: H,
22
- refetch: K
21
+ error: j,
22
+ refetch: H
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
25
  queryFn: () => le(m, void 0, k),
@@ -36,18 +36,18 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
36
36
  if (t)
37
37
  return L(t.formName);
38
38
  }, [t, L]), {
39
- isLoading: Q,
40
- isError: j,
41
- error: N
39
+ isLoading: K,
40
+ isError: Q,
41
+ error: g
42
42
  } = c({
43
43
  queryKey: ["formMetadata", b],
44
44
  queryFn: () => fe(b),
45
45
  enabled: !!b && l
46
46
  }), {
47
- data: g,
47
+ data: h,
48
48
  isLoading: $,
49
49
  isError: w,
50
- error: h
50
+ error: p
51
51
  } = c({
52
52
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
53
53
  queryFn: () => ye(t.encounterUuid),
@@ -55,19 +55,19 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
55
55
  });
56
56
  te(
57
57
  (e) => {
58
- e.patientUUID === m && e.updatedConcepts.size > 0 && (K(), V.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
58
+ e.patientUUID === m && e.updatedConcepts.size > 0 && (H(), x.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
59
  },
60
60
  [m]
61
61
  );
62
- const z = d(() => !g?.entry || !t?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
63
- const r = ge(e);
62
+ const z = d(() => !h?.entry || !t?.formName ? [] : h.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
63
+ const r = he(e);
64
64
  return !r || r.includes(t.formName);
65
- }), [g, t?.formName]), G = d(() => {
66
- if (N)
67
- return v(N).message;
68
- if (h)
69
- return v(h).message;
70
- }, [N, h]), M = d(
65
+ }), [h, t?.formName]), G = d(() => {
66
+ if (g)
67
+ return v(g).message;
68
+ if (p)
69
+ return v(p).message;
70
+ }, [g, p]), M = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: s("RECORDED_ON") },
73
73
  { key: "recordedBy", header: s("RECORDED_BY") }
@@ -84,12 +84,12 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
87
- const p = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
87
+ const N = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
88
88
  return r[i].push({
89
89
  id: a.encounterUuid,
90
90
  formName: a.formName,
91
91
  recordedOn: se(a.encounterDateTime, s, !0).formattedResult,
92
- recordedBy: p ?? "--",
92
+ recordedBy: N ?? "--",
93
93
  encounterDateTime: a.encounterDateTime,
94
94
  encounterUuid: a.encounterUuid
95
95
  }), r;
@@ -100,7 +100,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
100
100
  ([r, a]) => ({
101
101
  formName: r,
102
102
  records: a.sort(
103
- (i, p) => p.encounterDateTime - i.encounterDateTime
103
+ (i, N) => N.encounterDateTime - i.encounterDateTime
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
@@ -129,7 +129,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
129
129
  ariaLabel: s("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: B,
132
- errorStateMessage: E ? H?.message : void 0,
132
+ errorStateMessage: E ? j?.message : void 0,
133
133
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
134
134
  renderCell: U,
135
135
  className: I.formsTableBody,
@@ -179,12 +179,12 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
179
179
  ue,
180
180
  {
181
181
  observations: z,
182
- isLoading: Q || $,
183
- isError: j || w,
182
+ isLoading: K || $,
183
+ isError: Q || w,
184
184
  errorMessage: G,
185
185
  emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
186
186
  testIdPrefix: t.formName,
187
- hideThumbnail: x
187
+ hideThumbnail: V
188
188
  }
189
189
  )
190
190
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D7x06CwS.js";
2
- import { X as d, Y as f, Z as e } from "./index-D9l2Pf2N.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DTDeILzh.js";
2
+ import { X as d, Y as f, Z as e } from "./index-C5kAkfzb.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-D7x06CwS.js";
2
- import { X as v, Y as C, Z as e } from "./index-D9l2Pf2N.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-DTDeILzh.js";
2
+ import { X as v, Y as C, Z as e } from "./index-C5kAkfzb.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 N, jsx as u } from "react/jsx-runtime";
2
- import { t as k, r as w, u as S, j as K, l as M, a as P, k as Q, v as j, E as x, y as G, m as H, o as z, w as Y, P as U, n as J, q as W, B as X, z as Z, _ as ee, A as ae, C as te } from "./index-D9l2Pf2N.js";
2
+ import { t as k, r as w, u as S, l as K, m as M, a as P, k as Q, v as x, E as G, y as H, n as j, o as z, w as Y, P as D, q as J, z as W, B as X, A as Z, _ as ee, C as ae, D as te } from "./index-C5kAkfzb.js";
3
3
  import { useRef as se, useEffect as $, useMemo as g } from "react";
4
- const A = (a, n, d, l, b, r) => {
4
+ const U = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
6
6
  let o = s;
7
7
  i === "Image" && (o = /* @__PURE__ */ u(
@@ -36,13 +36,13 @@ const A = (a, n, d, l, b, r) => {
36
36
  `obs-${a.id}`
37
37
  );
38
38
  }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
39
- U,
39
+ D,
40
40
  {
41
41
  title: a.display,
42
42
  id: `grouped-obs-${a.display}-${l}`,
43
43
  open: d,
44
44
  children: a.members?.map(
45
- (s, i) => A(
45
+ (s, i) => U(
46
46
  s,
47
47
  i,
48
48
  b,
@@ -61,14 +61,14 @@ const A = (a, n, d, l, b, r) => {
61
61
  const { t: l } = S(), b = (r, t, s) => {
62
62
  const i = Y(r.encounterDetails, l);
63
63
  return /* @__PURE__ */ N(
64
- U,
64
+ D,
65
65
  {
66
66
  title: i,
67
67
  id: `encounter-${r.encounterId}`,
68
68
  open: t,
69
69
  children: [
70
70
  r.observations.map(
71
- (o, m) => A(
71
+ (o, m) => U(
72
72
  o,
73
73
  m,
74
74
  s,
@@ -133,7 +133,7 @@ const A = (a, n, d, l, b, r) => {
133
133
  }, [o, d]);
134
134
  const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
135
135
  data: c,
136
- isLoading: D,
136
+ isLoading: A,
137
137
  isError: R,
138
138
  refetch: T
139
139
  } = P({
@@ -157,13 +157,13 @@ const A = (a, n, d, l, b, r) => {
157
157
  }, [R]);
158
158
  const _ = g(() => {
159
159
  if (!c) return [];
160
- const e = j(c), h = x(e);
161
- return G(h);
160
+ const e = x(c), h = G(e);
161
+ return H(h);
162
162
  }, [c]), F = [
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], f = D || !y, O = R && y, q = (!c || c.entry?.length === 0 || p.length === 0) && y, B = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = q ? i("NO_OBSERVATIONS_FOUND") : void 0, L = _.length > 0 && !f && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
166
+ ], f = A || !y, O = R && y, q = (!c || c.entry?.length === 0 || p.length === 0) && y, B = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = q ? i("NO_OBSERVATIONS_FOUND") : void 0, L = _.length > 0 && !f && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
167
167
  return /* @__PURE__ */ N(
168
168
  "div",
169
169
  {
@@ -173,7 +173,7 @@ const A = (a, n, d, l, b, r) => {
173
173
  className: I.observations,
174
174
  children: [
175
175
  /* @__PURE__ */ u(
176
- H,
176
+ j,
177
177
  {
178
178
  id: "observations-title",
179
179
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, Y as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-D9l2Pf2N.js";
1
+ import { $ as we, a0 as z, a1 as xt, a2 as B, Y as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-C5kAkfzb.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {