@bahmni/appointments-app 0.0.1-dev.396 → 0.0.1-dev.397

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 r, jsxs as p, Fragment as G } from "react/jsx-runtime";
2
- import { g as Q, u as Y, L as W, B as J, q as X, w as Z, K as ee, p as te } from "./index-B2ffg2ah.js";
2
+ import { g as Q, u as Y, L as W, B as J, q as X, w as Z, K as ee, p as te } from "./index-Cjx4xv_3.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, jsxs as P, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, g as be, A as Ne, e as Oe, a as Te, k as Ee, o as Ie, Z as Ae, F as _e, m as ve, Y as Fe, G as Se, b as $, w as Be, N as x, E as G, q as Me, K as Y, c as Re, P as Ce, p as Le, d as Ue, n as ke } from "./index-B2ffg2ah.js";
2
+ import { u as ge, g as be, _ as Ne, e as Oe, v as Te, k as Ee, o as Ie, Z as _e, F as ve, m as Ae, Y as Fe, G as Se, a as $, w as Be, N as x, E as G, q as Me, K as Y, b as Re, P as Ce, p as Le, c as Ue, n as ke } from "./index-Cjx4xv_3.js";
3
3
  import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
4
4
  import { useState as Q, useMemo as d, useCallback as c } from "react";
5
5
  const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
@@ -66,28 +66,28 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
66
66
  data: l,
67
67
  isLoading: te,
68
68
  isError: se,
69
- error: A
69
+ error: _
70
70
  } = O({
71
71
  queryKey: ["formMetadata", I],
72
- queryFn: () => Ae(I),
72
+ queryFn: () => _e(I),
73
73
  enabled: !!I && y
74
74
  }), {
75
- data: _,
75
+ data: v,
76
76
  isLoading: ne,
77
77
  isError: ie,
78
- error: v
78
+ error: A
79
79
  } = O({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
- queryFn: () => _e(s.encounterUuid),
81
+ queryFn: () => ve(s.encounterUuid),
82
82
  enabled: !!s?.encounterUuid && y
83
83
  });
84
- ve(
84
+ Ae(
85
85
  (e) => {
86
86
  e.patientUUID === u && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
87
87
  },
88
88
  [u]
89
89
  );
90
- const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
90
+ const de = d(() => !v?.entry || !s?.formName ? [] : v.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [v, s?.formName]), le = d(() => {
91
91
  if (!l?.schema) return;
92
92
  const e = [], r = (o) => {
93
93
  (o ?? []).forEach((t) => {
@@ -124,11 +124,11 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
124
124
  l.schema.controls ?? []
125
125
  ), Object.keys(e).length > 0 ? e : void 0;
126
126
  }, [l]), ue = d(() => {
127
+ if (_)
128
+ return $(_).message;
127
129
  if (A)
128
130
  return $(A).message;
129
- if (v)
130
- return $(v).message;
131
- }, [A, v]), p = d(
131
+ }, [_, A]), p = d(
132
132
  () => [
133
133
  { key: "recordedOn", header: n("RECORDED_ON") },
134
134
  { key: "recordedBy", header: n("RECORDED_BY") }
@@ -181,7 +181,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
181
181
  detail: {
182
182
  editOnly: "observationForms",
183
183
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
184
- editEncounterUuid: e.encounterUuid,
184
+ sourceEncounterUuid: e.encounterUuid,
185
185
  formName: e.formName,
186
186
  directFormMode: !0
187
187
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Daq8zxzA.js";
2
- import { an as p, ao as d, ap as e } from "./index-B2ffg2ah.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B_E24tMN.js";
2
+ import { an as p, ao as d, ap as e } from "./index-Cjx4xv_3.js";
3
3
  var f = (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-Daq8zxzA.js";
2
- import { an as v, ao as C, ap as e } from "./index-B2ffg2ah.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-B_E24tMN.js";
2
+ import { an as v, ao as C, ap as e } from "./index-Cjx4xv_3.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 S, jsx as u } from "react/jsx-runtime";
2
- import { g as q, L as k, u as N, $ as G, I as Q, m as j, f as w, h as x, J as H, i as J, K as M, j as z, v as L, l as P, _ as Y, y as W, r as X, V as Z, s as ee } from "./index-B2ffg2ah.js";
2
+ import { g as q, L as k, u as N, $ as G, I as Q, m as j, d as w, f as x, J as H, h as J, K as M, i as z, j as L, l as P, C as Y, y as W, r as X, V as Z, s as ee } from "./index-Cjx4xv_3.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as g } from "react";
5
- const D = (a, n, d, l, b, r) => {
4
+ import { useRef as se, useEffect as $, useMemo as g } from "react";
5
+ const C = (a, n, d, l, b, r) => {
6
6
  const t = P(a, n, b), s = t.value, i = Y(s);
7
7
  let o = s;
8
8
  i === "Image" && (o = /* @__PURE__ */ u(
@@ -43,7 +43,7 @@ const D = (a, n, d, l, b, r) => {
43
43
  id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
45
  children: a.members?.map(
46
- (s, i) => D(
46
+ (s, i) => C(
47
47
  s,
48
48
  i,
49
49
  b,
@@ -69,7 +69,7 @@ const D = (a, n, d, l, b, r) => {
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (o, m) => D(
72
+ (o, m) => C(
73
73
  o,
74
74
  m,
75
75
  s,
@@ -105,7 +105,7 @@ const D = (a, n, d, l, b, r) => {
105
105
  )
106
106
  }
107
107
  );
108
- }, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
108
+ }, oe = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", _ = {
109
109
  observations: oe,
110
110
  title: ne
111
111
  }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
@@ -120,7 +120,7 @@ const D = (a, n, d, l, b, r) => {
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- _(() => {
123
+ $(() => {
124
124
  o.forEach((e, y) => {
125
125
  if (e.isError && !r.current.has(y)) {
126
126
  const B = d[y];
@@ -134,7 +134,7 @@ const D = (a, n, d, l, b, r) => {
134
134
  }, [o, d]);
135
135
  const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
136
136
  data: c,
137
- isLoading: F,
137
+ isLoading: D,
138
138
  isError: R,
139
139
  refetch: T
140
140
  } = te({
@@ -149,7 +149,7 @@ const D = (a, n, d, l, b, r) => {
149
149
  ) && T();
150
150
  },
151
151
  [t, T]
152
- ), _(() => {
152
+ ), $(() => {
153
153
  R && s({
154
154
  title: i("ERROR_DEFAULT_TITLE"),
155
155
  message: i("ERROR_FETCHING_OBSERVATIONS"),
@@ -160,18 +160,18 @@ const D = (a, n, d, l, b, r) => {
160
160
  if (!c) return [];
161
161
  const e = w(c), y = x(e);
162
162
  return H(y);
163
- }, [c]), K = [
163
+ }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], I = F || !h, O = R && h, V = (!c || c.entry?.length === 0 || p.length === 0) && h, A = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = V ? i("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !I && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
167
+ ], I = D || !h, O = R && h, K = (!c || c.entry?.length === 0 || p.length === 0) && h, V = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, A = K ? i("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !I && !O, E = n.titleTranslationKey, v = E ? i(E) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
172
  "data-testid": E ? `observations-${v}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
- className: $.observations,
174
+ className: _.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
177
  J,
@@ -179,7 +179,7 @@ const D = (a, n, d, l, b, r) => {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
181
181
  title: v,
182
- className: $.title,
182
+ className: _.title,
183
183
  children: /* @__PURE__ */ u("p", { children: v })
184
184
  }
185
185
  ),
@@ -193,12 +193,12 @@ const D = (a, n, d, l, b, r) => {
193
193
  ) : /* @__PURE__ */ u(
194
194
  M,
195
195
  {
196
- headers: K,
196
+ headers: F,
197
197
  rows: [],
198
198
  ariaLabel: i("OBSERVATIONS"),
199
199
  loading: I,
200
- errorStateMessage: A,
201
- emptyStateMessage: C,
200
+ errorStateMessage: V,
201
+ emptyStateMessage: A,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-B2ffg2ah.js";
1
+ import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-Cjx4xv_3.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p } from "react/jsx-runtime";
2
- import { X as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, M as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as $, e as oe, L as de, D as q, aj as ce, H as me, ak as Ae, al as Ie, am as ue, Q as _e, R as Te, S as Le } from "./index-B2ffg2ah.js";
2
+ import { X as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, M as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as E, ad as F, ae as C, af as Y, ag as x, ah as k, ai as $, e as oe, L as de, D as q, aj as ce, H as me, ak as Ae, al as Ie, am as ue, Q as _e, R as Te, S as Le } from "./index-Cjx4xv_3.js";
3
3
  import { useState as g, useMemo as N, useEffect as S, useRef as ve, useCallback as U } from "react";
4
4
  import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
5
5
  const be = "Available for appointments", G = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", w = "Appointment Location", Me = () => {