@bahmni/clinical-app 0.0.1-dev.110 → 0.0.1-dev.111
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-DvQygCpm-DU5ePiaA.js → FormsTable-_SaCdgPn-CIHogBsE.js} +46 -46
- package/dist/{LNWAZHJI-DbMownaN.js → LNWAZHJI-Bd-QE2uY.js} +2 -2
- package/dist/{MWZ6AO7Z-BfeNGPBG.js → MWZ6AO7Z-f3gZE6ym.js} +2 -2
- package/dist/{Observations-DHohreqe-DGIi6QZy.js → Observations-DdD1GVgI-DQFa_iWz.js} +35 -35
- package/dist/{YPM2AS64-BGgRsB8q.js → YPM2AS64-BBCBmCB4.js} +1 -1
- package/dist/components/consultationPad/ConsultationPad.d.ts.map +1 -1
- package/dist/components/forms/conditionsAndDiagnoses/ConditionsAndDiagnoses.d.ts.map +1 -1
- package/dist/components/forms/medications/MedicationsForm.d.ts.map +1 -1
- package/dist/{index-BzD6Dx9A.js → index-COAEscDN.js} +25562 -25431
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +3 -1
- package/dist/locales/locale_es.json +3 -1
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as o, jsxs as p, Fragment as
|
|
2
|
-
import { u as Y, T as W, K as X, a as f,
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as p, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { u as Y, T as W, K as X, a as f, _ as Z, b as ee, e as I, c as re, O as ae, D as oe, d as ne, w as G, F as te, L as h, f as se, g as de, h as ie, i as me } from "./index-COAEscDN.js";
|
|
3
|
+
import { useState as x, useMemo as b, useCallback as g } from "react";
|
|
4
4
|
import { createPortal as le } from "react-dom";
|
|
5
|
-
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18",
|
|
5
|
+
const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", he = "_groupLabel_1pd36_48", Ne = "_rowLabel_1pd36_58", ye = "_rowValue_1pd36_67", ve = "_groupMembers_1pd36_75", Le = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Oe = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Ce = "_commentText_1pd36_116", Re = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Fe = "_nestedGroupMembers_1pd36_141", r = {
|
|
6
6
|
formsTableBody: ce,
|
|
7
7
|
customAccordianItem: ue,
|
|
8
8
|
formContent: pe,
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
9
|
+
formDetailsContainer: _e,
|
|
10
|
+
observation: be,
|
|
11
11
|
groupContainer: fe,
|
|
12
12
|
rowContainer: ge,
|
|
13
|
-
groupLabel:
|
|
14
|
-
rowLabel:
|
|
13
|
+
groupLabel: he,
|
|
14
|
+
rowLabel: Ne,
|
|
15
15
|
rowValue: ye,
|
|
16
16
|
groupMembers: ve,
|
|
17
17
|
memberRow: Le,
|
|
18
18
|
memberLabel: Me,
|
|
19
19
|
memberValue: Ae,
|
|
20
20
|
abnormalValue: Oe,
|
|
21
|
-
commentSection:
|
|
22
|
-
commentText:
|
|
23
|
-
nestedGroup:
|
|
21
|
+
commentSection: Te,
|
|
22
|
+
commentText: Ce,
|
|
23
|
+
nestedGroup: Re,
|
|
24
24
|
nestedGroupLabel: De,
|
|
25
25
|
nestedGroupMembers: Fe
|
|
26
|
-
}, we = "ABNORMAL",
|
|
26
|
+
}, we = "ABNORMAL", U = (e) => {
|
|
27
27
|
const i = e.concept?.units, m = e.concept?.lowNormal, a = e.concept?.hiNormal, l = m != null, c = a != null, u = l && c ? ` (${m} - ${a})` : l ? ` (>${m})` : c ? ` (<${a})` : "", t = e.interpretation && e.interpretation.toUpperCase() === we;
|
|
28
28
|
return { units: i, rangeString: u, isAbnormal: t };
|
|
29
|
-
},
|
|
29
|
+
}, k = ({
|
|
30
30
|
member: e,
|
|
31
31
|
depth: i = 0
|
|
32
32
|
}) => {
|
|
@@ -42,7 +42,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
44
|
/* @__PURE__ */ o("div", { className: r.nestedGroupMembers, children: e.groupMembers?.map((t) => /* @__PURE__ */ o(
|
|
45
|
-
|
|
45
|
+
k,
|
|
46
46
|
{
|
|
47
47
|
member: t,
|
|
48
48
|
depth: i + 1
|
|
@@ -50,7 +50,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
50
50
|
`${t.concept.uuid}`
|
|
51
51
|
)) })
|
|
52
52
|
] });
|
|
53
|
-
const { units: l, rangeString: c, isAbnormal: u } =
|
|
53
|
+
const { units: l, rangeString: c, isAbnormal: u } = U(e);
|
|
54
54
|
return /* @__PURE__ */ p(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
@@ -60,7 +60,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
60
60
|
/* @__PURE__ */ p(
|
|
61
61
|
"p",
|
|
62
62
|
{
|
|
63
|
-
className:
|
|
63
|
+
className: h(
|
|
64
64
|
r.memberLabel,
|
|
65
65
|
u ? r.abnormalValue : ""
|
|
66
66
|
),
|
|
@@ -73,7 +73,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
73
73
|
/* @__PURE__ */ p(
|
|
74
74
|
"p",
|
|
75
75
|
{
|
|
76
|
-
className:
|
|
76
|
+
className: h(
|
|
77
77
|
r.memberValue,
|
|
78
78
|
u ? r.abnormalValue : ""
|
|
79
79
|
),
|
|
@@ -90,7 +90,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
90
90
|
observation: e,
|
|
91
91
|
index: i
|
|
92
92
|
}) => {
|
|
93
|
-
const m = e.groupMembers && e.groupMembers.length > 0, { units: a, rangeString: l, isAbnormal: c } =
|
|
93
|
+
const m = e.groupMembers && e.groupMembers.length > 0, { units: a, rangeString: l, isAbnormal: c } = U(e);
|
|
94
94
|
return /* @__PURE__ */ p(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
@@ -104,7 +104,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
104
104
|
/* @__PURE__ */ p(
|
|
105
105
|
"p",
|
|
106
106
|
{
|
|
107
|
-
className:
|
|
107
|
+
className: h(
|
|
108
108
|
m ? r.groupLabel : r.rowLabel,
|
|
109
109
|
!m && c ? r.abnormalValue : ""
|
|
110
110
|
),
|
|
@@ -115,7 +115,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
115
115
|
}
|
|
116
116
|
),
|
|
117
117
|
m ? /* @__PURE__ */ o("div", { className: r.groupMembers, children: e.groupMembers?.map((u) => /* @__PURE__ */ o(
|
|
118
|
-
|
|
118
|
+
k,
|
|
119
119
|
{
|
|
120
120
|
member: u,
|
|
121
121
|
depth: 0
|
|
@@ -124,7 +124,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
124
124
|
)) }) : /* @__PURE__ */ p(
|
|
125
125
|
"p",
|
|
126
126
|
{
|
|
127
|
-
className:
|
|
127
|
+
className: h(
|
|
128
128
|
r.rowValue,
|
|
129
129
|
c ? r.abnormalValue : ""
|
|
130
130
|
),
|
|
@@ -150,27 +150,27 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
150
150
|
encounterUuids: i,
|
|
151
151
|
config: m
|
|
152
152
|
}) => {
|
|
153
|
-
const { t: a } = Y(), l = W(), [c, u] =
|
|
153
|
+
const { t: a } = Y(), l = W(), [c, u] = x(!1), [t, M] = x(null), q = m?.numberOfVisits, A = X(
|
|
154
154
|
e,
|
|
155
155
|
i
|
|
156
156
|
), {
|
|
157
|
-
data:
|
|
157
|
+
data: N = [],
|
|
158
158
|
isLoading: O,
|
|
159
|
-
isError:
|
|
159
|
+
isError: T,
|
|
160
160
|
error: K
|
|
161
161
|
} = f({
|
|
162
162
|
queryKey: ["forms", l, e],
|
|
163
|
-
queryFn: () => se(l, void 0,
|
|
163
|
+
queryFn: () => se(l, void 0, q),
|
|
164
164
|
enabled: !!l && !A
|
|
165
|
-
}),
|
|
165
|
+
}), C = b(() => !i || i.length === 0 ? N : N.filter(
|
|
166
166
|
(n) => i.includes(n.encounterUuid)
|
|
167
|
-
), [
|
|
167
|
+
), [N, i]), { data: R = [] } = f({
|
|
168
168
|
queryKey: ["observationForms"],
|
|
169
169
|
queryFn: de
|
|
170
170
|
}), D = g(
|
|
171
|
-
(n) =>
|
|
172
|
-
[
|
|
173
|
-
), y =
|
|
171
|
+
(n) => R.find((s) => s.name === n)?.uuid,
|
|
172
|
+
[R]
|
|
173
|
+
), y = b(() => {
|
|
174
174
|
if (t)
|
|
175
175
|
return D(t.formName);
|
|
176
176
|
}, [t, D]), {
|
|
@@ -189,27 +189,27 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
189
189
|
queryKey: ["formsEncounter", t?.encounterUuid],
|
|
190
190
|
queryFn: () => me(t.encounterUuid, !0),
|
|
191
191
|
enabled: !!t?.encounterUuid && c
|
|
192
|
-
}), B =
|
|
192
|
+
}), B = b(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
|
|
193
193
|
(n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(t.formName)
|
|
194
|
-
), [v?.observations, t?.formName]), E =
|
|
194
|
+
), [v?.observations, t?.formName]), E = b(
|
|
195
195
|
() => [
|
|
196
196
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
197
197
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
198
198
|
],
|
|
199
199
|
[a]
|
|
200
|
-
), J =
|
|
200
|
+
), J = b(
|
|
201
201
|
() => [
|
|
202
202
|
{ key: "recordedOn", sortable: !0 },
|
|
203
203
|
{ key: "recordedBy", sortable: !0 }
|
|
204
204
|
],
|
|
205
205
|
[]
|
|
206
|
-
), S =
|
|
207
|
-
const n =
|
|
206
|
+
), S = b(() => {
|
|
207
|
+
const n = C.reduce(
|
|
208
208
|
(s, d) => {
|
|
209
|
-
const
|
|
210
|
-
s[
|
|
211
|
-
const L = d.providers.map((
|
|
212
|
-
return s[
|
|
209
|
+
const _ = d.formName;
|
|
210
|
+
s[_] ??= [];
|
|
211
|
+
const L = d.providers.map((z) => z.providerName).filter(Boolean).join(", ");
|
|
212
|
+
return s[_].push({
|
|
213
213
|
id: d.encounterUuid,
|
|
214
214
|
formName: d.formName,
|
|
215
215
|
recordedOn: Z(d.encounterDateTime, a, te).formattedResult,
|
|
@@ -224,11 +224,11 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
224
224
|
([s, d]) => ({
|
|
225
225
|
formName: s,
|
|
226
226
|
records: d.sort(
|
|
227
|
-
(
|
|
227
|
+
(_, L) => L.encounterDateTime - _.encounterDateTime
|
|
228
228
|
)
|
|
229
229
|
})
|
|
230
230
|
).sort((s, d) => s.formName.localeCompare(d.formName));
|
|
231
|
-
}, [
|
|
231
|
+
}, [C, a]), V = g((n) => {
|
|
232
232
|
M(n), u(!0);
|
|
233
233
|
}, []), P = g(() => {
|
|
234
234
|
u(!1), M(null);
|
|
@@ -245,22 +245,22 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
245
245
|
},
|
|
246
246
|
[V]
|
|
247
247
|
);
|
|
248
|
-
return /* @__PURE__ */ p(
|
|
249
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O ||
|
|
248
|
+
return /* @__PURE__ */ p(Q, { children: [
|
|
249
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || T || S.length === 0 || A ? /* @__PURE__ */ o(
|
|
250
250
|
I,
|
|
251
251
|
{
|
|
252
252
|
headers: E,
|
|
253
253
|
ariaLabel: a("FORMS_HEADING"),
|
|
254
254
|
rows: [],
|
|
255
255
|
loading: O,
|
|
256
|
-
errorStateMessage:
|
|
256
|
+
errorStateMessage: T ? K?.message : void 0,
|
|
257
257
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
258
258
|
renderCell: $,
|
|
259
259
|
className: r.formsTableBody,
|
|
260
260
|
"data-testid": "sortable-data-table"
|
|
261
261
|
}
|
|
262
262
|
) : /* @__PURE__ */ o(re, { align: "start", children: S.map((n, s) => {
|
|
263
|
-
const { formName: d, records:
|
|
263
|
+
const { formName: d, records: _ } = n;
|
|
264
264
|
return /* @__PURE__ */ o(
|
|
265
265
|
ae,
|
|
266
266
|
{
|
|
@@ -273,7 +273,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
273
273
|
{
|
|
274
274
|
headers: E,
|
|
275
275
|
ariaLabel: a("FORMS_HEADING"),
|
|
276
|
-
rows:
|
|
276
|
+
rows: _,
|
|
277
277
|
loading: !1,
|
|
278
278
|
errorStateMessage: "",
|
|
279
279
|
sortable: J,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { J as d, M as f, N as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BBCBmCB4.js";
|
|
2
|
+
import { J as d, M as f, N as e } from "./index-COAEscDN.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { J as v, M as C, N as e } from "./index-
|
|
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-BBCBmCB4.js";
|
|
2
|
+
import { J as v, M as C, N as e } from "./index-COAEscDN.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as I, jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { S as
|
|
2
|
+
import { S as H, n as w, r as F, Q as D, j as J, k as P, l as K, m as z, o as G, p as j, q as W, s as T, t as C, v as X, x as Y, T as Z, y as ee, u as N, z as te, a as se, U as re, e as ne, A as ie, B as M, C as oe, E as ae, G as ue, H as ce, I as le } from "./index-COAEscDN.js";
|
|
3
3
|
import * as R from "react";
|
|
4
|
-
import { useRef as de, useEffect as
|
|
4
|
+
import { useRef as de, useEffect as Q, useMemo as S } from "react";
|
|
5
5
|
function _(e, t) {
|
|
6
6
|
const s = new Set(t);
|
|
7
7
|
return e.filter((r) => !s.has(r));
|
|
@@ -10,7 +10,7 @@ function he(e, t, s) {
|
|
|
10
10
|
const r = e.slice(0);
|
|
11
11
|
return r[t] = s, r;
|
|
12
12
|
}
|
|
13
|
-
var pe = class extends
|
|
13
|
+
var pe = class extends H {
|
|
14
14
|
#r;
|
|
15
15
|
#e;
|
|
16
16
|
#n;
|
|
@@ -177,14 +177,14 @@ function fe({
|
|
|
177
177
|
if (d) {
|
|
178
178
|
const O = new D(r, d);
|
|
179
179
|
if (T(d, c))
|
|
180
|
-
return
|
|
181
|
-
X(c, n) &&
|
|
180
|
+
return C(d, O, o);
|
|
181
|
+
X(c, n) && C(d, O, o);
|
|
182
182
|
}
|
|
183
183
|
return [];
|
|
184
184
|
}) : [];
|
|
185
185
|
if (E.length > 0)
|
|
186
186
|
throw Promise.all(E);
|
|
187
|
-
const
|
|
187
|
+
const y = u.find(
|
|
188
188
|
(c, h) => {
|
|
189
189
|
const d = a[h];
|
|
190
190
|
return d && Y({
|
|
@@ -196,11 +196,11 @@ function fe({
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
|
-
if (
|
|
200
|
-
throw
|
|
199
|
+
if (y?.error)
|
|
200
|
+
throw y.error;
|
|
201
201
|
return f(v());
|
|
202
202
|
}
|
|
203
|
-
const be = "normal", ve = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ge = "A",
|
|
203
|
+
const be = "normal", ve = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ge = "A", ye = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", me = (e, t) => e?.date ? ie(e.date, t).formattedResult : t("DATE_ERROR_PARSE"), Oe = (e) => {
|
|
204
204
|
const { value: t, unit: s } = e.observationValue;
|
|
205
205
|
return s ? `${t} ${s}` : String(t);
|
|
206
206
|
}, Re = (e) => {
|
|
@@ -230,7 +230,7 @@ const be = "normal", ve = "http://terminology.hl7.org/CodeSystem/referencerange-
|
|
|
230
230
|
function Se(e) {
|
|
231
231
|
return !e.interpretation || e.interpretation.length === 0 ? !1 : e.interpretation.some(
|
|
232
232
|
(t) => t.coding?.some(
|
|
233
|
-
(s) => s.system ===
|
|
233
|
+
(s) => s.system === ye && s.code === ge
|
|
234
234
|
)
|
|
235
235
|
);
|
|
236
236
|
}
|
|
@@ -286,9 +286,9 @@ function $e(e, t) {
|
|
|
286
286
|
location: s.location?.[0]?.location?.display
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function q(e, t, s) {
|
|
290
290
|
const r = $(e.encounter), n = (e.hasMember ?? []).map((o) => $(o)).map((o) => o ? s.get(o) : void 0).filter((o) => !!o).map(
|
|
291
|
-
(o) =>
|
|
291
|
+
(o) => q(o, t, s)
|
|
292
292
|
);
|
|
293
293
|
return {
|
|
294
294
|
id: e.id,
|
|
@@ -311,7 +311,7 @@ function Te(e) {
|
|
|
311
311
|
const n = [], o = [];
|
|
312
312
|
return s.forEach((a, i) => {
|
|
313
313
|
if (r.has(i)) return;
|
|
314
|
-
const u =
|
|
314
|
+
const u = q(
|
|
315
315
|
a,
|
|
316
316
|
t,
|
|
317
317
|
s
|
|
@@ -319,7 +319,7 @@ function Te(e) {
|
|
|
319
319
|
u.members?.length ? o.push({ ...u, children: u.members }) : n.push(u);
|
|
320
320
|
}), { observations: n, groupedObservations: o };
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Ce(e) {
|
|
323
323
|
const t = /* @__PURE__ */ new Map();
|
|
324
324
|
return e.observations.forEach((s) => {
|
|
325
325
|
if (!s.encounter?.id) return;
|
|
@@ -345,7 +345,7 @@ function Qe(e) {
|
|
|
345
345
|
};
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Qe(e) {
|
|
349
349
|
return [...e].sort((t, s) => {
|
|
350
350
|
const r = t.encounterDetails?.date, n = s.encounterDetails?.date;
|
|
351
351
|
return !r && !n ? 0 : r ? n ? new Date(n).getTime() - new Date(r).getTime() : -1 : 1;
|
|
@@ -371,7 +371,7 @@ const k = (e, t, s) => {
|
|
|
371
371
|
`obs-${e.id}`
|
|
372
372
|
);
|
|
373
373
|
}, _e = (e, t, s) => /* @__PURE__ */ p(
|
|
374
|
-
|
|
374
|
+
M,
|
|
375
375
|
{
|
|
376
376
|
title: e.display,
|
|
377
377
|
id: `grouped-obs-${e.id}`,
|
|
@@ -385,9 +385,9 @@ const k = (e, t, s) => {
|
|
|
385
385
|
groupedData: e
|
|
386
386
|
}) => {
|
|
387
387
|
const { t } = N(), s = (r, n) => {
|
|
388
|
-
const o =
|
|
388
|
+
const o = me(r.encounterDetails, t);
|
|
389
389
|
return /* @__PURE__ */ I(
|
|
390
|
-
|
|
390
|
+
M,
|
|
391
391
|
{
|
|
392
392
|
title: o,
|
|
393
393
|
id: `encounter-${r.encounterId}`,
|
|
@@ -418,7 +418,7 @@ const k = (e, t, s) => {
|
|
|
418
418
|
}, Ie = "_observations_kfbhq_1", De = "_title_kfbhq_12", A = {
|
|
419
419
|
observations: Ie,
|
|
420
420
|
title: De
|
|
421
|
-
}, Ne = (e) => ["conceptUuid", e],
|
|
421
|
+
}, Ne = (e) => ["conceptUuid", e], Me = (e, t) => ["observations", e, ...t], Le = ({ config: e }) => {
|
|
422
422
|
const t = e, { conceptNames: s = [], conceptUuid: r = [] } = t, n = de(/* @__PURE__ */ new Set()), o = Z(), { addNotification: a } = ee(), { t: i } = N(), u = fe({
|
|
423
423
|
queries: s.map((l) => ({
|
|
424
424
|
queryKey: Ne(l),
|
|
@@ -426,43 +426,43 @@ const k = (e, t, s) => {
|
|
|
426
426
|
enabled: !!l
|
|
427
427
|
}))
|
|
428
428
|
});
|
|
429
|
-
|
|
430
|
-
u.forEach((l,
|
|
431
|
-
if (l.isError && !n.current.has(
|
|
432
|
-
const
|
|
429
|
+
Q(() => {
|
|
430
|
+
u.forEach((l, m) => {
|
|
431
|
+
if (l.isError && !n.current.has(m)) {
|
|
432
|
+
const U = s[m];
|
|
433
433
|
a({
|
|
434
434
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
435
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
435
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: U }),
|
|
436
436
|
type: "error"
|
|
437
|
-
}), n.current.add(
|
|
438
|
-
} else l.isError || n.current.delete(
|
|
437
|
+
}), n.current.add(m);
|
|
438
|
+
} else l.isError || n.current.delete(m);
|
|
439
439
|
});
|
|
440
440
|
}, [u, s]);
|
|
441
441
|
const f = S(() => u.map((l) => l.data?.uuid).filter((l) => !!l), [u]), v = S(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), b = S(() => s.length === 0 ? !0 : u.every((l) => !l.isLoading), [u, s.length]), {
|
|
442
442
|
data: g,
|
|
443
443
|
isLoading: E,
|
|
444
|
-
isError:
|
|
444
|
+
isError: y
|
|
445
445
|
} = se({
|
|
446
|
-
queryKey:
|
|
446
|
+
queryKey: Me(o, v),
|
|
447
447
|
queryFn: () => le(o, v),
|
|
448
448
|
enabled: !!o && v.length > 0 && b
|
|
449
449
|
});
|
|
450
|
-
|
|
451
|
-
|
|
450
|
+
Q(() => {
|
|
451
|
+
y && a({
|
|
452
452
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
453
453
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
454
454
|
type: "error"
|
|
455
455
|
});
|
|
456
|
-
}, [
|
|
456
|
+
}, [y]);
|
|
457
457
|
const c = S(() => {
|
|
458
458
|
if (!g) return [];
|
|
459
|
-
const l = Te(g),
|
|
460
|
-
return
|
|
459
|
+
const l = Te(g), m = Ce(l);
|
|
460
|
+
return Qe(m);
|
|
461
461
|
}, [g]), h = [
|
|
462
462
|
{ key: "name", header: "name" },
|
|
463
463
|
{ key: "value", header: "value" },
|
|
464
464
|
{ key: "form", header: "form" }
|
|
465
|
-
], d = E || !b, O =
|
|
465
|
+
], d = E || !b, O = y && b, x = (!g || g.entry?.length === 0 || v.length === 0) && b, L = O ? i("ERROR_FETCHING_OBSERVATIONS") : null, V = x ? i("NO_OBSERVATIONS_FOUND") : void 0, B = c.length > 0 && !d && !O;
|
|
466
466
|
return /* @__PURE__ */ I(
|
|
467
467
|
"div",
|
|
468
468
|
{
|
|
@@ -499,5 +499,5 @@ const k = (e, t, s) => {
|
|
|
499
499
|
export {
|
|
500
500
|
Ne as conceptUuidQueryKeys,
|
|
501
501
|
Le as default,
|
|
502
|
-
|
|
502
|
+
Me as observationsQueryKeys
|
|
503
503
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as we,
|
|
1
|
+
import { P as we, R as z, V as xt, W as B, M as q, N as y, X as Ro, Y as ye, Z as R, $ as _, a0 as k, a1 as N, a2 as A, a3 as bs, a4 as ir, a5 as $e, a6 as U, a7 as Hn, a8 as Vn, a9 as dt, aa as D, ab as xs, ac as cn, ad as Be, ae as ws, af as qt, ag as zt, ah as $s, ai as Cs, aj as $n, ak as Ss, al as Nr, am as Bt, an as zo, ao as ks, ap as Es, aq as j, ar as Ur, as as Ms, at as Ds, au as sr, av as As, aw as Ts, ax as zn, ay as Fs, az as Is, aA as Z, aB as Ps, aC as Ls } from "./index-COAEscDN.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":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAyCzC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAyCzC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuZnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionsAndDiagnoses.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/conditionsAndDiagnoses/ConditionsAndDiagnoses.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConditionsAndDiagnoses.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/conditionsAndDiagnoses/ConditionsAndDiagnoses.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAOzE;;;;;GAKG;AACH,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EA8PlC,CAAC;AAIH,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MedicationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/MedicationsForm.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAoC,MAAM,OAAO,CAAC;AASzD;;;;;GAKG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"MedicationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/MedicationsForm.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAoC,MAAM,OAAO,CAAC;AASzD;;;;;GAKG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EA2K3B,CAAC;AAIH,eAAe,eAAe,CAAC"}
|