@bahmni/registration-app 0.0.1-dev.198 → 0.0.1-dev.200

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 o, jsxs as l, Fragment as k } from "react/jsx-runtime";
2
- import { l as V, u as x, Q as F, a as H, E as q, C as Q, x as P, T as G } from "./index-D2PxipnA.js";
2
+ import { l as V, u as x, Q as F, a as H, E as q, C as Q, x as P, T as G } from "./index-mzOlQSi7.js";
3
3
  import { useQuery as W } from "@tanstack/react-query";
4
4
  import { useState as I, useCallback as T, useEffect as L, useMemo as E } from "react";
5
5
  const Y = "_documentsTableBody_1voj8_1", z = "_viewAttachmentsLink_1voj8_11", J = "_documentViewerContainer_1voj8_15", K = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
@@ -1,8 +1,8 @@
1
1
  import { jsx as o, jsxs as p, Fragment as k } from "react/jsx-runtime";
2
- import { u as O, l as ae, o as te, X as oe, Y as ne, J as se, G as de, f as me, C as ie, E as le, x as U, I as ce, Z as ue, T as be, b as pe, S as H, W as fe, q as K, c as F, d as _e, N as $e, A as ve, z as ge, e as he } from "./index-D2PxipnA.js";
2
+ import { u as O, l as ae, o as te, X as oe, Y as ne, J as se, G as de, f as me, C as ie, E as le, x as U, I as ce, Z as ue, T as be, b as pe, S as H, W as fe, q as K, c as F, d as _e, N as $e, A as ve, z as ge, e as he } from "./index-mzOlQSi7.js";
3
3
  import { useQueryClient as ye, useQuery as A } from "@tanstack/react-query";
4
4
  import { useState as P, useMemo as h, useCallback as C } from "react";
5
- const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", xe = "_memberRow_1pd36_81", De = "_memberLabel_1pd36_86", Ee = "_memberValue_1pd36_94", Ve = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", n = {
5
+ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Le = "_observation_1pd36_30", Re = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Me = "_groupLabel_1pd36_48", Oe = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", Ve = "_memberRow_1pd36_81", xe = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Ee = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", n = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: Ae,
8
8
  formContent: Ce,
@@ -14,10 +14,10 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
14
14
  rowLabel: Oe,
15
15
  rowValue: Te,
16
16
  groupMembers: Se,
17
- memberRow: xe,
18
- memberLabel: De,
19
- memberValue: Ee,
20
- abnormalValue: Ve,
17
+ memberRow: Ve,
18
+ memberLabel: xe,
19
+ memberValue: De,
20
+ abnormalValue: Ee,
21
21
  commentSection: we,
22
22
  commentText: Be,
23
23
  nestedGroup: Ge,
@@ -244,7 +244,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
244
244
  ].filter(
245
245
  ({ formFieldPath: a }) => !a || a.includes(r)
246
246
  );
247
- }, Ye = ({
247
+ }, Ze = ({
248
248
  episodeOfCareUuids: e,
249
249
  encounterUuids: r,
250
250
  config: s
@@ -257,7 +257,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
257
257
  isLoading: y,
258
258
  isError: N,
259
259
  error: Q,
260
- refetch: X
260
+ refetch: Y
261
261
  } = A({
262
262
  queryKey: ["forms", l, e],
263
263
  queryFn: () => oe(l, void 0, v),
@@ -267,20 +267,20 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
267
267
  ), [$, r]), { data: S = [] } = A({
268
268
  queryKey: ["observationForms"],
269
269
  queryFn: () => ne()
270
- }), x = C(
270
+ }), V = C(
271
271
  (m) => S.find((u) => u.name === m)?.uuid,
272
272
  [S]
273
273
  ), L = h(() => {
274
274
  if (t)
275
- return x(t.formName);
276
- }, [t, x]), { isLoading: Y, error: D } = A({
275
+ return V(t.formName);
276
+ }, [t, V]), { isLoading: Z, error: x } = A({
277
277
  queryKey: ["formMetadata", L],
278
278
  queryFn: () => se(L),
279
279
  enabled: !!L && d
280
280
  }), {
281
281
  data: R,
282
282
  isLoading: J,
283
- error: E
283
+ error: D
284
284
  } = A({
285
285
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
286
286
  queryFn: () => de(t.encounterUuid),
@@ -288,11 +288,11 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
288
288
  });
289
289
  me(
290
290
  (m) => {
291
- m.patientUUID === l && m.updatedConcepts.size > 0 && (X(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
291
+ m.patientUUID === l && m.updatedConcepts.size > 0 && (Y(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
292
292
  },
293
293
  [l]
294
294
  );
295
- const V = h(() => !R || !t?.formName ? [] : je(
295
+ const E = h(() => !R || !t?.formName ? [] : je(
296
296
  R,
297
297
  t.formName
298
298
  ), [R, t?.formName]), w = h(
@@ -301,7 +301,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
301
301
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
302
302
  ],
303
303
  [a]
304
- ), Z = h(
304
+ ), X = h(
305
305
  () => [
306
306
  { key: "recordedOn", sortable: !0 },
307
307
  { key: "recordedBy", sortable: !0 }
@@ -380,7 +380,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
380
380
  rows: g,
381
381
  loading: !1,
382
382
  errorStateMessage: "",
383
- sortable: Z,
383
+ sortable: X,
384
384
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
385
385
  renderCell: q,
386
386
  className: n.formsTableBody,
@@ -403,7 +403,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
403
403
  passiveModal: !0,
404
404
  size: "md",
405
405
  testId: "form-details-modal",
406
- children: /* @__PURE__ */ o("div", { className: n.formContent, children: Y || J ? /* @__PURE__ */ o(pe, { width: "100%", lineCount: 3 }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ o("div", { children: H(E).message ?? a("ERROR_FETCHING_FORM_DATA") }) : V.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: V.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
406
+ children: /* @__PURE__ */ o("div", { className: n.formContent, children: Z || J ? /* @__PURE__ */ o(pe, { width: "100%", lineCount: 3 }) : x ? /* @__PURE__ */ o("div", { children: H(x).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_DATA") }) : E.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: E.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
407
407
  He,
408
408
  {
409
409
  observation: m,
@@ -418,5 +418,5 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
418
418
  ] });
419
419
  };
420
420
  export {
421
- Ye as default
421
+ Ze as default
422
422
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CcA4md34.js";
2
- import { j as p, k as d, p as e } from "./index-D2PxipnA.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-PHtdguZF.js";
2
+ import { j as p, k as d, p as e } from "./index-mzOlQSi7.js";
3
3
  var f = (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-CcA4md34.js";
2
- import { j as v, k as C, p as e } from "./index-D2PxipnA.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-PHtdguZF.js";
2
+ import { j as v, k as C, p as e } from "./index-mzOlQSi7.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 T, jsx as l } from "react/jsx-runtime";
2
- import { l as K, Q, u as I, U as V, K as k, f as x, W as w, g as z, h as G, m as H, x as M, r as j, i as S, n as P, d as W, w as Y, N as J, A as X, z as Z } from "./index-D2PxipnA.js";
2
+ import { l as K, Q as V, u as I, U as k, K as x, f as Q, W as w, g as z, h as G, m as H, x as M, r as j, i as S, n as P, d as W, w as Y, N as J, A as X, z as Z } from "./index-mzOlQSi7.js";
3
3
  import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as ae, useEffect as $, useMemo as f } from "react";
4
+ import { useRef as ae, useEffect as $, useMemo as h } from "react";
5
5
  const A = (t, d, n, u, r) => {
6
6
  const a = P(t, d, r), s = a.value, o = W(s);
7
7
  let i = s;
@@ -78,10 +78,10 @@ const A = (t, d, n, u, r) => {
78
78
  observations: oe,
79
79
  title: ie
80
80
  }, ne = (t) => ["conceptUuid", t], de = (t, d) => ["observations", t, ...d], pe = ({ config: t }) => {
81
- const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = Q(), { t: o } = I(), i = ee({
81
+ const d = t, { conceptNames: n = [], conceptUuid: u = [] } = d, r = ae(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = V(), { t: o } = I(), i = ee({
82
82
  queries: n.map((e) => ({
83
83
  queryKey: ne(e),
84
- queryFn: () => V(e),
84
+ queryFn: () => k(e),
85
85
  enabled: !!e
86
86
  }))
87
87
  });
@@ -97,44 +97,44 @@ const A = (t, d, n, u, r) => {
97
97
  } else e.isError || r.current.delete(m);
98
98
  });
99
99
  }, [i, n]);
100
- const b = f(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = f(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = f(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
100
+ const b = h(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = h(() => [.../* @__PURE__ */ new Set([...b, ...u])], [b, u]), v = h(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
101
101
  data: c,
102
- isLoading: D,
103
- isError: g,
104
- refetch: h
102
+ isLoading: U,
103
+ isError: E,
104
+ refetch: g
105
105
  } = te({
106
106
  queryKey: de(a, p),
107
- queryFn: () => k(a, p),
107
+ queryFn: () => x(a, p),
108
108
  enabled: !!a && p.length > 0 && v
109
109
  });
110
- x(
110
+ Q(
111
111
  (e) => {
112
112
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
113
113
  (m) => p.includes(m)
114
- ) && h();
114
+ ) && g();
115
115
  },
116
- [a, h]
116
+ [a, g]
117
117
  ), $(() => {
118
- g && s({
118
+ E && s({
119
119
  title: o("ERROR_DEFAULT_TITLE"),
120
120
  message: o("ERROR_FETCHING_OBSERVATIONS"),
121
121
  type: "error"
122
122
  });
123
- }, [g]);
124
- const R = f(() => {
123
+ }, [E]);
124
+ const R = h(() => {
125
125
  if (!c) return [];
126
126
  const e = w(c), m = z(e);
127
127
  return G(m);
128
- }, [c]), F = [
128
+ }, [c]), q = [
129
129
  { key: "name", header: "name" },
130
130
  { key: "value", header: "value" },
131
131
  { key: "form", header: "form" }
132
- ], O = D || !v, _ = g && v, U = (!c || c.entry?.length === 0 || p.length === 0) && v, q = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, L = U ? o("NO_OBSERVATIONS_FOUND") : void 0, C = R.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
132
+ ], O = U || !v, _ = E && v, D = (!c || c.entry?.length === 0 || p.length === 0) && v, F = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, L = D ? o("NO_OBSERVATIONS_FOUND") : void 0, C = R.length > 0 && !O && !_, f = d.titleTranslationKey, y = f ? o(f) : "";
133
133
  return /* @__PURE__ */ T(
134
134
  "div",
135
135
  {
136
136
  id: "observations",
137
- "data-testid": E ? `observations-${y}` : "observations",
137
+ "data-testid": f ? `observations-${y}` : "observations",
138
138
  "aria-label": "observations-aria-label",
139
139
  className: N.observations,
140
140
  children: [
@@ -142,7 +142,7 @@ const A = (t, d, n, u, r) => {
142
142
  H,
143
143
  {
144
144
  id: "observations-title",
145
- testId: E ? `observations-title-${y}` : "observations-title",
145
+ testId: f ? `observations-title-${y}` : "observations-title",
146
146
  title: y,
147
147
  className: N.title,
148
148
  children: /* @__PURE__ */ l("p", { children: y })
@@ -151,11 +151,11 @@ const A = (t, d, n, u, r) => {
151
151
  C ? /* @__PURE__ */ l(re, { groupedData: R, title: y }) : /* @__PURE__ */ l(
152
152
  M,
153
153
  {
154
- headers: F,
154
+ headers: q,
155
155
  rows: [],
156
156
  ariaLabel: o("OBSERVATIONS"),
157
157
  loading: O,
158
- errorStateMessage: q,
158
+ errorStateMessage: F,
159
159
  emptyStateMessage: L,
160
160
  dataTestId: "observations-table"
161
161
  }
@@ -1,4 +1,4 @@
1
- import { s as we, t as z, v as xt, y as B, k as q, p as y, P as Ro, B as ye, D as R, F as _, H as k, L as N, M as A, O as bs, R as ir, V as $e, _ as U, $ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Ur, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Ls } from "./index-D2PxipnA.js";
1
+ import { s as we, t as z, v as xt, y as B, k as q, p as y, P as Ro, B as ye, D as R, F as _, H as k, L as N, M as A, O as bs, R as ir, V as $e, _ as U, $ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Ur, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Ls } from "./index-mzOlQSi7.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {