@bahmni/clinical-app 0.0.1-dev.247 → 0.0.1-dev.249
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/{DocumentsTable-BEZ6qDeD-Dw2j7HDe.js → DocumentsTable-BEZ6qDeD-BSj63dTr.js} +1 -1
- package/dist/{FormsTable-BPfzdJxV-DMftN6QA.js → FormsTable-BPfzdJxV-DBlvr4-y.js} +1 -1
- package/dist/{LNWAZHJI-DwJpd6Ux.js → LNWAZHJI-DZWv40MF.js} +2 -2
- package/dist/{MWZ6AO7Z-Bfz6vbnp.js → MWZ6AO7Z-CnbSvpXb.js} +2 -2
- package/dist/{Observations-Dx_xD9ba-xR7dnX2v.js → Observations-Dx_xD9ba-D1B4hjtg.js} +1 -1
- package/dist/{YPM2AS64-HRyYyUt5.js → YPM2AS64-miIdNYUE.js} +1 -1
- package/dist/components/dashboardContainer/DashboardContainer.d.ts +2 -0
- package/dist/components/dashboardContainer/DashboardContainer.d.ts.map +1 -1
- package/dist/{index-Cmsfn9wE.js → index-QWMbbpmK.js} +60 -53
- package/dist/index.js +1 -1
- package/dist/pages/ConsultationPage.d.ts.map +1 -1
- package/dist/providers/clinicalConfig/models.d.ts +3 -1
- package/dist/providers/clinicalConfig/models.d.ts.map +1 -1
- package/dist/providers/clinicalConfig/schema.json.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te, E as ae } from "./index-
|
|
2
|
+
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te, E as ae } from "./index-QWMbbpmK.js";
|
|
3
3
|
import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
|
|
4
4
|
const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
|
|
5
5
|
documentsTableBody: ne,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, c as ee, e as re, f as ae, a as c, X as te, L as U, m as oe, l as se, b as S, x as ne, N as de, w as ie, $ as ue, p as me, v as le, g as ce, h as fe, i as ye } from "./index-
|
|
2
|
+
import { u as Z, c as ee, e as re, f as ae, a as c, X as te, L as U, m as oe, l as se, b as S, x as ne, N as de, w as ie, $ as ue, p as me, v as le, g as ce, h as fe, i as ye } from "./index-QWMbbpmK.js";
|
|
3
3
|
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
4
4
|
const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
|
|
5
5
|
formsTableBody: pe,
|
|
@@ -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, C as f, D as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-miIdNYUE.js";
|
|
2
|
+
import { B as d, C as f, D as e } from "./index-QWMbbpmK.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 C, C as v, D 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-miIdNYUE.js";
|
|
2
|
+
import { B as C, C as v, D as e } from "./index-QWMbbpmK.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 N, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { c as H, d as K, u as S, j as V, k as M, a as Q, X, M as x, n as j, o as w, H as G, b as z, q as P, K as A, r as Y, s as J, R as W, t as Z, y as ee, z as ae, A as te } from "./index-
|
|
2
|
+
import { c as H, d as K, u as S, j as V, k as M, a as Q, X, M as x, n as j, o as w, H as G, b as z, q as P, K as A, r as Y, s as J, R as W, t as Z, y as ee, z as ae, A as te } from "./index-QWMbbpmK.js";
|
|
3
3
|
import { useRef as se, useEffect as $, useMemo as R } from "react";
|
|
4
4
|
const D = (a, n, d, l, b, r) => {
|
|
5
5
|
const t = Y(a, n, b), s = t.value, o = J(s);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as we, G as z, I as xt, J as B, C as q, D as y, P as Ro, O as ye, S as R, Q as _, T as k, U as N, V as A, W as bs, Y as ir, Z as $e, _ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Os } from "./index-
|
|
1
|
+
import { F as we, G as z, I as xt, J as B, C as q, D as y, P as Ro, O as ye, S as R, Q as _, T as k, U as N, V as A, W as bs, Y as ir, Z as $e, _ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Os } from "./index-QWMbbpmK.js";
|
|
2
2
|
var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -3,6 +3,8 @@ import { DashboardSectionConfig } from '../../pages/models';
|
|
|
3
3
|
export interface DashboardContainerProps {
|
|
4
4
|
sections: DashboardSectionConfig[];
|
|
5
5
|
activeItemId?: string | null;
|
|
6
|
+
/** Incrementing counter to re-trigger scroll on repeated clicks of the same sidebar item */
|
|
7
|
+
scrollTrigger?: number;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* DashboardContainer component that renders dashboard sections as Carbon Tiles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardContainer.d.ts","sourceRoot":"","sources":["../../../src/components/dashboardContainer/DashboardContainer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardContainer.d.ts","sourceRoot":"","sources":["../../../src/components/dashboardContainer/DashboardContainer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAK5D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8FzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -171204,7 +171204,7 @@ const Zht = [
|
|
|
171204
171204
|
},
|
|
171205
171205
|
{
|
|
171206
171206
|
type: "patientDocuments",
|
|
171207
|
-
component: lazy$1(() => import("./DocumentsTable-BEZ6qDeD-
|
|
171207
|
+
component: lazy$1(() => import("./DocumentsTable-BEZ6qDeD-BSj63dTr.js"))
|
|
171208
171208
|
},
|
|
171209
171209
|
{
|
|
171210
171210
|
type: "flowSheet",
|
|
@@ -171212,7 +171212,7 @@ const Zht = [
|
|
|
171212
171212
|
},
|
|
171213
171213
|
{
|
|
171214
171214
|
type: "forms",
|
|
171215
|
-
component: lazy$1(() => import("./FormsTable-BPfzdJxV-
|
|
171215
|
+
component: lazy$1(() => import("./FormsTable-BPfzdJxV-DBlvr4-y.js"))
|
|
171216
171216
|
},
|
|
171217
171217
|
{
|
|
171218
171218
|
type: "labOrders",
|
|
@@ -171220,7 +171220,7 @@ const Zht = [
|
|
|
171220
171220
|
},
|
|
171221
171221
|
{
|
|
171222
171222
|
type: "observations",
|
|
171223
|
-
component: lazy$1(() => import("./Observations-Dx_xD9ba-
|
|
171223
|
+
component: lazy$1(() => import("./Observations-Dx_xD9ba-D1B4hjtg.js"))
|
|
171224
171224
|
},
|
|
171225
171225
|
{
|
|
171226
171226
|
type: "ordersControl",
|
|
@@ -173125,7 +173125,7 @@ var displayValue = (t, e = !1) => {
|
|
|
173125
173125
|
const e = render(() => {
|
|
173126
173126
|
const n = this, [r] = this.#o, [a] = this.#d, [l] = this.#f, [c] = this.#u, [g] = this.#h, [A] = this.#t;
|
|
173127
173127
|
let w;
|
|
173128
|
-
return this.#s ? w = this.#s : (w = lazy(() => import("./LNWAZHJI-
|
|
173128
|
+
return this.#s ? w = this.#s : (w = lazy(() => import("./LNWAZHJI-DZWv40MF.js")), this.#s = w), setupStyleSheet(this.#i, this.#l), createComponent(w, mergeProps({
|
|
173129
173129
|
get queryFlavor() {
|
|
173130
173130
|
return n.#n;
|
|
173131
173131
|
},
|
|
@@ -173223,7 +173223,7 @@ var displayValue = (t, e = !1) => {
|
|
|
173223
173223
|
const e = render(() => {
|
|
173224
173224
|
const n = this, [r] = this.#o, [a] = this.#d, [l] = this.#f, [c] = this.#u, [g] = this.#h, [A] = this.#t, [w] = this.#s;
|
|
173225
173225
|
let _;
|
|
173226
|
-
return this.#c ? _ = this.#c : (_ = lazy(() => import("./MWZ6AO7Z-
|
|
173226
|
+
return this.#c ? _ = this.#c : (_ = lazy(() => import("./MWZ6AO7Z-CnbSvpXb.js")), this.#c = _), setupStyleSheet(this.#i, this.#l), createComponent(_, mergeProps({
|
|
173227
173227
|
get queryFlavor() {
|
|
173228
173228
|
return n.#n;
|
|
173229
173229
|
},
|
|
@@ -174843,7 +174843,7 @@ function useEncounterSession(t) {
|
|
|
174843
174843
|
refetch: () => D({ ignored: !1 })
|
|
174844
174844
|
};
|
|
174845
174845
|
}
|
|
174846
|
-
const CLINICAL_CONFIG_URL = CLINICAL_V2_CONFIG_BASE_URL + "/app.json", ClinicalConfigContext = createContext$1(void 0), $schema$2 = "http://json-schema.org/draft-07/schema#", title$3 = "Clinical App Configuration Schema", description$1 = "Schema for global clinical app configuration including patient information, actions and available dashboards", type$2 = "object", required$1 = ["patientInformation", "actions", "dashboards", "consultationPad"], additionalProperties$2 = !1, definitions = { inputControl: { type: "object", required: ["type", "metadata", "encounterTypes", "privileges", "attributes"], additionalProperties: !0, properties: { type: { type: "string", description: "Identifier matching the registered form key (e.g. encounterDetails, allergies)" }, label: { type: "string", description: "Display label for the input control" }, metadata: { type: "object", description: "Additional metadata for the input control" }, encounterTypes: { type: "array", description: "Encounter types for which this control is shown", items: { type: "string" } }, privileges: { type: "array", description: "Privileges required to view this control", items: { type: "string" } }, attributes: { type: "array", description: "Form attributes configuration", items: { type: "object", required: ["name"
|
|
174846
|
+
const CLINICAL_CONFIG_URL = CLINICAL_V2_CONFIG_BASE_URL + "/app.json", ClinicalConfigContext = createContext$1(void 0), $schema$2 = "http://json-schema.org/draft-07/schema#", title$3 = "Clinical App Configuration Schema", description$1 = "Schema for global clinical app configuration including patient information, actions and available dashboards", type$2 = "object", required$1 = ["patientInformation", "actions", "dashboards", "consultationPad"], additionalProperties$2 = !1, definitions = { inputControl: { type: "object", required: ["type", "metadata", "encounterTypes", "privileges", "attributes"], additionalProperties: !0, properties: { type: { type: "string", description: "Identifier matching the registered form key (e.g. encounterDetails, allergies)" }, label: { type: "string", description: "Display label for the input control" }, metadata: { type: "object", description: "Additional metadata for the input control" }, encounterTypes: { type: "array", description: "Encounter types for which this control is shown", items: { type: "string" } }, privileges: { type: "array", description: "Privileges required to view this control", items: { type: "string" } }, attributes: { type: "array", description: "Form attributes configuration", items: { type: "object", required: ["name"], additionalProperties: !1, properties: { name: { type: "string", description: "Attribute name" }, required: { type: "boolean", description: "Whether this attribute is required" }, default: { type: ["string", "number", "boolean"], description: "Default value to pre-populate the field with" }, readOnly: { type: "boolean", description: "Whether this field is non-editable by the user" } } } } } } }, properties$2 = { patientInformation: { type: "object", description: "Patient information configuration", additionalProperties: !1 }, contextInformation: { type: "object", description: "Context information configuration for displaying additional patient context", additionalProperties: !1, properties: { program: { type: "object", description: "Program details configuration", required: ["fields"], additionalProperties: !1, properties: { fields: { type: "array", description: "List of fields to display in program details", items: { type: "string" } } } } } }, patientSearch: { type: "object", description: "Configuration for patient search dropdown display", additionalProperties: !1, properties: { displayFields: { type: "array", description: "Fields to display in patient search dropdown results. Each entry maps to a PatientSearchResult field.", items: { type: "object", required: ["field"], additionalProperties: !1, properties: { field: { type: "string", enum: ["name", "identifier", "gender", "age"], description: "Field name from PatientSearchResult" }, bold: { type: "boolean", description: "Whether to render this field in bold" } } } } } }, actions: { type: "array", description: "List of available actions" }, dashboards: { type: "array", description: "List of available dashboards", items: { type: "object", required: ["name", "requiredPrivileges", "url"], additionalProperties: !1, properties: { name: { type: "string", description: "Display name of the dashboard" }, requiredPrivileges: { type: "array", items: { type: "string" }, description: "List of permissions required to access this dashboard" }, icon: { type: "string", description: "Icon class name for the dashboard" }, default: { type: "boolean", description: "Whether this is the default dashboard" }, url: { type: "string", description: "URL to access the dashboard data" } } } }, consultationPad: { type: "object", description: "Configuration for consultation pad forms", required: ["allergyConceptMap", "inputControls"], additionalProperties: !0, properties: { allergyConceptMap: { type: "object", description: "UUID mappings for allergy concepts", required: ["medicationAllergenUuid", "foodAllergenUuid", "environmentalAllergenUuid", "allergyReactionUuid"], additionalProperties: !1, properties: { medicationAllergenUuid: { type: "string", description: "UUID for medication allergen concept" }, foodAllergenUuid: { type: "string", description: "UUID for food allergen concept" }, environmentalAllergenUuid: { type: "string", description: "UUID for environmental allergen concept" }, allergyReactionUuid: { type: "string", description: "UUID for allergy reaction concept" } } }, statDurationInMilliseconds: { type: "number", description: "Duration in milliseconds for which a STAT order is valid" }, inputControls: { type: "array", description: "Ordered list of input controls to display in the consultation pad", items: { $ref: "#/definitions/inputControl" } } } } }, clinicalConfigSchema = {
|
|
174847
174847
|
$schema: $schema$2,
|
|
174848
174848
|
title: title$3,
|
|
174849
174849
|
description: description$1,
|
|
@@ -231672,66 +231672,67 @@ const ConsultationPad = ({
|
|
|
231672
231672
|
displayControlSection
|
|
231673
231673
|
}, DashboardContainer = ({
|
|
231674
231674
|
sections: t,
|
|
231675
|
-
activeItemId: e
|
|
231675
|
+
activeItemId: e,
|
|
231676
|
+
scrollTrigger: n
|
|
231676
231677
|
}) => {
|
|
231677
|
-
const { t:
|
|
231678
|
-
new Set(
|
|
231679
|
-
),
|
|
231678
|
+
const { t: r } = useTranslation(), a = c1(), l = useRef({}), { episodeOfCare: c, visit: g, encounter: A } = useClinicalAppData(), w = Array.from(
|
|
231679
|
+
new Set(c.map((C) => C.uuid))
|
|
231680
|
+
), _ = Array.from(
|
|
231680
231681
|
/* @__PURE__ */ new Set([
|
|
231681
|
-
...
|
|
231682
|
-
...
|
|
231683
|
-
...
|
|
231682
|
+
...c.flatMap((C) => C.encounterUuids),
|
|
231683
|
+
...g.flatMap((C) => C.encounterUuids),
|
|
231684
|
+
...A.map((C) => C.uuid)
|
|
231684
231685
|
])
|
|
231685
|
-
),
|
|
231686
|
+
), b = Array.from(
|
|
231686
231687
|
/* @__PURE__ */ new Set([
|
|
231687
|
-
...
|
|
231688
|
-
...
|
|
231688
|
+
...c.flatMap((C) => C.visitUuids),
|
|
231689
|
+
...g.map((C) => C.uuid)
|
|
231689
231690
|
])
|
|
231690
231691
|
);
|
|
231691
231692
|
return useEffect(() => {
|
|
231692
|
-
|
|
231693
|
+
a && Xl$1({
|
|
231693
231694
|
eventType: In$1.VIEWED_CLINICAL_DASHBOARD.eventType,
|
|
231694
|
-
patientUuid:
|
|
231695
|
+
patientUuid: a
|
|
231695
231696
|
});
|
|
231696
|
-
}, [
|
|
231697
|
-
t.forEach((
|
|
231698
|
-
|
|
231697
|
+
}, [a]), useEffect(() => {
|
|
231698
|
+
t.forEach((C) => {
|
|
231699
|
+
l.current[C.id] ??= o__default.createRef();
|
|
231699
231700
|
});
|
|
231700
231701
|
}, [t]), useEffect(() => {
|
|
231701
231702
|
if (e) {
|
|
231702
|
-
const
|
|
231703
|
-
(
|
|
231703
|
+
const C = t.find(
|
|
231704
|
+
(H) => H.id === e
|
|
231704
231705
|
);
|
|
231705
|
-
|
|
231706
|
+
C && l.current[C.id]?.current && l.current[C.id].current?.scrollIntoView({
|
|
231706
231707
|
behavior: "smooth"
|
|
231707
231708
|
});
|
|
231708
231709
|
}
|
|
231709
|
-
}, [e, t]), t.length ? /* @__PURE__ */ jsx(
|
|
231710
|
+
}, [e, t, n]), t.length ? /* @__PURE__ */ jsx(
|
|
231710
231711
|
vd2,
|
|
231711
231712
|
{
|
|
231712
231713
|
className: styles$3.sectionContainer,
|
|
231713
231714
|
"data-testid": "dashboard-container",
|
|
231714
|
-
children: t.map((
|
|
231715
|
+
children: t.map((C) => /* @__PURE__ */ jsx(
|
|
231715
231716
|
"article",
|
|
231716
231717
|
{
|
|
231717
231718
|
className: styles$3.displayControlSection,
|
|
231718
|
-
ref:
|
|
231719
|
-
"data-testid": `dashboard-section-article-${
|
|
231719
|
+
ref: l.current[C.id],
|
|
231720
|
+
"data-testid": `dashboard-section-article-${C.name}`,
|
|
231720
231721
|
children: /* @__PURE__ */ jsx(
|
|
231721
231722
|
DashboardSection,
|
|
231722
231723
|
{
|
|
231723
|
-
section:
|
|
231724
|
-
ref:
|
|
231725
|
-
episodeOfCareUuids:
|
|
231726
|
-
encounterUuids:
|
|
231727
|
-
visitUuids:
|
|
231724
|
+
section: C,
|
|
231725
|
+
ref: l.current[C.id],
|
|
231726
|
+
episodeOfCareUuids: w,
|
|
231727
|
+
encounterUuids: _,
|
|
231728
|
+
visitUuids: b
|
|
231728
231729
|
}
|
|
231729
231730
|
)
|
|
231730
231731
|
},
|
|
231731
|
-
|
|
231732
|
+
C.id
|
|
231732
231733
|
))
|
|
231733
231734
|
}
|
|
231734
|
-
) : /* @__PURE__ */ jsx("div", { children:
|
|
231735
|
+
) : /* @__PURE__ */ jsx("div", { children: r("NO_DASHBOARD_SECTIONS") });
|
|
231735
231736
|
}, CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart = (t) => {
|
|
231736
231737
|
const e = new CustomEvent(CONSULTATION_START_EVENT, {
|
|
231737
231738
|
detail: t
|
|
@@ -231994,8 +231995,8 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
231994
231995
|
} : t, ConsultationPage = () => {
|
|
231995
231996
|
const { t } = useTranslation(), { clinicalConfig: e, isLoading: n } = useClinicalConfig(), { userPrivileges: r } = Uu(), { addNotification: a } = d1(), [l, c] = useState(!1), [g, A] = useState(null);
|
|
231996
231997
|
useSubscribeConsultationStart(
|
|
231997
|
-
useCallback((
|
|
231998
|
-
A(
|
|
231998
|
+
useCallback((uft) => {
|
|
231999
|
+
A(uft), c(!0);
|
|
231999
232000
|
}, [])
|
|
232000
232001
|
);
|
|
232001
232002
|
const [w, _] = useState(!1), [b] = useSearchParams(), C = useCallback(() => _(!0), []), H = useCallback(() => _(!1), []), O = useMemo(
|
|
@@ -232022,7 +232023,7 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232022
232023
|
}
|
|
232023
232024
|
],
|
|
232024
232025
|
[C, t]
|
|
232025
|
-
), x = useObservationFormsStore((
|
|
232026
|
+
), x = useObservationFormsStore((uft) => uft.viewingForm), N = [
|
|
232026
232027
|
{ id: "home", label: "Home", href: Ig$1 },
|
|
232027
232028
|
{
|
|
232028
232029
|
id: "clinical",
|
|
@@ -232031,12 +232032,12 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232031
232032
|
},
|
|
232032
232033
|
{ id: "current", label: t("CURRENT_PATIENT"), isCurrentPage: !0 }
|
|
232033
232034
|
], D = useMemo(() => {
|
|
232034
|
-
const
|
|
232035
|
-
return
|
|
232035
|
+
const uft = b.get(EPISODE_UUID_SEARCH_PARAMS_KEY);
|
|
232036
|
+
return uft ? uft.split(",").map((fft) => fft.trim()).filter(Boolean) : [];
|
|
232036
232037
|
}, [b]), V = b.get(
|
|
232037
232038
|
CURRENT_DASHBOARD_SEARCH_PARAMS_KEY
|
|
232038
232039
|
), $ = useMemo(() => e ? V ? e.dashboards?.find(
|
|
232039
|
-
(
|
|
232040
|
+
(uft) => uft.name === V
|
|
232040
232041
|
) : getDefaultDashboard(e.dashboards || []) : null, [e, V]), B = $?.url ?? null, {
|
|
232041
232042
|
data: S,
|
|
232042
232043
|
isLoading: Z,
|
|
@@ -232060,7 +232061,12 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232060
232061
|
const j = useMemo(() => !S || !r ? null : {
|
|
232061
232062
|
...S,
|
|
232062
232063
|
sections: filterSectionsByPrivileges(S.sections)
|
|
232063
|
-
}, [S, r]), u1 = useMemo(() => j ? getSidebarItems(j, t) : [], [j, t]), { activeItemId:
|
|
232064
|
+
}, [S, r]), u1 = useMemo(() => j ? getSidebarItems(j, t) : [], [j, t]), [a1, L] = useState(0), { activeItemId: Xfe, handleItemClick: e7e } = gd2(u1), KQe = useCallback(
|
|
232065
|
+
(uft) => {
|
|
232066
|
+
e7e(uft), L((fft) => fft + 1);
|
|
232067
|
+
},
|
|
232068
|
+
[e7e]
|
|
232069
|
+
);
|
|
232064
232070
|
if (n)
|
|
232065
232071
|
return /* @__PURE__ */ jsx(
|
|
232066
232072
|
Md2,
|
|
@@ -232073,12 +232079,12 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232073
232079
|
if (!r)
|
|
232074
232080
|
return /* @__PURE__ */ jsx(Md2, { description: t("LOADING_USER_PRIVILEGES"), role: "status" });
|
|
232075
232081
|
if (!$) {
|
|
232076
|
-
const
|
|
232082
|
+
const uft = V ? t("ERROR_DASHBOARD_NOT_CONFIGURED", {
|
|
232077
232083
|
dashboardName: V
|
|
232078
232084
|
}) : t("ERROR_NO_DEFAULT_DASHBOARD");
|
|
232079
232085
|
return a({
|
|
232080
232086
|
title: t("ERROR_DEFAULT_TITLE"),
|
|
232081
|
-
message:
|
|
232087
|
+
message: uft,
|
|
232082
232088
|
type: "error"
|
|
232083
232089
|
}), /* @__PURE__ */ jsx(
|
|
232084
232090
|
"div",
|
|
@@ -232098,12 +232104,12 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232098
232104
|
role: "status"
|
|
232099
232105
|
}
|
|
232100
232106
|
);
|
|
232101
|
-
const
|
|
232102
|
-
const
|
|
232103
|
-
return
|
|
232107
|
+
const lft = () => {
|
|
232108
|
+
const uft = b.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
|
|
232109
|
+
return uft && e.contextInformation?.program ? /* @__PURE__ */ jsx(
|
|
232104
232110
|
Apt,
|
|
232105
232111
|
{
|
|
232106
|
-
programUUID:
|
|
232112
|
+
programUUID: uft,
|
|
232107
232113
|
config: {
|
|
232108
232114
|
fields: e.contextInformation?.program?.fields ?? []
|
|
232109
232115
|
}
|
|
@@ -232121,8 +232127,8 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232121
232127
|
breadcrumbItems: N,
|
|
232122
232128
|
globalActions: O,
|
|
232123
232129
|
sideNavItems: u1,
|
|
232124
|
-
activeSideNavItemId:
|
|
232125
|
-
onSideNavItemClick:
|
|
232130
|
+
activeSideNavItemId: Xfe,
|
|
232131
|
+
onSideNavItemClick: KQe,
|
|
232126
232132
|
isRail: l
|
|
232127
232133
|
}
|
|
232128
232134
|
),
|
|
@@ -232150,7 +232156,7 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232150
232156
|
className: styles.stickySection,
|
|
232151
232157
|
children: [
|
|
232152
232158
|
/* @__PURE__ */ jsx(PatientHeader, { isActionAreaVisible: l }),
|
|
232153
|
-
|
|
232159
|
+
lft()
|
|
232154
232160
|
]
|
|
232155
232161
|
}
|
|
232156
232162
|
),
|
|
@@ -232158,7 +232164,8 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232158
232164
|
DashboardContainer,
|
|
232159
232165
|
{
|
|
232160
232166
|
sections: j.sections,
|
|
232161
|
-
activeItemId:
|
|
232167
|
+
activeItemId: Xfe,
|
|
232168
|
+
scrollTrigger: a1
|
|
232162
232169
|
}
|
|
232163
232170
|
)
|
|
232164
232171
|
]
|
|
@@ -232170,7 +232177,7 @@ const DASHBOARD_CONFIG_URL = (t) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
|
|
|
232170
232177
|
ConsultationPad,
|
|
232171
232178
|
{
|
|
232172
232179
|
encounterSessionStartContext: g,
|
|
232173
|
-
onClose: () => c((
|
|
232180
|
+
onClose: () => c((uft) => !uft)
|
|
232174
232181
|
}
|
|
232175
232182
|
)
|
|
232176
232183
|
}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAqCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAqCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EA6P7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -6,7 +6,9 @@ export interface AllergyConceptMap {
|
|
|
6
6
|
}
|
|
7
7
|
export interface InputControlAttributes {
|
|
8
8
|
name: string;
|
|
9
|
-
required
|
|
9
|
+
required?: boolean;
|
|
10
|
+
default?: string | number | boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export interface InputControl<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
12
14
|
type: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/clinicalConfig/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/providers/clinicalConfig/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAY,CAC3B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE3D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,CAAC;IACZ,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,sBAAsB,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAAC;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,yBAAyB,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,cAAc;IAC7B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACxB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7B,eAAe,EAAE,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB"}
|
|
@@ -47,7 +47,7 @@ declare const _default: {
|
|
|
47
47
|
"description": "Form attributes configuration",
|
|
48
48
|
"items": {
|
|
49
49
|
"type": "object",
|
|
50
|
-
"required": ["name"
|
|
50
|
+
"required": ["name"],
|
|
51
51
|
"additionalProperties": false,
|
|
52
52
|
"properties": {
|
|
53
53
|
"name": {
|
|
@@ -57,6 +57,14 @@ declare const _default: {
|
|
|
57
57
|
"required": {
|
|
58
58
|
"type": "boolean",
|
|
59
59
|
"description": "Whether this attribute is required"
|
|
60
|
+
},
|
|
61
|
+
"default": {
|
|
62
|
+
"type": ["string", "number", "boolean"],
|
|
63
|
+
"description": "Default value to pre-populate the field with"
|
|
64
|
+
},
|
|
65
|
+
"readOnly": {
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"description": "Whether this field is non-editable by the user"
|
|
60
68
|
}
|
|
61
69
|
}
|
|
62
70
|
}
|