@bahmni/clinical-app 0.0.1-dev.445 → 0.0.1-dev.446

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 { u as useTranslation, C as q, E as ENCOUNTER_CONCEPTS_URL, F as Jr, Y as Yo, G as mqt, N as Ns, I as BAHMNI_USER_LOCATION_COOKIE_NAME, K as bc, O as Mi, d as d0, V as Vb2, P as Cb2, U as vb2, Z as jx2, _ as il1, a0 as ub2, a1 as U_, a2 as Wi, a3 as rf, a4 as b_, a5 as tf, a6 as Ps, a7 as dist, a8 as nt, a9 as ge, aa as us, ab as ob, ac as wb, ad as _b, ae as Lb2, af as Ab2, ag as ab2, ah as Bz2, z as z1, x as xp, ai as bb, aj as cg, ak as Tb, al as Uy2, am as cb2, an as qb2, ao as Tb2, ap as Db2, M as M21, aq as Sb, ar as vb, as as Rb, at as ev, au as Mb2, av as vv, aw as qs, ax as nv, ay as Wv, az as mb, aA as Ib, aB as Lb, aC as CLINICAL_V2_CONFIG_BASE_URL, aD as qb, aE as Y_, aF as fn, aG as Mb, aH as cb, aI as Jv, aJ as oL2, aK as sv, aL as Fb, aM as jb, aN as Zv, aO as gb2, aP as fT, aQ as sb, aR as Vb, aS as Rt, aT as Yr, aU as oT, aV as lT, k as kr, aW as $v, aX as av, aY as lv, D as DKt, aZ as Wb2, a_ as jb2, a$ as Dv, b0 as Cv, b1 as Nb2, b2 as se, b3 as STOP_REASON_VALUESET_EXPAND_URL, b4 as Be, b5 as T_, b6 as STOP_REASON_VALUESET_TITLE, b7 as Gf, b8 as os, b9 as Pb2, ba as Iv, bb as xv, bc as i0, bd as rb, be as a0, bf as dn, bg as N4, bh as c3, bi as Bb2, bj as C_, bk as Lv, bl as Mv, bm as Uv, bn as Fv, bo as Ki, bp as cs, bq as gv, br as Ab, bs as dT, bt as Qv, bu as Xv, bv as Kv, bw as CDSS_SERVER_CONFIG_URL, bx as Nb, by as ec, bz as M0, bA as Ge, bB as N21, bC as yb2, bD as XE, bE as yv, bF as Ev, bG as mb2, bH as Xt, bI as bv, bJ as _v, bK as wv, bL as u21, bM as s21, bN as u0, bO as Tv, bP as Mi$1, bQ as g_, bR as BAHMNI_CLINICAL_PATH, bS as k_, bT as cw, bU as bb2, bV as _b2, bW as $z2, bX as un1, bY as x_, bZ as y21 } from "./index-DGEgKcRC.js";
2
+ import { u as useTranslation, H as q, I as ENCOUNTER_CONCEPTS_URL, J as Jr, L as Yo, M as oqt, N as Ns, O as BAHMNI_USER_LOCATION_COOKIE_NAME, P as bc, Q as D3, d as d0, S as Vb2, T as Cb2, X as vb2, Z as jx2, _ as il1, a0 as ub2, a1 as U_, a2 as Wi, a3 as rf, a4 as b_, a5 as tf, a6 as Ps, a7 as dist, a8 as nt, a9 as ge, aa as us, ab as ob, ac as wb, ad as _b, ae as Lb2, af as Ab2, ag as ab2, ah as Bz2, z as z1, y as yp, ai as bb, aj as cg, ak as Tb, al as Uy2, am as cb2, an as qb2, ao as Tb2, ap as Db2, i as h21, aq as Sb, ar as vb, as as Rb, at as ev, au as Mb2, av as vv, aw as qs, ax as nv, ay as Wv, az as mb, aA as Ib, aB as Lb, aC as CLINICAL_V2_CONFIG_BASE_URL, aD as qb, aE as Y_, aF as fn, aG as Mb, aH as cb, aI as Jv, aJ as oL2, aK as sv, aL as Fb, aM as jb, aN as Zv, aO as gb2, aP as fT, aQ as sb, aR as Vb, aS as Rt, aT as Yr, aU as oT, aV as lT, k as kr, aW as $v, aX as av, aY as lv, e as bKt, aZ as Wb2, a_ as jb2, a$ as Dv, b0 as Cv, b1 as Nb2, b2 as se, b3 as STOP_REASON_VALUESET_EXPAND_URL, b4 as Be, b5 as T_, b6 as STOP_REASON_VALUESET_TITLE, b7 as Gf, b8 as os, b9 as Pb2, ba as Iv, bb as xv, bc as i0, bd as rb, be as a0, bf as dn, bg as N4, bh as c3, bi as Bb2, bj as C_, bk as Lv, bl as Mv, bm as Uv, bn as Fv, bo as Ki, bp as cs, bq as gv, br as Ab, bs as dT, bt as Qv, bu as Xv, bv as Kv, bw as CDSS_SERVER_CONFIG_URL, bx as Nb, by as ec, bz as M0, bA as Ge, bB as w21, bC as yb2, bD as XE, bE as yv, bF as Ev, bG as mb2, bH as Xt, bI as bv, bJ as _v, bK as wv, bL as e21, bM as Yn1, bN as u0, bO as Tv, bP as Mi, bQ as g_, bR as BAHMNI_CLINICAL_PATH, bS as k_, bT as cw, bU as bb2, bV as _b2, bW as $z2, bX as en1, bY as x_, bZ as c21 } from "./index-CWrIj17R.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-Cgat4dpY.js";
7
+ import { u as useClinicalConfig } from "./hook-CPfpyOdi.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 : {};
@@ -1986,7 +1986,7 @@ const createImpl = (p) => {
1986
1986
  validate: () => {
1987
1987
  const a = c();
1988
1988
  if (!a.medicationToStop) return !0;
1989
- const s = a.inputControlKey === mqt, f = {}, d = a.fieldConfig;
1989
+ const s = a.inputControlKey === oqt, f = {}, d = a.fieldConfig;
1990
1990
  let h = !0;
1991
1991
  return d.stopDate?.isVisible !== !1 && d.stopDate?.isMandatory && !a.stopDate && (f.stopDate = "STOP_MEDICATION_DATE_REQUIRED", h = !1), d.stopReason?.isVisible !== !1 && d.stopReason?.isMandatory && !a.stopReason && (f.stopReason = s ? "CANCEL_VACCINATION_REASON_REQUIRED" : "STOP_MEDICATION_REASON_REQUIRED", h = !1), d.note?.isVisible !== !1 && d.note?.isMandatory && !a.note && (f.note = "STOP_MEDICATION_NOTE_REQUIRED", h = !1), p({ errors: f }), h;
1992
1992
  },
@@ -2095,7 +2095,7 @@ const useLocations = () => {
2095
2095
  encounterSessionStartContext: p,
2096
2096
  inputControlConfig: c
2097
2097
  }) => {
2098
- const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f = Mi(), d = d0(), {
2098
+ const a = p?.isVisitActive ?? !0, { t: s } = useTranslation(), f = D3(), d = d0(), {
2099
2099
  activeVisit: h,
2100
2100
  loading: E,
2101
2101
  error: g
@@ -133057,29 +133057,29 @@ function print() { __p += __j.call(arguments, '') }
133057
133057
  }, {}) }, To());
133058
133058
  }, I3 = "=", N3 = ur("=", !1), P3 = function(Se) {
133059
133059
  return Vo.push("select"), !0;
133060
- }, D3 = function(Se, $e) {
133060
+ }, S3 = function(Se, $e) {
133061
133061
  return Vo.pop(), ya({ id: Se, value: $e }, To());
133062
- }, S3 = function(Se) {
133062
+ }, L3 = function(Se) {
133063
133063
  return Vo.push("plural"), !0;
133064
- }, L3 = function(Se, $e) {
133064
+ }, O3 = function(Se, $e) {
133065
133065
  return Vo.pop(), ya({ id: Se, value: $e }, To());
133066
- }, O3 = P1("whitespace"), B3 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, k3 = U0([[" ", "\r"], " ", "…", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), F3 = P1("syntax pattern"), z3 = /^[!-\/:-@[-\^`{-~\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]/, Z3 = U0([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", "⑟"], ["─", "❵"], ["➔", "⯿"], ["⸀", "⹿"], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), j3 = P1("optional whitespace"), q3 = P1("number"), U3 = "-", W3 = ur("-", !1), K3 = function(Se, $e) {
133066
+ }, B3 = P1("whitespace"), k3 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, F3 = U0([[" ", "\r"], " ", "…", " ", " ", [" ", " "], "\u2028", "\u2029", " ", " ", " "], !1, !1), z3 = P1("syntax pattern"), Z3 = /^[!-\/:-@[-\^`{-~\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]/, j3 = U0([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["¡", "§"], "©", "«", "¬", "®", "°", "±", "¶", "»", "¿", "×", "÷", ["‐", "‧"], ["‰", "‾"], ["⁁", "⁓"], ["⁕", "⁞"], ["←", "⑟"], ["─", "❵"], ["➔", "⯿"], ["⸀", "⹿"], ["、", "〃"], ["〈", "〠"], "〰", "﴾", "﴿", "﹅", "﹆"], !1, !1), q3 = P1("optional whitespace"), U3 = P1("number"), W3 = "-", K3 = ur("-", !1), G3 = function(Se, $e) {
133067
133067
  return $e ? Se ? -$e : $e : 0;
133068
- }, G3 = P1("double apostrophes"), zc = "''", cp = ur("''", !1), Y3 = function() {
133068
+ }, Y3 = P1("double apostrophes"), zc = "''", cp = ur("''", !1), J3 = function() {
133069
133069
  return "'";
133070
- }, J3 = function(Se, $e) {
133070
+ }, Q3 = function(Se, $e) {
133071
133071
  return Se + $e.replace("''", "'");
133072
- }, Q3 = function(Se) {
133072
+ }, X3 = function(Se) {
133073
133073
  return !(Se === "{" || Fu() && Se === "#" || Vo.length > 1 && Se === "}");
133074
- }, X3 = `
133075
- `, eh = ur(`
133076
- `, !1), th = function(Se) {
133074
+ }, eh = `
133075
+ `, th = ur(`
133076
+ `, !1), ah = function(Se) {
133077
133077
  return Se === "{" || Se === "}" || Fu() && Se === "#";
133078
- }, ah = P1("argNameOrNumber"), nh = P1("argNumber"), rh = "0", oh = ur("0", !1), ch = function() {
133078
+ }, nh = P1("argNameOrNumber"), rh = P1("argNumber"), oh = "0", ch = ur("0", !1), ih = function() {
133079
133079
  return 0;
133080
- }, ih = /^[1-9]/, lh = U0([["1", "9"]], !1, !1), vu = /^[0-9]/, Cu = U0([["0", "9"]], !1, !1), sh = function(Se) {
133080
+ }, lh = /^[1-9]/, sh = U0([["1", "9"]], !1, !1), vu = /^[0-9]/, Cu = U0([["0", "9"]], !1, !1), fh = function(Se) {
133081
133081
  return parseInt(Se.join(""), 10);
133082
- }, fh = P1("argName"), be = 0, En = 0, Us = [{ line: 1, column: 1 }], bo = 0, ip = [], gt = 0;
133082
+ }, ph = P1("argName"), be = 0, En = 0, Us = [{ line: 1, column: 1 }], bo = 0, ip = [], gt = 0;
133083
133083
  if (u.startRule !== void 0) {
133084
133084
  if (!(u.startRule in y)) throw new Error(`Can't start parsing from rule "` + u.startRule + '".');
133085
133085
  x = y[u.startRule];
@@ -133244,72 +133244,72 @@ function print() { __p += __j.call(arguments, '') }
133244
133244
  }
133245
133245
  function Nu() {
133246
133246
  var Se, $e, je, Vt, Lt;
133247
- return Se = be, sn() !== m && ($e = pp()) !== m && sn() !== m ? (_.charCodeAt(be) === 123 ? (je = Ce, be++) : (je = m, gt === 0 && Zt(Me)), je !== m ? (En = be, (P3() ? void 0 : m) !== m && (Vt = sp()) !== m ? (_.charCodeAt(be) === 125 ? (Lt = xe, be++) : (Lt = m, gt === 0 && Zt(Oe)), Lt !== m ? (En = Se, Se = D3($e, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m), Se;
133247
+ return Se = be, sn() !== m && ($e = pp()) !== m && sn() !== m ? (_.charCodeAt(be) === 123 ? (je = Ce, be++) : (je = m, gt === 0 && Zt(Me)), je !== m ? (En = be, (P3() ? void 0 : m) !== m && (Vt = sp()) !== m ? (_.charCodeAt(be) === 125 ? (Lt = xe, be++) : (Lt = m, gt === 0 && Zt(Oe)), Lt !== m ? (En = Se, Se = S3($e, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m), Se;
133248
133248
  }
133249
133249
  function Pu() {
133250
133250
  var Se, $e, je, Vt, Lt;
133251
133251
  return Se = be, sn() !== m ? ($e = (function() {
133252
133252
  var La, Xa, va, Ya;
133253
133253
  return La = be, Xa = be, _.charCodeAt(be) === 61 ? (va = I3, be++) : (va = m, gt === 0 && Zt(N3)), va !== m && (Ya = Su()) !== m ? Xa = va = [va, Ya] : (be = Xa, Xa = m), (La = Xa !== m ? _.substring(La, be) : Xa) === m && (La = pp()), La;
133254
- })(), $e !== m && sn() !== m ? (_.charCodeAt(be) === 123 ? (je = Ce, be++) : (je = m, gt === 0 && Zt(Me)), je !== m ? (En = be, (S3() ? void 0 : m) !== m && (Vt = sp()) !== m ? (_.charCodeAt(be) === 125 ? (Lt = xe, be++) : (Lt = m, gt === 0 && Zt(Oe)), Lt !== m ? (En = Se, Se = L3($e, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m), Se;
133254
+ })(), $e !== m && sn() !== m ? (_.charCodeAt(be) === 123 ? (je = Ce, be++) : (je = m, gt === 0 && Zt(Me)), je !== m ? (En = be, (L3() ? void 0 : m) !== m && (Vt = sp()) !== m ? (_.charCodeAt(be) === 125 ? (Lt = xe, be++) : (Lt = m, gt === 0 && Zt(Oe)), Lt !== m ? (En = Se, Se = O3($e, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m)) : (be = Se, Se = m), Se;
133255
133255
  }
133256
133256
  function Zc() {
133257
133257
  var Se;
133258
- return gt++, B3.test(_.charAt(be)) ? (Se = _.charAt(be), be++) : (Se = m, gt === 0 && Zt(k3)), gt--, Se === m && gt === 0 && Zt(O3), Se;
133258
+ return gt++, k3.test(_.charAt(be)) ? (Se = _.charAt(be), be++) : (Se = m, gt === 0 && Zt(F3)), gt--, Se === m && gt === 0 && Zt(B3), Se;
133259
133259
  }
133260
133260
  function Du() {
133261
133261
  var Se;
133262
- return gt++, z3.test(_.charAt(be)) ? (Se = _.charAt(be), be++) : (Se = m, gt === 0 && Zt(Z3)), gt--, Se === m && gt === 0 && Zt(F3), Se;
133262
+ return gt++, Z3.test(_.charAt(be)) ? (Se = _.charAt(be), be++) : (Se = m, gt === 0 && Zt(j3)), gt--, Se === m && gt === 0 && Zt(z3), Se;
133263
133263
  }
133264
133264
  function sn() {
133265
133265
  var Se, $e, je;
133266
133266
  for (gt++, Se = be, $e = [], je = Zc(); je !== m; ) $e.push(je), je = Zc();
133267
- return Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(j3)), Se;
133267
+ return Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(q3)), Se;
133268
133268
  }
133269
133269
  function Su() {
133270
133270
  var Se, $e, je;
133271
- return gt++, Se = be, _.charCodeAt(be) === 45 ? ($e = U3, be++) : ($e = m, gt === 0 && Zt(W3)), $e === m && ($e = null), $e !== m && (je = Bu()) !== m ? (En = Se, Se = $e = K3($e, je)) : (be = Se, Se = m), gt--, Se === m && ($e = m, gt === 0 && Zt(q3)), Se;
133271
+ return gt++, Se = be, _.charCodeAt(be) === 45 ? ($e = W3, be++) : ($e = m, gt === 0 && Zt(K3)), $e === m && ($e = null), $e !== m && (je = Bu()) !== m ? (En = Se, Se = $e = G3($e, je)) : (be = Se, Se = m), gt--, Se === m && ($e = m, gt === 0 && Zt(U3)), Se;
133272
133272
  }
133273
133273
  function jc() {
133274
133274
  var Se, $e;
133275
- return gt++, Se = be, _.substr(be, 2) === zc ? ($e = zc, be += 2) : ($e = m, gt === 0 && Zt(cp)), $e !== m && (En = Se, $e = Y3()), gt--, (Se = $e) === m && ($e = m, gt === 0 && Zt(G3)), Se;
133275
+ return gt++, Se = be, _.substr(be, 2) === zc ? ($e = zc, be += 2) : ($e = m, gt === 0 && Zt(cp)), $e !== m && (En = Se, $e = J3()), gt--, (Se = $e) === m && ($e = m, gt === 0 && Zt(Y3)), Se;
133276
133276
  }
133277
133277
  function Lu() {
133278
133278
  var Se, $e, je, Vt, Lt, La;
133279
133279
  if (Se = be, _.charCodeAt(be) === 39 ? ($e = Cn, be++) : ($e = m, gt === 0 && Zt(Dn)), $e !== m) if (je = (function() {
133280
133280
  var Xa, va, Ya, Sn;
133281
- return Xa = be, va = be, _.length > be ? (Ya = _.charAt(be), be++) : (Ya = m, gt === 0 && Zt(vt)), Ya !== m ? (En = be, (Sn = (Sn = th(Ya)) ? void 0 : m) !== m ? va = Ya = [Ya, Sn] : (be = va, va = m)) : (be = va, va = m), Xa = va !== m ? _.substring(Xa, be) : va;
133281
+ return Xa = be, va = be, _.length > be ? (Ya = _.charAt(be), be++) : (Ya = m, gt === 0 && Zt(vt)), Ya !== m ? (En = be, (Sn = (Sn = ah(Ya)) ? void 0 : m) !== m ? va = Ya = [Ya, Sn] : (be = va, va = m)) : (be = va, va = m), Xa = va !== m ? _.substring(Xa, be) : va;
133282
133282
  })(), je !== m) {
133283
133283
  for (Vt = be, Lt = [], _.substr(be, 2) === zc ? (La = zc, be += 2) : (La = m, gt === 0 && Zt(cp)), La === m && (An.test(_.charAt(be)) ? (La = _.charAt(be), be++) : (La = m, gt === 0 && Zt(mn))); La !== m; ) Lt.push(La), _.substr(be, 2) === zc ? (La = zc, be += 2) : (La = m, gt === 0 && Zt(cp)), La === m && (An.test(_.charAt(be)) ? (La = _.charAt(be), be++) : (La = m, gt === 0 && Zt(mn)));
133284
- (Vt = Lt !== m ? _.substring(Vt, be) : Lt) !== m ? (_.charCodeAt(be) === 39 ? (Lt = Cn, be++) : (Lt = m, gt === 0 && Zt(Dn)), Lt === m && (Lt = null), Lt !== m ? (En = Se, Se = $e = J3(je, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m);
133284
+ (Vt = Lt !== m ? _.substring(Vt, be) : Lt) !== m ? (_.charCodeAt(be) === 39 ? (Lt = Cn, be++) : (Lt = m, gt === 0 && Zt(Dn)), Lt === m && (Lt = null), Lt !== m ? (En = Se, Se = $e = Q3(je, Vt)) : (be = Se, Se = m)) : (be = Se, Se = m);
133285
133285
  } else be = Se, Se = m;
133286
133286
  else be = Se, Se = m;
133287
133287
  return Se;
133288
133288
  }
133289
133289
  function Ou() {
133290
133290
  var Se, $e, je, Vt;
133291
- return Se = be, $e = be, _.length > be ? (je = _.charAt(be), be++) : (je = m, gt === 0 && Zt(vt)), je !== m ? (En = be, (Vt = (Vt = Q3(je)) ? void 0 : m) !== m ? $e = je = [je, Vt] : (be = $e, $e = m)) : (be = $e, $e = m), $e === m && (_.charCodeAt(be) === 10 ? ($e = X3, be++) : ($e = m, gt === 0 && Zt(eh))), $e !== m ? _.substring(Se, be) : $e;
133291
+ return Se = be, $e = be, _.length > be ? (je = _.charAt(be), be++) : (je = m, gt === 0 && Zt(vt)), je !== m ? (En = be, (Vt = (Vt = X3(je)) ? void 0 : m) !== m ? $e = je = [je, Vt] : (be = $e, $e = m)) : (be = $e, $e = m), $e === m && (_.charCodeAt(be) === 10 ? ($e = eh, be++) : ($e = m, gt === 0 && Zt(th))), $e !== m ? _.substring(Se, be) : $e;
133292
133292
  }
133293
133293
  function fl() {
133294
133294
  var Se, $e;
133295
- return gt++, Se = be, ($e = Bu()) === m && ($e = pp()), Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(ah)), Se;
133295
+ return gt++, Se = be, ($e = Bu()) === m && ($e = pp()), Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(nh)), Se;
133296
133296
  }
133297
133297
  function Bu() {
133298
133298
  var Se, $e, je, Vt, Lt;
133299
- if (gt++, Se = be, _.charCodeAt(be) === 48 ? ($e = rh, be++) : ($e = m, gt === 0 && Zt(oh)), $e !== m && (En = Se, $e = ch()), (Se = $e) === m) {
133300
- if (Se = be, $e = be, ih.test(_.charAt(be)) ? (je = _.charAt(be), be++) : (je = m, gt === 0 && Zt(lh)), je !== m) {
133299
+ if (gt++, Se = be, _.charCodeAt(be) === 48 ? ($e = oh, be++) : ($e = m, gt === 0 && Zt(ch)), $e !== m && (En = Se, $e = ih()), (Se = $e) === m) {
133300
+ if (Se = be, $e = be, lh.test(_.charAt(be)) ? (je = _.charAt(be), be++) : (je = m, gt === 0 && Zt(sh)), je !== m) {
133301
133301
  for (Vt = [], vu.test(_.charAt(be)) ? (Lt = _.charAt(be), be++) : (Lt = m, gt === 0 && Zt(Cu)); Lt !== m; ) Vt.push(Lt), vu.test(_.charAt(be)) ? (Lt = _.charAt(be), be++) : (Lt = m, gt === 0 && Zt(Cu));
133302
133302
  Vt !== m ? $e = je = [je, Vt] : (be = $e, $e = m);
133303
133303
  } else be = $e, $e = m;
133304
- $e !== m && (En = Se, $e = sh($e)), Se = $e;
133304
+ $e !== m && (En = Se, $e = fh($e)), Se = $e;
133305
133305
  }
133306
- return gt--, Se === m && ($e = m, gt === 0 && Zt(nh)), Se;
133306
+ return gt--, Se === m && ($e = m, gt === 0 && Zt(rh)), Se;
133307
133307
  }
133308
133308
  function pp() {
133309
133309
  var Se, $e, je, Vt, Lt;
133310
133310
  if (gt++, Se = be, $e = [], je = be, Vt = be, gt++, (Lt = Zc()) === m && (Lt = Du()), gt--, Lt === m ? Vt = void 0 : (be = Vt, Vt = m), Vt !== m ? (_.length > be ? (Lt = _.charAt(be), be++) : (Lt = m, gt === 0 && Zt(vt)), Lt !== m ? je = Vt = [Vt, Lt] : (be = je, je = m)) : (be = je, je = m), je !== m) for (; je !== m; ) $e.push(je), je = be, Vt = be, gt++, (Lt = Zc()) === m && (Lt = Du()), gt--, Lt === m ? Vt = void 0 : (be = Vt, Vt = m), Vt !== m ? (_.length > be ? (Lt = _.charAt(be), be++) : (Lt = m, gt === 0 && Zt(vt)), Lt !== m ? je = Vt = [Vt, Lt] : (be = je, je = m)) : (be = je, je = m);
133311
133311
  else $e = m;
133312
- return Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(fh)), Se;
133312
+ return Se = $e !== m ? _.substring(Se, be) : $e, gt--, Se === m && ($e = m, gt === 0 && Zt(ph)), Se;
133313
133313
  }
133314
133314
  var up, dp, ku, Vo = ["root"];
133315
133315
  function Fu() {
@@ -136544,14 +136544,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136544
136544
  function Cp(_) {
136545
136545
  return !(!ys() || typeof ShadowRoot > "u") && (_ instanceof ShadowRoot || _ instanceof k2(_).ShadowRoot);
136546
136546
  }
136547
- function yp(_) {
136548
- const { overflow: u, overflowX: A, overflowY: m, display: y } = Rp(_);
136547
+ function Rp(_) {
136548
+ const { overflow: u, overflowX: A, overflowY: m, display: y } = bp(_);
136549
136549
  return /auto|scroll|overlay|hidden|clip/.test(u + m + A) && y !== "inline" && y !== "contents";
136550
136550
  }
136551
- function Rp(_) {
136551
+ function bp(_) {
136552
136552
  return k2(_).getComputedStyle(_);
136553
136553
  }
136554
- function bp(_) {
136554
+ function Vp(_) {
136555
136555
  const u = (function(A) {
136556
136556
  if (gp(A) === "html") return A;
136557
136557
  const m = A.assignedSlot || A.parentNode || Cp(A) && A.host || wp(A);
@@ -136559,15 +136559,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136559
136559
  })(_);
136560
136560
  return (function(A) {
136561
136561
  return /^(html|body|#document)$/.test(gp(A));
136562
- })(u) ? (_.ownerDocument || _).body : Rf(u) && yp(u) ? u : bp(u);
136562
+ })(u) ? (_.ownerDocument || _).body : Rf(u) && Rp(u) ? u : Vp(u);
136563
136563
  }
136564
136564
  function Rs(_, u, A) {
136565
136565
  var m;
136566
136566
  u === void 0 && (u = []), A === void 0 && (A = !0);
136567
- const y = bp(_), x = y === ((m = _.ownerDocument) == null ? void 0 : m.body), P = k2(y);
136567
+ const y = Vp(_), x = y === ((m = _.ownerDocument) == null ? void 0 : m.body), P = k2(y);
136568
136568
  if (x) {
136569
136569
  const j = Ju(P);
136570
- return u.concat(P, P.visualViewport || [], yp(y) ? y : [], j && A ? Rs(j) : []);
136570
+ return u.concat(P, P.visualViewport || [], Rp(y) ? y : [], j && A ? Rs(j) : []);
136571
136571
  }
136572
136572
  return u.concat(y, Rs(y, [], A));
136573
136573
  }
@@ -136581,7 +136581,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136581
136581
  const u = bf(_);
136582
136582
  if (!Rf(u)) return yf(1);
136583
136583
  const A = u.getBoundingClientRect(), { width: m, height: y, $: x } = (function(Z) {
136584
- const G = Rp(Z);
136584
+ const G = bp(Z);
136585
136585
  let te = parseFloat(G.width) || 0, fe = parseFloat(G.height) || 0;
136586
136586
  const Ce = Rf(Z), Me = Ce ? Z.offsetWidth : te, xe = Ce ? Z.offsetHeight : fe, Oe = vs(te) !== Me || vs(fe) !== xe;
136587
136587
  return Oe && (te = Me, fe = xe), { width: te, height: fe, $: Oe };
@@ -136589,7 +136589,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136589
136589
  let P = (x ? vs(A.width) : A.width) / m, j = (x ? vs(A.height) : A.height) / y;
136590
136590
  return P && Number.isFinite(P) || (P = 1), j && Number.isFinite(j) || (j = 1), { x: P, y: j };
136591
136591
  }
136592
- function Vp(_, u, A, m) {
136592
+ function Tp(_, u, A, m) {
136593
136593
  u === void 0 && (u = !1);
136594
136594
  const y = _.getBoundingClientRect();
136595
136595
  bf(_);
@@ -136602,7 +136602,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136602
136602
  return { width: xe, height: Oe, top: Me, left: Ce, right: Ce + xe, bottom: Me + Oe, x: Ce, y: Me };
136603
136603
  })({ width: G, height: te, x: j, y: Z });
136604
136604
  }
136605
- function Tp(_, u) {
136605
+ function Hp(_, u) {
136606
136606
  return _.x === u.x && _.y === u.y && _.width === u.width && _.height === u.height;
136607
136607
  }
136608
136608
  var Xu = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"], bs = function() {
@@ -136623,7 +136623,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136623
136623
  var Vs = function(_) {
136624
136624
  return u = _, Array.isArray(u) ? _.filter(Boolean) : l1(_) === "object" && _ !== null ? [_] : [];
136625
136625
  var u;
136626
- }, Hp = function(_) {
136626
+ }, Mp = function(_) {
136627
136627
  return _.className, _.clearValue, _.cx, _.getStyles, _.getClassNames, _.getValue, _.hasValue, _.isMulti, _.isRtl, _.options, _.selectOption, _.selectProps, _.setValue, _.theme, ia({}, h1(_, Xu));
136628
136628
  }, er = function(_, u, A) {
136629
136629
  var m = _.cx, y = _.getStyles, x = _.getClassNames, P = _.className;
@@ -136632,14 +136632,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136632
136632
  function Ts(_) {
136633
136633
  return [document.documentElement, document.body, window].indexOf(_) > -1;
136634
136634
  }
136635
- function Mp(_) {
136635
+ function xp(_) {
136636
136636
  return Ts(_) ? window.pageYOffset : _.scrollTop;
136637
136637
  }
136638
136638
  function Hs(_, u) {
136639
136639
  Ts(_) ? window.scrollTo(0, u) : _.scrollTop = u;
136640
136640
  }
136641
136641
  function Ms(_, u) {
136642
- var A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 200, m = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : bs, y = Mp(_), x = u - y, P = 0;
136642
+ var A = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 200, m = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : bs, y = xp(_), x = u - y, P = 0;
136643
136643
  (function j() {
136644
136644
  var Z, G = x * ((Z = (Z = P += 10) / A - 1) * Z * Z + 1) + y;
136645
136645
  Hs(_, G), P < A ? window.requestAnimationFrame(j) : m(_);
@@ -136682,7 +136682,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136682
136682
  return document.documentElement;
136683
136683
  })(it), ka = { placement: "bottom", maxHeight: Pt };
136684
136684
  if (!it || !it.offsetParent) return ka;
136685
- var Na, ba = Kt.getBoundingClientRect().height, ja = it.getBoundingClientRect(), qa = ja.bottom, Za = ja.height, On = ja.top, ln = it.offsetParent.getBoundingClientRect().top, Ta = aa || Ts(Na = Kt) ? window.innerHeight : Na.clientHeight, Cn = Mp(Kt), Dn = parseInt(getComputedStyle(it).marginBottom, 10), An = parseInt(getComputedStyle(it).marginTop, 10), mn = ln - An, tr = Ta - On, yn = mn + Cn, Gr = ba - Cn - On, xr = qa - Ta + Cn + Dn, ca = Cn + On - An, Fa = 160;
136685
+ var Na, ba = Kt.getBoundingClientRect().height, ja = it.getBoundingClientRect(), qa = ja.bottom, Za = ja.height, On = ja.top, ln = it.offsetParent.getBoundingClientRect().top, Ta = aa || Ts(Na = Kt) ? window.innerHeight : Na.clientHeight, Cn = xp(Kt), Dn = parseInt(getComputedStyle(it).marginBottom, 10), An = parseInt(getComputedStyle(it).marginTop, 10), mn = ln - An, tr = Ta - On, yn = mn + Cn, Gr = ba - Cn - On, xr = qa - Ta + Cn + Dn, ca = Cn + On - An, Fa = 160;
136686
136686
  switch (Jt) {
136687
136687
  case "auto":
136688
136688
  case "bottom":
@@ -136753,7 +136753,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136753
136753
  var u = _.children, A = _.cx, m = _.getStyles, y = _.getClassNames, x = _.Heading, P = _.headingProps, j = _.innerProps, Z = _.label, G = _.theme, te = _.selectProps;
136754
136754
  return ma("div", ha({}, er(_, "group", { group: !0 }), j), ma(x, ha({}, P, { selectProps: te, theme: G, getStyles: m, getClassNames: y, cx: A }), Z), ma("div", null, u));
136755
136755
  }, GroupHeading: function(_) {
136756
- var u = Hp(_);
136756
+ var u = Mp(_);
136757
136757
  u.data;
136758
136758
  var A = h1(u, Ad);
136759
136759
  return ma("div", ha({}, er(_, "groupHeading", { "group-heading": !0 }), A));
@@ -136764,7 +136764,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136764
136764
  var u = _.innerProps;
136765
136765
  return ma("span", ha({}, u, er(_, "indicatorSeparator", { "indicator-separator": !0 })));
136766
136766
  }, Input: function(_) {
136767
- var u = _.cx, A = _.value, m = Hp(_), y = m.innerRef, x = m.isDisabled, P = m.isHidden, j = m.inputClassName, Z = h1(m, md);
136767
+ var u = _.cx, A = _.value, m = Mp(_), y = m.innerRef, x = m.isDisabled, P = m.isHidden, j = m.inputClassName, Z = h1(m, md);
136768
136768
  return ma("div", ha({}, er(_, "input", { "input-container": !0 }), { "data-value": A || "" }), ma("input", ha({ className: u({ input: !0 }, j), ref: y, style: gd(P), disabled: x }, Z)));
136769
136769
  }, LoadingIndicator: function(_) {
136770
136770
  var u = _.innerProps, A = _.isRtl, m = _.size, y = m === void 0 ? 4 : m, x = h1(_, pd);
@@ -136812,7 +136812,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136812
136812
  let A1 = !0;
136813
136813
  function Ir(Ro) {
136814
136814
  const sl = Ro[0].intersectionRatio;
136815
- if (!Tp(ar, ln.getBoundingClientRect())) return yn();
136815
+ if (!Hp(ar, ln.getBoundingClientRect())) return yn();
136816
136816
  if (sl !== Fa) {
136817
136817
  if (!A1) return yn();
136818
136818
  sl ? yn(!1, sl) : Dn = setTimeout(() => {
@@ -136841,10 +136841,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136841
136841
  (Cn = Za) == null || Cn.observe(Pt);
136842
136842
  })), it();
136843
136843
  }), ka && !Kt && Za.observe(ka), Pt && Za.observe(Pt));
136844
- let On = Kt ? Vp(vt) : null;
136844
+ let On = Kt ? Tp(vt) : null;
136845
136845
  return Kt && (function ln() {
136846
- const Ta = Vp(vt);
136847
- On && !Tp(On, Ta) && it(), On = Ta, ja = requestAnimationFrame(ln);
136846
+ const Ta = Tp(vt);
136847
+ On && !Hp(On, Ta) && it(), On = Ta, ja = requestAnimationFrame(ln);
136848
136848
  })(), it(), () => {
136849
136849
  var ln;
136850
136850
  Na.forEach((Ta) => {
@@ -139902,10 +139902,10 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139902
139902
  selectedAllergyItem,
139903
139903
  duplicateNotification: duplicateNotification$2
139904
139904
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139905
- const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = d0(), { addNotification: f } = z1(), d = xp(
139906
- M21.ALLERGIES
139907
- ), h = xp(
139908
- M21.EDIT_ALLERGIES
139905
+ const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = d0(), { addNotification: f } = z1(), d = yp(
139906
+ h21.ALLERGIES
139907
+ ), h = yp(
139908
+ h21.EDIT_ALLERGIES
139909
139909
  ), [E, g] = useState(""), [R, V] = useState(null), [H, M] = useState(!1), [$, B] = useState(
139910
139910
  null
139911
139911
  ), {
@@ -140298,8 +140298,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140298
140298
  selectedInvestigationItem,
140299
140299
  duplicateNotification: duplicateNotification$1
140300
140300
  }, InvestigationsForm = React__default.memo(() => {
140301
- const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140302
- M21.INVESTIGATIONS
140301
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = yp(
140302
+ h21.INVESTIGATIONS
140303
140303
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), { activeEncounter: V, matchReasons: H } = vv(), $ = H.includes("MATCHED") ? V?.id : void 0, {
140304
140304
  data: B,
140305
140305
  refetch: I,
@@ -140711,8 +140711,8 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140711
140711
  selectedConditionItem,
140712
140712
  duplicateNotification
140713
140713
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140714
- const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140715
- M21.CONDITIONS_AND_DIAGNOSES
140714
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = yp(
140715
+ h21.CONDITIONS_AND_DIAGNOSES
140716
140716
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), {
140717
140717
  selectedDiagnoses: V,
140718
140718
  selectedConditions: H,
@@ -143667,7 +143667,7 @@ function useSubmittedEncounterForms(p) {
143667
143667
  ), useMemo(() => {
143668
143668
  const g = d?.entry?.map((V) => V.resource).filter((V) => V?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
143669
143669
  for (const V of g) {
143670
- const H = DKt(V);
143670
+ const H = bKt(V);
143671
143671
  if (!H) continue;
143672
143672
  const M = p.find(($) => $.name === H);
143673
143673
  M && R.add(M.uuid);
@@ -143691,8 +143691,8 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143691
143691
  observationFormsError: g,
143692
143692
  submittedFormUuids: R = EMPTY_SET
143693
143693
  }) => {
143694
- const { t: V } = useTranslation(), H = xp(
143695
- M21.OBSERVATIONS
143694
+ const { t: V } = useTranslation(), H = yp(
143695
+ h21.OBSERVATIONS
143696
143696
  ), [M, $] = useState(""), [B, I] = useState(null), { getFormData: D } = useObservationFormsStore(), z = useMemo(() => {
143697
143697
  if (!M.trim()) return h;
143698
143698
  const ne = M.toLowerCase().trim().split(/\s+/);
@@ -143886,7 +143886,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", inlineNotif
143886
143886
  }, ObservationFormsPanel = ({
143887
143887
  encounterSessionStartContext: p
143888
143888
  }) => {
143889
- const { t: c } = useTranslation(), { user: a } = Mi(), s = d0(), { episodeOfCare: f } = useClinicalAppData(), d = f.map((ae) => ae.uuid), h = p?.formName, E = p?.directFormMode, g = p?.sourceEncounterUuid, R = p?.activeEncounter, V = !g || R === void 0 ? void 0 : R?.id !== g, $ = p?.task?.basedOn?.[0]?.reference?.split("/").pop() ?? void 0, B = p?.editOnly === "observationForms", I = B && !!g && V === !1, D = B && !!g && V === !0, z = !!(h && E), {
143889
+ const { t: c } = useTranslation(), { user: a } = D3(), s = d0(), { episodeOfCare: f } = useClinicalAppData(), d = f.map((ae) => ae.uuid), h = p?.formName, E = p?.directFormMode, g = p?.sourceEncounterUuid, R = p?.activeEncounter, V = !g || R === void 0 ? void 0 : R?.id !== g, $ = p?.task?.basedOn?.[0]?.reference?.split("/").pop() ?? void 0, B = p?.editOnly === "observationForms", I = B && !!g && V === !1, D = B && !!g && V === !0, z = !!(h && E), {
143890
143890
  forms: O,
143891
143891
  isLoading: F,
143892
143892
  error: k
@@ -144093,7 +144093,7 @@ function createStopMedicationEntry(p) {
144093
144093
  if (!c.medicationToStop?.id || !c.stopReason) return [];
144094
144094
  const a = c.medicationToStop.subject?.reference?.split("/").pop();
144095
144095
  if (!a) return [];
144096
- const f = c.inputControlKey === mqt ? Be.Cancelled : Be.Stopped, d = `${c.stopDate.getFullYear()}-${String(c.stopDate.getMonth() + 1).padStart(2, "0")}-${String(c.stopDate.getDate()).padStart(2, "0")}`, h = {
144096
+ const f = c.inputControlKey === oqt ? Be.Cancelled : Be.Stopped, d = `${c.stopDate.getFullYear()}-${String(c.stopDate.getMonth() + 1).padStart(2, "0")}-${String(c.stopDate.getDate()).padStart(2, "0")}`, h = {
144097
144097
  resourceType: "MedicationRequest",
144098
144098
  status: f,
144099
144099
  intent: "order",
@@ -144142,7 +144142,7 @@ const stopMedicationFormTile = "StopMedicationForm-module_stopMedicationFormTile
144142
144142
  noteColumn
144143
144143
  }, StopMedicationForm = React__default.memo(
144144
144144
  ({ encounterSessionStartContext: p, inputControlConfig: c }) => {
144145
- const { t: a } = useTranslation(), s = c?.type === mqt, f = p?.stopMedication, {
144145
+ const { t: a } = useTranslation(), s = c?.type === oqt, f = p?.stopMedication, {
144146
144146
  stopDate: d,
144147
144147
  stopReason: h,
144148
144148
  note: E,
@@ -144346,7 +144346,7 @@ const InputControlRenderer = ({
144346
144346
  encounterType: c,
144347
144347
  encounterSessionStartContext: a
144348
144348
  }) => {
144349
- const s = xp(p.privilege);
144349
+ const s = yp(p.privilege);
144350
144350
  if (p.encounterTypes && !p.encounterTypes.includes(c) || !s)
144351
144351
  return null;
144352
144352
  const f = p.component;
@@ -144565,7 +144565,7 @@ const executeOnFormSaveEvent = (p, c, a, s) => {
144565
144565
  const { t: H } = useTranslation(), M = useActionAreaExpandProps({
144566
144566
  isExpanded: R,
144567
144567
  onToggleExpand: V
144568
- }), $ = g?.editOnly === "observationForms" && !!g?.sourceEncounterUuid, B = g?.activeEncounter, I = g?.sourceEncounterUuid, z = (!I || B === void 0 ? void 0 : B?.id !== I) && H("OBSERVATION_FORM_COPYOVER_NOTICE").trim(), [O, F] = React__default.useState(!1), k = g?.task, U = d0(), { user: W } = Mi(), { episodeOfCare: N, activeVisitId: K } = useClinicalAppData(), {
144568
+ }), $ = g?.editOnly === "observationForms" && !!g?.sourceEncounterUuid, B = g?.activeEncounter, I = g?.sourceEncounterUuid, z = (!I || B === void 0 ? void 0 : B?.id !== I) && H("OBSERVATION_FORM_COPYOVER_NOTICE").trim(), [O, F] = React__default.useState(!1), k = g?.task, U = d0(), { user: W } = D3(), { episodeOfCare: N, activeVisitId: K } = useClinicalAppData(), {
144569
144569
  data: X,
144570
144570
  isLoading: T,
144571
144571
  error: le
@@ -145092,7 +145092,7 @@ const ConsultationPad = ({
145092
145092
  useEffect(() => {
145093
145093
  useEncounterDetailsStore.getState().setRequestedEncounterType(T);
145094
145094
  }, [T]);
145095
- const { patientId: pe, activeVisitId: ae, activeEpisodeId: re, episodeOfCare: J } = useClinicalAppData(), he = re ? J.find((Bt) => Bt.uuid === re)?.encounterUuids : void 0, { practitioner: _e } = Mi(), { data: ce, status: ye } = useQuery({
145095
+ const { patientId: pe, activeVisitId: ae, activeEpisodeId: re, episodeOfCare: J } = useClinicalAppData(), he = re ? J.find((Bt) => Bt.uuid === re)?.encounterUuids : void 0, { practitioner: _e } = D3(), { data: ce, status: ye } = useQuery({
145096
145096
  queryKey: [
145097
145097
  "activeEncounter",
145098
145098
  pe,
@@ -145390,8 +145390,8 @@ const ConsultationPad = ({
145390
145390
  isActionAreaExpanded: a,
145391
145391
  onToggleActionAreaExpand: s
145392
145392
  }) => {
145393
- const { t: f } = useTranslation(), { addNotification: d } = z1(), h = d0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: g, isLoading: R } = useClinicalConfig(), { encounterConcepts: V } = useEncounterConcepts(), H = xp(
145394
- M21.ADD_VISITS
145393
+ const { t: f } = useTranslation(), { addNotification: d } = z1(), h = d0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: g, isLoading: R } = useClinicalConfig(), { encounterConcepts: V } = useEncounterConcepts(), H = yp(
145394
+ h21.ADD_VISITS
145395
145395
  ), M = useActionAreaExpandProps({
145396
145396
  isExpanded: a,
145397
145397
  onToggleExpand: s
@@ -145563,7 +145563,7 @@ const ConsultationPad = ({
145563
145563
  visitUuids: f
145564
145564
  }) => {
145565
145565
  const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: g } = vv(), R = h.includes("NO_ACTIVE_VISIT"), V = h.includes("MATCHED"), M = h.includes("MATCHED") ? g?.id ?? null : null, $ = (I, D, z) => {
145566
- const O = N21(I.type);
145566
+ const O = w21(I.type);
145567
145567
  if (!O)
145568
145568
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${D}`);
145569
145569
  const F = D < z - 1;
@@ -145755,8 +145755,8 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145755
145755
  isLoading: a
145756
145756
  }) => {
145757
145757
  const { t: s } = useTranslation();
145758
- return xp(
145759
- M21.ENCOUNTER
145758
+ return yp(
145759
+ h21.ENCOUNTER
145760
145760
  ) ? a ? /* @__PURE__ */ jsx(
145761
145761
  mb2,
145762
145762
  {
@@ -145779,7 +145779,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145779
145779
  isActionAreaVisible: p,
145780
145780
  printOptions: c
145781
145781
  }) => {
145782
- const { t: a } = useTranslation(), { practitioner: s } = Mi(), { clinicalConfig: f } = useClinicalConfig(), { encounterConcepts: d } = useEncounterConcepts(), h = d0(), E = f?.consultationPad?.inputControls?.find(
145782
+ const { t: a } = useTranslation(), { practitioner: s } = D3(), { clinicalConfig: f } = useClinicalConfig(), { encounterConcepts: d } = useEncounterConcepts(), h = d0(), E = f?.consultationPad?.inputControls?.find(
145783
145783
  (k) => k.type === "encounterDetails"
145784
145784
  )?.metadata?.defaultEncounterType, g = useMemo(() => {
145785
145785
  if (!(!E || !d))
@@ -145834,7 +145834,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145834
145834
  "data-active-encounter-uuid": V && H?.id ? H.id : void 0,
145835
145835
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145836
145836
  children: [
145837
- /* @__PURE__ */ jsx(u21, {}),
145837
+ /* @__PURE__ */ jsx(e21, {}),
145838
145838
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145839
145839
  /* @__PURE__ */ jsx(
145840
145840
  ConsultationActionButton,
@@ -145845,7 +145845,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145845
145845
  }
145846
145846
  ),
145847
145847
  /* @__PURE__ */ jsx(
145848
- s21,
145848
+ Yn1,
145849
145849
  {
145850
145850
  printOptions: c,
145851
145851
  renderContext: F,
@@ -146051,11 +146051,11 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146051
146051
  );
146052
146052
  return c || p[0];
146053
146053
  }, filterControlsByPrivileges = (p) => p.filter(
146054
- (c) => xp(c.requiredPrivileges)
146054
+ (c) => yp(c.requiredPrivileges)
146055
146055
  ), filterSectionsByPrivileges = (p) => p.map((c) => ({
146056
146056
  ...c,
146057
146057
  controls: filterControlsByPrivileges(c.controls)
146058
- })).filter((c) => c.controls.length > 0), isPatientNotFoundError = (p) => (typeof p == "string" ? p : p instanceof Error ? p.message : "") === Mi$1, getSidebarItems = (p, c) => p.sections.map((a) => ({
146058
+ })).filter((c) => c.controls.length > 0), isPatientNotFoundError = (p) => (typeof p == "string" ? p : p instanceof Error ? p.message : "") === Mi, getSidebarItems = (p, c) => p.sections.map((a) => ({
146059
146059
  id: a.id,
146060
146060
  icon: a.icon,
146061
146061
  label: c(a.translationKey ?? a.name)
@@ -146090,7 +146090,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146090
146090
  queryKey: ["patient", O],
146091
146091
  queryFn: () => i0(O),
146092
146092
  enabled: !!O
146093
- }), N = useMemo(() => U ? isPatientNotFoundError(k) ? Mi$1 : "ERROR_FETCHING_PATIENT_DATA" : null, [U, k]), K = !O || !!F, X = useMemo(
146093
+ }), N = useMemo(() => U ? isPatientNotFoundError(k) ? Mi : "ERROR_FETCHING_PATIENT_DATA" : null, [U, k]), K = !O || !!F, X = useMemo(
146094
146094
  () => [
146095
146095
  { id: "home", label: p("HOME_LABEL"), href: g_ },
146096
146096
  {
@@ -146198,7 +146198,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146198
146198
  const Ee = () => {
146199
146199
  const Ie = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
146200
146200
  return Ie && c.contextInformation?.program ? /* @__PURE__ */ jsx(
146201
- y21,
146201
+ c21,
146202
146202
  {
146203
146203
  programUUID: Ie,
146204
146204
  config: {
@@ -146217,7 +146217,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146217
146217
  {
146218
146218
  breadcrumbItems: X,
146219
146219
  globalActions: D,
146220
- userMenu: /* @__PURE__ */ jsx(un1, {}),
146220
+ userMenu: /* @__PURE__ */ jsx(en1, {}),
146221
146221
  sideNavItems: E ? [] : re,
146222
146222
  activeSideNavItemId: _e,
146223
146223
  onSideNavItemClick: ye,
@@ -1,5 +1,5 @@
1
- import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { d as G, u as J, z as W, i as Y, J as X, h as Z, $ as ee, a as te } from "./index-DGEgKcRC.js";
1
+ import { jsx as d, jsxs as h, Fragment as Y } from "react/jsx-runtime";
2
+ import { d as x, u as G, z as W, K as J, Y as X, h as Z, $ as ee, a as te } from "./index-CWrIj17R.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
@@ -38,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), g = G(), { t: n } = J(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
41
+ ), g = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
42
42
  U(e), w(!0);
43
43
  }, []), H = _(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
@@ -53,7 +53,7 @@ const Te = [
53
53
  u
54
54
  ],
55
55
  enabled: !!g,
56
- queryFn: () => Y(
56
+ queryFn: () => J(
57
57
  g,
58
58
  E,
59
59
  u,
@@ -97,7 +97,7 @@ const Te = [
97
97
  ), N = p(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), j = p(() => [...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 = p(() => ie(N, n), [N, n]), K = p(
100
+ ), K = p(() => [...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]), j = p(() => ie(N, n), [N, n]), P = p(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -137,16 +137,16 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ h(x, { children: [
140
+ return /* @__PURE__ */ h(Y, { children: [
141
141
  /* @__PURE__ */ d("div", { "data-testid": "documents-table", children: /* @__PURE__ */ d(
142
142
  ee,
143
143
  {
144
- headers: P,
144
+ headers: j,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: j,
146
+ rows: K,
147
147
  loading: q,
148
148
  errorStateMessage: y ? b?.message : null,
149
- sortable: K,
149
+ sortable: P,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
151
  renderCell: Q,
152
152
  className: r.documentsTableBody,