@bahmni/registration-app 0.0.1-dev.187 → 0.0.1-dev.188

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, g as Pt, a as Ut, A as $t, $ as Kt, m as Ft, K as h } from "./index-CxTPzkNx.js";
2
+ import { p as kt, u as jt, o as Wt, g as Pt, a as Ut, A as $t, $ as Kt, m as Ft, K as h } from "./index-z7jette2.js";
3
3
  import { useQuery as Yt } from "@tanstack/react-query";
4
4
  import e, { useState as A, useCallback as g, useEffect as qt, useMemo as z } from "react";
5
5
  function Gt(t, r, n) {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
- import { u as ee, p as re, y as ae, w as te, f as oe, b as ne, c as se, d as de, a as me, e as ie, A as q, Y as le, G as ce, $ as ue, P as be, Z as U, h as pe, m as fe, T as R, i as _e, F as $e, q as ve, W as he, j as ge } from "./index-CxTPzkNx.js";
2
+ import { u as ee, p as re, y as ae, w as te, f as oe, b as ne, c as se, d as de, a as me, e as ie, A as q, Y as le, G as ce, $ as ue, P as be, Z as U, h as pe, m as fe, T as R, i as _e, F as $e, q as he, W as ve, j as ge } from "./index-z7jette2.js";
3
3
  import { useQueryClient as ye, useQuery as A } from "@tanstack/react-query";
4
4
  import { useState as P, useMemo as g, useCallback as F } from "react";
5
5
  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 = {
@@ -32,7 +32,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
32
32
  alt: e,
33
33
  id: `${e}-img`
34
34
  }
35
- ) : r === "Video" ? /* @__PURE__ */ s(ve, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ s(he, { id: `${e}-pdf`, src: e }) : e;
35
+ ) : r === "Video" ? /* @__PURE__ */ s(he, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ s(ve, { id: `${e}-pdf`, src: e }) : e;
36
36
  }, k = (e) => {
37
37
  const r = e.observationValue?.unit, n = e.observationValue?.referenceRange?.low?.value, a = e.observationValue?.referenceRange?.high?.value, d = n != null, c = a != null, m = d && c ? ` (${n} - ${a})` : d ? ` (>${n})` : c ? ` (<${a})` : "", t = e.observationValue?.isAbnormal === !0;
38
38
  return { units: r, rangeString: m, isAbnormal: t };
@@ -80,7 +80,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
80
80
  ]
81
81
  }
82
82
  );
83
- const { units: b, rangeString: v, isAbnormal: f } = k(e), _ = e.observationValue?.value?.toString(), $ = _ ? j(_) : null;
83
+ const { units: b, rangeString: h, isAbnormal: f } = k(e), _ = e.observationValue?.value?.toString(), $ = _ ? j(_) : null;
84
84
  return /* @__PURE__ */ p(H, { children: [
85
85
  /* @__PURE__ */ p(
86
86
  "div",
@@ -99,7 +99,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
99
99
  "data-testid": `${t}obs-member-label-${m}-${n}`,
100
100
  children: [
101
101
  m,
102
- v
102
+ h
103
103
  ]
104
104
  }
105
105
  ),
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
139
139
  formName: n = "",
140
140
  comment: a
141
141
  }) => {
142
- const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = k(e), b = n ? `${n}-` : "", v = e.observationValue?.value?.toString(), f = v ? j(v) : null;
142
+ const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = k(e), b = n ? `${n}-` : "", h = e.observationValue?.value?.toString(), f = h ? j(h) : null;
143
143
  return /* @__PURE__ */ p(
144
144
  "div",
145
145
  {
@@ -252,7 +252,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
252
252
  encounterUuids: r,
253
253
  config: n
254
254
  }) => {
255
- const { t: a } = ee(), d = re(), [c, m] = P(!1), [t, b] = P(null), v = n?.numberOfVisits, f = ae(
255
+ const { t: a } = ee(), d = re(), [c, m] = P(!1), [t, b] = P(null), h = n?.numberOfVisits, f = ae(
256
256
  e,
257
257
  r
258
258
  ), _ = ye(), {
@@ -263,7 +263,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
263
263
  refetch: Y
264
264
  } = A({
265
265
  queryKey: ["forms", d, e],
266
- queryFn: () => te(d, void 0, v),
266
+ queryFn: () => te(d, void 0, h),
267
267
  enabled: !!d && !f
268
268
  }), T = g(() => !r || r.length === 0 ? $ : $.filter(
269
269
  (i) => r.includes(i.encounterUuid)
@@ -313,10 +313,10 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
313
313
  ), E = g(() => {
314
314
  const i = T.reduce(
315
315
  (u, l) => {
316
- const h = l.formName;
317
- u[h] ??= [];
316
+ const v = l.formName;
317
+ u[v] ??= [];
318
318
  const O = l.providers.map((X) => X.providerName).filter(Boolean).join(", ");
319
- return u[h].push({
319
+ return u[v].push({
320
320
  id: l.encounterUuid,
321
321
  formName: l.formName,
322
322
  recordedOn: me(l.encounterDateTime, a, fe).formattedResult,
@@ -331,7 +331,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
331
331
  ([u, l]) => ({
332
332
  formName: u,
333
333
  records: l.sort(
334
- (h, O) => O.encounterDateTime - h.encounterDateTime
334
+ (v, O) => O.encounterDateTime - v.encounterDateTime
335
335
  )
336
336
  })
337
337
  ).sort((u, l) => u.formName.localeCompare(l.formName));
@@ -367,7 +367,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
367
367
  dataTestId: "forms-table"
368
368
  }
369
369
  ) : /* @__PURE__ */ s(le, { align: "start", children: E.map((i, u) => {
370
- const { formName: l, records: h } = i;
370
+ const { formName: l, records: v } = i;
371
371
  return /* @__PURE__ */ s(
372
372
  ce,
373
373
  {
@@ -380,7 +380,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Fe =
380
380
  {
381
381
  headers: x,
382
382
  ariaLabel: a("FORMS_HEADING"),
383
- rows: h,
383
+ rows: v,
384
384
  loading: !1,
385
385
  errorStateMessage: "",
386
386
  sortable: Z,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-BkrE_Wrz.js";
2
- import { t as d, v as f, x as e } from "./index-CxTPzkNx.js";
1
+ import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-s92lYyb0.js";
2
+ import { v as d, x as f, z as e } from "./index-z7jette2.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-BkrE_Wrz.js";
2
- import { t as v, v as C, x as e } from "./index-CxTPzkNx.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-s92lYyb0.js";
2
+ import { v, x as C, z as e } from "./index-z7jette2.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,9 +1,9 @@
1
1
  import { jsxs as I, jsx as l } from "react/jsx-runtime";
2
- import { p as k, o as B, u as N, k as Q, l as H, d as K, h as w, H as j, n as x, L as G, A as M, r as W, s as S, V as P, i as z, Q as Y, F as J, q as X, W as Z } from "./index-CxTPzkNx.js";
2
+ import { p as k, o as B, u as N, k as H, l as K, d as w, h as Q, H as j, n as x, L as G, A as M, r as P, s as S, V as W, i as z, t as Y, F as J, q as X, W as Z } from "./index-z7jette2.js";
3
3
  import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as ae, useEffect as $, useMemo as E } from "react";
5
5
  const F = (t, d, n, u, o) => {
6
- const a = P(t, d), r = a.value, s = z(r);
6
+ const a = W(t, d), r = a.value, s = z(r);
7
7
  let i = r;
8
8
  s === "Image" && (i = /* @__PURE__ */ l(J, { imageSrc: r, alt: r, id: `${r}-img` })), s === "Video" && (i = /* @__PURE__ */ l(X, { id: `${r}-video`, videoSrc: r })), s === "PDF" && (i = /* @__PURE__ */ l(Z, { id: `${r}-pdf`, src: r }));
9
9
  const b = o("OBSERVATIONS_RECORDED_BY", {
@@ -37,7 +37,7 @@ const F = (t, d, n, u, o) => {
37
37
  title: d = ""
38
38
  }) => {
39
39
  const { t: n } = N(), u = (o, a, r) => {
40
- const s = W(o.encounterDetails, n);
40
+ const s = P(o.encounterDetails, n);
41
41
  return /* @__PURE__ */ I(
42
42
  S,
43
43
  {
@@ -81,7 +81,7 @@ const F = (t, d, n, u, o) => {
81
81
  const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, o = ae(/* @__PURE__ */ new Set()), a = k(), { addNotification: r } = B(), { t: s } = N(), i = ee({
82
82
  queries: n.map((e) => ({
83
83
  queryKey: ne(e),
84
- queryFn: () => Q(e),
84
+ queryFn: () => H(e),
85
85
  enabled: !!e
86
86
  }))
87
87
  });
@@ -104,10 +104,10 @@ const F = (t, d, n, u, o) => {
104
104
  refetch: f
105
105
  } = te({
106
106
  queryKey: de(a, p),
107
- queryFn: () => H(a, p),
107
+ queryFn: () => K(a, p),
108
108
  enabled: !!a && p.length > 0 && v
109
109
  });
110
- K(
110
+ w(
111
111
  (e) => {
112
112
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
113
113
  (m) => p.includes(m)
@@ -123,13 +123,13 @@ const F = (t, d, n, u, o) => {
123
123
  }, [R]);
124
124
  const g = E(() => {
125
125
  if (!c) return [];
126
- const e = w(c), m = j(e);
126
+ const e = Q(c), m = j(e);
127
127
  return x(m);
128
128
  }, [c]), L = [
129
129
  { key: "name", header: "name" },
130
130
  { key: "value", header: "value" },
131
131
  { key: "form", header: "form" }
132
- ], O = A || !v, _ = R && v, D = (!c || c.entry?.length === 0 || p.length === 0) && v, q = _ ? s("ERROR_FETCHING_OBSERVATIONS") : null, U = D ? s("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, h = d.titleTranslationKey, y = h ? s(h) : "";
132
+ ], O = A || !v, _ = R && v, q = (!c || c.entry?.length === 0 || p.length === 0) && v, D = _ ? s("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? s("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, h = d.titleTranslationKey, y = h ? s(h) : "";
133
133
  return /* @__PURE__ */ I(
134
134
  "div",
135
135
  {
@@ -155,7 +155,7 @@ const F = (t, d, n, u, o) => {
155
155
  rows: [],
156
156
  ariaLabel: s("OBSERVATIONS"),
157
157
  loading: O,
158
- errorStateMessage: q,
158
+ errorStateMessage: D,
159
159
  emptyStateMessage: U,
160
160
  dataTestId: "observations-table"
161
161
  }
@@ -1,4 +1,4 @@
1
- import { z as we, B as z, C as xt, D as B, v as q, x as y, E as Ro, I as ye, S as R, J as _, M as k, N, O as A, R as bs, U as ir, X as $e, _ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Os } from "./index-CxTPzkNx.js";
1
+ import { B as we, C as z, D as xt, E as B, x as q, z as y, I as Ro, J as ye, S as R, M as _, N as k, O as N, Q as A, R as bs, U as ir, X as $e, _ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Os } from "./index-z7jette2.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -80102,7 +80102,14 @@ const TK2 = /* @__PURE__ */ zW2(_K2), mwe = {
80102
80102
  t.messageParams,
80103
80103
  t.module
80104
80104
  );
80105
- }), FA1 = (t, e) => !t || t.length === 0 ? !1 : t.some((r) => r.name === e);
80105
+ }), FA1 = (t, e) => {
80106
+ if (!t || t.length === 0)
80107
+ return !1;
80108
+ const r = Array.isArray(e) ? e : [e];
80109
+ return t.some(
80110
+ (n) => r.includes(n.name)
80111
+ );
80112
+ };
80106
80113
  function IK2(t, e, r) {
80107
80114
  return (e = jK2(e)) in t ? Object.defineProperty(t, e, {
80108
80115
  value: r,
@@ -146697,7 +146704,7 @@ try {
146697
146704
  } catch {
146698
146705
  }
146699
146706
  process.env.PUBLIC_URL;
146700
- const wr = "/openmrs/ws/fhir2/R4", Zr = "/openmrs/ws/rest/v1", Ob0 = Zr + "/bahmnicore/whoami", Db0 = "en", Rb0 = "NG_TRANSLATE_LANG_KEY", VM = () => localStorage.getItem(Rb0) ?? Db0, Sb0 = (t, e) => {
146707
+ const wr = "/openmrs/ws/fhir2/R4", Zr = "/openmrs/ws/rest/v1", Ob0 = Zr + "/session", Db0 = "en", Rb0 = "NG_TRANSLATE_LANG_KEY", VM = () => localStorage.getItem(Rb0) ?? Db0, Sb0 = (t, e) => {
146701
146708
  const r = {
146702
146709
  labels: {},
146703
146710
  concepts: {}
@@ -154510,7 +154517,7 @@ async function IW0(t) {
154510
154517
  }
154511
154518
  const id = (t, e) => t?.length === 0 ? !1 : e?.length === 0, E_0 = async () => {
154512
154519
  try {
154513
- return await z0(Ob0);
154520
+ return (await z0(Ob0)).user.privileges;
154514
154521
  } catch (t) {
154515
154522
  const { message: e } = fr(t);
154516
154523
  throw new Error(e);
@@ -160914,7 +160921,7 @@ function vS0(t, e, r) {
160914
160921
  return n;
160915
160922
  };
160916
160923
  }
160917
- _t(() => Promise.resolve().then(() => K_0)), _t(() => Promise.resolve().then(() => P$0)), _t(() => Promise.resolve().then(() => EO0)), _t(() => Promise.resolve().then(() => xO0)), _t(() => import("./DocumentsTable-DoINW90B-c_ifq2DP.js")), _t(() => Promise.resolve().then(() => KR0)), _t(() => import("./FormsTable-BFC5-_VV-DMoPI1uF.js")), _t(() => Promise.resolve().then(() => yR0)), _t(() => import("./Observations-7ryo-dcA-D7PfkeJK.js")), _t(
160924
+ _t(() => Promise.resolve().then(() => K_0)), _t(() => Promise.resolve().then(() => P$0)), _t(() => Promise.resolve().then(() => EO0)), _t(() => Promise.resolve().then(() => xO0)), _t(() => import("./DocumentsTable-KDoVzKKR-AzMElY-A.js")), _t(() => Promise.resolve().then(() => KR0)), _t(() => import("./FormsTable-B874VYbf-BrZNzHdV.js")), _t(() => Promise.resolve().then(() => yR0)), _t(() => import("./Observations-BNdO8uec-BptoZVjc.js")), _t(
160918
160925
  () => Promise.resolve().then(() => oS0)
160919
160926
  ), _t(
160920
160927
  () => Promise.resolve().then(() => jD0)
@@ -162753,7 +162760,7 @@ var vK0 = (t, e = !1) => {
162753
162760
  const e = VS1(() => {
162754
162761
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t;
162755
162762
  let d;
162756
- return this.#i ? d = this.#i : (d = MS1(() => import("./LNWAZHJI-CXTJGH9P.js")), this.#i = d), BS1(this.#h, this.#r), vS1(d, ES1({
162763
+ return this.#i ? d = this.#i : (d = MS1(() => import("./LNWAZHJI-BZ4vfIVA.js")), this.#i = d), BS1(this.#h, this.#r), vS1(d, ES1({
162757
162764
  get queryFlavor() {
162758
162765
  return r.#d;
162759
162766
  },
@@ -162851,7 +162858,7 @@ var vK0 = (t, e = !1) => {
162851
162858
  const e = VS1(() => {
162852
162859
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t, [d] = this.#i;
162853
162860
  let u;
162854
- return this.#l ? u = this.#l : (u = MS1(() => import("./MWZ6AO7Z-BQIRNU4D.js")), this.#l = u), BS1(this.#h, this.#r), vS1(u, ES1({
162861
+ return this.#l ? u = this.#l : (u = MS1(() => import("./MWZ6AO7Z-DwfXcs84.js")), this.#l = u), BS1(this.#h, this.#r), vS1(u, ES1({
162855
162862
  get queryFlavor() {
162856
162863
  return r.#d;
162857
162864
  },
@@ -173342,22 +173349,22 @@ const $U0 = new Ok1(Uk0), zK0 = () => {
173342
173349
  export {
173343
173350
  hn as $,
173344
173351
  ht as A,
173345
- G2 as B,
173346
- HS0 as C,
173347
- uS1 as D,
173348
- dK0 as E,
173352
+ XW0 as B,
173353
+ G2 as C,
173354
+ HS0 as D,
173355
+ uS1 as E,
173349
173356
  gW0 as F,
173350
173357
  pl as G,
173351
173358
  WW0 as H,
173352
- iK0 as I,
173353
- lK0 as J,
173359
+ dK0 as I,
173360
+ iK0 as J,
173354
173361
  nc as K,
173355
173362
  RO1 as L,
173356
- sm as M,
173357
- m3 as N,
173358
- GS0 as O,
173363
+ lK0 as M,
173364
+ sm as N,
173365
+ m3 as O,
173359
173366
  mW0 as P,
173360
- yV0 as Q,
173367
+ GS0 as Q,
173361
173368
  sK0 as R,
173362
173369
  oK0 as S,
173363
173370
  Ei as T,
@@ -173422,11 +173429,11 @@ export {
173422
173429
  EW0 as q,
173423
173430
  qW0 as r,
173424
173431
  wW0 as s,
173425
- VK0 as t,
173432
+ yV0 as t,
173426
173433
  X1 as u,
173427
- L0 as v,
173434
+ VK0 as v,
173428
173435
  jW0 as w,
173429
- vS1 as x,
173436
+ L0 as x,
173430
173437
  id as y,
173431
- XW0 as z
173438
+ vS1 as z
173432
173439
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ay as s, aw as E, ax as i } from "./index-CxTPzkNx.js";
1
+ import { ay as s, aw as E, ax as i } from "./index-z7jette2.js";
2
2
  export {
3
3
  s as IDENTIFIER_TYPES_QUERY_KEY,
4
4
  E as RegistrationApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/registration-app",
3
- "version": "0.0.1-dev.187",
3
+ "version": "0.0.1-dev.188",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",