@bahmni/appointments-app 0.0.1-dev.187 → 0.0.1-dev.189

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 N, jsx as w, Fragment as St } from "react/jsx-runtime";
2
- import { p as kt, u as jt, o as Wt, a as Pt, b as Ut, A as $t, $ as Kt, m as Ft, K as h, g as Yt } from "./index-BcyBWCkX.js";
2
+ import { p as kt, u as jt, o as Wt, a as Pt, b as Ut, A as $t, $ as Kt, m as Ft, K as h, g as Yt } from "./index-K6GOsKKv.js";
3
3
  import e, { useState as A, useCallback as g, useEffect as qt, useMemo as z } from "react";
4
4
  function Gt(t, r, n) {
5
5
  return (r = Xt(r)) in t ? Object.defineProperty(t, r, {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as p, Fragment as k } from "react/jsx-runtime";
2
- import { u as ee, p as re, y as ae, c as te, a as A, d as oe, b as ne, e as se, A as q, Y as de, G as me, $ as ie, P as le, Z as U, f as ce, m as ue, T as R, h as be, F as pe, q as fe, W as _e, i as $e, w as ve, j as he, k as ge, l as ye } from "./index-BcyBWCkX.js";
2
+ import { u as ee, p as re, y as ae, c as te, a as A, d as oe, b as ne, e as se, A as q, Y as de, G as me, $ as ie, P as le, Z as U, h as ce, m as ue, T as R, f as be, F as pe, q as fe, W as _e, i as $e, w as he, j as ve, k as ge, l as ye } from "./index-K6GOsKKv.js";
3
3
  import { useState as P, useMemo as g, useCallback as F } from "react";
4
4
  const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Oe = "_rowContainer_1pd36_43", Ie = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Me = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", we = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", xe = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
5
5
  formsTableBody: Ne,
@@ -79,7 +79,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
79
79
  ]
80
80
  }
81
81
  );
82
- const { units: b, rangeString: v, isAbnormal: f } = j(e), _ = e.observationValue?.value?.toString(), $ = _ ? H(_) : null;
82
+ const { units: b, rangeString: h, isAbnormal: f } = j(e), _ = e.observationValue?.value?.toString(), $ = _ ? H(_) : null;
83
83
  return /* @__PURE__ */ p(k, { children: [
84
84
  /* @__PURE__ */ p(
85
85
  "div",
@@ -98,7 +98,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
98
98
  "data-testid": `${t}obs-member-label-${m}-${n}`,
99
99
  children: [
100
100
  m,
101
- v
101
+ h
102
102
  ]
103
103
  }
104
104
  ),
@@ -138,7 +138,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
138
138
  formName: n = "",
139
139
  comment: a
140
140
  }) => {
141
- const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = j(e), b = n ? `${n}-` : "", v = e.observationValue?.value?.toString(), f = v ? H(v) : null;
141
+ const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = j(e), b = n ? `${n}-` : "", h = e.observationValue?.value?.toString(), f = h ? H(h) : null;
142
142
  return /* @__PURE__ */ p(
143
143
  "div",
144
144
  {
@@ -251,7 +251,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
251
251
  encounterUuids: r,
252
252
  config: n
253
253
  }) => {
254
- const { t: a } = ee(), d = re(), [c, m] = P(!1), [t, b] = P(null), v = n?.numberOfVisits, f = ae(
254
+ const { t: a } = ee(), d = re(), [c, m] = P(!1), [t, b] = P(null), h = n?.numberOfVisits, f = ae(
255
255
  e,
256
256
  r
257
257
  ), _ = te(), {
@@ -262,13 +262,13 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
262
262
  refetch: Y
263
263
  } = A({
264
264
  queryKey: ["forms", d, e],
265
- queryFn: () => ve(d, void 0, v),
265
+ queryFn: () => he(d, void 0, h),
266
266
  enabled: !!d && !f
267
267
  }), T = g(() => !r || r.length === 0 ? $ : $.filter(
268
268
  (i) => r.includes(i.encounterUuid)
269
269
  ), [$, r]), { data: M = [] } = A({
270
270
  queryKey: ["observationForms"],
271
- queryFn: () => he()
271
+ queryFn: () => ve()
272
272
  }), V = F(
273
273
  (i) => M.find((u) => u.name === i)?.uuid,
274
274
  [M]
@@ -312,10 +312,10 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
312
312
  ), E = g(() => {
313
313
  const i = T.reduce(
314
314
  (u, l) => {
315
- const h = l.formName;
316
- u[h] ??= [];
315
+ const v = l.formName;
316
+ u[v] ??= [];
317
317
  const O = l.providers.map((X) => X.providerName).filter(Boolean).join(", ");
318
- return u[h].push({
318
+ return u[v].push({
319
319
  id: l.encounterUuid,
320
320
  formName: l.formName,
321
321
  recordedOn: ne(l.encounterDateTime, a, ue).formattedResult,
@@ -330,7 +330,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
330
330
  ([u, l]) => ({
331
331
  formName: u,
332
332
  records: l.sort(
333
- (h, O) => O.encounterDateTime - h.encounterDateTime
333
+ (v, O) => O.encounterDateTime - v.encounterDateTime
334
334
  )
335
335
  })
336
336
  ).sort((u, l) => u.formName.localeCompare(l.formName));
@@ -366,7 +366,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
366
366
  dataTestId: "forms-table"
367
367
  }
368
368
  ) : /* @__PURE__ */ s(de, { align: "start", children: E.map((i, u) => {
369
- const { formName: l, records: h } = i;
369
+ const { formName: l, records: v } = i;
370
370
  return /* @__PURE__ */ s(
371
371
  me,
372
372
  {
@@ -379,7 +379,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
379
379
  {
380
380
  headers: x,
381
381
  ariaLabel: a("FORMS_HEADING"),
382
- rows: h,
382
+ rows: v,
383
383
  loading: !1,
384
384
  errorStateMessage: "",
385
385
  sortable: Z,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BjKcrUp9.js";
2
- import { J as d, N as f, R as e } from "./index-BcyBWCkX.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DgDcZUZ4.js";
2
+ import { N as d, Q as f, R as e } from "./index-K6GOsKKv.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-BjKcrUp9.js";
2
- import { J as v, N as C, R as e } from "./index-BcyBWCkX.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-DgDcZUZ4.js";
2
+ import { N as v, Q as C, R as e } from "./index-K6GOsKKv.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,8 +1,8 @@
1
1
  import { jsxs as I, jsx as l } from "react/jsx-runtime";
2
- import { p as B, o as k, u as N, n as Q, r as H, a as K, d as w, f as x, H as j, s as G, L as M, A as W, t as P, v as S, V as z, h as Y, Q as J, F as X, q as Z, W as ee, x as te } from "./index-BcyBWCkX.js";
2
+ import { p as B, o as k, u as N, n as H, r as K, a as w, d as x, h as Q, H as j, s as G, L as M, A as z, t as P, v as S, V as W, f as Y, x as J, F as X, q as Z, W as ee, z as te } from "./index-K6GOsKKv.js";
3
3
  import { useRef as ae, useEffect as $, useMemo as E } from "react";
4
4
  const F = (t, d, n, u, o) => {
5
- const a = z(t, d), s = a.value, r = Y(s);
5
+ const a = W(t, d), s = a.value, r = Y(s);
6
6
  let i = s;
7
7
  r === "Image" && (i = /* @__PURE__ */ l(X, { imageSrc: s, alt: s, id: `${s}-img` })), r === "Video" && (i = /* @__PURE__ */ l(Z, { id: `${s}-video`, videoSrc: s })), r === "PDF" && (i = /* @__PURE__ */ l(ee, { id: `${s}-pdf`, src: s }));
8
8
  const b = o("OBSERVATIONS_RECORDED_BY", {
@@ -77,10 +77,10 @@ const F = (t, d, n, u, o) => {
77
77
  observations: oe,
78
78
  title: ie
79
79
  }, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
80
- const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, o = ae(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = k(), { t: r } = N(), i = Q({
80
+ const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, o = ae(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = k(), { t: r } = N(), i = H({
81
81
  queries: n.map((e) => ({
82
82
  queryKey: ne(e),
83
- queryFn: () => H(e),
83
+ queryFn: () => K(e),
84
84
  enabled: !!e
85
85
  }))
86
86
  });
@@ -101,12 +101,12 @@ const F = (t, d, n, u, o) => {
101
101
  isLoading: A,
102
102
  isError: R,
103
103
  refetch: f
104
- } = K({
104
+ } = w({
105
105
  queryKey: de(a, p),
106
106
  queryFn: () => te(a, p),
107
107
  enabled: !!a && p.length > 0 && v
108
108
  });
109
- w(
109
+ x(
110
110
  (e) => {
111
111
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
112
112
  (m) => p.includes(m)
@@ -122,13 +122,13 @@ const F = (t, d, n, u, o) => {
122
122
  }, [R]);
123
123
  const g = E(() => {
124
124
  if (!c) return [];
125
- const e = x(c), m = j(e);
125
+ const e = Q(c), m = j(e);
126
126
  return G(m);
127
127
  }, [c]), L = [
128
128
  { key: "name", header: "name" },
129
129
  { key: "value", header: "value" },
130
130
  { key: "form", header: "form" }
131
- ], O = A || !v, _ = R && v, D = (!c || c.entry?.length === 0 || p.length === 0) && v, q = _ ? r("ERROR_FETCHING_OBSERVATIONS") : null, U = D ? r("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, h = d.titleTranslationKey, y = h ? r(h) : "";
131
+ ], O = A || !v, _ = R && v, q = (!c || c.entry?.length === 0 || p.length === 0) && v, D = _ ? r("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? r("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, h = d.titleTranslationKey, y = h ? r(h) : "";
132
132
  return /* @__PURE__ */ I(
133
133
  "div",
134
134
  {
@@ -148,13 +148,13 @@ const F = (t, d, n, u, o) => {
148
148
  }
149
149
  ),
150
150
  V ? /* @__PURE__ */ l(re, { groupedData: g, title: y }) : /* @__PURE__ */ l(
151
- W,
151
+ z,
152
152
  {
153
153
  headers: L,
154
154
  rows: [],
155
155
  ariaLabel: r("OBSERVATIONS"),
156
156
  loading: O,
157
- errorStateMessage: q,
157
+ errorStateMessage: D,
158
158
  emptyStateMessage: U,
159
159
  dataTestId: "observations-table"
160
160
  }
@@ -1,4 +1,4 @@
1
- import { S as we, U as z, X as xt, _ as B, N as q, R as y, a0 as Ro, a1 as ye, a2 as R, a3 as _, a4 as k, a5 as N, a6 as A, a7 as bs, a8 as ir, a9 as $e, aa as U, ab as Hn, ac as Vn, ad as dt, ae as D, af as xs, ag as cn, ah as Be, ai as ws, aj as qt, ak as zt, al as $s, am as Cs, an as $n, ao as Ss, ap as Nr, aq as Bt, ar as zo, as as ks, at as Es, au as j, av as Ur, aw as Ms, ax as Ds, ay as sr, az as As, aA as Ts, aB as zn, aC as Fs, aD as Is, aE as Z, aF as Ps, aG as Ls } from "./index-BcyBWCkX.js";
1
+ import { S as we, U as z, X as xt, _ as B, Q as q, R as y, a0 as Ro, a1 as ye, a2 as R, a3 as _, a4 as k, a5 as N, a6 as A, a7 as bs, a8 as ir, a9 as $e, aa as U, ab as Hn, ac as Vn, ad as dt, ae as D, af as xs, ag as cn, ah as Be, ai as ws, aj as qt, ak as zt, al as $s, am as Cs, an as $n, ao as Ss, ap as Nr, aq as Bt, ar as zo, as as ks, at as Es, au as j, av as Ur, aw as Ms, ax as Ds, ay as sr, az as As, aA as Ts, aB as zn, aC as Fs, aD as Is, aE as Z, aF as Ps, aG as Ls } from "./index-K6GOsKKv.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -145319,7 +145319,7 @@ try {
145319
145319
  } catch {
145320
145320
  }
145321
145321
  process.env.PUBLIC_URL;
145322
- const Ut = "/openmrs/ws/fhir2/R4", hr = "/openmrs/ws/rest/v1", Ip0 = hr + "/bahmnicore/whoami", Bp0 = "en", Pp0 = "NG_TRANSLATE_LANG_KEY", Rg = () => localStorage.getItem(Pp0) ?? Bp0, jp0 = (t, e) => {
145322
+ const Ut = "/openmrs/ws/fhir2/R4", hr = "/openmrs/ws/rest/v1", Ip0 = hr + "/session", Bp0 = "en", Pp0 = "NG_TRANSLATE_LANG_KEY", Rg = () => localStorage.getItem(Pp0) ?? Bp0, jp0 = (t, e) => {
145323
145323
  const r = {
145324
145324
  labels: {},
145325
145325
  concepts: {}
@@ -153126,13 +153126,15 @@ async function wL0(t, e) {
153126
153126
  const r = VE0(t, e);
153127
153127
  return await r0(r);
153128
153128
  }
153129
- const HE0 = (t) => `${Ut}/Observation?encounter=${t}`;
153129
+ const HE0 = (t) => `${Ut}/Observation/$fetch-all?encounter=${t}`;
153130
153130
  async function vL0(t) {
153131
- return await r0(HE0(t));
153131
+ return await r0(
153132
+ HE0(t)
153133
+ );
153132
153134
  }
153133
153135
  const $9 = (t, e) => t?.length === 0 ? !1 : e?.length === 0, bE0 = async () => {
153134
153136
  try {
153135
- return await r0(Ip0);
153137
+ return (await r0(Ip0)).user.privileges;
153136
153138
  } catch (t) {
153137
153139
  const { message: e } = Ft(t);
153138
153140
  throw new Error(e);
@@ -159301,7 +159303,7 @@ function xL0(t, e, r) {
159301
159303
  return o;
159302
159304
  };
159303
159305
  }
159304
- k0(() => Promise.resolve().then(() => eM0)), k0(() => Promise.resolve().then(() => Ky0)), k0(() => Promise.resolve().then(() => bz0)), k0(() => Promise.resolve().then(() => $z0)), k0(() => import("./DocumentsTable-DoINW90B-D2G4cySo.js")), k0(() => Promise.resolve().then(() => qH0)), k0(() => import("./FormsTable-BFC5-_VV-CWTW1cuR.js")), k0(() => Promise.resolve().then(() => NH0)), k0(() => import("./Observations-7ryo-dcA-C1usSYDg.js")), k0(
159306
+ k0(() => Promise.resolve().then(() => eM0)), k0(() => Promise.resolve().then(() => Ky0)), k0(() => Promise.resolve().then(() => bz0)), k0(() => Promise.resolve().then(() => $z0)), k0(() => import("./DocumentsTable-BQYdm5FO-B89nzO7T.js")), k0(() => Promise.resolve().then(() => qH0)), k0(() => import("./FormsTable-BUw2KCew-DFrzYZQv.js")), k0(() => Promise.resolve().then(() => NH0)), k0(() => import("./Observations-D9XzsEPN-D3PFx0d2.js")), k0(
159305
159307
  () => Promise.resolve().then(() => tb0)
159306
159308
  ), k0(
159307
159309
  () => Promise.resolve().then(() => GV0)
@@ -161140,7 +161142,7 @@ var YL0 = (t, e = !1) => {
161140
161142
  const e = cAe(() => {
161141
161143
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t;
161142
161144
  let d;
161143
- return this.#i ? d = this.#i : (d = oAe(() => import("./LNWAZHJI-Bqw-U-zN.js")), this.#i = d), bAe(this.#l, this.#c), rAe(d, nAe({
161145
+ return this.#i ? d = this.#i : (d = oAe(() => import("./LNWAZHJI-Dqcnyu8p.js")), this.#i = d), bAe(this.#l, this.#c), rAe(d, nAe({
161144
161146
  get queryFlavor() {
161145
161147
  return r.#r;
161146
161148
  },
@@ -161238,7 +161240,7 @@ var YL0 = (t, e = !1) => {
161238
161240
  const e = cAe(() => {
161239
161241
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t, [d] = this.#i;
161240
161242
  let u;
161241
- return this.#s ? u = this.#s : (u = oAe(() => import("./MWZ6AO7Z-Dy00P9Ky.js")), this.#s = u), bAe(this.#l, this.#c), rAe(u, nAe({
161243
+ return this.#s ? u = this.#s : (u = oAe(() => import("./MWZ6AO7Z-BRNK5Khx.js")), this.#s = u), bAe(this.#l, this.#c), rAe(u, nAe({
161242
161244
  get queryFlavor() {
161243
161245
  return r.#r;
161244
161246
  },
@@ -161398,7 +161400,7 @@ const jx0 = {
161398
161400
  }), rN0 = k0(
161399
161401
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
161400
161402
  ), nN0 = k0(
161401
- () => import("./index-C8plxqhB.js").then((t) => ({
161403
+ () => import("./index-nHLaycbQ.js").then((t) => ({
161402
161404
  default: t.default
161403
161405
  }))
161404
161406
  ), oN0 = [
@@ -161438,21 +161440,21 @@ export {
161438
161440
  Rr as $,
161439
161441
  F0 as A,
161440
161442
  Wx0 as B,
161441
- jN0 as C,
161442
- fN0 as D,
161443
- pN0 as E,
161443
+ xL0 as C,
161444
+ jN0 as D,
161445
+ fN0 as E,
161444
161446
  KN0 as F,
161445
161447
  rl as G,
161446
161448
  HL0 as H,
161447
- h$2 as I,
161448
- eC0 as J,
161449
+ pN0 as I,
161450
+ h$2 as J,
161449
161451
  ca as K,
161450
161452
  zNe as L,
161451
161453
  FN0 as M,
161452
- i0 as N,
161454
+ eC0 as N,
161453
161455
  PN0 as O,
161454
161456
  UN0 as P,
161455
- Ld0 as Q,
161457
+ i0 as Q,
161456
161458
  rAe as R,
161457
161459
  _L0 as S,
161458
161460
  pc as T,
@@ -161512,9 +161514,9 @@ export {
161512
161514
  D5 as c,
161513
161515
  t3 as d,
161514
161516
  op as e,
161515
- fV0 as f,
161517
+ pL0 as f,
161516
161518
  yL0 as g,
161517
- pL0 as h,
161519
+ fV0 as h,
161518
161520
  mL0 as i,
161519
161521
  gL0 as j,
161520
161522
  EL0 as k,
@@ -161530,7 +161532,7 @@ export {
161530
161532
  ct as u,
161531
161533
  WN0 as v,
161532
161534
  ML0 as w,
161533
- wL0 as x,
161535
+ Ld0 as x,
161534
161536
  $9 as y,
161535
- xL0 as z
161537
+ wL0 as z
161536
161538
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { z as E, B as C, C as M, u as S, a as f, O as L, D as y, E as N, I as g, M as I } from "./index-BcyBWCkX.js";
2
+ import { C, B as E, D as M, u as S, a as f, O as L, E as y, I as N, J as g, M as I } from "./index-K6GOsKKv.js";
3
3
  import { useMemo as o } from "react";
4
- const R = E(
5
- C,
4
+ const R = C(
5
+ E,
6
6
  "useAppointmentsConfig",
7
7
  "AppointmentsConfigProvider"
8
8
  ), l = [
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aH as t } from "./index-BcyBWCkX.js";
1
+ import { aH as t } from "./index-K6GOsKKv.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.187",
3
+ "version": "0.0.1-dev.189",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",