@bahmni/widgets 0.0.1-dev.180 → 0.0.1-dev.184
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-BzmQHWFJ.js → DocumentsTable-CDZQ6GOb.js} +2080 -2191
- package/dist/{FormsTable-CnE2r-gc.js → FormsTable-A2NBji_5.js} +151 -151
- package/dist/Observations-BuA-9JTj.js +172 -0
- package/dist/forms/ObservationItem.d.ts.map +1 -1
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts +3 -2
- package/dist/genericServiceRequest/GenericServiceRequestTable.d.ts.map +1 -1
- package/dist/genericServiceRequest/utils.d.ts.map +1 -1
- package/dist/index--PbXuF2w.js +95699 -0
- package/dist/index.css +1 -1
- package/dist/index.js +14 -14
- package/dist/labinvestigation/LabInvestigation.d.ts.map +1 -1
- package/dist/observations/components/ObsByEncounter.d.ts.map +1 -1
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts +3 -2
- package/dist/radiologyInvestigation/RadiologyInvestigationTable.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/Observations-BcE6RCUS.js +0 -172
- package/dist/index-CQhvLeWL.js +0 -78859
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a2 as t, a0 as s, x as o, y as r, C as n, D as g, H as l, F as c, z as d, W as P, X as v, w as b, N as T, U as f, E as C, B as W, S as p, $ as A, V as m, a4 as u, a3 as y, aa as D, a9 as R, a6 as S, a7 as U, a8 as I, a5 as N, ab as h, a1 as x, a as w, u as F, Z as H } from "./index--PbXuF2w.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
t as ActivePractitionerContext,
|
|
@@ -10,27 +10,27 @@ export {
|
|
|
10
10
|
l as GenericServiceRequestTable,
|
|
11
11
|
c as LabInvestigation,
|
|
12
12
|
d as MedicationsTable,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
P as NotificationProvider,
|
|
14
|
+
v as NotificationServiceComponent,
|
|
15
15
|
b as PatientDetails,
|
|
16
16
|
T as PatientProgramsTable,
|
|
17
17
|
f as ProgramDetails,
|
|
18
|
-
|
|
18
|
+
C as RadiologyInvestigationReport,
|
|
19
19
|
W as RadiologyInvestigationTable,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
p as SearchPatient,
|
|
21
|
+
A as UserPrivilegeProvider,
|
|
22
22
|
m as VitalFlowSheet,
|
|
23
23
|
u as createConfigHook,
|
|
24
24
|
y as createConfigProvider,
|
|
25
25
|
D as getAllWidgetConfigs,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
R as getAllWidgetTypes,
|
|
27
|
+
S as getWidget,
|
|
28
|
+
U as getWidgetConfig,
|
|
29
|
+
I as hasWidget,
|
|
30
|
+
N as registerWidget,
|
|
31
|
+
h as resetWidgetRegistry,
|
|
32
|
+
x as useActivePractitioner,
|
|
33
33
|
w as useNotification,
|
|
34
34
|
F as usePatientUUID,
|
|
35
|
-
|
|
35
|
+
H as useUserPrivilege
|
|
36
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgChD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6L3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObsByEncounter.d.ts","sourceRoot":"","sources":["../../../src/observations/components/ObsByEncounter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObsByEncounter.d.ts","sourceRoot":"","sources":["../../../src/observations/components/ObsByEncounter.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAwB,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAG1E,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+CxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -2,8 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { WidgetProps } from '../registry/model';
|
|
3
3
|
export declare const radiologyInvestigationQueryKeys: (patientUUID: string) => readonly ["radiologyInvestigation", string];
|
|
4
4
|
/**
|
|
5
|
-
* Component to display patient radiology investigations
|
|
6
|
-
*
|
|
5
|
+
* Component to display patient radiology investigations in a flat sorted table.
|
|
6
|
+
* Items are sorted by orderedDate descending (newest first), with priority
|
|
7
|
+
* (stat before routine) as a tiebreaker for items with the same orderedDate.
|
|
7
8
|
*/
|
|
8
9
|
declare const RadiologyInvestigationTable: React.FC<WidgetProps>;
|
|
9
10
|
export default RadiologyInvestigationTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAchD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAiBnD;;;;GAIG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgTtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { f as K, _ as C, g as Q, Q as w, h as M, N as V, $ as k, u as G, a as j, q as H, R as P, K as z, e as Y, j as J, s as W, B as X, t as Z } from "./index-CQhvLeWL.js";
|
|
3
|
-
import { useQueries as x, useQuery as ee } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as te, useEffect as I, useMemo as h } from "react";
|
|
5
|
-
import { useTranslation as D } from "react-i18next";
|
|
6
|
-
const U = (t, c, n, l, o) => {
|
|
7
|
-
const s = Q(t, c), r = s.value, a = w(r);
|
|
8
|
-
let i = r;
|
|
9
|
-
a === "Image" && (i = /* @__PURE__ */ d(V, { imageSrc: r, alt: r, id: `${r}-img` })), a === "Video" && (i = /* @__PURE__ */ d(k, { id: `${r}-video`, videoSrc: r }));
|
|
10
|
-
const u = o("OBSERVATIONS_RECORDED_BY", {
|
|
11
|
-
provider: s.provider
|
|
12
|
-
}), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${p}-${b}-${n}-${c}` : `${p}-${b}-${n}-${c}`;
|
|
13
|
-
return /* @__PURE__ */ d(
|
|
14
|
-
M,
|
|
15
|
-
{
|
|
16
|
-
header: s.header,
|
|
17
|
-
value: i,
|
|
18
|
-
info: u,
|
|
19
|
-
id: f,
|
|
20
|
-
testId: f,
|
|
21
|
-
ariaLabel: f
|
|
22
|
-
},
|
|
23
|
-
`obs-${t.id}`
|
|
24
|
-
);
|
|
25
|
-
}, se = (t, c, n, l, o, s) => /* @__PURE__ */ d(
|
|
26
|
-
C,
|
|
27
|
-
{
|
|
28
|
-
title: t.display,
|
|
29
|
-
id: `grouped-obs-${t.display}-${l}`,
|
|
30
|
-
open: n,
|
|
31
|
-
children: t.members?.map(
|
|
32
|
-
(r, a) => U(r, a, o, s, c)
|
|
33
|
-
)
|
|
34
|
-
},
|
|
35
|
-
`grouped-obs-${t.id}`
|
|
36
|
-
), oe = ({
|
|
37
|
-
groupedData: t,
|
|
38
|
-
title: c = ""
|
|
39
|
-
}) => {
|
|
40
|
-
const { t: n } = D(), l = (o, s, r) => {
|
|
41
|
-
const a = K(o.encounterDetails, n);
|
|
42
|
-
return /* @__PURE__ */ S(
|
|
43
|
-
C,
|
|
44
|
-
{
|
|
45
|
-
title: a,
|
|
46
|
-
id: `encounter-${o.encounterId}`,
|
|
47
|
-
open: s,
|
|
48
|
-
children: [
|
|
49
|
-
o.observations.map(
|
|
50
|
-
(i, u) => U(i, u, r, c, n)
|
|
51
|
-
),
|
|
52
|
-
o.groupedObservations.map(
|
|
53
|
-
(i, u) => se(
|
|
54
|
-
i,
|
|
55
|
-
n,
|
|
56
|
-
s,
|
|
57
|
-
u,
|
|
58
|
-
r,
|
|
59
|
-
c
|
|
60
|
-
)
|
|
61
|
-
)
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
`encounter-${o.encounterId}`
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
return /* @__PURE__ */ d(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
id: "obs-by-encounter",
|
|
71
|
-
"data-testid": "obs-by-encounter-test-id",
|
|
72
|
-
"aria-label": "obs-by-encounter-aria-label",
|
|
73
|
-
children: t.map(
|
|
74
|
-
(o, s) => l(o, s === 0, s)
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}, re = "_observations_kfbhq_1", ae = "_title_kfbhq_12", N = {
|
|
79
|
-
observations: re,
|
|
80
|
-
title: ae
|
|
81
|
-
}, ne = (t) => ["conceptUuid", t], ie = (t, c) => ["observations", t, ...c], pe = ({ config: t }) => {
|
|
82
|
-
const c = t, { conceptNames: n = [], conceptUuid: l = [] } = c, o = te(/* @__PURE__ */ new Set()), s = G(), { addNotification: r } = j(), { t: a } = D(), i = x({
|
|
83
|
-
queries: n.map((e) => ({
|
|
84
|
-
queryKey: ne(e),
|
|
85
|
-
queryFn: () => H(e),
|
|
86
|
-
enabled: !!e
|
|
87
|
-
}))
|
|
88
|
-
});
|
|
89
|
-
I(() => {
|
|
90
|
-
i.forEach((e, m) => {
|
|
91
|
-
if (e.isError && !o.current.has(m)) {
|
|
92
|
-
const g = n[m];
|
|
93
|
-
r({
|
|
94
|
-
title: a("ERROR_DEFAULT_TITLE"),
|
|
95
|
-
message: a("ERROR_FETCHING_CONCEPT", { conceptName: g }),
|
|
96
|
-
type: "error"
|
|
97
|
-
}), o.current.add(m);
|
|
98
|
-
} else e.isError || o.current.delete(m);
|
|
99
|
-
});
|
|
100
|
-
}, [i, n]);
|
|
101
|
-
const u = h(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), b = h(() => [.../* @__PURE__ */ new Set([...u, ...l])], [u, l]), v = h(() => n.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, n.length]), {
|
|
102
|
-
data: p,
|
|
103
|
-
isLoading: f,
|
|
104
|
-
isError: O,
|
|
105
|
-
refetch: R
|
|
106
|
-
} = ee({
|
|
107
|
-
queryKey: ie(s, b),
|
|
108
|
-
queryFn: () => P(s, b),
|
|
109
|
-
enabled: !!s && b.length > 0 && v
|
|
110
|
-
});
|
|
111
|
-
z(
|
|
112
|
-
(e) => {
|
|
113
|
-
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
114
|
-
(g) => b.includes(g)
|
|
115
|
-
) && R();
|
|
116
|
-
},
|
|
117
|
-
[s, R]
|
|
118
|
-
), I(() => {
|
|
119
|
-
O && r({
|
|
120
|
-
title: a("ERROR_DEFAULT_TITLE"),
|
|
121
|
-
message: a("ERROR_FETCHING_OBSERVATIONS"),
|
|
122
|
-
type: "error"
|
|
123
|
-
});
|
|
124
|
-
}, [O]);
|
|
125
|
-
const T = h(() => {
|
|
126
|
-
if (!p) return [];
|
|
127
|
-
const e = Y(p), m = J(e);
|
|
128
|
-
return W(m);
|
|
129
|
-
}, [p]), B = [
|
|
130
|
-
{ key: "name", header: "name" },
|
|
131
|
-
{ key: "value", header: "value" },
|
|
132
|
-
{ key: "form", header: "form" }
|
|
133
|
-
], _ = f || !v, $ = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, q = T.length > 0 && !_ && !$, E = c.titleTranslationKey, y = E ? a(E) : "";
|
|
134
|
-
return /* @__PURE__ */ S(
|
|
135
|
-
"div",
|
|
136
|
-
{
|
|
137
|
-
id: "observations",
|
|
138
|
-
"data-testid": E ? `observations-${y}` : "observations",
|
|
139
|
-
"aria-label": "observations-aria-label",
|
|
140
|
-
className: N.observations,
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ d(
|
|
143
|
-
X,
|
|
144
|
-
{
|
|
145
|
-
id: "observations-title",
|
|
146
|
-
testId: E ? `observations-title-${y}` : "observations-title",
|
|
147
|
-
title: y,
|
|
148
|
-
className: N.title,
|
|
149
|
-
children: /* @__PURE__ */ d("p", { children: y })
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
q ? /* @__PURE__ */ d(oe, { groupedData: T, title: y }) : /* @__PURE__ */ d(
|
|
153
|
-
Z,
|
|
154
|
-
{
|
|
155
|
-
headers: B,
|
|
156
|
-
rows: [],
|
|
157
|
-
ariaLabel: a("OBSERVATIONS"),
|
|
158
|
-
loading: _,
|
|
159
|
-
errorStateMessage: F,
|
|
160
|
-
emptyStateMessage: L,
|
|
161
|
-
dataTestId: "observations-table"
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
};
|
|
168
|
-
export {
|
|
169
|
-
ne as conceptUuidQueryKeys,
|
|
170
|
-
pe as default,
|
|
171
|
-
ie as observationsQueryKeys
|
|
172
|
-
};
|