@bahmni/clinical-app 0.0.1-dev.238 → 0.0.1-dev.240
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-1XgzVmNY-pAKW3wlm.js → DocumentsTable-widaz7Rd-Ds9KJKbo.js} +16 -16
- package/dist/{FormsTable-B0J51cB5-DoDiPd9g.js → FormsTable-Ni6XE26b-DH4NQEtJ.js} +65 -65
- package/dist/{LNWAZHJI-BGPWTeBy.js → LNWAZHJI-y0zYo95G.js} +4 -4
- package/dist/{MWZ6AO7Z-BK47FBdU.js → MWZ6AO7Z-C5tp5PK9.js} +5 -5
- package/dist/{Observations-Cqov9775-C9oJ0PjW.js → Observations-BgucPoyM-BfyShCxF.js} +36 -36
- package/dist/{YPM2AS64-BVtxMn8q.js → YPM2AS64-BomtUj-Q.js} +1 -1
- package/dist/components/consultationPad/index.d.ts +2 -1
- package/dist/components/consultationPad/index.d.ts.map +1 -1
- package/dist/components/consultationPad/utils.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/ImmunizationHistoryForm.d.ts +6 -1
- package/dist/components/forms/immunizationHistory/ImmunizationHistoryForm.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/__tests__/__mocks__/immunizationHistoryMocks.d.ts +40 -1
- package/dist/components/forms/immunizationHistory/__tests__/__mocks__/immunizationHistoryMocks.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/components/SelectedImmunizationItem.d.ts +2 -1
- package/dist/components/forms/immunizationHistory/components/SelectedImmunizationItem.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/constants.d.ts +2 -0
- package/dist/components/forms/immunizationHistory/constants.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/index.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/models.d.ts +8 -0
- package/dist/components/forms/immunizationHistory/models.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/stores.d.ts +6 -2
- package/dist/components/forms/immunizationHistory/stores.d.ts.map +1 -1
- package/dist/components/forms/immunizationHistory/utils.d.ts +23 -1
- package/dist/components/forms/immunizationHistory/utils.d.ts.map +1 -1
- package/dist/components/forms/models.d.ts +7 -1
- package/dist/components/forms/models.d.ts.map +1 -1
- package/dist/components/forms/renderer.d.ts +2 -0
- package/dist/components/forms/renderer.d.ts.map +1 -1
- package/dist/events/startConsultation/event.d.ts +2 -2
- package/dist/events/startConsultation/event.d.ts.map +1 -1
- package/dist/events/startConsultation/hooks.d.ts +2 -2
- package/dist/events/startConsultation/hooks.d.ts.map +1 -1
- package/dist/events/startConsultation/index.d.ts +1 -1
- package/dist/events/startConsultation/index.d.ts.map +1 -1
- package/dist/events/startConsultation/models.d.ts +2 -1
- package/dist/events/startConsultation/models.d.ts.map +1 -1
- package/dist/{index-BnWoPA5n.js → index-BhdY2NuI.js} +117158 -99486
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/dist/providers/clinicalConfig/schema.json.d.ts +5 -1
- package/dist/stores/__tests__/__mocks__/consultationEventStoreMocks.d.ts +3 -0
- package/dist/stores/__tests__/__mocks__/consultationEventStoreMocks.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te, e as ae } from "./index-BhdY2NuI.js";
|
|
3
3
|
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
4
4
|
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 = {
|
|
5
5
|
documentsTableBody: ne,
|
|
@@ -33,15 +33,15 @@ const _e = [
|
|
|
33
33
|
"uploadedBy",
|
|
34
34
|
"action"
|
|
35
35
|
], 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 }] : [], Ee = ({ config: a, encounterUuids: g }) => {
|
|
36
|
-
const [s,
|
|
36
|
+
const [s, S] = l(!1), [o, L] = l(
|
|
37
37
|
null
|
|
38
38
|
), [R, I] = l(
|
|
39
39
|
/* @__PURE__ */ new Set()
|
|
40
|
-
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m,
|
|
41
|
-
L(e),
|
|
40
|
+
), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), b = h((e) => {
|
|
41
|
+
L(e), S(!0);
|
|
42
42
|
}, []), F = h(() => {
|
|
43
|
-
|
|
44
|
-
}, []),
|
|
43
|
+
S(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
44
|
+
}, []), M = h((e) => {
|
|
45
45
|
I((t) => new Set(t).add(e));
|
|
46
46
|
}, []), { data: u, isLoading: H, isError: D, error: v } = J({
|
|
47
47
|
queryKey: [
|
|
@@ -75,9 +75,9 @@ const _e = [
|
|
|
75
75
|
if (!s || !o) return;
|
|
76
76
|
const t = /* @__PURE__ */ new Set(), c = B(o);
|
|
77
77
|
for (let i = 0; i < c.length; i++) {
|
|
78
|
-
const
|
|
78
|
+
const w = j(c[i].url);
|
|
79
79
|
try {
|
|
80
|
-
(await fetch(
|
|
80
|
+
(await fetch(w, {
|
|
81
81
|
method: "HEAD",
|
|
82
82
|
signal: e.signal
|
|
83
83
|
})).ok || t.add(i);
|
|
@@ -90,7 +90,7 @@ const _e = [
|
|
|
90
90
|
}, [s, o]);
|
|
91
91
|
const q = h(
|
|
92
92
|
(e, t) => {
|
|
93
|
-
t !== m ? (
|
|
93
|
+
t !== m ? (k(t), A(1), y(void 0)) : A(e);
|
|
94
94
|
},
|
|
95
95
|
[m]
|
|
96
96
|
), N = T(
|
|
@@ -124,7 +124,7 @@ const _e = [
|
|
|
124
124
|
return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
|
|
125
125
|
X,
|
|
126
126
|
{
|
|
127
|
-
onClick: () =>
|
|
127
|
+
onClick: () => b(e),
|
|
128
128
|
className: d.viewAttachmentsLink,
|
|
129
129
|
"data-testid": `view-attachments-${e.id}`,
|
|
130
130
|
children: n("DOCUMENTS_VIEW_ATTACHMENTS")
|
|
@@ -134,7 +134,7 @@ const _e = [
|
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
-
[
|
|
137
|
+
[b, n]
|
|
138
138
|
);
|
|
139
139
|
return /* @__PURE__ */ p(Y, { children: [
|
|
140
140
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
@@ -151,7 +151,7 @@ const _e = [
|
|
|
151
151
|
className: d.documentsTableBody,
|
|
152
152
|
dataTestId: "documents-table",
|
|
153
153
|
pageSize: m,
|
|
154
|
-
totalItems:
|
|
154
|
+
totalItems: V,
|
|
155
155
|
page: C,
|
|
156
156
|
onPageChange: q
|
|
157
157
|
}
|
|
@@ -168,7 +168,7 @@ const _e = [
|
|
|
168
168
|
size: "lg",
|
|
169
169
|
testId: "document-view-modal",
|
|
170
170
|
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: _.map((e, t) => {
|
|
171
|
-
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"),
|
|
171
|
+
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = R.has(t);
|
|
172
172
|
return c === "#" || O ? /* @__PURE__ */ p(
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
@@ -195,13 +195,13 @@ const _e = [
|
|
|
195
195
|
"/",
|
|
196
196
|
_.length
|
|
197
197
|
] }),
|
|
198
|
-
|
|
198
|
+
w ? /* @__PURE__ */ r(
|
|
199
199
|
"img",
|
|
200
200
|
{
|
|
201
201
|
src: c,
|
|
202
202
|
alt: o.documentIdentifier,
|
|
203
203
|
className: d.documentImage,
|
|
204
|
-
onError: () =>
|
|
204
|
+
onError: () => M(t)
|
|
205
205
|
}
|
|
206
206
|
) : /* @__PURE__ */ r(
|
|
207
207
|
"iframe",
|
|
@@ -209,7 +209,7 @@ const _e = [
|
|
|
209
209
|
src: i ? `${c}#toolbar=0` : c,
|
|
210
210
|
className: d.documentIframe,
|
|
211
211
|
title: o.documentIdentifier,
|
|
212
|
-
onError: () =>
|
|
212
|
+
onError: () => M(t)
|
|
213
213
|
}
|
|
214
214
|
)
|
|
215
215
|
]
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { u as Z,
|
|
1
|
+
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { u as Z, c as ee, f as re, g as ae, a as c, Q as te, N as U, m as oe, l as se, b as S, x as ne, h as de, w as ie, $ as ue, o as me, i as le, s as ce, j as fe, k as ye } from "./index-BhdY2NuI.js";
|
|
3
3
|
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
4
|
-
const
|
|
5
|
-
formsTableBody:
|
|
6
|
-
customAccordianItem:
|
|
7
|
-
}, Ne = (
|
|
8
|
-
(n) => n.url ===
|
|
9
|
-
)?.valueString : void 0,
|
|
10
|
-
episodeOfCareUuids:
|
|
4
|
+
const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
|
|
5
|
+
formsTableBody: pe,
|
|
6
|
+
customAccordianItem: be
|
|
7
|
+
}, Ne = (u) => u ? u.extension?.find(
|
|
8
|
+
(n) => n.url === me
|
|
9
|
+
)?.valueString : void 0, Ae = ({
|
|
10
|
+
episodeOfCareUuids: u,
|
|
11
11
|
encounterUuids: n,
|
|
12
12
|
config: C
|
|
13
13
|
}) => {
|
|
14
|
-
const { t: o } = Z(),
|
|
15
|
-
|
|
14
|
+
const { t: o } = Z(), m = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: k, hideThumbnail: x = !1 } = C ?? {}, T = re(
|
|
15
|
+
u,
|
|
16
16
|
n
|
|
17
|
-
),
|
|
17
|
+
), $ = ae(), {
|
|
18
18
|
data: y = [],
|
|
19
|
-
isLoading:
|
|
20
|
-
isError:
|
|
21
|
-
error:
|
|
22
|
-
refetch:
|
|
19
|
+
isLoading: B,
|
|
20
|
+
isError: E,
|
|
21
|
+
error: j,
|
|
22
|
+
refetch: H
|
|
23
23
|
} = c({
|
|
24
|
-
queryKey: ["forms",
|
|
25
|
-
queryFn: () => le(
|
|
26
|
-
enabled: !!
|
|
27
|
-
}),
|
|
24
|
+
queryKey: ["forms", m, u],
|
|
25
|
+
queryFn: () => le(m, void 0, k),
|
|
26
|
+
enabled: !!m && !T
|
|
27
|
+
}), _ = d(() => !n || n.length === 0 ? y : y.filter(
|
|
28
28
|
(e) => n.includes(e.encounterUuid)
|
|
29
|
-
), [y, n]), { data:
|
|
29
|
+
), [y, n]), { data: D = [] } = c({
|
|
30
30
|
queryKey: ["observationForms"],
|
|
31
31
|
queryFn: () => ce()
|
|
32
|
-
}),
|
|
33
|
-
(e) =>
|
|
34
|
-
[
|
|
35
|
-
),
|
|
32
|
+
}), F = f(
|
|
33
|
+
(e) => D.find((r) => r.name === e)?.uuid,
|
|
34
|
+
[D]
|
|
35
|
+
), p = d(() => {
|
|
36
36
|
if (t)
|
|
37
|
-
return
|
|
38
|
-
}, [t,
|
|
39
|
-
isLoading:
|
|
40
|
-
isError:
|
|
41
|
-
error:
|
|
37
|
+
return F(t.formName);
|
|
38
|
+
}, [t, F]), {
|
|
39
|
+
isLoading: K,
|
|
40
|
+
isError: Q,
|
|
41
|
+
error: b
|
|
42
42
|
} = c({
|
|
43
|
-
queryKey: ["formMetadata",
|
|
44
|
-
queryFn: () => fe(
|
|
45
|
-
enabled: !!
|
|
43
|
+
queryKey: ["formMetadata", p],
|
|
44
|
+
queryFn: () => fe(p),
|
|
45
|
+
enabled: !!p && l
|
|
46
46
|
}), {
|
|
47
47
|
data: N,
|
|
48
|
-
isLoading:
|
|
49
|
-
isError:
|
|
50
|
-
error:
|
|
48
|
+
isLoading: w,
|
|
49
|
+
isError: V,
|
|
50
|
+
error: g
|
|
51
51
|
} = c({
|
|
52
52
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
53
53
|
queryFn: () => ye(t.encounterUuid),
|
|
@@ -55,19 +55,19 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
55
55
|
});
|
|
56
56
|
te(
|
|
57
57
|
(e) => {
|
|
58
|
-
e.patientUUID ===
|
|
58
|
+
e.patientUUID === m && e.updatedConcepts.size > 0 && (H(), $.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
59
59
|
},
|
|
60
|
-
[
|
|
60
|
+
[m]
|
|
61
61
|
);
|
|
62
62
|
const z = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
|
|
63
63
|
const r = Ne(e);
|
|
64
64
|
return !r || r.includes(t.formName);
|
|
65
65
|
}), [N, t?.formName]), G = d(() => {
|
|
66
|
+
if (b)
|
|
67
|
+
return U(b).message;
|
|
66
68
|
if (g)
|
|
67
69
|
return U(g).message;
|
|
68
|
-
|
|
69
|
-
return U(p).message;
|
|
70
|
-
}, [g, p]), L = d(
|
|
70
|
+
}, [b, g]), L = d(
|
|
71
71
|
() => [
|
|
72
72
|
{ key: "recordedOn", header: o("RECORDED_ON") },
|
|
73
73
|
{ key: "recordedBy", header: o("RECORDED_BY") }
|
|
@@ -80,11 +80,11 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
80
80
|
],
|
|
81
81
|
[]
|
|
82
82
|
), M = d(() => {
|
|
83
|
-
const e =
|
|
83
|
+
const e = _.reduce(
|
|
84
84
|
(r, a) => {
|
|
85
85
|
const i = a.formName;
|
|
86
86
|
r[i] ??= [];
|
|
87
|
-
const h = a.providers.map((
|
|
87
|
+
const h = a.providers.map((J) => J.providerName).filter(Boolean).join(", ");
|
|
88
88
|
return r[i].push({
|
|
89
89
|
id: a.encounterUuid,
|
|
90
90
|
formName: a.formName,
|
|
@@ -104,35 +104,35 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
104
104
|
)
|
|
105
105
|
})
|
|
106
106
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
107
|
-
}, [
|
|
108
|
-
|
|
109
|
-
}, []),
|
|
110
|
-
|
|
111
|
-
}, []),
|
|
107
|
+
}, [_, o]), R = f((e) => {
|
|
108
|
+
I(e), A(!0);
|
|
109
|
+
}, []), Y = f(() => {
|
|
110
|
+
A(!1), I(null);
|
|
111
|
+
}, []), v = f(
|
|
112
112
|
(e, r) => {
|
|
113
113
|
switch (r) {
|
|
114
114
|
case "recordedOn":
|
|
115
|
-
return /* @__PURE__ */ s(se, { onClick: () =>
|
|
115
|
+
return /* @__PURE__ */ s(se, { onClick: () => R(e), children: e.recordedOn });
|
|
116
116
|
case "recordedBy":
|
|
117
117
|
return e.recordedBy;
|
|
118
118
|
default:
|
|
119
119
|
return null;
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
-
[
|
|
122
|
+
[R]
|
|
123
123
|
);
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children:
|
|
124
|
+
return /* @__PURE__ */ W(X, { children: [
|
|
125
|
+
/* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || M.length === 0 || T ? /* @__PURE__ */ s(
|
|
126
126
|
S,
|
|
127
127
|
{
|
|
128
128
|
headers: L,
|
|
129
129
|
ariaLabel: o("FORMS_HEADING"),
|
|
130
130
|
rows: [],
|
|
131
|
-
loading:
|
|
132
|
-
errorStateMessage:
|
|
131
|
+
loading: B,
|
|
132
|
+
errorStateMessage: E ? j?.message : void 0,
|
|
133
133
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
134
|
-
renderCell:
|
|
135
|
-
className:
|
|
134
|
+
renderCell: v,
|
|
135
|
+
className: O.formsTableBody,
|
|
136
136
|
dataTestId: "forms-table"
|
|
137
137
|
}
|
|
138
138
|
) : /* @__PURE__ */ s(ne, { align: "start", children: M.map((e, r) => {
|
|
@@ -141,7 +141,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
141
141
|
de,
|
|
142
142
|
{
|
|
143
143
|
title: a,
|
|
144
|
-
className:
|
|
144
|
+
className: O.customAccordianItem,
|
|
145
145
|
testId: `accordian-title-${a}`,
|
|
146
146
|
open: r === 0,
|
|
147
147
|
children: /* @__PURE__ */ s(
|
|
@@ -154,8 +154,8 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
154
154
|
errorStateMessage: "",
|
|
155
155
|
sortable: P,
|
|
156
156
|
emptyStateMessage: o("FORMS_UNAVAILABLE"),
|
|
157
|
-
renderCell:
|
|
158
|
-
className:
|
|
157
|
+
renderCell: v,
|
|
158
|
+
className: O.formsTableBody,
|
|
159
159
|
dataTestId: `forms-table-${a}`
|
|
160
160
|
}
|
|
161
161
|
)
|
|
@@ -169,22 +169,22 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
169
169
|
id: "modalIdForActionAreaLayout",
|
|
170
170
|
portalId: "main-display-area",
|
|
171
171
|
open: l,
|
|
172
|
-
onRequestClose:
|
|
172
|
+
onRequestClose: Y,
|
|
173
173
|
modalHeading: t.formName,
|
|
174
174
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
175
175
|
passiveModal: !0,
|
|
176
176
|
size: "md",
|
|
177
177
|
testId: "form-details-modal",
|
|
178
178
|
children: /* @__PURE__ */ s(
|
|
179
|
-
|
|
179
|
+
ue,
|
|
180
180
|
{
|
|
181
181
|
observations: z,
|
|
182
|
-
isLoading:
|
|
183
|
-
isError:
|
|
182
|
+
isLoading: K || w,
|
|
183
|
+
isError: Q || V,
|
|
184
184
|
errorMessage: G,
|
|
185
185
|
emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
|
|
186
186
|
testIdPrefix: t.formName,
|
|
187
|
-
hideThumbnail:
|
|
187
|
+
hideThumbnail: x
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
}
|
|
@@ -192,5 +192,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
|
|
|
192
192
|
] });
|
|
193
193
|
};
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
Ae as default
|
|
196
196
|
};
|
|
@@ -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 {
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BomtUj-Q.js";
|
|
2
|
+
import { E as d, F as f, G as e } from "./index-BhdY2NuI.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -27,7 +27,7 @@ var p = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
},
|
|
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 s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-BomtUj-Q.js";
|
|
2
|
+
import { E as v, F as C, G as e } from "./index-BhdY2NuI.js";
|
|
3
3
|
var h = (t) => {
|
|
4
|
-
const [r, o] =
|
|
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
|
});
|
|
@@ -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: l,
|
|
20
20
|
get children() {
|
|
21
21
|
return e(m, {
|
|
22
22
|
get children() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as k, d as Q, u as N, n as H, p as K, a as w, Q as x, q as G, r as M, t as X, H as j, b as z, v as P, Z as D, y as Z, z as Y, R as J, A as W, B as ee, C as ae, D as te } from "./index-BhdY2NuI.js";
|
|
3
|
+
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
4
4
|
const A = (a, n, d, l, b, r) => {
|
|
5
|
-
const t =
|
|
5
|
+
const t = Z(a, n, b), s = t.value, i = Y(s);
|
|
6
6
|
let o = s;
|
|
7
7
|
i === "Image" && (o = /* @__PURE__ */ u(
|
|
8
|
-
|
|
8
|
+
W,
|
|
9
9
|
{
|
|
10
10
|
imageSrc: s,
|
|
11
11
|
alt: s,
|
|
@@ -24,7 +24,7 @@ const A = (a, n, d, l, b, r) => {
|
|
|
24
24
|
provider: t.provider
|
|
25
25
|
}), m = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
|
|
26
26
|
return /* @__PURE__ */ u(
|
|
27
|
-
|
|
27
|
+
J,
|
|
28
28
|
{
|
|
29
29
|
header: t.header,
|
|
30
30
|
value: o,
|
|
@@ -36,7 +36,7 @@ const A = (a, n, d, l, b, r) => {
|
|
|
36
36
|
`obs-${a.id}`
|
|
37
37
|
);
|
|
38
38
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
39
|
-
|
|
39
|
+
D,
|
|
40
40
|
{
|
|
41
41
|
title: a.display,
|
|
42
42
|
id: `grouped-obs-${a.display}-${l}`,
|
|
@@ -58,10 +58,10 @@ const A = (a, n, d, l, b, r) => {
|
|
|
58
58
|
title: n = "",
|
|
59
59
|
hideThumbnail: d
|
|
60
60
|
}) => {
|
|
61
|
-
const { t: l } =
|
|
61
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
62
62
|
const i = P(r.encounterDetails, l);
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
63
|
+
return /* @__PURE__ */ S(
|
|
64
|
+
D,
|
|
65
65
|
{
|
|
66
66
|
title: i,
|
|
67
67
|
id: `encounter-${r.encounterId}`,
|
|
@@ -112,59 +112,59 @@ const A = (a, n, d, l, b, r) => {
|
|
|
112
112
|
conceptNames: d = [],
|
|
113
113
|
conceptUuid: l = [],
|
|
114
114
|
hideThumbnail: b = !1
|
|
115
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t =
|
|
115
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = k(), { addNotification: s } = Q(), { t: i } = N(), o = H({
|
|
116
116
|
queries: d.map((e) => ({
|
|
117
117
|
queryKey: de(e),
|
|
118
|
-
queryFn: () =>
|
|
118
|
+
queryFn: () => K(e),
|
|
119
119
|
enabled: !!e
|
|
120
120
|
}))
|
|
121
121
|
});
|
|
122
122
|
$(() => {
|
|
123
123
|
o.forEach((e, h) => {
|
|
124
124
|
if (e.isError && !r.current.has(h)) {
|
|
125
|
-
const
|
|
125
|
+
const V = d[h];
|
|
126
126
|
s({
|
|
127
127
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
128
|
-
message: i("ERROR_FETCHING_CONCEPT", { conceptName:
|
|
128
|
+
message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
|
|
129
129
|
type: "error"
|
|
130
130
|
}), r.current.add(h);
|
|
131
131
|
} else e.isError || r.current.delete(h);
|
|
132
132
|
});
|
|
133
133
|
}, [o, d]);
|
|
134
|
-
const p =
|
|
134
|
+
const p = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
|
|
135
135
|
data: c,
|
|
136
|
-
isLoading:
|
|
137
|
-
isError:
|
|
138
|
-
refetch:
|
|
139
|
-
} =
|
|
136
|
+
isLoading: F,
|
|
137
|
+
isError: f,
|
|
138
|
+
refetch: T
|
|
139
|
+
} = w({
|
|
140
140
|
queryKey: le(t, m),
|
|
141
141
|
queryFn: () => te(t, m),
|
|
142
142
|
enabled: !!t && m.length > 0 && y
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
x(
|
|
145
145
|
(e) => {
|
|
146
146
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
147
147
|
(h) => m.includes(h)
|
|
148
|
-
) &&
|
|
148
|
+
) && T();
|
|
149
149
|
},
|
|
150
|
-
[t,
|
|
150
|
+
[t, T]
|
|
151
151
|
), $(() => {
|
|
152
|
-
|
|
152
|
+
f && s({
|
|
153
153
|
title: i("ERROR_DEFAULT_TITLE"),
|
|
154
154
|
message: i("ERROR_FETCHING_OBSERVATIONS"),
|
|
155
155
|
type: "error"
|
|
156
156
|
});
|
|
157
|
-
}, [
|
|
158
|
-
const g =
|
|
157
|
+
}, [f]);
|
|
158
|
+
const g = R(() => {
|
|
159
159
|
if (!c) return [];
|
|
160
|
-
const e =
|
|
161
|
-
return
|
|
162
|
-
}, [c]),
|
|
160
|
+
const e = G(c), h = M(e);
|
|
161
|
+
return X(h);
|
|
162
|
+
}, [c]), C = [
|
|
163
163
|
{ key: "name", header: "name" },
|
|
164
164
|
{ key: "value", header: "value" },
|
|
165
165
|
{ key: "form", header: "form" }
|
|
166
|
-
], O =
|
|
167
|
-
return /* @__PURE__ */
|
|
166
|
+
], O = F || !y, _ = f && y, L = (!c || c.entry?.length === 0 || m.length === 0) && y, q = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, B = L ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
167
|
+
return /* @__PURE__ */ S(
|
|
168
168
|
"div",
|
|
169
169
|
{
|
|
170
170
|
id: "observations",
|
|
@@ -173,7 +173,7 @@ const A = (a, n, d, l, b, r) => {
|
|
|
173
173
|
className: I.observations,
|
|
174
174
|
children: [
|
|
175
175
|
/* @__PURE__ */ u(
|
|
176
|
-
|
|
176
|
+
j,
|
|
177
177
|
{
|
|
178
178
|
id: "observations-title",
|
|
179
179
|
testId: E ? `observations-title-${v}` : "observations-title",
|
|
@@ -182,7 +182,7 @@ const A = (a, n, d, l, b, r) => {
|
|
|
182
182
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
|
|
185
|
+
U ? /* @__PURE__ */ u(
|
|
186
186
|
ie,
|
|
187
187
|
{
|
|
188
188
|
groupedData: g,
|
|
@@ -190,14 +190,14 @@ const A = (a, n, d, l, b, r) => {
|
|
|
190
190
|
hideThumbnail: b
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ u(
|
|
193
|
-
|
|
193
|
+
z,
|
|
194
194
|
{
|
|
195
|
-
headers:
|
|
195
|
+
headers: C,
|
|
196
196
|
rows: [],
|
|
197
197
|
ariaLabel: i("OBSERVATIONS"),
|
|
198
198
|
loading: O,
|
|
199
|
-
errorStateMessage:
|
|
200
|
-
emptyStateMessage:
|
|
199
|
+
errorStateMessage: q,
|
|
200
|
+
emptyStateMessage: B,
|
|
201
201
|
dataTestId: "observations-table"
|
|
202
202
|
}
|
|
203
203
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as we, J as z, K as xt, L as B, F as q, G as y, P as Ro, M as ye, S as R, O as _, T as k, U as N, V as A, W as bs, X as ir, Y as $e, _ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-BhdY2NuI.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { EncounterSessionStartContext } from '../../events/startConsultation';
|
|
2
3
|
interface ConsultationPadProps {
|
|
3
|
-
|
|
4
|
+
encounterSessionStartContext: EncounterSessionStartContext;
|
|
4
5
|
onClose: () => void;
|
|
5
6
|
}
|
|
6
7
|
declare const ConsultationPad: React.FC<ConsultationPadProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAMN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAkBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4NnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE,EACxB,aAAa,EAAE,MAAM,GACpB,YAAY,EAAE,CAKhB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,EAAE;;;;;;EAmB9D"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { EncounterSessionStartContext } from '../../../events/startConsultation';
|
|
2
|
+
import { InputControl as ClinicalInputControlConfig } from '../../../providers/clinicalConfig/models';
|
|
3
|
+
declare const ImmunizationHistoryForm: ({ encounterSessionStartContext, inputControlConfig, }: {
|
|
4
|
+
encounterSessionStartContext?: EncounterSessionStartContext;
|
|
5
|
+
inputControlConfig?: ClinicalInputControlConfig;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
2
7
|
export default ImmunizationHistoryForm;
|
|
3
8
|
//# sourceMappingURL=ImmunizationHistoryForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImmunizationHistoryForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/immunizationHistory/ImmunizationHistoryForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ImmunizationHistoryForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/immunizationHistory/ImmunizationHistoryForm.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,OAAO,KAAK,EAAE,YAAY,IAAI,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAe3G,QAAA,MAAM,uBAAuB,GAAI,uDAG9B;IACD,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACjD,4CA4SA,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
package/dist/components/forms/immunizationHistory/__tests__/__mocks__/immunizationHistoryMocks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Location } from '@bahmni/services';
|
|
2
|
-
import { Medication, Reference } from 'fhir/r4';
|
|
2
|
+
import { Medication, MedicationRequest, Reference } from 'fhir/r4';
|
|
3
3
|
import { InputControlAttributes } from '../../../../../providers/clinicalConfig/models';
|
|
4
4
|
import { ImmunizationInputEntry } from '../../models';
|
|
5
5
|
export declare const mockImmunizationHistory: {
|
|
@@ -13,6 +13,31 @@ export declare const mockImmunizationHistory: {
|
|
|
13
13
|
privilege: string[];
|
|
14
14
|
attributes: InputControlAttributes[];
|
|
15
15
|
};
|
|
16
|
+
export declare const mockImmunizationInputControlConfig: {
|
|
17
|
+
type: string;
|
|
18
|
+
metadata: {
|
|
19
|
+
routeConceptUuid: string;
|
|
20
|
+
vaccineConceptSetUuid: string;
|
|
21
|
+
siteConceptUuid: string;
|
|
22
|
+
administeredLocationTag: string;
|
|
23
|
+
};
|
|
24
|
+
encounterTypes: string[];
|
|
25
|
+
privileges: string[];
|
|
26
|
+
attributes: InputControlAttributes[];
|
|
27
|
+
};
|
|
28
|
+
export declare const mockAdministrationInputControlConfig: {
|
|
29
|
+
type: string;
|
|
30
|
+
metadata: {
|
|
31
|
+
disableAdditionalAdministrations: boolean;
|
|
32
|
+
routeConceptUuid: string;
|
|
33
|
+
vaccineConceptSetUuid: string;
|
|
34
|
+
siteConceptUuid: string;
|
|
35
|
+
administeredLocationTag: string;
|
|
36
|
+
};
|
|
37
|
+
encounterTypes: string[];
|
|
38
|
+
privileges: string[];
|
|
39
|
+
attributes: InputControlAttributes[];
|
|
40
|
+
};
|
|
16
41
|
export declare const mockClinicalConfigContext: {
|
|
17
42
|
clinicalConfig: {
|
|
18
43
|
consultationPad: {
|
|
@@ -115,6 +140,20 @@ export declare const mockCovid19VaccineDrug: Medication;
|
|
|
115
140
|
export declare const mockCovid19VaccineDrugs: Medication[];
|
|
116
141
|
export declare const mockEncounterSubject: Reference;
|
|
117
142
|
export declare const mockImmunizationEntryComplete: ImmunizationInputEntry;
|
|
143
|
+
export declare const mockImmunizationEntryWithBasedOn: ImmunizationInputEntry;
|
|
144
|
+
export declare const mockImmunizationEntryWithBasedOnNoDrug: ImmunizationInputEntry;
|
|
145
|
+
export declare const mockImmunizationEntryWithBasedOnAndNullFields: ImmunizationInputEntry;
|
|
146
|
+
export declare const mockImmunizationEntryWithCustomDrug: ImmunizationInputEntry;
|
|
147
|
+
export declare const mockImmunizationEntryWithCustomLocation: ImmunizationInputEntry;
|
|
148
|
+
export declare const mockMedicationRequest: MedicationRequest;
|
|
149
|
+
export declare const mockFetchedMedication: Medication;
|
|
150
|
+
export declare const mockVaccinationBundleWithCovid: {
|
|
151
|
+
resourceType: string;
|
|
152
|
+
type: string;
|
|
153
|
+
entry: {
|
|
154
|
+
resource: Medication;
|
|
155
|
+
}[];
|
|
156
|
+
};
|
|
118
157
|
export declare const mockStore: {
|
|
119
158
|
selectedImmunizations: never[];
|
|
120
159
|
attributes: undefined;
|