@bahmni/clinical-app 0.0.1-dev.444 → 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-Gaen1COw.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-D_bVbnnT.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
  },
@@ -136551,7 +136551,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
136551
136551
  function Rp(_) {
136552
136552
  return k2(_).getComputedStyle(_);
136553
136553
  }
136554
- function Vp(_) {
136554
+ function bp(_) {
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,12 +136559,12 @@ 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 : Vp(u);
136562
+ })(u) ? (_.ownerDocument || _).body : Rf(u) && yp(u) ? u : bp(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 = 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);
136568
136568
  if (x) {
136569
136569
  const j = Ju(P);
136570
136570
  return u.concat(P, P.visualViewport || [], yp(y) ? y : [], j && A ? Rs(j) : []);
@@ -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 Tp(_, u, A, m) {
136592
+ function Vp(_, 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 Hp(_, u) {
136605
+ function Tp(_, 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
- }, Mp = function(_) {
136626
+ }, Hp = 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 xp(_) {
136635
+ function Mp(_) {
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 = 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;
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 = 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;
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 = Mp(_);
136756
+ var u = Hp(_);
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 = 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);
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 (!Hp(ar, ln.getBoundingClientRect())) return yn();
136815
+ if (!Tp(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 ? Tp(vt) : null;
136844
+ let On = Kt ? Vp(vt) : null;
136845
136845
  return Kt && (function ln() {
136846
- const Ta = Tp(vt);
136847
- 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);
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 = bp(
139906
- H21.ALLERGIES
139907
- ), h = bp(
139908
- 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
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 = bp(
140302
- H21.INVESTIGATIONS
140301
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140302
+ M21.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 = bp(
140715
- H21.CONDITIONS_AND_DIAGNOSES
140714
+ const { t: p } = useTranslation(), c = d0(), { addNotification: a } = z1(), s = xp(
140715
+ M21.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 = RKt(V);
143670
+ const H = DKt(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 = bp(
143695
- H21.OBSERVATIONS
143694
+ const { t: V } = useTranslation(), H = xp(
143695
+ M21.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+/);
@@ -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 === 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 = {
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 === fqt, f = p?.stopMedication, {
144145
+ const { t: a } = useTranslation(), s = c?.type === mqt, 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 = bp(p.privilege);
144349
+ const s = xp(p.privilege);
144350
144350
  if (p.encounterTypes && !p.encounterTypes.includes(c) || !s)
144351
144351
  return null;
144352
144352
  const f = p.component;
@@ -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 = bp(
145394
- 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
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 = A21(I.type);
145566
+ const O = N21(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 bp(
145759
- H21.ENCOUNTER
145758
+ return xp(
145759
+ M21.ENCOUNTER
145760
145760
  ) ? a ? /* @__PURE__ */ jsx(
145761
145761
  mb2,
145762
145762
  {
@@ -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(d21, {}),
145837
+ /* @__PURE__ */ jsx(u21, {}),
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
- i21,
145848
+ s21,
145849
145849
  {
145850
145850
  printOptions: c,
145851
145851
  renderContext: F,
@@ -146051,7 +146051,7 @@ 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) => bp(c.requiredPrivileges)
146054
+ (c) => xp(c.requiredPrivileges)
146055
146055
  ), filterSectionsByPrivileges = (p) => p.map((c) => ({
146056
146056
  ...c,
146057
146057
  controls: filterControlsByPrivileges(c.controls)
@@ -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
- E21,
146201
+ y21,
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(dn1, {}),
146220
+ userMenu: /* @__PURE__ */ jsx(un1, {}),
146221
146221
  sideNavItems: E ? [] : re,
146222
146222
  activeSideNavItemId: _e,
146223
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-Gaen1COw.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-Gaen1COw.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-vFybs_ep.js";
2
- import { c3 as d, c4 as f, c5 as e } from "./index-Gaen1COw.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-vFybs_ep.js";
2
- import { c3 as v, c4 as C, c5 as e } from "./index-Gaen1COw.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"