@bahmni/clinical-app 0.0.1-dev.468 → 0.0.1-dev.470
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/{ConsultationPage-BxUucteO.js → ConsultationPage-C9yBlTEP.js} +21078 -20036
- package/dist/{DocumentsTable-Cdjrw4yW-nLNKiZvJ.js → DocumentsTable-DddJ0p1F-BpBFefEj.js} +93 -93
- package/dist/FormsTable-DLC_vCD0-DF-ICHCl.js +249 -0
- package/dist/{LNWAZHJI-Ca7h-WY1.js → LNWAZHJI-CwZGMaM2.js} +7 -7
- package/dist/{MWZ6AO7Z-BEtNGIfO.js → MWZ6AO7Z-CK3e7OlH.js} +2 -2
- package/dist/{Observations-B-dxdRlx-BvSWlU_d.js → Observations-Cwi0QkK8-Bygnk9dO.js} +75 -75
- package/dist/{YPM2AS64-C68_x3BI.js → YPM2AS64-mYHqu47N.js} +1 -1
- package/dist/{hook-CX_49y00.js → hook-2qk5SbyT.js} +3 -3
- package/dist/{index-WoicJ0ew.js → index-CAiXEDu_.js} +11 -11
- package/dist/{index-BYvh8LyP.js → index-WbFuNeuG.js} +21 -21
- package/dist/{index-Ca3Cduff.js → index-qO8oMcDW.js} +140258 -110101
- package/dist/index-sjgf7zfi-Dnobdsxa.js +6900 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +6 -1
- package/dist/locales/locale_es.json +6 -1
- package/package.json +1 -1
- package/dist/FormsTable-hfP2wv7g-BcIUsqyi.js +0 -249
package/dist/index.js
CHANGED
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"CDSS_RULE_INVOCATION_ERROR": "CDSS rule invocation failed for control {{controlKey}} on event {{eventType}}",
|
|
62
62
|
"CERTAINITY_CONFIRMED": "Confirmed",
|
|
63
63
|
"CERTAINITY_PROVISIONAL": "Provisional",
|
|
64
|
+
"CHART_EMPTY_DEFAULT": "No data to display",
|
|
65
|
+
"CHART_ERROR_DEFAULT": "Unable to load this chart",
|
|
66
|
+
"CHART_MISSING_PATIENT_ID": "Missing patient identifier",
|
|
67
|
+
"CHART_NO_CHART_DATA": "The chart expression did not produce chart data",
|
|
68
|
+
"CHART_URL_UNRESOLVED": "Could not resolve the chart data URL",
|
|
64
69
|
"CLINICAL_DATA_RECORDED_BY": "Recorded By",
|
|
65
70
|
"CLINICAL_LABEL": "Clinical",
|
|
66
71
|
"CLOSE_BUTTON": "Close",
|
|
@@ -692,4 +697,4 @@
|
|
|
692
697
|
"YEARS_one": " year",
|
|
693
698
|
"YEARS_other": " years",
|
|
694
699
|
"YES": "Yes"
|
|
695
|
-
}
|
|
700
|
+
}
|
|
@@ -61,6 +61,11 @@
|
|
|
61
61
|
"CDSS_RULE_INVOCATION_ERROR": "Error al invocar la regla CDSS para el control {{controlKey}} en el evento {{eventType}}",
|
|
62
62
|
"CERTAINITY_CONFIRMED": "Confirmado",
|
|
63
63
|
"CERTAINITY_PROVISIONAL": "Provisorio",
|
|
64
|
+
"CHART_EMPTY_DEFAULT": "No hay datos para mostrar",
|
|
65
|
+
"CHART_ERROR_DEFAULT": "No se pudo cargar este gráfico",
|
|
66
|
+
"CHART_MISSING_PATIENT_ID": "Falta el identificador del paciente",
|
|
67
|
+
"CHART_NO_CHART_DATA": "La expresión del gráfico no generó datos",
|
|
68
|
+
"CHART_URL_UNRESOLVED": "No se pudo resolver la URL de datos del gráfico",
|
|
64
69
|
"CLINICAL_DATA_RECORDED_BY": "Grabado Por",
|
|
65
70
|
"CLINICAL_LABEL": "Clínico",
|
|
66
71
|
"CLOSE_BUTTON": "Cerrar",
|
|
@@ -685,4 +690,4 @@
|
|
|
685
690
|
"YEARS_one": " año",
|
|
686
691
|
"YEARS_other": " años",
|
|
687
692
|
"YES": "Sí"
|
|
688
|
-
}
|
|
693
|
+
}
|
package/package.json
CHANGED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
-
import { a as ie, u as de, s as le, Z as me, f as ue, G as ce, y as fe, v as ye, w as Ne, k as be, M as pe, g as ge, h as he, N as Ae, q as K, C as $, b as Oe, $ as V, i as Te, j as Ie, c as _e, A as Ee, l as Ce } from "./index-Ca3Cduff.js";
|
|
3
|
-
import { useQueryClient as ve, useQuery as I } from "@tanstack/react-query";
|
|
4
|
-
import { useState as G, useMemo as i, useCallback as d } from "react";
|
|
5
|
-
const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", p = {
|
|
6
|
-
formsTableBody: Le,
|
|
7
|
-
modalHeading: Re,
|
|
8
|
-
customAccordianItem: Be
|
|
9
|
-
}, De = ({
|
|
10
|
-
episodeOfCareUuids: _,
|
|
11
|
-
encounterUuids: l,
|
|
12
|
-
config: j,
|
|
13
|
-
disableActions: x = !1,
|
|
14
|
-
activeEncounterUuid: y = null
|
|
15
|
-
}) => {
|
|
16
|
-
const { t: o } = ie(), m = de(), [g, E] = G(!1), [t, C] = G(null), {
|
|
17
|
-
numberOfVisits: z,
|
|
18
|
-
hideThumbnail: Q = !1,
|
|
19
|
-
forms: N
|
|
20
|
-
} = j ?? {}, Z = le(
|
|
21
|
-
Ce.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = me(), h = Z && !x && !!y, v = ue(
|
|
23
|
-
_,
|
|
24
|
-
l
|
|
25
|
-
), P = ve(), {
|
|
26
|
-
data: L = [],
|
|
27
|
-
isLoading: R,
|
|
28
|
-
isError: B,
|
|
29
|
-
error: Y,
|
|
30
|
-
refetch: J
|
|
31
|
-
} = I({
|
|
32
|
-
queryKey: ["forms", m, _],
|
|
33
|
-
queryFn: () => ce(m, void 0, z),
|
|
34
|
-
enabled: !!m && !v
|
|
35
|
-
}), F = i(() => {
|
|
36
|
-
let e = L;
|
|
37
|
-
return l && l.length > 0 && (e = e.filter(
|
|
38
|
-
(r) => l.includes(r.encounterUuid)
|
|
39
|
-
)), Array.isArray(N) && N.length > 0 && (e = e.filter(
|
|
40
|
-
(r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
|
-
)), e;
|
|
42
|
-
}, [L, l, N]), { data: M = [] } = I({
|
|
43
|
-
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () => fe()
|
|
45
|
-
}), S = d(
|
|
46
|
-
(e) => {
|
|
47
|
-
const r = M.find(
|
|
48
|
-
(s) => s.name.toLowerCase() === e.toLowerCase()
|
|
49
|
-
);
|
|
50
|
-
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
51
|
-
if (!b || b.length === 0) return !1;
|
|
52
|
-
const a = new Set(b.map((s) => s.name));
|
|
53
|
-
return r.privileges.some(
|
|
54
|
-
(s) => a.has(s.privilegeName) && s.editable
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
[M, b]
|
|
58
|
-
), u = d(
|
|
59
|
-
(e) => !y || e.encounterUuid !== y ? !1 : S(e.formName),
|
|
60
|
-
[y, S]
|
|
61
|
-
), {
|
|
62
|
-
data: A,
|
|
63
|
-
isLoading: W,
|
|
64
|
-
isError: X,
|
|
65
|
-
error: O
|
|
66
|
-
} = I({
|
|
67
|
-
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
68
|
-
queryFn: () => ye(t.encounterUuid),
|
|
69
|
-
enabled: !!t?.encounterUuid && g
|
|
70
|
-
});
|
|
71
|
-
Ne(
|
|
72
|
-
(e) => {
|
|
73
|
-
e.patientUUID === m && (J(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
74
|
-
},
|
|
75
|
-
[m]
|
|
76
|
-
);
|
|
77
|
-
const ee = i(() => !A?.entry || !t?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => be(e) ? pe(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [A, t?.formName]), re = i(() => {
|
|
78
|
-
if (O)
|
|
79
|
-
return ge(O).message;
|
|
80
|
-
}, [O]), c = i(
|
|
81
|
-
() => [
|
|
82
|
-
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
83
|
-
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
84
|
-
],
|
|
85
|
-
[o]
|
|
86
|
-
), U = i(
|
|
87
|
-
() => [...c, { key: "actions", header: o("ACTIONS") }],
|
|
88
|
-
[c, o]
|
|
89
|
-
), ae = d(
|
|
90
|
-
(e) => h && e.some((r) => u(r)) ? U : c,
|
|
91
|
-
[h, u, U, c]
|
|
92
|
-
), oe = c, te = i(
|
|
93
|
-
() => [
|
|
94
|
-
{ key: "recordedOn", sortable: !0 },
|
|
95
|
-
{ key: "recordedBy", sortable: !0 }
|
|
96
|
-
],
|
|
97
|
-
[]
|
|
98
|
-
), D = i(() => {
|
|
99
|
-
const e = F.reduce(
|
|
100
|
-
(r, a) => {
|
|
101
|
-
const s = a.formName;
|
|
102
|
-
r[s] ??= [];
|
|
103
|
-
const f = a.providers.map((se) => se.providerName).filter(Boolean).join(", ");
|
|
104
|
-
return r[s].push({
|
|
105
|
-
id: a.encounterUuid,
|
|
106
|
-
formName: a.formName,
|
|
107
|
-
recordedOn: he(a.encounterDateTime, o, !0).formattedResult,
|
|
108
|
-
recordedBy: f ?? "--",
|
|
109
|
-
encounterDateTime: a.encounterDateTime,
|
|
110
|
-
encounterUuid: a.encounterUuid
|
|
111
|
-
}), r;
|
|
112
|
-
},
|
|
113
|
-
{}
|
|
114
|
-
);
|
|
115
|
-
return Object.entries(e).map(
|
|
116
|
-
([r, a]) => ({
|
|
117
|
-
formName: r,
|
|
118
|
-
records: a.sort(
|
|
119
|
-
(s, f) => f.encounterDateTime - s.encounterDateTime
|
|
120
|
-
)
|
|
121
|
-
})
|
|
122
|
-
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
123
|
-
}, [F, o]), k = d((e) => {
|
|
124
|
-
C(e), E(!0);
|
|
125
|
-
}, []), w = d(() => {
|
|
126
|
-
E(!1), C(null);
|
|
127
|
-
}, []), T = d((e) => {
|
|
128
|
-
Ae({
|
|
129
|
-
context: {
|
|
130
|
-
encounter: { resourceType: "Encounter", id: e.encounterUuid },
|
|
131
|
-
formName: e.formName,
|
|
132
|
-
directFormMode: !0
|
|
133
|
-
},
|
|
134
|
-
action: { type: "update", resourceType: "Observation" }
|
|
135
|
-
});
|
|
136
|
-
}, []), q = d(
|
|
137
|
-
(e, r) => {
|
|
138
|
-
switch (r) {
|
|
139
|
-
case "recordedOn":
|
|
140
|
-
return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
|
|
141
|
-
case "recordedBy":
|
|
142
|
-
return e.recordedBy;
|
|
143
|
-
case "actions":
|
|
144
|
-
return u(e) ? /* @__PURE__ */ n(
|
|
145
|
-
K,
|
|
146
|
-
{
|
|
147
|
-
label: o("EDIT_OBSERVATION_FORM"),
|
|
148
|
-
kind: "ghost",
|
|
149
|
-
size: "sm",
|
|
150
|
-
testId: `edit-form-${e.encounterUuid}`,
|
|
151
|
-
onClick: () => T(e),
|
|
152
|
-
children: /* @__PURE__ */ n($, {})
|
|
153
|
-
}
|
|
154
|
-
) : null;
|
|
155
|
-
default:
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
[k, T, u, o]
|
|
160
|
-
);
|
|
161
|
-
return /* @__PURE__ */ H(ne, { children: [
|
|
162
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || B || D.length === 0 || v ? /* @__PURE__ */ n(
|
|
163
|
-
V,
|
|
164
|
-
{
|
|
165
|
-
headers: oe,
|
|
166
|
-
ariaLabel: o("FORMS_HEADING"),
|
|
167
|
-
rows: [],
|
|
168
|
-
loading: R,
|
|
169
|
-
errorStateMessage: B ? Y?.message : void 0,
|
|
170
|
-
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
171
|
-
renderCell: q,
|
|
172
|
-
className: p.formsTableBody,
|
|
173
|
-
dataTestId: "forms-table"
|
|
174
|
-
}
|
|
175
|
-
) : /* @__PURE__ */ n(Te, { align: "start", children: D.map((e, r) => {
|
|
176
|
-
const { formName: a, records: s } = e, f = ae(s);
|
|
177
|
-
return /* @__PURE__ */ n(
|
|
178
|
-
Ie,
|
|
179
|
-
{
|
|
180
|
-
title: a,
|
|
181
|
-
className: p.customAccordianItem,
|
|
182
|
-
testId: `accordian-title-${a}`,
|
|
183
|
-
open: r === 0,
|
|
184
|
-
children: /* @__PURE__ */ n(
|
|
185
|
-
V,
|
|
186
|
-
{
|
|
187
|
-
headers: f,
|
|
188
|
-
ariaLabel: o("FORMS_HEADING"),
|
|
189
|
-
rows: s,
|
|
190
|
-
loading: !1,
|
|
191
|
-
errorStateMessage: "",
|
|
192
|
-
sortable: te,
|
|
193
|
-
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
194
|
-
renderCell: q,
|
|
195
|
-
className: p.formsTableBody,
|
|
196
|
-
dataTestId: `forms-table-${a}`
|
|
197
|
-
}
|
|
198
|
-
)
|
|
199
|
-
},
|
|
200
|
-
a
|
|
201
|
-
);
|
|
202
|
-
}) }) }),
|
|
203
|
-
g && t && /* @__PURE__ */ n(
|
|
204
|
-
_e,
|
|
205
|
-
{
|
|
206
|
-
id: "modalIdForActionAreaLayout",
|
|
207
|
-
portalId: "main-display-area",
|
|
208
|
-
open: g,
|
|
209
|
-
onRequestClose: w,
|
|
210
|
-
modalHeading: /* @__PURE__ */ H("div", { className: p.modalHeading, children: [
|
|
211
|
-
/* @__PURE__ */ n("span", { children: t.formName }),
|
|
212
|
-
h && u(t) && /* @__PURE__ */ n(
|
|
213
|
-
K,
|
|
214
|
-
{
|
|
215
|
-
label: o("EDIT_OBSERVATION_FORM"),
|
|
216
|
-
kind: "ghost",
|
|
217
|
-
size: "sm",
|
|
218
|
-
testId: `edit-form-modal-${t.encounterUuid}`,
|
|
219
|
-
onClick: () => {
|
|
220
|
-
w(), T(t);
|
|
221
|
-
},
|
|
222
|
-
children: /* @__PURE__ */ n($, {})
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
] }),
|
|
226
|
-
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
227
|
-
passiveModal: !0,
|
|
228
|
-
size: "md",
|
|
229
|
-
testId: "form-details-modal",
|
|
230
|
-
children: /* @__PURE__ */ n(
|
|
231
|
-
Ee,
|
|
232
|
-
{
|
|
233
|
-
observations: ee,
|
|
234
|
-
isLoading: W,
|
|
235
|
-
isError: X,
|
|
236
|
-
errorMessage: re,
|
|
237
|
-
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
238
|
-
testIdPrefix: t.formName,
|
|
239
|
-
hideThumbnail: Q,
|
|
240
|
-
formName: t.formName
|
|
241
|
-
}
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
] });
|
|
246
|
-
};
|
|
247
|
-
export {
|
|
248
|
-
De as default
|
|
249
|
-
};
|