@bahmni/registration-app 0.0.1-dev.156 → 0.0.1-dev.160

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,15 +1,15 @@
1
- import { jsx as s, jsxs as p, Fragment as j } from "react/jsx-runtime";
2
- import { u as ee, h as re, w as ae, J as te, Y as oe, G as ne, K as se, e as de, i as me, C as ie, z as U, a as le, b as ce, c as ue, M as be, V as q, d as pe, g as _e, f as L, F as fe, N as $e, j as ge, U as ve } from "./index-Bz19Sm8s.js";
1
+ import { jsx as s, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
+ import { u as ee, h as re, w as ae, J as te, Y as oe, G as ne, K as se, e as de, i as me, C as ie, z as U, a as le, b as ce, c as ue, M as be, V as q, d as pe, g as _e, f as A, F as fe, N as $e, j as ge, U as ve } from "./index-Dt74mG6I.js";
3
3
  import { useQueryClient as he, useQuery as C } from "@tanstack/react-query";
4
- import { useState as K, useMemo as h, useCallback as A } from "react";
5
- const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Fe = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
4
+ import { useState as K, useMemo as h, useCallback as R } from "react";
5
+ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Ae = "_observation_1pd36_30", Fe = "_groupContainer_1pd36_39", Le = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Te = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", we = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Ee = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Be = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: ye,
8
8
  formContent: Ce,
9
- formDetailsContainer: Ae,
10
- observation: Le,
11
- groupContainer: Re,
12
- rowContainer: Fe,
9
+ formDetailsContainer: Re,
10
+ observation: Ae,
11
+ groupContainer: Fe,
12
+ rowContainer: Le,
13
13
  groupLabel: Me,
14
14
  rowLabel: Oe,
15
15
  rowValue: Ve,
@@ -23,7 +23,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
23
23
  nestedGroup: xe,
24
24
  nestedGroupLabel: Be,
25
25
  nestedGroupMembers: Ue
26
- }, k = (e) => {
26
+ }, j = (e) => {
27
27
  const r = fe(e);
28
28
  return r === "Image" ? /* @__PURE__ */ s(
29
29
  $e,
@@ -33,7 +33,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
33
33
  id: `${e}-img`
34
34
  }
35
35
  ) : r === "Video" ? /* @__PURE__ */ s(ge, { id: `${e}-video`, videoSrc: e }) : e;
36
- }, H = (e) => {
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 };
39
39
  }, P = ({
@@ -80,8 +80,8 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
80
80
  ]
81
81
  }
82
82
  );
83
- const { units: b, rangeString: g, isAbnormal: _ } = H(e), f = e.observationValue?.value?.toString(), $ = f ? k(f) : null;
84
- return /* @__PURE__ */ p(j, { children: [
83
+ const { units: b, rangeString: g, isAbnormal: _ } = k(e), f = e.observationValue?.value?.toString(), $ = f ? j(f) : null;
84
+ return /* @__PURE__ */ p(H, { children: [
85
85
  /* @__PURE__ */ p(
86
86
  "div",
87
87
  {
@@ -92,7 +92,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
92
92
  /* @__PURE__ */ p(
93
93
  "p",
94
94
  {
95
- className: L(
95
+ className: A(
96
96
  o.memberLabel,
97
97
  _ ? o.abnormalValue : ""
98
98
  ),
@@ -106,7 +106,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
106
106
  /* @__PURE__ */ p(
107
107
  "div",
108
108
  {
109
- className: L(
109
+ className: A(
110
110
  o.memberValue,
111
111
  _ ? o.abnormalValue : ""
112
112
  ),
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
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 } = H(e), b = n ? `${n}-` : "", g = e.observationValue?.value?.toString(), _ = g ? k(g) : null;
142
+ const d = e.members && e.members.length > 0, { units: c, rangeString: m, isAbnormal: t } = k(e), b = n ? `${n}-` : "", g = e.observationValue?.value?.toString(), _ = g ? j(g) : null;
143
143
  return /* @__PURE__ */ p(
144
144
  "div",
145
145
  {
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
155
155
  /* @__PURE__ */ p(
156
156
  "p",
157
157
  {
158
- className: L(
158
+ className: A(
159
159
  d ? o.groupLabel : o.rowLabel,
160
160
  !d && t ? o.abnormalValue : ""
161
161
  ),
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
185
185
  ) : /* @__PURE__ */ p(
186
186
  "div",
187
187
  {
188
- className: L(
188
+ className: A(
189
189
  o.rowValue,
190
190
  t ? o.abnormalValue : ""
191
191
  ),
@@ -216,16 +216,16 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
216
216
  );
217
217
  }, Ke = (e) => e ? e.extension?.find(
218
218
  (r) => r.url === ve
219
- )?.valueString : void 0, je = (e) => {
219
+ )?.valueString : void 0, He = (e) => {
220
220
  if (e)
221
221
  return e.note?.[0]?.text;
222
- }, ke = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, O = (e, r) => {
223
- const n = ke(e, r);
222
+ }, je = (e, r) => e.entry?.find((n) => n.resource?.id === r)?.resource, O = (e, r) => {
223
+ const n = je(e, r);
224
224
  return n ? {
225
225
  formFieldPath: Ke(n),
226
- comment: je(n)
226
+ comment: He(n)
227
227
  } : {};
228
- }, He = (e, r) => {
228
+ }, ke = (e, r) => {
229
229
  if (!e?.entry || !r)
230
230
  return [];
231
231
  const n = pe(e);
@@ -270,18 +270,18 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
270
270
  ), [$, r]), { data: I = [] } = C({
271
271
  queryKey: ["observationForms"],
272
272
  queryFn: () => oe()
273
- }), T = A(
273
+ }), T = R(
274
274
  (i) => I.find((u) => u.name === i)?.uuid,
275
275
  [I]
276
- ), R = h(() => {
276
+ ), F = h(() => {
277
277
  if (t)
278
278
  return T(t.formName);
279
279
  }, [t, T]), { isLoading: Q, error: S } = C({
280
- queryKey: ["formMetadata", R],
281
- queryFn: () => ne(R),
282
- enabled: !!R && c
280
+ queryKey: ["formMetadata", F],
281
+ queryFn: () => ne(F),
282
+ enabled: !!F && c
283
283
  }), {
284
- data: F,
284
+ data: L,
285
285
  isLoading: J,
286
286
  error: w
287
287
  } = C({
@@ -291,14 +291,14 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
291
291
  });
292
292
  de(
293
293
  (i) => {
294
- i.patientUUID === d && i.updatedConcepts.size > 0 && (Y(), f.invalidateQueries({ queryKey: ["formsEncounter"] }));
294
+ i.patientUUID === d && i.updatedConcepts.size > 0 && (Y(), f.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
295
295
  },
296
296
  [d]
297
297
  );
298
- const D = h(() => !F || !t?.formName ? [] : He(
299
- F,
298
+ const D = h(() => !L || !t?.formName ? [] : ke(
299
+ L,
300
300
  t.formName
301
- ), [F, t?.formName]), G = h(
301
+ ), [L, t?.formName]), G = h(
302
302
  () => [
303
303
  { key: "recordedOn", header: a("FORM_RECORDED_ON") },
304
304
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
@@ -335,11 +335,11 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
335
335
  )
336
336
  })
337
337
  ).sort((u, l) => u.formName.localeCompare(l.formName));
338
- }, [V, a]), x = A((i) => {
338
+ }, [V, a]), x = R((i) => {
339
339
  b(i), m(!0);
340
- }, []), W = A(() => {
340
+ }, []), W = R(() => {
341
341
  m(!1), b(null);
342
- }, []), B = A(
342
+ }, []), B = R(
343
343
  (i, u) => {
344
344
  switch (u) {
345
345
  case "recordedOn":
@@ -352,7 +352,7 @@ const Ne = "_formsTableBody_1pd36_1", ye = "_customAccordianItem_1pd36_6", Ce =
352
352
  },
353
353
  [x]
354
354
  );
355
- return /* @__PURE__ */ p(j, { children: [
355
+ return /* @__PURE__ */ p(H, { children: [
356
356
  /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: N || y || E.length === 0 || _ ? /* @__PURE__ */ s(
357
357
  U,
358
358
  {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DlUseWwO.js";
2
- import { l as d, m as f, o as e } from "./index-Bz19Sm8s.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CTvArhLW.js";
2
+ import { l as d, m as f, o as e } from "./index-Dt74mG6I.js";
3
3
  var p = (a) => {
4
4
  const [r, o] = 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-DlUseWwO.js";
2
- import { l as v, m as C, o as e } from "./index-Bz19Sm8s.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-CTvArhLW.js";
2
+ import { l as v, m as C, o as e } from "./index-Dt74mG6I.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 T, jsx as c } from "react/jsx-runtime";
2
- import { h as B, p as V, u as I, q as x, W as K, e as w, d as z, r as G, n as Q, A as j, z as H, k as M, x as S, t as W, F as P, D as X, N as Y, j as J } from "./index-Bz19Sm8s.js";
2
+ import { h as B, p as V, u as I, q as x, W as K, e as w, d as z, r as G, n as Q, A as j, z as H, k as M, x as S, t as W, F as P, D as X, N as Y, j as J } from "./index-Dt74mG6I.js";
3
3
  import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
4
4
  import { useRef as te, useEffect as $, useMemo as h } from "react";
5
5
  const A = (t, d, i, l, r) => {
@@ -1,4 +1,4 @@
1
- import { s as we, v as z, y as xt, B, m as q, o as y, P as Ro, E as ye, S as R, H as _, I as k, L as N, O as A, Q as bs, R as ir, T as $e, X as U, Z as Hn, _ as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-Bz19Sm8s.js";
1
+ import { s as we, v as z, y as xt, B, m as q, o as y, P as Ro, E as ye, S as R, H as _, I as k, L as N, O as A, Q as bs, R as ir, T as $e, X as U, Z as Hn, _ as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-Dt74mG6I.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -155743,7 +155743,7 @@ const GC1 = (t, e) => ["programs", t, e], kb0 = async (t, e) => {
155743
155743
  };
155744
155744
  QC1.displayName = "UserPrivilegeProvider";
155745
155745
  U2(void 0);
155746
- or(() => Promise.resolve().then(() => xE0)), or(() => Promise.resolve().then(() => wM0)), or(() => Promise.resolve().then(() => UM0)), or(() => Promise.resolve().then(() => ez0)), or(() => Promise.resolve().then(() => Mb0)), or(() => import("./FormsTable-CmVblWCC-CmpEOuuB.js")), or(() => Promise.resolve().then(() => KV0)), or(() => import("./Observations-CoVHnDN6-Buwmag_q.js")), or(
155746
+ or(() => Promise.resolve().then(() => xE0)), or(() => Promise.resolve().then(() => wM0)), or(() => Promise.resolve().then(() => UM0)), or(() => Promise.resolve().then(() => ez0)), or(() => Promise.resolve().then(() => Mb0)), or(() => import("./FormsTable-DV34R0pV-W5bRGUDm.js")), or(() => Promise.resolve().then(() => KV0)), or(() => import("./Observations-T2DSdtPu-DfANxE99.js")), or(
155747
155747
  () => Promise.resolve().then(() => _b0)
155748
155748
  ), or(
155749
155749
  () => Promise.resolve().then(() => wV0)
@@ -157582,7 +157582,7 @@ var xD0 = (t, e = !1) => {
157582
157582
  const e = wL1(() => {
157583
157583
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t;
157584
157584
  let d;
157585
- return this.#i ? d = this.#i : (d = fL1(() => import("./LNWAZHJI-Dnwa9ZNT.js")), this.#i = d), DL1(this.#h, this.#r), hL1(d, pL1({
157585
+ return this.#i ? d = this.#i : (d = fL1(() => import("./LNWAZHJI-ByCYe6z-.js")), this.#i = d), DL1(this.#h, this.#r), hL1(d, pL1({
157586
157586
  get queryFlavor() {
157587
157587
  return r.#d;
157588
157588
  },
@@ -157680,7 +157680,7 @@ var xD0 = (t, e = !1) => {
157680
157680
  const e = wL1(() => {
157681
157681
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t, [d] = this.#i;
157682
157682
  let u;
157683
- return this.#l ? u = this.#l : (u = fL1(() => import("./MWZ6AO7Z-B7OaZ-U0.js")), this.#l = u), DL1(this.#h, this.#r), hL1(u, pL1({
157683
+ return this.#l ? u = this.#l : (u = fL1(() => import("./MWZ6AO7Z-BvhC6kNL.js")), this.#l = u), DL1(this.#h, this.#r), hL1(u, pL1({
157684
157684
  get queryFlavor() {
157685
157685
  return r.#d;
157686
157686
  },
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { av as s, at as t, au as E } from "./index-Bz19Sm8s.js";
1
+ import { av as s, at as t, au as E } from "./index-Dt74mG6I.js";
2
2
  export {
3
3
  s as IDENTIFIER_TYPES_QUERY_KEY,
4
4
  t as RegistrationApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/registration-app",
3
- "version": "0.0.1-dev.156",
3
+ "version": "0.0.1-dev.160",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",