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

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, F as ENCOUNTER_CONCEPTS_URL, G as Jr, Y as Yo, I as fqt, N as Ns, K as BAHMNI_USER_LOCATION_COOKIE_NAME, M 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, c as bp, ai as bb, aj as cg, ak as Tb, al as Uy2, am as cb2, an as qb2, ao as Tb2, ap as Db2, g 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, R as RKt, 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 A21, 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 d21, bM as i21, 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 dn1, bY as x_, bZ as E21 } from "./index-D9IwfHx_.js";
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";
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-CdnuMa2Z.js";
7
+ import { u as useClinicalConfig } from "./hook-Cgat4dpY.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 === fqt, f = {}, d = a.fieldConfig;
1989
+ const s = a.inputControlKey === mqt, 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
  },
@@ -105717,7 +105717,7 @@ function print() { __p += __j.call(arguments, '') }
105717
105717
  };
105718
105718
  }, 3832: (p, c, a) => {
105719
105719
  a.d(c, { An: () => f, Ay: () => E, Jx: () => d, qv: () => h, uk: () => s });
105720
- const s = "number", f = "string", d = "boolean", h = "object", E = { Grid: { defaultRowWidth: 1, minColumns: 1, minRows: 4 }, validations: { mandatory: "mandatory", allowDecimal: "allowDecimal", allowRange: "allowRange", minMaxRange: "minMaxRange", allowFutureDates: "allowFutureDates", dateTimeError: "dateTimeError" }, errorTypes: { warning: "warning", error: "error" }, bahmni: "Bahmni", NUMBER: s, STRING: f, BOOLEAN: d, OBJECT: h, messageType: { success: "success", error: "error" }, errorMessage: { fileTypeNotSupported: "File Type not supported", uploadFailed: "Upload failed. Please try again." }, toastTimeout: 4e3 };
105720
+ const s = "number", f = "string", d = "boolean", h = "object", E = { Grid: { defaultRowWidth: 1, minColumns: 1, minRows: 4 }, validations: { mandatory: "mandatory", allowDecimal: "allowDecimal", allowRange: "allowRange", minMaxRange: "minMaxRange", allowFutureDates: "allowFutureDates", dateTimeError: "dateTimeError" }, errorTypes: { warning: "warning", error: "error" }, bahmni: "Bahmni", NUMBER: s, STRING: f, BOOLEAN: d, OBJECT: h, messageType: { success: "success", error: "error" }, errorMessage: { fileTypeNotSupported: "File Type not supported", uploadFailed: "Upload failed. Please try again." }, dataTypes: { date: "Date", dateTime: "Datetime" }, toastTimeout: 4e3 };
105721
105721
  }, 3838: (p, c, a) => {
105722
105722
  var s = a(1791), f = a(7241);
105723
105723
  p.exports = function(d, h) {
@@ -135047,9 +135047,11 @@ Try polyfilling it using "@formatjs/intl-displaynames"
135047
135047
  return (0, ve.jsxs)(ve.Fragment, { children: [(0, ve.jsx)("div", { className: "form-builder-comment-wrap", children: this.showCommentButton(m) }), this.showCommentSection(m)] });
135048
135048
  }
135049
135049
  }
135050
- function T2(_, u) {
135051
- const A = [];
135052
- return _ && _.mandatory && A.push(Nt.Ay.validations.mandatory), u && u.allowDecimal === !1 && A.push(Nt.Ay.validations.allowDecimal), _ && _.allowFutureDates === !1 && A.push(Nt.Ay.validations.allowFutureDates), A;
135050
+ function T2(_, u, A) {
135051
+ const m = [];
135052
+ _ && _.mandatory && m.push(Nt.Ay.validations.mandatory), u && u.allowDecimal === !1 && m.push(Nt.Ay.validations.allowDecimal);
135053
+ const y = [Nt.Ay.dataTypes.date, Nt.Ay.dataTypes.dateTime];
135054
+ return _ && y.includes(A) && _.allowFutureDates !== !0 && m.push(Nt.Ay.validations.allowFutureDates), m;
135053
135055
  }
135054
135056
  ji.propTypes = { comment: T().string, conceptHandler: T().string, conceptUuid: T().string, datatype: T().string, forceOpen: T().bool, onCommentChange: T().func.isRequired, value: T().string };
135055
135057
  class Mn extends N.PureComponent {
@@ -135080,7 +135082,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
135080
135082
  this.props.onValueChanged(this.props.formFieldPath, { value: this.props.value.value, comment: u, interpretation: this.props.value.interpretation }, void 0);
135081
135083
  }
135082
135084
  displayObsControl(u) {
135083
- const { onControlAdd: A, hidden: m, enabled: y, metadata: x, metadata: { concept: P }, validate: j, validateForm: Z, formFieldPath: G, showNotification: te, intl: fe } = this.props, Ce = x.options || P.answers, { conceptClass: Me, conceptHandler: xe } = P, Oe = T2(x.properties, P.properties), Je = Wa()(x.properties, (et, tt) => tt === "addMore" && et);
135085
+ const { onControlAdd: A, hidden: m, enabled: y, metadata: x, metadata: { concept: P }, validate: j, validateForm: Z, formFieldPath: G, showNotification: te, intl: fe } = this.props, Ce = x.options || P.answers, { conceptClass: Me, conceptHandler: xe } = P, Oe = T2(x.properties, P.properties, P.datatype), Je = Wa()(x.properties, (et, tt) => tt === "addMore" && et);
135084
135086
  return K().createElement(u, { hidden: m, enabled: y, properties: x.properties, options: Ce, onChange: this.onChange, onControlAdd: A, onEventTrigger: this.onEventTrigger, validate: j, validateForm: Z, formFieldPath: G, patientUuid: this.props.patientUuid, conceptUuid: this.props.metadata.concept.uuid, addMore: Je, validations: Oe, value: this.props.value.value, ...this._numericContext(x), showNotification: te, conceptClass: Me, conceptHandler: xe, intl: fe, componentStore: this.props.componentStore || oa.A });
135085
135087
  }
135086
135088
  _numericContext(u) {
@@ -135529,7 +135531,7 @@ Try polyfilling it using "@formatjs/intl-displaynames"
135529
135531
  this.props.onValueChanged(this.props.formFieldPath, { value: this.props.value.value, comment: u, interpretation: this.props.value.interpretation }, void 0);
135530
135532
  }
135531
135533
  displayObsControl(u) {
135532
- const { onControlAdd: A, hidden: m, enabled: y, metadata: x, metadata: { concept: P }, validate: j, validateForm: Z, formFieldPath: G, showNotification: te, intl: fe } = this.props, Ce = x.options || P.answers, { conceptClass: Me, conceptHandler: xe } = P, Oe = T2(x.properties, P.properties), Je = Wa()(x.properties, (et, tt) => tt === "addMore" && et);
135534
+ const { onControlAdd: A, hidden: m, enabled: y, metadata: x, metadata: { concept: P }, validate: j, validateForm: Z, formFieldPath: G, showNotification: te, intl: fe } = this.props, Ce = x.options || P.answers, { conceptClass: Me, conceptHandler: xe } = P, Oe = T2(x.properties, P.properties, P.datatype), Je = Wa()(x.properties, (et, tt) => tt === "addMore" && et);
135533
135535
  return K().createElement(u, { hidden: m, enabled: y, properties: x.properties, options: Ce, onChange: this.onChange, onControlAdd: A, onEventTrigger: this.onEventTrigger, validate: j, validateForm: Z, formFieldPath: G, patientUuid: this.props.patientUuid, conceptUuid: this.props.metadata.concept.uuid, addMore: Je, validations: Oe, value: this.props.value.value, ...this._numericContext(x), showNotification: te, conceptClass: Me, conceptHandler: xe, intl: fe });
135534
135536
  }
135535
135537
  _numericContext(u) {
@@ -135759,8 +135761,8 @@ Try polyfilling it using "@formatjs/intl-displaynames"
135759
135761
  function As(_) {
135760
135762
  var u = (function(A) {
135761
135763
  if (l1(A) != "object" || !A) return A;
135762
- var m = A[Symbol.toPrimitive];
135763
- if (m !== void 0) {
135764
+ var m;
135765
+ if (typeof Symbol < "u" && (m = A[Symbol.toPrimitive]) !== void 0) {
135764
135766
  var y = m.call(A, "string");
135765
135767
  if (l1(y) != "object") return y;
135766
135768
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -136549,7 +136551,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136549
136551
  function Rp(_) {
136550
136552
  return k2(_).getComputedStyle(_);
136551
136553
  }
136552
- function Vp(_) {
136554
+ function bp(_) {
136553
136555
  const u = (function(A) {
136554
136556
  if (gp(A) === "html") return A;
136555
136557
  const m = A.assignedSlot || A.parentNode || Cp(A) && A.host || wp(A);
@@ -136557,12 +136559,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136557
136559
  })(_);
136558
136560
  return (function(A) {
136559
136561
  return /^(html|body|#document)$/.test(gp(A));
136560
- })(u) ? (_.ownerDocument || _).body : Rf(u) && yp(u) ? u : Vp(u);
136562
+ })(u) ? (_.ownerDocument || _).body : Rf(u) && yp(u) ? u : bp(u);
136561
136563
  }
136562
136564
  function Rs(_, u, A) {
136563
136565
  var m;
136564
136566
  u === void 0 && (u = []), A === void 0 && (A = !0);
136565
- const y = Vp(_), x = y === ((m = _.ownerDocument) == null ? void 0 : m.body), P = k2(y);
136567
+ const y = bp(_), x = y === ((m = _.ownerDocument) == null ? void 0 : m.body), P = k2(y);
136566
136568
  if (x) {
136567
136569
  const j = Ju(P);
136568
136570
  return u.concat(P, P.visualViewport || [], yp(y) ? y : [], j && A ? Rs(j) : []);
@@ -136587,7 +136589,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136587
136589
  let P = (x ? vs(A.width) : A.width) / m, j = (x ? vs(A.height) : A.height) / y;
136588
136590
  return P && Number.isFinite(P) || (P = 1), j && Number.isFinite(j) || (j = 1), { x: P, y: j };
136589
136591
  }
136590
- function Tp(_, u, A, m) {
136592
+ function Vp(_, u, A, m) {
136591
136593
  u === void 0 && (u = !1);
136592
136594
  const y = _.getBoundingClientRect();
136593
136595
  bf(_);
@@ -136600,7 +136602,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136600
136602
  return { width: xe, height: Oe, top: Me, left: Ce, right: Ce + xe, bottom: Me + Oe, x: Ce, y: Me };
136601
136603
  })({ width: G, height: te, x: j, y: Z });
136602
136604
  }
136603
- function Hp(_, u) {
136605
+ function Tp(_, u) {
136604
136606
  return _.x === u.x && _.y === u.y && _.width === u.width && _.height === u.height;
136605
136607
  }
136606
136608
  var Xu = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"], bs = function() {
@@ -136621,7 +136623,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136621
136623
  var Vs = function(_) {
136622
136624
  return u = _, Array.isArray(u) ? _.filter(Boolean) : l1(_) === "object" && _ !== null ? [_] : [];
136623
136625
  var u;
136624
- }, Mp = function(_) {
136626
+ }, Hp = function(_) {
136625
136627
  return _.className, _.clearValue, _.cx, _.getStyles, _.getClassNames, _.getValue, _.hasValue, _.isMulti, _.isRtl, _.options, _.selectOption, _.selectProps, _.setValue, _.theme, ia({}, h1(_, Xu));
136626
136628
  }, er = function(_, u, A) {
136627
136629
  var m = _.cx, y = _.getStyles, x = _.getClassNames, P = _.className;
@@ -136630,14 +136632,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136630
136632
  function Ts(_) {
136631
136633
  return [document.documentElement, document.body, window].indexOf(_) > -1;
136632
136634
  }
136633
- function xp(_) {
136635
+ function Mp(_) {
136634
136636
  return Ts(_) ? window.pageYOffset : _.scrollTop;
136635
136637
  }
136636
136638
  function Hs(_, u) {
136637
136639
  Ts(_) ? window.scrollTo(0, u) : _.scrollTop = u;
136638
136640
  }
136639
136641
  function Ms(_, u) {
136640
- 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;
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;
136641
136643
  (function j() {
136642
136644
  var Z, G = x * ((Z = (Z = P += 10) / A - 1) * Z * Z + 1) + y;
136643
136645
  Hs(_, G), P < A ? window.requestAnimationFrame(j) : m(_);
@@ -136680,7 +136682,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136680
136682
  return document.documentElement;
136681
136683
  })(it), ka = { placement: "bottom", maxHeight: Pt };
136682
136684
  if (!it || !it.offsetParent) return ka;
136683
- 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;
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;
136684
136686
  switch (Jt) {
136685
136687
  case "auto":
136686
136688
  case "bottom":
@@ -136751,7 +136753,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136751
136753
  var u = _.children, A = _.cx, m = _.getStyles, y = _.getClassNames, x = _.Heading, P = _.headingProps, j = _.innerProps, Z = _.label, G = _.theme, te = _.selectProps;
136752
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));
136753
136755
  }, GroupHeading: function(_) {
136754
- var u = Mp(_);
136756
+ var u = Hp(_);
136755
136757
  u.data;
136756
136758
  var A = h1(u, Ad);
136757
136759
  return ma("div", ha({}, er(_, "groupHeading", { "group-heading": !0 }), A));
@@ -136762,7 +136764,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136762
136764
  var u = _.innerProps;
136763
136765
  return ma("span", ha({}, u, er(_, "indicatorSeparator", { "indicator-separator": !0 })));
136764
136766
  }, Input: function(_) {
136765
- var u = _.cx, A = _.value, m = Mp(_), y = m.innerRef, x = m.isDisabled, P = m.isHidden, j = m.inputClassName, Z = h1(m, md);
136767
+ var u = _.cx, A = _.value, m = Hp(_), y = m.innerRef, x = m.isDisabled, P = m.isHidden, j = m.inputClassName, Z = h1(m, md);
136766
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)));
136767
136769
  }, LoadingIndicator: function(_) {
136768
136770
  var u = _.innerProps, A = _.isRtl, m = _.size, y = m === void 0 ? 4 : m, x = h1(_, pd);
@@ -136810,7 +136812,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136810
136812
  let A1 = !0;
136811
136813
  function Ir(Ro) {
136812
136814
  const sl = Ro[0].intersectionRatio;
136813
- if (!Hp(ar, ln.getBoundingClientRect())) return yn();
136815
+ if (!Tp(ar, ln.getBoundingClientRect())) return yn();
136814
136816
  if (sl !== Fa) {
136815
136817
  if (!A1) return yn();
136816
136818
  sl ? yn(!1, sl) : Dn = setTimeout(() => {
@@ -136839,10 +136841,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136839
136841
  (Cn = Za) == null || Cn.observe(Pt);
136840
136842
  })), it();
136841
136843
  }), ka && !Kt && Za.observe(ka), Pt && Za.observe(Pt));
136842
- let On = Kt ? Tp(vt) : null;
136844
+ let On = Kt ? Vp(vt) : null;
136843
136845
  return Kt && (function ln() {
136844
- const Ta = Tp(vt);
136845
- On && !Hp(On, Ta) && it(), On = Ta, ja = requestAnimationFrame(ln);
136846
+ const Ta = Vp(vt);
136847
+ On && !Tp(On, Ta) && it(), On = Ta, ja = requestAnimationFrame(ln);
136846
136848
  })(), it(), () => {
136847
136849
  var ln;
136848
136850
  Na.forEach((Ta) => {
@@ -139900,10 +139902,10 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139900
139902
  selectedAllergyItem,
139901
139903
  duplicateNotification: duplicateNotification$2
139902
139904
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139903
- const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = d0(), { addNotification: f } = z1(), d = bp(
139904
- H21.ALLERGIES
139905
- ), h = bp(
139906
- H21.EDIT_ALLERGIES
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
139907
139909
  ), [E, g] = useState(""), [R, V] = useState(null), [H, M] = useState(!1), [$, B] = useState(
139908
139910
  null
139909
139911
  ), {
@@ -140296,8 +140298,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140296
140298
  selectedInvestigationItem,
140297
140299
  duplicateNotification: duplicateNotification$1
140298
140300
  }, InvestigationsForm = React__default.memo(() => {
140299
- const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = bp(
140300
- H21.INVESTIGATIONS
140301
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140302
+ M21.INVESTIGATIONS
140301
140303
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), { activeEncounter: V, matchReasons: H } = vv(), $ = H.includes("MATCHED") ? V?.id : void 0, {
140302
140304
  data: B,
140303
140305
  refetch: I,
@@ -140709,8 +140711,8 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140709
140711
  selectedConditionItem,
140710
140712
  duplicateNotification
140711
140713
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140712
- const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = bp(
140713
- H21.CONDITIONS_AND_DIAGNOSES
140714
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140715
+ M21.CONDITIONS_AND_DIAGNOSES
140714
140716
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), {
140715
140717
  selectedDiagnoses: V,
140716
140718
  selectedConditions: H,
@@ -143665,7 +143667,7 @@ function useSubmittedEncounterForms(p) {
143665
143667
  ), useMemo(() => {
143666
143668
  const g = d?.entry?.map((V) => V.resource).filter((V) => V?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
143667
143669
  for (const V of g) {
143668
- const H = RKt(V);
143670
+ const H = DKt(V);
143669
143671
  if (!H) continue;
143670
143672
  const M = p.find(($) => $.name === H);
143671
143673
  M && R.add(M.uuid);
@@ -143689,8 +143691,8 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143689
143691
  observationFormsError: g,
143690
143692
  submittedFormUuids: R = EMPTY_SET
143691
143693
  }) => {
143692
- const { t: V } = useTranslation(), H = bp(
143693
- H21.OBSERVATIONS
143694
+ const { t: V } = useTranslation(), H = xp(
143695
+ M21.OBSERVATIONS
143694
143696
  ), [M, $] = useState(""), [B, I] = useState(null), { getFormData: D } = useObservationFormsStore(), z = useMemo(() => {
143695
143697
  if (!M.trim()) return h;
143696
143698
  const ne = M.toLowerCase().trim().split(/\s+/);
@@ -144091,7 +144093,7 @@ function createStopMedicationEntry(p) {
144091
144093
  if (!c.medicationToStop?.id || !c.stopReason) return [];
144092
144094
  const a = c.medicationToStop.subject?.reference?.split("/").pop();
144093
144095
  if (!a) return [];
144094
- const f = c.inputControlKey === fqt ? 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 === 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 = {
144095
144097
  resourceType: "MedicationRequest",
144096
144098
  status: f,
144097
144099
  intent: "order",
@@ -144140,7 +144142,7 @@ const stopMedicationFormTile = "StopMedicationForm-module_stopMedicationFormTile
144140
144142
  noteColumn
144141
144143
  }, StopMedicationForm = React__default.memo(
144142
144144
  ({ encounterSessionStartContext: p, inputControlConfig: c }) => {
144143
- const { t: a } = useTranslation(), s = c?.type === fqt, f = p?.stopMedication, {
144145
+ const { t: a } = useTranslation(), s = c?.type === mqt, f = p?.stopMedication, {
144144
144146
  stopDate: d,
144145
144147
  stopReason: h,
144146
144148
  note: E,
@@ -144344,7 +144346,7 @@ const InputControlRenderer = ({
144344
144346
  encounterType: c,
144345
144347
  encounterSessionStartContext: a
144346
144348
  }) => {
144347
- const s = bp(p.privilege);
144349
+ const s = xp(p.privilege);
144348
144350
  if (p.encounterTypes && !p.encounterTypes.includes(c) || !s)
144349
144351
  return null;
144350
144352
  const f = p.component;
@@ -145388,8 +145390,8 @@ const ConsultationPad = ({
145388
145390
  isActionAreaExpanded: a,
145389
145391
  onToggleActionAreaExpand: s
145390
145392
  }) => {
145391
- const { t: f } = useTranslation(), { addNotification: d } = z1(), h = d0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: g, isLoading: R } = useClinicalConfig(), { encounterConcepts: V } = useEncounterConcepts(), H = bp(
145392
- H21.ADD_VISITS
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
145395
  ), M = useActionAreaExpandProps({
145394
145396
  isExpanded: a,
145395
145397
  onToggleExpand: s
@@ -145561,7 +145563,7 @@ const ConsultationPad = ({
145561
145563
  visitUuids: f
145562
145564
  }) => {
145563
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) => {
145564
- const O = A21(I.type);
145566
+ const O = N21(I.type);
145565
145567
  if (!O)
145566
145568
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${D}`);
145567
145569
  const F = D < z - 1;
@@ -145753,8 +145755,8 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145753
145755
  isLoading: a
145754
145756
  }) => {
145755
145757
  const { t: s } = useTranslation();
145756
- return bp(
145757
- H21.ENCOUNTER
145758
+ return xp(
145759
+ M21.ENCOUNTER
145758
145760
  ) ? a ? /* @__PURE__ */ jsx(
145759
145761
  mb2,
145760
145762
  {
@@ -145832,7 +145834,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145832
145834
  "data-active-encounter-uuid": V && H?.id ? H.id : void 0,
145833
145835
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145834
145836
  children: [
145835
- /* @__PURE__ */ jsx(d21, {}),
145837
+ /* @__PURE__ */ jsx(u21, {}),
145836
145838
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145837
145839
  /* @__PURE__ */ jsx(
145838
145840
  ConsultationActionButton,
@@ -145843,7 +145845,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145843
145845
  }
145844
145846
  ),
145845
145847
  /* @__PURE__ */ jsx(
145846
- i21,
145848
+ s21,
145847
145849
  {
145848
145850
  printOptions: c,
145849
145851
  renderContext: F,
@@ -146049,7 +146051,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146049
146051
  );
146050
146052
  return c || p[0];
146051
146053
  }, filterControlsByPrivileges = (p) => p.filter(
146052
- (c) => bp(c.requiredPrivileges)
146054
+ (c) => xp(c.requiredPrivileges)
146053
146055
  ), filterSectionsByPrivileges = (p) => p.map((c) => ({
146054
146056
  ...c,
146055
146057
  controls: filterControlsByPrivileges(c.controls)
@@ -146196,7 +146198,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146196
146198
  const Ee = () => {
146197
146199
  const Ie = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
146198
146200
  return Ie && c.contextInformation?.program ? /* @__PURE__ */ jsx(
146199
- E21,
146201
+ y21,
146200
146202
  {
146201
146203
  programUUID: Ie,
146202
146204
  config: {
@@ -146215,7 +146217,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146215
146217
  {
146216
146218
  breadcrumbItems: X,
146217
146219
  globalActions: D,
146218
- userMenu: /* @__PURE__ */ jsx(dn1, {}),
146220
+ userMenu: /* @__PURE__ */ jsx(un1, {}),
146219
146221
  sideNavItems: E ? [] : re,
146220
146222
  activeSideNavItemId: _e,
146221
146223
  onSideNavItemClick: ye,
@@ -1,5 +1,5 @@
1
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, a as Y, J as X, h as Z, $ as ee, b as te } from "./index-D9IwfHx_.js";
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";
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 = {
@@ -1,28 +1,28 @@
1
1
  import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { u as ie, d as de, c as le, k as me, H as ue, o as ce, E as fe, Q as ye, w as Te, D as he, R as Ne, e as ge, h as pe, L as V, T as $, J as Oe, $ as K, W as be, q as Ie, b as Ee, f as _e, g as Ae } from "./index-D9IwfHx_.js";
3
- import { useQueryClient as Re, useQuery as E } from "@tanstack/react-query";
4
- import { useState as Q, useMemo as i, useCallback as d } from "react";
5
- const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", ve = "FormsTable-module_customAccordianItem__isszs", N = {
6
- formsTableBody: Le,
2
+ import { u as ie, d as de, x as le, k as me, H as ue, b as ce, y as fe, e as ye, w as Te, S as he, D as Ne, R as ge, h as pe, L as V, T as $, J as Oe, $ as x, W as be, q as Ie, a as Ee, c as _e, M as Ae } from "./index-DGEgKcRC.js";
3
+ import { useQueryClient as Le, useQuery as E } from "@tanstack/react-query";
4
+ import { useState as K, useMemo as i, useCallback as d } from "react";
5
+ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", ve = "FormsTable-module_customAccordianItem__isszs", N = {
6
+ formsTableBody: Re,
7
7
  modalHeading: Ce,
8
8
  customAccordianItem: ve
9
- }, Be = "startConsultation", Me = ({
9
+ }, Be = "startConsultation", Ue = ({
10
10
  episodeOfCareUuids: _,
11
11
  encounterUuids: l,
12
- config: z,
13
- disableActions: j = !1,
12
+ config: j,
13
+ disableActions: z = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t: o } = ie(), m = de(), [g, A] = Q(!1), [t, R] = Q(null), {
17
- numberOfVisits: x,
16
+ const { t: o } = ie(), m = de(), [g, A] = K(!1), [t, L] = K(null), {
17
+ numberOfVisits: Q,
18
18
  hideThumbnail: G = !1,
19
19
  forms: T
20
- } = z ?? {}, J = le(
20
+ } = j ?? {}, J = le(
21
21
  Ae.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = me(), p = J && !j && !!y, L = ue(
22
+ ), { userPrivileges: h } = me(), p = J && !z && !!y, R = ue(
23
23
  _,
24
24
  l
25
- ), P = Re(), {
25
+ ), P = Le(), {
26
26
  data: C = [],
27
27
  isLoading: v,
28
28
  isError: B,
@@ -30,8 +30,8 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
30
30
  refetch: Y
31
31
  } = E({
32
32
  queryKey: ["forms", m, _],
33
- queryFn: () => ce(m, void 0, x),
34
- enabled: !!m && !L
33
+ queryFn: () => ce(m, void 0, Q),
34
+ enabled: !!m && !R
35
35
  }), D = i(() => {
36
36
  let e = C;
37
37
  return l && l.length > 0 && (e = e.filter(
@@ -42,7 +42,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
42
42
  }, [C, l, T]), { data: F = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
- }), U = d(
45
+ }), S = d(
46
46
  (e) => {
47
47
  const r = F.find(
48
48
  (s) => s.name.toLowerCase() === e.toLowerCase()
@@ -56,8 +56,8 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
56
56
  },
57
57
  [F, h]
58
58
  ), u = d(
59
- (e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
60
- [y, U]
59
+ (e) => !y || e.encounterUuid !== y ? !1 : S(e.formName),
60
+ [y, S]
61
61
  ), {
62
62
  data: O,
63
63
  isLoading: X,
@@ -83,19 +83,19 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
83
83
  { key: "recordedBy", header: o("RECORDED_BY") }
84
84
  ],
85
85
  [o]
86
- ), S = i(
86
+ ), M = i(
87
87
  () => [...c, { key: "actions", header: o("ACTIONS") }],
88
88
  [c, o]
89
89
  ), ae = d(
90
- (e) => p && e.some((r) => u(r)) ? S : c,
91
- [p, u, S, c]
90
+ (e) => p && e.some((r) => u(r)) ? M : c,
91
+ [p, u, M, c]
92
92
  ), oe = c, te = i(
93
93
  () => [
94
94
  { key: "recordedOn", sortable: !0 },
95
95
  { key: "recordedBy", sortable: !0 }
96
96
  ],
97
97
  []
98
- ), M = i(() => {
98
+ ), U = i(() => {
99
99
  const e = D.reduce(
100
100
  (r, a) => {
101
101
  const s = a.formName;
@@ -121,9 +121,9 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
123
  }, [D, o]), k = d((e) => {
124
- R(e), A(!0);
124
+ L(e), A(!0);
125
125
  }, []), w = d(() => {
126
- A(!1), R(null);
126
+ A(!1), L(null);
127
127
  }, []), I = d((e) => {
128
128
  globalThis.dispatchEvent(
129
129
  new CustomEvent(Be, {
@@ -162,8 +162,8 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
162
162
  [k, I, u, o]
163
163
  );
164
164
  return /* @__PURE__ */ q(ne, { children: [
165
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || B || M.length === 0 || L ? /* @__PURE__ */ n(
166
- K,
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || B || U.length === 0 || R ? /* @__PURE__ */ n(
166
+ x,
167
167
  {
168
168
  headers: oe,
169
169
  ariaLabel: o("FORMS_HEADING"),
@@ -175,7 +175,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
175
175
  className: N.formsTableBody,
176
176
  dataTestId: "forms-table"
177
177
  }
178
- ) : /* @__PURE__ */ n(be, { align: "start", children: M.map((e, r) => {
178
+ ) : /* @__PURE__ */ n(be, { align: "start", children: U.map((e, r) => {
179
179
  const { formName: a, records: s } = e, f = ae(s);
180
180
  return /* @__PURE__ */ n(
181
181
  Ie,
@@ -185,7 +185,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
185
185
  testId: `accordian-title-${a}`,
186
186
  open: r === 0,
187
187
  children: /* @__PURE__ */ n(
188
- K,
188
+ x,
189
189
  {
190
190
  headers: f,
191
191
  ariaLabel: o("FORMS_HEADING"),
@@ -248,5 +248,5 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
248
248
  ] });
249
249
  };
250
250
  export {
251
- Me as default
251
+ Ue as default
252
252
  };
@@ -1,5 +1,5 @@
1
- import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DZIFSK2p.js";
2
- import { c3 as d, c4 as f, c5 as e } from "./index-D9IwfHx_.js";
1
+ import { c as s, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-C4KBlic9.js";
2
+ import { c3 as d, c4 as f, c5 as e } from "./index-DGEgKcRC.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = s({
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-DZIFSK2p.js";
2
- import { c3 as v, c4 as C, c5 as e } from "./index-D9IwfHx_.js";
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-C4KBlic9.js";
2
+ import { c3 as v, c4 as C, c5 as e } from "./index-DGEgKcRC.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"