@bahmni/registration-app 0.0.1-dev.171 → 0.0.1-dev.173
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-TPfrZJSk-CnPlwf3u.js → DocumentsTable-DV_nkz4--BGsIQv3U.js} +1 -1
- package/dist/{FormsTable-BSKlMAJe-BWz6Ww8f.js → FormsTable-DL_zg0dG-Dtzz6_q4.js} +97 -97
- package/dist/{LNWAZHJI-DYHV_n8s.js → LNWAZHJI-hJhqylVc.js} +5 -5
- package/dist/{MWZ6AO7Z-DgMjJOza.js → MWZ6AO7Z-Bh8B_EOv.js} +7 -7
- package/dist/{Observations-Diygv8o5-VWfyxp1Z.js → Observations-c94Dp42v-gtJn7WfV.js} +52 -52
- package/dist/{YPM2AS64-Dyj543hX.js → YPM2AS64-COjNsPdl.js} +181 -181
- package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts.map +1 -1
- package/dist/components/forms/contactInfo/ContactInfo.d.ts.map +1 -1
- package/dist/components/forms/profile/Profile.d.ts.map +1 -1
- package/dist/components/registrationActions/RegistrationActions.d.ts.map +1 -1
- package/dist/constants/app.d.ts +1 -0
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/hooks/useAddressFieldsWithConfig.d.ts.map +1 -1
- package/dist/hooks/useFilteredExtensions.d.ts +1 -1
- package/dist/hooks/useFilteredExtensions.d.ts.map +1 -1
- package/dist/{index-Qc9d1D1J.js → index-DAYe3WiF.js} +33612 -33605
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +3 -0
- package/dist/locales/locale_es.json +2 -0
- package/dist/pages/patientSearchPage/index.d.ts.map +1 -1
- package/dist/providers/registrationConfig/constants.d.ts +2 -0
- package/dist/providers/registrationConfig/constants.d.ts.map +1 -0
- package/dist/providers/registrationConfig/context.d.ts +3 -0
- package/dist/providers/registrationConfig/context.d.ts.map +1 -0
- package/dist/providers/registrationConfig/hook.d.ts +3 -0
- package/dist/providers/registrationConfig/hook.d.ts.map +1 -0
- package/dist/providers/registrationConfig/index.d.ts +5 -0
- package/dist/providers/registrationConfig/index.d.ts.map +1 -0
- package/dist/providers/registrationConfig/models.d.ts +84 -0
- package/dist/providers/registrationConfig/models.d.ts.map +1 -0
- package/dist/providers/registrationConfig/provider.d.ts +4 -0
- package/dist/providers/registrationConfig/provider.d.ts.map +1 -0
- package/dist/providers/registrationConfig/schema.json.d.ts +406 -0
- package/package.json +1 -1
- package/dist/contexts/RegistrationConfigContext.d.ts +0 -3
- package/dist/contexts/RegistrationConfigContext.d.ts.map +0 -1
- package/dist/hooks/useRegistrationConfig.d.ts +0 -3
- package/dist/hooks/useRegistrationConfig.d.ts.map +0 -1
- package/dist/models/registrationConfig.d.ts +0 -15
- package/dist/models/registrationConfig.d.ts.map +0 -1
- package/dist/providers/RegistrationConfigProvider.d.ts +0 -9
- package/dist/providers/RegistrationConfigProvider.d.ts.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { f as B, n as V, u as N, R as w, h as K, e as Q, $ as j, i as x, j as z, l as G, z as H, q as M, m as S, U as P, D as W, o as X, d as Y, w as J } from "./index-DAYe3WiF.js";
|
|
3
3
|
import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as te, useEffect as
|
|
5
|
-
const
|
|
6
|
-
const a = P(t, d),
|
|
7
|
-
let n =
|
|
8
|
-
o === "Image" && (n = /* @__PURE__ */ c(Y, { imageSrc:
|
|
9
|
-
const b =
|
|
4
|
+
import { useRef as te, useEffect as _, useMemo as E } from "react";
|
|
5
|
+
const D = (t, d, i, l, s) => {
|
|
6
|
+
const a = P(t, d), r = a.value, o = W(r);
|
|
7
|
+
let n = r;
|
|
8
|
+
o === "Image" && (n = /* @__PURE__ */ c(Y, { imageSrc: r, alt: r, id: `${r}-img` })), o === "Video" && (n = /* @__PURE__ */ c(J, { id: `${r}-video`, videoSrc: r }));
|
|
9
|
+
const b = s("OBSERVATIONS_RECORDED_BY", {
|
|
10
10
|
provider: a.provider
|
|
11
11
|
}), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", u = l ? `${l}-${v}-${p}-${i}-${d}` : `${v}-${p}-${i}-${d}`;
|
|
12
12
|
return /* @__PURE__ */ c(
|
|
@@ -21,46 +21,46 @@ const A = (t, d, i, l, r) => {
|
|
|
21
21
|
},
|
|
22
22
|
`obs-${t.id}`
|
|
23
23
|
);
|
|
24
|
-
}, ae = (t, d, i, l,
|
|
24
|
+
}, ae = (t, d, i, l, s, a) => /* @__PURE__ */ c(
|
|
25
25
|
S,
|
|
26
26
|
{
|
|
27
27
|
title: t.display,
|
|
28
28
|
id: `grouped-obs-${t.display}-${l}`,
|
|
29
29
|
open: i,
|
|
30
30
|
children: t.members?.map(
|
|
31
|
-
(
|
|
31
|
+
(r, o) => D(r, o, s, a, d)
|
|
32
32
|
)
|
|
33
33
|
},
|
|
34
34
|
`grouped-obs-${t.id}`
|
|
35
|
-
),
|
|
35
|
+
), se = ({
|
|
36
36
|
groupedData: t,
|
|
37
37
|
title: d = ""
|
|
38
38
|
}) => {
|
|
39
|
-
const { t: i } = N(), l = (
|
|
40
|
-
const o = M(
|
|
39
|
+
const { t: i } = N(), l = (s, a, r) => {
|
|
40
|
+
const o = M(s.encounterDetails, i);
|
|
41
41
|
return /* @__PURE__ */ I(
|
|
42
42
|
S,
|
|
43
43
|
{
|
|
44
44
|
title: o,
|
|
45
|
-
id: `encounter-${
|
|
45
|
+
id: `encounter-${s.encounterId}`,
|
|
46
46
|
open: a,
|
|
47
47
|
children: [
|
|
48
|
-
|
|
49
|
-
(n, b) =>
|
|
48
|
+
s.observations.map(
|
|
49
|
+
(n, b) => D(n, b, r, d, i)
|
|
50
50
|
),
|
|
51
|
-
|
|
51
|
+
s.groupedObservations.map(
|
|
52
52
|
(n, b) => ae(
|
|
53
53
|
n,
|
|
54
54
|
i,
|
|
55
55
|
a,
|
|
56
56
|
b,
|
|
57
|
-
|
|
57
|
+
r,
|
|
58
58
|
d
|
|
59
59
|
)
|
|
60
60
|
)
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
|
-
`encounter-${
|
|
63
|
+
`encounter-${s.encounterId}`
|
|
64
64
|
);
|
|
65
65
|
};
|
|
66
66
|
return /* @__PURE__ */ c(
|
|
@@ -70,93 +70,93 @@ const A = (t, d, i, l, r) => {
|
|
|
70
70
|
"data-testid": "obs-by-encounter-test-id",
|
|
71
71
|
"aria-label": "obs-by-encounter-aria-label",
|
|
72
72
|
children: t.map(
|
|
73
|
-
(
|
|
73
|
+
(s, a) => l(s, a === 0, a)
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
},
|
|
78
|
-
observations:
|
|
77
|
+
}, re = "_observations_kfbhq_1", oe = "_title_kfbhq_12", T = {
|
|
78
|
+
observations: re,
|
|
79
79
|
title: oe
|
|
80
80
|
}, ie = (t) => ["conceptUuid", t], ne = (t, d) => ["observations", t, ...d], be = ({ config: t }) => {
|
|
81
|
-
const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d,
|
|
81
|
+
const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, s = te(/* @__PURE__ */ new Set()), a = B(), { addNotification: r } = V(), { t: o } = N(), n = Z({
|
|
82
82
|
queries: i.map((e) => ({
|
|
83
83
|
queryKey: ie(e),
|
|
84
|
-
queryFn: () =>
|
|
84
|
+
queryFn: () => w(e),
|
|
85
85
|
enabled: !!e
|
|
86
86
|
}))
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
_(() => {
|
|
89
89
|
n.forEach((e, m) => {
|
|
90
|
-
if (e.isError && !
|
|
90
|
+
if (e.isError && !s.current.has(m)) {
|
|
91
91
|
const k = i[m];
|
|
92
|
-
|
|
92
|
+
r({
|
|
93
93
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
94
94
|
message: o("ERROR_FETCHING_CONCEPT", { conceptName: k }),
|
|
95
95
|
type: "error"
|
|
96
|
-
}),
|
|
97
|
-
} else e.isError ||
|
|
96
|
+
}), s.current.add(m);
|
|
97
|
+
} else e.isError || s.current.delete(m);
|
|
98
98
|
});
|
|
99
99
|
}, [n, i]);
|
|
100
|
-
const b =
|
|
100
|
+
const b = E(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = E(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = E(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
101
101
|
data: u,
|
|
102
|
-
isLoading:
|
|
103
|
-
isError:
|
|
104
|
-
refetch:
|
|
102
|
+
isLoading: U,
|
|
103
|
+
isError: f,
|
|
104
|
+
refetch: g
|
|
105
105
|
} = ee({
|
|
106
106
|
queryKey: ne(a, p),
|
|
107
|
-
queryFn: () =>
|
|
107
|
+
queryFn: () => K(a, p),
|
|
108
108
|
enabled: !!a && p.length > 0 && v
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
Q(
|
|
111
111
|
(e) => {
|
|
112
112
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
113
113
|
(m) => p.includes(m)
|
|
114
|
-
) &&
|
|
114
|
+
) && g();
|
|
115
115
|
},
|
|
116
|
-
[a,
|
|
117
|
-
),
|
|
118
|
-
|
|
116
|
+
[a, g]
|
|
117
|
+
), _(() => {
|
|
118
|
+
f && r({
|
|
119
119
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
120
120
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
121
121
|
type: "error"
|
|
122
122
|
});
|
|
123
|
-
}, [
|
|
124
|
-
const
|
|
123
|
+
}, [f]);
|
|
124
|
+
const h = E(() => {
|
|
125
125
|
if (!u) return [];
|
|
126
|
-
const e =
|
|
127
|
-
return
|
|
128
|
-
}, [u]),
|
|
126
|
+
const e = j(u), m = x(e);
|
|
127
|
+
return z(m);
|
|
128
|
+
}, [u]), q = [
|
|
129
129
|
{ key: "name", header: "name" },
|
|
130
130
|
{ key: "value", header: "value" },
|
|
131
131
|
{ key: "form", header: "form" }
|
|
132
|
-
],
|
|
132
|
+
], $ = U || !v, O = f && v, A = (!u || u.entry?.length === 0 || p.length === 0) && v, C = O ? o("ERROR_FETCHING_OBSERVATIONS") : null, F = A ? o("NO_OBSERVATIONS_FOUND") : void 0, L = h.length > 0 && !$ && !O, R = d.titleTranslationKey, y = R ? o(R) : "";
|
|
133
133
|
return /* @__PURE__ */ I(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
id: "observations",
|
|
137
|
-
"data-testid":
|
|
137
|
+
"data-testid": R ? `observations-${y}` : "observations",
|
|
138
138
|
"aria-label": "observations-aria-label",
|
|
139
139
|
className: T.observations,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ c(
|
|
142
|
-
|
|
142
|
+
G,
|
|
143
143
|
{
|
|
144
144
|
id: "observations-title",
|
|
145
|
-
testId:
|
|
145
|
+
testId: R ? `observations-title-${y}` : "observations-title",
|
|
146
146
|
title: y,
|
|
147
147
|
className: T.title,
|
|
148
148
|
children: /* @__PURE__ */ c("p", { children: y })
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
|
|
151
|
+
L ? /* @__PURE__ */ c(se, { groupedData: h, title: y }) : /* @__PURE__ */ c(
|
|
152
152
|
H,
|
|
153
153
|
{
|
|
154
|
-
headers:
|
|
154
|
+
headers: q,
|
|
155
155
|
rows: [],
|
|
156
156
|
ariaLabel: o("OBSERVATIONS"),
|
|
157
|
-
loading:
|
|
158
|
-
errorStateMessage:
|
|
159
|
-
emptyStateMessage:
|
|
157
|
+
loading: $,
|
|
158
|
+
errorStateMessage: C,
|
|
159
|
+
emptyStateMessage: F,
|
|
160
160
|
dataTestId: "observations-table"
|
|
161
161
|
}
|
|
162
162
|
)
|