@bahmni/widgets 0.0.1-dev.227 → 0.0.1-dev.229
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-BldObe71.js → DocumentsTable-y-7_qPf7.js} +10 -10
- package/dist/{FormsTable-CkAcZpiJ.js → FormsTable-RNFjPtdn.js} +40 -40
- package/dist/{Observations-BxvYIrRg.js → Observations-KUcO-wPt.js} +42 -42
- package/dist/immunizationHistory/ImmunizationHistory.d.ts.map +1 -1
- package/dist/immunizationHistory/components/AdministeredTab.d.ts +2 -0
- package/dist/immunizationHistory/components/AdministeredTab.d.ts.map +1 -1
- package/dist/immunizationHistory/components/NotAdministeredTab.d.ts +2 -0
- package/dist/immunizationHistory/components/NotAdministeredTab.d.ts.map +1 -1
- package/dist/immunizationHistory/constants.d.ts +5 -0
- package/dist/immunizationHistory/constants.d.ts.map +1 -1
- package/dist/immunizationHistory/model.d.ts +7 -0
- package/dist/immunizationHistory/model.d.ts.map +1 -1
- package/dist/immunizationHistory/utils.d.ts +8 -0
- package/dist/immunizationHistory/utils.d.ts.map +1 -1
- package/dist/{index-BpiGFXBv.js → index-DWyxeQ-X.js} +8867 -8828
- package/dist/index.css +1 -1
- package/dist/index.js +12 -12
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as s, jsxs as _, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as s, jsxs as _, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { u as W, a as X, Y as J, r as Z, E as x, b as ee, y as te } from "./index-DWyxeQ-X.js";
|
|
3
3
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as p, useEffect as N, useMemo as f } from "react";
|
|
5
5
|
import { useTranslation as ae } from "react-i18next";
|
|
@@ -39,7 +39,7 @@ const _e = [
|
|
|
39
39
|
null
|
|
40
40
|
), [P, A] = l(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), T =
|
|
42
|
+
), T = W(), { t: o } = ae(), { addNotification: w } = X(), F = Number(n?.pageSize) || 5, [D, O] = l(1), [m, $] = l(F), [k, C] = l(void 0), b = p((e) => {
|
|
43
43
|
U(e), M(!0);
|
|
44
44
|
}, []), V = p(() => {
|
|
45
45
|
M(!1), U(null), A(/* @__PURE__ */ new Set());
|
|
@@ -98,7 +98,7 @@ const _e = [
|
|
|
98
98
|
), g = f(
|
|
99
99
|
() => n?.fields ?? _e,
|
|
100
100
|
[n?.fields]
|
|
101
|
-
),
|
|
101
|
+
), Y = f(() => [...u?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [u]), q = f(() => he(g, o), [g, o]), G = f(
|
|
102
102
|
() => g.map((e) => ({
|
|
103
103
|
key: e,
|
|
104
104
|
sortable: e !== "action"
|
|
@@ -107,7 +107,7 @@ const _e = [
|
|
|
107
107
|
), h = f(
|
|
108
108
|
() => r ? R(r) : [],
|
|
109
109
|
[r]
|
|
110
|
-
),
|
|
110
|
+
), K = p(
|
|
111
111
|
(e, t) => {
|
|
112
112
|
switch (t) {
|
|
113
113
|
case "documentIdentifier":
|
|
@@ -138,18 +138,18 @@ const _e = [
|
|
|
138
138
|
},
|
|
139
139
|
[b, o]
|
|
140
140
|
);
|
|
141
|
-
return /* @__PURE__ */ _(
|
|
141
|
+
return /* @__PURE__ */ _(Q, { children: [
|
|
142
142
|
/* @__PURE__ */ s("div", { "data-testid": "documents-table", children: /* @__PURE__ */ s(
|
|
143
143
|
ee,
|
|
144
144
|
{
|
|
145
|
-
headers:
|
|
145
|
+
headers: q,
|
|
146
146
|
ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
|
|
147
|
-
rows:
|
|
147
|
+
rows: Y,
|
|
148
148
|
loading: z,
|
|
149
149
|
errorStateMessage: y ? S?.message : null,
|
|
150
|
-
sortable:
|
|
150
|
+
sortable: G,
|
|
151
151
|
emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
|
|
152
|
-
renderCell:
|
|
152
|
+
renderCell: K,
|
|
153
153
|
className: c.documentsTableBody,
|
|
154
154
|
dataTestId: "documents-table",
|
|
155
155
|
pageSize: m,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n, jsxs as X, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { j as ee, u as re, R as te, D as oe, P as ae, I as se, S as ne, G as de, c as C, E as ie, r as me, b as U, Q as ce, e as le, y as ue, O as fe } from "./index-DWyxeQ-X.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as f } from "@tanstack/react-query";
|
|
4
4
|
import { useState as x, useMemo as d, useCallback as y } from "react";
|
|
5
5
|
import { useTranslation as pe } from "react-i18next";
|
|
6
|
-
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6",
|
|
6
|
+
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
7
7
|
formsTableBody: be,
|
|
8
8
|
customAccordianItem: ge
|
|
9
9
|
}, he = (m) => m ? m.extension?.find(
|
|
@@ -13,18 +13,18 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
13
13
|
encounterUuids: i,
|
|
14
14
|
config: p
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: s } = pe(), c = re(), [l,
|
|
16
|
+
const { t: s } = pe(), c = re(), [l, v] = x(!1), [t, D] = x(null), { numberOfVisits: P, hideThumbnail: k = !1 } = p ?? {}, I = te(
|
|
17
17
|
m,
|
|
18
18
|
i
|
|
19
|
-
),
|
|
19
|
+
), j = ye(), {
|
|
20
20
|
data: b = [],
|
|
21
21
|
isLoading: M,
|
|
22
22
|
isError: R,
|
|
23
|
-
error:
|
|
24
|
-
refetch:
|
|
23
|
+
error: H,
|
|
24
|
+
refetch: K
|
|
25
25
|
} = f({
|
|
26
26
|
queryKey: ["forms", c, m],
|
|
27
|
-
queryFn: () => oe(c, void 0,
|
|
27
|
+
queryFn: () => oe(c, void 0, P),
|
|
28
28
|
enabled: !!c && !I
|
|
29
29
|
}), A = d(() => !i || i.length === 0 ? b : b.filter(
|
|
30
30
|
(e) => i.includes(e.encounterUuid)
|
|
@@ -38,18 +38,18 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
38
38
|
if (t)
|
|
39
39
|
return T(t.formName);
|
|
40
40
|
}, [t, T]), {
|
|
41
|
-
isLoading:
|
|
42
|
-
isError:
|
|
41
|
+
isLoading: Q,
|
|
42
|
+
isError: G,
|
|
43
43
|
error: h
|
|
44
44
|
} = f({
|
|
45
45
|
queryKey: ["formMetadata", g],
|
|
46
46
|
queryFn: () => se(g),
|
|
47
47
|
enabled: !!g && l
|
|
48
48
|
}), {
|
|
49
|
-
data:
|
|
50
|
-
isLoading:
|
|
51
|
-
isError:
|
|
52
|
-
error:
|
|
49
|
+
data: E,
|
|
50
|
+
isLoading: V,
|
|
51
|
+
isError: $,
|
|
52
|
+
error: F
|
|
53
53
|
} = f({
|
|
54
54
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
55
55
|
queryFn: () => ne(t.encounterUuid),
|
|
@@ -57,19 +57,19 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
57
57
|
});
|
|
58
58
|
de(
|
|
59
59
|
(e) => {
|
|
60
|
-
e.patientUUID === c && e.updatedConcepts.size > 0 && (
|
|
60
|
+
e.patientUUID === c && e.updatedConcepts.size > 0 && (K(), j.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
61
61
|
},
|
|
62
62
|
[c]
|
|
63
63
|
);
|
|
64
|
-
const
|
|
64
|
+
const w = d(() => !E?.entry || !t?.formName ? [] : E.entry.filter((a) => a.resource?.resourceType === "Observation").map((a) => a.resource).filter((a) => {
|
|
65
65
|
const r = he(a);
|
|
66
66
|
return !r || r.includes(t.formName);
|
|
67
|
-
}), [
|
|
67
|
+
}), [E, t?.formName]), z = d(() => {
|
|
68
68
|
if (h)
|
|
69
|
-
return
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
72
|
-
}, [h,
|
|
69
|
+
return C(h).message;
|
|
70
|
+
if (F)
|
|
71
|
+
return C(F).message;
|
|
72
|
+
}, [h, F]), L = d(
|
|
73
73
|
() => [
|
|
74
74
|
{ key: "recordedOn", header: s("RECORDED_ON") },
|
|
75
75
|
{ key: "recordedBy", header: s("RECORDED_BY") }
|
|
@@ -86,12 +86,12 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
86
86
|
(r, o) => {
|
|
87
87
|
const u = o.formName;
|
|
88
88
|
r[u] ??= [];
|
|
89
|
-
const
|
|
89
|
+
const N = o.providers.map((W) => W.providerName).filter(Boolean).join(", ");
|
|
90
90
|
return r[u].push({
|
|
91
91
|
id: o.encounterUuid,
|
|
92
92
|
formName: o.formName,
|
|
93
93
|
recordedOn: ie(o.encounterDateTime, s, !0).formattedResult,
|
|
94
|
-
recordedBy:
|
|
94
|
+
recordedBy: N ?? "--",
|
|
95
95
|
encounterDateTime: o.encounterDateTime,
|
|
96
96
|
encounterUuid: o.encounterUuid
|
|
97
97
|
}), r;
|
|
@@ -102,26 +102,26 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
102
102
|
([r, o]) => ({
|
|
103
103
|
formName: r,
|
|
104
104
|
records: o.sort(
|
|
105
|
-
(u,
|
|
105
|
+
(u, N) => N.encounterDateTime - u.encounterDateTime
|
|
106
106
|
)
|
|
107
107
|
})
|
|
108
108
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
109
|
-
}, [A, s]),
|
|
110
|
-
D(e),
|
|
109
|
+
}, [A, s]), S = y((e) => {
|
|
110
|
+
D(e), v(!0);
|
|
111
111
|
}, []), J = y(() => {
|
|
112
|
-
|
|
113
|
-
}, []),
|
|
112
|
+
v(!1), D(null);
|
|
113
|
+
}, []), q = y(
|
|
114
114
|
(e, a) => {
|
|
115
115
|
switch (a) {
|
|
116
116
|
case "recordedOn":
|
|
117
|
-
return /* @__PURE__ */ n(me, { onClick: () =>
|
|
117
|
+
return /* @__PURE__ */ n(me, { onClick: () => S(e), children: e.recordedOn });
|
|
118
118
|
case "recordedBy":
|
|
119
119
|
return e.recordedBy;
|
|
120
120
|
default:
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
-
[
|
|
124
|
+
[S]
|
|
125
125
|
);
|
|
126
126
|
return /* @__PURE__ */ X(Z, { children: [
|
|
127
127
|
/* @__PURE__ */ n("div", { "data-testid": "forms-table", children: M || R || _.length === 0 || I ? /* @__PURE__ */ n(
|
|
@@ -131,10 +131,10 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
131
131
|
ariaLabel: s("FORMS_HEADING"),
|
|
132
132
|
rows: [],
|
|
133
133
|
loading: M,
|
|
134
|
-
errorStateMessage: R ?
|
|
134
|
+
errorStateMessage: R ? H?.message : void 0,
|
|
135
135
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
136
|
-
renderCell:
|
|
137
|
-
className:
|
|
136
|
+
renderCell: q,
|
|
137
|
+
className: O.formsTableBody,
|
|
138
138
|
dataTestId: "forms-table"
|
|
139
139
|
}
|
|
140
140
|
) : /* @__PURE__ */ n(ce, { align: "start", children: _.map((e, a) => {
|
|
@@ -143,7 +143,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
143
143
|
le,
|
|
144
144
|
{
|
|
145
145
|
title: r,
|
|
146
|
-
className:
|
|
146
|
+
className: O.customAccordianItem,
|
|
147
147
|
testId: `accordian-title-${r}`,
|
|
148
148
|
open: a === 0,
|
|
149
149
|
children: /* @__PURE__ */ n(
|
|
@@ -156,8 +156,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
156
156
|
errorStateMessage: "",
|
|
157
157
|
sortable: Y,
|
|
158
158
|
emptyStateMessage: s("FORMS_UNAVAILABLE"),
|
|
159
|
-
renderCell:
|
|
160
|
-
className:
|
|
159
|
+
renderCell: q,
|
|
160
|
+
className: O.formsTableBody,
|
|
161
161
|
dataTestId: `forms-table-${r}`
|
|
162
162
|
}
|
|
163
163
|
)
|
|
@@ -180,13 +180,13 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", v = {
|
|
|
180
180
|
children: /* @__PURE__ */ n(
|
|
181
181
|
fe,
|
|
182
182
|
{
|
|
183
|
-
observations:
|
|
184
|
-
isLoading:
|
|
185
|
-
isError:
|
|
186
|
-
errorMessage:
|
|
183
|
+
observations: w,
|
|
184
|
+
isLoading: Q || V,
|
|
185
|
+
isError: G || $,
|
|
186
|
+
errorMessage: z,
|
|
187
187
|
emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
|
|
188
188
|
testIdPrefix: t.formName,
|
|
189
|
-
hideThumbnail:
|
|
189
|
+
hideThumbnail: k
|
|
190
190
|
}
|
|
191
191
|
)
|
|
192
192
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { f as
|
|
1
|
+
import { jsx as l, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { f as k, g as D, t as q, d as G, l as K, M as Q, V as w, h as P, u as H, a as j, i as z, k as Y, G as J, m as W, n as X, s as Z, o as x, b as ee } from "./index-DWyxeQ-X.js";
|
|
3
3
|
import { useQueries as te, useQuery as se } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as oe, useEffect as
|
|
4
|
+
import { useRef as oe, useEffect as N, useMemo as g } from "react";
|
|
5
5
|
import { useTranslation as U } from "react-i18next";
|
|
6
|
-
const
|
|
7
|
-
const s =
|
|
6
|
+
const B = (t, i, c, d, u, r) => {
|
|
7
|
+
const s = q(t, i, u), o = s.value, a = G(o);
|
|
8
8
|
let n = o;
|
|
9
|
-
a === "Image" && (n = /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
a === "Image" && (n = /* @__PURE__ */ l(
|
|
10
|
+
Q,
|
|
11
11
|
{
|
|
12
12
|
imageSrc: o,
|
|
13
13
|
alt: o,
|
|
14
14
|
id: `${o}-img`,
|
|
15
15
|
hideThumbnail: r
|
|
16
16
|
}
|
|
17
|
-
)), a === "Video" && (n = /* @__PURE__ */
|
|
18
|
-
|
|
17
|
+
)), a === "Video" && (n = /* @__PURE__ */ l(
|
|
18
|
+
w,
|
|
19
19
|
{
|
|
20
20
|
id: `${o}-video`,
|
|
21
21
|
videoSrc: o,
|
|
22
22
|
hideThumbnail: r
|
|
23
23
|
}
|
|
24
|
-
)), a === "PDF" && (n = /* @__PURE__ */
|
|
24
|
+
)), a === "PDF" && (n = /* @__PURE__ */ l(P, { id: `${o}-pdf`, src: o }));
|
|
25
25
|
const b = u("OBSERVATIONS_RECORDED_BY", {
|
|
26
26
|
provider: s.provider
|
|
27
|
-
}), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y =
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
27
|
+
}), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = d ? `${d}-${m}-${p}-${c}-${i}` : `${m}-${p}-${c}-${i}`;
|
|
28
|
+
return /* @__PURE__ */ l(
|
|
29
|
+
K,
|
|
30
30
|
{
|
|
31
31
|
header: s.header,
|
|
32
32
|
value: n,
|
|
@@ -37,14 +37,14 @@ const A = (t, i, c, l, u, r) => {
|
|
|
37
37
|
},
|
|
38
38
|
`obs-${t.id}`
|
|
39
39
|
);
|
|
40
|
-
}, re = (t, i, c,
|
|
40
|
+
}, re = (t, i, c, d, u, r, s) => /* @__PURE__ */ l(
|
|
41
41
|
D,
|
|
42
42
|
{
|
|
43
43
|
title: t.display,
|
|
44
|
-
id: `grouped-obs-${t.display}-${
|
|
44
|
+
id: `grouped-obs-${t.display}-${d}`,
|
|
45
45
|
open: c,
|
|
46
46
|
children: t.members?.map(
|
|
47
|
-
(o, a) =>
|
|
47
|
+
(o, a) => B(
|
|
48
48
|
o,
|
|
49
49
|
a,
|
|
50
50
|
u,
|
|
@@ -60,9 +60,9 @@ const A = (t, i, c, l, u, r) => {
|
|
|
60
60
|
title: i = "",
|
|
61
61
|
hideThumbnail: c
|
|
62
62
|
}) => {
|
|
63
|
-
const { t:
|
|
64
|
-
const a =
|
|
65
|
-
return /* @__PURE__ */
|
|
63
|
+
const { t: d } = U(), u = (r, s, o) => {
|
|
64
|
+
const a = k(r.encounterDetails, d);
|
|
65
|
+
return /* @__PURE__ */ C(
|
|
66
66
|
D,
|
|
67
67
|
{
|
|
68
68
|
title: a,
|
|
@@ -70,19 +70,19 @@ const A = (t, i, c, l, u, r) => {
|
|
|
70
70
|
open: s,
|
|
71
71
|
children: [
|
|
72
72
|
r.observations.map(
|
|
73
|
-
(n, b) =>
|
|
73
|
+
(n, b) => B(
|
|
74
74
|
n,
|
|
75
75
|
b,
|
|
76
76
|
o,
|
|
77
77
|
i,
|
|
78
|
-
|
|
78
|
+
d,
|
|
79
79
|
c
|
|
80
80
|
)
|
|
81
81
|
),
|
|
82
82
|
r.groupedObservations.map(
|
|
83
83
|
(n, b) => re(
|
|
84
84
|
n,
|
|
85
|
-
|
|
85
|
+
d,
|
|
86
86
|
s,
|
|
87
87
|
b,
|
|
88
88
|
o,
|
|
@@ -95,7 +95,7 @@ const A = (t, i, c, l, u, r) => {
|
|
|
95
95
|
`encounter-${r.encounterId}`
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ l(
|
|
99
99
|
"div",
|
|
100
100
|
{
|
|
101
101
|
id: "obs-by-encounter",
|
|
@@ -106,22 +106,22 @@ const A = (t, i, c, l, u, r) => {
|
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
|
-
}, ne = "_observations_kfbhq_1", ie = "_title_kfbhq_12",
|
|
109
|
+
}, ne = "_observations_kfbhq_1", ie = "_title_kfbhq_12", S = {
|
|
110
110
|
observations: ne,
|
|
111
111
|
title: ie
|
|
112
|
-
}, ce = (t) => ["conceptUuid", t],
|
|
112
|
+
}, ce = (t) => ["conceptUuid", t], de = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
|
|
113
113
|
const i = t, {
|
|
114
114
|
conceptNames: c = [],
|
|
115
|
-
conceptUuid:
|
|
115
|
+
conceptUuid: d = [],
|
|
116
116
|
hideThumbnail: u = !1
|
|
117
|
-
} = i, r = oe(/* @__PURE__ */ new Set()), s =
|
|
117
|
+
} = i, r = oe(/* @__PURE__ */ new Set()), s = H(), { addNotification: o } = j(), { t: a } = U(), n = te({
|
|
118
118
|
queries: c.map((e) => ({
|
|
119
119
|
queryKey: ce(e),
|
|
120
120
|
queryFn: () => z(e),
|
|
121
121
|
enabled: !!e
|
|
122
122
|
}))
|
|
123
123
|
});
|
|
124
|
-
|
|
124
|
+
N(() => {
|
|
125
125
|
n.forEach((e, v) => {
|
|
126
126
|
if (e.isError && !r.current.has(v)) {
|
|
127
127
|
const R = c[v];
|
|
@@ -133,13 +133,13 @@ const A = (t, i, c, l, u, r) => {
|
|
|
133
133
|
} else e.isError || r.current.delete(v);
|
|
134
134
|
});
|
|
135
135
|
}, [n, c]);
|
|
136
|
-
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...
|
|
136
|
+
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...d])], [b, d]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
|
|
137
137
|
data: m,
|
|
138
138
|
isLoading: y,
|
|
139
139
|
isError: O,
|
|
140
140
|
refetch: T
|
|
141
141
|
} = se({
|
|
142
|
-
queryKey:
|
|
142
|
+
queryKey: de(s, p),
|
|
143
143
|
queryFn: () => Y(s, p),
|
|
144
144
|
enabled: !!s && p.length > 0 && f
|
|
145
145
|
});
|
|
@@ -150,7 +150,7 @@ const A = (t, i, c, l, u, r) => {
|
|
|
150
150
|
) && T();
|
|
151
151
|
},
|
|
152
152
|
[s, T]
|
|
153
|
-
),
|
|
153
|
+
), N(() => {
|
|
154
154
|
O && o({
|
|
155
155
|
title: a("ERROR_DEFAULT_TITLE"),
|
|
156
156
|
message: a("ERROR_FETCHING_OBSERVATIONS"),
|
|
@@ -161,40 +161,40 @@ const A = (t, i, c, l, u, r) => {
|
|
|
161
161
|
if (!m) return [];
|
|
162
162
|
const e = W(m), v = X(e);
|
|
163
163
|
return Z(v);
|
|
164
|
-
}, [m]),
|
|
164
|
+
}, [m]), A = [
|
|
165
165
|
{ key: "name", header: "name" },
|
|
166
166
|
{ key: "value", header: "value" },
|
|
167
167
|
{ key: "form", header: "form" }
|
|
168
|
-
], _ = y || !f, $ = O && f, F = (!m || m.entry?.length === 0 || p.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0,
|
|
169
|
-
return /* @__PURE__ */
|
|
168
|
+
], _ = y || !f, $ = O && f, F = (!m || m.entry?.length === 0 || p.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, V = I.length > 0 && !_ && !$, h = i.titleTranslationKey, E = h ? a(h) : "";
|
|
169
|
+
return /* @__PURE__ */ C(
|
|
170
170
|
"div",
|
|
171
171
|
{
|
|
172
172
|
id: "observations",
|
|
173
173
|
"data-testid": h ? `observations-${E}` : "observations",
|
|
174
174
|
"aria-label": "observations-aria-label",
|
|
175
|
-
className:
|
|
175
|
+
className: S.observations,
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ l(
|
|
178
178
|
x,
|
|
179
179
|
{
|
|
180
180
|
id: "observations-title",
|
|
181
181
|
testId: h ? `observations-title-${E}` : "observations-title",
|
|
182
182
|
title: E,
|
|
183
|
-
className:
|
|
184
|
-
children: /* @__PURE__ */
|
|
183
|
+
className: S.title,
|
|
184
|
+
children: /* @__PURE__ */ l("p", { children: E })
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
|
-
|
|
187
|
+
V ? /* @__PURE__ */ l(
|
|
188
188
|
ae,
|
|
189
189
|
{
|
|
190
190
|
groupedData: I,
|
|
191
191
|
title: E,
|
|
192
192
|
hideThumbnail: u
|
|
193
193
|
}
|
|
194
|
-
) : /* @__PURE__ */
|
|
194
|
+
) : /* @__PURE__ */ l(
|
|
195
195
|
ee,
|
|
196
196
|
{
|
|
197
|
-
headers:
|
|
197
|
+
headers: A,
|
|
198
198
|
rows: [],
|
|
199
199
|
ariaLabel: a("OBSERVATIONS"),
|
|
200
200
|
loading: _,
|
|
@@ -210,5 +210,5 @@ const A = (t, i, c, l, u, r) => {
|
|
|
210
210
|
export {
|
|
211
211
|
ce as conceptUuidQueryKeys,
|
|
212
212
|
ve as default,
|
|
213
|
-
|
|
213
|
+
de as observationsQueryKeys
|
|
214
214
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImmunizationHistory.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/ImmunizationHistory.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ImmunizationHistory.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/ImmunizationHistory.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAwBhD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmI9C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { AdministeredTabConfig } from '../model';
|
|
2
3
|
interface AdministeredTabProps {
|
|
3
4
|
patientUUID: string;
|
|
5
|
+
config: AdministeredTabConfig;
|
|
4
6
|
}
|
|
5
7
|
declare const AdministeredTab: React.FC<AdministeredTabProps>;
|
|
6
8
|
export default AdministeredTab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/AdministeredTab.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/AdministeredTab.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAQlB,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AASD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8InD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { NotAdministeredTabConfig } from '../model';
|
|
2
3
|
interface NotAdministeredTabProps {
|
|
3
4
|
patientUUID: string;
|
|
5
|
+
config: NotAdministeredTabConfig;
|
|
4
6
|
}
|
|
5
7
|
declare const NotAdministeredTab: React.FC<NotAdministeredTabProps>;
|
|
6
8
|
export default NotAdministeredTab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotAdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/NotAdministeredTab.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NotAdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/NotAdministeredTab.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EAEL,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAQlB,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,wBAAwB,CAAC;CAClC;AASD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAyEzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,4 +2,9 @@ export declare const FHIR_EXT_IMMUNIZATION_DRUG = "http://fhir.bahmni.org/ext/im
|
|
|
2
2
|
export declare const ENTERING_PROVIDER_CODE = "EP";
|
|
3
3
|
export declare const ORDERING_PROVIDER_CODE = "OP";
|
|
4
4
|
export declare const ADD_IMMUNIZATIONS_PRIVILEGE = "Add Immunizations";
|
|
5
|
+
export declare const ADMINISTERED_COLUMN_FIELDS: string[];
|
|
6
|
+
export declare const ADMINISTERED_EXPANDED_FIELDS: string[];
|
|
7
|
+
export declare const NOT_ADMINISTERED_COLUMN_FIELDS: string[];
|
|
8
|
+
export declare const ADMINISTERED_COLUMN_SORTABILITY: Record<string, boolean>;
|
|
9
|
+
export declare const NOT_ADMINISTERED_COLUMN_SORTABILITY: Record<string, boolean>;
|
|
5
10
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAChE,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,2BAA2B,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAChE,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAM9C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,EAOhD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,MAAM,EAKlD,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAMnE,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAKvE,CAAC"}
|
|
@@ -21,4 +21,11 @@ export interface NotAdministeredImmunizationViewModel {
|
|
|
21
21
|
date: string | null;
|
|
22
22
|
recordedBy: string | null;
|
|
23
23
|
}
|
|
24
|
+
export interface AdministeredTabConfig {
|
|
25
|
+
columns: string[];
|
|
26
|
+
expandedFields: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface NotAdministeredTabConfig {
|
|
29
|
+
columns: string[];
|
|
30
|
+
}
|
|
24
31
|
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Immunization } from 'fhir/r4';
|
|
2
2
|
import { AdministeredImmunizationViewModel, NotAdministeredImmunizationViewModel } from './model';
|
|
3
|
+
export declare function createImmunizationHeaders(fields: string[], t: (key: string) => string): Array<{
|
|
4
|
+
key: string;
|
|
5
|
+
header: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function createColumnSortConfig(fields: string[], sortability: Record<string, boolean>): Array<{
|
|
8
|
+
key: string;
|
|
9
|
+
sortable: boolean;
|
|
10
|
+
}>;
|
|
3
11
|
export declare function createAdministeredImmunizationViewModel(immunization: Immunization): AdministeredImmunizationViewModel;
|
|
4
12
|
export declare function createNotAdministeredImmunizationViewModel(immunization: Immunization): NotAdministeredImmunizationViewModel;
|
|
5
13
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACrC,MAAM,SAAS,CAAC;AA2BjB,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EAAE,EAChB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAOxC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EAAE,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CAK3C;AAED,wBAAgB,uCAAuC,CACrD,YAAY,EAAE,YAAY,GACzB,iCAAiC,CAgCnC;AAED,wBAAgB,0CAA0C,CACxD,YAAY,EAAE,YAAY,GACzB,oCAAoC,CAQtC"}
|