@bahmni/clinical-app 0.0.1-dev.108 → 0.0.1-dev.110
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-BhgvFijg-DpVuvYKa.js → FormsTable-DvQygCpm-DU5ePiaA.js} +53 -53
- package/dist/{LNWAZHJI-CSzbmhBu.js → LNWAZHJI-DbMownaN.js} +5 -5
- package/dist/{MWZ6AO7Z-BHBRGSOE.js → MWZ6AO7Z-BfeNGPBG.js} +5 -5
- package/dist/Observations-DHohreqe-DGIi6QZy.js +503 -0
- package/dist/{YPM2AS64--kUlzXUl.js → YPM2AS64-BGgRsB8q.js} +1 -1
- package/dist/components/consultationPad/ConsultationPad.d.ts.map +1 -1
- package/dist/components/forms/medications/MedicationsForm.d.ts.map +1 -1
- package/dist/components/forms/medications/SelectedMedicationItem.d.ts +1 -0
- package/dist/components/forms/medications/SelectedMedicationItem.d.ts.map +1 -1
- package/dist/components/forms/vaccinations/SelectedVaccinationItem.d.ts +23 -0
- package/dist/components/forms/vaccinations/SelectedVaccinationItem.d.ts.map +1 -0
- package/dist/components/forms/vaccinations/VaccinationForm.d.ts +10 -0
- package/dist/components/forms/vaccinations/VaccinationForm.d.ts.map +1 -0
- package/dist/constants/app.d.ts +0 -2
- package/dist/constants/app.d.ts.map +1 -1
- package/dist/hooks/useMedicationConfig.d.ts.map +1 -1
- package/dist/hooks/useMedicationSearch.d.ts.map +1 -1
- package/dist/{index-jQa2f6J7.js → index-BzD6Dx9A.js} +44673 -43558
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/locales/locale_en.json +21 -1
- package/dist/locales/locale_es.json +21 -1
- package/dist/models/medication.d.ts +1 -0
- package/dist/models/medication.d.ts.map +1 -1
- package/dist/models/medicationConfig.d.ts +1 -29
- package/dist/models/medicationConfig.d.ts.map +1 -1
- package/dist/services/medicationService.d.ts +1 -3
- package/dist/services/medicationService.d.ts.map +1 -1
- package/dist/stores/medicationsStore.d.ts +1 -0
- package/dist/stores/medicationsStore.d.ts.map +1 -1
- package/dist/stores/vaccinationsStore.d.ts +28 -0
- package/dist/stores/vaccinationsStore.d.ts.map +1 -0
- package/dist/utils/fhir/medicationRequestResourceCreator.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { jsx as o, jsxs as p, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { useState as U, useMemo as
|
|
2
|
+
import { u as Y, T as W, K as X, a as f, C as Z, L as ee, Q as I, b as re, O as ae, D as oe, c as ne, r as G, F as te, d as N, R as se, e as de, f as ie, g as me } from "./index-BzD6Dx9A.js";
|
|
3
|
+
import { useState as U, useMemo as _, 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", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", he = "_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", Ce = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Te = "_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: be,
|
|
10
|
+
observation: _e,
|
|
11
11
|
groupContainer: fe,
|
|
12
12
|
rowContainer: ge,
|
|
13
13
|
groupLabel: Ne,
|
|
14
14
|
rowLabel: he,
|
|
15
15
|
rowValue: ye,
|
|
16
16
|
groupMembers: ve,
|
|
17
|
-
memberRow:
|
|
17
|
+
memberRow: Le,
|
|
18
18
|
memberLabel: Me,
|
|
19
|
-
memberValue:
|
|
20
|
-
abnormalValue:
|
|
21
|
-
commentSection:
|
|
19
|
+
memberValue: Ae,
|
|
20
|
+
abnormalValue: Oe,
|
|
21
|
+
commentSection: Ce,
|
|
22
22
|
commentText: Re,
|
|
23
23
|
nestedGroup: Te,
|
|
24
24
|
nestedGroupLabel: De,
|
|
25
25
|
nestedGroupMembers: Fe
|
|
26
|
-
},
|
|
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() ===
|
|
26
|
+
}, we = "ABNORMAL", q = (e) => {
|
|
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
|
}, x = ({
|
|
30
30
|
member: e,
|
|
@@ -86,7 +86,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
},
|
|
89
|
+
}, Be = ({
|
|
90
90
|
observation: e,
|
|
91
91
|
index: i
|
|
92
92
|
}) => {
|
|
@@ -145,24 +145,24 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
145
145
|
},
|
|
146
146
|
`${e.concept.uuid}-${i}`
|
|
147
147
|
);
|
|
148
|
-
},
|
|
148
|
+
}, Ge = ({
|
|
149
149
|
episodeOfCareUuids: e,
|
|
150
150
|
encounterUuids: i,
|
|
151
151
|
config: m
|
|
152
152
|
}) => {
|
|
153
|
-
const { t: a } =
|
|
153
|
+
const { t: a } = Y(), l = W(), [c, u] = U(!1), [t, M] = U(null), k = m?.numberOfVisits, A = X(
|
|
154
154
|
e,
|
|
155
155
|
i
|
|
156
156
|
), {
|
|
157
157
|
data: h = [],
|
|
158
|
-
isLoading:
|
|
159
|
-
isError:
|
|
160
|
-
error:
|
|
158
|
+
isLoading: O,
|
|
159
|
+
isError: C,
|
|
160
|
+
error: K
|
|
161
161
|
} = f({
|
|
162
162
|
queryKey: ["forms", l, e],
|
|
163
163
|
queryFn: () => se(l, void 0, k),
|
|
164
|
-
enabled: !!l && !
|
|
165
|
-
}), R =
|
|
164
|
+
enabled: !!l && !A
|
|
165
|
+
}), R = _(() => !i || i.length === 0 ? h : h.filter(
|
|
166
166
|
(n) => i.includes(n.encounterUuid)
|
|
167
167
|
), [h, i]), { data: T = [] } = f({
|
|
168
168
|
queryKey: ["observationForms"],
|
|
@@ -170,12 +170,12 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
170
170
|
}), D = g(
|
|
171
171
|
(n) => T.find((s) => s.name === n)?.uuid,
|
|
172
172
|
[T]
|
|
173
|
-
), y =
|
|
173
|
+
), y = _(() => {
|
|
174
174
|
if (t)
|
|
175
175
|
return D(t.formName);
|
|
176
176
|
}, [t, D]), {
|
|
177
|
-
data:
|
|
178
|
-
isLoading:
|
|
177
|
+
data: Ee,
|
|
178
|
+
isLoading: H,
|
|
179
179
|
error: F
|
|
180
180
|
} = f({
|
|
181
181
|
queryKey: ["formMetadata", y],
|
|
@@ -183,37 +183,37 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
183
183
|
enabled: !!y && c
|
|
184
184
|
}), {
|
|
185
185
|
data: v,
|
|
186
|
-
isLoading:
|
|
187
|
-
error:
|
|
186
|
+
isLoading: j,
|
|
187
|
+
error: w
|
|
188
188
|
} = f({
|
|
189
189
|
queryKey: ["formsEncounter", t?.encounterUuid],
|
|
190
190
|
queryFn: () => me(t.encounterUuid, !0),
|
|
191
191
|
enabled: !!t?.encounterUuid && c
|
|
192
|
-
}),
|
|
192
|
+
}), 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]),
|
|
194
|
+
), [v?.observations, t?.formName]), E = _(
|
|
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
|
-
),
|
|
200
|
+
), J = _(
|
|
201
201
|
() => [
|
|
202
202
|
{ key: "recordedOn", sortable: !0 },
|
|
203
203
|
{ key: "recordedBy", sortable: !0 }
|
|
204
204
|
],
|
|
205
205
|
[]
|
|
206
|
-
),
|
|
206
|
+
), S = _(() => {
|
|
207
207
|
const n = R.reduce(
|
|
208
208
|
(s, d) => {
|
|
209
|
-
const
|
|
210
|
-
s[
|
|
211
|
-
const
|
|
212
|
-
return s[
|
|
209
|
+
const b = d.formName;
|
|
210
|
+
s[b] ??= [];
|
|
211
|
+
const L = d.providers.map((Q) => Q.providerName).filter(Boolean).join(", ");
|
|
212
|
+
return s[b].push({
|
|
213
213
|
id: d.encounterUuid,
|
|
214
214
|
formName: d.formName,
|
|
215
215
|
recordedOn: Z(d.encounterDateTime, a, te).formattedResult,
|
|
216
|
-
recordedBy:
|
|
216
|
+
recordedBy: L ?? "--",
|
|
217
217
|
encounterDateTime: d.encounterDateTime,
|
|
218
218
|
encounterUuid: d.encounterUuid
|
|
219
219
|
}), s;
|
|
@@ -224,15 +224,15 @@ 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
|
+
(b, L) => L.encounterDateTime - b.encounterDateTime
|
|
228
228
|
)
|
|
229
229
|
})
|
|
230
230
|
).sort((s, d) => s.formName.localeCompare(d.formName));
|
|
231
231
|
}, [R, a]), V = g((n) => {
|
|
232
232
|
M(n), u(!0);
|
|
233
|
-
}, []),
|
|
233
|
+
}, []), P = g(() => {
|
|
234
234
|
u(!1), M(null);
|
|
235
|
-
}, []),
|
|
235
|
+
}, []), $ = g(
|
|
236
236
|
(n, s) => {
|
|
237
237
|
switch (s) {
|
|
238
238
|
case "recordedOn":
|
|
@@ -246,21 +246,21 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
246
246
|
[V]
|
|
247
247
|
);
|
|
248
248
|
return /* @__PURE__ */ p(z, { children: [
|
|
249
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
250
|
-
|
|
249
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || C || S.length === 0 || A ? /* @__PURE__ */ o(
|
|
250
|
+
I,
|
|
251
251
|
{
|
|
252
|
-
headers:
|
|
252
|
+
headers: E,
|
|
253
253
|
ariaLabel: a("FORMS_HEADING"),
|
|
254
254
|
rows: [],
|
|
255
|
-
loading:
|
|
256
|
-
errorStateMessage:
|
|
255
|
+
loading: O,
|
|
256
|
+
errorStateMessage: C ? K?.message : void 0,
|
|
257
257
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
258
|
-
renderCell:
|
|
258
|
+
renderCell: $,
|
|
259
259
|
className: r.formsTableBody,
|
|
260
260
|
"data-testid": "sortable-data-table"
|
|
261
261
|
}
|
|
262
|
-
) : /* @__PURE__ */ o(re, { align: "start", children:
|
|
263
|
-
const { formName: d, records:
|
|
262
|
+
) : /* @__PURE__ */ o(re, { align: "start", children: S.map((n, s) => {
|
|
263
|
+
const { formName: d, records: b } = n;
|
|
264
264
|
return /* @__PURE__ */ o(
|
|
265
265
|
ae,
|
|
266
266
|
{
|
|
@@ -269,16 +269,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
269
269
|
testId: `accordian-title-${d}`,
|
|
270
270
|
open: s === 0,
|
|
271
271
|
children: /* @__PURE__ */ o(
|
|
272
|
-
|
|
272
|
+
I,
|
|
273
273
|
{
|
|
274
|
-
headers:
|
|
274
|
+
headers: E,
|
|
275
275
|
ariaLabel: a("FORMS_HEADING"),
|
|
276
|
-
rows:
|
|
276
|
+
rows: b,
|
|
277
277
|
loading: !1,
|
|
278
278
|
errorStateMessage: "",
|
|
279
|
-
sortable:
|
|
279
|
+
sortable: J,
|
|
280
280
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
281
|
-
renderCell:
|
|
281
|
+
renderCell: $,
|
|
282
282
|
className: r.formsTableBody,
|
|
283
283
|
"data-testid": "forms-data-table"
|
|
284
284
|
}
|
|
@@ -293,14 +293,14 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
293
293
|
{
|
|
294
294
|
id: "formDetailsModal",
|
|
295
295
|
open: c,
|
|
296
|
-
onRequestClose:
|
|
296
|
+
onRequestClose: P,
|
|
297
297
|
modalHeading: t.formName,
|
|
298
298
|
modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
|
|
299
299
|
passiveModal: !0,
|
|
300
300
|
size: "md",
|
|
301
301
|
testId: "form-details-modal",
|
|
302
|
-
children: /* @__PURE__ */ o("div", { className: r.formContent, children:
|
|
303
|
-
|
|
302
|
+
children: /* @__PURE__ */ o("div", { className: r.formContent, children: H || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children: G(F).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: G(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ o("div", { className: r.formDetailsContainer, children: B.map((n, s) => /* @__PURE__ */ o(
|
|
303
|
+
Be,
|
|
304
304
|
{
|
|
305
305
|
observation: n,
|
|
306
306
|
index: s
|
|
@@ -314,5 +314,5 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
|
|
|
314
314
|
] });
|
|
315
315
|
};
|
|
316
316
|
export {
|
|
317
|
-
|
|
317
|
+
Ge as default
|
|
318
318
|
};
|
|
@@ -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-BGgRsB8q.js";
|
|
2
|
+
import { J as d, M as f, N as e } from "./index-BzD6Dx9A.js";
|
|
3
|
+
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n =
|
|
6
|
+
}), n = d(), s = f(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
@@ -27,7 +27,7 @@ var h = (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 s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
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-BGgRsB8q.js";
|
|
2
|
+
import { J as v, M as C, N as e } from "./index-BzD6Dx9A.js";
|
|
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 C = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
}, p =
|
|
39
|
+
}, p = h;
|
|
40
40
|
export {
|
|
41
41
|
p as default
|
|
42
42
|
};
|