@bahmni/clinical-app 0.0.1-dev.361 → 0.0.1-dev.363
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-CkN6CM0B.js → ConsultationPage-DsRw8YYn.js} +24 -24
- package/dist/{DocumentsTable-CuUXGGnu-BsbCkW1d.js → DocumentsTable-ClhCu3Gn-Tup4hVRb.js} +33 -33
- package/dist/{FormsTable-Brl_a7KT-BDb-E0HM.js → FormsTable-B1Jf7c-q-Crxaz3NO.js} +60 -60
- package/dist/{LNWAZHJI-COvorflD.js → LNWAZHJI-Ib9pzjmH.js} +2 -2
- package/dist/{MWZ6AO7Z-BfzMWGu3.js → MWZ6AO7Z-CDcmt8y2.js} +2 -2
- package/dist/{Observations-BhHohufb-CIINxrrm.js → Observations-BU2hE5R4-dUv2oABZ.js} +43 -43
- package/dist/{YPM2AS64-h4ErisFG.js → YPM2AS64-C16VLrcR.js} +1 -1
- package/dist/{hook-DliNUT4D.js → hook-Co0J9NE_.js} +1 -1
- package/dist/{index-AZbvK4Xt.js → index-2_vXyzzs.js} +20 -18
- package/dist/{index-CKLsqmrZ.js → index-DQ3rDVjy.js} +16057 -16066
- package/dist/{index-CilfHn_F.js → index-zVjXa4YT.js} +31 -33
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +1 -0
- package/dist/locales/locale_es.json +1 -0
- package/dist/pages/list/extensions/searchHandler/index.d.ts.map +1 -1
- package/dist/pages/list/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { C as H, E as ENCOUNTER_CONCEPTS_URL, Y as Yr, D as Di, F as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, L as Dm, N as pSe, g as gr, O as kH2, P as IH2, T as TH2, Q as gM2, W as rc1, X as AH2, Z as vE, _ as Ii, a0 as Id, a1 as iE, a2 as Nd, a3 as Es, a4 as dist, a5 as yt, a6 as ge, a7 as ns, a8 as Ib, a9 as Vb, aa as Hb, ab as BH2, ac as KH2, ad as oV2, K as K1, v as v3, ae as Bb, af as sH2, ag as VH2, ah as pC2, ai as XH2, aj as JH2, z as zYt, ak as w_, al as RH2, am as q_, an as Os, ao as __, ap as iv, aq as Fb, ar as HH2, as as Jb, at as Zb, au as CLINICAL_V2_CONFIG_BASE_URL, av as s_, aw as PE, ax as Qr, ay as t_, az as Cb, aA as cv, aB as Og2, aC as v_, aD as n_, aE as o_, aF as dv, aG as DH2, aH as Sv, aI as Nb, aJ as a_, aK as Kt, aL as jr, aM as yv, aN as vv, J as J0, aO as B_, aP as S_, aQ as A_, y as yYt, aR as iC2, aS as sC2, aT as G_, aU as Y_, 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 z_, b1 as K_, b2 as jE, b3 as Pb, b4 as FE, b5 as J_, b6 as an, b7 as N4, b8 as c3, b9 as rC2, ba as Q_, bb as X_, bc as Pi, bd as rs, be as C_, bf as Gb, bg as Tv, bh as uv, bi as lv, bj as av, bk as CDSS_SERVER_CONFIG_URL, bl as SYt, bm as UH2, bn as Jy, bo as L_, bp as x_, bq as $H2, br as ml1, bs as U_, bt as M_, bu as k_, bv as EYt, bw as mYt, bx as HE, by as F_, bz as GH2, bA as rE, bB as BAHMNI_CLINICAL_PATH, bC as bE, bD as H_, bE as qH2, bF as WH2, bG as QE2, bH as NGt, bI as EE, bJ as _Yt } from "./index-DQ3rDVjy.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-Co0J9NE_.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 : {};
|
|
@@ -132926,7 +132926,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
132926
132926
|
return Eo.push("plural"), !0;
|
|
132927
132927
|
}, f3 = function(De, xe) {
|
|
132928
132928
|
return Eo.pop(), ha({ id: De, value: xe }, go());
|
|
132929
|
-
}, p3 = M1("whitespace"), u3 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, d3 = D0([[" ", "\r"], " ", "
", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), h3 = M1("syntax pattern"), _3 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/, A3 = D0([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", ""], ["─", "❵"], ["➔", "⯿"], ["⸀", ""], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), m3 = M1("optional whitespace"),
|
|
132929
|
+
}, p3 = M1("whitespace"), u3 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, d3 = D0([[" ", "\r"], " ", "
", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), h3 = M1("syntax pattern"), _3 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/, A3 = D0([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", ""], ["─", "❵"], ["➔", "⯿"], ["⸀", ""], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), m3 = M1("optional whitespace"), E3 = M1("number"), g3 = "-", w3 = pr("-", !1), C3 = function(De, xe) {
|
|
132930
132930
|
return xe ? De ? -xe : xe : 0;
|
|
132931
132931
|
}, y3 = M1("double apostrophes"), hc = "''", Sf = pr("''", !1), R3 = function() {
|
|
132932
132932
|
return "'";
|
|
@@ -133131,7 +133131,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
133131
133131
|
}
|
|
133132
133132
|
function uu() {
|
|
133133
133133
|
var De, xe, Ze;
|
|
133134
|
-
return gt++, De = ye, _.charCodeAt(ye) === 45 ? (xe =
|
|
133134
|
+
return gt++, De = ye, _.charCodeAt(ye) === 45 ? (xe = g3, ye++) : (xe = m, gt === 0 && St(w3)), xe === m && (xe = null), xe !== m && (Ze = _u()) !== m ? (hn = De, De = xe = C3(xe, Ze)) : (ye = De, De = m), gt--, De === m && (xe = m, gt === 0 && St(E3)), De;
|
|
133135
133135
|
}
|
|
133136
133136
|
function Ac() {
|
|
133137
133137
|
var De, xe;
|
|
@@ -139625,10 +139625,10 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
|
|
|
139625
139625
|
selectedAllergyItem,
|
|
139626
139626
|
duplicateNotification: duplicateNotification$2
|
|
139627
139627
|
}, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
|
|
139628
|
-
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = K1(), d =
|
|
139629
|
-
|
|
139630
|
-
), h =
|
|
139631
|
-
|
|
139628
|
+
const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = K1(), d = v3(
|
|
139629
|
+
zYt.ALLERGIES
|
|
139630
|
+
), h = v3(
|
|
139631
|
+
zYt.EDIT_ALLERGIES
|
|
139632
139632
|
), [E, C] = useState(""), [R, T] = useState(null), [M, x] = useState(!1), [I, k] = useState(
|
|
139633
139633
|
null
|
|
139634
139634
|
), {
|
|
@@ -139950,8 +139950,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
|
|
|
139950
139950
|
selectedInvestigationItem,
|
|
139951
139951
|
duplicateNotification: duplicateNotification$1
|
|
139952
139952
|
}, InvestigationsForm = React__default.memo(() => {
|
|
139953
|
-
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s =
|
|
139954
|
-
|
|
139953
|
+
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s = v3(
|
|
139954
|
+
zYt.INVESTIGATIONS
|
|
139955
139955
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: M } = q_(), I = M.includes("MATCHED") ? T?.id : void 0, {
|
|
139956
139956
|
data: k,
|
|
139957
139957
|
refetch: N,
|
|
@@ -140363,8 +140363,8 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
|
|
|
140363
140363
|
selectedConditionItem,
|
|
140364
140364
|
duplicateNotification
|
|
140365
140365
|
}, ConditionsAndDiagnoses = React__default.memo(() => {
|
|
140366
|
-
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s =
|
|
140367
|
-
|
|
140366
|
+
const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s = v3(
|
|
140367
|
+
zYt.CONDITIONS_AND_DIAGNOSES
|
|
140368
140368
|
), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
|
|
140369
140369
|
selectedDiagnoses: T,
|
|
140370
140370
|
selectedConditions: M,
|
|
@@ -143319,7 +143319,7 @@ function useSubmittedEncounterForms(p) {
|
|
|
143319
143319
|
), useMemo(() => {
|
|
143320
143320
|
const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
|
|
143321
143321
|
for (const T of C) {
|
|
143322
|
-
const M =
|
|
143322
|
+
const M = yYt(T);
|
|
143323
143323
|
if (!M) continue;
|
|
143324
143324
|
const x = p.find((I) => I.name === M);
|
|
143325
143325
|
x && R.add(x.uuid);
|
|
@@ -143343,8 +143343,8 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
|
|
|
143343
143343
|
observationFormsError: C,
|
|
143344
143344
|
submittedFormUuids: R = EMPTY_SET
|
|
143345
143345
|
}) => {
|
|
143346
|
-
const { t: T } = useTranslation(), M =
|
|
143347
|
-
|
|
143346
|
+
const { t: T } = useTranslation(), M = v3(
|
|
143347
|
+
zYt.OBSERVATIONS
|
|
143348
143348
|
), [x, I] = useState(""), [k, N] = useState(null), { getFormData: O } = useObservationFormsStore(), z = useMemo(() => {
|
|
143349
143349
|
if (!x.trim()) return h;
|
|
143350
143350
|
const ee = x.toLowerCase().trim().split(/\s+/);
|
|
@@ -143879,7 +143879,7 @@ const InputControlRenderer = ({
|
|
|
143879
143879
|
encounterType: c,
|
|
143880
143880
|
encounterSessionStartContext: a
|
|
143881
143881
|
}) => {
|
|
143882
|
-
const s =
|
|
143882
|
+
const s = v3(p.privilege);
|
|
143883
143883
|
if (p.encounterTypes && !p.encounterTypes.includes(c) || !s)
|
|
143884
143884
|
return null;
|
|
143885
143885
|
const f = p.component;
|
|
@@ -144921,7 +144921,7 @@ const ConsultationPad = ({
|
|
|
144921
144921
|
visitUuids: f
|
|
144922
144922
|
}) => {
|
|
144923
144923
|
const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = q_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, I = (N, O, z) => {
|
|
144924
|
-
const B =
|
|
144924
|
+
const B = SYt(N.type);
|
|
144925
144925
|
if (!B)
|
|
144926
144926
|
return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: N.type }) }) }, `${N.type}-${O}`);
|
|
144927
144927
|
const Z = O < z - 1;
|
|
@@ -145114,8 +145114,8 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145114
145114
|
isLoading: a
|
|
145115
145115
|
}) => {
|
|
145116
145116
|
const { t: s } = useTranslation();
|
|
145117
|
-
return
|
|
145118
|
-
|
|
145117
|
+
return v3(
|
|
145118
|
+
zYt.ENCOUNTER
|
|
145119
145119
|
) ? a ? /* @__PURE__ */ jsx(
|
|
145120
145120
|
$H2,
|
|
145121
145121
|
{
|
|
@@ -145194,7 +145194,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145194
145194
|
"data-active-encounter-uuid": T && M?.id ? M.id : void 0,
|
|
145195
145195
|
"data-active-practitioner-uuid": s?.uuid ?? void 0,
|
|
145196
145196
|
children: [
|
|
145197
|
-
/* @__PURE__ */ jsx(
|
|
145197
|
+
/* @__PURE__ */ jsx(EYt, {}),
|
|
145198
145198
|
/* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
|
|
145199
145199
|
/* @__PURE__ */ jsx(
|
|
145200
145200
|
ConsultationActionButton,
|
|
@@ -145205,7 +145205,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
|
|
|
145205
145205
|
}
|
|
145206
145206
|
),
|
|
145207
145207
|
/* @__PURE__ */ jsx(
|
|
145208
|
-
|
|
145208
|
+
mYt,
|
|
145209
145209
|
{
|
|
145210
145210
|
printOptions: c,
|
|
145211
145211
|
renderContext: Z,
|
|
@@ -145417,7 +145417,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145417
145417
|
);
|
|
145418
145418
|
return c || p[0];
|
|
145419
145419
|
}, filterControlsByPrivileges = (p) => p.filter(
|
|
145420
|
-
(c) =>
|
|
145420
|
+
(c) => v3(c.requiredPrivileges)
|
|
145421
145421
|
), filterSectionsByPrivileges = (p) => p.map((c) => ({
|
|
145422
145422
|
...c,
|
|
145423
145423
|
controls: filterControlsByPrivileges(c.controls)
|
|
@@ -145549,7 +145549,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145549
145549
|
const re = () => {
|
|
145550
145550
|
const ae = M.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
145551
145551
|
return ae && c.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
145552
|
-
|
|
145552
|
+
_Yt,
|
|
145553
145553
|
{
|
|
145554
145554
|
programUUID: ae,
|
|
145555
145555
|
config: {
|
|
@@ -145568,7 +145568,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
145568
145568
|
{
|
|
145569
145569
|
breadcrumbItems: B,
|
|
145570
145570
|
globalActions: k,
|
|
145571
|
-
userMenu: /* @__PURE__ */ jsx(
|
|
145571
|
+
userMenu: /* @__PURE__ */ jsx(NGt, {}),
|
|
145572
145572
|
sideNavItems: te,
|
|
145573
145573
|
activeSideNavItemId: ee,
|
|
145574
145574
|
onSideNavItemClick: le,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { g as G, u as Y, K as W,
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { g as G, u as Y, K as W, f as J, n as X, a as Z, U as ee, p as te } from "./index-DQ3rDVjy.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,23 +33,23 @@ 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 }] : [], fe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, U] = l(!1), [o, w] = l(
|
|
38
38
|
null
|
|
39
|
-
), [$,
|
|
39
|
+
), [$, I] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = Y(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [
|
|
41
|
+
), E = G(), { t: n } = Y(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [O, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
|
|
42
42
|
w(e), U(!0);
|
|
43
|
-
}, []), H =
|
|
44
|
-
U(!1), w(null),
|
|
45
|
-
}, []), v =
|
|
46
|
-
|
|
43
|
+
}, []), H = h(() => {
|
|
44
|
+
U(!1), w(null), I(/* @__PURE__ */ new Set());
|
|
45
|
+
}, []), v = h((e) => {
|
|
46
|
+
I((t) => new Set(t).add(e));
|
|
47
47
|
}, []), { data: i, isLoading: q, isError: b, error: y } = ae({
|
|
48
48
|
queryKey: [
|
|
49
49
|
"documents",
|
|
50
50
|
E,
|
|
51
51
|
g,
|
|
52
|
-
|
|
52
|
+
O,
|
|
53
53
|
u
|
|
54
54
|
],
|
|
55
55
|
enabled: !!E,
|
|
@@ -57,20 +57,20 @@ const Te = [
|
|
|
57
57
|
E,
|
|
58
58
|
g,
|
|
59
59
|
u,
|
|
60
|
-
|
|
60
|
+
O
|
|
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
|
b && L({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: y?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [b, y, L, n]),
|
|
73
|
+
}, [b, y, L, 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
|
+
), f = _(
|
|
98
98
|
() => a?.fields ?? Te,
|
|
99
99
|
[a?.fields]
|
|
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(
|
|
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(f, n), [f, n]), z = _(
|
|
101
|
+
() => f.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "attachments"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
105
|
+
[f]
|
|
106
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
|
{
|
|
@@ -153,7 +153,7 @@ const Te = [
|
|
|
153
153
|
dataTestId: "documents-table",
|
|
154
154
|
pageSize: u,
|
|
155
155
|
totalItems: F,
|
|
156
|
-
page:
|
|
156
|
+
page: O,
|
|
157
157
|
onPageChange: K
|
|
158
158
|
}
|
|
159
159
|
) }),
|
|
@@ -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
|
+
fe as default
|
|
227
227
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as i, jsxs as G, Fragment as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as i, jsxs as G, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge, g as pe, v as be, J as Ne, b as Oe, c as Te, h as Ie, d as Ee, e as Ae, i as ve, R as _e, y as Se, s as K, a as Fe, j as Y, t as x, n as Re, U as P, S as Ue, $ as Ce, p as Be, G as Le, z as De } from "./index-DQ3rDVjy.js";
|
|
3
3
|
import { useQueryClient as Me, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Q, useMemo as d, useCallback as l } from "react";
|
|
5
5
|
const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
@@ -7,20 +7,20 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
7
7
|
modalHeading: qe,
|
|
8
8
|
customAccordianItem: we
|
|
9
9
|
}, He = "startConsultation", Ge = ({
|
|
10
|
-
episodeOfCareUuids:
|
|
10
|
+
episodeOfCareUuids: R,
|
|
11
11
|
encounterUuids: u,
|
|
12
12
|
config: J,
|
|
13
13
|
disableActions: X = !1,
|
|
14
|
-
activeEncounterUuid:
|
|
14
|
+
activeEncounterUuid: h = null
|
|
15
15
|
}) => {
|
|
16
|
-
const { t: n } =
|
|
16
|
+
const { t: n } = ge(), c = pe(), [g, U] = Q(!1), [s, C] = Q(null), {
|
|
17
17
|
numberOfVisits: Z,
|
|
18
18
|
hideThumbnail: W = !1,
|
|
19
19
|
forms: p
|
|
20
20
|
} = J ?? {}, ee = be(
|
|
21
21
|
De.EDIT_OBSERVATIONS
|
|
22
|
-
), { userPrivileges: b } = Ne(),
|
|
23
|
-
|
|
22
|
+
), { userPrivileges: b } = Ne(), I = ee && !X && !!h, B = Oe(
|
|
23
|
+
R,
|
|
24
24
|
u
|
|
25
25
|
), re = Me(), {
|
|
26
26
|
data: L = [],
|
|
@@ -29,7 +29,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
29
29
|
error: oe,
|
|
30
30
|
refetch: ae
|
|
31
31
|
} = O({
|
|
32
|
-
queryKey: ["forms", c,
|
|
32
|
+
queryKey: ["forms", c, R],
|
|
33
33
|
queryFn: () => Te(c, void 0, Z),
|
|
34
34
|
enabled: !!c && !B
|
|
35
35
|
}), k = d(() => {
|
|
@@ -41,7 +41,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
41
41
|
)), e;
|
|
42
42
|
}, [L, u, p]), { data: N = [] } = O({
|
|
43
43
|
queryKey: ["observationForms"],
|
|
44
|
-
queryFn: () =>
|
|
44
|
+
queryFn: () => Ie()
|
|
45
45
|
}), q = l(
|
|
46
46
|
(e) => {
|
|
47
47
|
const r = N.find((a) => a.name === e);
|
|
@@ -54,32 +54,32 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
54
54
|
},
|
|
55
55
|
[N, b]
|
|
56
56
|
), f = l(
|
|
57
|
-
(e) => !
|
|
58
|
-
[
|
|
57
|
+
(e) => !h || e.encounterUuid !== h ? !1 : q(e.formName),
|
|
58
|
+
[h, q]
|
|
59
59
|
), w = l(
|
|
60
60
|
(e) => N.find((r) => r.name === e)?.uuid,
|
|
61
61
|
[N]
|
|
62
|
-
),
|
|
63
|
-
if (
|
|
64
|
-
return w(
|
|
65
|
-
}, [
|
|
62
|
+
), E = d(() => {
|
|
63
|
+
if (s)
|
|
64
|
+
return w(s.formName);
|
|
65
|
+
}, [s, w]), {
|
|
66
66
|
data: m,
|
|
67
|
-
isLoading:
|
|
68
|
-
isError:
|
|
67
|
+
isLoading: te,
|
|
68
|
+
isError: se,
|
|
69
69
|
error: A
|
|
70
70
|
} = O({
|
|
71
|
-
queryKey: ["formMetadata",
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
enabled: !!
|
|
71
|
+
queryKey: ["formMetadata", E],
|
|
72
|
+
queryFn: () => Ee(E),
|
|
73
|
+
enabled: !!E && g
|
|
74
74
|
}), {
|
|
75
75
|
data: v,
|
|
76
76
|
isLoading: ne,
|
|
77
77
|
isError: ie,
|
|
78
78
|
error: _
|
|
79
79
|
} = O({
|
|
80
|
-
queryKey: ["formsEncounterFHIR",
|
|
81
|
-
queryFn: () => Ae(
|
|
82
|
-
enabled: !!
|
|
80
|
+
queryKey: ["formsEncounterFHIR", s?.encounterUuid],
|
|
81
|
+
queryFn: () => Ae(s.encounterUuid),
|
|
82
|
+
enabled: !!s?.encounterUuid && g
|
|
83
83
|
});
|
|
84
84
|
ve(
|
|
85
85
|
(e) => {
|
|
@@ -87,12 +87,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
87
87
|
},
|
|
88
88
|
[c]
|
|
89
89
|
);
|
|
90
|
-
const de = d(() => !v?.entry || !
|
|
90
|
+
const de = d(() => !v?.entry || !s?.formName ? [] : v.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => _e(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [v, s?.formName]), le = d(() => {
|
|
91
91
|
if (!m?.schema) return;
|
|
92
92
|
const e = [], r = (o) => {
|
|
93
93
|
(o ?? []).forEach((a) => {
|
|
94
|
-
const
|
|
95
|
-
|
|
94
|
+
const t = a;
|
|
95
|
+
t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
98
|
return r(
|
|
@@ -101,12 +101,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
101
101
|
}, [m]), me = d(() => {
|
|
102
102
|
if (!m?.schema) return;
|
|
103
103
|
const e = {}, r = (o, a) => {
|
|
104
|
-
for (const
|
|
105
|
-
if (
|
|
106
|
-
const
|
|
107
|
-
r(
|
|
104
|
+
for (const t of o)
|
|
105
|
+
if (t.type === "section") {
|
|
106
|
+
const F = t.label?.value ?? "Section";
|
|
107
|
+
r(t.controls ?? [], F);
|
|
108
108
|
} else
|
|
109
|
-
|
|
109
|
+
t.id != null && a && (e[String(t.id)] = a), t.controls && r(t.controls, a);
|
|
110
110
|
};
|
|
111
111
|
return r(
|
|
112
112
|
m.schema.controls ?? [],
|
|
@@ -127,8 +127,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
127
127
|
() => [...y, { key: "actions", header: n("ACTIONS") }],
|
|
128
128
|
[y, n]
|
|
129
129
|
), ce = l(
|
|
130
|
-
(e) =>
|
|
131
|
-
[
|
|
130
|
+
(e) => I && e.some((r) => f(r)) ? H : y,
|
|
131
|
+
[I, f, H, y]
|
|
132
132
|
), fe = y, ye = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", sortable: !0 },
|
|
@@ -140,12 +140,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
140
140
|
(r, o) => {
|
|
141
141
|
const a = o.formName;
|
|
142
142
|
r[a] ??= [];
|
|
143
|
-
const
|
|
143
|
+
const t = o.providers.map((F) => F.providerName).filter(Boolean).join(", ");
|
|
144
144
|
return r[a].push({
|
|
145
145
|
id: o.encounterUuid,
|
|
146
146
|
formName: o.formName,
|
|
147
|
-
recordedOn:
|
|
148
|
-
recordedBy:
|
|
147
|
+
recordedOn: Fe(o.encounterDateTime, n, !0).formattedResult,
|
|
148
|
+
recordedBy: t ?? "--",
|
|
149
149
|
encounterDateTime: o.encounterDateTime,
|
|
150
150
|
encounterUuid: o.encounterUuid
|
|
151
151
|
}), r;
|
|
@@ -156,15 +156,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
156
156
|
([r, o]) => ({
|
|
157
157
|
formName: r,
|
|
158
158
|
records: o.sort(
|
|
159
|
-
(a,
|
|
159
|
+
(a, t) => t.encounterDateTime - a.encounterDateTime
|
|
160
160
|
)
|
|
161
161
|
})
|
|
162
162
|
).sort((r, o) => r.formName.localeCompare(o.formName));
|
|
163
|
-
}, [k, n]),
|
|
163
|
+
}, [k, n]), $ = l((e) => {
|
|
164
164
|
C(e), U(!0);
|
|
165
|
-
}, []),
|
|
165
|
+
}, []), z = l(() => {
|
|
166
166
|
U(!1), C(null);
|
|
167
|
-
}, []),
|
|
167
|
+
}, []), S = l((e) => {
|
|
168
168
|
globalThis.dispatchEvent(
|
|
169
169
|
new CustomEvent(He, {
|
|
170
170
|
detail: {
|
|
@@ -176,11 +176,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
176
176
|
}
|
|
177
177
|
})
|
|
178
178
|
);
|
|
179
|
-
}, []),
|
|
179
|
+
}, []), j = l(
|
|
180
180
|
(e, r) => {
|
|
181
181
|
switch (r) {
|
|
182
182
|
case "recordedOn":
|
|
183
|
-
return /* @__PURE__ */ i(
|
|
183
|
+
return /* @__PURE__ */ i(Re, { onClick: () => $(e), children: e.recordedOn });
|
|
184
184
|
case "recordedBy":
|
|
185
185
|
return e.recordedBy;
|
|
186
186
|
case "actions":
|
|
@@ -191,7 +191,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
191
191
|
kind: "ghost",
|
|
192
192
|
size: "sm",
|
|
193
193
|
testId: `edit-form-${e.encounterUuid}`,
|
|
194
|
-
onClick: () =>
|
|
194
|
+
onClick: () => S(e),
|
|
195
195
|
children: /* @__PURE__ */ i(x, {})
|
|
196
196
|
}
|
|
197
197
|
) : null;
|
|
@@ -199,9 +199,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
[
|
|
202
|
+
[$, S, f, n]
|
|
203
203
|
);
|
|
204
|
-
return /* @__PURE__ */ G(
|
|
204
|
+
return /* @__PURE__ */ G(he, { children: [
|
|
205
205
|
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: D || M || V.length === 0 || B ? /* @__PURE__ */ i(
|
|
206
206
|
P,
|
|
207
207
|
{
|
|
@@ -211,12 +211,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
211
211
|
loading: D,
|
|
212
212
|
errorStateMessage: M ? oe?.message : void 0,
|
|
213
213
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
214
|
-
renderCell:
|
|
214
|
+
renderCell: j,
|
|
215
215
|
className: T.formsTableBody,
|
|
216
216
|
dataTestId: "forms-table"
|
|
217
217
|
}
|
|
218
218
|
) : /* @__PURE__ */ i(Ue, { align: "start", children: V.map((e, r) => {
|
|
219
|
-
const { formName: o, records: a } = e,
|
|
219
|
+
const { formName: o, records: a } = e, t = ce(a);
|
|
220
220
|
return /* @__PURE__ */ i(
|
|
221
221
|
Ce,
|
|
222
222
|
{
|
|
@@ -227,14 +227,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
227
227
|
children: /* @__PURE__ */ i(
|
|
228
228
|
P,
|
|
229
229
|
{
|
|
230
|
-
headers:
|
|
230
|
+
headers: t,
|
|
231
231
|
ariaLabel: n("FORMS_HEADING"),
|
|
232
232
|
rows: a,
|
|
233
233
|
loading: !1,
|
|
234
234
|
errorStateMessage: "",
|
|
235
235
|
sortable: ye,
|
|
236
236
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
237
|
-
renderCell:
|
|
237
|
+
renderCell: j,
|
|
238
238
|
className: T.formsTableBody,
|
|
239
239
|
dataTestId: `forms-table-${o}`
|
|
240
240
|
}
|
|
@@ -243,30 +243,30 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
243
243
|
o
|
|
244
244
|
);
|
|
245
245
|
}) }) }),
|
|
246
|
-
|
|
246
|
+
g && s && /* @__PURE__ */ i(
|
|
247
247
|
Be,
|
|
248
248
|
{
|
|
249
249
|
id: "modalIdForActionAreaLayout",
|
|
250
250
|
portalId: "main-display-area",
|
|
251
|
-
open:
|
|
252
|
-
onRequestClose:
|
|
251
|
+
open: g,
|
|
252
|
+
onRequestClose: z,
|
|
253
253
|
modalHeading: /* @__PURE__ */ G("div", { className: T.modalHeading, children: [
|
|
254
|
-
/* @__PURE__ */ i("span", { children:
|
|
255
|
-
|
|
254
|
+
/* @__PURE__ */ i("span", { children: s.formName }),
|
|
255
|
+
I && f(s) && /* @__PURE__ */ i(
|
|
256
256
|
Y,
|
|
257
257
|
{
|
|
258
258
|
label: n("EDIT_OBSERVATION_FORM"),
|
|
259
259
|
kind: "ghost",
|
|
260
260
|
size: "sm",
|
|
261
|
-
testId: `edit-form-modal-${
|
|
261
|
+
testId: `edit-form-modal-${s.encounterUuid}`,
|
|
262
262
|
onClick: () => {
|
|
263
|
-
|
|
263
|
+
z(), S(s);
|
|
264
264
|
},
|
|
265
265
|
children: /* @__PURE__ */ i(x, {})
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
] }),
|
|
269
|
-
modalLabel: `${
|
|
269
|
+
modalLabel: `${s.recordedOn} | ${s.recordedBy}`,
|
|
270
270
|
passiveModal: !0,
|
|
271
271
|
size: "md",
|
|
272
272
|
testId: "form-details-modal",
|
|
@@ -274,11 +274,11 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
274
274
|
Le,
|
|
275
275
|
{
|
|
276
276
|
observations: de,
|
|
277
|
-
isLoading:
|
|
278
|
-
isError:
|
|
277
|
+
isLoading: te || ne,
|
|
278
|
+
isError: se || ie,
|
|
279
279
|
errorMessage: ue,
|
|
280
280
|
emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
|
|
281
|
-
testIdPrefix:
|
|
281
|
+
testIdPrefix: s.formName,
|
|
282
282
|
hideThumbnail: W,
|
|
283
283
|
controlOrder: le,
|
|
284
284
|
sectionMap: me
|
|
@@ -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 { bN as d, bO as f, bP as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-C16VLrcR.js";
|
|
2
|
+
import { bN as d, bO as f, bP as e } from "./index-DQ3rDVjy.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 { bN as v, bO as C, bP 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-C16VLrcR.js";
|
|
2
|
+
import { bN as v, bO as C, bP as e } from "./index-DQ3rDVjy.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|