@bahmni/clinical-app 0.0.1-dev.385 → 0.0.1-dev.387

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, n as B, r as ENCOUNTER_CONCEPTS_URL, s as Yr, C as Ci, t as BAHMNI_USER_LOCATION_COOKIE_NAME, v as Lm, H as t8, g as g0, I as hb2, J as ub2, T as sb2, U as Bx2, W as ol1, X as ab2, Z as PE, _ as Di, a0 as Dd, a1 as fE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as U_, a9 as W_, aa as J_, ab as mb2, ac as Cb2, ad as Nz2, L as L1, c as A3, ae as Q_, af as Oy2, ag as Ky2, ah as Bb2, ai as _b2, aj as xb2, F as F01, ak as Ob, al as fb2, am as Gb, an as Ps, ao as $b, ap as yv, aq as G_, ar as Yy2, as as sb, at as ib, au as CLINICAL_V2_CONFIG_BASE_URL, av as fb, aw as LE, ax as Qr, ay as ub, az as F_, aA as wv, aB as aL2, aC as Nb, aD as db, aE as pb, aF as bv, aG as ib2, aH as Lv, aI as M_, aJ as hb, aK as Rt, aL as jr, aM as Av, aN as Dv, Q as Qr$1, aO as Xb, aP as Db, aQ as xb, D as Dqt, aR as Rb2, aS as Ob2, aT as tv, aU as ev, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as Jy2, aZ as mf, a_ as es$2, a$ as Tb2, b0 as Zb, b1 as nv, b2 as GE, b3 as x_, b4 as YE, b5 as an, b6 as N4, b7 as c3, b8 as Ab2, b9 as vE, ba as rv, bb as ov, bc as av, bd as iv, be as Ii, bf as ns, bg as jb, bh as eb, bi as Cv, bj as Ev, bk as _v, bl as gv, bm as CDSS_SERVER_CONFIG_URL, bn as rb, bo as Mi, bp as E_, bq as Ze, br as Hb2, bs as q01, bt as Eb2, bu as Xy, bv as Vb, bw as Hb, bx as ob2, by as Hs1, bz as Yb, bA as zb, bB as Bb, bC as O01, bD as _01, bE as WE, bF as Kb, bG as iE, bH as BAHMNI_CLINICAL_PATH, bI as OE, bJ as sw, bK as Vb2, bL as vb2, bM as Cz2, bN as P11, bO as RE, bP as k01 } from "./index-BNdwlD5X.js";
2
+ import { u as useTranslation, r as B, s as ENCOUNTER_CONCEPTS_URL, t as Yr, v as Ci, x as BAHMNI_USER_LOCATION_COOKIE_NAME, F as xm, H as t8, g as g0, J as hb2, M as ub2, R as sb2, S as Bx2, U as ol1, W as ab2, $ as $E, X as Di, a0 as Dd, a1 as pE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as q_, a9 as J_, aa as Q_, ab as mb2, ac as Cb2, ad as Nz2, L as L1, A as A3, ae as X_, af as Oy2, ag as Ky2, ah as Bb2, ai as _b2, aj as xb2, d as G01, ak as Ab, al as fb2, am as Kb, an as Ps, ao as Nb, ap as wv, aq as K_, ar as Yy2, as as ob, at as cb, au as CLINICAL_V2_CONFIG_BASE_URL, av as pb, aw as xE, ax as Qr, ay as lb, az as j_, aA as Ev, aB as aL2, aC as Ib, aD as fb, aE as hb, aF as vv, aG as ib2, aH as xv, aI as U_, aJ as mb, aK as Rt, aL as jr, aM as Pv, aN as Cv, Q as Qr$1, aO as Zb, aP as Cb, aQ as kb, I as Iqt, aR as Rb2, aS as Ob2, aT as rv, aU as tv, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as Jy2, aZ as mf, a_ as es$2, a$ as Tb2, b0 as ev, b1 as sv, b2 as KE, b3 as k_, b4 as GE, b5 as an, b6 as N4, b7 as c3, b8 as Ab2, b9 as TE, ba as nv, bb as av, bc as iv, bd as cv, be as Ii, bf as ns, bg as Vb, bh as tb, bi as Lv, bj as _v, bk as bv, bl as yv, bm as CDSS_SERVER_CONFIG_URL, bn as nb, bo as Mi, bp as __, bq as Ze, br as Hb2, bs as X01, bt as Eb2, bu as Zy, bv as Hb, bw as Bb, bx as ob2, by as Hs1, bz as Gb, bA as Yb, bB as zb, bC as $01, bD as L01, bE as JE, bF as Wb, bG as cE, bH as BAHMNI_CLINICAL_PATH, bI as AE, bJ as ow, bK as Vb2, bL as vb2, bM as Cz2, bN as q11, bO as OE, bP as U01 } from "./index-BLliZxnn.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-Dkr6KItr.js";
7
+ import { u as useClinicalConfig } from "./hook-BzZuv01O.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 : {};
@@ -2023,7 +2023,7 @@ const useLocations = () => {
2023
2023
  }
2024
2024
  try {
2025
2025
  h(!0);
2026
- const H = await Lm(p), x = H.find(($) => !$.period?.end) ?? null;
2026
+ const H = await xm(p), x = H.find(($) => !$.period?.end) ?? null;
2027
2027
  if (a(x), x)
2028
2028
  f(null), C(null);
2029
2029
  else {
@@ -2354,12 +2354,12 @@ const ALLERGY_INTOLERANCE_RESOURCE_TYPE = "AllergyIntolerance", ALLERGY_SEVERITY
2354
2354
  const a = {
2355
2355
  coding: p
2356
2356
  };
2357
- return PE(c) || (a.text = c), a;
2357
+ return $E(c) || (a.text = c), a;
2358
2358
  }, createCoding = (p, c, a) => {
2359
2359
  const s = {
2360
2360
  code: p
2361
2361
  };
2362
- return PE(c) || (s.system = c), PE(a) || (s.display = a), s;
2362
+ return $E(c) || (s.system = c), $E(a) || (s.display = a), s;
2363
2363
  }, createEncounterAllergyResource = (p, c, a, s, f, d, h) => {
2364
2364
  const E = {
2365
2365
  resourceType: "AllergyIntolerance",
@@ -2423,7 +2423,7 @@ const ALLERGY_INTOLERANCE_RESOURCE_TYPE = "AllergyIntolerance", ALLERGY_SEVERITY
2423
2423
  verificationStatus: createCodeableConcept([
2424
2424
  createCoding(
2425
2425
  c,
2426
- fE
2426
+ pE
2427
2427
  )
2428
2428
  ]),
2429
2429
  encounter: s,
@@ -139495,7 +139495,7 @@ function createConditionsBundleEntries({
139495
139495
  for (const h of p) {
139496
139496
  if (!h || typeof h.durationValue != "number" || !h.durationUnit || h.durationValue === null || h.durationUnit === null)
139497
139497
  throw new Error(CONSULTATION_ERROR_MESSAGES.INVALID_CONDITION_PARAMS);
139498
- const E = U_(
139498
+ const E = q_(
139499
139499
  f,
139500
139500
  h.durationValue,
139501
139501
  h.durationUnit
@@ -139604,13 +139604,13 @@ const useAllergenSearch = (p = "") => {
139604
139604
  allergyReactionUuid: Z
139605
139605
  } = T.consultationPad.allergyConceptMap;
139606
139606
  try {
139607
- const F = await W_(
139607
+ const F = await J_(
139608
139608
  S,
139609
139609
  z,
139610
139610
  O
139611
139611
  );
139612
139612
  a(F);
139613
- const U = await J_(Z);
139613
+ const U = await Q_(Z);
139614
139614
  f(U);
139615
139615
  } catch (F) {
139616
139616
  const U = Yr(F);
@@ -139782,9 +139782,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139782
139782
  duplicateNotification: duplicateNotification$2
139783
139783
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139784
139784
  const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = g0(), { addNotification: f } = L1(), d = A3(
139785
- F01.ALLERGIES
139785
+ G01.ALLERGIES
139786
139786
  ), h = A3(
139787
- F01.EDIT_ALLERGIES
139787
+ G01.EDIT_ALLERGIES
139788
139788
  ), [E, C] = useState(""), [R, T] = useState(null), [H, x] = useState(!1), [$, k] = useState(
139789
139789
  null
139790
139790
  ), {
@@ -139806,7 +139806,7 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139806
139806
  } = useQuery({
139807
139807
  queryKey: allergiesQueryKeys(s),
139808
139808
  enabled: !!s && d,
139809
- queryFn: () => Q_(s)
139809
+ queryFn: () => X_(s)
139810
139810
  });
139811
139811
  useEffect(() => {
139812
139812
  ie && f({
@@ -139997,7 +139997,7 @@ const useInvestigationsSearch = (p = "") => {
139997
139997
  (async () => {
139998
139998
  try {
139999
139999
  d(!0), E(null);
140000
- const H = await Ob();
140000
+ const H = await Ab();
140001
140001
  s(H);
140002
140002
  } catch (H) {
140003
140003
  const x = Yr(H);
@@ -140107,8 +140107,8 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140107
140107
  duplicateNotification: duplicateNotification$1
140108
140108
  }, InvestigationsForm = React__default.memo(() => {
140109
140109
  const { t: p } = useTranslation(), c = g0(), { addNotification: a } = L1(), s = A3(
140110
- F01.INVESTIGATIONS
140111
- ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = Gb(), $ = H.includes("MATCHED") ? T?.id : void 0, {
140110
+ G01.INVESTIGATIONS
140111
+ ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = Kb(), $ = H.includes("MATCHED") ? T?.id : void 0, {
140112
140112
  data: k,
140113
140113
  refetch: I,
140114
140114
  error: S
@@ -140118,7 +140118,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140118
140118
  staleTime: 3e4,
140119
140119
  queryFn: async () => {
140120
140120
  const ae = await Ps();
140121
- return $b(
140121
+ return Nb(
140122
140122
  ae.results,
140123
140123
  c,
140124
140124
  [$]
@@ -140131,7 +140131,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140131
140131
  message: S.message,
140132
140132
  type: "error"
140133
140133
  });
140134
- }, [S, a, p]), yv(
140134
+ }, [S, a, p]), wv(
140135
140135
  (ae) => {
140136
140136
  ae.patientUUID === c && Object.keys(ae.updatedResources.serviceRequests ?? {}).length > 0 && I();
140137
140137
  },
@@ -140324,7 +140324,7 @@ const useConceptSearch = (p, c = 20, a = 500) => {
140324
140324
  (async () => {
140325
140325
  h(!0), C(null);
140326
140326
  try {
140327
- const H = await G_(R, c);
140327
+ const H = await K_(R, c);
140328
140328
  f(H);
140329
140329
  } catch (H) {
140330
140330
  C(
@@ -140520,7 +140520,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140520
140520
  duplicateNotification
140521
140521
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140522
140522
  const { t: p } = useTranslation(), c = g0(), { addNotification: a } = L1(), s = A3(
140523
- F01.CONDITIONS_AND_DIAGNOSES
140523
+ G01.CONDITIONS_AND_DIAGNOSES
140524
140524
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
140525
140525
  selectedDiagnoses: T,
140526
140526
  selectedConditions: H,
@@ -140542,7 +140542,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140542
140542
  } = useQuery({
140543
140543
  queryKey: ["conditions", c],
140544
140544
  enabled: !!c && s,
140545
- queryFn: () => sb(c)
140545
+ queryFn: () => ob(c)
140546
140546
  }), {
140547
140547
  data: X,
140548
140548
  isLoading: V,
@@ -140551,9 +140551,9 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140551
140551
  } = useQuery({
140552
140552
  queryKey: ["diagnoses", c],
140553
140553
  enabled: !!c && s,
140554
- queryFn: () => ib(c)
140554
+ queryFn: () => cb(c)
140555
140555
  });
140556
- yv(
140556
+ wv(
140557
140557
  (ne) => {
140558
140558
  ne.patientUUID === c && ne.updatedResources.conditions && (ee(), K());
140559
140559
  },
@@ -140787,7 +140787,7 @@ const useMedicationSearch = (p, c = 20, a = 500) => {
140787
140787
  (async () => {
140788
140788
  h(!0), C(null);
140789
140789
  try {
140790
- const H = await fb(R, c);
140790
+ const H = await pb(R, c);
140791
140791
  f(getMedicationsFromBundle(H));
140792
140792
  } catch (H) {
140793
140793
  C(
@@ -141107,7 +141107,7 @@ function getMedicationRequestComboBoxItems(p, c, a, s, f) {
141107
141107
  displayName: getMedicationDisplay(h),
141108
141108
  disabled: !1
141109
141109
  }));
141110
- return LE(a, s, d, toSentinel, f);
141110
+ return xE(a, s, d, toSentinel, f);
141111
141111
  }
141112
141112
  function getVaccinationComboBoxItems(p, c, a, s, f) {
141113
141113
  if (!p.trim()) return [];
@@ -141118,7 +141118,7 @@ function getVaccinationComboBoxItems(p, c, a, s, f) {
141118
141118
  displayName: getMedicationDisplay(h),
141119
141119
  disabled: !1
141120
141120
  }));
141121
- return LE(
141121
+ return xE(
141122
141122
  a,
141123
141123
  s,
141124
141124
  d,
@@ -141312,7 +141312,7 @@ function validateEntry$1(p, c) {
141312
141312
  return { entry: { ...p, errors: a, hasBeenValidated: !0 }, valid: s };
141313
141313
  }
141314
141314
  function createMedicationRequestStore(p) {
141315
- const c = p === ub;
141315
+ const c = p === lb;
141316
141316
  return createStore((a, s) => ({
141317
141317
  selectedMedicationRequests: [],
141318
141318
  attributes: void 0,
@@ -141538,7 +141538,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
141538
141538
  updateDispenseQuantity: I,
141539
141539
  updateDispenseUnit: S,
141540
141540
  updateNote: z
141541
- } = useMedicationRequestStore(a), { t: O } = useTranslation(), Z = a === ub, {
141541
+ } = useMedicationRequestStore(a), { t: O } = useTranslation(), Z = a === lb, {
141542
141542
  id: F,
141543
141543
  dosage: U,
141544
141544
  dosageUnit: W,
@@ -141583,10 +141583,10 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
141583
141583
  const ue = c.frequencies.find(isImmediateFrequency);
141584
141584
  ue && E(F, ue);
141585
141585
  }
141586
- pe && k(F, F_());
141586
+ pe && k(F, j_());
141587
141587
  } else if (pe) {
141588
141588
  const ue = c.frequencies.find(isImmediateFrequency);
141589
- ue && E(F, ue), R(F, 0), T(F, null), k(F, F_());
141589
+ ue && E(F, ue), R(F, 0), T(F, null), k(F, j_());
141590
141590
  }
141591
141591
  }
141592
141592
  }, [
@@ -141613,7 +141613,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
141613
141613
  });
141614
141614
  }, []), useEffect(() => {
141615
141615
  const ue = f?.filter((Ae) => Ae.event === "onSelect") ?? [];
141616
- ue.length > 0 && wv({
141616
+ ue.length > 0 && Ev({
141617
141617
  controlKey: a,
141618
141618
  itemId: F,
141619
141619
  rules: ue
@@ -141872,7 +141872,7 @@ const column$2 = "SelectedMedicationRequestItem-module_column__RoFL-", itemTitle
141872
141872
  datePickerType: "single",
141873
141873
  "data-testid": `${a}-start-date-picker-${F}-test-id`,
141874
141874
  value: le,
141875
- minDate: F_(),
141875
+ minDate: j_(),
141876
141876
  onChange: (ue) => {
141877
141877
  k(F, ue[0]);
141878
141878
  },
@@ -141973,11 +141973,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
141973
141973
  cdsCard: cdsCard$1
141974
141974
  }, MedicationRequestForm = React__default.memo(({ inputControlConfig: p }) => {
141975
141975
  const { t: c } = useTranslation(), {
141976
- type: a = ub,
141976
+ type: a = lb,
141977
141977
  label: s = "MEDICATIONS_INPUT_CONTROL_TITLE",
141978
141978
  attributes: f = [],
141979
141979
  cdss: d = []
141980
- } = p ?? {}, h = a === ub, [E, C] = useState(""), {
141980
+ } = p ?? {}, h = a === lb, [E, C] = useState(""), {
141981
141981
  data: R,
141982
141982
  isLoading: T,
141983
141983
  error: H
@@ -141985,11 +141985,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
141985
141985
  queryKey: ["medicationConfig"],
141986
141986
  queryFn: async () => {
141987
141987
  const [J, ae] = await Promise.all([
141988
- Nb(
141988
+ Ib(
141989
141989
  MEDICATIONS_CONFIG_URL,
141990
141990
  medicationConfigSchema
141991
141991
  ),
141992
- db()
141992
+ fb()
141993
141993
  ]);
141994
141994
  return { ...ae, ...J };
141995
141995
  }
@@ -142003,7 +142003,7 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
142003
142003
  error: z
142004
142004
  } = useQuery({
142005
142005
  queryKey: ["vaccination"],
142006
- queryFn: pb,
142006
+ queryFn: hb,
142007
142007
  enabled: !h
142008
142008
  }), O = useMemo(
142009
142009
  () => I ? getMedicationsFromBundle(I) : [],
@@ -142020,11 +142020,11 @@ const $schema$2 = "http://json-schema.org/draft-07/schema#", title$4 = "Medicati
142020
142020
  ), [N, R]);
142021
142021
  useEffect(() => {
142022
142022
  W(f), V && getMedicationRequestStore(a).getState().loadMedicationsForEdit(V);
142023
- }, [V, a]), bv((J) => {
142023
+ }, [V, a]), vv((J) => {
142024
142024
  const { cards: ae } = J, oe = new Set(
142025
142025
  Z.map((ne) => ne.id)
142026
142026
  );
142027
- Lv(ae, oe).forEach(({ card: ne, resourceId: re }) => {
142027
+ xv(ae, oe).forEach(({ card: ne, resourceId: re }) => {
142028
142028
  K(re, [ne]);
142029
142029
  });
142030
142030
  });
@@ -142172,7 +142172,7 @@ const registerMedicationRequestControl = (p) => {
142172
142172
  hasCriticalCDSCards: () => c().getState().hasCriticalCDSCards()
142173
142173
  });
142174
142174
  };
142175
- registerMedicationRequestControl(ub);
142175
+ registerMedicationRequestControl(lb);
142176
142176
  registerMedicationRequestControl(VACCINATIONS_INPUT_CONTROL_KEY);
142177
142177
  const IMMUNIZATION_HISTORY_INPUT_CONTROL_KEY = "immunizationHistory", IMMUNIZATION_ADMINISTRATION_INPUT_CONTROL_KEY = "immunizationAdministration", IMMUNIZATION_WAIVER_INPUT_CONTROL_KEY = "immunizationWaiver", ADMINISTERED_PRODUCT_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/administeredProduct", BASED_ON_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/basedOn", STOCK_LOCATION_EXTENSION_URL = "http://fhir.bahmni.org/ext/immunization/stockLocation", ENTERING_PROVIDER_SYSTEM = "http://terminology.hl7.org/CodeSystem/v2-0443", ENTERING_PROVIDER_CODE = "EP", ENTERING_PROVIDER_DISPLAY = "Entering Provider";
142178
142178
  function resolveAdministeredProductExtension(p) {
@@ -142266,7 +142266,7 @@ function getBatchNumberComboBoxItems(p, c, a) {
142266
142266
  }
142267
142267
  function formatBatchItemDisplay(p, c) {
142268
142268
  if (!p) return "";
142269
- const a = p.expiryDate ? ` [${M_(p.expiryDate, c, !1, "d MMM yyyy").formattedResult}]` : "", s = p.stockLocationName ? ` - ${p.stockLocationName}` : "";
142269
+ const a = p.expiryDate ? ` [${U_(p.expiryDate, c, !1, "d MMM yyyy").formattedResult}]` : "", s = p.stockLocationName ? ` - ${p.stockLocationName}` : "";
142270
142270
  return p.batchNumber + a + s;
142271
142271
  }
142272
142272
  function getLocationComboBoxItems(p, c) {
@@ -142279,7 +142279,7 @@ function getComboBoxItems(p, c, a, s, f) {
142279
142279
  const h = (c?.expansion?.contains ?? []).filter(
142280
142280
  (E) => E.display?.toLowerCase().includes(p.toLowerCase())
142281
142281
  );
142282
- return LE(
142282
+ return xE(
142283
142283
  a,
142284
142284
  s,
142285
142285
  h,
@@ -142699,7 +142699,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
142699
142699
  ie && ae(!0);
142700
142700
  }, [ie]), useEffect(() => {
142701
142701
  const Fe = x?.filter((Qe) => Qe.event === "onSelect") ?? [];
142702
- Fe.length > 0 && wv({
142702
+ Fe.length > 0 && Ev({
142703
142703
  controlKey: C,
142704
142704
  itemId: V,
142705
142705
  rules: Fe
@@ -143062,7 +143062,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
143062
143062
  isError: O
143063
143063
  } = useQuery({
143064
143064
  queryKey: ["medication", I],
143065
- queryFn: () => hb(I),
143065
+ queryFn: () => mb(I),
143066
143066
  enabled: !!$ && !!I,
143067
143067
  staleTime: 1 / 0
143068
143068
  }), { isLoading: Z, error: F } = useClinicalConfig(), U = Rt(), {
@@ -143075,11 +143075,11 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
143075
143075
  N && T(N);
143076
143076
  }, [N, T]), useEffect(() => {
143077
143077
  le && H({ otherReasonConceptUuid: le });
143078
- }, [le, H]), bv((at) => {
143078
+ }, [le, H]), vv((at) => {
143079
143079
  const { cards: rt } = at, xt = new Set(
143080
143080
  R.map(($t) => $t.id)
143081
143081
  );
143082
- Lv(rt, xt).forEach(({ card: $t, resourceId: Ke }) => {
143082
+ xv(rt, xt).forEach(({ card: $t, resourceId: Ke }) => {
143083
143083
  x(Ke, [$t]);
143084
143084
  });
143085
143085
  });
@@ -143098,7 +143098,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
143098
143098
  error: se
143099
143099
  } = useQuery({
143100
143100
  queryKey: ["administeredLocationTag", pe],
143101
- queryFn: () => Av(pe),
143101
+ queryFn: () => Pv(pe),
143102
143102
  enabled: !h && !!pe && !Z && !F && !!findAttr("administeredLocation", N),
143103
143103
  staleTime: 1 / 0
143104
143104
  }), {
@@ -143134,7 +143134,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
143134
143134
  error: qe
143135
143135
  } = useQuery({
143136
143136
  queryKey: ["vaccination"],
143137
- queryFn: pb,
143137
+ queryFn: hb,
143138
143138
  staleTime: 1 / 0
143139
143139
  }), Je = useMemo(
143140
143140
  () => ke?.entry?.filter((at) => at.resource?.resourceType === "Medication").map((at) => at.resource) ?? [],
@@ -143144,7 +143144,7 @@ const form = "ImmunizationForm-module_form__e68vP", title$2 = "ImmunizationForm-
143144
143144
  const rt = at.administeredLocation?.uuid;
143145
143145
  return {
143146
143146
  queryKey: ["availableStocks", at.drug?.code, rt],
143147
- queryFn: () => Dv(at.drug.code, rt),
143147
+ queryFn: () => Cv(at.drug.code, rt),
143148
143148
  enabled: !h && !!ae && !!at.drug?.code && !!rt
143149
143149
  };
143150
143150
  })
@@ -143342,7 +143342,7 @@ const canUserAccessForm = (p, c) => {
143342
143342
  error: h
143343
143343
  } = useQuery({
143344
143344
  queryKey: ["observationForms", c],
143345
- queryFn: () => Xb(c)
143345
+ queryFn: () => Zb(c)
143346
143346
  });
143347
143347
  return {
143348
143348
  forms: useMemo(() => {
@@ -143367,7 +143367,7 @@ const canUserAccessForm = (p, c) => {
143367
143367
  try {
143368
143368
  if (!p)
143369
143369
  throw new Error(PINNED_FORMS_ERROR_MESSAGES.USER_NOT_FOUND);
143370
- const c = await B(Db(p));
143370
+ const c = await B(Cb(p));
143371
143371
  if (!c || typeof c != "object")
143372
143372
  return [];
143373
143373
  const a = c.userProperties?.pinnedObsTemplates ?? "";
@@ -143385,7 +143385,7 @@ const canUserAccessForm = (p, c) => {
143385
143385
  const a = c.filter(
143386
143386
  (s) => typeof s == "string" && s.trim().length > 0
143387
143387
  );
143388
- await ge(Db(p), {
143388
+ await ge(Cb(p), {
143389
143389
  userProperties: {
143390
143390
  pinnedObsTemplates: a.join(PINNED_FORMS_DELIMITER)
143391
143391
  }
@@ -143455,7 +143455,7 @@ function usePinnedObservationForms(p, c) {
143455
143455
  return { pinnedForms: f, updatePinnedForms: x, isLoading: !h, error: C, refetch: $ };
143456
143456
  }
143457
143457
  function useSubmittedEncounterForms(p) {
143458
- const c = g0(), { activeEncounter: a, matchReasons: s } = Gb(), f = s.includes("MATCHED") ? a?.id : void 0, {
143458
+ const c = g0(), { activeEncounter: a, matchReasons: s } = Kb(), f = s.includes("MATCHED") ? a?.id : void 0, {
143459
143459
  data: d,
143460
143460
  refetch: h,
143461
143461
  error: E
@@ -143463,11 +143463,11 @@ function useSubmittedEncounterForms(p) {
143463
143463
  queryKey: ["submittedEncounterForms", c, f],
143464
143464
  enabled: !!f && !!c,
143465
143465
  staleTime: 3e4,
143466
- queryFn: () => xb(f)
143466
+ queryFn: () => kb(f)
143467
143467
  });
143468
143468
  return useEffect(() => {
143469
143469
  E && console.error("Failed to fetch submitted encounter forms", E);
143470
- }, [E]), yv(
143470
+ }, [E]), wv(
143471
143471
  (C) => {
143472
143472
  C.patientUUID === c && h();
143473
143473
  },
@@ -143475,7 +143475,7 @@ function useSubmittedEncounterForms(p) {
143475
143475
  ), useMemo(() => {
143476
143476
  const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
143477
143477
  for (const T of C) {
143478
- const H = Dqt(T);
143478
+ const H = Iqt(T);
143479
143479
  if (!H) continue;
143480
143480
  const x = p.find(($) => $.name === H);
143481
143481
  x && R.add(x.uuid);
@@ -143500,7 +143500,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143500
143500
  submittedFormUuids: R = EMPTY_SET
143501
143501
  }) => {
143502
143502
  const { t: T } = useTranslation(), H = A3(
143503
- F01.OBSERVATIONS
143503
+ G01.OBSERVATIONS
143504
143504
  ), [x, $] = useState(""), [k, I] = useState(null), { getFormData: S } = useObservationFormsStore(), z = useMemo(() => {
143505
143505
  if (!x.trim()) return h;
143506
143506
  const ae = x.toLowerCase().trim().split(/\s+/);
@@ -143734,18 +143734,18 @@ const ObservationFormsPanel = ({
143734
143734
  );
143735
143735
  if (!ie) return;
143736
143736
  const ee = `${E}:${d}`;
143737
- X.current !== ee && (X.current = ee, xb(E).then(async (pe) => {
143737
+ X.current !== ee && (X.current = ee, kb(E).then(async (pe) => {
143738
143738
  const J = bundleExports.getObservationsFromFhir(pe).filter(
143739
143739
  (le) => le.formFieldPath?.toLowerCase().startsWith(`${d.toLowerCase()}.`)
143740
143740
  );
143741
143741
  let ae = ie, oe = null;
143742
143742
  if (a) {
143743
- const ne = (await tv(a).catch(
143743
+ const ne = (await rv(a).catch(
143744
143744
  () => []
143745
143745
  )).find(
143746
143746
  (re) => re.encounterUuid === E && re.formName.toLowerCase() === d.toLowerCase()
143747
143747
  );
143748
- oe = ne?.formUuid ?? await ev(
143748
+ oe = ne?.formUuid ?? await tv(
143749
143749
  d,
143750
143750
  ne?.formVersion,
143751
143751
  ne?.encounterDateTime
@@ -143885,11 +143885,11 @@ const stopMedicationFormTile = "StopMedicationForm-module_stopMedicationFormTile
143885
143885
  queryKey: ["medicationConfig"],
143886
143886
  queryFn: async () => {
143887
143887
  const [V, ie] = await Promise.all([
143888
- Nb(
143888
+ Ib(
143889
143889
  MEDICATIONS_CONFIG_URL,
143890
143890
  medicationConfigSchema
143891
143891
  ),
143892
- db()
143892
+ fb()
143893
143893
  ]);
143894
143894
  return { ...ie, ...V };
143895
143895
  }
@@ -144067,7 +144067,7 @@ function useObservationFormData(p) {
144067
144067
  error: d
144068
144068
  } = useQuery({
144069
144069
  queryKey: ["formMetadata", p?.formUuid],
144070
- queryFn: () => Zb(p.formUuid),
144070
+ queryFn: () => ev(p.formUuid),
144071
144071
  enabled: !!p?.formUuid
144072
144072
  }), h = p?.formMetadata ?? s, E = d || null, C = useCallback((H) => {
144073
144073
  if (!H) {
@@ -144121,7 +144121,7 @@ function useObservationFormData(p) {
144121
144121
  a(k);
144122
144122
  }, []), R = () => {
144123
144123
  a(null);
144124
- }, T = c && h ? nv(c, h) : [];
144124
+ }, T = c && h ? sv(c, h) : [];
144125
144125
  return {
144126
144126
  formData: c,
144127
144127
  observations: T,
@@ -144269,11 +144269,11 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144269
144269
  error: X
144270
144270
  } = useQuery({
144271
144271
  queryKey: ["patient", Z],
144272
- queryFn: () => GE(Z),
144272
+ queryFn: () => KE(Z),
144273
144273
  enabled: !!Z
144274
144274
  }), V = useMemo(() => {
144275
144275
  if (!N || !Z) return null;
144276
- const at = N.birthDate ? x_(N.birthDate) : null;
144276
+ const at = N.birthDate ? k_(N.birthDate) : null;
144277
144277
  return {
144278
144278
  uuid: Z,
144279
144279
  identifier: N.identifier ?? void 0,
@@ -144284,7 +144284,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144284
144284
  ageInDays: at?.ageInDays,
144285
144285
  birthdate: N.birthDate ?? void 0,
144286
144286
  birthtime: N.birthtime ?? void 0,
144287
- gender: N.gender ? YE(N.gender) : void 0,
144287
+ gender: N.gender ? GE(N.gender) : void 0,
144288
144288
  activeVisitUuid: W ?? void 0,
144289
144289
  currentEncounterUuid: d ?? void 0,
144290
144290
  getAgeDetails: () => at ?? AGE_DETAILS_DEFAULT
@@ -144331,7 +144331,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144331
144331
  groupMembers: Vt.groupMembers.map(xt)
144332
144332
  } : Vt;
144333
144333
  }, mt = (Ke) => {
144334
- const Vt = typeof Ke.value == "string" && vE.test(Ke.value) ? { ...Ke, value: rv(new Date(Ke.value)) } : Ke;
144334
+ const Vt = typeof Ke.value == "string" && TE.test(Ke.value) ? { ...Ke, value: nv(new Date(Ke.value)) } : Ke;
144335
144335
  return Vt.groupMembers ? {
144336
144336
  ...Vt,
144337
144337
  groupMembers: Vt.groupMembers.map(mt)
@@ -144366,7 +144366,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144366
144366
  if (Q.current) {
144367
144367
  if (oe && !at) {
144368
144368
  le(null);
144369
- const { observations: Gt } = Q.current.getValue(), Da = Gt && Gt.length > 0 ? ov(
144369
+ const { observations: Gt } = Q.current.getValue(), Da = Gt && Gt.length > 0 ? av(
144370
144370
  Gt,
144371
144371
  me
144372
144372
  ) : [];
@@ -144382,7 +144382,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144382
144382
  ), Ie(Da, oe);
144383
144383
  return;
144384
144384
  }
144385
- const { observations: rt, errors: xt } = Q.current.getValue(), mt = rt && rt.length > 0 ? ov(
144385
+ const { observations: rt, errors: xt } = Q.current.getValue(), mt = rt && rt.length > 0 ? av(
144386
144386
  rt,
144387
144387
  me
144388
144388
  ) : [], $t = (Gt) => Gt.value !== null && Gt.value !== void 0 && Gt.value !== "" ? !0 : Gt.groupMembers && Gt.groupMembers.length > 0 ? Gt.groupMembers.some($t) : !1, Vt = !mt.some($t);
@@ -144426,7 +144426,7 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144426
144426
  }
144427
144427
  }, Je = () => {
144428
144428
  if (le(null), Q.current) {
144429
- const { observations: at } = Q.current.getValue(), rt = at && at.length > 0 ? ov(
144429
+ const { observations: at } = Q.current.getValue(), rt = at && at.length > 0 ? av(
144430
144430
  at,
144431
144431
  me
144432
144432
  ) : [];
@@ -144558,8 +144558,8 @@ const formView = "ObservationFormsContainer-module_formView__d3K6Z", errorNotifi
144558
144558
  return null;
144559
144559
  }, extractAndAppendNotesFromFormData = (p, c) => {
144560
144560
  if (!p.current) return;
144561
- const a = p.current?.state, s = av(a?.data);
144562
- iv(s, c);
144561
+ const a = p.current?.state, s = iv(a?.data);
144562
+ cv(s, c);
144563
144563
  }, $schema$1 = "http://json-schema.org/draft-07/schema#", title$1 = "CDSS Servers Configuration Schema", description$1 = "Schema for CDSS (Clinical Decision Support System) server configurations", type$1 = "array", items = { type: "object", required: ["server", "url", "services"], additionalProperties: !1, properties: { server: { type: "string", description: "CDSS server identifier" }, url: { type: "string", description: "Base URL for the CDSS server" }, services: { type: "array", description: "List of CDS Hooks services provided by this server", items: { type: "object", required: ["name", "description"], additionalProperties: !1, properties: { name: { type: "string", description: "Service/hook name" }, description: { type: "string", description: "Service description" }, contextResourceMap: { type: "array", description: "Mapping of FHIR resources to context attributes", items: { type: "object", required: ["type", "attribute"], additionalProperties: !1, properties: { type: { type: "string", description: "FHIR resource type" }, attribute: { type: "string", description: "Context attribute name" } } } }, prefetch: { type: "object", description: "Prefetch templates for the service", additionalProperties: { type: "string" } } } } } } }, cdssConfigSchema = {
144564
144564
  $schema: $schema$1,
144565
144565
  title: title$1,
@@ -144709,7 +144709,7 @@ const ConsultationPad = ({
144709
144709
  error: U
144710
144710
  } = useQuery({
144711
144711
  queryKey: ["cdssConfig"],
144712
- queryFn: () => Nb(CDSS_SERVER_CONFIG_URL, cdssConfigSchema),
144712
+ queryFn: () => Ib(CDSS_SERVER_CONFIG_URL, cdssConfigSchema),
144713
144713
  enabled: k
144714
144714
  });
144715
144715
  useEffect(() => {
@@ -144756,7 +144756,7 @@ const ConsultationPad = ({
144756
144756
  he?.uuid,
144757
144757
  oe?.uuid
144758
144758
  ],
144759
- queryFn: () => jb(
144759
+ queryFn: () => Vb(
144760
144760
  ne,
144761
144761
  he?.uuid,
144762
144762
  void 0,
@@ -144770,7 +144770,7 @@ const ConsultationPad = ({
144770
144770
  error: Pe
144771
144771
  } = useQuery({
144772
144772
  queryKey: ["encounter", C],
144773
- queryFn: ({ signal: Ke }) => eb(C, { signal: Ke }),
144773
+ queryFn: ({ signal: Ke }) => tb(C, { signal: Ke }),
144774
144774
  enabled: !!C
144775
144775
  });
144776
144776
  useEffect(() => {
@@ -144802,7 +144802,7 @@ const ConsultationPad = ({
144802
144802
  });
144803
144803
  useEffect(() => {
144804
144804
  const Ke = p.editMedications;
144805
- getMedicationRequestStore(ub).getState().setPendingFhirEdits(Ke?.length ? Ke : []);
144805
+ getMedicationRequestStore(lb).getState().setPendingFhirEdits(Ke?.length ? Ke : []);
144806
144806
  }, [p.editMedications]), useEffect(() => () => ie.forEach((Ke) => Ke.reset()), []), useEffect(() => {
144807
144807
  f?.length && useAllergyStore.getState().preloadAllergies(f);
144808
144808
  }, [f]);
@@ -144842,7 +144842,7 @@ const ConsultationPad = ({
144842
144842
  visitId: kt,
144843
144843
  episodeId: Q ?? void 0
144844
144844
  }, Yt = Gt.map(
144845
- (Za) => Cv(Z, Za, Qa, Da).catch(
144845
+ (Za) => Lv(Z, Za, Qa, Da).catch(
144846
144846
  () => (H({
144847
144847
  title: T("ERROR_DEFAULT_TITLE"),
144848
144848
  message: T("CDSS_RULE_INVOCATION_ERROR", {
@@ -144853,7 +144853,7 @@ const ConsultationPad = ({
144853
144853
  }), [])
144854
144854
  )
144855
144855
  ), fa = (await Promise.all(Yt)).flat();
144856
- Ev({
144856
+ _v({
144857
144857
  cards: fa,
144858
144858
  triggerItemId: Ga,
144859
144859
  controlKey: Vt
@@ -144885,7 +144885,7 @@ const ConsultationPad = ({
144885
144885
  k
144886
144886
  ]
144887
144887
  );
144888
- _v(Qe);
144888
+ bv(Qe);
144889
144889
  const gt = async () => {
144890
144890
  const Ke = ie.map((Gt) => ({
144891
144891
  key: Gt.key,
@@ -144921,7 +144921,7 @@ const ConsultationPad = ({
144921
144921
  await Yt.onDirectSubmit();
144922
144922
  if (Gt.length > 0 && Da.length === 0) {
144923
144923
  const Yt = captureUpdatedResources(ie);
144924
- gv({
144924
+ yv({
144925
144925
  patientUUID: useEncounterDetailsStore.getState().patientUUID ?? "",
144926
144926
  updatedResources: Yt,
144927
144927
  updatedConcepts: /* @__PURE__ */ new Map()
@@ -144945,7 +144945,7 @@ const ConsultationPad = ({
144945
144945
  messageParams: { encounterType: kt.encounterTypeName }
144946
144946
  });
144947
144947
  const Qa = captureUpdatedResources(ie);
144948
- gv({
144948
+ yv({
144949
144949
  patientUUID: kt.patientUUID,
144950
144950
  updatedResources: Qa,
144951
144951
  updatedConcepts: kt.updatedConcepts
@@ -144979,9 +144979,9 @@ const ConsultationPad = ({
144979
144979
  encounterSessionStartContext: p
144980
144980
  },
144981
144981
  Ke.key
144982
- )) }), rt = !!h, xt = getMedicationRequestStore(ub), mt = useSyncExternalStore(
144982
+ )) }), rt = !!h, xt = getMedicationRequestStore(lb), mt = useSyncExternalStore(
144983
144983
  (Ke) => xt.subscribe(Ke),
144984
- () => !rt || h !== ub ? !0 : xt.getState().hasEditChanges()
144984
+ () => !rt || h !== lb ? !0 : xt.getState().hasEditChanges()
144985
144985
  ), $t = tt || !J || x || !pe || !mt || me;
144986
144986
  return /* @__PURE__ */ jsxs(Fragment, { children: [
144987
144987
  /* @__PURE__ */ jsx(
@@ -145027,7 +145027,7 @@ const ConsultationPad = ({
145027
145027
  onToggleActionAreaExpand: s
145028
145028
  }) => {
145029
145029
  const { t: f } = useTranslation(), { addNotification: d } = L1(), h = g0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: C, isLoading: R } = useClinicalConfig(), { encounterConcepts: T } = useEncounterConcepts(), H = A3(
145030
- F01.ADD_VISITS
145030
+ G01.ADD_VISITS
145031
145031
  ), x = useActionAreaExpandProps({
145032
145032
  isExpanded: a,
145033
145033
  onToggleExpand: s
@@ -145037,7 +145037,7 @@ const ConsultationPad = ({
145037
145037
  isLoading: W
145038
145038
  } = useQuery({
145039
145039
  queryKey: ["activeVisitAtLoginLocation", h],
145040
- queryFn: () => rb(h),
145040
+ queryFn: () => nb(h),
145041
145041
  enabled: !!h,
145042
145042
  retry: !1
145043
145043
  }), N = useMemo(
@@ -145061,7 +145061,7 @@ const ConsultationPad = ({
145061
145061
  const he = await Mi(
145062
145062
  Rt().uuid
145063
145063
  );
145064
- await E_(
145064
+ await __(
145065
145065
  h,
145066
145066
  he.uuid,
145067
145067
  re,
@@ -145190,8 +145190,8 @@ const ConsultationPad = ({
145190
145190
  encounterUuids: s,
145191
145191
  visitUuids: f
145192
145192
  }) => {
145193
- const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = Gb(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, $ = (I, S, z) => {
145194
- const O = q01(I.type);
145193
+ const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = Kb(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, $ = (I, S, z) => {
145194
+ const O = X01(I.type);
145195
145195
  if (!O)
145196
145196
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${S}`);
145197
145197
  const Z = S < z - 1;
@@ -145322,21 +145322,21 @@ function useEncounterSession(p) {
145322
145322
  F = Rt().uuid;
145323
145323
  } catch {
145324
145324
  }
145325
- const U = Xy();
145325
+ const U = Zy();
145326
145326
  if (U.matchReasons.includes("MATCHED") && U.activeEncounter?.id && U.activeEncounter.subject?.reference?.endsWith(I) && !Z.ignored) {
145327
145327
  f(!0), h(U.activeEncounter), C(!0), k(U.matchReasons), T(!1);
145328
145328
  return;
145329
145329
  }
145330
145330
  T(!0), x(null);
145331
145331
  try {
145332
- const W = await Vb(
145332
+ const W = await Hb(
145333
145333
  I,
145334
145334
  S,
145335
145335
  F,
145336
145336
  a
145337
145337
  );
145338
145338
  if (Z.ignored) return;
145339
- const N = Hb(W);
145339
+ const N = Bb(W);
145340
145340
  f(N), h(W.encounter), C(N), k(W.reasons);
145341
145341
  } catch (W) {
145342
145342
  if (Z.ignored) return;
@@ -145384,7 +145384,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145384
145384
  }) => {
145385
145385
  const { t: s } = useTranslation();
145386
145386
  return A3(
145387
- F01.ENCOUNTER
145387
+ G01.ENCOUNTER
145388
145388
  ) ? a ? /* @__PURE__ */ jsx(
145389
145389
  ob2,
145390
145390
  {
@@ -145425,15 +145425,15 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145425
145425
  encounterTypeUUID: C
145426
145426
  }), k = useRef(null);
145427
145427
  useEffect(() => {
145428
- k.current !== h && (k.current = h, Yb());
145428
+ k.current !== h && (k.current = h, Gb());
145429
145429
  }, [h]), useEffect(() => {
145430
- zb(x);
145430
+ Yb(x);
145431
145431
  }, [x]), useEffect(() => {
145432
- x || Bb({
145432
+ x || zb({
145433
145433
  reasons: R,
145434
145434
  encounter: H
145435
145435
  });
145436
- }, [x, R, H]), yv(
145436
+ }, [x, R, H]), wv(
145437
145437
  (F) => {
145438
145438
  F.patientUUID === h && $();
145439
145439
  },
@@ -145462,7 +145462,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145462
145462
  "data-active-encounter-uuid": T && H?.id ? H.id : void 0,
145463
145463
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145464
145464
  children: [
145465
- /* @__PURE__ */ jsx(O01, {}),
145465
+ /* @__PURE__ */ jsx($01, {}),
145466
145466
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145467
145467
  /* @__PURE__ */ jsx(
145468
145468
  ConsultationActionButton,
@@ -145473,7 +145473,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145473
145473
  }
145474
145474
  ),
145475
145475
  /* @__PURE__ */ jsx(
145476
- _01,
145476
+ L01,
145477
145477
  {
145478
145478
  printOptions: c,
145479
145479
  renderContext: Z,
@@ -145494,7 +145494,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145494
145494
  error: f
145495
145495
  } = useQuery({
145496
145496
  queryKey: ["patientSearch", p],
145497
- queryFn: () => WE(p),
145497
+ queryFn: () => JE(p),
145498
145498
  enabled: p.trim().length > 0
145499
145499
  });
145500
145500
  return { results: useMemo(
@@ -145628,10 +145628,10 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145628
145628
  error: E
145629
145629
  } = useQuery({
145630
145630
  queryKey: ["encounters-for-eoc", c],
145631
- queryFn: () => Kb(c),
145631
+ queryFn: () => Wb(c),
145632
145632
  enabled: c.length > 0
145633
145633
  }), { activeVisit: C } = usePatientVisit(a);
145634
- yv(() => {
145634
+ wv(() => {
145635
145635
  c.length > 0 && f.invalidateQueries({
145636
145636
  queryKey: ["encounters-for-eoc", c]
145637
145637
  });
@@ -145696,7 +145696,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145696
145696
  })), addSectionIds = (p) => p?.sections?.length ? {
145697
145697
  ...p,
145698
145698
  sections: p.sections.map(
145699
- (c) => c.id ? c : { ...c, id: RE() }
145699
+ (c) => c.id ? c : { ...c, id: OE() }
145700
145700
  )
145701
145701
  } : p, ConsultationPage = () => {
145702
145702
  const { t: p } = useTranslation(), { clinicalConfig: c, isLoading: a } = useClinicalConfig(), { userPrivileges: s } = Qr$1(), { addNotification: f } = L1(), [d, h] = useState(!1), [E, C] = useState(!1), [R, T] = useState(null);
@@ -145717,15 +145717,15 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145717
145717
  [k, p]
145718
145718
  ), z = useObservationFormsStore((he) => he.viewingForm), O = g0(), { data: Z } = useQuery({
145719
145719
  queryKey: ["patient", O],
145720
- queryFn: () => GE(O),
145720
+ queryFn: () => KE(O),
145721
145721
  enabled: !!O
145722
145722
  }), F = useMemo(
145723
145723
  () => [
145724
- { id: "home", label: "Home", href: iE },
145724
+ { id: "home", label: "Home", href: cE },
145725
145725
  { id: "clinical", label: "Clinical", href: BAHMNI_CLINICAL_PATH },
145726
145726
  {
145727
145727
  id: "current",
145728
- label: Z?.fullName ? OE(Z.fullName) : p("CURRENT_PATIENT"),
145728
+ label: Z?.fullName ? AE(Z.fullName) : p("CURRENT_PATIENT"),
145729
145729
  isCurrentPage: !0
145730
145730
  }
145731
145731
  ],
@@ -145743,7 +145743,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145743
145743
  error: ie
145744
145744
  } = useQuery({
145745
145745
  queryKey: ["dashboardConfig", K],
145746
- queryFn: () => Nb(
145746
+ queryFn: () => Ib(
145747
145747
  DASHBOARD_CONFIG_URL(K),
145748
145748
  dashboardConfigSchema
145749
145749
  ),
@@ -145761,7 +145761,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145761
145761
  ...X,
145762
145762
  sections: filterSectionsByPrivileges(X.sections)
145763
145763
  }, [X, s]), pe = useMemo(() => !N?.printOptions || !s ? [] : N.printOptions.filter(
145764
- (he) => sw(s, he.privileges)
145764
+ (he) => ow(s, he.privileges)
145765
145765
  ), [N, s]), J = useMemo(() => ee ? getSidebarItems(ee, p) : [], [ee, p]), [ae, oe] = useState(0), { activeItemId: le, handleItemClick: ne } = Vb2(J), re = useCallback(
145766
145766
  (he) => {
145767
145767
  ne(he), oe((ve) => ve + 1);
@@ -145817,7 +145817,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145817
145817
  const Q = () => {
145818
145818
  const he = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
145819
145819
  return he && c.contextInformation?.program ? /* @__PURE__ */ jsx(
145820
- k01,
145820
+ U01,
145821
145821
  {
145822
145822
  programUUID: he,
145823
145823
  config: {
@@ -145836,7 +145836,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145836
145836
  {
145837
145837
  breadcrumbItems: F,
145838
145838
  globalActions: S,
145839
- userMenu: /* @__PURE__ */ jsx(P11, {}),
145839
+ userMenu: /* @__PURE__ */ jsx(q11, {}),
145840
145840
  sideNavItems: E ? [] : J,
145841
145841
  activeSideNavItemId: le,
145842
145842
  onSideNavItemClick: re,