@bahmni/registration-app 0.0.1-dev.234 → 0.0.1-dev.237
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-Cl0S6I_z-DqZdqL-h.js → DocumentsTable-DZLV91xy-CxzeGcPE.js} +32 -32
- package/dist/{FormsTable-Iqc9AxOy-BzfTY7Wr.js → FormsTable-Yt3aI_e6-EwL8PKkT.js} +69 -69
- package/dist/{LNWAZHJI-BekELcky.js → LNWAZHJI-mqLi1yCc.js} +6 -6
- package/dist/{MWZ6AO7Z-BQLmv85K.js → MWZ6AO7Z-BW_x4w9P.js} +5 -5
- package/dist/{Observations-DBbsNLYV-EO2y9OkU.js → Observations-DoBEcLrI-CMpRZG3h.js} +36 -36
- package/dist/{YPM2AS64-CwmNiHJq.js → YPM2AS64-BUe6iWAq.js} +1 -1
- package/dist/components/forms/profile/Profile.d.ts.map +1 -1
- package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts +2 -0
- package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts.map +1 -1
- package/dist/components/patientPhotoUpload/utils.d.ts +23 -0
- package/dist/components/patientPhotoUpload/utils.d.ts.map +1 -0
- package/dist/constants/app.d.ts +3 -0
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/{index-C8FL8_cr.js → index-CUhWstXf.js} +57750 -55859
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/providers/registrationConfig/models.d.ts +10 -0
- package/dist/providers/registrationConfig/models.d.ts.map +1 -1
- package/dist/providers/registrationConfig/schema.json.d.ts +41 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { t as K, u as Q, r as W,
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { t as K, u as Q, r as W, V as J, N as X, d as Z, o as ee, l as te } from "./index-CUhWstXf.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44",
|
|
4
|
+
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
5
|
+
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
8
8
|
documentViewerContainer: re,
|
|
@@ -10,8 +10,8 @@ const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11",
|
|
|
10
10
|
attachmentCounter: se,
|
|
11
11
|
attachmentError: ce,
|
|
12
12
|
documentIframe: ie,
|
|
13
|
-
documentImage:
|
|
14
|
-
},
|
|
13
|
+
documentImage: le
|
|
14
|
+
}, me = {
|
|
15
15
|
documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
|
|
16
16
|
documentType: "DOCUMENTS_TYPE",
|
|
17
17
|
uploadedOn: "DOCUMENTS_UPLOADED_ON",
|
|
@@ -24,21 +24,21 @@ function j(a) {
|
|
|
24
24
|
function ue(a, E) {
|
|
25
25
|
return a.map((s) => ({
|
|
26
26
|
key: s,
|
|
27
|
-
header: E(
|
|
27
|
+
header: E(me[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const _e = [
|
|
31
31
|
"documentIdentifier",
|
|
32
32
|
"documentType",
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
],
|
|
37
|
-
const [s, w] =
|
|
36
|
+
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: E }) => {
|
|
37
|
+
const [s, w] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
|
-
), [R, I] =
|
|
39
|
+
), [R, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] =
|
|
41
|
+
), g = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, V] = l($), [k, y] = l(void 0), M = h((e) => {
|
|
42
42
|
L(e), w(!0);
|
|
43
43
|
}, []), F = h(() => {
|
|
44
44
|
w(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
@@ -50,13 +50,13 @@ const pe = [
|
|
|
50
50
|
g,
|
|
51
51
|
E,
|
|
52
52
|
C,
|
|
53
|
-
|
|
53
|
+
m
|
|
54
54
|
],
|
|
55
55
|
enabled: !!g,
|
|
56
56
|
queryFn: () => J(
|
|
57
57
|
g,
|
|
58
58
|
E,
|
|
59
|
-
|
|
59
|
+
m,
|
|
60
60
|
C
|
|
61
61
|
)
|
|
62
62
|
});
|
|
@@ -91,19 +91,19 @@ const pe = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const q = h(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !==
|
|
94
|
+
t !== m ? (V(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
|
-
[
|
|
96
|
+
[m]
|
|
97
97
|
), N = T(
|
|
98
|
-
() => a?.fields ??
|
|
98
|
+
() => a?.fields ?? _e,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
),
|
|
100
|
+
), P = T(() => [...u?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [u]), z = T(() => ue(N, n), [N, n]), x = T(
|
|
101
101
|
() => N.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "action"
|
|
104
104
|
})),
|
|
105
105
|
[N]
|
|
106
|
-
),
|
|
106
|
+
), _ = T(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), G = h(
|
|
@@ -137,21 +137,21 @@ const pe = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
144
|
-
headers:
|
|
144
|
+
headers: z,
|
|
145
145
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
146
|
-
rows:
|
|
146
|
+
rows: P,
|
|
147
147
|
loading: H,
|
|
148
148
|
errorStateMessage: D ? v?.message : null,
|
|
149
|
-
sortable:
|
|
149
|
+
sortable: x,
|
|
150
150
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
151
151
|
renderCell: G,
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
|
-
pageSize:
|
|
154
|
+
pageSize: m,
|
|
155
155
|
totalItems: k,
|
|
156
156
|
page: C,
|
|
157
157
|
onPageChange: q
|
|
@@ -168,33 +168,33 @@ const pe = [
|
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
172
|
-
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) ||
|
|
173
|
-
return c === "#" || O ? /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: _.map((e, t) => {
|
|
172
|
+
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = R.has(t);
|
|
173
|
+
return c === "#" || O ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
|
|
179
|
+
_.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
|
-
|
|
182
|
+
_.length
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ p(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
_.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
|
-
|
|
197
|
+
_.length
|
|
198
198
|
] }),
|
|
199
199
|
S ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { u as Z, t as ee, g as re,
|
|
1
|
+
import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { u as Z, t as ee, g as re, y as ae, v as te, E as oe, a as se, B as ne, b as U, d as de, N as ie, o as S, Q as me, X as ue, l as le, c as ce, m as fe } from "./index-CUhWstXf.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
4
|
import { useState as C, useMemo as d, useCallback as f } from "react";
|
|
5
|
-
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6",
|
|
5
|
+
const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
|
|
6
6
|
formsTableBody: be,
|
|
7
7
|
customAccordianItem: ge
|
|
8
|
-
},
|
|
8
|
+
}, Ne = (m) => m ? m.extension?.find(
|
|
9
9
|
(n) => n.url === fe
|
|
10
|
-
)?.valueString : void 0,
|
|
11
|
-
episodeOfCareUuids:
|
|
10
|
+
)?.valueString : void 0, Be = ({
|
|
11
|
+
episodeOfCareUuids: m,
|
|
12
12
|
encounterUuids: n,
|
|
13
|
-
config:
|
|
13
|
+
config: q
|
|
14
14
|
}) => {
|
|
15
|
-
const { t: o } = Z(),
|
|
16
|
-
|
|
15
|
+
const { t: o } = Z(), u = ee(), [l, A] = C(!1), [t, B] = C(null), { numberOfVisits: k, hideThumbnail: H = !1 } = q ?? {}, I = re(
|
|
16
|
+
m,
|
|
17
17
|
n
|
|
18
|
-
),
|
|
18
|
+
), K = ye(), {
|
|
19
19
|
data: y = [],
|
|
20
|
-
isLoading:
|
|
21
|
-
isError:
|
|
22
|
-
error:
|
|
23
|
-
refetch:
|
|
20
|
+
isLoading: E,
|
|
21
|
+
isError: T,
|
|
22
|
+
error: Q,
|
|
23
|
+
refetch: V
|
|
24
24
|
} = c({
|
|
25
|
-
queryKey: ["forms",
|
|
26
|
-
queryFn: () => ae(
|
|
27
|
-
enabled: !!
|
|
25
|
+
queryKey: ["forms", u, m],
|
|
26
|
+
queryFn: () => ae(u, void 0, k),
|
|
27
|
+
enabled: !!u && !I
|
|
28
28
|
}), _ = d(() => !n || n.length === 0 ? y : y.filter(
|
|
29
29
|
(e) => n.includes(e.encounterUuid)
|
|
30
|
-
), [y, n]), { data:
|
|
30
|
+
), [y, n]), { data: v = [] } = c({
|
|
31
31
|
queryKey: ["observationForms"],
|
|
32
32
|
queryFn: () => te()
|
|
33
|
-
}),
|
|
34
|
-
(e) =>
|
|
35
|
-
[
|
|
33
|
+
}), D = f(
|
|
34
|
+
(e) => v.find((r) => r.name === e)?.uuid,
|
|
35
|
+
[v]
|
|
36
36
|
), b = d(() => {
|
|
37
37
|
if (t)
|
|
38
|
-
return
|
|
39
|
-
}, [t,
|
|
40
|
-
isLoading:
|
|
41
|
-
isError:
|
|
38
|
+
return D(t.formName);
|
|
39
|
+
}, [t, D]), {
|
|
40
|
+
isLoading: j,
|
|
41
|
+
isError: x,
|
|
42
42
|
error: g
|
|
43
43
|
} = c({
|
|
44
44
|
queryKey: ["formMetadata", b],
|
|
45
45
|
queryFn: () => oe(b),
|
|
46
46
|
enabled: !!b && l
|
|
47
47
|
}), {
|
|
48
|
-
data:
|
|
48
|
+
data: N,
|
|
49
49
|
isLoading: $,
|
|
50
50
|
isError: w,
|
|
51
|
-
error:
|
|
51
|
+
error: p
|
|
52
52
|
} = c({
|
|
53
53
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
54
54
|
queryFn: () => se(t.encounterUuid),
|
|
@@ -56,41 +56,41 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
56
56
|
});
|
|
57
57
|
ne(
|
|
58
58
|
(e) => {
|
|
59
|
-
e.patientUUID ===
|
|
59
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
60
60
|
},
|
|
61
|
-
[
|
|
61
|
+
[u]
|
|
62
62
|
);
|
|
63
|
-
const z = d(() => !
|
|
64
|
-
const r =
|
|
63
|
+
const z = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
64
|
+
const r = Ne(e);
|
|
65
65
|
return !r || r.includes(t.formName);
|
|
66
|
-
}), [
|
|
66
|
+
}), [N, t?.formName]), G = d(() => {
|
|
67
67
|
if (g)
|
|
68
|
-
return
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
}, [g,
|
|
68
|
+
return U(g).message;
|
|
69
|
+
if (p)
|
|
70
|
+
return U(p).message;
|
|
71
|
+
}, [g, p]), F = d(
|
|
72
72
|
() => [
|
|
73
73
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
74
74
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
75
75
|
],
|
|
76
76
|
[o]
|
|
77
|
-
),
|
|
77
|
+
), P = d(
|
|
78
78
|
() => [
|
|
79
79
|
{ key: "recordedOn", sortable: !0 },
|
|
80
80
|
{ key: "recordedBy", sortable: !0 }
|
|
81
81
|
],
|
|
82
82
|
[]
|
|
83
|
-
),
|
|
83
|
+
), L = d(() => {
|
|
84
84
|
const e = _.reduce(
|
|
85
85
|
(r, a) => {
|
|
86
86
|
const i = a.formName;
|
|
87
87
|
r[i] ??= [];
|
|
88
|
-
const
|
|
88
|
+
const h = a.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
|
|
89
89
|
return r[i].push({
|
|
90
90
|
id: a.encounterUuid,
|
|
91
91
|
formName: a.formName,
|
|
92
92
|
recordedOn: de(a.encounterDateTime, o, !0).formattedResult,
|
|
93
|
-
recordedBy:
|
|
93
|
+
recordedBy: h ?? "--",
|
|
94
94
|
encounterDateTime: a.encounterDateTime,
|
|
95
95
|
encounterUuid: a.encounterUuid
|
|
96
96
|
}), r;
|
|
@@ -101,62 +101,62 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
101
101
|
([r, a]) => ({
|
|
102
102
|
formName: r,
|
|
103
103
|
records: a.sort(
|
|
104
|
-
(i,
|
|
104
|
+
(i, h) => h.encounterDateTime - i.encounterDateTime
|
|
105
105
|
)
|
|
106
106
|
})
|
|
107
107
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
108
|
-
}, [_, o]),
|
|
109
|
-
|
|
110
|
-
}, []),
|
|
111
|
-
|
|
112
|
-
}, []),
|
|
108
|
+
}, [_, o]), M = f((e) => {
|
|
109
|
+
B(e), A(!0);
|
|
110
|
+
}, []), X = f(() => {
|
|
111
|
+
A(!1), B(null);
|
|
112
|
+
}, []), R = f(
|
|
113
113
|
(e, r) => {
|
|
114
114
|
switch (r) {
|
|
115
115
|
case "recordedOn":
|
|
116
|
-
return /* @__PURE__ */ s(ie, { onClick: () =>
|
|
116
|
+
return /* @__PURE__ */ s(ie, { onClick: () => M(e), children: e.recordedOn });
|
|
117
117
|
case "recordedBy":
|
|
118
118
|
return e.recordedBy;
|
|
119
119
|
default:
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
[
|
|
123
|
+
[M]
|
|
124
124
|
);
|
|
125
|
-
return /* @__PURE__ */ W
|
|
126
|
-
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children:
|
|
127
|
-
|
|
125
|
+
return /* @__PURE__ */ J(W, { children: [
|
|
126
|
+
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: E || T || L.length === 0 || I ? /* @__PURE__ */ s(
|
|
127
|
+
S,
|
|
128
128
|
{
|
|
129
|
-
headers:
|
|
129
|
+
headers: F,
|
|
130
130
|
ariaLabel: o("FORMS_HEADING"),
|
|
131
131
|
rows: [],
|
|
132
|
-
loading:
|
|
133
|
-
errorStateMessage:
|
|
132
|
+
loading: E,
|
|
133
|
+
errorStateMessage: T ? Q?.message : void 0,
|
|
134
134
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
135
|
-
renderCell:
|
|
136
|
-
className:
|
|
135
|
+
renderCell: R,
|
|
136
|
+
className: O.formsTableBody,
|
|
137
137
|
dataTestId: "forms-table"
|
|
138
138
|
}
|
|
139
|
-
) : /* @__PURE__ */ s(
|
|
139
|
+
) : /* @__PURE__ */ s(me, { align: "start", children: L.map((e, r) => {
|
|
140
140
|
const { formName: a, records: i } = e;
|
|
141
141
|
return /* @__PURE__ */ s(
|
|
142
|
-
|
|
142
|
+
ue,
|
|
143
143
|
{
|
|
144
144
|
title: a,
|
|
145
|
-
className:
|
|
145
|
+
className: O.customAccordianItem,
|
|
146
146
|
testId: `accordian-title-${a}`,
|
|
147
147
|
open: r === 0,
|
|
148
148
|
children: /* @__PURE__ */ s(
|
|
149
|
-
|
|
149
|
+
S,
|
|
150
150
|
{
|
|
151
|
-
headers:
|
|
151
|
+
headers: F,
|
|
152
152
|
ariaLabel: o("FORMS_HEADING"),
|
|
153
153
|
rows: i,
|
|
154
154
|
loading: !1,
|
|
155
155
|
errorStateMessage: "",
|
|
156
|
-
sortable:
|
|
156
|
+
sortable: P,
|
|
157
157
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
158
|
-
renderCell:
|
|
159
|
-
className:
|
|
158
|
+
renderCell: R,
|
|
159
|
+
className: O.formsTableBody,
|
|
160
160
|
dataTestId: `forms-table-${a}`
|
|
161
161
|
}
|
|
162
162
|
)
|
|
@@ -170,7 +170,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
170
170
|
id: "modalIdForActionAreaLayout",
|
|
171
171
|
portalId: "main-display-area",
|
|
172
172
|
open: l,
|
|
173
|
-
onRequestClose:
|
|
173
|
+
onRequestClose: X,
|
|
174
174
|
modalHeading: t.formName,
|
|
175
175
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
176
176
|
passiveModal: !0,
|
|
@@ -180,12 +180,12 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
180
180
|
ce,
|
|
181
181
|
{
|
|
182
182
|
observations: z,
|
|
183
|
-
isLoading:
|
|
184
|
-
isError:
|
|
183
|
+
isLoading: j || $,
|
|
184
|
+
isError: x || w,
|
|
185
185
|
errorMessage: G,
|
|
186
186
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
187
187
|
testIdPrefix: t.formName,
|
|
188
|
-
hideThumbnail:
|
|
188
|
+
hideThumbnail: H
|
|
189
189
|
}
|
|
190
190
|
)
|
|
191
191
|
}
|
|
@@ -193,5 +193,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
193
193
|
] });
|
|
194
194
|
};
|
|
195
195
|
export {
|
|
196
|
-
|
|
196
|
+
Be as default
|
|
197
197
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BUe6iWAq.js";
|
|
2
|
+
import { k as p, n as d, p as e } from "./index-CUhWstXf.js";
|
|
3
|
+
var f = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n =
|
|
6
|
+
}), n = p(), s = d(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
@@ -27,7 +27,7 @@ var p = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
},
|
|
30
|
+
}, C = f;
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
C as default
|
|
33
33
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import {
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-BUe6iWAq.js";
|
|
2
|
+
import { k as v, n as C, p as e } from "./index-CUhWstXf.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), a =
|
|
6
|
+
}), a = v(), l = C(() => {
|
|
7
7
|
const n = r.theme_preference || c;
|
|
8
8
|
return n !== "system" ? n : a();
|
|
9
9
|
});
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, g = h;
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
g as default
|
|
42
42
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as k, r as w, u as S, f as x, w as G, B as K, e as M, z as Q, A as Y, Y as j, o as z, M as H, G as F, x as P, h as J, F as W, i as X, T as Z, j as ee } from "./index-CUhWstXf.js";
|
|
3
3
|
import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
5
|
-
const
|
|
6
|
-
const a =
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as T } from "react";
|
|
5
|
+
const A = (t, n, d, l, b, r) => {
|
|
6
|
+
const a = P(t, n, b), s = a.value, i = J(s);
|
|
7
7
|
let o = s;
|
|
8
8
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
9
9
|
X,
|
|
@@ -37,13 +37,13 @@ const D = (t, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${t.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
F,
|
|
41
41
|
{
|
|
42
42
|
title: t.display,
|
|
43
43
|
id: `grouped-obs-${t.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: t.members?.map(
|
|
46
|
-
(s, i) =>
|
|
46
|
+
(s, i) => A(
|
|
47
47
|
s,
|
|
48
48
|
i,
|
|
49
49
|
b,
|
|
@@ -60,16 +60,16 @@ const D = (t, n, d, l, b, r) => {
|
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
62
|
const { t: l } = S(), b = (r, a, s) => {
|
|
63
|
-
const i =
|
|
63
|
+
const i = H(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ N(
|
|
65
|
-
|
|
65
|
+
F,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: a,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(o, m) =>
|
|
72
|
+
(o, m) => A(
|
|
73
73
|
o,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -113,58 +113,58 @@ const D = (t, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), a =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = w(), { t: i } = S(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => x(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
123
123
|
$(() => {
|
|
124
124
|
o.forEach((e, h) => {
|
|
125
125
|
if (e.isError && !r.current.has(h)) {
|
|
126
|
-
const
|
|
126
|
+
const V = d[h];
|
|
127
127
|
s({
|
|
128
128
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
129
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
129
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
130
130
|
type: "error"
|
|
131
131
|
}), r.current.add(h);
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [o, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = T(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = T(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
138
|
-
isError:
|
|
139
|
-
refetch:
|
|
137
|
+
isLoading: q,
|
|
138
|
+
isError: f,
|
|
139
|
+
refetch: R
|
|
140
140
|
} = ae({
|
|
141
141
|
queryKey: le(a, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => G(a, p),
|
|
143
143
|
enabled: !!a && p.length > 0 && y
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
K(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
149
|
-
) &&
|
|
149
|
+
) && R();
|
|
150
150
|
},
|
|
151
|
-
[a,
|
|
151
|
+
[a, R]
|
|
152
152
|
), $(() => {
|
|
153
|
-
|
|
153
|
+
f && s({
|
|
154
154
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
158
|
+
}, [f]);
|
|
159
|
+
const g = T(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
162
|
-
return
|
|
163
|
-
}, [c]),
|
|
161
|
+
const e = M(c), h = Q(e);
|
|
162
|
+
return Y(h);
|
|
163
|
+
}, [c]), D = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], O = q || !y, _ = f && y, B = (!c || c.entry?.length === 0 || p.length === 0) && y, L = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, U = B ? i("NO_OBSERVATIONS_FOUND") : void 0, C = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
168
|
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
@@ -174,7 +174,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
j,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
180
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -183,22 +183,22 @@ const D = (t, n, d, l, b, r) => {
|
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
|
|
186
|
+
C ? /* @__PURE__ */ u(
|
|
187
187
|
ie,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: g,
|
|
190
190
|
title: v,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
z,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: D,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: i("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
200
|
-
errorStateMessage:
|
|
201
|
-
emptyStateMessage:
|
|
199
|
+
loading: O,
|
|
200
|
+
errorStateMessage: L,
|
|
201
|
+
emptyStateMessage: U,
|
|
202
202
|
dataTestId: "observations-table"
|
|
203
203
|
}
|
|
204
204
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as we, s as z, C as xt, D as B, n as q, p as y, P as Ro, H as ye, S as R, I as _, J as k, K as N, L as A, O as bs, R as ir, U as $e, W as U, Z as Hn, _ as Vn, $ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-CUhWstXf.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgB7D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,aAAa,GAAG;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;kFAMjB,YAAY;;
|
|
1
|
+
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgB7D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,aAAa,GAAG;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;kFAMjB,YAAY;;CAwpBd,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { PatientPhotoConfig } from '../../providers/registrationConfig/models';
|
|
2
3
|
interface PatientPhotoUploadProps {
|
|
3
4
|
onPhotoConfirm: (base64Image: string) => void;
|
|
4
5
|
initialPhoto?: string;
|
|
6
|
+
photoConfig?: PatientPhotoConfig;
|
|
5
7
|
}
|
|
6
8
|
export declare const PatientPhotoUpload: React.FC<PatientPhotoUploadProps>;
|
|
7
9
|
export {};
|