@bahmni/clinical-app 0.0.1-dev.412 → 0.0.1-dev.413
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-CfQteuY7.js → ConsultationPage-CGHnHS3q.js} +14 -14
- package/dist/{DocumentsTable-d1TJP4VT-1UJAI1FZ.js → DocumentsTable-CMaU8zGA-CxeHDLza.js} +15 -15
- package/dist/{FormsTable-CieUtVH3-C02PjiAA.js → FormsTable-CXDYWNj6-D9gq54Ea.js} +25 -25
- package/dist/{LNWAZHJI-CS8wnS3M.js → LNWAZHJI-EHR0LoGx.js} +2 -2
- package/dist/{MWZ6AO7Z-Ca-d4_qu.js → MWZ6AO7Z-B3iobvi8.js} +2 -2
- package/dist/{Observations-ChKkOtyn-NxwoxOdZ.js → Observations-DH0ifLsl-DtzFsO59.js} +11 -11
- package/dist/{YPM2AS64-wMYNmB67.js → YPM2AS64-DObT2IBb.js} +1 -1
- package/dist/{hook-GLReIHWd.js → hook-DG_62LQV.js} +1 -1
- package/dist/{index-DKf0o4F9.js → index-CegQ5MbY.js} +3 -3
- package/dist/{index-CJB4S9Uw.js → index-Cyru_COR.js} +8886 -8879
- package/dist/{index-BOGGGNuc.js → index-d3QGz53a.js} +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/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { u as useTranslation, K as B, L as ENCOUNTER_CONCEPTS_URL,
|
|
2
|
+
import { u as useTranslation, K as B, L as ENCOUNTER_CONCEPTS_URL, O as Yr, Q as qUt, U as Ui, R as BAHMNI_USER_LOCATION_COOKIE_NAME, T as Hm, W as e8, v as v0, X as vb2, Z as Eb2, _ as mb2, $ as Wx2, a0 as ll1, a1 as pb2, a2 as VE, a3 as Mi, a4 as jd, a5 as RE, a6 as qd, a7 as vs, a8 as dist, a9 as yt, aa as we, ab as ss, ac as X0, ad as u_, ae as l_, af as Vb2, ag as bb2, ah as Rz2, z as z1, t as t8, ai as d_, aj as Fy2, ak as tb2, al as jb2, am as $b2, an as Ab2, C as Cr1, ao as q_, ap as wb2, aq as cb, ar as Ps, as as H_, at as Db, au as i_, av as nb2, aw as w_, ax as b_, ay as CLINICAL_V2_CONFIG_BASE_URL, az as O_, aA as KE, aB as Qr, aC as S_, aD as e_, aE as Cb, aF as aL2, aG as B_, aH as R_, aI as A_, aJ as kb, aK as ub2, aL as Wb, aM as Q0, aN as P_, aO as Rt, aP as jr, aQ as Vb, aR as Gb, e as en, aS as hb, aT as Y_, aU as J_, f as fGt, aV as Pb2, aW as Fb2, aX as gb, aY as mb, aZ as yb2, a_ as se, a$ as STOP_REASON_VALUESET_EXPAND_URL, b0 as Be, b1 as AE, b2 as Sf, b3 as es$2, b4 as STOP_REASON_VALUESET_TITLE, b5 as kb2, b6 as pb, b7 as wb, b8 as i0, b9 as W0, ba as a0, bb as an, bc as N4, bd as c3, be as Ob2, bf as kE, bg as yb, bh as _b, bi as bb, bj as vb, bk as ki, bl as ns, bm as rb, bn as p_, bo as Kb, bp as xb, bq as Lb, br as Ib, bs as CDSS_SERVER_CONFIG_URL, bt as g_, bu as Vi, bv as C0, bw as Ze, bx as Lr1, by as _b2, bz as dw, bA as nb, bB as sb, bC as hb2, bD as Xt, bE as ib, bF as ab, bG as ob, bH as gr1, bI as pr1, bJ as u0, bK as ub, bL as vi, bM as _E, bN as BAHMNI_CLINICAL_PATH, bO as qE, bP as yw, bQ as zb2, bR as Lb2, bS as bz2, bT as A01, bU as FE, bV as Nr1 } from "./index-Cyru_COR.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-DG_62LQV.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 : {};
|
|
@@ -139846,9 +139846,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139846
139846
|
duplicateNotification: duplicateNotification$2
|
|
139847
139847
|
}, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
|
|
139848
139848
|
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = v0(), { addNotification: f } = z1(), d = t8(
|
|
139849
|
-
|
|
139849
|
+
Cr1.ALLERGIES
|
|
139850
139850
|
), h = t8(
|
|
139851
|
-
|
|
139851
|
+
Cr1.EDIT_ALLERGIES
|
|
139852
139852
|
), [E, g] = useState(""), [R, V] = useState(null), [H, M] = useState(!1), [$, k] = useState(
|
|
139853
139853
|
null
|
|
139854
139854
|
), {
|
|
@@ -140171,7 +140171,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
140171
140171
|
duplicateNotification: duplicateNotification$1
|
|
140172
140172
|
}, InvestigationsForm = React__default.memo(() => {
|
|
140173
140173
|
const { t: p } = useTranslation(), c = v0(), { addNotification: a } = z1(), s = t8(
|
|
140174
|
-
|
|
140174
|
+
Cr1.INVESTIGATIONS
|
|
140175
140175
|
), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), { activeEncounter: V, matchReasons: H } = cb(), $ = H.includes("MATCHED") ? V?.id : void 0, {
|
|
140176
140176
|
data: k,
|
|
140177
140177
|
refetch: I,
|
|
@@ -140584,7 +140584,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140584
140584
|
duplicateNotification
|
|
140585
140585
|
}, ConditionsAndDiagnoses = React__default.memo(() => {
|
|
140586
140586
|
const { t: p } = useTranslation(), c = v0(), { addNotification: a } = z1(), s = t8(
|
|
140587
|
-
|
|
140587
|
+
Cr1.CONDITIONS_AND_DIAGNOSES
|
|
140588
140588
|
), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), {
|
|
140589
140589
|
selectedDiagnoses: V,
|
|
140590
140590
|
selectedConditions: H,
|
|
@@ -143564,7 +143564,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
|
|
|
143564
143564
|
submittedFormUuids: R = EMPTY_SET
|
|
143565
143565
|
}) => {
|
|
143566
143566
|
const { t: V } = useTranslation(), H = t8(
|
|
143567
|
-
|
|
143567
|
+
Cr1.OBSERVATIONS
|
|
143568
143568
|
), [M, $] = useState(""), [k, I] = useState(null), { getFormData: D } = useObservationFormsStore(), Z = useMemo(() => {
|
|
143569
143569
|
if (!M.trim()) return h;
|
|
143570
143570
|
const ne = M.toLowerCase().trim().split(/\s+/);
|
|
@@ -145210,7 +145210,7 @@ const ConsultationPad = ({
|
|
|
145210
145210
|
onToggleActionAreaExpand: s
|
|
145211
145211
|
}) => {
|
|
145212
145212
|
const { t: f } = useTranslation(), { addNotification: d } = z1(), h = v0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: g, isLoading: R } = useClinicalConfig(), { encounterConcepts: V } = useEncounterConcepts(), H = t8(
|
|
145213
|
-
|
|
145213
|
+
Cr1.ADD_VISITS
|
|
145214
145214
|
), M = useActionAreaExpandProps({
|
|
145215
145215
|
isExpanded: a,
|
|
145216
145216
|
onToggleExpand: s
|
|
@@ -145376,7 +145376,7 @@ const ConsultationPad = ({
|
|
|
145376
145376
|
visitUuids: f
|
|
145377
145377
|
}) => {
|
|
145378
145378
|
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: g } = cb(), R = h.includes("NO_ACTIVE_VISIT"), V = h.includes("MATCHED"), M = h.includes("MATCHED") ? g?.id ?? null : null, $ = (I, D, Z) => {
|
|
145379
|
-
const O =
|
|
145379
|
+
const O = Lr1(I.type);
|
|
145380
145380
|
if (!O)
|
|
145381
145381
|
return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${D}`);
|
|
145382
145382
|
const z = D < Z - 1;
|
|
@@ -145569,7 +145569,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145569
145569
|
}) => {
|
|
145570
145570
|
const { t: s } = useTranslation();
|
|
145571
145571
|
return t8(
|
|
145572
|
-
|
|
145572
|
+
Cr1.ENCOUNTER
|
|
145573
145573
|
) ? a ? /* @__PURE__ */ jsx(
|
|
145574
145574
|
hb2,
|
|
145575
145575
|
{
|
|
@@ -145647,7 +145647,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145647
145647
|
"data-active-encounter-uuid": V && H?.id ? H.id : void 0,
|
|
145648
145648
|
"data-active-practitioner-uuid": s?.uuid ?? void 0,
|
|
145649
145649
|
children: [
|
|
145650
|
-
/* @__PURE__ */ jsx(
|
|
145650
|
+
/* @__PURE__ */ jsx(gr1, {}),
|
|
145651
145651
|
/* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
|
|
145652
145652
|
/* @__PURE__ */ jsx(
|
|
145653
145653
|
ConsultationActionButton,
|
|
@@ -145658,7 +145658,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145658
145658
|
}
|
|
145659
145659
|
),
|
|
145660
145660
|
/* @__PURE__ */ jsx(
|
|
145661
|
-
|
|
145661
|
+
pr1,
|
|
145662
145662
|
{
|
|
145663
145663
|
printOptions: c,
|
|
145664
145664
|
renderContext: z,
|
|
@@ -146011,7 +146011,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
146011
146011
|
const Ae = () => {
|
|
146012
146012
|
const Ie = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
146013
146013
|
return Ie && c.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
146014
|
-
|
|
146014
|
+
Nr1,
|
|
146015
146015
|
{
|
|
146016
146016
|
programUUID: Ie,
|
|
146017
146017
|
config: {
|
|
@@ -146030,7 +146030,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
146030
146030
|
{
|
|
146031
146031
|
breadcrumbItems: X,
|
|
146032
146032
|
globalActions: D,
|
|
146033
|
-
userMenu: /* @__PURE__ */ jsx(
|
|
146033
|
+
userMenu: /* @__PURE__ */ jsx(A01, {}),
|
|
146034
146034
|
sideNavItems: E ? [] : ae,
|
|
146035
146035
|
activeSideNavItemId: ve,
|
|
146036
146036
|
onSideNavItemClick: Ee,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { v as x, u as G, z as W,
|
|
1
|
+
import { jsx as r, jsxs as h, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { v as x, u as G, z as W, h as J, q as X, w as Z, Y as ee, p as te } from "./index-Cyru_COR.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 p, useEffect as I, 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,16 +33,16 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
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: E }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
39
|
), [$, O] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M =
|
|
41
|
+
), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = p((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
|
-
}, []), F =
|
|
43
|
+
}, []), F = p(() => {
|
|
44
44
|
w(!1), U(null), O(/* @__PURE__ */ new Set());
|
|
45
|
-
}, []), v =
|
|
45
|
+
}, []), v = p((e) => {
|
|
46
46
|
O((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: H, isError: y, error: b } = ae({
|
|
48
48
|
queryKey: [
|
|
@@ -89,7 +89,7 @@ const Te = [
|
|
|
89
89
|
e.signal.aborted || O(t);
|
|
90
90
|
})(), () => e.abort();
|
|
91
91
|
}, [s, o]);
|
|
92
|
-
const z =
|
|
92
|
+
const z = p(
|
|
93
93
|
(e, t) => {
|
|
94
94
|
t !== u ? (V(t), C(1), A(void 0)) : C(e);
|
|
95
95
|
},
|
|
@@ -106,7 +106,7 @@ const Te = [
|
|
|
106
106
|
), T = _(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
|
-
), Q =
|
|
109
|
+
), Q = p(
|
|
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__ */ h(Y, { 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 === "#" || D ? /* @__PURE__ */
|
|
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
|
+
return m === "#" || D ? /* @__PURE__ */ h(
|
|
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__ */ h("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__ */ h(
|
|
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__ */ h("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
197
|
T.length
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n, jsxs as P, Fragment as be } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, v as
|
|
3
|
-
import { useQueryClient as we, useQuery as
|
|
2
|
+
import { u as ge, v as Te, t as he, e as Oe, a as Ne, b as Ie, c as Ae, y as Ee, d as _e, m as ve, i as Fe, f as Me, g as Ce, S as z, w as Be, A as G, V as K, q as Re, Y as j, P as Se, F as Le, p as Ue, s as De, C as qe } from "./index-Cyru_COR.js";
|
|
3
|
+
import { useQueryClient as we, useQuery as h } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as i, useCallback as d } from "react";
|
|
5
5
|
const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", O = {
|
|
6
6
|
formsTableBody: ke,
|
|
@@ -13,38 +13,38 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
13
13
|
disableActions: Z = !1,
|
|
14
14
|
activeEncounterUuid: y = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t } = ge(), m =
|
|
16
|
+
const { t } = ge(), m = Te(), [p, M] = Q(!1), [o, C] = Q(null), {
|
|
17
17
|
numberOfVisits: X,
|
|
18
18
|
hideThumbnail: J = !1,
|
|
19
19
|
forms: b
|
|
20
|
-
} = Y ?? {}, W =
|
|
20
|
+
} = Y ?? {}, W = he(
|
|
21
21
|
qe.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: g } = Oe(), N = W && !Z && !!y,
|
|
22
|
+
), { userPrivileges: g } = Oe(), N = W && !Z && !!y, B = Ne(
|
|
23
23
|
F,
|
|
24
24
|
l
|
|
25
25
|
), ee = we(), {
|
|
26
|
-
data:
|
|
27
|
-
isLoading:
|
|
26
|
+
data: R = [],
|
|
27
|
+
isLoading: S,
|
|
28
28
|
isError: L,
|
|
29
29
|
error: re,
|
|
30
30
|
refetch: ae
|
|
31
|
-
} =
|
|
31
|
+
} = h({
|
|
32
32
|
queryKey: ["forms", m, F],
|
|
33
33
|
queryFn: () => Ie(m, void 0, X),
|
|
34
|
-
enabled: !!m && !
|
|
34
|
+
enabled: !!m && !B
|
|
35
35
|
}), U = i(() => {
|
|
36
|
-
let e =
|
|
36
|
+
let e = R;
|
|
37
37
|
return l && l.length > 0 && (e = e.filter(
|
|
38
38
|
(r) => l.includes(r.encounterUuid)
|
|
39
39
|
)), Array.isArray(b) && b.length > 0 && (e = e.filter(
|
|
40
40
|
(r) => b.some((a) => a.toLowerCase() === r.formName.toLowerCase())
|
|
41
41
|
)), e;
|
|
42
|
-
}, [
|
|
42
|
+
}, [R, l, b]), { data: T = [] } = h({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
44
|
queryFn: () => Ae()
|
|
45
45
|
}), D = d(
|
|
46
46
|
(e) => {
|
|
47
|
-
const r =
|
|
47
|
+
const r = T.find((s) => s.name === e);
|
|
48
48
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
49
49
|
if (!g || g.length === 0) return !1;
|
|
50
50
|
const a = new Set(g.map((s) => s.name));
|
|
@@ -52,13 +52,13 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
52
52
|
(s) => a.has(s.privilegeName) && s.editable
|
|
53
53
|
);
|
|
54
54
|
},
|
|
55
|
-
[
|
|
55
|
+
[T, g]
|
|
56
56
|
), u = d(
|
|
57
57
|
(e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
|
|
58
58
|
[y, D]
|
|
59
59
|
), q = d(
|
|
60
|
-
(e) =>
|
|
61
|
-
[
|
|
60
|
+
(e) => T.find((r) => r.name === e)?.uuid,
|
|
61
|
+
[T]
|
|
62
62
|
), I = i(() => {
|
|
63
63
|
if (o)
|
|
64
64
|
return q(o.formName);
|
|
@@ -67,7 +67,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
67
67
|
isLoading: oe,
|
|
68
68
|
isError: te,
|
|
69
69
|
error: A
|
|
70
|
-
} =
|
|
70
|
+
} = h({
|
|
71
71
|
queryKey: ["formMetadata", I],
|
|
72
72
|
queryFn: () => Ee(I),
|
|
73
73
|
enabled: !!I && p
|
|
@@ -76,7 +76,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
76
76
|
isLoading: se,
|
|
77
77
|
isError: ne,
|
|
78
78
|
error: _
|
|
79
|
-
} =
|
|
79
|
+
} = h({
|
|
80
80
|
queryKey: ["formsEncounterFHIR", o?.encounterUuid],
|
|
81
81
|
queryFn: () => _e(o.encounterUuid),
|
|
82
82
|
enabled: !!o?.encounterUuid && p
|
|
@@ -88,7 +88,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
88
88
|
[m]
|
|
89
89
|
);
|
|
90
90
|
const ie = i(() => !E?.entry || !o?.formName ? [] : E.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Me(e)?.toLowerCase() === o.formName.toLowerCase() : !0), [E, o?.formName]), { controlOrder: de, sectionMap: le, conceptDatatypeMap: me } = i(
|
|
91
|
-
() =>
|
|
91
|
+
() => Ce(w?.schema),
|
|
92
92
|
[w]
|
|
93
93
|
), ue = i(() => {
|
|
94
94
|
if (A)
|
|
@@ -122,7 +122,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
122
122
|
return r[s].push({
|
|
123
123
|
id: a.encounterUuid,
|
|
124
124
|
formName: a.formName,
|
|
125
|
-
recordedOn:
|
|
125
|
+
recordedOn: Be(a.encounterDateTime, t, !0).formattedResult,
|
|
126
126
|
recordedBy: f ?? "--",
|
|
127
127
|
encounterDateTime: a.encounterDateTime,
|
|
128
128
|
encounterUuid: a.encounterUuid
|
|
@@ -139,9 +139,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
139
139
|
})
|
|
140
140
|
).sort((r, a) => r.formName.localeCompare(a.formName));
|
|
141
141
|
}, [U, t]), H = d((e) => {
|
|
142
|
-
|
|
142
|
+
C(e), M(!0);
|
|
143
143
|
}, []), $ = d(() => {
|
|
144
|
-
M(!1),
|
|
144
|
+
M(!1), C(null);
|
|
145
145
|
}, []), v = d((e) => {
|
|
146
146
|
globalThis.dispatchEvent(
|
|
147
147
|
new CustomEvent($e, {
|
|
@@ -158,7 +158,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
158
158
|
(e, r) => {
|
|
159
159
|
switch (r) {
|
|
160
160
|
case "recordedOn":
|
|
161
|
-
return /* @__PURE__ */ n(
|
|
161
|
+
return /* @__PURE__ */ n(Re, { onClick: () => H(e), children: e.recordedOn });
|
|
162
162
|
case "recordedBy":
|
|
163
163
|
return e.recordedBy;
|
|
164
164
|
case "actions":
|
|
@@ -180,20 +180,20 @@ const ke = "FormsTable-module_formsTableBody__SvGha", Ve = "FormsTable-module_mo
|
|
|
180
180
|
[H, v, u, t]
|
|
181
181
|
);
|
|
182
182
|
return /* @__PURE__ */ P(be, { children: [
|
|
183
|
-
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
183
|
+
/* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: S || L || V.length === 0 || B ? /* @__PURE__ */ n(
|
|
184
184
|
j,
|
|
185
185
|
{
|
|
186
186
|
headers: fe,
|
|
187
187
|
ariaLabel: t("FORMS_HEADING"),
|
|
188
188
|
rows: [],
|
|
189
|
-
loading:
|
|
189
|
+
loading: S,
|
|
190
190
|
errorStateMessage: L ? re?.message : void 0,
|
|
191
191
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
192
192
|
renderCell: x,
|
|
193
193
|
className: O.formsTableBody,
|
|
194
194
|
dataTestId: "forms-table"
|
|
195
195
|
}
|
|
196
|
-
) : /* @__PURE__ */ n(
|
|
196
|
+
) : /* @__PURE__ */ n(Se, { align: "start", children: V.map((e, r) => {
|
|
197
197
|
const { formName: a, records: s } = e, f = ce(s);
|
|
198
198
|
return /* @__PURE__ */ n(
|
|
199
199
|
Le,
|
|
@@ -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 { b$ as d, c0 as f, c1 as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DObT2IBb.js";
|
|
2
|
+
import { b$ as d, c0 as f, c1 as e } from "./index-Cyru_COR.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 { b$ as v, c0 as C, c1 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-DObT2IBb.js";
|
|
2
|
+
import { b$ as v, c0 as C, c1 as e } from "./index-Cyru_COR.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { v as
|
|
2
|
+
import { v as x, z as G, u as V, l as H, a as Q, j, k as Y, m as J, n as P, M as W, o as X, H as Z, r as ee, Y as ae, x as se, B, E as re, D as te, w as ie, G as oe, I as ne, J as de, N as le } from "./index-Cyru_COR.js";
|
|
3
3
|
import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as me, useEffect as L, useMemo as g } from "react";
|
|
5
5
|
const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
|
|
@@ -132,27 +132,27 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
132
132
|
conceptUuid: r = [],
|
|
133
133
|
hideThumbnail: t = !1,
|
|
134
134
|
scope: e = "all"
|
|
135
|
-
} = d, m = me(/* @__PURE__ */ new Set()), i =
|
|
135
|
+
} = d, m = me(/* @__PURE__ */ new Set()), i = x(), { addNotification: p } = G(), { t: c } = V(), b = ce({
|
|
136
136
|
queries: u.map((a) => ({
|
|
137
137
|
queryKey: Re(a),
|
|
138
|
-
queryFn: () =>
|
|
138
|
+
queryFn: () => H(a),
|
|
139
139
|
enabled: !!a
|
|
140
140
|
}))
|
|
141
141
|
});
|
|
142
142
|
L(() => {
|
|
143
|
-
const a = b.some((
|
|
143
|
+
const a = b.some((q) => q.isError), y = m.current.size > 0;
|
|
144
144
|
a && !y ? (p({
|
|
145
145
|
title: c("ERROR_DEFAULT_TITLE"),
|
|
146
146
|
message: c("ERROR_FETCHING_OBSERVATIONS"),
|
|
147
147
|
type: "error"
|
|
148
148
|
}), m.current.add(0)) : !a && y && m.current.clear();
|
|
149
149
|
}, [b, p, c]);
|
|
150
|
-
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), h = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter",
|
|
150
|
+
const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), v = g(() => [.../* @__PURE__ */ new Set([...T, ...r])], [T, r]), h = g(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", F = Q(
|
|
151
151
|
l,
|
|
152
152
|
o
|
|
153
153
|
), {
|
|
154
154
|
data: _,
|
|
155
|
-
isLoading:
|
|
155
|
+
isLoading: w,
|
|
156
156
|
isError: N,
|
|
157
157
|
refetch: S
|
|
158
158
|
} = ue({
|
|
@@ -171,7 +171,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
171
171
|
v,
|
|
172
172
|
o
|
|
173
173
|
),
|
|
174
|
-
enabled: !!i && v.length > 0 && h && !
|
|
174
|
+
enabled: !!i && v.length > 0 && h && !F
|
|
175
175
|
});
|
|
176
176
|
J(
|
|
177
177
|
(a) => {
|
|
@@ -193,11 +193,11 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
193
193
|
e === "latest-encounter" && (a = W(a));
|
|
194
194
|
const y = X(a);
|
|
195
195
|
return Z(y);
|
|
196
|
-
}, [_, e]),
|
|
196
|
+
}, [_, e]), k = [
|
|
197
197
|
{ key: "name", header: "name" },
|
|
198
198
|
{ key: "value", header: "value" },
|
|
199
199
|
{ key: "form", header: "form" }
|
|
200
|
-
], A =
|
|
200
|
+
], A = w || !h, D = N && h, C = (!_ || _.entry?.length === 0 || v.length === 0) && h, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, z = C ? c("NO_OBSERVATIONS_FOUND") : void 0, M = $.length > 0 && !A && !D, f = d.titleTranslationKey, E = f ? c(f) : "";
|
|
201
201
|
return /* @__PURE__ */ I(
|
|
202
202
|
"div",
|
|
203
203
|
{
|
|
@@ -216,7 +216,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
216
216
|
children: /* @__PURE__ */ n("p", { children: E })
|
|
217
217
|
}
|
|
218
218
|
),
|
|
219
|
-
|
|
219
|
+
M ? /* @__PURE__ */ n(
|
|
220
220
|
Oe,
|
|
221
221
|
{
|
|
222
222
|
groupedData: $,
|
|
@@ -226,7 +226,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
226
226
|
) : /* @__PURE__ */ n(
|
|
227
227
|
ae,
|
|
228
228
|
{
|
|
229
|
-
headers:
|
|
229
|
+
headers: k,
|
|
230
230
|
rows: [],
|
|
231
231
|
ariaLabel: c("OBSERVATIONS"),
|
|
232
232
|
loading: A,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c2 as we, c3 as z, c4 as xt, c5 as B, c0 as q, c1 as y, c6 as Ro, c7 as ye, c8 as R, c9 as _, ca as k, cb as N, cc as A, cd as bs, ce as ir, cf as $e, cg as G, ch as Hn, ci as Vn, cj as dt, ck as D, cl as xs, cm as cn, cn as Be, co as ws, cp as qt, cq as zt, cr as $s, cs as Cs, ct as $n, cu as Ss, cv as Nr, cw as Bt, cx as zo, cy as ks, cz as Es, cA as j, cB as Gr, cC as Ms, cD as Ds, cE as sr, cF as As, cG as Ts, cH as zn, cI as Fs, cJ as Is, cK as Z, cL as Ps, cM as Ls } from "./index-
|
|
1
|
+
import { c2 as we, c3 as z, c4 as xt, c5 as B, c0 as q, c1 as y, c6 as Ro, c7 as ye, c8 as R, c9 as _, ca as k, cb as N, cc as A, cd as bs, ce as ir, cf as $e, cg as G, ch as Hn, ci as Vn, cj as dt, ck as D, cl as xs, cm as cn, cn as Be, co as ws, cp as qt, cq as zt, cr as $s, cs as Cs, ct as $n, cu as Ss, cv as Nr, cw as Bt, cx as zo, cy as ks, cz as Es, cA as j, cB as Gr, cC as Ms, cD as Ds, cE as sr, cF as As, cG as Ts, cH as zn, cI as Fs, cJ as Is, cK as Z, cL as Ps, cM as Ls } from "./index-Cyru_COR.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { u as g, e as u, bM as b, bW as f, bX as x, bY as p, aK as _, bS as N } from "./index-
|
|
2
|
+
import { u as g, e as u, bM as b, bW as f, bX as x, bY as p, aK as _, bS as N } from "./index-Cyru_COR.js";
|
|
3
3
|
import { lazy as h, useMemo as t, Suspense as E } from "react";
|
|
4
4
|
import "@tanstack/react-query";
|
|
5
|
-
import { u as C } from "./hook-
|
|
5
|
+
import { u as C } from "./hook-DG_62LQV.js";
|
|
6
6
|
const L = {
|
|
7
7
|
"org.bahmni.clinical.v2.search": h(
|
|
8
|
-
() => import("./index-
|
|
8
|
+
() => import("./index-d3QGz53a.js")
|
|
9
9
|
)
|
|
10
10
|
}, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", P = "index-module_message__Ib5Iw", l = {
|
|
11
11
|
page: v,
|