@bahmni/clinical-app 0.0.1-dev.310 → 0.0.1-dev.312
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 +1 -1
- package/dist/{DocumentsTable-CaUlpFeN-B07kH6Rs.js → DocumentsTable-CFMS0Z9e-C3YAQqpZ.js} +40 -40
- package/dist/FormsTable-BOqHNyfQ-CoNaXHJN.js +234 -0
- package/dist/{LNWAZHJI-DaW8Io8M.js → LNWAZHJI-DWfzz5Nv.js} +5 -5
- package/dist/{MWZ6AO7Z-BEdGdjSn.js → MWZ6AO7Z-DUt0m9io.js} +4 -4
- package/dist/{Observations-BIksHFko-CiYJaU-8.js → Observations-DvN06foI-UQ4cnOcO.js} +51 -51
- package/dist/{YPM2AS64-B9e7XvA1.js → YPM2AS64-CIinz4Bh.js} +1 -1
- package/dist/{index-DpwifnYp.js → index-b8sno1-Q.js} +179562 -174318
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +22 -0
- package/dist/locales/locale_es.json +22 -0
- package/package.json +1 -1
- package/dist/FormsTable-DQSl0827-EKVvD12B.js +0 -234
package/dist/index.js
CHANGED
|
@@ -471,6 +471,7 @@
|
|
|
471
471
|
"SELECT_VISIT_TYPE": "Select visit type",
|
|
472
472
|
"SERVICE_REQUEST_HEADING": "Service Requests",
|
|
473
473
|
"SERVICE_REQUEST_ORDERED_BY": "Ordered By",
|
|
474
|
+
"SERVICE_REQUEST_ORDERED_ON": "Ordered On",
|
|
474
475
|
"SERVICE_REQUEST_ORDERED_STATUS": "Status",
|
|
475
476
|
"SERVICE_REQUEST_PRIORITY_URGENT": "Urgent",
|
|
476
477
|
"SERVICE_REQUEST_TEST_NAME": "Order Name",
|
|
@@ -479,6 +480,27 @@
|
|
|
479
480
|
"SEVERITY_MODERATE": "Moderate",
|
|
480
481
|
"SEVERITY_SEVERE": "Severe",
|
|
481
482
|
"SIDE_NAVIGATION": "Side navigation",
|
|
483
|
+
"TASK_NAME": "Task Name",
|
|
484
|
+
"TASK_STATUS": "Task Status",
|
|
485
|
+
"TASK_STATUS_ACCEPTED": "Accepted",
|
|
486
|
+
"TASK_STATUS_CANCELLED": "Cancelled",
|
|
487
|
+
"TASK_STATUS_COMPLETED": "Completed",
|
|
488
|
+
"TASK_STATUS_DRAFT": "Draft",
|
|
489
|
+
"TASK_STATUS_ENTERED_IN_ERROR": "Entered in Error",
|
|
490
|
+
"TASK_STATUS_FAILED": "Failed",
|
|
491
|
+
"TASK_STATUS_IN_PROGRESS": "In Progress",
|
|
492
|
+
"TASK_STATUS_ON_HOLD": "On Hold",
|
|
493
|
+
"TASK_STATUS_READY": "Ready",
|
|
494
|
+
"TASK_STATUS_RECEIVED": "Received",
|
|
495
|
+
"TASK_STATUS_REJECTED": "Rejected",
|
|
496
|
+
"TASK_STATUS_REQUESTED": "Requested",
|
|
497
|
+
"TASK_STATUS_UNKNOWN": "Unknown",
|
|
498
|
+
"TASK_COMPLETED_BY": "Completed By",
|
|
499
|
+
"TASK_COMPLETED_ON": "Completed On",
|
|
500
|
+
"FORM_FILLING_TASKS": "Form Filling Tasks",
|
|
501
|
+
"TASKS_HANDLER_NOT_CONFIGURED": "Task handler config is not defined",
|
|
502
|
+
"TASKS_NOT_FOUND": "No Tasks found",
|
|
503
|
+
"TASKS_LOADING_ERROR": "Error loading tasks",
|
|
482
504
|
"UNEXPECTED_ERROR": "An unexpected error occurred",
|
|
483
505
|
"UNKNOWN_STATUS": "Cancelled",
|
|
484
506
|
"UPDATE_PROGRAM_STATE_BUTTON": "Update State",
|
|
@@ -471,6 +471,7 @@
|
|
|
471
471
|
"SELECT_VISIT_TYPE": "Seleccionar tipo de visita",
|
|
472
472
|
"SERVICE_REQUEST_HEADING": "Solicitudes de servicio",
|
|
473
473
|
"SERVICE_REQUEST_ORDERED_BY": "Ordenado Por",
|
|
474
|
+
"SERVICE_REQUEST_ORDERED_ON": "Ordenado el",
|
|
474
475
|
"SERVICE_REQUEST_ORDERED_STATUS": "Estado",
|
|
475
476
|
"SERVICE_REQUEST_PRIORITY_URGENT": "Urgente",
|
|
476
477
|
"SERVICE_REQUEST_TEST_NAME": "Nombre de la orden",
|
|
@@ -479,6 +480,27 @@
|
|
|
479
480
|
"SEVERITY_MODERATE": "Moderado",
|
|
480
481
|
"SEVERITY_SEVERE": "Grave",
|
|
481
482
|
"SIDE_NAVIGATION": "Navegación lateral",
|
|
483
|
+
"TASK_NAME": "Nombre de la tarea",
|
|
484
|
+
"TASK_STATUS": "Estado de la tarea",
|
|
485
|
+
"TASK_STATUS_ACCEPTED": "Aceptado",
|
|
486
|
+
"TASK_STATUS_CANCELLED": "Cancelado",
|
|
487
|
+
"TASK_STATUS_COMPLETED": "Completado",
|
|
488
|
+
"TASK_STATUS_DRAFT": "Borrador",
|
|
489
|
+
"TASK_STATUS_ENTERED_IN_ERROR": "Ingresado por error",
|
|
490
|
+
"TASK_STATUS_FAILED": "Fallido",
|
|
491
|
+
"TASK_STATUS_IN_PROGRESS": "En progreso",
|
|
492
|
+
"TASK_STATUS_ON_HOLD": "En espera",
|
|
493
|
+
"TASK_STATUS_READY": "Listo",
|
|
494
|
+
"TASK_STATUS_RECEIVED": "Recibido",
|
|
495
|
+
"TASK_STATUS_REJECTED": "Rechazado",
|
|
496
|
+
"TASK_STATUS_REQUESTED": "Solicitado",
|
|
497
|
+
"TASK_STATUS_UNKNOWN": "Desconocido",
|
|
498
|
+
"TASK_COMPLETED_BY": "Completado por",
|
|
499
|
+
"TASK_COMPLETED_ON": "Completado el",
|
|
500
|
+
"FORM_FILLING_TASKS": "Tareas de llenado de formularios",
|
|
501
|
+
"TASKS_HANDLER_NOT_CONFIGURED": "La configuración del manejador de tareas no está definida",
|
|
502
|
+
"TASKS_NOT_FOUND": "No se encontraron tareas",
|
|
503
|
+
"TASKS_LOADING_ERROR": "Error loading tasks",
|
|
482
504
|
"UNEXPECTED_ERROR": "Se produjo un error inesperado",
|
|
483
505
|
"UNKNOWN_STATUS": "Cancelado",
|
|
484
506
|
"UPDATE_PROGRAM_STATE_BUTTON": "Actualizar Estado",
|
package/package.json
CHANGED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { u as te, p as ae, H as se, d as ne, e as de, h as ie, g as le, Q as me, z as q, a as ue, m as ce, c as w, O as fe, L as ye, b as pe, x as be, l as he } from "./index-DpwifnYp.js";
|
|
3
|
-
import { useQueryClient as ge, useQuery as p } from "@tanstack/react-query";
|
|
4
|
-
import { useState as H, useMemo as d, useCallback as b } from "react";
|
|
5
|
-
const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
6
|
-
formsTableBody: Ne,
|
|
7
|
-
customAccordianItem: Oe
|
|
8
|
-
}, Ae = (u) => u ? u.extension?.find(
|
|
9
|
-
(l) => l.url === he
|
|
10
|
-
)?.valueString : void 0, ve = ({
|
|
11
|
-
episodeOfCareUuids: u,
|
|
12
|
-
encounterUuids: l,
|
|
13
|
-
config: k
|
|
14
|
-
}) => {
|
|
15
|
-
const { t: n } = te(), c = ae(), [f, E] = H(!1), [a, I] = H(null), {
|
|
16
|
-
numberOfVisits: x,
|
|
17
|
-
hideThumbnail: j = !1,
|
|
18
|
-
forms: y
|
|
19
|
-
} = k ?? {}, L = se(
|
|
20
|
-
u,
|
|
21
|
-
l
|
|
22
|
-
), z = ge(), {
|
|
23
|
-
data: v = [],
|
|
24
|
-
isLoading: F,
|
|
25
|
-
isError: B,
|
|
26
|
-
error: K,
|
|
27
|
-
refetch: Q
|
|
28
|
-
} = p({
|
|
29
|
-
queryKey: ["forms", c, u],
|
|
30
|
-
queryFn: () => ne(c, void 0, x),
|
|
31
|
-
enabled: !!c && !L
|
|
32
|
-
}), M = d(() => {
|
|
33
|
-
let e = v;
|
|
34
|
-
return l && l.length > 0 && (e = e.filter(
|
|
35
|
-
(r) => l.includes(r.encounterUuid)
|
|
36
|
-
)), Array.isArray(y) && y.length > 0 && (e = e.filter(
|
|
37
|
-
(r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
38
|
-
)), e;
|
|
39
|
-
}, [v, l, y]), { data: S = [] } = p({
|
|
40
|
-
queryKey: ["observationForms"],
|
|
41
|
-
queryFn: () => de()
|
|
42
|
-
}), _ = b(
|
|
43
|
-
(e) => S.find((r) => r.name === e)?.uuid,
|
|
44
|
-
[S]
|
|
45
|
-
), h = d(() => {
|
|
46
|
-
if (a)
|
|
47
|
-
return _(a.formName);
|
|
48
|
-
}, [a, _]), {
|
|
49
|
-
data: m,
|
|
50
|
-
isLoading: V,
|
|
51
|
-
isError: $,
|
|
52
|
-
error: g
|
|
53
|
-
} = p({
|
|
54
|
-
queryKey: ["formMetadata", h],
|
|
55
|
-
queryFn: () => ie(h),
|
|
56
|
-
enabled: !!h && f
|
|
57
|
-
}), {
|
|
58
|
-
data: N,
|
|
59
|
-
isLoading: G,
|
|
60
|
-
isError: Y,
|
|
61
|
-
error: O
|
|
62
|
-
} = p({
|
|
63
|
-
queryKey: ["formsEncounterFHIR", a?.encounterUuid],
|
|
64
|
-
queryFn: () => le(a.encounterUuid),
|
|
65
|
-
enabled: !!a?.encounterUuid && f
|
|
66
|
-
});
|
|
67
|
-
me(
|
|
68
|
-
(e) => {
|
|
69
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (Q(), z.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
70
|
-
},
|
|
71
|
-
[c]
|
|
72
|
-
);
|
|
73
|
-
const J = d(() => !N?.entry || !a?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
74
|
-
const r = Ae(e);
|
|
75
|
-
return !r || r.includes(a.formName);
|
|
76
|
-
}), [N, a?.formName]), P = d(() => {
|
|
77
|
-
if (!m?.schema) return;
|
|
78
|
-
const e = [], r = (o) => {
|
|
79
|
-
(o ?? []).forEach((s) => {
|
|
80
|
-
const t = s;
|
|
81
|
-
t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
return r(
|
|
85
|
-
m.schema.controls ?? []
|
|
86
|
-
), e.length > 0 ? e : void 0;
|
|
87
|
-
}, [m]), W = d(() => {
|
|
88
|
-
if (!m?.schema) return;
|
|
89
|
-
const e = {}, r = (o, s) => {
|
|
90
|
-
for (const t of o)
|
|
91
|
-
if (t.type === "section") {
|
|
92
|
-
const A = t.label?.value ?? "Section";
|
|
93
|
-
r(t.controls ?? [], A);
|
|
94
|
-
} else
|
|
95
|
-
t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
|
|
96
|
-
};
|
|
97
|
-
return r(
|
|
98
|
-
m.schema.controls ?? [],
|
|
99
|
-
null
|
|
100
|
-
), Object.keys(e).length > 0 ? e : void 0;
|
|
101
|
-
}, [m]), X = d(() => {
|
|
102
|
-
if (g)
|
|
103
|
-
return q(g).message;
|
|
104
|
-
if (O)
|
|
105
|
-
return q(O).message;
|
|
106
|
-
}, [g, O]), C = d(
|
|
107
|
-
() => [
|
|
108
|
-
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
109
|
-
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
110
|
-
],
|
|
111
|
-
[n]
|
|
112
|
-
), Z = d(
|
|
113
|
-
() => [
|
|
114
|
-
{ key: "recordedOn", sortable: !0 },
|
|
115
|
-
{ key: "recordedBy", sortable: !0 }
|
|
116
|
-
],
|
|
117
|
-
[]
|
|
118
|
-
), D = d(() => {
|
|
119
|
-
const e = M.reduce(
|
|
120
|
-
(r, o) => {
|
|
121
|
-
const s = o.formName;
|
|
122
|
-
r[s] ??= [];
|
|
123
|
-
const t = o.providers.map((A) => A.providerName).filter(Boolean).join(", ");
|
|
124
|
-
return r[s].push({
|
|
125
|
-
id: o.encounterUuid,
|
|
126
|
-
formName: o.formName,
|
|
127
|
-
recordedOn: ue(o.encounterDateTime, n, !0).formattedResult,
|
|
128
|
-
recordedBy: t ?? "--",
|
|
129
|
-
encounterDateTime: o.encounterDateTime,
|
|
130
|
-
encounterUuid: o.encounterUuid
|
|
131
|
-
}), r;
|
|
132
|
-
},
|
|
133
|
-
{}
|
|
134
|
-
);
|
|
135
|
-
return Object.entries(e).map(
|
|
136
|
-
([r, o]) => ({
|
|
137
|
-
formName: r,
|
|
138
|
-
records: o.sort(
|
|
139
|
-
(s, t) => t.encounterDateTime - s.encounterDateTime
|
|
140
|
-
)
|
|
141
|
-
})
|
|
142
|
-
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
143
|
-
}, [M, n]), R = b((e) => {
|
|
144
|
-
I(e), E(!0);
|
|
145
|
-
}, []), ee = b(() => {
|
|
146
|
-
E(!1), I(null);
|
|
147
|
-
}, []), U = b(
|
|
148
|
-
(e, r) => {
|
|
149
|
-
switch (r) {
|
|
150
|
-
case "recordedOn":
|
|
151
|
-
return /* @__PURE__ */ i(ce, { onClick: () => R(e), children: e.recordedOn });
|
|
152
|
-
case "recordedBy":
|
|
153
|
-
return e.recordedBy;
|
|
154
|
-
default:
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
[R]
|
|
159
|
-
);
|
|
160
|
-
return /* @__PURE__ */ re(oe, { children: [
|
|
161
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || B || D.length === 0 || L ? /* @__PURE__ */ i(
|
|
162
|
-
w,
|
|
163
|
-
{
|
|
164
|
-
headers: C,
|
|
165
|
-
ariaLabel: n("FORMS_HEADING"),
|
|
166
|
-
rows: [],
|
|
167
|
-
loading: F,
|
|
168
|
-
errorStateMessage: B ? K?.message : void 0,
|
|
169
|
-
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
170
|
-
renderCell: U,
|
|
171
|
-
className: T.formsTableBody,
|
|
172
|
-
dataTestId: "forms-table"
|
|
173
|
-
}
|
|
174
|
-
) : /* @__PURE__ */ i(fe, { align: "start", children: D.map((e, r) => {
|
|
175
|
-
const { formName: o, records: s } = e;
|
|
176
|
-
return /* @__PURE__ */ i(
|
|
177
|
-
ye,
|
|
178
|
-
{
|
|
179
|
-
title: o,
|
|
180
|
-
className: T.customAccordianItem,
|
|
181
|
-
testId: `accordian-title-${o}`,
|
|
182
|
-
open: r === 0,
|
|
183
|
-
children: /* @__PURE__ */ i(
|
|
184
|
-
w,
|
|
185
|
-
{
|
|
186
|
-
headers: C,
|
|
187
|
-
ariaLabel: n("FORMS_HEADING"),
|
|
188
|
-
rows: s,
|
|
189
|
-
loading: !1,
|
|
190
|
-
errorStateMessage: "",
|
|
191
|
-
sortable: Z,
|
|
192
|
-
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
193
|
-
renderCell: U,
|
|
194
|
-
className: T.formsTableBody,
|
|
195
|
-
dataTestId: `forms-table-${o}`
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
},
|
|
199
|
-
o
|
|
200
|
-
);
|
|
201
|
-
}) }) }),
|
|
202
|
-
f && a && /* @__PURE__ */ i(
|
|
203
|
-
pe,
|
|
204
|
-
{
|
|
205
|
-
id: "modalIdForActionAreaLayout",
|
|
206
|
-
portalId: "main-display-area",
|
|
207
|
-
open: f,
|
|
208
|
-
onRequestClose: ee,
|
|
209
|
-
modalHeading: a.formName,
|
|
210
|
-
modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
|
|
211
|
-
passiveModal: !0,
|
|
212
|
-
size: "md",
|
|
213
|
-
testId: "form-details-modal",
|
|
214
|
-
children: /* @__PURE__ */ i(
|
|
215
|
-
be,
|
|
216
|
-
{
|
|
217
|
-
observations: J,
|
|
218
|
-
isLoading: V || G,
|
|
219
|
-
isError: $ || Y,
|
|
220
|
-
errorMessage: X,
|
|
221
|
-
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
222
|
-
testIdPrefix: a.formName,
|
|
223
|
-
hideThumbnail: j,
|
|
224
|
-
controlOrder: P,
|
|
225
|
-
sectionMap: W
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
}
|
|
229
|
-
)
|
|
230
|
-
] });
|
|
231
|
-
};
|
|
232
|
-
export {
|
|
233
|
-
ve as default
|
|
234
|
-
};
|