@bahmni/clinical-app 0.0.1-dev.386 → 0.0.1-dev.387
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/{ConsultationPage-BxhGnN2Y.js → ConsultationPage-Dt9ppt4O.js} +15 -15
- package/dist/{DocumentsTable-Ce9p4WA6-CQUC2CVZ.js → DocumentsTable-DKoqNebk-KlBO_Hgr.js} +31 -31
- package/dist/{FormsTable-BJBBdfzc-DVSlqDyh.js → FormsTable-CHKYAxeN-DzN5MpKK.js} +42 -42
- package/dist/{LNWAZHJI-U9t7Bi3S.js → LNWAZHJI-DJoVBl7k.js} +2 -2
- package/dist/{MWZ6AO7Z-CwD-1ArF.js → MWZ6AO7Z-D7P-ryoM.js} +2 -2
- package/dist/{Observations-C3pfbHHQ-J-AOVbm0.js → Observations-DJE57Epe-w4GoUX5p.js} +37 -37
- package/dist/{YPM2AS64-9Yg5w_xj.js → YPM2AS64-B7xLxxAl.js} +1 -1
- package/dist/{hook-D3uqnbSZ.js → hook-BzZuv01O.js} +1 -1
- package/dist/{index-BHu6Z2B5.js → index-B3fXDZqW.js} +3 -3
- package/dist/{index-DWZbkAvX.js → index-BCnF17v5.js} +1 -1
- package/dist/{index-D6AUhOKx.js → index-BLliZxnn.js} +21349 -21313
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { u as useTranslation, r as B, s as ENCOUNTER_CONCEPTS_URL, t as Yr,
|
|
2
|
+
import { u as useTranslation, r as B, s as ENCOUNTER_CONCEPTS_URL, t as Yr, v as Ci, x as BAHMNI_USER_LOCATION_COOKIE_NAME, F as xm, H as t8, g as g0, J as hb2, M as ub2, R as sb2, S as Bx2, U as ol1, W as ab2, $ as $E, X as Di, a0 as Dd, a1 as pE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as q_, a9 as J_, aa as Q_, ab as mb2, ac as Cb2, ad as Nz2, L as L1, A as A3, ae as X_, af as Oy2, ag as Ky2, ah as Bb2, ai as _b2, aj as xb2, d as G01, ak as Ab, al as fb2, am as Kb, an as Ps, ao as Nb, ap as wv, aq as K_, ar as Yy2, as as ob, at as cb, au as CLINICAL_V2_CONFIG_BASE_URL, av as pb, aw as xE, ax as Qr, ay as lb, az as j_, aA as Ev, aB as aL2, aC as Ib, aD as fb, aE as hb, aF as vv, aG as ib2, aH as xv, aI as U_, aJ as mb, aK as Rt, aL as jr, aM as Pv, aN as Cv, Q as Qr$1, aO as Zb, aP as Cb, aQ as kb, I as Iqt, aR as Rb2, aS as Ob2, aT as rv, aU as tv, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as Jy2, aZ as mf, a_ as es$2, a$ as Tb2, b0 as ev, b1 as sv, b2 as KE, b3 as k_, b4 as GE, b5 as an, b6 as N4, b7 as c3, b8 as Ab2, b9 as TE, ba as nv, bb as av, bc as iv, bd as cv, be as Ii, bf as ns, bg as Vb, bh as tb, bi as Lv, bj as _v, bk as bv, bl as yv, bm as CDSS_SERVER_CONFIG_URL, bn as nb, bo as Mi, bp as __, bq as Ze, br as Hb2, bs as X01, bt as Eb2, bu as Zy, bv as Hb, bw as Bb, bx as ob2, by as Hs1, bz as Gb, bA as Yb, bB as zb, bC as $01, bD as L01, bE as JE, bF as Wb, bG as cE, bH as BAHMNI_CLINICAL_PATH, bI as AE, bJ as ow, bK as Vb2, bL as vb2, bM as Cz2, bN as q11, bO as OE, bP as U01 } from "./index-BLliZxnn.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { createContext, useContext, useState, useCallback, useEffect, useMemo, Children, useRef, useLayoutEffect, forwardRef, isValidElement, cloneElement, useReducer, Component, useImperativeHandle, PureComponent, createRef, useSyncExternalStore, Suspense } from "react";
|
|
5
5
|
import { useQuery, useQueries, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import { useNavigate, useSearchParams } from "react-router-dom";
|
|
7
|
-
import { u as useClinicalConfig } from "./hook-
|
|
7
|
+
import { u as useClinicalConfig } from "./hook-BzZuv01O.js";
|
|
8
8
|
import * as ReactDOM from "react-dom";
|
|
9
9
|
import ReactDOM__default, { createPortal } from "react-dom";
|
|
10
10
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -139782,9 +139782,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139782
139782
|
duplicateNotification: duplicateNotification$2
|
|
139783
139783
|
}, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
|
|
139784
139784
|
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = g0(), { addNotification: f } = L1(), d = A3(
|
|
139785
|
-
|
|
139785
|
+
G01.ALLERGIES
|
|
139786
139786
|
), h = A3(
|
|
139787
|
-
|
|
139787
|
+
G01.EDIT_ALLERGIES
|
|
139788
139788
|
), [E, C] = useState(""), [R, T] = useState(null), [H, x] = useState(!1), [$, k] = useState(
|
|
139789
139789
|
null
|
|
139790
139790
|
), {
|
|
@@ -140107,7 +140107,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
140107
140107
|
duplicateNotification: duplicateNotification$1
|
|
140108
140108
|
}, InvestigationsForm = React__default.memo(() => {
|
|
140109
140109
|
const { t: p } = useTranslation(), c = g0(), { addNotification: a } = L1(), s = A3(
|
|
140110
|
-
|
|
140110
|
+
G01.INVESTIGATIONS
|
|
140111
140111
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = Kb(), $ = H.includes("MATCHED") ? T?.id : void 0, {
|
|
140112
140112
|
data: k,
|
|
140113
140113
|
refetch: I,
|
|
@@ -140520,7 +140520,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140520
140520
|
duplicateNotification
|
|
140521
140521
|
}, ConditionsAndDiagnoses = React__default.memo(() => {
|
|
140522
140522
|
const { t: p } = useTranslation(), c = g0(), { addNotification: a } = L1(), s = A3(
|
|
140523
|
-
|
|
140523
|
+
G01.CONDITIONS_AND_DIAGNOSES
|
|
140524
140524
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
|
|
140525
140525
|
selectedDiagnoses: T,
|
|
140526
140526
|
selectedConditions: H,
|
|
@@ -143475,7 +143475,7 @@ function useSubmittedEncounterForms(p) {
|
|
|
143475
143475
|
), useMemo(() => {
|
|
143476
143476
|
const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
|
|
143477
143477
|
for (const T of C) {
|
|
143478
|
-
const H =
|
|
143478
|
+
const H = Iqt(T);
|
|
143479
143479
|
if (!H) continue;
|
|
143480
143480
|
const x = p.find(($) => $.name === H);
|
|
143481
143481
|
x && R.add(x.uuid);
|
|
@@ -143500,7 +143500,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
|
|
|
143500
143500
|
submittedFormUuids: R = EMPTY_SET
|
|
143501
143501
|
}) => {
|
|
143502
143502
|
const { t: T } = useTranslation(), H = A3(
|
|
143503
|
-
|
|
143503
|
+
G01.OBSERVATIONS
|
|
143504
143504
|
), [x, $] = useState(""), [k, I] = useState(null), { getFormData: S } = useObservationFormsStore(), z = useMemo(() => {
|
|
143505
143505
|
if (!x.trim()) return h;
|
|
143506
143506
|
const ae = x.toLowerCase().trim().split(/\s+/);
|
|
@@ -145027,7 +145027,7 @@ const ConsultationPad = ({
|
|
|
145027
145027
|
onToggleActionAreaExpand: s
|
|
145028
145028
|
}) => {
|
|
145029
145029
|
const { t: f } = useTranslation(), { addNotification: d } = L1(), h = g0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: C, isLoading: R } = useClinicalConfig(), { encounterConcepts: T } = useEncounterConcepts(), H = A3(
|
|
145030
|
-
|
|
145030
|
+
G01.ADD_VISITS
|
|
145031
145031
|
), x = useActionAreaExpandProps({
|
|
145032
145032
|
isExpanded: a,
|
|
145033
145033
|
onToggleExpand: s
|
|
@@ -145191,7 +145191,7 @@ const ConsultationPad = ({
|
|
|
145191
145191
|
visitUuids: f
|
|
145192
145192
|
}) => {
|
|
145193
145193
|
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = Kb(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, $ = (I, S, z) => {
|
|
145194
|
-
const O =
|
|
145194
|
+
const O = X01(I.type);
|
|
145195
145195
|
if (!O)
|
|
145196
145196
|
return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${S}`);
|
|
145197
145197
|
const Z = S < z - 1;
|
|
@@ -145384,7 +145384,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145384
145384
|
}) => {
|
|
145385
145385
|
const { t: s } = useTranslation();
|
|
145386
145386
|
return A3(
|
|
145387
|
-
|
|
145387
|
+
G01.ENCOUNTER
|
|
145388
145388
|
) ? a ? /* @__PURE__ */ jsx(
|
|
145389
145389
|
ob2,
|
|
145390
145390
|
{
|
|
@@ -145462,7 +145462,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145462
145462
|
"data-active-encounter-uuid": T && H?.id ? H.id : void 0,
|
|
145463
145463
|
"data-active-practitioner-uuid": s?.uuid ?? void 0,
|
|
145464
145464
|
children: [
|
|
145465
|
-
/* @__PURE__ */ jsx(
|
|
145465
|
+
/* @__PURE__ */ jsx($01, {}),
|
|
145466
145466
|
/* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
|
|
145467
145467
|
/* @__PURE__ */ jsx(
|
|
145468
145468
|
ConsultationActionButton,
|
|
@@ -145473,7 +145473,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145473
145473
|
}
|
|
145474
145474
|
),
|
|
145475
145475
|
/* @__PURE__ */ jsx(
|
|
145476
|
-
|
|
145476
|
+
L01,
|
|
145477
145477
|
{
|
|
145478
145478
|
printOptions: c,
|
|
145479
145479
|
renderContext: Z,
|
|
@@ -145817,7 +145817,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145817
145817
|
const Q = () => {
|
|
145818
145818
|
const he = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
145819
145819
|
return he && c.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
145820
|
-
|
|
145820
|
+
U01,
|
|
145821
145821
|
{
|
|
145822
145822
|
programUUID: he,
|
|
145823
145823
|
config: {
|
|
@@ -145836,7 +145836,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145836
145836
|
{
|
|
145837
145837
|
breadcrumbItems: F,
|
|
145838
145838
|
globalActions: S,
|
|
145839
|
-
userMenu: /* @__PURE__ */ jsx(
|
|
145839
|
+
userMenu: /* @__PURE__ */ jsx(q11, {}),
|
|
145840
145840
|
sideNavItems: E ? [] : J,
|
|
145841
145841
|
activeSideNavItemId: le,
|
|
145842
145842
|
onSideNavItemClick: re,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { g as G, u as W, L as Y,
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { g as G, u as W, L as Y, O as J, a as X, w as Z, K as ee, p as te } from "./index-BLliZxnn.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as
|
|
4
|
+
import { useState as l, useCallback as h, useEffect as D, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -33,17 +33,17 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
],
|
|
36
|
+
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Oe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
|
-
), [$,
|
|
39
|
+
), [$, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = W(), { addNotification: U } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M =
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: U } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
|
|
42
42
|
L(e), w(!0);
|
|
43
|
-
}, []), H =
|
|
44
|
-
w(!1), L(null),
|
|
45
|
-
}, []), v =
|
|
46
|
-
|
|
43
|
+
}, []), H = h(() => {
|
|
44
|
+
w(!1), L(null), I(/* @__PURE__ */ new Set());
|
|
45
|
+
}, []), v = h((e) => {
|
|
46
|
+
I((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: q, isError: y, error: b } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
@@ -60,17 +60,17 @@ const Te = [
|
|
|
60
60
|
f
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
D(() => {
|
|
64
64
|
i && A(i.total);
|
|
65
|
-
}, [i]),
|
|
65
|
+
}, [i]), D(() => {
|
|
66
66
|
C(1), A(void 0);
|
|
67
|
-
}, [E]),
|
|
67
|
+
}, [E]), D(() => {
|
|
68
68
|
y && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: b?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [y, b, U, n]),
|
|
73
|
+
}, [y, b, U, n]), D(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,31 +82,31 @@ const Te = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(c);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (N) {
|
|
86
|
+
N instanceof Error && N.name !== "AbortError" && t.add(c);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
e.signal.aborted ||
|
|
89
|
+
e.signal.aborted || I(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const K =
|
|
92
|
+
const K = h(
|
|
93
93
|
(e, t) => {
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
|
-
),
|
|
97
|
+
), O = _(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), j =
|
|
101
|
-
() =>
|
|
100
|
+
), j = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = _(() => ie(O, n), [O, n]), z = _(
|
|
101
|
+
() => O.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
106
|
-
), T =
|
|
105
|
+
[O]
|
|
106
|
+
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
), Q =
|
|
109
|
+
), Q = h(
|
|
110
110
|
(e, t) => {
|
|
111
111
|
switch (t) {
|
|
112
112
|
case "documentIdentifier":
|
|
@@ -137,7 +137,7 @@ const Te = [
|
|
|
137
137
|
},
|
|
138
138
|
[M, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ p(x, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -169,14 +169,14 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
-
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) ||
|
|
173
|
-
return m === "#" ||
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), N = $.has(t);
|
|
173
|
+
return m === "#" || N ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
T.length > 1 && /* @__PURE__ */
|
|
179
|
+
T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
182
|
T.length
|
|
@@ -185,13 +185,13 @@ const Te = [
|
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ p(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
T.length > 1 && /* @__PURE__ */
|
|
194
|
+
T.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
@@ -223,5 +223,5 @@ const Te = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
Oe as default
|
|
227
227
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as G, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, g as be, A as Ne, Q as Oe, b as Te,
|
|
2
|
+
import { u as ge, g as be, A as Ne, Q as Oe, b as Te, T as Ie, Y as Ee, z as Ae, D as _e, m as ve, G as Fe, I as Be, c as P, w as Se, N as $, E as x, a as Me, K as Q, B as Re, P as Ce, p as Le, i as Ue, d as De } from "./index-BLliZxnn.js";
|
|
3
3
|
import { useQueryClient as ke, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Y, useMemo as d, useCallback as c } from "react";
|
|
5
5
|
const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
@@ -7,41 +7,41 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
7
7
|
modalHeading: qe,
|
|
8
8
|
customAccordianItem: He
|
|
9
9
|
}, Ve = "startConsultation", Pe = ({
|
|
10
|
-
episodeOfCareUuids:
|
|
10
|
+
episodeOfCareUuids: S,
|
|
11
11
|
encounterUuids: m,
|
|
12
12
|
config: J,
|
|
13
13
|
disableActions: X = !1,
|
|
14
14
|
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), u = be(), [y,
|
|
16
|
+
const { t: n } = ge(), u = be(), [y, M] = Y(!1), [s, R] = Y(null), {
|
|
17
17
|
numberOfVisits: W,
|
|
18
18
|
hideThumbnail: Z = !1,
|
|
19
19
|
forms: g
|
|
20
20
|
} = J ?? {}, ee = Ne(
|
|
21
21
|
De.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = Oe(),
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: b } = Oe(), I = ee && !X && !!h, C = Te(
|
|
23
|
+
S,
|
|
24
24
|
m
|
|
25
25
|
), re = ke(), {
|
|
26
|
-
data:
|
|
26
|
+
data: L = [],
|
|
27
27
|
isLoading: U,
|
|
28
28
|
isError: D,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = O({
|
|
32
|
-
queryKey: ["forms", u,
|
|
33
|
-
queryFn: () =>
|
|
34
|
-
enabled: !!u && !
|
|
32
|
+
queryKey: ["forms", u, S],
|
|
33
|
+
queryFn: () => Ie(u, void 0, W),
|
|
34
|
+
enabled: !!u && !C
|
|
35
35
|
}), k = d(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = L;
|
|
37
37
|
return m && m.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => m.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(g) && g.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => g.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [L, m, g]), { data: N = [] } = O({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
44
|
+
queryFn: () => Ee()
|
|
45
45
|
}), w = c(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = N.find((t) => t.name === e);
|
|
@@ -59,18 +59,18 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
59
59
|
), q = c(
|
|
60
60
|
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[N]
|
|
62
|
-
),
|
|
62
|
+
), E = d(() => {
|
|
63
63
|
if (s)
|
|
64
64
|
return q(s.formName);
|
|
65
65
|
}, [s, q]), {
|
|
66
66
|
data: l,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
69
|
+
error: A
|
|
70
70
|
} = O({
|
|
71
|
-
queryKey: ["formMetadata",
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
enabled: !!
|
|
71
|
+
queryKey: ["formMetadata", E],
|
|
72
|
+
queryFn: () => Ae(E),
|
|
73
|
+
enabled: !!E && y
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
@@ -87,7 +87,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
87
87
|
},
|
|
88
88
|
[u]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) =>
|
|
90
|
+
const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Be(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
|
|
91
91
|
if (!l?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((t) => {
|
|
@@ -103,8 +103,8 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
103
103
|
const e = {}, r = (o, t) => {
|
|
104
104
|
for (const a of o)
|
|
105
105
|
if (a.type === "section") {
|
|
106
|
-
const
|
|
107
|
-
r(a.controls ?? [],
|
|
106
|
+
const B = a.label?.value ?? "Section";
|
|
107
|
+
r(a.controls ?? [], B);
|
|
108
108
|
} else
|
|
109
109
|
a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
|
|
110
110
|
};
|
|
@@ -124,11 +124,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
124
124
|
l.schema.controls ?? []
|
|
125
125
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
126
126
|
}, [l]), ue = d(() => {
|
|
127
|
-
if (
|
|
128
|
-
return P(
|
|
127
|
+
if (A)
|
|
128
|
+
return P(A).message;
|
|
129
129
|
if (v)
|
|
130
130
|
return P(v).message;
|
|
131
|
-
}, [
|
|
131
|
+
}, [A, v]), p = d(
|
|
132
132
|
() => [
|
|
133
133
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
134
134
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -138,8 +138,8 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
138
138
|
() => [...p, { key: "actions", header: n("ACTIONS") }],
|
|
139
139
|
[p, n]
|
|
140
140
|
), fe = c(
|
|
141
|
-
(e) =>
|
|
142
|
-
[
|
|
141
|
+
(e) => I && e.some((r) => f(r)) ? H : p,
|
|
142
|
+
[I, f, H, p]
|
|
143
143
|
), pe = p, he = d(
|
|
144
144
|
() => [
|
|
145
145
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -151,11 +151,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
151
151
|
(r, o) => {
|
|
152
152
|
const t = o.formName;
|
|
153
153
|
r[t] ??= [];
|
|
154
|
-
const a = o.providers.map((
|
|
154
|
+
const a = o.providers.map((B) => B.providerName).filter(Boolean).join(", ");
|
|
155
155
|
return r[t].push({
|
|
156
156
|
id: o.encounterUuid,
|
|
157
157
|
formName: o.formName,
|
|
158
|
-
recordedOn:
|
|
158
|
+
recordedOn: Se(o.encounterDateTime, n, !0).formattedResult,
|
|
159
159
|
recordedBy: a ?? "--",
|
|
160
160
|
encounterDateTime: o.encounterDateTime,
|
|
161
161
|
encounterUuid: o.encounterUuid
|
|
@@ -171,11 +171,11 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
171
171
|
)
|
|
172
172
|
})
|
|
173
173
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
174
|
-
}, [k, n]),
|
|
175
|
-
|
|
176
|
-
}, []),
|
|
177
|
-
|
|
178
|
-
}, []),
|
|
174
|
+
}, [k, n]), z = c((e) => {
|
|
175
|
+
R(e), M(!0);
|
|
176
|
+
}, []), j = c(() => {
|
|
177
|
+
M(!1), R(null);
|
|
178
|
+
}, []), F = c((e) => {
|
|
179
179
|
globalThis.dispatchEvent(
|
|
180
180
|
new CustomEvent(Ve, {
|
|
181
181
|
detail: {
|
|
@@ -191,7 +191,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
191
191
|
(e, r) => {
|
|
192
192
|
switch (r) {
|
|
193
193
|
case "recordedOn":
|
|
194
|
-
return /* @__PURE__ */ i(
|
|
194
|
+
return /* @__PURE__ */ i(Me, { onClick: () => z(e), children: e.recordedOn });
|
|
195
195
|
case "recordedBy":
|
|
196
196
|
return e.recordedBy;
|
|
197
197
|
case "actions":
|
|
@@ -202,7 +202,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
202
202
|
kind: "ghost",
|
|
203
203
|
size: "sm",
|
|
204
204
|
testId: `edit-form-${e.encounterUuid}`,
|
|
205
|
-
onClick: () =>
|
|
205
|
+
onClick: () => F(e),
|
|
206
206
|
children: /* @__PURE__ */ i(x, {})
|
|
207
207
|
}
|
|
208
208
|
) : null;
|
|
@@ -210,10 +210,10 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
210
210
|
return null;
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
[
|
|
213
|
+
[z, F, f, n]
|
|
214
214
|
);
|
|
215
215
|
return /* @__PURE__ */ G(ye, { children: [
|
|
216
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 ||
|
|
216
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || C ? /* @__PURE__ */ i(
|
|
217
217
|
Q,
|
|
218
218
|
{
|
|
219
219
|
headers: pe,
|
|
@@ -226,10 +226,10 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
226
226
|
className: T.formsTableBody,
|
|
227
227
|
dataTestId: "forms-table"
|
|
228
228
|
}
|
|
229
|
-
) : /* @__PURE__ */ i(
|
|
229
|
+
) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
|
|
230
230
|
const { formName: o, records: t } = e, a = fe(t);
|
|
231
231
|
return /* @__PURE__ */ i(
|
|
232
|
-
|
|
232
|
+
Ce,
|
|
233
233
|
{
|
|
234
234
|
title: o,
|
|
235
235
|
className: T.customAccordianItem,
|
|
@@ -255,15 +255,15 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
255
255
|
);
|
|
256
256
|
}) }) }),
|
|
257
257
|
y && s && /* @__PURE__ */ i(
|
|
258
|
-
|
|
258
|
+
Le,
|
|
259
259
|
{
|
|
260
260
|
id: "modalIdForActionAreaLayout",
|
|
261
261
|
portalId: "main-display-area",
|
|
262
262
|
open: y,
|
|
263
|
-
onRequestClose:
|
|
263
|
+
onRequestClose: j,
|
|
264
264
|
modalHeading: /* @__PURE__ */ G("div", { className: T.modalHeading, children: [
|
|
265
265
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
266
|
-
|
|
266
|
+
I && f(s) && /* @__PURE__ */ i(
|
|
267
267
|
$,
|
|
268
268
|
{
|
|
269
269
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
@@ -271,7 +271,7 @@ const we = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
271
271
|
size: "sm",
|
|
272
272
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
273
273
|
onClick: () => {
|
|
274
|
-
|
|
274
|
+
j(), F(s);
|
|
275
275
|
},
|
|
276
276
|
children: /* @__PURE__ */ i(x, {})
|
|
277
277
|
}
|
|
@@ -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 { bV as d, bW as f, bX as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-B7xLxxAl.js";
|
|
2
|
+
import { bV as d, bW as f, bX as e } from "./index-BLliZxnn.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 { bV as v, bW as C, bX 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-B7xLxxAl.js";
|
|
2
|
+
import { bV as v, bW as C, bX as e } from "./index-BLliZxnn.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|