@bahmni/appointments-app 0.0.1-dev.221 → 0.0.1-dev.223

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 Y } from "react/jsx-runtime";
2
- import { t as K, u as Q, r as W, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-B7sr9NqR.js";
2
+ import { t as W, u as K, r as Q, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-Dl3ODFla.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 _e = [
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
40
+ ), E = W(), { t: n } = K(), { addNotification: L } = Q(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
41
41
  M(e), w(!0);
42
42
  }, []), F = h(() => {
43
43
  w(!1), M(null), I(/* @__PURE__ */ new Set());
@@ -1,17 +1,17 @@
1
1
  import { jsx as o, jsxs as Y, Fragment as Z } from "react/jsx-runtime";
2
- import { u as W, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as S, G as ne, J as de, s as ie, Z as ue, d as me, e as le, X as ce, f as fe, Q as ye } from "./index-B7sr9NqR.js";
3
- import { useState as q, useMemo as d, useCallback as f } from "react";
4
- const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
5
- formsTableBody: Ne,
6
- customAccordianItem: be
2
+ import { u as W, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as C, G as ne, J as de, s as ie, Z as ue, d as me, e as le, X as ce, f as fe, Q as ye } from "./index-Dl3ODFla.js";
3
+ import { useState as S, useMemo as d, useCallback as f } from "react";
4
+ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
5
+ formsTableBody: be,
6
+ customAccordianItem: Ne
7
7
  }, pe = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
- )?.valueString : void 0, Oe = ({
9
+ )?.valueString : void 0, Ae = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
- config: C
12
+ config: q
13
13
  }) => {
14
- const { t: s } = W(), m = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: k, hideThumbnail: V = !1 } = C ?? {}, M = re(
14
+ const { t: s } = W(), m = ee(), [l, A] = S(!1), [t, I] = S(null), { numberOfVisits: k, hideThumbnail: V = !1 } = q ?? {}, M = re(
15
15
  u,
16
16
  n
17
17
  ), G = ae(), {
@@ -26,23 +26,23 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
26
26
  enabled: !!m && !M
27
27
  }), E = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
- ), [y, n]), { data: F = [] } = c({
29
+ ), [y, n]), { data: _ = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
- }), _ = f(
33
- (e) => F.find((r) => r.name === e)?.uuid,
34
- [F]
35
- ), N = d(() => {
32
+ }), D = f(
33
+ (e) => _.find((r) => r.name === e)?.uuid,
34
+ [_]
35
+ ), b = d(() => {
36
36
  if (t)
37
- return _(t.formName);
38
- }, [t, _]), {
37
+ return D(t.formName);
38
+ }, [t, D]), {
39
39
  isLoading: Q,
40
40
  isError: j,
41
- error: b
41
+ error: N
42
42
  } = c({
43
- queryKey: ["formMetadata", N],
44
- queryFn: () => fe(N),
45
- enabled: !!N && l
43
+ queryKey: ["formMetadata", b],
44
+ queryFn: () => fe(b),
45
+ enabled: !!b && l
46
46
  }), {
47
47
  data: p,
48
48
  isLoading: x,
@@ -63,11 +63,11 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
63
63
  const r = pe(e);
64
64
  return !r || r.includes(t.formName);
65
65
  }), [p, t?.formName]), z = d(() => {
66
- if (b)
67
- return U(b).message;
66
+ if (N)
67
+ return U(N).message;
68
68
  if (g)
69
69
  return U(g).message;
70
- }, [b, g]), L = d(
70
+ }, [N, g]), F = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: s("RECORDED_ON") },
73
73
  { key: "recordedBy", header: s("RECORDED_BY") }
@@ -79,7 +79,7 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
79
79
  { key: "recordedBy", sortable: !0 }
80
80
  ],
81
81
  []
82
- ), D = d(() => {
82
+ ), L = d(() => {
83
83
  const e = E.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
@@ -105,9 +105,9 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
107
  }, [E, s]), R = f((e) => {
108
- A(e), O(!0);
108
+ I(e), A(!0);
109
109
  }, []), P = f(() => {
110
- O(!1), A(null);
110
+ A(!1), I(null);
111
111
  }, []), v = f(
112
112
  (e, r) => {
113
113
  switch (r) {
@@ -122,32 +122,32 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
122
122
  [R]
123
123
  );
124
124
  return /* @__PURE__ */ Y(Z, { children: [
125
- /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || D.length === 0 || M ? /* @__PURE__ */ o(
126
- S,
125
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ o(
126
+ C,
127
127
  {
128
- headers: L,
128
+ headers: F,
129
129
  ariaLabel: s("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: T,
132
132
  errorStateMessage: B ? H?.message : void 0,
133
133
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
134
134
  renderCell: v,
135
- className: I.formsTableBody,
135
+ className: O.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
- ) : /* @__PURE__ */ o(ne, { align: "start", children: D.map((e, r) => {
138
+ ) : /* @__PURE__ */ o(ne, { align: "start", children: L.map((e, r) => {
139
139
  const { formName: a, records: i } = e;
140
140
  return /* @__PURE__ */ o(
141
141
  de,
142
142
  {
143
143
  title: a,
144
- className: I.customAccordianItem,
144
+ className: O.customAccordianItem,
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ o(
148
- S,
148
+ C,
149
149
  {
150
- headers: L,
150
+ headers: F,
151
151
  ariaLabel: s("FORMS_HEADING"),
152
152
  rows: i,
153
153
  loading: !1,
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
155
155
  sortable: J,
156
156
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
157
157
  renderCell: v,
158
- className: I.formsTableBody,
158
+ className: O.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
161
161
  )
@@ -192,5 +192,5 @@ const Ne = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
192
192
  ] });
193
193
  };
194
194
  export {
195
- Oe as default
195
+ Ae as default
196
196
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D46MSmNI.js";
2
- import { T as d, U as f, _ as e } from "./index-B7sr9NqR.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-C8hDwyj2.js";
2
+ import { T as d, U as f, _ as e } from "./index-Dl3ODFla.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-D46MSmNI.js";
2
- import { T as v, U as C, _ as e } from "./index-B7sr9NqR.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-C8hDwyj2.js";
2
+ import { T as v, U as C, _ as e } from "./index-Dl3ODFla.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 { t as B, r as K, u as S, g as G, Y as w, a as x, k as M, h as Q, l as j, i as H, j as Y, o as P, n as z, O as U, p as J, q as W, I as X, v as Z, w as ee, x as ae, y as te } from "./index-B7sr9NqR.js";
2
+ import { t as K, r as V, u as S, g as G, Y as w, a as x, k as M, h as Q, l as j, i as H, j as Y, o as P, n as z, O as U, p as J, q as W, I as X, v as Z, w as ee, x as ae, y as te } from "./index-Dl3ODFla.js";
3
3
  import { useRef as se, useEffect as $, useMemo as R } from "react";
4
4
  const D = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
@@ -112,7 +112,7 @@ const D = (a, n, d, l, b, r) => {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
114
  hideThumbnail: b = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = K(), { t: i } = S(), o = G({
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = V(), { t: i } = S(), o = G({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
118
  queryFn: () => w(e),
@@ -122,10 +122,10 @@ const D = (a, n, d, l, b, r) => {
122
122
  $(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const V = d[h];
125
+ const B = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, U as q, _ 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 U, 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 Ur, 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-B7sr9NqR.js";
1
+ import { $ as we, a0 as z, a1 as xt, a2 as B, U as q, _ 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 U, 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 Ur, 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-Dl3ODFla.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { z as V, A as h, u as I, B as O, C as P, c as B, r as G, W as x, D as L, a as U, E as q, F, H as W, K as $, L as k, P as H, R as K, S as j } from "./index-B7sr9NqR.js";
2
+ import { z as V, A as h, u as I, B as O, C as P, c as B, r as G, W as x, P as L, a as U, D as q, E as F, F as W, H as $, K as k, L as H, R as K, S as j } from "./index-Dl3ODFla.js";
3
3
  import { useState as C, useMemo as _ } from "react";
4
4
  const Q = V(
5
5
  h,
@@ -158640,12 +158640,12 @@ const eV0 = ({ config: t }) => {
158640
158640
  }, nV0 = (t) => {
158641
158641
  const { userPrivileges: e } = rV0();
158642
158642
  return Gv0(e, t);
158643
- }, oV0 = "_widget_1b9jc_1", aV0 = "_header_1b9jc_5", cV0 = "_code_1b9jc_24", lV0 = "_expandedRowContent_1b9jc_31", Mc = {
158643
+ }, oV0 = "_widget_10hzg_1", aV0 = "_header_10hzg_5", cV0 = "_code_10hzg_27", lV0 = "_expandedRowContent_10hzg_34", Mc = {
158644
158644
  widget: oV0,
158645
158645
  header: aV0,
158646
158646
  code: cV0,
158647
158647
  expandedRowContent: lV0
158648
- }, iV0 = "http://fhir.bahmni.org/ext/immunization/administeredProduct", WCe = "AP", sV0 = "OP", dV0 = "Add Immunizations";
158648
+ }, iV0 = "http://fhir.bahmni.org/ext/immunization/administeredProduct", WCe = "EP", sV0 = "OP", dV0 = "Add Immunizations";
158649
158649
  function fp(t, e) {
158650
158650
  return t.performer?.find(
158651
158651
  (r) => r.function?.coding?.some((o) => o.code === e)
@@ -158659,10 +158659,7 @@ function hV0(t) {
158659
158659
  return e ? e.toString() : null;
158660
158660
  }
158661
158661
  function pV0(t) {
158662
- const e = t.route?.coding?.[0]?.display ?? null, r = t.site?.coding?.[0]?.display ?? null, o = t.manufacturer?.display ?? null, a = t.lotNumber ?? null, c = fp(
158663
- t,
158664
- WCe
158665
- ), l = fp(t, sV0), i = t.note?.[0]?.text ?? null;
158662
+ const e = t.route?.coding?.[0]?.display ?? null, r = t.site?.coding?.[0]?.display ?? null, o = t.manufacturer?.display ?? null, a = t.lotNumber ?? null, c = fp(t, WCe), l = fp(t, sV0), i = t.note?.[0]?.text ?? null;
158666
158663
  return {
158667
158664
  id: t.id ?? "",
158668
158665
  code: t.vaccineCode?.coding?.[0]?.display ?? null,
@@ -158703,7 +158700,7 @@ const mV0 = [
158703
158700
  });
158704
158701
  Fr(
158705
158702
  (d) => {
158706
- d.patientUUID === t && d.updatedResources.immunizations && c();
158703
+ d.patientUUID === t && d.updatedResources.immunizationHistory && c();
158707
158704
  },
158708
158705
  [t, c]
158709
158706
  );
@@ -158828,7 +158825,7 @@ const mV0 = [
158828
158825
  });
158829
158826
  Fr(
158830
158827
  (s) => {
158831
- s.patientUUID === t && s.updatedResources.immunizations && c();
158828
+ s.patientUUID === t && s.updatedResources.immunizationHistory && c();
158832
158829
  },
158833
158830
  [t, c]
158834
158831
  );
@@ -159082,7 +159079,7 @@ function Dx0(t, e, r) {
159082
159079
  return o;
159083
159080
  };
159084
159081
  }
159085
- z0(() => Promise.resolve().then(() => Gg0)), z0(() => Promise.resolve().then(() => VE0)), z0(() => Promise.resolve().then(() => XE0)), z0(() => Promise.resolve().then(() => cM0)), z0(() => import("./DocumentsTable-BZHe_sb0-Dk0nkxR9.js")), z0(() => Promise.resolve().then(() => Sz0)), z0(() => import("./FormsTable-BztxQbBL-BZoaOmVP.js")), z0(() => Promise.resolve().then(() => Ez0)), z0(() => import("./Observations-Cnt-RGWx-DXj-qOLU.js")), z0(
159082
+ z0(() => Promise.resolve().then(() => Gg0)), z0(() => Promise.resolve().then(() => VE0)), z0(() => Promise.resolve().then(() => XE0)), z0(() => Promise.resolve().then(() => cM0)), z0(() => import("./DocumentsTable-itmbz5Wi-BSwXYtBw.js")), z0(() => Promise.resolve().then(() => Sz0)), z0(() => import("./FormsTable-CGFieZJf-0UtMXgG5.js")), z0(() => Promise.resolve().then(() => Ez0)), z0(() => import("./Observations-DCRioZtt-Bj0f7IGL.js")), z0(
159086
159083
  () => Promise.resolve().then(() => Wz0)
159087
159084
  ), z0(
159088
159085
  () => Promise.resolve().then(() => By0)
@@ -160921,7 +160918,7 @@ var aN0 = (t, e = !1) => {
160921
160918
  const e = uAe(() => {
160922
160919
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t;
160923
160920
  let d;
160924
- return this.#i ? d = this.#i : (d = sAe(() => import("./LNWAZHJI-CJqlFHq9.js")), this.#i = d), AAe(this.#l, this.#c), lAe(d, iAe({
160921
+ return this.#i ? d = this.#i : (d = sAe(() => import("./LNWAZHJI-CTitTf7j.js")), this.#i = d), AAe(this.#l, this.#c), lAe(d, iAe({
160925
160922
  get queryFlavor() {
160926
160923
  return r.#r;
160927
160924
  },
@@ -161019,7 +161016,7 @@ var aN0 = (t, e = !1) => {
161019
161016
  const e = uAe(() => {
161020
161017
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t, [d] = this.#i;
161021
161018
  let u;
161022
- return this.#s ? u = this.#s : (u = sAe(() => import("./MWZ6AO7Z-CUMbYzcx.js")), this.#s = u), AAe(this.#l, this.#c), lAe(u, iAe({
161019
+ return this.#s ? u = this.#s : (u = sAe(() => import("./MWZ6AO7Z-BmVQ8TB6.js")), this.#s = u), AAe(this.#l, this.#c), lAe(u, iAe({
161023
161020
  get queryFlavor() {
161024
161021
  return r.#r;
161025
161022
  },
@@ -161179,7 +161176,7 @@ const XH0 = {
161179
161176
  }), hb0 = z0(
161180
161177
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
161181
161178
  ), pb0 = z0(
161182
- () => import("./index-DPKtCk_t.js").then((t) => ({
161179
+ () => import("./index-CrNogFrv.js").then((t) => ({
161183
161180
  default: t.default
161184
161181
  }))
161185
161182
  ), fb0 = [
@@ -161220,19 +161217,19 @@ export {
161220
161217
  nb0 as A,
161221
161218
  yw as B,
161222
161219
  ex0 as C,
161223
- nx0 as D,
161224
- Xb0 as E,
161225
- bb0 as F,
161220
+ Xb0 as D,
161221
+ bb0 as E,
161222
+ Hb0 as F,
161226
161223
  il as G,
161227
- Hb0 as H,
161224
+ m$2 as H,
161228
161225
  Od0 as I,
161229
161226
  sl as J,
161230
- m$2 as K,
161231
- Vb0 as L,
161227
+ Vb0 as K,
161228
+ a12 as L,
161232
161229
  Wi as M,
161233
161230
  A2 as N,
161234
161231
  ax0 as O,
161235
- a12 as P,
161232
+ nx0 as P,
161236
161233
  bx0 as Q,
161237
161234
  rx0 as R,
161238
161235
  tx0 as S,