@bahmni/home-app 0.0.1-dev.396 → 0.0.1-dev.398
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/{DocumentsTable-BACwpRCF-DUp5jWaj.js → DocumentsTable-CyCmTrjB-wzauvZ7r.js} +1 -1
- package/dist/{FormsTable-CnCVkY6d-Cbeqby3l.js → FormsTable-CMtT3i5o-BG6NAXpa.js} +12 -12
- package/dist/{LNWAZHJI-CrVJ2XFJ.js → LNWAZHJI-ZuiXeFBX.js} +2 -2
- package/dist/{MWZ6AO7Z-ppc2KRhI.js → MWZ6AO7Z-8pHY9KaZ.js} +2 -2
- package/dist/{Observations-ZyRGglZf-B83q2NnF.js → Observations-Cco2HyR_-CjyZqsA-.js} +16 -16
- package/dist/{YPM2AS64-CzOB0PZl.js → YPM2AS64-DTGVvqL8.js} +1 -1
- package/dist/{index-tqtZGQtY.js → index-8fg6lvVf.js} +8816 -8799
- package/dist/{index-CTUz4Yua.js → index-CRre-IaF.js} +11 -11
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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-8fg6lvVf.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,
|
|
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-8fg6lvVf.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:
|
|
69
|
+
error: _
|
|
70
70
|
} = O({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
|
-
queryFn: () =>
|
|
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:
|
|
78
|
+
error: A
|
|
79
79
|
} = O({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
-
queryFn: () =>
|
|
81
|
+
queryFn: () => ve(s.encounterUuid),
|
|
82
82
|
enabled: !!s?.encounterUuid && y
|
|
83
83
|
});
|
|
84
|
-
|
|
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(() => !
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
2
|
-
import { T as d, U as f, W as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DTGVvqL8.js";
|
|
2
|
+
import { T as d, U as f, W as e } from "./index-8fg6lvVf.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-
|
|
2
|
-
import { T as v, U as C, W as e } from "./index-
|
|
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-DTGVvqL8.js";
|
|
2
|
+
import { T as v, U as C, W as e } from "./index-8fg6lvVf.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,
|
|
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-8fg6lvVf.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
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) =>
|
|
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) =>
|
|
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:
|
|
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]),
|
|
163
|
+
}, [c]), F = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
], I =
|
|
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:
|
|
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:
|
|
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:
|
|
196
|
+
headers: F,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
199
|
loading: I,
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
200
|
+
errorStateMessage: V,
|
|
201
|
+
emptyStateMessage: A,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { X as we, a0 as z, a1 as xt, a2 as B, U as q, W 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 U, 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 Ur, 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-
|
|
1
|
+
import { X as we, a0 as z, a1 as xt, a2 as B, U as q, W 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 U, 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 Ur, 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-8fg6lvVf.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|