@bahmni/registration-app 0.0.1-dev.139 → 0.0.1-dev.140

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,7 +1,7 @@
1
- import { jsx as t, jsxs as p, Fragment as Z } from "react/jsx-runtime";
2
- import { u as z, y as Q, a as X, Y as J, U as ee, K as re, W as ae, d as oe, m as te, $ as U, q as ne, b as se, F as me, V as de, c as G, Z as ie, v } from "./index-DPNl3mNU.js";
1
+ import { jsx as t, jsxs as p, Fragment as W } from "react/jsx-runtime";
2
+ import { u as Z, V as Q, a as X, Y as J, U as ee, K as re, W as ae, d as oe, g as te, $ as U, F as ne, q as se, b as me, c as de, y as x, Z as ie, E as v } from "./index-f72K_11F.js";
3
3
  import { useQuery as h } from "@tanstack/react-query";
4
- import { useState as x, useMemo as $, useCallback as y } from "react";
4
+ import { useState as G, useMemo as $, useCallback as y } from "react";
5
5
  const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue = "_formContent_1pd36_18", pe = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", _e = "_groupContainer_1pd36_39", fe = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", Ne = "_rowLabel_1pd36_58", ge = "_rowValue_1pd36_67", he = "_groupMembers_1pd36_75", ye = "_memberRow_1pd36_81", ve = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Me = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Le = "_commentText_1pd36_116", Ce = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Oe = "_nestedGroupMembers_1pd36_141", o = {
6
6
  formsTableBody: le,
7
7
  customAccordianItem: ce,
@@ -193,7 +193,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
193
193
  encounterUuids: s,
194
194
  config: d
195
195
  }) => {
196
- const { t: r } = z(), u = Q(), [m, c] = x(!1), [a, b] = x(null), _ = d?.numberOfVisits, N = X(
196
+ const { t: r } = Z(), u = Q(), [m, c] = G(!1), [a, b] = G(null), _ = d?.numberOfVisits, N = X(
197
197
  e,
198
198
  s
199
199
  ), {
@@ -232,9 +232,9 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
232
232
  queryKey: ["formsEncounter", a?.encounterUuid],
233
233
  queryFn: () => ae(a.encounterUuid, !0),
234
234
  enabled: !!a?.encounterUuid && m
235
- }), I = $(() => !M?.observations || !a?.formName ? [] : M.observations.filter(
235
+ }), E = $(() => !M?.observations || !a?.formName ? [] : M.observations.filter(
236
236
  (n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(a.formName)
237
- ), [M?.observations, a?.formName]), V = $(
237
+ ), [M?.observations, a?.formName]), I = $(
238
238
  () => [
239
239
  { key: "recordedOn", header: r("FORM_RECORDED_ON") },
240
240
  { key: "recordedBy", header: r("FORM_RECORDED_BY") }
@@ -246,12 +246,12 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
246
246
  { key: "recordedBy", sortable: !0 }
247
247
  ],
248
248
  []
249
- ), E = $(() => {
249
+ ), V = $(() => {
250
250
  const n = D.reduce(
251
251
  (l, i) => {
252
252
  const f = i.formName;
253
253
  l[f] ??= [];
254
- const T = i.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
254
+ const T = i.providers.map((z) => z.providerName).filter(Boolean).join(", ");
255
255
  return l[f].push({
256
256
  id: i.encounterUuid,
257
257
  formName: i.formName,
@@ -273,7 +273,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
273
273
  ).sort((l, i) => l.formName.localeCompare(i.formName));
274
274
  }, [D, r]), S = y((n) => {
275
275
  b(n), c(!0);
276
- }, []), W = y(() => {
276
+ }, []), Y = y(() => {
277
277
  c(!1), b(null);
278
278
  }, []), B = y(
279
279
  (n, l) => {
@@ -288,11 +288,11 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
288
288
  },
289
289
  [S]
290
290
  );
291
- return /* @__PURE__ */ p(Z, { children: [
292
- /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: L || C || E.length === 0 || N ? /* @__PURE__ */ t(
291
+ return /* @__PURE__ */ p(W, { children: [
292
+ /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: L || C || V.length === 0 || N ? /* @__PURE__ */ t(
293
293
  U,
294
294
  {
295
- headers: V,
295
+ headers: I,
296
296
  ariaLabel: r("FORMS_HEADING"),
297
297
  rows: [],
298
298
  loading: L,
@@ -302,7 +302,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
302
302
  className: o.formsTableBody,
303
303
  dataTestId: "forms-table"
304
304
  }
305
- ) : /* @__PURE__ */ t(ne, { align: "start", children: E.map((n, l) => {
305
+ ) : /* @__PURE__ */ t(ne, { align: "start", children: V.map((n, l) => {
306
306
  const { formName: i, records: f } = n;
307
307
  return /* @__PURE__ */ t(
308
308
  se,
@@ -314,7 +314,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
314
314
  children: /* @__PURE__ */ t(
315
315
  U,
316
316
  {
317
- headers: V,
317
+ headers: I,
318
318
  ariaLabel: r("FORMS_HEADING"),
319
319
  rows: f,
320
320
  loading: !1,
@@ -335,13 +335,13 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
335
335
  {
336
336
  id: "modalIdForActionAreaLayout",
337
337
  open: m,
338
- onRequestClose: W,
338
+ onRequestClose: Y,
339
339
  modalHeading: a.formName,
340
340
  modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
341
341
  passiveModal: !0,
342
342
  size: "md",
343
343
  testId: "form-details-modal",
344
- children: /* @__PURE__ */ t("div", { className: o.formContent, children: H || j ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: G(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: G(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
344
+ children: /* @__PURE__ */ t("div", { className: o.formContent, children: H || j ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: x(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: x(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : E.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: E.map((n, l) => /* @__PURE__ */ t(
345
345
  Fe,
346
346
  {
347
347
  observation: n,
@@ -1,25 +1,25 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CLCwLQnS.js";
2
- import { k as d, l as f, n as e } from "./index-DPNl3mNU.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-5JXdyPqx.js";
2
+ import { l as d, n as f, o as e } from "./index-f72K_11F.js";
3
3
  var p = (a) => {
4
- const [r, t] = c({
4
+ const [r, o] = c({
5
5
  prefix: "TanstackQueryDevtools"
6
6
  }), n = d(), s = f(() => {
7
- const o = r.theme_preference || l;
8
- return o !== "system" ? o : n();
7
+ const t = r.theme_preference || l;
8
+ return t !== "system" ? t : n();
9
9
  });
10
10
  return e(i.Provider, {
11
11
  value: a,
12
12
  get children() {
13
13
  return e(m, {
14
14
  localStore: r,
15
- setLocalStore: t,
15
+ setLocalStore: o,
16
16
  get children() {
17
17
  return e(u.Provider, {
18
18
  value: s,
19
19
  get children() {
20
20
  return e(v, {
21
21
  localStore: r,
22
- setLocalStore: t
22
+ setLocalStore: o
23
23
  });
24
24
  }
25
25
  });
@@ -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-CLCwLQnS.js";
2
- import { k as v, l as C, n as e } from "./index-DPNl3mNU.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-5JXdyPqx.js";
2
+ import { l as v, n as C, o as e } from "./index-f72K_11F.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 _, jsx as b } from "react/jsx-runtime";
2
- import { y as B, e as U, u as I, f as k, g as x, h as H, $ as K, P as Q, i as w, j, w as P, H as G, M as X } from "./index-DPNl3mNU.js";
2
+ import { V as k, e as B, u as I, f as U, h as x, i as H, $ as K, P as Q, j as w, k as j, m as P, H as G, M as X } from "./index-f72K_11F.js";
3
3
  import { useQueries as Y, useQuery as Z } from "@tanstack/react-query";
4
4
  import { useRef as z, useEffect as S, useMemo as h } from "react";
5
5
  const J = "normal", W = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? Q(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
@@ -253,10 +253,10 @@ const D = (e, n, t, a, r) => {
253
253
  observations: be,
254
254
  title: ge
255
255
  }, me = (e) => ["conceptUuid", e], fe = (e, n) => ["observations", e, ...n], Oe = ({ config: e }) => {
256
- const n = e, { conceptNames: t = [], conceptUuid: a = [] } = n, r = z(/* @__PURE__ */ new Set()), o = B(), { addNotification: i } = U(), { t: s } = I(), u = Y({
256
+ const n = e, { conceptNames: t = [], conceptUuid: a = [] } = n, r = z(/* @__PURE__ */ new Set()), o = k(), { addNotification: i } = B(), { t: s } = I(), u = Y({
257
257
  queries: t.map((d) => ({
258
258
  queryKey: me(d),
259
- queryFn: () => k(d),
259
+ queryFn: () => U(d),
260
260
  enabled: !!d
261
261
  }))
262
262
  });
@@ -1,4 +1,4 @@
1
- import { o as we, p as z, r as xt, s as B, l as q, n as y, t as Ro, x as ye, S as R, z as _, A as k, B as N, C as A, D as bs, E as ir, G as $e, I as G, J as Hn, L as Vn, N as dt, O as D, Q as xs, R as cn, T as Be, X as ws, _ as qt, a0 as zt, a1 as $s, a2 as Cs, a3 as $n, a4 as Ss, a5 as Nr, a6 as Bt, a7 as zo, a8 as ks, a9 as Es, aa as j, ab as Gr, ac as Ms, ad as Ds, ae as sr, af as As, ag as Ts, ah as zn, ai as Fs, aj as Is, ak as Z, al as Ps, am as Ls } from "./index-DPNl3mNU.js";
1
+ import { p as we, r as z, s as xt, t as B, n as q, o as y, v as Ro, w as ye, S as R, x as _, z as k, A as N, B as A, C as bs, D as ir, G as $e, I as G, J as Hn, L as Vn, N as dt, O as D, Q as xs, R as cn, T as Be, X as ws, _ as qt, a0 as zt, a1 as $s, a2 as Cs, a3 as $n, a4 as Ss, a5 as Nr, a6 as Bt, a7 as zo, a8 as ks, a9 as Es, aa as j, ab as Gr, ac as Ms, ad as Ds, ae as sr, af as As, ag as Ts, ah as zn, ai as Fs, aj as Is, ak as Z, al as Ps, am as Ls } from "./index-f72K_11F.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {