@bahmni/clinical-app 0.0.1-dev.352 → 0.0.1-dev.353
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-BVtWal__.js → ConsultationPage-CX1q2_d6.js} +14 -14
- package/dist/{DocumentsTable-BYzzx3Yr-D5SdF0Hf.js → DocumentsTable-TI2cownA-v_dAeZFn.js} +8 -8
- package/dist/{FormsTable-BAfOpD8j-VrHHeeEq.js → FormsTable-DY1pz_8H-QNGJcDb3.js} +44 -44
- package/dist/{LNWAZHJI-MjkhyAK7.js → LNWAZHJI-Dsh5Awfj.js} +2 -2
- package/dist/{MWZ6AO7Z-1MdPW6hF.js → MWZ6AO7Z-CPukuSbH.js} +2 -2
- package/dist/{Observations-7Kp6A2qe-qx9KI06k.js → Observations-a7Heef0b-DBtWyrDB.js} +24 -24
- package/dist/{YPM2AS64-CQ22u2_D.js → YPM2AS64-CCn9iY2V.js} +1 -1
- package/dist/{hook-D3LRCbJh.js → hook-DrO0sfnB.js} +1 -1
- package/dist/{index-C2D4EgQ1.js → index-DRz5WzPs.js} +18447 -18437
- package/dist/{index-CT-4K-HV.js → index-Lkh7JKQ-.js} +1 -1
- package/dist/{index-C38rQ_vd.js → index-aYgCTvs9.js} +3 -3
- 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 { s as H, t as ENCOUNTER_CONCEPTS_URL, Y as Yr, D as Di, B as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, G as Dm,
|
|
2
|
+
import { s as H, t as ENCOUNTER_CONCEPTS_URL, Y as Yr, D as Di, B as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, G as Dm, K as iSe, m as mr, M as kH2, P as IH2, R as TH2, S as gM2, U as rc1, Z as AH2, _ as SE, $ as Ii, a0 as Id, a1 as uE, a2 as Nd, a3 as Es, a4 as dist, a5 as yt, a6 as ge, a7 as ns, a8 as Cb, a9 as Bb, aa as zb, ab as BH2, ac as KH2, ad as oV2, a as ar, w as w3, ae as Yb, af as sH2, ag as VH2, ah as pC2, ai as XH2, aj as JH2, I as IGt, ak as b_, al as RH2, am as j_, an as Os, ao as T_, ap as uv, aq as Vb, ar as HH2, as as Xb, at as t_, au as CLINICAL_V2_CONFIG_BASE_URL, av as a_, aw as NE, ax as Qr, ay as n_, az as xb, aA as lv, aB as Og2, aC as S_, aD as o_, aE as i_, aF as pv, aG as DH2, aH as Ov, aI as Db, aJ as c_, aK as Kt, aL as jr, aM as Ev, aN as Sv, x as x2, aO as Y_, aP as O_, aQ as $_, N as NGt, aR as iC2, aS as sC2, aT as W_, aU as K_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as CH2, aZ as mf, a_ as Zn, a$ as oC2, b0 as G_, b1 as J_, b2 as HE, b3 as Nb, b4 as VE, b5 as X_, b6 as an, b7 as N4, b8 as c3, b9 as rC2, ba as aw, bb as Z_, bc as ev, bd as Pi, be as rs, bf as x_, bg as Wb, bh as Rv, bi as dv, bj as fv, bk as cv, bl as CDSS_SERVER_CONFIG_URL, bm as jGt, bn as UH2, bo as Jy, bp as k_, bq as M_, br as $H2, bs as ml1, bt as F_, bu as q_, bv as U_, bw as _Gt, bx as MGt, by as zE, bz as V_, bA as GH2, bB as sE, bC as BAHMNI_CLINICAL_PATH, bD as vE, bE as z_, bF as qH2, bG as WH2, bH as QE2, bI as SKt, bJ as _E, bK as RGt } from "./index-DRz5WzPs.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-DrO0sfnB.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 : {};
|
|
@@ -139565,9 +139565,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139565
139565
|
duplicateNotification: duplicateNotification$2
|
|
139566
139566
|
}, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
|
|
139567
139567
|
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = mr(), { addNotification: f } = ar(), d = w3(
|
|
139568
|
-
|
|
139568
|
+
IGt.ALLERGIES
|
|
139569
139569
|
), h = w3(
|
|
139570
|
-
|
|
139570
|
+
IGt.EDIT_ALLERGIES
|
|
139571
139571
|
), [E, C] = useState(""), [R, T] = useState(null), [M, x] = useState(!1), [I, k] = useState(
|
|
139572
139572
|
null
|
|
139573
139573
|
), {
|
|
@@ -139890,7 +139890,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
139890
139890
|
duplicateNotification: duplicateNotification$1
|
|
139891
139891
|
}, InvestigationsForm = React__default.memo(() => {
|
|
139892
139892
|
const { t: p } = useTranslation(), c = mr(), { addNotification: a } = ar(), s = w3(
|
|
139893
|
-
|
|
139893
|
+
IGt.INVESTIGATIONS
|
|
139894
139894
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: M } = j_(), I = M.includes("MATCHED") ? T?.id : void 0, {
|
|
139895
139895
|
data: k,
|
|
139896
139896
|
refetch: N,
|
|
@@ -140303,7 +140303,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140303
140303
|
duplicateNotification
|
|
140304
140304
|
}, ConditionsAndDiagnoses = React__default.memo(() => {
|
|
140305
140305
|
const { t: p } = useTranslation(), c = mr(), { addNotification: a } = ar(), s = w3(
|
|
140306
|
-
|
|
140306
|
+
IGt.CONDITIONS_AND_DIAGNOSES
|
|
140307
140307
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
|
|
140308
140308
|
selectedDiagnoses: T,
|
|
140309
140309
|
selectedConditions: M,
|
|
@@ -143258,7 +143258,7 @@ function useSubmittedEncounterForms(p) {
|
|
|
143258
143258
|
), useMemo(() => {
|
|
143259
143259
|
const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
|
|
143260
143260
|
for (const T of C) {
|
|
143261
|
-
const M =
|
|
143261
|
+
const M = NGt(T);
|
|
143262
143262
|
if (!M) continue;
|
|
143263
143263
|
const x = p.find((I) => I.name === M);
|
|
143264
143264
|
x && R.add(x.uuid);
|
|
@@ -143283,7 +143283,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
|
|
|
143283
143283
|
submittedFormUuids: R = EMPTY_SET
|
|
143284
143284
|
}) => {
|
|
143285
143285
|
const { t: T } = useTranslation(), M = w3(
|
|
143286
|
-
|
|
143286
|
+
IGt.OBSERVATIONS
|
|
143287
143287
|
), [x, I] = useState(""), [k, N] = useState(null), { getFormData: O } = useObservationFormsStore(), z = useMemo(() => {
|
|
143288
143288
|
if (!x.trim()) return h;
|
|
143289
143289
|
const ee = x.toLowerCase().trim().split(/\s+/);
|
|
@@ -144862,7 +144862,7 @@ const ConsultationPad = ({
|
|
|
144862
144862
|
visitUuids: f
|
|
144863
144863
|
}) => {
|
|
144864
144864
|
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = j_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, I = (N, O, z) => {
|
|
144865
|
-
const B =
|
|
144865
|
+
const B = jGt(N.type);
|
|
144866
144866
|
if (!B)
|
|
144867
144867
|
return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: N.type }) }) }, `${N.type}-${O}`);
|
|
144868
144868
|
const Z = O < z - 1;
|
|
@@ -145056,7 +145056,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145056
145056
|
}) => {
|
|
145057
145057
|
const { t: s } = useTranslation();
|
|
145058
145058
|
return w3(
|
|
145059
|
-
|
|
145059
|
+
IGt.ENCOUNTER
|
|
145060
145060
|
) ? a ? /* @__PURE__ */ jsx(
|
|
145061
145061
|
$H2,
|
|
145062
145062
|
{
|
|
@@ -145135,7 +145135,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145135
145135
|
"data-active-encounter-uuid": T && M?.id ? M.id : void 0,
|
|
145136
145136
|
"data-active-practitioner-uuid": s?.uuid ?? void 0,
|
|
145137
145137
|
children: [
|
|
145138
|
-
/* @__PURE__ */ jsx(
|
|
145138
|
+
/* @__PURE__ */ jsx(_Gt, {}),
|
|
145139
145139
|
/* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
|
|
145140
145140
|
/* @__PURE__ */ jsx(
|
|
145141
145141
|
ConsultationActionButton,
|
|
@@ -145146,7 +145146,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145146
145146
|
}
|
|
145147
145147
|
),
|
|
145148
145148
|
/* @__PURE__ */ jsx(
|
|
145149
|
-
|
|
145149
|
+
MGt,
|
|
145150
145150
|
{
|
|
145151
145151
|
printOptions: c,
|
|
145152
145152
|
renderContext: Z,
|
|
@@ -145490,7 +145490,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145490
145490
|
const re = () => {
|
|
145491
145491
|
const ae = M.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
145492
145492
|
return ae && c.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
145493
|
-
|
|
145493
|
+
RGt,
|
|
145494
145494
|
{
|
|
145495
145495
|
programUUID: ae,
|
|
145496
145496
|
config: {
|
|
@@ -145509,7 +145509,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145509
145509
|
{
|
|
145510
145510
|
breadcrumbItems: B,
|
|
145511
145511
|
globalActions: k,
|
|
145512
|
-
userMenu: /* @__PURE__ */ jsx(
|
|
145512
|
+
userMenu: /* @__PURE__ */ jsx(SKt, {}),
|
|
145513
145513
|
sideNavItems: te,
|
|
145514
145514
|
activeSideNavItemId: ee,
|
|
145515
145515
|
onSideNavItemClick: le,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { m as x, u as W, a as Y,
|
|
2
|
+
import { m as x, u as W, a as Y, H as J, r as X, g as Z, e as ee, d as te } from "./index-DRz5WzPs.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } 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 = {
|
|
@@ -36,11 +36,11 @@ const Te = [
|
|
|
36
36
|
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [
|
|
39
|
+
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = x(), { t: n } = W(), { addNotification: L } = Y(),
|
|
41
|
+
), E = x(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, H] = l(k), [V, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []),
|
|
43
|
+
}, []), F = _(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), v = _((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
@@ -91,7 +91,7 @@ const Te = [
|
|
|
91
91
|
}, [s, o]);
|
|
92
92
|
const j = _(
|
|
93
93
|
(e, t) => {
|
|
94
|
-
t !== u ? (
|
|
94
|
+
t !== u ? (H(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
96
96
|
[u]
|
|
97
97
|
), N = p(
|
|
@@ -152,7 +152,7 @@ const Te = [
|
|
|
152
152
|
className: d.documentsTableBody,
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
155
|
-
totalItems:
|
|
155
|
+
totalItems: V,
|
|
156
156
|
page: f,
|
|
157
157
|
onPageChange: j
|
|
158
158
|
}
|
|
@@ -163,13 +163,13 @@ const Te = [
|
|
|
163
163
|
id: "modalIdForActionAreaLayout",
|
|
164
164
|
portalId: "main-display-area",
|
|
165
165
|
open: s,
|
|
166
|
-
onRequestClose:
|
|
166
|
+
onRequestClose: F,
|
|
167
167
|
modalHeading: o.documentIdentifier,
|
|
168
168
|
passiveModal: !0,
|
|
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) || he.test(e.url ?? ""), D =
|
|
172
|
+
const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), D = $.has(t);
|
|
173
173
|
return m === "#" || D ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsx as i, jsxs as x, Fragment as he } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, m as pe, w as Ne, x as Oe, h as be,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
const
|
|
6
|
-
formsTableBody:
|
|
2
|
+
import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P, r as Me, e as Q, f as Ce, i as Re, d as Be, W as Le, I as Ue } from "./index-DRz5WzPs.js";
|
|
3
|
+
import { useQueryClient as ke, useQuery as b } from "@tanstack/react-query";
|
|
4
|
+
import { useState as X, useMemo as d, useCallback as l } from "react";
|
|
5
|
+
const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", I = {
|
|
6
|
+
formsTableBody: De,
|
|
7
7
|
modalHeading: we,
|
|
8
8
|
customAccordianItem: qe
|
|
9
9
|
}, He = "startConsultation", xe = ({
|
|
10
10
|
episodeOfCareUuids: M,
|
|
11
11
|
encounterUuids: c,
|
|
12
|
-
config:
|
|
12
|
+
config: J,
|
|
13
13
|
disableActions: W = !1,
|
|
14
14
|
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } = ge(), u = pe(), [g, C] =
|
|
17
|
-
numberOfVisits:
|
|
18
|
-
hideThumbnail:
|
|
16
|
+
const { t: n } = ge(), u = pe(), [g, C] = X(!1), [s, R] = X(null), {
|
|
17
|
+
numberOfVisits: Y,
|
|
18
|
+
hideThumbnail: Z = !1,
|
|
19
19
|
forms: p
|
|
20
|
-
} =
|
|
20
|
+
} = J ?? {}, ee = Ne(
|
|
21
21
|
Ue.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: N } = Oe(),
|
|
22
|
+
), { userPrivileges: N } = Oe(), T = ee && !W && !!h, B = be(
|
|
23
23
|
M,
|
|
24
24
|
c
|
|
25
|
-
), re =
|
|
25
|
+
), re = ke(), {
|
|
26
26
|
data: L = [],
|
|
27
27
|
isLoading: U,
|
|
28
|
-
isError:
|
|
28
|
+
isError: k,
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = b({
|
|
32
32
|
queryKey: ["forms", u, M],
|
|
33
|
-
queryFn: () =>
|
|
33
|
+
queryFn: () => Ie(u, void 0, Y),
|
|
34
34
|
enabled: !!u && !B
|
|
35
|
-
}),
|
|
35
|
+
}), D = d(() => {
|
|
36
36
|
let e = L;
|
|
37
37
|
return c && c.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => c.includes(r.encounterUuid)
|
|
@@ -41,7 +41,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
41
41
|
)), e;
|
|
42
42
|
}, [L, c, p]), { data: O = [] } = b({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
44
|
+
queryFn: () => Te()
|
|
45
45
|
}), w = l(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = O.find((a) => a.name === e);
|
|
@@ -59,18 +59,18 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
59
59
|
), q = l(
|
|
60
60
|
(e) => O.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[O]
|
|
62
|
-
),
|
|
62
|
+
), A = d(() => {
|
|
63
63
|
if (s)
|
|
64
64
|
return q(s.formName);
|
|
65
65
|
}, [s, q]), {
|
|
66
66
|
data: m,
|
|
67
67
|
isLoading: te,
|
|
68
68
|
isError: se,
|
|
69
|
-
error:
|
|
69
|
+
error: E
|
|
70
70
|
} = b({
|
|
71
|
-
queryKey: ["formMetadata",
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
enabled: !!
|
|
71
|
+
queryKey: ["formMetadata", A],
|
|
72
|
+
queryFn: () => Ae(A),
|
|
73
|
+
enabled: !!A && g
|
|
74
74
|
}), {
|
|
75
75
|
data: _,
|
|
76
76
|
isLoading: ne,
|
|
@@ -78,7 +78,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
78
78
|
error: v
|
|
79
79
|
} = b({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
-
queryFn: () =>
|
|
81
|
+
queryFn: () => Ee(s.encounterUuid),
|
|
82
82
|
enabled: !!s?.encounterUuid && g
|
|
83
83
|
});
|
|
84
84
|
_e(
|
|
@@ -113,11 +113,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
113
113
|
null
|
|
114
114
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
115
115
|
}, [m]), ce = d(() => {
|
|
116
|
-
if (
|
|
117
|
-
return z(
|
|
116
|
+
if (E)
|
|
117
|
+
return z(E).message;
|
|
118
118
|
if (v)
|
|
119
119
|
return z(v).message;
|
|
120
|
-
}, [
|
|
120
|
+
}, [E, v]), y = d(
|
|
121
121
|
() => [
|
|
122
122
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
123
123
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
@@ -127,8 +127,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
127
127
|
() => [...y, { key: "actions", header: n("ACTIONS") }],
|
|
128
128
|
[y, n]
|
|
129
129
|
), ue = l(
|
|
130
|
-
(e) =>
|
|
131
|
-
[
|
|
130
|
+
(e) => T && e.some((r) => f(r)) ? H : y,
|
|
131
|
+
[T, f, H, y]
|
|
132
132
|
), fe = y, ye = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -136,7 +136,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
136
136
|
],
|
|
137
137
|
[]
|
|
138
138
|
), V = d(() => {
|
|
139
|
-
const e =
|
|
139
|
+
const e = D.reduce(
|
|
140
140
|
(r, o) => {
|
|
141
141
|
const a = o.formName;
|
|
142
142
|
r[a] ??= [];
|
|
@@ -160,9 +160,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
|
-
}, [
|
|
163
|
+
}, [D, n]), G = l((e) => {
|
|
164
164
|
R(e), C(!0);
|
|
165
|
-
}, []),
|
|
165
|
+
}, []), $ = l(() => {
|
|
166
166
|
C(!1), R(null);
|
|
167
167
|
}, []), F = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
@@ -180,7 +180,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(Me, { onClick: () =>
|
|
183
|
+
return /* @__PURE__ */ i(Me, { onClick: () => G(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
@@ -199,20 +199,20 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[
|
|
202
|
+
[G, F, f, n]
|
|
203
203
|
);
|
|
204
204
|
return /* @__PURE__ */ x(he, { children: [
|
|
205
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U ||
|
|
206
|
-
|
|
205
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || B ? /* @__PURE__ */ i(
|
|
206
|
+
Q,
|
|
207
207
|
{
|
|
208
208
|
headers: fe,
|
|
209
209
|
ariaLabel: n("FORMS_HEADING"),
|
|
210
210
|
rows: [],
|
|
211
211
|
loading: U,
|
|
212
|
-
errorStateMessage:
|
|
212
|
+
errorStateMessage: k ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
214
|
renderCell: j,
|
|
215
|
-
className:
|
|
215
|
+
className: I.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
218
|
) : /* @__PURE__ */ i(Ce, { align: "start", children: V.map((e, r) => {
|
|
@@ -221,11 +221,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
221
221
|
Re,
|
|
222
222
|
{
|
|
223
223
|
title: o,
|
|
224
|
-
className:
|
|
224
|
+
className: I.customAccordianItem,
|
|
225
225
|
testId: `accordian-title-${o}`,
|
|
226
226
|
open: r === 0,
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
228
|
-
|
|
228
|
+
Q,
|
|
229
229
|
{
|
|
230
230
|
headers: t,
|
|
231
231
|
ariaLabel: n("FORMS_HEADING"),
|
|
@@ -235,7 +235,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
235
235
|
sortable: ye,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
237
|
renderCell: j,
|
|
238
|
-
className:
|
|
238
|
+
className: I.formsTableBody,
|
|
239
239
|
dataTestId: `forms-table-${o}`
|
|
240
240
|
}
|
|
241
241
|
)
|
|
@@ -249,10 +249,10 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
251
|
open: g,
|
|
252
|
-
onRequestClose:
|
|
253
|
-
modalHeading: /* @__PURE__ */ x("div", { className:
|
|
252
|
+
onRequestClose: $,
|
|
253
|
+
modalHeading: /* @__PURE__ */ x("div", { className: I.modalHeading, children: [
|
|
254
254
|
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
|
-
|
|
255
|
+
T && f(s) && /* @__PURE__ */ i(
|
|
256
256
|
K,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
@@ -260,7 +260,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
260
260
|
size: "sm",
|
|
261
261
|
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
262
262
|
onClick: () => {
|
|
263
|
-
|
|
263
|
+
$(), F(s);
|
|
264
264
|
},
|
|
265
265
|
children: /* @__PURE__ */ i(P, {})
|
|
266
266
|
}
|
|
@@ -279,7 +279,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
|
|
|
279
279
|
errorMessage: ce,
|
|
280
280
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
281
281
|
testIdPrefix: s.formName,
|
|
282
|
-
hideThumbnail:
|
|
282
|
+
hideThumbnail: Z,
|
|
283
283
|
controlOrder: le,
|
|
284
284
|
sectionMap: me
|
|
285
285
|
}
|
|
@@ -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 { bO as d, bP as f, bQ as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CCn9iY2V.js";
|
|
2
|
+
import { bO as d, bP as f, bQ as e } from "./index-DRz5WzPs.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 { bO as v, bP as C, bQ 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-CCn9iY2V.js";
|
|
2
|
+
import { bO as v, bP as C, bQ as e } from "./index-DRz5WzPs.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { m as V, a as q, u as
|
|
1
|
+
import { jsxs as S, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { m as V, a as q, u as N, v as Q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-DRz5WzPs.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as T } from "react";
|
|
5
5
|
const F = (a, n, d, l, b, r) => {
|
|
6
|
-
const t = P(a, n, b), s = t.value, o =
|
|
6
|
+
const t = P(a, n, b), s = t.value, o = Y(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
9
|
-
|
|
9
|
+
X,
|
|
10
10
|
{
|
|
11
11
|
imageSrc: s,
|
|
12
12
|
alt: s,
|
|
@@ -25,7 +25,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
25
25
|
provider: t.provider
|
|
26
26
|
}), p = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${p}-${d}-${n}` : `${v}-${p}-${d}-${n}`;
|
|
27
27
|
return /* @__PURE__ */ u(
|
|
28
|
-
|
|
28
|
+
W,
|
|
29
29
|
{
|
|
30
30
|
header: t.header,
|
|
31
31
|
value: i,
|
|
@@ -59,9 +59,9 @@ const F = (a, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
62
|
+
const { t: l } = N(), b = (r, t, s) => {
|
|
63
63
|
const o = J(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ S(
|
|
65
65
|
D,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
@@ -113,10 +113,10 @@ const F = (a, n, d, l, b, r) => {
|
|
|
113
113
|
conceptNames: d = [],
|
|
114
114
|
conceptUuid: l = [],
|
|
115
115
|
hideThumbnail: b = !1
|
|
116
|
-
} = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
|
-
queryFn: () =>
|
|
119
|
+
queryFn: () => Q(e),
|
|
120
120
|
enabled: !!e
|
|
121
121
|
}))
|
|
122
122
|
});
|
|
@@ -132,17 +132,17 @@ const F = (a, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), v = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: L,
|
|
138
138
|
isError: O,
|
|
139
139
|
refetch: R
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => k(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && v
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
z(
|
|
146
146
|
(e) => {
|
|
147
147
|
e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
148
148
|
(h) => p.includes(h)
|
|
@@ -156,20 +156,20 @@ const F = (a, n, d, l, b, r) => {
|
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [O]);
|
|
159
|
-
const
|
|
159
|
+
const f = T(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
|
-
const e =
|
|
161
|
+
const e = M(c), h = j(e);
|
|
162
162
|
return w(h);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), C = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
168
|
-
return /* @__PURE__ */
|
|
167
|
+
], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = G ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
|
|
168
|
+
return /* @__PURE__ */ S(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
@@ -177,7 +177,7 @@ const F = (a, n, d, l, b, r) => {
|
|
|
177
177
|
x,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
180
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
181
181
|
title: y,
|
|
182
182
|
className: I.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: y })
|
|
@@ -186,17 +186,17 @@ const F = (a, n, d, l, b, r) => {
|
|
|
186
186
|
U ? /* @__PURE__ */ u(
|
|
187
187
|
oe,
|
|
188
188
|
{
|
|
189
|
-
groupedData:
|
|
189
|
+
groupedData: f,
|
|
190
190
|
title: y,
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
194
|
H,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: C,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: g,
|
|
200
200
|
errorStateMessage: A,
|
|
201
201
|
emptyStateMessage: K,
|
|
202
202
|
dataTestId: "observations-table"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bR as we, bS as z, bT as xt, bU as B, bP as q, bQ as y, bV as Ro, bW as ye, bX as R, bY as _, bZ as k, b_ as N, b$ as A, c0 as bs, c1 as ir, c2 as $e, c3 as U, c4 as Hn, c5 as Vn, c6 as dt, c7 as D, c8 as xs, c9 as cn, ca as Be, cb as ws, cc as qt, cd as zt, ce as $s, cf as Cs, cg as $n, ch as Ss, ci as Nr, cj as Bt, ck as zo, cl as ks, cm as Es, cn as j, co as Ur, cp as Ms, cq as Ds, cr as sr, cs as As, ct as Ts, cu as zn, cv as Fs, cw as Is, cx as Z, cy as Ps, cz as Ls } from "./index-
|
|
1
|
+
import { bR as we, bS as z, bT as xt, bU as B, bP as q, bQ as y, bV as Ro, bW as ye, bX as R, bY as _, bZ as k, b_ as N, b$ as A, c0 as bs, c1 as ir, c2 as $e, c3 as U, c4 as Hn, c5 as Vn, c6 as dt, c7 as D, c8 as xs, c9 as cn, ca as Be, cb as ws, cc as qt, cd as zt, ce as $s, cf as Cs, cg as $n, ch as Ss, ci as Nr, cj as Bt, ck as zo, cl as ks, cm as Es, cn as j, co as Ur, cp as Ms, cq as Ds, cr as sr, cs as As, ct as Ts, cu as zn, cv as Fs, cw as Is, cx as Z, cy as Ps, cz as Ls } from "./index-DRz5WzPs.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|