@bahmni/clinical-app 0.0.1-dev.151 → 0.0.1-dev.152
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/{FormsTable-BqSVEv0D-CJ0S1DST.js → FormsTable-C2-Q9TG2-C2QshdZv.js} +121 -113
- package/dist/{LNWAZHJI-BpL8MSsb.js → LNWAZHJI-9C36qSMQ.js} +5 -5
- package/dist/{MWZ6AO7Z-B3U0oS0a.js → MWZ6AO7Z-pgM9-BQS.js} +7 -7
- package/dist/Observations-DmBegyWd-BIqsMafK.js +170 -0
- package/dist/{YPM2AS64-BRLiQ99R.js → YPM2AS64-DM4vxIO7.js} +1 -1
- package/dist/components/consultationPad/ConsultationPad.d.ts.map +1 -1
- package/dist/{index-D9U_fT9q.js → index-BPwSmRKH.js} +5342 -5315
- package/dist/index.js +1 -1
- package/dist/utils/fhir/conceptExtractor.d.ts +9 -0
- package/dist/utils/fhir/conceptExtractor.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/Observations-CuoD8QPi-DWd8zjnU.js +0 -162
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useState as
|
|
4
|
-
const
|
|
5
|
-
formsTableBody:
|
|
6
|
-
customAccordianItem:
|
|
7
|
-
formContent:
|
|
8
|
-
formDetailsContainer:
|
|
9
|
-
observation:
|
|
10
|
-
groupContainer:
|
|
11
|
-
rowContainer:
|
|
12
|
-
groupLabel:
|
|
13
|
-
rowLabel:
|
|
14
|
-
rowValue:
|
|
15
|
-
groupMembers:
|
|
16
|
-
memberRow:
|
|
17
|
-
memberLabel:
|
|
18
|
-
memberValue:
|
|
19
|
-
abnormalValue:
|
|
20
|
-
commentSection:
|
|
21
|
-
commentText:
|
|
22
|
-
nestedGroup:
|
|
23
|
-
nestedGroupLabel:
|
|
24
|
-
nestedGroupMembers:
|
|
25
|
-
},
|
|
26
|
-
const s = e.concept?.units, m = e.concept?.lowNormal, r = e.concept?.hiNormal, u = m != null, d = r != null, c = u && d ? ` (${m} - ${r})` : u ? ` (>${m})` : d ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() ===
|
|
1
|
+
import { jsx as n, jsxs as p, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { u as X, h as Z, w as ee, a as re, b as g, e as ae, i as oe, C as te, A as U, Y as ne, G as se, c as de, d as me, V as x, g as ie, f as y, K as le, U as ce, W as ue, q as pe } from "./index-BPwSmRKH.js";
|
|
3
|
+
import { useState as q, useMemo as N, useCallback as h } from "react";
|
|
4
|
+
const be = "_formsTableBody_1pd36_1", _e = "_customAccordianItem_1pd36_6", fe = "_formContent_1pd36_18", Ne = "_formDetailsContainer_1pd36_25", $e = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", he = "_rowContainer_1pd36_43", ye = "_groupLabel_1pd36_48", ve = "_rowLabel_1pd36_58", Ae = "_rowValue_1pd36_67", Ce = "_groupMembers_1pd36_75", Me = "_memberRow_1pd36_81", Te = "_memberLabel_1pd36_86", Le = "_memberValue_1pd36_94", De = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Fe = "_nestedGroup_1pd36_125", we = "_nestedGroupLabel_1pd36_132", Ie = "_nestedGroupMembers_1pd36_141", o = {
|
|
5
|
+
formsTableBody: be,
|
|
6
|
+
customAccordianItem: _e,
|
|
7
|
+
formContent: fe,
|
|
8
|
+
formDetailsContainer: Ne,
|
|
9
|
+
observation: $e,
|
|
10
|
+
groupContainer: ge,
|
|
11
|
+
rowContainer: he,
|
|
12
|
+
groupLabel: ye,
|
|
13
|
+
rowLabel: ve,
|
|
14
|
+
rowValue: Ae,
|
|
15
|
+
groupMembers: Ce,
|
|
16
|
+
memberRow: Me,
|
|
17
|
+
memberLabel: Te,
|
|
18
|
+
memberValue: Le,
|
|
19
|
+
abnormalValue: De,
|
|
20
|
+
commentSection: Oe,
|
|
21
|
+
commentText: Re,
|
|
22
|
+
nestedGroup: Fe,
|
|
23
|
+
nestedGroupLabel: we,
|
|
24
|
+
nestedGroupMembers: Ie
|
|
25
|
+
}, Ve = "ABNORMAL", K = (e) => {
|
|
26
|
+
const s = e.concept?.units, m = e.concept?.lowNormal, r = e.concept?.hiNormal, u = m != null, d = r != null, c = u && d ? ` (${m} - ${r})` : u ? ` (>${m})` : d ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() === Ve;
|
|
27
27
|
return { units: s, rangeString: c, isAbnormal: a };
|
|
28
28
|
}, k = ({
|
|
29
29
|
member: e,
|
|
@@ -39,7 +39,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
39
39
|
className: o.nestedGroup,
|
|
40
40
|
"data-testid": `${c}obs-nested-group-${d}-${m}`,
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ n(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
className: o.nestedGroupLabel,
|
|
@@ -48,17 +48,17 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
48
48
|
children: d
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ n(
|
|
52
52
|
"div",
|
|
53
53
|
{
|
|
54
54
|
className: o.nestedGroupMembers,
|
|
55
55
|
"data-testid": `${c}obs-nested-group-members-${d}-${m}`,
|
|
56
|
-
children: e.groupMembers?.map(($,
|
|
56
|
+
children: e.groupMembers?.map(($, v) => /* @__PURE__ */ n(
|
|
57
57
|
k,
|
|
58
58
|
{
|
|
59
59
|
member: $,
|
|
60
60
|
depth: s + 1,
|
|
61
|
-
memberIndex:
|
|
61
|
+
memberIndex: v,
|
|
62
62
|
formName: r
|
|
63
63
|
},
|
|
64
64
|
`${$.concept.uuid}`
|
|
@@ -68,7 +68,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
|
-
const { units: a, rangeString: b, isAbnormal: _ } =
|
|
71
|
+
const { units: a, rangeString: b, isAbnormal: _ } = K(e);
|
|
72
72
|
return /* @__PURE__ */ p(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
@@ -79,7 +79,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
79
79
|
/* @__PURE__ */ p(
|
|
80
80
|
"p",
|
|
81
81
|
{
|
|
82
|
-
className:
|
|
82
|
+
className: y(
|
|
83
83
|
o.memberLabel,
|
|
84
84
|
_ ? o.abnormalValue : ""
|
|
85
85
|
),
|
|
@@ -93,7 +93,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
93
93
|
/* @__PURE__ */ p(
|
|
94
94
|
"p",
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: y(
|
|
97
97
|
o.memberValue,
|
|
98
98
|
_ ? o.abnormalValue : ""
|
|
99
99
|
),
|
|
@@ -107,12 +107,12 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
107
107
|
]
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
},
|
|
110
|
+
}, Ee = ({
|
|
111
111
|
observation: e,
|
|
112
112
|
index: s,
|
|
113
113
|
formName: m = ""
|
|
114
114
|
}) => {
|
|
115
|
-
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: d, isAbnormal: c } =
|
|
115
|
+
const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: d, isAbnormal: c } = K(e), a = m ? `${m}-` : "";
|
|
116
116
|
return /* @__PURE__ */ p(
|
|
117
117
|
"div",
|
|
118
118
|
{
|
|
@@ -128,23 +128,23 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
128
128
|
/* @__PURE__ */ p(
|
|
129
129
|
"p",
|
|
130
130
|
{
|
|
131
|
-
className:
|
|
131
|
+
className: y(
|
|
132
132
|
r ? o.groupLabel : o.rowLabel,
|
|
133
133
|
!r && c ? o.abnormalValue : ""
|
|
134
134
|
),
|
|
135
135
|
"data-testid": `${a}observation-label-${e.conceptNameToDisplay}-${s}`,
|
|
136
136
|
children: [
|
|
137
137
|
e.conceptNameToDisplay,
|
|
138
|
-
!r && d && /* @__PURE__ */
|
|
138
|
+
!r && d && /* @__PURE__ */ n("span", { className: o.rangeInfo, children: d })
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
r ? /* @__PURE__ */
|
|
142
|
+
r ? /* @__PURE__ */ n(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
145
|
className: o.groupMembers,
|
|
146
146
|
"data-testid": `${a}observation-group-members-${e.conceptNameToDisplay}-${s}`,
|
|
147
|
-
children: e.groupMembers?.map((b, _) => /* @__PURE__ */
|
|
147
|
+
children: e.groupMembers?.map((b, _) => /* @__PURE__ */ n(
|
|
148
148
|
k,
|
|
149
149
|
{
|
|
150
150
|
member: b,
|
|
@@ -158,7 +158,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
158
158
|
) : /* @__PURE__ */ p(
|
|
159
159
|
"p",
|
|
160
160
|
{
|
|
161
|
-
className:
|
|
161
|
+
className: y(
|
|
162
162
|
o.rowValue,
|
|
163
163
|
c ? o.abnormalValue : ""
|
|
164
164
|
),
|
|
@@ -172,7 +172,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
172
172
|
]
|
|
173
173
|
}
|
|
174
174
|
),
|
|
175
|
-
e.comment && /* @__PURE__ */
|
|
175
|
+
e.comment && /* @__PURE__ */ n(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
178
|
className: o.commentSection,
|
|
@@ -187,74 +187,82 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
187
187
|
},
|
|
188
188
|
`${e.concept.uuid}-${s}`
|
|
189
189
|
);
|
|
190
|
-
},
|
|
190
|
+
}, xe = ({
|
|
191
191
|
episodeOfCareUuids: e,
|
|
192
192
|
encounterUuids: s,
|
|
193
193
|
config: m
|
|
194
194
|
}) => {
|
|
195
|
-
const { t: r } =
|
|
195
|
+
const { t: r } = X(), u = Z(), [d, c] = q(!1), [a, b] = q(null), _ = m?.numberOfVisits, $ = ee(
|
|
196
196
|
e,
|
|
197
197
|
s
|
|
198
|
-
), {
|
|
199
|
-
data:
|
|
200
|
-
isLoading:
|
|
201
|
-
isError:
|
|
202
|
-
error:
|
|
203
|
-
|
|
198
|
+
), v = re(), {
|
|
199
|
+
data: A = [],
|
|
200
|
+
isLoading: L,
|
|
201
|
+
isError: D,
|
|
202
|
+
error: j,
|
|
203
|
+
refetch: H
|
|
204
|
+
} = g({
|
|
204
205
|
queryKey: ["forms", u, e],
|
|
205
|
-
queryFn: () =>
|
|
206
|
+
queryFn: () => le(u, void 0, _),
|
|
206
207
|
enabled: !!u && !$
|
|
207
|
-
}),
|
|
208
|
-
(
|
|
209
|
-
), [
|
|
208
|
+
}), O = N(() => !s || s.length === 0 ? A : A.filter(
|
|
209
|
+
(t) => s.includes(t.encounterUuid)
|
|
210
|
+
), [A, s]), { data: R = [] } = g({
|
|
210
211
|
queryKey: ["observationForms"],
|
|
211
|
-
queryFn: () =>
|
|
212
|
-
}),
|
|
213
|
-
(
|
|
214
|
-
[
|
|
215
|
-
),
|
|
212
|
+
queryFn: () => ce()
|
|
213
|
+
}), F = h(
|
|
214
|
+
(t) => R.find((l) => l.name === t)?.uuid,
|
|
215
|
+
[R]
|
|
216
|
+
), C = N(() => {
|
|
216
217
|
if (a)
|
|
217
|
-
return
|
|
218
|
-
}, [a,
|
|
219
|
-
data:
|
|
220
|
-
isLoading:
|
|
221
|
-
error:
|
|
222
|
-
} =
|
|
223
|
-
queryKey: ["formMetadata",
|
|
224
|
-
queryFn: () =>
|
|
225
|
-
enabled: !!
|
|
218
|
+
return F(a.formName);
|
|
219
|
+
}, [a, F]), {
|
|
220
|
+
data: Se,
|
|
221
|
+
isLoading: P,
|
|
222
|
+
error: w
|
|
223
|
+
} = g({
|
|
224
|
+
queryKey: ["formMetadata", C],
|
|
225
|
+
queryFn: () => ue(C),
|
|
226
|
+
enabled: !!C && d
|
|
226
227
|
}), {
|
|
227
228
|
data: M,
|
|
228
|
-
isLoading:
|
|
229
|
-
error:
|
|
230
|
-
} =
|
|
229
|
+
isLoading: Q,
|
|
230
|
+
error: I
|
|
231
|
+
} = g({
|
|
231
232
|
queryKey: ["formsEncounter", a?.encounterUuid],
|
|
232
|
-
queryFn: () =>
|
|
233
|
+
queryFn: () => pe(a.encounterUuid, !0),
|
|
233
234
|
enabled: !!a?.encounterUuid && d
|
|
234
|
-
})
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
});
|
|
236
|
+
ae(
|
|
237
|
+
(t) => {
|
|
238
|
+
t.patientUUID === u && t.updatedConcepts.size > 0 && (H(), v.invalidateQueries({ queryKey: ["formsEncounter"] }));
|
|
239
|
+
},
|
|
240
|
+
[u]
|
|
241
|
+
);
|
|
242
|
+
const V = N(() => !M?.observations || !a?.formName ? [] : M.observations.filter(
|
|
243
|
+
(t) => "formFieldPath" in t && typeof t.formFieldPath == "string" && t.formFieldPath.includes(a.formName)
|
|
244
|
+
), [M?.observations, a?.formName]), E = N(
|
|
237
245
|
() => [
|
|
238
246
|
{ key: "recordedOn", header: r("FORM_RECORDED_ON") },
|
|
239
247
|
{ key: "recordedBy", header: r("FORM_RECORDED_BY") }
|
|
240
248
|
],
|
|
241
249
|
[r]
|
|
242
|
-
),
|
|
250
|
+
), Y = N(
|
|
243
251
|
() => [
|
|
244
252
|
{ key: "recordedOn", sortable: !0 },
|
|
245
253
|
{ key: "recordedBy", sortable: !0 }
|
|
246
254
|
],
|
|
247
255
|
[]
|
|
248
|
-
),
|
|
249
|
-
const
|
|
256
|
+
), S = N(() => {
|
|
257
|
+
const t = O.reduce(
|
|
250
258
|
(l, i) => {
|
|
251
259
|
const f = i.formName;
|
|
252
260
|
l[f] ??= [];
|
|
253
|
-
const T = i.providers.map((
|
|
261
|
+
const T = i.providers.map((W) => W.providerName).filter(Boolean).join(", ");
|
|
254
262
|
return l[f].push({
|
|
255
263
|
id: i.encounterUuid,
|
|
256
264
|
formName: i.formName,
|
|
257
|
-
recordedOn:
|
|
265
|
+
recordedOn: oe(i.encounterDateTime, r, ie).formattedResult,
|
|
258
266
|
recordedBy: T ?? "--",
|
|
259
267
|
encounterDateTime: i.encounterDateTime,
|
|
260
268
|
encounterUuid: i.encounterUuid
|
|
@@ -262,7 +270,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
262
270
|
},
|
|
263
271
|
{}
|
|
264
272
|
);
|
|
265
|
-
return Object.entries(
|
|
273
|
+
return Object.entries(t).map(
|
|
266
274
|
([l, i]) => ({
|
|
267
275
|
formName: l,
|
|
268
276
|
records: i.sort(
|
|
@@ -270,57 +278,57 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
270
278
|
)
|
|
271
279
|
})
|
|
272
280
|
).sort((l, i) => l.formName.localeCompare(i.formName));
|
|
273
|
-
}, [
|
|
274
|
-
b(
|
|
275
|
-
}, []),
|
|
281
|
+
}, [O, r]), B = h((t) => {
|
|
282
|
+
b(t), c(!0);
|
|
283
|
+
}, []), z = h(() => {
|
|
276
284
|
c(!1), b(null);
|
|
277
|
-
}, []),
|
|
278
|
-
(
|
|
285
|
+
}, []), G = h(
|
|
286
|
+
(t, l) => {
|
|
279
287
|
switch (l) {
|
|
280
288
|
case "recordedOn":
|
|
281
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ n(te, { onClick: () => B(t), children: t.recordedOn });
|
|
282
290
|
case "recordedBy":
|
|
283
|
-
return
|
|
291
|
+
return t.recordedBy;
|
|
284
292
|
default:
|
|
285
293
|
return null;
|
|
286
294
|
}
|
|
287
295
|
},
|
|
288
|
-
[
|
|
296
|
+
[B]
|
|
289
297
|
);
|
|
290
|
-
return /* @__PURE__ */ p(
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
298
|
+
return /* @__PURE__ */ p(J, { children: [
|
|
299
|
+
/* @__PURE__ */ n("div", { "data-testid": "forms-table", children: L || D || S.length === 0 || $ ? /* @__PURE__ */ n(
|
|
300
|
+
U,
|
|
293
301
|
{
|
|
294
|
-
headers:
|
|
302
|
+
headers: E,
|
|
295
303
|
ariaLabel: r("FORMS_HEADING"),
|
|
296
304
|
rows: [],
|
|
297
|
-
loading:
|
|
298
|
-
errorStateMessage:
|
|
305
|
+
loading: L,
|
|
306
|
+
errorStateMessage: D ? j?.message : void 0,
|
|
299
307
|
emptyStateMessage: r("FORMS_UNAVAILABLE"),
|
|
300
|
-
renderCell:
|
|
308
|
+
renderCell: G,
|
|
301
309
|
className: o.formsTableBody,
|
|
302
310
|
dataTestId: "forms-table"
|
|
303
311
|
}
|
|
304
|
-
) : /* @__PURE__ */
|
|
305
|
-
const { formName: i, records: f } =
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
|
|
312
|
+
) : /* @__PURE__ */ n(ne, { align: "start", children: S.map((t, l) => {
|
|
313
|
+
const { formName: i, records: f } = t;
|
|
314
|
+
return /* @__PURE__ */ n(
|
|
315
|
+
se,
|
|
308
316
|
{
|
|
309
317
|
title: i,
|
|
310
318
|
className: o.customAccordianItem,
|
|
311
319
|
testId: `accordian-title-${i}`,
|
|
312
320
|
open: l === 0,
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
-
|
|
321
|
+
children: /* @__PURE__ */ n(
|
|
322
|
+
U,
|
|
315
323
|
{
|
|
316
|
-
headers:
|
|
324
|
+
headers: E,
|
|
317
325
|
ariaLabel: r("FORMS_HEADING"),
|
|
318
326
|
rows: f,
|
|
319
327
|
loading: !1,
|
|
320
328
|
errorStateMessage: "",
|
|
321
|
-
sortable:
|
|
329
|
+
sortable: Y,
|
|
322
330
|
emptyStateMessage: r("FORMS_UNAVAILABLE"),
|
|
323
|
-
renderCell:
|
|
331
|
+
renderCell: G,
|
|
324
332
|
className: o.formsTableBody,
|
|
325
333
|
dataTestId: `forms-table-${i}`
|
|
326
334
|
}
|
|
@@ -329,30 +337,30 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
|
|
|
329
337
|
i
|
|
330
338
|
);
|
|
331
339
|
}) }) }),
|
|
332
|
-
d && a && /* @__PURE__ */
|
|
333
|
-
|
|
340
|
+
d && a && /* @__PURE__ */ n(
|
|
341
|
+
de,
|
|
334
342
|
{
|
|
335
343
|
id: "modalIdForActionAreaLayout",
|
|
336
344
|
open: d,
|
|
337
|
-
onRequestClose:
|
|
345
|
+
onRequestClose: z,
|
|
338
346
|
modalHeading: a.formName,
|
|
339
347
|
modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
|
|
340
348
|
passiveModal: !0,
|
|
341
349
|
size: "md",
|
|
342
350
|
testId: "form-details-modal",
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
-
|
|
351
|
+
children: /* @__PURE__ */ n("div", { className: o.formContent, children: P || Q ? /* @__PURE__ */ n(me, { width: "100%", lineCount: 3 }) : w ? /* @__PURE__ */ n("div", { children: x(w).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ n("div", { children: x(I).message ?? r("ERROR_FETCHING_FORM_DATA") }) : V.length > 0 ? /* @__PURE__ */ n("div", { className: o.formDetailsContainer, children: V.map((t, l) => /* @__PURE__ */ n(
|
|
352
|
+
Ee,
|
|
345
353
|
{
|
|
346
|
-
observation:
|
|
354
|
+
observation: t,
|
|
347
355
|
index: l,
|
|
348
356
|
formName: a.formName
|
|
349
357
|
},
|
|
350
|
-
`${
|
|
351
|
-
)) }) : /* @__PURE__ */
|
|
358
|
+
`${t.concept.uuid}`
|
|
359
|
+
)) }) : /* @__PURE__ */ n("div", { children: r("NO_FORM_DATA_AVAILABLE") }) })
|
|
352
360
|
}
|
|
353
361
|
)
|
|
354
362
|
] });
|
|
355
363
|
};
|
|
356
364
|
export {
|
|
357
|
-
|
|
365
|
+
xe as default
|
|
358
366
|
};
|
|
@@ -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-DM4vxIO7.js";
|
|
2
|
+
import { o as d, r as f, s as e } from "./index-BPwSmRKH.js";
|
|
3
|
+
var p = (a) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n =
|
|
6
|
+
}), n = d(), s = f(() => {
|
|
7
7
|
const t = r.theme_preference || l;
|
|
8
8
|
return t !== "system" ? t : n();
|
|
9
9
|
});
|
|
@@ -27,7 +27,7 @@ var f = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}, C =
|
|
30
|
+
}, C = p;
|
|
31
31
|
export {
|
|
32
32
|
C as default
|
|
33
33
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
1
|
+
import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DM4vxIO7.js";
|
|
2
|
+
import { o as v, r as C, s as e } from "./index-BPwSmRKH.js";
|
|
3
3
|
var h = (t) => {
|
|
4
|
-
const [r, o] =
|
|
4
|
+
const [r, o] = l({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), a = v(),
|
|
6
|
+
}), a = v(), s = C(() => {
|
|
7
7
|
const n = r.theme_preference || c;
|
|
8
8
|
return n !== "system" ? n : a();
|
|
9
9
|
});
|
|
@@ -16,7 +16,7 @@ var h = (t) => {
|
|
|
16
16
|
setLocalStore: o,
|
|
17
17
|
get children() {
|
|
18
18
|
return e(i.Provider, {
|
|
19
|
-
value:
|
|
19
|
+
value: s,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|
|
22
22
|
get children() {
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, p = h;
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
p as default
|
|
42
42
|
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { h as q, p as B, u as N, j as Q, k as x, b as H, e as K, l as M, Q as j, m as w, n as G, A as P, J as X, H as S, X as J, P as Y, L as z, M as W, x as Z, F as ee } from "./index-BPwSmRKH.js";
|
|
3
|
+
import { useRef as te, useEffect as T, useMemo as h } from "react";
|
|
4
|
+
const A = (t, d, i, l, s) => {
|
|
5
|
+
const a = J(t, d), r = a.value, o = Y(r);
|
|
6
|
+
let n = r;
|
|
7
|
+
o === "Image" && (n = /* @__PURE__ */ c(W, { imageSrc: r, alt: r, id: `${r}-img` })), o === "Video" && (n = /* @__PURE__ */ c(Z, { id: `${r}-video`, videoSrc: r }));
|
|
8
|
+
const b = s("OBSERVATIONS_RECORDED_BY", {
|
|
9
|
+
provider: a.provider
|
|
10
|
+
}), m = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", u = l ? `${l}-${v}-${m}-${i}-${d}` : `${v}-${m}-${i}-${d}`;
|
|
11
|
+
return /* @__PURE__ */ c(
|
|
12
|
+
z,
|
|
13
|
+
{
|
|
14
|
+
header: a.header,
|
|
15
|
+
value: n,
|
|
16
|
+
info: b,
|
|
17
|
+
id: u,
|
|
18
|
+
testId: u,
|
|
19
|
+
ariaLabel: u
|
|
20
|
+
},
|
|
21
|
+
`obs-${t.id}`
|
|
22
|
+
);
|
|
23
|
+
}, ae = (t, d, i, l, s, a) => /* @__PURE__ */ c(
|
|
24
|
+
S,
|
|
25
|
+
{
|
|
26
|
+
title: t.display,
|
|
27
|
+
id: `grouped-obs-${t.display}-${l}`,
|
|
28
|
+
open: i,
|
|
29
|
+
children: t.members?.map(
|
|
30
|
+
(r, o) => A(r, o, s, a, d)
|
|
31
|
+
)
|
|
32
|
+
},
|
|
33
|
+
`grouped-obs-${t.id}`
|
|
34
|
+
), se = ({
|
|
35
|
+
groupedData: t,
|
|
36
|
+
title: d = ""
|
|
37
|
+
}) => {
|
|
38
|
+
const { t: i } = N(), l = (s, a, r) => {
|
|
39
|
+
const o = X(s.encounterDetails, i);
|
|
40
|
+
return /* @__PURE__ */ I(
|
|
41
|
+
S,
|
|
42
|
+
{
|
|
43
|
+
title: o,
|
|
44
|
+
id: `encounter-${s.encounterId}`,
|
|
45
|
+
open: a,
|
|
46
|
+
children: [
|
|
47
|
+
s.observations.map(
|
|
48
|
+
(n, b) => A(n, b, r, d, i)
|
|
49
|
+
),
|
|
50
|
+
s.groupedObservations.map(
|
|
51
|
+
(n, b) => ae(
|
|
52
|
+
n,
|
|
53
|
+
i,
|
|
54
|
+
a,
|
|
55
|
+
b,
|
|
56
|
+
r,
|
|
57
|
+
d
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
`encounter-${s.encounterId}`
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ c(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
id: "obs-by-encounter",
|
|
69
|
+
"data-testid": "obs-by-encounter-test-id",
|
|
70
|
+
"aria-label": "obs-by-encounter-aria-label",
|
|
71
|
+
children: t.map(
|
|
72
|
+
(s, a) => l(s, a === 0, a)
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}, re = "_observations_kfbhq_1", oe = "_title_kfbhq_12", $ = {
|
|
77
|
+
observations: re,
|
|
78
|
+
title: oe
|
|
79
|
+
}, ie = (t) => ["conceptUuid", t], ne = (t, d) => ["observations", t, ...d], ce = ({ config: t }) => {
|
|
80
|
+
const d = t, { conceptNames: i = [], conceptUuid: l = [] } = d, s = te(/* @__PURE__ */ new Set()), a = q(), { addNotification: r } = B(), { t: o } = N(), n = Q({
|
|
81
|
+
queries: i.map((e) => ({
|
|
82
|
+
queryKey: ie(e),
|
|
83
|
+
queryFn: () => x(e),
|
|
84
|
+
enabled: !!e
|
|
85
|
+
}))
|
|
86
|
+
});
|
|
87
|
+
T(() => {
|
|
88
|
+
n.forEach((e, p) => {
|
|
89
|
+
if (e.isError && !s.current.has(p)) {
|
|
90
|
+
const V = i[p];
|
|
91
|
+
r({
|
|
92
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
93
|
+
message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
94
|
+
type: "error"
|
|
95
|
+
}), s.current.add(p);
|
|
96
|
+
} else e.isError || s.current.delete(p);
|
|
97
|
+
});
|
|
98
|
+
}, [n, i]);
|
|
99
|
+
const b = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), m = h(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
100
|
+
data: u,
|
|
101
|
+
isLoading: F,
|
|
102
|
+
isError: R,
|
|
103
|
+
refetch: g
|
|
104
|
+
} = H({
|
|
105
|
+
queryKey: ne(a, m),
|
|
106
|
+
queryFn: () => ee(a, m),
|
|
107
|
+
enabled: !!a && m.length > 0 && v
|
|
108
|
+
});
|
|
109
|
+
K(
|
|
110
|
+
(e) => {
|
|
111
|
+
e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
112
|
+
(p) => m.includes(p)
|
|
113
|
+
) && g();
|
|
114
|
+
},
|
|
115
|
+
[a, g]
|
|
116
|
+
), T(() => {
|
|
117
|
+
R && r({
|
|
118
|
+
title: o("ERROR_DEFAULT_TITLE"),
|
|
119
|
+
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
120
|
+
type: "error"
|
|
121
|
+
});
|
|
122
|
+
}, [R]);
|
|
123
|
+
const f = h(() => {
|
|
124
|
+
if (!u) return [];
|
|
125
|
+
const e = M(u), p = j(e);
|
|
126
|
+
return w(p);
|
|
127
|
+
}, [u]), L = [
|
|
128
|
+
{ key: "name", header: "name" },
|
|
129
|
+
{ key: "value", header: "value" },
|
|
130
|
+
{ key: "form", header: "form" }
|
|
131
|
+
], O = F || !v, _ = R && v, D = (!u || u.entry?.length === 0 || m.length === 0) && v, U = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, k = D ? o("NO_OBSERVATIONS_FOUND") : void 0, C = f.length > 0 && !O && !_, E = d.titleTranslationKey, y = E ? o(E) : "";
|
|
132
|
+
return /* @__PURE__ */ I(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
id: "observations",
|
|
136
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
137
|
+
"aria-label": "observations-aria-label",
|
|
138
|
+
className: $.observations,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ c(
|
|
141
|
+
G,
|
|
142
|
+
{
|
|
143
|
+
id: "observations-title",
|
|
144
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
145
|
+
title: y,
|
|
146
|
+
className: $.title,
|
|
147
|
+
children: /* @__PURE__ */ c("p", { children: y })
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
C ? /* @__PURE__ */ c(se, { groupedData: f, title: y }) : /* @__PURE__ */ c(
|
|
151
|
+
P,
|
|
152
|
+
{
|
|
153
|
+
headers: L,
|
|
154
|
+
rows: [],
|
|
155
|
+
ariaLabel: o("OBSERVATIONS"),
|
|
156
|
+
loading: O,
|
|
157
|
+
errorStateMessage: U,
|
|
158
|
+
emptyStateMessage: k,
|
|
159
|
+
dataTestId: "observations-table"
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
};
|
|
166
|
+
export {
|
|
167
|
+
ie as conceptUuidQueryKeys,
|
|
168
|
+
ce as default,
|
|
169
|
+
ne as observationsQueryKeys
|
|
170
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as we, v as z, y as xt, z as B, r as q, s as y, B as Ro, D as ye, S as R, E as _, I as k, N, O as A, R as bs, T as ir, Z as $e, _ as U, $ as Hn, a0 as Vn, a1 as dt, a2 as D, a3 as xs, a4 as cn, a5 as Be, a6 as ws, a7 as qt, a8 as zt, a9 as $s, aa as Cs, ab as $n, ac as Ss, ad as Nr, ae as Bt, af as zo, ag as ks, ah as Es, ai as j, aj as Ur, ak as Ms, al as Ds, am as sr, an as As, ao as Ts, ap as zn, aq as Fs, ar as Is, as as Z, at as Ps, au as Os } from "./index-BPwSmRKH.js";
|
|
2
2
|
var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA2CzC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAobnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|