@bahmni/clinical-app 0.0.1-dev.372 → 0.0.1-dev.373

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.
@@ -1,10 +1,10 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { B, q as ENCOUNTER_CONCEPTS_URL, t as Yr, x as Di, A as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, F as xm, J as fSe, g as gr, Z as ZH2, K as BH2, R as RH2, M as gM2, P as rc1, S as $H2, U as OE, _ as Ii, a0 as Dd, a1 as dE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as kb, a9 as Gb, aa as Kb, ab as PH2, ac as YH2, ad as oV2, G as G1, V as V3, ae as Wb, af as fH2, ag as HH2, ah as hC2, ai as QH2, aj as XH2, k as kYt, ak as S_, al as OH2, am as z_, an as Ps, ao as A_, ap as fv, aq as zb, ar as CH2, as as r_, at as o_, au as CLINICAL_V2_CONFIG_BASE_URL, av as l_, aw as DE, ax as Qr, ay as i_, az as Ub, aA as pv, aB as Og2, aC as P_, aD as u_, aE as d_, aF as gv, aG as TH2, aH as $v, aI as xb, aJ as f_, aK as Rt, aL as jr, aM as vv, aN as Av, X as Xn, aO as W_, aP as N_, aQ as C_, N as NYt, aR as sC2, aS as fC2, aT as X_, aU as Q_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as xH2, aZ as gf, a_ as es$2, a$ as lC2, b0 as J_, b1 as Z_, b2 as zE, b3 as Cb, b4 as BE, b5 as tv, b6 as an, b7 as N4, b8 as c3, b9 as cC2, ba as rv, bb as nv, bc as Ni, bd as ns, be as q_, bf as Xb, bg as Pv, bh as hv, bi as mv, bj as dv, bk as CDSS_SERVER_CONFIG_URL, bl as e_, bm as ki, bn as yb, bo as Ze, bp as KH2, bq as FYt, br as qH2, bs as Zy, bt as F_, bu as j_, bv as SH2, bw as ml1, bx as B_, by as H_, bz as V_, bA as _Yt, bB as MYt, bC as GE, bD as Y_, bE as aE, bF as BAHMNI_CLINICAL_PATH, bG as SE, bH as sw, bI as GH2, bJ as jH2, bK as QE2, bL as SGt, bM as TE, bN as SYt } from "./index-DFdBXY1N.js";
2
+ import { B, v as ENCOUNTER_CONCEPTS_URL, Y as Yr, w as Di, y as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, z as xm, A as mSe, g as gr, C as ZH2, F as BH2, K as RH2, N as gM2, U as rc1, $ as $H2, X as OE, _ as Ii, a0 as Dd, a1 as dE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as kb, a9 as Gb, aa as Kb, ab as PH2, ac as YH2, ad as oV2, G as G1, H as H3, ae as Wb, af as fH2, ag as HH2, ah as hC2, ai as QH2, aj as XH2, P as PYt, ak as S_, al as OH2, am as z_, an as Ps, ao as A_, ap as fv, aq as zb, ar as CH2, as as r_, at as o_, au as CLINICAL_V2_CONFIG_BASE_URL, av as l_, aw as DE, ax as Qr, ay as i_, az as Ub, aA as pv, aB as Og2, aC as P_, aD as u_, aE as d_, aF as gv, aG as TH2, aH as $v, aI as xb, aJ as f_, aK as Rt, aL as jr, aM as vv, aN as Av, Q as Qn, aO as W_, aP as N_, aQ as C_, T as TYt, aR as sC2, aS as fC2, aT as X_, aU as Q_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as xH2, aZ as gf, a_ as es$2, a$ as lC2, b0 as J_, b1 as Z_, b2 as zE, b3 as Cb, b4 as BE, b5 as tv, b6 as an, b7 as N4, b8 as c3, b9 as cC2, ba as rv, bb as nv, bc as Ni, bd as ns, be as q_, bf as Xb, bg as Pv, bh as hv, bi as mv, bj as dv, bk as CDSS_SERVER_CONFIG_URL, bl as e_, bm as ki, bn as yb, bo as Ze, bp as KH2, bq as WYt, br as qH2, bs as Zy, bt as F_, bu as j_, bv as SH2, bw as ml1, bx as B_, by as H_, bz as V_, bA as zYt, bB as AYt, bC as GE, bD as Y_, bE as aE, bF as BAHMNI_CLINICAL_PATH, bG as SE, bH as sw, bI as GH2, bJ as jH2, bK as QE2, bL as kGt, bM as TE, bN as kYt } from "./index-p757R1Oj.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-BVh7Tcva.js";
7
+ import { u as useClinicalConfig } from "./hook-CgKQ6WAl.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 : {};
@@ -2046,7 +2046,7 @@ const useLocations = () => {
2046
2046
  encounterSessionStartContext: p,
2047
2047
  inputControlConfig: c
2048
2048
  }) => {
2049
- const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f = fSe(), d = gr(), {
2049
+ const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f = mSe(), d = gr(), {
2050
2050
  activeVisit: h,
2051
2051
  loading: E,
2052
2052
  error: C
@@ -132962,9 +132962,9 @@ function print() { __p += __j.call(arguments, '') }
132962
132962
  return "'";
132963
132963
  }, b3 = function(De, xe) {
132964
132964
  return De + xe.replace("''", "'");
132965
- }, T3 = function(De) {
132965
+ }, V3 = function(De) {
132966
132966
  return !(De === "{" || Eu() && De === "#" || go.length > 1 && De === "}");
132967
- }, H3 = `
132967
+ }, T3 = `
132968
132968
  `, M3 = ur(`
132969
132969
  `, !1), x3 = function(De) {
132970
132970
  return De === "{" || De === "}" || Eu() && De === "#";
@@ -133181,7 +133181,7 @@ function print() { __p += __j.call(arguments, '') }
133181
133181
  }
133182
133182
  function _u() {
133183
133183
  var De, xe, ze, bt;
133184
- return De = Ce, xe = Ce, _.length > Ce ? (ze = _.charAt(Ce), Ce++) : (ze = m, wt === 0 && Ot(vt)), ze !== m ? (_n = Ce, (bt = (bt = T3(ze)) ? void 0 : m) !== m ? xe = ze = [ze, bt] : (Ce = xe, xe = m)) : (Ce = xe, xe = m), xe === m && (_.charCodeAt(Ce) === 10 ? (xe = H3, Ce++) : (xe = m, wt === 0 && Ot(M3))), xe !== m ? _.substring(De, Ce) : xe;
133184
+ return De = Ce, xe = Ce, _.length > Ce ? (ze = _.charAt(Ce), Ce++) : (ze = m, wt === 0 && Ot(vt)), ze !== m ? (_n = Ce, (bt = (bt = V3(ze)) ? void 0 : m) !== m ? xe = ze = [ze, bt] : (Ce = xe, xe = m)) : (Ce = xe, xe = m), xe === m && (_.charCodeAt(Ce) === 10 ? (xe = T3, Ce++) : (xe = m, wt === 0 && Ot(M3))), xe !== m ? _.substring(De, Ce) : xe;
133185
133185
  }
133186
133186
  function Ji() {
133187
133187
  var De, xe;
@@ -136223,7 +136223,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136223
136223
  var u;
136224
136224
  }, qf = function(_) {
136225
136225
  return _.className, _.clearValue, _.cx, _.getStyles, _.getClassNames, _.getValue, _.hasValue, _.isMulti, _.isRtl, _.options, _.selectOption, _.selectProps, _.setValue, _.theme, Qt({}, kn(_, gu));
136226
- }, Qn = function(_, u, A) {
136226
+ }, Xn = function(_, u, A) {
136227
136227
  var m = _.cx, y = _.getStyles, x = _.getClassNames, P = _.className;
136228
136228
  return { css: y(u, _), className: m(A ?? {}, x(u, _), P) };
136229
136229
  };
@@ -136340,39 +136340,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136340
136340
  return Et("div", A, u);
136341
136341
  }, ku = { ClearIndicator: function(_) {
136342
136342
  var u = _.children, A = _.innerProps;
136343
- return Et("div", la({}, Qn(_, "clearIndicator", { indicator: !0, "clear-indicator": !0 }), A), u || Et(af, null));
136343
+ return Et("div", la({}, Xn(_, "clearIndicator", { indicator: !0, "clear-indicator": !0 }), A), u || Et(af, null));
136344
136344
  }, Control: function(_) {
136345
136345
  var u = _.children, A = _.isDisabled, m = _.isFocused, y = _.innerRef, x = _.innerProps, P = _.menuIsOpen;
136346
- return Et("div", la({ ref: y }, Qn(_, "control", { control: !0, "control--is-disabled": A, "control--is-focused": m, "control--menu-is-open": P }), x, { "aria-disabled": A || void 0 }), u);
136346
+ return Et("div", la({ ref: y }, Xn(_, "control", { control: !0, "control--is-disabled": A, "control--is-focused": m, "control--menu-is-open": P }), x, { "aria-disabled": A || void 0 }), u);
136347
136347
  }, DropdownIndicator: function(_) {
136348
136348
  var u = _.children, A = _.innerProps;
136349
- return Et("div", la({}, Qn(_, "dropdownIndicator", { indicator: !0, "dropdown-indicator": !0 }), A), u || Et(tp, null));
136349
+ return Et("div", la({}, Xn(_, "dropdownIndicator", { indicator: !0, "dropdown-indicator": !0 }), A), u || Et(tp, null));
136350
136350
  }, DownChevron: tp, CrossIcon: af, Group: function(_) {
136351
136351
  var u = _.children, A = _.cx, m = _.getStyles, y = _.getClassNames, x = _.Heading, P = _.headingProps, W = _.innerProps, j = _.label, G = _.theme, ne = _.selectProps;
136352
- return Et("div", la({}, Qn(_, "group", { group: !0 }), W), Et(x, la({}, P, { selectProps: ne, theme: G, getStyles: m, getClassNames: y, cx: A }), j), Et("div", null, u));
136352
+ return Et("div", la({}, Xn(_, "group", { group: !0 }), W), Et(x, la({}, P, { selectProps: ne, theme: G, getStyles: m, getClassNames: y, cx: A }), j), Et("div", null, u));
136353
136353
  }, GroupHeading: function(_) {
136354
136354
  var u = qf(_);
136355
136355
  u.data;
136356
136356
  var A = kn(u, Su);
136357
- return Et("div", la({}, Qn(_, "groupHeading", { "group-heading": !0 }), A));
136357
+ return Et("div", la({}, Xn(_, "groupHeading", { "group-heading": !0 }), A));
136358
136358
  }, IndicatorsContainer: function(_) {
136359
136359
  var u = _.children, A = _.innerProps;
136360
- return Et("div", la({}, Qn(_, "indicatorsContainer", { indicators: !0 }), A), u);
136360
+ return Et("div", la({}, Xn(_, "indicatorsContainer", { indicators: !0 }), A), u);
136361
136361
  }, IndicatorSeparator: function(_) {
136362
136362
  var u = _.innerProps;
136363
- return Et("span", la({}, u, Qn(_, "indicatorSeparator", { "indicator-separator": !0 })));
136363
+ return Et("span", la({}, u, Xn(_, "indicatorSeparator", { "indicator-separator": !0 })));
136364
136364
  }, Input: function(_) {
136365
136365
  var u = _.cx, A = _.value, m = qf(_), y = m.innerRef, x = m.isDisabled, P = m.isHidden, W = m.inputClassName, j = kn(m, Lu);
136366
- return Et("div", la({}, Qn(_, "input", { "input-container": !0 }), { "data-value": A || "" }), Et("input", la({ className: u({ input: !0 }, W), ref: y, style: Bu(P), disabled: x }, j)));
136366
+ return Et("div", la({}, Xn(_, "input", { "input-container": !0 }), { "data-value": A || "" }), Et("input", la({ className: u({ input: !0 }, W), ref: y, style: Bu(P), disabled: x }, j)));
136367
136367
  }, LoadingIndicator: function(_) {
136368
136368
  var u = _.innerProps, A = _.isRtl, m = _.size, y = m === void 0 ? 4 : m, x = kn(_, $u);
136369
- return Et("div", la({}, Qn(Qt(Qt({}, x), {}, { innerProps: u, isRtl: A, size: y }), "loadingIndicator", { indicator: !0, "loading-indicator": !0 }), u), Et(nf, { delay: 0, offset: A }), Et(nf, { delay: 160, offset: !0 }), Et(nf, { delay: 320, offset: !A }));
136369
+ return Et("div", la({}, Xn(Qt(Qt({}, x), {}, { innerProps: u, isRtl: A, size: y }), "loadingIndicator", { indicator: !0, "loading-indicator": !0 }), u), Et(nf, { delay: 0, offset: A }), Et(nf, { delay: 160, offset: !0 }), Et(nf, { delay: 320, offset: !A }));
136370
136370
  }, Menu: function(_) {
136371
136371
  var u = _.children, A = _.innerRef, m = _.innerProps;
136372
- return Et("div", la({}, Qn(_, "menu", { menu: !0 }), { ref: A }, m), u);
136372
+ return Et("div", la({}, Xn(_, "menu", { menu: !0 }), { ref: A }, m), u);
136373
136373
  }, MenuList: function(_) {
136374
136374
  var u = _.children, A = _.innerProps, m = _.innerRef, y = _.isMulti;
136375
- return Et("div", la({}, Qn(_, "menuList", { "menu-list": !0, "menu-list--is-multi": y }), { ref: m }, A), u);
136375
+ return Et("div", la({}, Xn(_, "menuList", { "menu-list": !0, "menu-list--is-multi": y }), { ref: m }, A), u);
136376
136376
  }, MenuPortal: function(_) {
136377
136377
  var u = _.appendTo, A = _.children, m = _.controlElement, y = _.innerProps, x = _.menuPlacement, P = _.menuPosition, W = (0, N.useRef)(null), j = (0, N.useRef)(null), G = qn((0, N.useState)(Jf(x)), 2), ne = G[0], fe = G[1], Ee = (0, N.useMemo)(function() {
136378
136378
  return { setPortalPlacement: fe };
@@ -136458,35 +136458,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136458
136458
  W.current = vt, Xe();
136459
136459
  }, [Xe]);
136460
136460
  if (!u && P !== "fixed" || !Me) return null;
136461
- var Ct = Et("div", la({ ref: et }, Qn(Qt(Qt({}, _), {}, { offset: Me.offset, position: P, rect: Me.rect }), "menuPortal", { "menu-portal": !0 }), y), A);
136461
+ var Ct = Et("div", la({ ref: et }, Xn(Qt(Qt({}, _), {}, { offset: Me.offset, position: P, rect: Me.rect }), "menuPortal", { "menu-portal": !0 }), y), A);
136462
136462
  return Et(Qf.Provider, { value: Ee }, u ? (0, Va.createPortal)(Ct, u) : Ct);
136463
136463
  }, LoadingMessage: function(_) {
136464
136464
  var u = _.children, A = u === void 0 ? "Loading..." : u, m = _.innerProps, y = kn(_, Vu);
136465
- return Et("div", la({}, Qn(Qt(Qt({}, y), {}, { children: A, innerProps: m }), "loadingMessage", { "menu-notice": !0, "menu-notice--loading": !0 }), m), A);
136465
+ return Et("div", la({}, Xn(Qt(Qt({}, y), {}, { children: A, innerProps: m }), "loadingMessage", { "menu-notice": !0, "menu-notice--loading": !0 }), m), A);
136466
136466
  }, NoOptionsMessage: function(_) {
136467
136467
  var u = _.children, A = u === void 0 ? "No options" : u, m = _.innerProps, y = kn(_, bu);
136468
- return Et("div", la({}, Qn(Qt(Qt({}, y), {}, { children: A, innerProps: m }), "noOptionsMessage", { "menu-notice": !0, "menu-notice--no-options": !0 }), m), A);
136468
+ return Et("div", la({}, Xn(Qt(Qt({}, y), {}, { children: A, innerProps: m }), "noOptionsMessage", { "menu-notice": !0, "menu-notice--no-options": !0 }), m), A);
136469
136469
  }, MultiValue: function(_) {
136470
136470
  var u = _.children, A = _.components, m = _.data, y = _.innerProps, x = _.isDisabled, P = _.removeProps, W = _.selectProps, j = A.Container, G = A.Label, ne = A.Remove;
136471
- return Et(j, { data: m, innerProps: Qt(Qt({}, Qn(_, "multiValue", { "multi-value": !0, "multi-value--is-disabled": x })), y), selectProps: W }, Et(G, { data: m, innerProps: Qt({}, Qn(_, "multiValueLabel", { "multi-value__label": !0 })), selectProps: W }, u), Et(ne, { data: m, innerProps: Qt(Qt({}, Qn(_, "multiValueRemove", { "multi-value__remove": !0 })), {}, { "aria-label": "Remove ".concat(u || "option") }, P), selectProps: W }));
136471
+ return Et(j, { data: m, innerProps: Qt(Qt({}, Xn(_, "multiValue", { "multi-value": !0, "multi-value--is-disabled": x })), y), selectProps: W }, Et(G, { data: m, innerProps: Qt({}, Xn(_, "multiValueLabel", { "multi-value__label": !0 })), selectProps: W }, u), Et(ne, { data: m, innerProps: Qt(Qt({}, Xn(_, "multiValueRemove", { "multi-value__remove": !0 })), {}, { "aria-label": "Remove ".concat(u || "option") }, P), selectProps: W }));
136472
136472
  }, MultiValueContainer: rp, MultiValueLabel: rp, MultiValueRemove: function(_) {
136473
136473
  var u = _.children, A = _.innerProps;
136474
136474
  return Et("div", la({ role: "button" }, A), u || Et(af, { size: 14 }));
136475
136475
  }, Option: function(_) {
136476
136476
  var u = _.children, A = _.isDisabled, m = _.isFocused, y = _.isSelected, x = _.innerRef, P = _.innerProps;
136477
- return Et("div", la({}, Qn(_, "option", { option: !0, "option--is-disabled": A, "option--is-focused": m, "option--is-selected": y }), { ref: x, "aria-disabled": A }, P), u);
136477
+ return Et("div", la({}, Xn(_, "option", { option: !0, "option--is-disabled": A, "option--is-focused": m, "option--is-selected": y }), { ref: x, "aria-disabled": A }, P), u);
136478
136478
  }, Placeholder: function(_) {
136479
136479
  var u = _.children, A = _.innerProps;
136480
- return Et("div", la({}, Qn(_, "placeholder", { placeholder: !0 }), A), u);
136480
+ return Et("div", la({}, Xn(_, "placeholder", { placeholder: !0 }), A), u);
136481
136481
  }, SelectContainer: function(_) {
136482
136482
  var u = _.children, A = _.innerProps, m = _.isDisabled, y = _.isRtl;
136483
- return Et("div", la({}, Qn(_, "container", { "--is-disabled": m, "--is-rtl": y }), A), u);
136483
+ return Et("div", la({}, Xn(_, "container", { "--is-disabled": m, "--is-rtl": y }), A), u);
136484
136484
  }, SingleValue: function(_) {
136485
136485
  var u = _.children, A = _.isDisabled, m = _.innerProps;
136486
- return Et("div", la({}, Qn(_, "singleValue", { "single-value": !0, "single-value--is-disabled": A }), m), u);
136486
+ return Et("div", la({}, Xn(_, "singleValue", { "single-value": !0, "single-value--is-disabled": A }), m), u);
136487
136487
  }, ValueContainer: function(_) {
136488
136488
  var u = _.children, A = _.innerProps, m = _.isMulti, y = _.hasValue;
136489
- return Et("div", la({}, Qn(_, "valueContainer", { "value-container": !0, "value-container--is-multi": m, "value-container--has-value": y }), A), u);
136489
+ return Et("div", la({}, Xn(_, "valueContainer", { "value-container": !0, "value-container--is-multi": m, "value-container--has-value": y }), A), u);
136490
136490
  } }, op = Number.isNaN || function(_) {
136491
136491
  return typeof _ == "number" && _ != _;
136492
136492
  };
@@ -139655,10 +139655,10 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139655
139655
  selectedAllergyItem,
139656
139656
  duplicateNotification: duplicateNotification$2
139657
139657
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139658
- const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = G1(), d = V3(
139659
- kYt.ALLERGIES
139660
- ), h = V3(
139661
- kYt.EDIT_ALLERGIES
139658
+ const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = G1(), d = H3(
139659
+ PYt.ALLERGIES
139660
+ ), h = H3(
139661
+ PYt.EDIT_ALLERGIES
139662
139662
  ), [E, C] = useState(""), [R, T] = useState(null), [H, M] = useState(!1), [I, F] = useState(
139663
139663
  null
139664
139664
  ), {
@@ -139980,8 +139980,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
139980
139980
  selectedInvestigationItem,
139981
139981
  duplicateNotification: duplicateNotification$1
139982
139982
  }, InvestigationsForm = React__default.memo(() => {
139983
- const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = V3(
139984
- kYt.INVESTIGATIONS
139983
+ const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = H3(
139984
+ PYt.INVESTIGATIONS
139985
139985
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = z_(), I = H.includes("MATCHED") ? T?.id : void 0, {
139986
139986
  data: F,
139987
139987
  refetch: $,
@@ -140393,8 +140393,8 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140393
140393
  selectedConditionItem,
140394
140394
  duplicateNotification
140395
140395
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140396
- const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = V3(
140397
- kYt.CONDITIONS_AND_DIAGNOSES
140396
+ const { t: p } = useTranslation(), c = gr(), { addNotification: a } = G1(), s = H3(
140397
+ PYt.CONDITIONS_AND_DIAGNOSES
140398
140398
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
140399
140399
  selectedDiagnoses: T,
140400
140400
  selectedConditions: H,
@@ -143210,7 +143210,7 @@ const canUserAccessForm = (p, c) => {
143210
143210
  }, filterFormsByUserPrivileges = (p, c) => !p || p.length === 0 ? [] : c.filter(
143211
143211
  (s) => canUserAccessForm(p, s)
143212
143212
  ), useObservationFormsSearch = (p = "", c) => {
143213
- const a = useDebounce(p), { userPrivileges: s } = Xn(), {
143213
+ const a = useDebounce(p), { userPrivileges: s } = Qn(), {
143214
143214
  data: f = [],
143215
143215
  isLoading: d,
143216
143216
  error: h
@@ -143349,7 +143349,7 @@ function useSubmittedEncounterForms(p) {
143349
143349
  ), useMemo(() => {
143350
143350
  const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
143351
143351
  for (const T of C) {
143352
- const H = NYt(T);
143352
+ const H = TYt(T);
143353
143353
  if (!H) continue;
143354
143354
  const M = p.find((I) => I.name === H);
143355
143355
  M && R.add(M.uuid);
@@ -143373,8 +143373,8 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143373
143373
  observationFormsError: C,
143374
143374
  submittedFormUuids: R = EMPTY_SET
143375
143375
  }) => {
143376
- const { t: T } = useTranslation(), H = V3(
143377
- kYt.OBSERVATIONS
143376
+ const { t: T } = useTranslation(), H = H3(
143377
+ PYt.OBSERVATIONS
143378
143378
  ), [M, I] = useState(""), [F, $] = useState(null), { getFormData: S } = useObservationFormsStore(), z = useMemo(() => {
143379
143379
  if (!M.trim()) return h;
143380
143380
  const te = M.toLowerCase().trim().split(/\s+/);
@@ -143558,7 +143558,7 @@ ObservationForms.displayName = "ObservationForms";
143558
143558
  const ObservationFormsPanel = ({
143559
143559
  encounterSessionStartContext: p
143560
143560
  }) => {
143561
- const { user: c } = fSe(), a = gr(), { episodeOfCare: s } = useClinicalAppData(), f = s.map((V) => V.uuid), {
143561
+ const { user: c } = mSe(), a = gr(), { episodeOfCare: s } = useClinicalAppData(), f = s.map((V) => V.uuid), {
143562
143562
  forms: d,
143563
143563
  isLoading: h,
143564
143564
  error: E
@@ -143909,7 +143909,7 @@ const InputControlRenderer = ({
143909
143909
  encounterType: c,
143910
143910
  encounterSessionStartContext: a
143911
143911
  }) => {
143912
- const s = V3(p.privilege);
143912
+ const s = H3(p.privilege);
143913
143913
  if (p.encounterTypes && !p.encounterTypes.includes(c) || !s)
143914
143914
  return null;
143915
143915
  const f = p.component;
@@ -144051,7 +144051,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144051
144051
  }) => {
144052
144052
  const { t: T } = useTranslation(), H = R?.editOnly === "observationForms", M = React__default.useRef(!H), I = React__default.useRef(
144053
144053
  null
144054
- ), [F, $] = React__default.useState([]), z = R?.task?.basedOn?.[0], O = gr(), { user: Z } = fSe(), { episodeOfCare: k, activeVisitId: q } = useClinicalAppData(), {
144054
+ ), [F, $] = React__default.useState([]), z = R?.task?.basedOn?.[0], O = gr(), { user: Z } = mSe(), { episodeOfCare: k, activeVisitId: q } = useClinicalAppData(), {
144055
144055
  data: U,
144056
144056
  isLoading: N,
144057
144057
  error: K
@@ -144680,7 +144680,7 @@ const ConsultationPad = ({
144680
144680
  useEffect(() => {
144681
144681
  useEncounterDetailsStore.getState().setRequestedEncounterType(K);
144682
144682
  }, [K]);
144683
- const { episodeOfCare: te, patientId: re, activeVisitId: ie, activeEpisodeId: oe } = useClinicalAppData(), { practitioner: ae } = fSe(), { data: Q, status: we } = useQuery({
144683
+ const { episodeOfCare: te, patientId: re, activeVisitId: ie, activeEpisodeId: oe } = useClinicalAppData(), { practitioner: ae } = mSe(), { data: Q, status: we } = useQuery({
144684
144684
  queryKey: [
144685
144685
  "activeEncounter",
144686
144686
  re,
@@ -144948,8 +144948,8 @@ const ConsultationPad = ({
144948
144948
  encounterSessionStartContext: p,
144949
144949
  onClose: c
144950
144950
  }) => {
144951
- const { t: a } = useTranslation(), { addNotification: s } = G1(), f = gr(), { activeEpisodeId: d } = useClinicalAppData(), { clinicalConfig: h, isLoading: E } = useClinicalConfig(), { encounterConcepts: C } = useEncounterConcepts(), R = V3(
144952
- kYt.ADD_VISITS
144951
+ const { t: a } = useTranslation(), { addNotification: s } = G1(), f = gr(), { activeEpisodeId: d } = useClinicalAppData(), { clinicalConfig: h, isLoading: E } = useClinicalConfig(), { encounterConcepts: C } = useEncounterConcepts(), R = H3(
144952
+ PYt.ADD_VISITS
144953
144953
  ), T = useQueryClient(), [H, M] = useState(!1), [I, F] = useState(!1), [$, S] = useState(null), {
144954
144954
  data: z,
144955
144955
  error: O,
@@ -145106,7 +145106,7 @@ const ConsultationPad = ({
145106
145106
  visitUuids: f
145107
145107
  }) => {
145108
145108
  const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = z_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), M = h.includes("MATCHED") ? C?.id ?? null : null, I = ($, S, z) => {
145109
- const O = FYt($.type);
145109
+ const O = WYt($.type);
145110
145110
  if (!O)
145111
145111
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: $.type }) }) }, `${$.type}-${S}`);
145112
145112
  const Z = S < z - 1;
@@ -145298,8 +145298,8 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145298
145298
  isLoading: a
145299
145299
  }) => {
145300
145300
  const { t: s } = useTranslation();
145301
- return V3(
145302
- kYt.ENCOUNTER
145301
+ return H3(
145302
+ PYt.ENCOUNTER
145303
145303
  ) ? a ? /* @__PURE__ */ jsx(
145304
145304
  SH2,
145305
145305
  {
@@ -145322,7 +145322,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145322
145322
  isActionAreaVisible: p,
145323
145323
  printOptions: c
145324
145324
  }) => {
145325
- const { t: a } = useTranslation(), { practitioner: s } = fSe(), { clinicalConfig: f } = useClinicalConfig(), { encounterConcepts: d } = useEncounterConcepts(), h = gr(), E = f?.consultationPad?.inputControls?.find(
145325
+ const { t: a } = useTranslation(), { practitioner: s } = mSe(), { clinicalConfig: f } = useClinicalConfig(), { encounterConcepts: d } = useEncounterConcepts(), h = gr(), E = f?.consultationPad?.inputControls?.find(
145326
145326
  (k) => k.type === "encounterDetails"
145327
145327
  )?.metadata?.defaultEncounterType, C = useMemo(() => {
145328
145328
  if (!(!E || !d))
@@ -145377,7 +145377,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145377
145377
  "data-active-encounter-uuid": T && H?.id ? H.id : void 0,
145378
145378
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145379
145379
  children: [
145380
- /* @__PURE__ */ jsx(_Yt, {}),
145380
+ /* @__PURE__ */ jsx(zYt, {}),
145381
145381
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145382
145382
  /* @__PURE__ */ jsx(
145383
145383
  ConsultationActionButton,
@@ -145388,7 +145388,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145388
145388
  }
145389
145389
  ),
145390
145390
  /* @__PURE__ */ jsx(
145391
- MYt,
145391
+ AYt,
145392
145392
  {
145393
145393
  printOptions: c,
145394
145394
  renderContext: Z,
@@ -145600,7 +145600,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145600
145600
  );
145601
145601
  return c || p[0];
145602
145602
  }, filterControlsByPrivileges = (p) => p.filter(
145603
- (c) => V3(c.requiredPrivileges)
145603
+ (c) => H3(c.requiredPrivileges)
145604
145604
  ), filterSectionsByPrivileges = (p) => p.map((c) => ({
145605
145605
  ...c,
145606
145606
  controls: filterControlsByPrivileges(c.controls)
@@ -145614,7 +145614,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145614
145614
  (c) => c.id ? c : { ...c, id: TE() }
145615
145615
  )
145616
145616
  } : p, ConsultationPage = () => {
145617
- const { t: p } = useTranslation(), { clinicalConfig: c, isLoading: a } = useClinicalConfig(), { userPrivileges: s } = Xn(), { addNotification: f } = G1(), [d, h] = useState(!1), [E, C] = useState(null);
145617
+ const { t: p } = useTranslation(), { clinicalConfig: c, isLoading: a } = useClinicalConfig(), { userPrivileges: s } = Qn(), { addNotification: f } = G1(), [d, h] = useState(!1), [E, C] = useState(null);
145618
145618
  useSubscribeConsultationStart(
145619
145619
  useCallback((ae) => {
145620
145620
  C(ae), h(!0);
@@ -145732,7 +145732,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145732
145732
  const oe = () => {
145733
145733
  const ae = H.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
145734
145734
  return ae && c.contextInformation?.program ? /* @__PURE__ */ jsx(
145735
- SYt,
145735
+ kYt,
145736
145736
  {
145737
145737
  programUUID: ae,
145738
145738
  config: {
@@ -145751,7 +145751,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145751
145751
  {
145752
145752
  breadcrumbItems: O,
145753
145753
  globalActions: F,
145754
- userMenu: /* @__PURE__ */ jsx(SGt, {}),
145754
+ userMenu: /* @__PURE__ */ jsx(kGt, {}),
145755
145755
  sideNavItems: ee,
145756
145756
  activeSideNavItemId: te,
145757
145757
  onSideNavItemClick: ie,
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as p, Fragment as Q } from "react/jsx-runtime";
2
- import { g as W, u as x, G as Y, H as J, w as X, a as Z, W as ee, p as te } from "./index-DFdBXY1N.js";
1
+ import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
2
+ import { g as Q, u as W, G as Y, x as J, a as X, b as Z, W as ee, p as te } from "./index-p757R1Oj.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, 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 = {
@@ -38,9 +38,9 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = W(), { t: n } = x(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, H] = l(k), [V, A] = l(void 0), M = h((e) => {
41
+ ), E = Q(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
42
42
  U(e), w(!0);
43
- }, []), F = h(() => {
43
+ }, []), H = h(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
45
45
  }, []), v = h((e) => {
46
46
  O((t) => new Set(t).add(e));
@@ -91,13 +91,13 @@ const Te = [
91
91
  }, [s, o]);
92
92
  const j = h(
93
93
  (e, t) => {
94
- t !== u ? (H(t), C(1), A(void 0)) : C(e);
94
+ t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
97
  ), N = _(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), G = _(() => [...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(N, n), [N, n]), z = _(
100
+ ), x = _(() => [...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]), G = _(() => ie(N, n), [N, n]), P = _(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -106,7 +106,7 @@ const Te = [
106
106
  ), T = _(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), K = h(
109
+ ), z = h(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -137,22 +137,22 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ p(Q, { children: [
140
+ return /* @__PURE__ */ p(K, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
144
- headers: P,
144
+ headers: G,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: G,
146
+ rows: x,
147
147
  loading: q,
148
148
  errorStateMessage: y ? b?.message : null,
149
- sortable: z,
149
+ sortable: P,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
- renderCell: K,
151
+ renderCell: z,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
- totalItems: V,
155
+ totalItems: F,
156
156
  page: f,
157
157
  onPageChange: j
158
158
  }
@@ -163,7 +163,7 @@ const Te = [
163
163
  id: "modalIdForActionAreaLayout",
164
164
  portalId: "main-display-area",
165
165
  open: s,
166
- onRequestClose: F,
166
+ onRequestClose: H,
167
167
  modalHeading: o.documentIdentifier,
168
168
  passiveModal: !0,
169
169
  size: "lg",