@bahmni/clinical-app 0.0.1-dev.314 → 0.0.1-dev.316
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-CFMS0Z9e-C3YAQqpZ.js → DocumentsTable-CGQkFmPv-D03cCVXZ.js} +6 -6
- package/dist/{FormsTable-BOqHNyfQ-CoNaXHJN.js → FormsTable-H67oOCKk-CTzKVXp9.js} +73 -73
- package/dist/{LNWAZHJI-DWfzz5Nv.js → LNWAZHJI-D0D97q_C.js} +2 -2
- package/dist/{MWZ6AO7Z-DUt0m9io.js → MWZ6AO7Z-DsLu3B2O.js} +2 -2
- package/dist/{Observations-DvN06foI-UQ4cnOcO.js → Observations-BLNBreYi-B75TL6hP.js} +14 -14
- package/dist/{YPM2AS64-CIinz4Bh.js → YPM2AS64-HWEZ87Al.js} +1 -1
- package/dist/components/consultationPad/index.d.ts.map +1 -1
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts +1 -0
- package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
- package/dist/components/forms/observations/utils/formEventExecutor.d.ts +2 -1
- package/dist/components/forms/observations/utils/formEventExecutor.d.ts.map +1 -1
- package/dist/{index-b8sno1-Q.js → index-Cqbdtt4O.js} +24210 -24077
- package/dist/index.css +1 -1
- 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 G } from "react/jsx-runtime";
|
|
2
|
+
import { n as Q, u as Y, o as W, U as J, a as X, g as Z, O as ee, h as te } from "./index-Cqbdtt4O.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 = Q(), { t: n } = Y(), { addNotification: M } = W(), 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
|
+
), x = _(
|
|
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(G, { 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: x,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as i, jsxs as re, Fragment as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { u as ae, n as se, x as te, 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-Cqbdtt4O.js";
|
|
3
|
+
import { useQueryClient as pe, useQuery as h } from "@tanstack/react-query";
|
|
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 = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
7
|
customAccordianItem: Oe
|
|
8
8
|
}, Ae = (m) => m ? m.extension?.find(
|
|
9
|
-
(l) => l.url ===
|
|
9
|
+
(l) => l.url === ge
|
|
10
10
|
)?.valueString : void 0, Ie = ({
|
|
11
11
|
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: l,
|
|
13
|
-
config:
|
|
13
|
+
config: k
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: n } =
|
|
15
|
+
const { t: n } = ae(), c = se(), [f, T] = w(!1), [s, v] = w(null), {
|
|
16
16
|
numberOfVisits: x,
|
|
17
|
-
hideThumbnail:
|
|
17
|
+
hideThumbnail: $ = !1,
|
|
18
18
|
forms: y
|
|
19
|
-
} =
|
|
19
|
+
} = k ?? {}, F = te(
|
|
20
20
|
m,
|
|
21
21
|
l
|
|
22
|
-
),
|
|
22
|
+
), K = pe(), {
|
|
23
23
|
data: I = [],
|
|
24
24
|
isLoading: B,
|
|
25
25
|
isError: E,
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
26
|
+
error: Q,
|
|
27
|
+
refetch: V
|
|
28
28
|
} = h({
|
|
29
29
|
queryKey: ["forms", c, m],
|
|
30
30
|
queryFn: () => ne(c, void 0, x),
|
|
@@ -34,7 +34,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
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((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
38
38
|
)), e;
|
|
39
39
|
}, [I, l, y]), { data: D = [] } = h({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
@@ -42,43 +42,43 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
42
42
|
}), S = b(
|
|
43
43
|
(e) => D.find((r) => r.name === e)?.uuid,
|
|
44
44
|
[D]
|
|
45
|
-
),
|
|
46
|
-
if (
|
|
47
|
-
return S(
|
|
48
|
-
}, [
|
|
45
|
+
), g = d(() => {
|
|
46
|
+
if (s)
|
|
47
|
+
return S(s.formName);
|
|
48
|
+
}, [s, S]), {
|
|
49
49
|
data: u,
|
|
50
|
-
isLoading:
|
|
50
|
+
isLoading: H,
|
|
51
51
|
isError: z,
|
|
52
|
-
error:
|
|
52
|
+
error: p
|
|
53
53
|
} = h({
|
|
54
|
-
queryKey: ["formMetadata",
|
|
55
|
-
queryFn: () => ie(
|
|
56
|
-
enabled: !!
|
|
54
|
+
queryKey: ["formMetadata", g],
|
|
55
|
+
queryFn: () => ie(g),
|
|
56
|
+
enabled: !!g && f
|
|
57
57
|
}), {
|
|
58
58
|
data: N,
|
|
59
59
|
isLoading: G,
|
|
60
60
|
isError: P,
|
|
61
61
|
error: O
|
|
62
62
|
} = h({
|
|
63
|
-
queryKey: ["formsEncounterFHIR",
|
|
64
|
-
queryFn: () => le(
|
|
65
|
-
enabled: !!
|
|
63
|
+
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
64
|
+
queryFn: () => le(s.encounterUuid),
|
|
65
|
+
enabled: !!s?.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 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
70
|
},
|
|
71
71
|
[c]
|
|
72
72
|
);
|
|
73
|
-
const Y = d(() => !N?.entry || !
|
|
73
|
+
const Y = d(() => !N?.entry || !s?.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(s.formName);
|
|
76
|
+
}), [N, s?.formName]), J = d(() => {
|
|
77
77
|
if (!u?.schema) return;
|
|
78
|
-
const e = [], r = (
|
|
79
|
-
(
|
|
80
|
-
const
|
|
81
|
-
|
|
78
|
+
const e = [], r = (o) => {
|
|
79
|
+
(o ?? []).forEach((t) => {
|
|
80
|
+
const a = t;
|
|
81
|
+
a.id != null && e.push(String(a.id)), a.controls && r(a.controls);
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
return r(
|
|
@@ -86,24 +86,24 @@ 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 = (o, t) => {
|
|
90
|
+
for (const a of o)
|
|
91
|
+
if (a.type === "section") {
|
|
92
|
+
const A = a.label?.value ?? "Section";
|
|
93
|
+
r(a.controls ?? [], A);
|
|
94
94
|
} else
|
|
95
|
-
|
|
95
|
+
a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
|
|
96
96
|
};
|
|
97
97
|
return r(
|
|
98
98
|
u.schema.controls ?? [],
|
|
99
99
|
null
|
|
100
100
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
101
101
|
}, [u]), X = d(() => {
|
|
102
|
-
if (
|
|
103
|
-
return q(
|
|
102
|
+
if (p)
|
|
103
|
+
return q(p).message;
|
|
104
104
|
if (O)
|
|
105
105
|
return q(O).message;
|
|
106
|
-
}, [
|
|
106
|
+
}, [p, O]), _ = d(
|
|
107
107
|
() => [
|
|
108
108
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
109
109
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -117,29 +117,29 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
117
117
|
[]
|
|
118
118
|
), C = d(() => {
|
|
119
119
|
const e = L.reduce(
|
|
120
|
-
(r,
|
|
121
|
-
const
|
|
122
|
-
r[
|
|
123
|
-
const
|
|
124
|
-
return r[
|
|
125
|
-
id:
|
|
126
|
-
formName:
|
|
127
|
-
recordedOn: me(
|
|
128
|
-
recordedBy:
|
|
129
|
-
encounterDateTime:
|
|
130
|
-
encounterUuid:
|
|
120
|
+
(r, o) => {
|
|
121
|
+
const t = o.formName;
|
|
122
|
+
r[t] ??= [];
|
|
123
|
+
const a = o.providers.map((A) => A.providerName).filter(Boolean).join(", ");
|
|
124
|
+
return r[t].push({
|
|
125
|
+
id: o.encounterUuid,
|
|
126
|
+
formName: o.formName,
|
|
127
|
+
recordedOn: me(o.encounterDateTime, n, !0).formattedResult,
|
|
128
|
+
recordedBy: a ?? "--",
|
|
129
|
+
encounterDateTime: o.encounterDateTime,
|
|
130
|
+
encounterUuid: o.encounterUuid
|
|
131
131
|
}), r;
|
|
132
132
|
},
|
|
133
133
|
{}
|
|
134
134
|
);
|
|
135
135
|
return Object.entries(e).map(
|
|
136
|
-
([r,
|
|
136
|
+
([r, o]) => ({
|
|
137
137
|
formName: r,
|
|
138
|
-
records:
|
|
139
|
-
(
|
|
138
|
+
records: o.sort(
|
|
139
|
+
(t, a) => a.encounterDateTime - t.encounterDateTime
|
|
140
140
|
)
|
|
141
141
|
})
|
|
142
|
-
).sort((r,
|
|
142
|
+
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
143
143
|
}, [L, n]), R = b((e) => {
|
|
144
144
|
v(e), T(!0);
|
|
145
145
|
}, []), ee = b(() => {
|
|
@@ -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(
|
|
160
|
+
return /* @__PURE__ */ re(oe, { children: [
|
|
161
161
|
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || E || C.length === 0 || F ? /* @__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: E ?
|
|
168
|
+
errorStateMessage: E ? Q?.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: o, records: t } = e;
|
|
176
176
|
return /* @__PURE__ */ i(
|
|
177
177
|
ye,
|
|
178
178
|
{
|
|
179
|
-
title:
|
|
179
|
+
title: o,
|
|
180
180
|
className: M.customAccordianItem,
|
|
181
|
-
testId: `accordian-title-${
|
|
181
|
+
testId: `accordian-title-${o}`,
|
|
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: t,
|
|
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-${o}`
|
|
196
196
|
}
|
|
197
197
|
)
|
|
198
198
|
},
|
|
199
|
-
|
|
199
|
+
o
|
|
200
200
|
);
|
|
201
201
|
}) }) }),
|
|
202
|
-
f &&
|
|
202
|
+
f && s && /* @__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: s.formName,
|
|
210
|
+
modalLabel: `${s.recordedOn} | ${s.recordedBy}`,
|
|
211
211
|
passiveModal: !0,
|
|
212
212
|
size: "md",
|
|
213
213
|
testId: "form-details-modal",
|
|
@@ -215,12 +215,12 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
|
|
|
215
215
|
be,
|
|
216
216
|
{
|
|
217
217
|
observations: Y,
|
|
218
|
-
isLoading:
|
|
218
|
+
isLoading: H || G,
|
|
219
219
|
isError: z || P,
|
|
220
220
|
errorMessage: X,
|
|
221
221
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
|
-
testIdPrefix:
|
|
223
|
-
hideThumbnail:
|
|
222
|
+
testIdPrefix: s.formName,
|
|
223
|
+
hideThumbnail: $,
|
|
224
224
|
controlOrder: J,
|
|
225
225
|
sectionMap: W
|
|
226
226
|
}
|
|
@@ -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-HWEZ87Al.js";
|
|
2
|
+
import { i as d, l as f, m as e } from "./index-Cqbdtt4O.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-HWEZ87Al.js";
|
|
2
|
+
import { i as v, l as C, m as e } from "./index-Cqbdtt4O.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { n as
|
|
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-Cqbdtt4O.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as O } from "react";
|
|
5
5
|
const D = (t, n, d, l, b, r) => {
|
|
6
6
|
const a = j(t, n, b), s = a.value, o = P(s);
|
|
7
7
|
let i = s;
|
|
@@ -113,14 +113,14 @@ const D = (t, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = K(), { t: o } = N(), i = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => Q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
|
-
|
|
123
|
+
$(() => {
|
|
124
124
|
i.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
126
|
const V = d[h];
|
|
@@ -139,32 +139,32 @@ const D = (t, n, d, l, b, r) => {
|
|
|
139
139
|
refetch: T
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => q(a, p),
|
|
143
143
|
enabled: !!a && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
G(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
149
|
) && T();
|
|
150
150
|
},
|
|
151
151
|
[a, T]
|
|
152
|
-
),
|
|
152
|
+
), $(() => {
|
|
153
153
|
R && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [R]);
|
|
159
|
-
const
|
|
159
|
+
const f = O(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
161
|
+
const e = x(c), h = z(e);
|
|
162
|
+
return w(h);
|
|
163
163
|
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], g = F || !y, _ = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ I(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -186,7 +186,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
186
186
|
B ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: f,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
@@ -196,7 +196,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
196
196
|
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: g,
|
|
200
200
|
errorStateMessage: C,
|
|
201
201
|
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -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-Cqbdtt4O.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":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAsBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAsBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2fnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -7,6 +7,7 @@ interface ObservationFormsContainerProps {
|
|
|
7
7
|
onRemoveForm?: (formUuid: string) => void;
|
|
8
8
|
onFormObservationsChange?: (formUuid: string, observations: Form2Observation[], validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR) => void;
|
|
9
9
|
existingObservations?: Form2Observation[];
|
|
10
|
+
activeEncounterUuid?: string | null;
|
|
10
11
|
}
|
|
11
12
|
declare const ObservationFormsContainer: React.FC<ObservationFormsContainerProps>;
|
|
12
13
|
export default ObservationFormsContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAUjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAgBlC,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,KACrC,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAgavE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PatientData } from '@bahmni/form2-controls';
|
|
1
2
|
import { Form2Observation, FormMetadata } from '@bahmni/services';
|
|
2
3
|
type FormDataRecord = Record<string, unknown> & {
|
|
3
4
|
control?: Record<string, unknown> & {
|
|
@@ -19,6 +20,6 @@ type FormDataRecord = Record<string, unknown> & {
|
|
|
19
20
|
value?: unknown;
|
|
20
21
|
children?: FormDataRecord[];
|
|
21
22
|
};
|
|
22
|
-
export declare const executeOnFormSaveEvent: (metadata: FormMetadata, observations: Form2Observation[],
|
|
23
|
+
export declare const executeOnFormSaveEvent: (metadata: FormMetadata, observations: Form2Observation[], patient: PatientData, formData?: FormDataRecord) => Form2Observation[];
|
|
23
24
|
export {};
|
|
24
25
|
//# sourceMappingURL=formEventExecutor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formEventExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/observations/utils/formEventExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formEventExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/observations/utils/formEventExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUlE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,KAAK,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,YAAY,EACtB,cAAc,gBAAgB,EAAE,EAChC,SAAS,WAAW,EACpB,WAAW,cAAc,KACxB,gBAAgB,EAkDlB,CAAC"}
|