@bahmni/home-app 0.0.1-dev.378 → 0.0.1-dev.380

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.
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,GAAG,4CAyClB;AAED,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,GAAG,4CA2ClB;AAED,eAAe,GAAG,CAAC"}
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as p, Fragment as W } from "react/jsx-runtime";
2
- import { g as x, u as G, K as Y, Q as J, w as X, a as Z, W as ee, p as te } from "./index-B2ApUh6V.js";
1
+ import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
2
+ import { g as G, u as W, Z as Y, w as Z, m as J, a as X, K as ee, p as te } from "./index-GASoF6qD.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 = {
@@ -38,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = x(), { t: n } = G(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
41
+ ), E = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
42
42
  U(e), w(!0);
43
43
  }, []), H = h(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
@@ -53,7 +53,7 @@ const Te = [
53
53
  u
54
54
  ],
55
55
  enabled: !!E,
56
- queryFn: () => J(
56
+ queryFn: () => Z(
57
57
  E,
58
58
  g,
59
59
  u,
@@ -97,7 +97,7 @@ const Te = [
97
97
  ), N = _(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), Q = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = _(() => ie(N, n), [N, n]), P = _(
100
+ ), j = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = _(() => ie(N, n), [N, n]), z = _(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -106,7 +106,7 @@ const Te = [
106
106
  ), T = _(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), z = h(
109
+ ), Q = h(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -114,7 +114,7 @@ const Te = [
114
114
  case "documentType":
115
115
  return e.documentType ?? n("DOCUMENTS_NOT_AVAILABLE");
116
116
  case "uploadedOn":
117
- return Z(
117
+ return X(
118
118
  e.uploadedOn,
119
119
  n,
120
120
  !0
@@ -123,7 +123,7 @@ const Te = [
123
123
  return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
124
124
  case "attachments":
125
125
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
126
- X,
126
+ J,
127
127
  {
128
128
  onClick: () => M(e),
129
129
  className: d.viewAttachmentsLink,
@@ -137,18 +137,18 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ p(W, { children: [
140
+ return /* @__PURE__ */ p(x, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
144
- headers: j,
144
+ headers: P,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: Q,
146
+ rows: j,
147
147
  loading: q,
148
148
  errorStateMessage: y ? b?.message : null,
149
- sortable: P,
149
+ sortable: z,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
- renderCell: z,
151
+ renderCell: Q,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
@@ -1,50 +1,50 @@
1
- import { jsx as i, jsxs as x, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, g as be, H as Ne, X as Oe, f as Te, b as Ie, Z as Ee, J as Ae, N as _e, c as ve, B as Fe, d as Be, s as K, a as Se, I as J, n as P, w as Me, W as Q, e as Re, k as Ce, p as Le, h as Ue, i as ke } from "./index-B2ApUh6V.js";
3
- import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
4
- import { useState as G, useMemo as d, useCallback as c } from "react";
5
- const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
6
- formsTableBody: we,
7
- modalHeading: qe,
8
- customAccordianItem: He
9
- }, Ve = "startConsultation", Ke = ({
10
- episodeOfCareUuids: S,
1
+ import { jsx as i, jsxs as z, Fragment as ye } from "react/jsx-runtime";
2
+ import { u as ge, g as be, b as Oe, J as Ne, c as Te, d as Ie, W as Ee, f as Ae, L as _e, e as ve, G as Fe, H as Le, s as $, a as Be, x as G, i as P, m as Se, K as Q, k as Me, B as Re, p as Ce, h as Ue, j as ke } from "./index-GASoF6qD.js";
3
+ import { useQueryClient as De, useQuery as N } from "@tanstack/react-query";
4
+ import { useState as J, useMemo as d, useCallback as c } from "react";
5
+ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
6
+ formsTableBody: qe,
7
+ modalHeading: He,
8
+ customAccordianItem: we
9
+ }, Ve = "startConsultation", $e = ({
10
+ episodeOfCareUuids: B,
11
11
  encounterUuids: m,
12
12
  config: W,
13
- disableActions: X = !1,
13
+ disableActions: Y = !1,
14
14
  activeEncounterUuid: p = null
15
15
  }) => {
16
- const { t: n } = ge(), u = be(), [y, M] = G(!1), [s, R] = G(null), {
16
+ const { t: n } = ge(), u = be(), [y, S] = J(!1), [s, M] = J(null), {
17
17
  numberOfVisits: Z,
18
- hideThumbnail: Y = !1,
18
+ hideThumbnail: X = !1,
19
19
  forms: g
20
- } = W ?? {}, ee = Ne(
20
+ } = W ?? {}, ee = Oe(
21
21
  ke.EDIT_OBSERVATIONS
22
- ), { userPrivileges: b } = Oe(), I = ee && !X && !!p, C = Te(
23
- S,
22
+ ), { userPrivileges: b } = Ne(), I = ee && !Y && !!p, R = Te(
23
+ B,
24
24
  m
25
25
  ), re = De(), {
26
- data: L = [],
26
+ data: C = [],
27
27
  isLoading: U,
28
28
  isError: k,
29
29
  error: oe,
30
30
  refetch: ae
31
- } = O({
32
- queryKey: ["forms", u, S],
31
+ } = N({
32
+ queryKey: ["forms", u, B],
33
33
  queryFn: () => Ie(u, void 0, Z),
34
- enabled: !!u && !C
34
+ enabled: !!u && !R
35
35
  }), D = d(() => {
36
- let e = L;
36
+ let e = C;
37
37
  return m && m.length > 0 && (e = e.filter(
38
38
  (r) => m.includes(r.encounterUuid)
39
39
  )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
40
  (r) => g.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [L, m, g]), { data: N = [] } = O({
42
+ }, [C, m, g]), { data: O = [] } = N({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ee()
45
- }), w = c(
45
+ }), q = c(
46
46
  (e) => {
47
- const r = N.find((t) => t.name === e);
47
+ const r = O.find((t) => t.name === e);
48
48
  if (!r?.privileges || r.privileges.length === 0) return !0;
49
49
  if (!b || b.length === 0) return !1;
50
50
  const o = new Set(b.map((t) => t.name));
@@ -52,22 +52,22 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
52
52
  (t) => o.has(t.privilegeName) && t.editable
53
53
  );
54
54
  },
55
- [N, b]
55
+ [O, b]
56
56
  ), f = c(
57
- (e) => !p || e.encounterUuid !== p ? !1 : w(e.formName),
58
- [p, w]
59
- ), q = c(
60
- (e) => N.find((r) => r.name === e)?.uuid,
61
- [N]
57
+ (e) => !p || e.encounterUuid !== p ? !1 : q(e.formName),
58
+ [p, q]
59
+ ), H = c(
60
+ (e) => O.find((r) => r.name === e)?.uuid,
61
+ [O]
62
62
  ), E = d(() => {
63
63
  if (s)
64
- return q(s.formName);
65
- }, [s, q]), {
64
+ return H(s.formName);
65
+ }, [s, H]), {
66
66
  data: l,
67
67
  isLoading: te,
68
68
  isError: se,
69
69
  error: A
70
- } = O({
70
+ } = N({
71
71
  queryKey: ["formMetadata", E],
72
72
  queryFn: () => Ae(E),
73
73
  enabled: !!E && y
@@ -76,7 +76,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
76
76
  isLoading: ne,
77
77
  isError: ie,
78
78
  error: v
79
- } = O({
79
+ } = N({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
81
  queryFn: () => _e(s.encounterUuid),
82
82
  enabled: !!s?.encounterUuid && y
@@ -87,7 +87,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
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) ? Be(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
90
+ const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Le(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
91
91
  if (!l?.schema) return;
92
92
  const e = [], r = (o) => {
93
93
  (o ?? []).forEach((t) => {
@@ -103,8 +103,8 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
103
103
  const e = {}, r = (o, t) => {
104
104
  for (const a of o)
105
105
  if (a.type === "section") {
106
- const B = a.label?.value ?? "Section";
107
- r(a.controls ?? [], B);
106
+ const L = a.label?.value ?? "Section";
107
+ r(a.controls ?? [], L);
108
108
  } else
109
109
  a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
110
110
  };
@@ -125,21 +125,21 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
125
125
  ), Object.keys(e).length > 0 ? e : void 0;
126
126
  }, [l]), ue = d(() => {
127
127
  if (A)
128
- return K(A).message;
128
+ return $(A).message;
129
129
  if (v)
130
- return K(v).message;
130
+ return $(v).message;
131
131
  }, [A, v]), h = d(
132
132
  () => [
133
133
  { key: "recordedOn", header: n("RECORDED_ON") },
134
134
  { key: "recordedBy", header: n("RECORDED_BY") }
135
135
  ],
136
136
  [n]
137
- ), H = d(
137
+ ), w = d(
138
138
  () => [...h, { key: "actions", header: n("ACTIONS") }],
139
139
  [h, n]
140
140
  ), fe = c(
141
- (e) => I && e.some((r) => f(r)) ? H : h,
142
- [I, f, H, h]
141
+ (e) => I && e.some((r) => f(r)) ? w : h,
142
+ [I, f, w, h]
143
143
  ), he = h, pe = d(
144
144
  () => [
145
145
  { key: "recordedOn", sortable: !0 },
@@ -151,11 +151,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
151
151
  (r, o) => {
152
152
  const t = o.formName;
153
153
  r[t] ??= [];
154
- const a = o.providers.map((B) => B.providerName).filter(Boolean).join(", ");
154
+ const a = o.providers.map((L) => L.providerName).filter(Boolean).join(", ");
155
155
  return r[t].push({
156
156
  id: o.encounterUuid,
157
157
  formName: o.formName,
158
- recordedOn: Se(o.encounterDateTime, n, !0).formattedResult,
158
+ recordedOn: Be(o.encounterDateTime, n, !0).formattedResult,
159
159
  recordedBy: a ?? "--",
160
160
  encounterDateTime: o.encounterDateTime,
161
161
  encounterUuid: o.encounterUuid
@@ -172,9 +172,9 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
172
172
  })
173
173
  ).sort((r, o) => r.formName.localeCompare(o.formName));
174
174
  }, [D, n]), j = c((e) => {
175
- R(e), M(!0);
176
- }, []), z = c(() => {
177
- M(!1), R(null);
175
+ M(e), S(!0);
176
+ }, []), x = c(() => {
177
+ S(!1), M(null);
178
178
  }, []), F = c((e) => {
179
179
  globalThis.dispatchEvent(
180
180
  new CustomEvent(Ve, {
@@ -187,16 +187,16 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
187
187
  }
188
188
  })
189
189
  );
190
- }, []), $ = c(
190
+ }, []), K = c(
191
191
  (e, r) => {
192
192
  switch (r) {
193
193
  case "recordedOn":
194
- return /* @__PURE__ */ i(Me, { onClick: () => j(e), children: e.recordedOn });
194
+ return /* @__PURE__ */ i(Se, { onClick: () => j(e), children: e.recordedOn });
195
195
  case "recordedBy":
196
196
  return e.recordedBy;
197
197
  case "actions":
198
198
  return f(e) ? /* @__PURE__ */ i(
199
- J,
199
+ G,
200
200
  {
201
201
  label: n("EDIT_OBSERVATION_FORM"),
202
202
  kind: "ghost",
@@ -212,8 +212,8 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
212
212
  },
213
213
  [j, F, f, n]
214
214
  );
215
- return /* @__PURE__ */ x(ye, { children: [
216
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || C ? /* @__PURE__ */ i(
215
+ return /* @__PURE__ */ z(ye, { children: [
216
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || R ? /* @__PURE__ */ i(
217
217
  Q,
218
218
  {
219
219
  headers: he,
@@ -222,14 +222,14 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
222
222
  loading: U,
223
223
  errorStateMessage: k ? oe?.message : void 0,
224
224
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
225
- renderCell: $,
225
+ renderCell: K,
226
226
  className: T.formsTableBody,
227
227
  dataTestId: "forms-table"
228
228
  }
229
- ) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
229
+ ) : /* @__PURE__ */ i(Me, { align: "start", children: V.map((e, r) => {
230
230
  const { formName: o, records: t } = e, a = fe(t);
231
231
  return /* @__PURE__ */ i(
232
- Ce,
232
+ Re,
233
233
  {
234
234
  title: o,
235
235
  className: T.customAccordianItem,
@@ -245,7 +245,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
245
245
  errorStateMessage: "",
246
246
  sortable: pe,
247
247
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
248
- renderCell: $,
248
+ renderCell: K,
249
249
  className: T.formsTableBody,
250
250
  dataTestId: `forms-table-${o}`
251
251
  }
@@ -255,23 +255,23 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
255
255
  );
256
256
  }) }) }),
257
257
  y && s && /* @__PURE__ */ i(
258
- Le,
258
+ Ce,
259
259
  {
260
260
  id: "modalIdForActionAreaLayout",
261
261
  portalId: "main-display-area",
262
262
  open: y,
263
- onRequestClose: z,
264
- modalHeading: /* @__PURE__ */ x("div", { className: T.modalHeading, children: [
263
+ onRequestClose: x,
264
+ modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
265
265
  /* @__PURE__ */ i("span", { children: s.formName }),
266
266
  I && f(s) && /* @__PURE__ */ i(
267
- J,
267
+ G,
268
268
  {
269
269
  label: n("EDIT_OBSERVATION_FORM"),
270
270
  kind: "ghost",
271
271
  size: "sm",
272
272
  testId: `edit-form-modal-${s.encounterUuid}`,
273
273
  onClick: () => {
274
- z(), F(s);
274
+ x(), F(s);
275
275
  },
276
276
  children: /* @__PURE__ */ i(P, {})
277
277
  }
@@ -290,7 +290,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
290
290
  errorMessage: ue,
291
291
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
292
292
  testIdPrefix: s.formName,
293
- hideThumbnail: Y,
293
+ hideThumbnail: X,
294
294
  controlOrder: le,
295
295
  sectionMap: ce,
296
296
  conceptDatatypeMap: me
@@ -301,5 +301,5 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
301
301
  ] });
302
302
  };
303
303
  export {
304
- Ke as default
304
+ $e as default
305
305
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DiBaM0OF.js";
2
- import { a0 as d, a1 as f, a2 as e } from "./index-B2ApUh6V.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BZsW-6Ci.js";
2
+ import { U as d, X as f, Y as e } from "./index-GASoF6qD.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-DiBaM0OF.js";
2
- import { a0 as v, a1 as C, a2 as e } from "./index-B2ApUh6V.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-BZsW-6Ci.js";
2
+ import { U as v, X as C, Y as e } from "./index-GASoF6qD.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,34 +1,34 @@
1
- import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { g as q, K as w, u as N, j as k, Y as x, c as z, l as Q, m as j, o as G, q as H, W as M, r as Y, z as A, t as P, V as W, v as J, x as X, y as Z, A as ee } from "./index-B2ApUh6V.js";
1
+ import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
+ import { g as B, Z as M, u as S, l as k, n as w, e as x, o as H, N as Q, A as z, q as G, K as j, M as P, r as A, t as Z, C as J, v as Y, y as W, z as X, V as ee } from "./index-GASoF6qD.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as _, useMemo as g } from "react";
5
- const D = (a, n, d, l, b, r) => {
6
- const t = P(a, n, b), s = t.value, i = W(s);
7
- let o = s;
8
- i === "Image" && (o = /* @__PURE__ */ u(
9
- X,
5
+ const C = (a, n, d, l, b, r) => {
6
+ const t = Z(a, n, b), s = t.value, o = J(s);
7
+ let i = s;
8
+ o === "Image" && (i = /* @__PURE__ */ u(
9
+ W,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
13
13
  id: `${s}-img`,
14
14
  hideThumbnail: r
15
15
  }
16
- )), i === "Video" && (o = /* @__PURE__ */ u(
17
- Z,
16
+ )), o === "Video" && (i = /* @__PURE__ */ u(
17
+ X,
18
18
  {
19
19
  id: `${s}-video`,
20
20
  videoSrc: s,
21
21
  hideThumbnail: r
22
22
  }
23
- )), i === "PDF" && (o = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
23
+ )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
24
  const m = b("OBSERVATIONS_RECORDED_BY", {
25
25
  provider: t.provider
26
26
  }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- J,
28
+ Y,
29
29
  {
30
30
  header: t.header,
31
- value: o,
31
+ value: i,
32
32
  info: m,
33
33
  id: c,
34
34
  testId: c,
@@ -43,9 +43,9 @@ 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, o) => C(
47
47
  s,
48
- i,
48
+ o,
49
49
  b,
50
50
  r,
51
51
  n,
@@ -54,23 +54,23 @@ const D = (a, n, d, l, b, r) => {
54
54
  )
55
55
  },
56
56
  `grouped-obs-${a.id}`
57
- ), ie = ({
57
+ ), oe = ({
58
58
  groupedData: a,
59
59
  title: n = "",
60
60
  hideThumbnail: d
61
61
  }) => {
62
- const { t: l } = N(), b = (r, t, s) => {
63
- const i = Y(r.encounterDetails, l);
64
- return /* @__PURE__ */ S(
62
+ const { t: l } = S(), b = (r, t, s) => {
63
+ const o = P(r.encounterDetails, l);
64
+ return /* @__PURE__ */ N(
65
65
  A,
66
66
  {
67
- title: i,
67
+ title: o,
68
68
  id: `encounter-${r.encounterId}`,
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (o, m) => D(
73
- o,
72
+ (i, m) => C(
73
+ i,
74
74
  m,
75
75
  s,
76
76
  n,
@@ -79,8 +79,8 @@ const D = (a, n, d, l, b, r) => {
79
79
  )
80
80
  ),
81
81
  r.groupedObservations.map(
82
- (o, m) => re(
83
- o,
82
+ (i, m) => re(
83
+ i,
84
84
  l,
85
85
  t,
86
86
  m,
@@ -105,15 +105,15 @@ 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", $ = {
109
- observations: oe,
108
+ }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
109
+ observations: ie,
110
110
  title: ne
111
111
  }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
112
112
  const n = a, {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = w(), { t: i } = N(), o = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = M(), { t: o } = S(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => k(e),
@@ -121,51 +121,51 @@ const D = (a, n, d, l, b, r) => {
121
121
  }))
122
122
  });
123
123
  _(() => {
124
- o.forEach((e, h) => {
124
+ i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const B = d[h];
126
+ const q = d[h];
127
127
  s({
128
- title: i("ERROR_DEFAULT_TITLE"),
129
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
128
+ title: o("ERROR_DEFAULT_TITLE"),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
133
133
  });
134
- }, [o, d]);
135
- const m = g(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
134
+ }, [i, d]);
135
+ const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: F,
138
- isError: T,
139
- refetch: f
137
+ isLoading: D,
138
+ isError: R,
139
+ refetch: T
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
- queryFn: () => x(t, p),
142
+ queryFn: () => w(t, p),
143
143
  enabled: !!t && p.length > 0 && y
144
144
  });
145
- z(
145
+ x(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
- ) && f();
149
+ ) && T();
150
150
  },
151
- [t, f]
151
+ [t, T]
152
152
  ), _(() => {
153
- T && s({
154
- title: i("ERROR_DEFAULT_TITLE"),
155
- message: i("ERROR_FETCHING_OBSERVATIONS"),
153
+ R && s({
154
+ title: o("ERROR_DEFAULT_TITLE"),
155
+ message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
- }, [T]);
159
- const R = g(() => {
158
+ }, [R]);
159
+ const f = g(() => {
160
160
  if (!c) return [];
161
- const e = Q(c), h = j(e);
162
- return G(h);
163
- }, [c]), K = [
161
+ const e = H(c), h = Q(e);
162
+ return z(h);
163
+ }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], O = F || !y, I = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, V = I ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = R.length > 0 && !O && !I, E = n.titleTranslationKey, v = E ? i(E) : "";
168
- return /* @__PURE__ */ S(
167
+ ], O = D || !y, I = R && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, K = I ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !O && !I, E = n.titleTranslationKey, v = E ? o(E) : "";
168
+ return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
@@ -174,7 +174,7 @@ const D = (a, n, d, l, b, r) => {
174
174
  className: $.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- H,
177
+ G,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -184,21 +184,21 @@ const D = (a, n, d, l, b, r) => {
184
184
  }
185
185
  ),
186
186
  U ? /* @__PURE__ */ u(
187
- ie,
187
+ oe,
188
188
  {
189
- groupedData: R,
189
+ groupedData: f,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- M,
194
+ j,
195
195
  {
196
- headers: K,
196
+ headers: F,
197
197
  rows: [],
198
- ariaLabel: i("OBSERVATIONS"),
198
+ ariaLabel: o("OBSERVATIONS"),
199
199
  loading: O,
200
- errorStateMessage: V,
201
- emptyStateMessage: C,
200
+ errorStateMessage: K,
201
+ emptyStateMessage: V,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-B2ApUh6V.js";
1
+ import { _ as we, a0 as z, a1 as xt, a2 as B, X as q, Y as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-GASoF6qD.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"HomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageHeader/HomePageHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAiBlC,CAAC"}
1
+ {"version":3,"file":"HomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/HomePageHeader/HomePageHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAYlC,CAAC"}
@@ -1,5 +1,3 @@
1
1
  export declare const HOME_NAMESPACE = "home";
2
- export declare const LOGIN_PATH = "/bahmni/home/index.html#/login";
3
- export declare const CHANGE_PASSWORD_PATH = "/bahmni/home/index.html#/changePassword";
4
2
  export declare const HOMEPAGE_TILES_SKELETON_COUNT = 6;
5
3
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAC3D,eAAO,MAAM,oBAAoB,4CAA4C,CAAC;AAC9E,eAAO,MAAM,6BAA6B,IAAI,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,6BAA6B,IAAI,CAAC"}