@bahmni/clinical-app 0.0.1-dev.316 → 0.0.1-dev.319
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-CGQkFmPv-D03cCVXZ.js → DocumentsTable-N3KZd9ZV-DcBUo8_C.js} +6 -6
- package/dist/{FormsTable-H67oOCKk-CTzKVXp9.js → FormsTable-F1FaoFiu-Bz9p77rm.js} +72 -72
- package/dist/{LNWAZHJI-D0D97q_C.js → LNWAZHJI-9OnKhlh6.js} +2 -2
- package/dist/{MWZ6AO7Z-DsLu3B2O.js → MWZ6AO7Z-1iaOUtB4.js} +2 -2
- package/dist/{Observations-BLNBreYi-B75TL6hP.js → Observations-HyR2_B59-DXBOhGyE.js} +1 -1
- package/dist/{YPM2AS64-HWEZ87Al.js → YPM2AS64-Dl2xhzIk.js} +1 -1
- package/dist/components/forms/investigations/InvestigationsForm.d.ts.map +1 -1
- package/dist/{index-Cqbdtt4O.js → index-KT3ssyRA.js} +10133 -10038
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as r, jsxs as h, Fragment as
|
|
2
|
-
import { n as
|
|
1
|
+
import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-KT3ssyRA.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as N, useMemo as p } 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
|
), [$, D] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E =
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: M } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
|
|
42
42
|
w(e), U(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
U(!1), w(null), D(/* @__PURE__ */ new Set());
|
|
@@ -106,7 +106,7 @@ const Te = [
|
|
|
106
106
|
), T = p(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
),
|
|
109
|
+
), Q = _(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,7 +137,7 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[L, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */ h(
|
|
140
|
+
return /* @__PURE__ */ h(x, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -148,7 +148,7 @@ const Te = [
|
|
|
148
148
|
errorStateMessage: b ? y?.message : null,
|
|
149
149
|
sortable: K,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
|
-
renderCell:
|
|
151
|
+
renderCell: Q,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as i, jsxs as re, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
+
import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as be, $ as ge } from "./index-KT3ssyRA.js";
|
|
3
3
|
import { useQueryClient as pe, useQuery as h } from "@tanstack/react-query";
|
|
4
4
|
import { useState as w, useMemo as d, useCallback as b } from "react";
|
|
5
5
|
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
|
|
@@ -7,47 +7,47 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
7
7
|
customAccordianItem: Oe
|
|
8
8
|
}, Ae = (m) => m ? m.extension?.find(
|
|
9
9
|
(l) => l.url === ge
|
|
10
|
-
)?.valueString : void 0,
|
|
10
|
+
)?.valueString : void 0, Te = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: l,
|
|
13
13
|
config: k
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } =
|
|
15
|
+
const { t: n } = te(), c = oe(), [f, v] = w(!1), [o, F] = w(null), {
|
|
16
16
|
numberOfVisits: x,
|
|
17
17
|
hideThumbnail: $ = !1,
|
|
18
18
|
forms: y
|
|
19
|
-
} = k ?? {},
|
|
19
|
+
} = k ?? {}, I = se(
|
|
20
20
|
m,
|
|
21
21
|
l
|
|
22
|
-
),
|
|
23
|
-
data:
|
|
22
|
+
), H = pe(), {
|
|
23
|
+
data: T = [],
|
|
24
24
|
isLoading: B,
|
|
25
|
-
isError:
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
25
|
+
isError: D,
|
|
26
|
+
error: K,
|
|
27
|
+
refetch: Q
|
|
28
28
|
} = h({
|
|
29
29
|
queryKey: ["forms", c, m],
|
|
30
30
|
queryFn: () => ne(c, void 0, x),
|
|
31
|
-
enabled: !!c && !
|
|
32
|
-
}),
|
|
33
|
-
let e =
|
|
31
|
+
enabled: !!c && !I
|
|
32
|
+
}), E = d(() => {
|
|
33
|
+
let e = T;
|
|
34
34
|
return l && l.length > 0 && (e = e.filter(
|
|
35
35
|
(r) => l.includes(r.encounterUuid)
|
|
36
36
|
)), Array.isArray(y) && y.length > 0 && (e = e.filter(
|
|
37
|
-
(r) => y.some((
|
|
37
|
+
(r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
38
38
|
)), e;
|
|
39
|
-
}, [
|
|
39
|
+
}, [T, l, y]), { data: L = [] } = h({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
41
41
|
queryFn: () => de()
|
|
42
42
|
}), S = b(
|
|
43
|
-
(e) =>
|
|
44
|
-
[
|
|
43
|
+
(e) => L.find((r) => r.name === e)?.uuid,
|
|
44
|
+
[L]
|
|
45
45
|
), g = d(() => {
|
|
46
|
-
if (
|
|
47
|
-
return S(
|
|
48
|
-
}, [
|
|
46
|
+
if (o)
|
|
47
|
+
return S(o.formName);
|
|
48
|
+
}, [o, S]), {
|
|
49
49
|
data: u,
|
|
50
|
-
isLoading:
|
|
50
|
+
isLoading: V,
|
|
51
51
|
isError: z,
|
|
52
52
|
error: p
|
|
53
53
|
} = h({
|
|
@@ -60,25 +60,25 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
60
60
|
isError: P,
|
|
61
61
|
error: O
|
|
62
62
|
} = h({
|
|
63
|
-
queryKey: ["formsEncounterFHIR",
|
|
64
|
-
queryFn: () => le(
|
|
65
|
-
enabled: !!
|
|
63
|
+
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
64
|
+
queryFn: () => le(o.encounterUuid),
|
|
65
|
+
enabled: !!o?.encounterUuid && f
|
|
66
66
|
});
|
|
67
67
|
ue(
|
|
68
68
|
(e) => {
|
|
69
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (
|
|
69
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (Q(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
70
|
},
|
|
71
71
|
[c]
|
|
72
72
|
);
|
|
73
|
-
const Y = d(() => !N?.entry || !
|
|
73
|
+
const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
74
74
|
const r = Ae(e);
|
|
75
|
-
return !r || r.includes(
|
|
76
|
-
}), [N,
|
|
75
|
+
return !r || r.includes(o.formName);
|
|
76
|
+
}), [N, o?.formName]), J = d(() => {
|
|
77
77
|
if (!u?.schema) return;
|
|
78
|
-
const e = [], r = (
|
|
79
|
-
(
|
|
80
|
-
const
|
|
81
|
-
|
|
78
|
+
const e = [], r = (a) => {
|
|
79
|
+
(a ?? []).forEach((s) => {
|
|
80
|
+
const t = s;
|
|
81
|
+
t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
return r(
|
|
@@ -86,13 +86,13 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
86
86
|
), e.length > 0 ? e : void 0;
|
|
87
87
|
}, [u]), W = d(() => {
|
|
88
88
|
if (!u?.schema) return;
|
|
89
|
-
const e = {}, r = (
|
|
90
|
-
for (const
|
|
91
|
-
if (
|
|
92
|
-
const A =
|
|
93
|
-
r(
|
|
89
|
+
const e = {}, r = (a, s) => {
|
|
90
|
+
for (const t of a)
|
|
91
|
+
if (t.type === "section") {
|
|
92
|
+
const A = t.label?.value ?? "Section";
|
|
93
|
+
r(t.controls ?? [], A);
|
|
94
94
|
} else
|
|
95
|
-
|
|
95
|
+
t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
|
|
96
96
|
};
|
|
97
97
|
return r(
|
|
98
98
|
u.schema.controls ?? [],
|
|
@@ -116,34 +116,34 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
116
116
|
],
|
|
117
117
|
[]
|
|
118
118
|
), C = d(() => {
|
|
119
|
-
const e =
|
|
120
|
-
(r,
|
|
121
|
-
const
|
|
122
|
-
r[
|
|
123
|
-
const
|
|
124
|
-
return r[
|
|
125
|
-
id:
|
|
126
|
-
formName:
|
|
127
|
-
recordedOn: me(
|
|
128
|
-
recordedBy:
|
|
129
|
-
encounterDateTime:
|
|
130
|
-
encounterUuid:
|
|
119
|
+
const e = E.reduce(
|
|
120
|
+
(r, a) => {
|
|
121
|
+
const s = a.formName;
|
|
122
|
+
r[s] ??= [];
|
|
123
|
+
const t = a.providers.map((A) => A.providerName).filter(Boolean).join(", ");
|
|
124
|
+
return r[s].push({
|
|
125
|
+
id: a.encounterUuid,
|
|
126
|
+
formName: a.formName,
|
|
127
|
+
recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
|
|
128
|
+
recordedBy: t ?? "--",
|
|
129
|
+
encounterDateTime: a.encounterDateTime,
|
|
130
|
+
encounterUuid: a.encounterUuid
|
|
131
131
|
}), r;
|
|
132
132
|
},
|
|
133
133
|
{}
|
|
134
134
|
);
|
|
135
135
|
return Object.entries(e).map(
|
|
136
|
-
([r,
|
|
136
|
+
([r, a]) => ({
|
|
137
137
|
formName: r,
|
|
138
|
-
records:
|
|
139
|
-
(
|
|
138
|
+
records: a.sort(
|
|
139
|
+
(s, t) => t.encounterDateTime - s.encounterDateTime
|
|
140
140
|
)
|
|
141
141
|
})
|
|
142
|
-
).sort((r,
|
|
143
|
-
}, [
|
|
144
|
-
|
|
142
|
+
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
143
|
+
}, [E, n]), R = b((e) => {
|
|
144
|
+
F(e), v(!0);
|
|
145
145
|
}, []), ee = b(() => {
|
|
146
|
-
|
|
146
|
+
v(!1), F(null);
|
|
147
147
|
}, []), U = b(
|
|
148
148
|
(e, r) => {
|
|
149
149
|
switch (r) {
|
|
@@ -157,57 +157,57 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
157
157
|
},
|
|
158
158
|
[R]
|
|
159
159
|
);
|
|
160
|
-
return /* @__PURE__ */ re(
|
|
161
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B ||
|
|
160
|
+
return /* @__PURE__ */ re(ae, { children: [
|
|
161
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || D || C.length === 0 || I ? /* @__PURE__ */ i(
|
|
162
162
|
j,
|
|
163
163
|
{
|
|
164
164
|
headers: _,
|
|
165
165
|
ariaLabel: n("FORMS_HEADING"),
|
|
166
166
|
rows: [],
|
|
167
167
|
loading: B,
|
|
168
|
-
errorStateMessage:
|
|
168
|
+
errorStateMessage: D ? K?.message : void 0,
|
|
169
169
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
170
170
|
renderCell: U,
|
|
171
171
|
className: M.formsTableBody,
|
|
172
172
|
dataTestId: "forms-table"
|
|
173
173
|
}
|
|
174
174
|
) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
|
|
175
|
-
const { formName:
|
|
175
|
+
const { formName: a, records: s } = e;
|
|
176
176
|
return /* @__PURE__ */ i(
|
|
177
177
|
ye,
|
|
178
178
|
{
|
|
179
|
-
title:
|
|
179
|
+
title: a,
|
|
180
180
|
className: M.customAccordianItem,
|
|
181
|
-
testId: `accordian-title-${
|
|
181
|
+
testId: `accordian-title-${a}`,
|
|
182
182
|
open: r === 0,
|
|
183
183
|
children: /* @__PURE__ */ i(
|
|
184
184
|
j,
|
|
185
185
|
{
|
|
186
186
|
headers: _,
|
|
187
187
|
ariaLabel: n("FORMS_HEADING"),
|
|
188
|
-
rows:
|
|
188
|
+
rows: s,
|
|
189
189
|
loading: !1,
|
|
190
190
|
errorStateMessage: "",
|
|
191
191
|
sortable: Z,
|
|
192
192
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
193
193
|
renderCell: U,
|
|
194
194
|
className: M.formsTableBody,
|
|
195
|
-
dataTestId: `forms-table-${
|
|
195
|
+
dataTestId: `forms-table-${a}`
|
|
196
196
|
}
|
|
197
197
|
)
|
|
198
198
|
},
|
|
199
|
-
|
|
199
|
+
a
|
|
200
200
|
);
|
|
201
201
|
}) }) }),
|
|
202
|
-
f &&
|
|
202
|
+
f && o && /* @__PURE__ */ i(
|
|
203
203
|
he,
|
|
204
204
|
{
|
|
205
205
|
id: "modalIdForActionAreaLayout",
|
|
206
206
|
portalId: "main-display-area",
|
|
207
207
|
open: f,
|
|
208
208
|
onRequestClose: ee,
|
|
209
|
-
modalHeading:
|
|
210
|
-
modalLabel: `${
|
|
209
|
+
modalHeading: o.formName,
|
|
210
|
+
modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
|
|
211
211
|
passiveModal: !0,
|
|
212
212
|
size: "md",
|
|
213
213
|
testId: "form-details-modal",
|
|
@@ -215,11 +215,11 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
215
215
|
be,
|
|
216
216
|
{
|
|
217
217
|
observations: Y,
|
|
218
|
-
isLoading:
|
|
218
|
+
isLoading: V || G,
|
|
219
219
|
isError: z || P,
|
|
220
220
|
errorMessage: X,
|
|
221
221
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
|
-
testIdPrefix:
|
|
222
|
+
testIdPrefix: o.formName,
|
|
223
223
|
hideThumbnail: $,
|
|
224
224
|
controlOrder: J,
|
|
225
225
|
sectionMap: W
|
|
@@ -230,5 +230,5 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
230
230
|
] });
|
|
231
231
|
};
|
|
232
232
|
export {
|
|
233
|
-
|
|
233
|
+
Te as default
|
|
234
234
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { i as d, l as f, m as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-Dl2xhzIk.js";
|
|
2
|
+
import { i as d, l as f, m as e } from "./index-KT3ssyRA.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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { i as v, l as C, m as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-Dl2xhzIk.js";
|
|
2
|
+
import { i as v, l as C, m as e } from "./index-KT3ssyRA.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 I, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { n as k, o as K, u as N, k as Q, Z as q, b as G, J as x, X as z, c as w, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-
|
|
2
|
+
import { n as k, o as K, u as N, k as Q, Z as q, b as G, J as x, X as z, c as w, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-KT3ssyRA.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as $, useMemo as O } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-
|
|
1
|
+
import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-KT3ssyRA.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":"InvestigationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/investigations/InvestigationsForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InvestigationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/investigations/InvestigationsForm.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAqR9B,CAAC;AAIH,eAAe,kBAAkB,CAAC"}
|