@bahmni/clinical-app 0.0.1-dev.380 → 0.0.1-dev.381

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, D as B, E as ENCOUNTER_CONCEPTS_URL, Y as Yr, F as Ci, I as BAHMNI_USER_LOCATION_COOKIE_NAME, O as Lm, P as e8, g as g0, Q as hb2, R as ub2, S as sb2, T as Bx2, U as ol1, X as ab2, _ as AE, $ as Di, a0 as Dd, a1 as dE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as Mb, a9 as Kb, aa as Wb, ab as mb2, ac as Cb2, ad as Nz2, Z as Z1, b as b3, ae as Jb, af as Oy2, ag as Ky2, ah as Bb2, ai as _b2, aj as xb2, j as L01, ak as R_, al as fb2, am as Y_, an as Ps, ao as P_, ap as mv, aq as Yb, ar as Yy2, as as n_, at as a_, au as CLINICAL_V2_CONFIG_BASE_URL, av as d_, aw as CE, ax as Qr, ay as c_, az as qb, aA as gv, aB as aL2, aC as $_, aD as l_, aE as f_, aF as Ev, aG as ib2, aH as Dv, aI as kb, aJ as p_, aK as Rt, aL as jr, aM as Rv, aN as Nv, J as Jr, aO as Q_, aP as I_, aQ as L_, H as H01, aR as Rb2, aS as Ob2, aT as ev, aU as Z_, 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 X_, b1 as rv, b2 as YE, b3 as Lb, b4 as zE, b5 as an, b6 as N4, b7 as c3, b8 as Ab2, b9 as _E, ba as tv, bb as sv, bc as ov, bd as av, be as Ii, bf as ns, bg as F_, bh as Zb, bi as Iv, bj as yv, bk as wv, bl as hv, bm as CDSS_SERVER_CONFIG_URL, bn as t_, bo as Mi, bp as wb, bq as Ze, br as Hb2, bs as $01, bt as Eb2, bu as Xy, bv as j_, bw as V_, bx as ob2, by as Hs1, bz as z_, bA as B_, bB as H_, bC as V01, bD as g01, bE as KE, bF as G_, bG as aE, bH as BAHMNI_CLINICAL_PATH, bI as RE, bJ as sw, bK as Vb2, bL as vb2, bM as Cz2, bN as T11, bO as SE, bP as z01 } from "./index-CZ8_yvJC.js";
2
+ import { u as useTranslation, r as B, t as ENCOUNTER_CONCEPTS_URL, D as Yr, F as Ci, I as BAHMNI_USER_LOCATION_COOKIE_NAME, M as Lm, O as e8, g as g0, P as hb2, Q as ub2, R as sb2, T as Bx2, U as ol1, W as ab2, X as AE, $ as Di, a0 as Dd, a1 as dE, a2 as Id, a3 as vs, a4 as dist, a5 as yt, a6 as ge, a7 as ss, a8 as Mb, a9 as Kb, aa as Wb, ab as mb2, ac as Cb2, ad as Nz2, Z as Z1, b as b3, ae as Jb, af as Oy2, ag as Ky2, ah as Bb2, ai as _b2, aj as xb2, S as S01, ak as R_, al as fb2, am as Y_, an as Ps, ao as P_, ap as mv, aq as Yb, ar as Yy2, as as n_, at as a_, au as CLINICAL_V2_CONFIG_BASE_URL, av as d_, aw as CE, ax as Qr, ay as c_, az as qb, aA as gv, aB as aL2, aC as $_, aD as l_, aE as f_, aF as Ev, aG as ib2, aH as Dv, aI as kb, aJ as p_, aK as Rt, aL as jr, aM as Rv, aN as Nv, J as Jr, aO as Q_, aP as I_, aQ as L_, x as x01, aR as Rb2, aS as Ob2, aT as ev, aU as Z_, 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 X_, b1 as rv, b2 as YE, b3 as Lb, b4 as zE, b5 as an, b6 as N4, b7 as c3, b8 as Ab2, b9 as _E, ba as tv, bb as sv, bc as ov, bd as av, be as Ii, bf as ns, bg as F_, bh as Zb, bi as Iv, bj as yv, bk as wv, bl as hv, bm as CDSS_SERVER_CONFIG_URL, bn as t_, bo as Mi, bp as wb, bq as Ze, br as Hb2, bs as k01, bt as Eb2, bu as Xy, bv as j_, bw as V_, bx as ob2, by as Hs1, bz as z_, bA as B_, bB as H_, bC as b01, bD as y01, bE as KE, bF as G_, bG as aE, bH as BAHMNI_CLINICAL_PATH, bI as RE, bJ as sw, bK as Vb2, bL as vb2, bM as Cz2, bN as R11, bO as SE, bP as L01 } from "./index-Drqj9Ait.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-DClwnGw8.js";
7
+ import { u as useClinicalConfig } from "./hook-YKsGTiIP.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 : {};
@@ -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 } = Z1(), d = b3(
139785
- L01.ALLERGIES
139785
+ S01.ALLERGIES
139786
139786
  ), h = b3(
139787
- L01.EDIT_ALLERGIES
139787
+ S01.EDIT_ALLERGIES
139788
139788
  ), [E, C] = useState(""), [R, T] = useState(null), [H, x] = useState(!1), [$, k] = useState(
139789
139789
  null
139790
139790
  ), {
@@ -140107,7 +140107,7 @@ 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 } = Z1(), s = b3(
140110
- L01.INVESTIGATIONS
140110
+ S01.INVESTIGATIONS
140111
140111
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = Y_(), $ = H.includes("MATCHED") ? T?.id : void 0, {
140112
140112
  data: k,
140113
140113
  refetch: I,
@@ -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 } = Z1(), s = b3(
140523
- L01.CONDITIONS_AND_DIAGNOSES
140523
+ S01.CONDITIONS_AND_DIAGNOSES
140524
140524
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
140525
140525
  selectedDiagnoses: T,
140526
140526
  selectedConditions: H,
@@ -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 = H01(T);
143478
+ const H = x01(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 = b3(
143503
- L01.OBSERVATIONS
143503
+ S01.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+/);
@@ -145019,7 +145019,7 @@ const ConsultationPad = ({
145019
145019
  onToggleActionAreaExpand: s
145020
145020
  }) => {
145021
145021
  const { t: f } = useTranslation(), { addNotification: d } = Z1(), h = g0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: C, isLoading: R } = useClinicalConfig(), { encounterConcepts: T } = useEncounterConcepts(), H = b3(
145022
- L01.ADD_VISITS
145022
+ S01.ADD_VISITS
145023
145023
  ), x = useActionAreaExpandProps({
145024
145024
  isExpanded: a,
145025
145025
  onToggleExpand: s
@@ -145183,7 +145183,7 @@ const ConsultationPad = ({
145183
145183
  visitUuids: f
145184
145184
  }) => {
145185
145185
  const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = Y_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? C?.id ?? null : null, $ = (I, S, z) => {
145186
- const O = $01(I.type);
145186
+ const O = k01(I.type);
145187
145187
  if (!O)
145188
145188
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${S}`);
145189
145189
  const Z = S < z - 1;
@@ -145376,7 +145376,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145376
145376
  }) => {
145377
145377
  const { t: s } = useTranslation();
145378
145378
  return b3(
145379
- L01.ENCOUNTER
145379
+ S01.ENCOUNTER
145380
145380
  ) ? a ? /* @__PURE__ */ jsx(
145381
145381
  ob2,
145382
145382
  {
@@ -145454,7 +145454,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145454
145454
  "data-active-encounter-uuid": T && H?.id ? H.id : void 0,
145455
145455
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145456
145456
  children: [
145457
- /* @__PURE__ */ jsx(V01, {}),
145457
+ /* @__PURE__ */ jsx(b01, {}),
145458
145458
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145459
145459
  /* @__PURE__ */ jsx(
145460
145460
  ConsultationActionButton,
@@ -145465,7 +145465,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145465
145465
  }
145466
145466
  ),
145467
145467
  /* @__PURE__ */ jsx(
145468
- g01,
145468
+ y01,
145469
145469
  {
145470
145470
  printOptions: c,
145471
145471
  renderContext: Z,
@@ -145809,7 +145809,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145809
145809
  const Q = () => {
145810
145810
  const he = $.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
145811
145811
  return he && c.contextInformation?.program ? /* @__PURE__ */ jsx(
145812
- z01,
145812
+ L01,
145813
145813
  {
145814
145814
  programUUID: he,
145815
145815
  config: {
@@ -145828,7 +145828,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145828
145828
  {
145829
145829
  breadcrumbItems: F,
145830
145830
  globalActions: S,
145831
- userMenu: /* @__PURE__ */ jsx(T11, {}),
145831
+ userMenu: /* @__PURE__ */ jsx(R11, {}),
145832
145832
  sideNavItems: E ? [] : J,
145833
145833
  activeSideNavItemId: ie,
145834
145834
  onSideNavItemClick: re,
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
2
- import { g as G, u as W, Z as Y, w as Z, m as J, a as X, K as ee, p as te } from "./index-CZ8_yvJC.js";
2
+ import { g as G, u as W, Z as Y, E as Z, m as J, a as X, K as ee, p as te } from "./index-Drqj9Ait.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,25 +1,25 @@
1
- import { jsx as i, jsxs as z, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, g as be, b as Oe, J as Ne, c as Te, d as Ie, W as Ee, f as Ae, L as _e, e as ve, G as Fe, H as Le, s as $, a as Be, x as G, i as P, m as Se, K as Q, k as Me, B as Re, p as Ce, h as Ue, j as ke } from "./index-CZ8_yvJC.js";
1
+ import { jsx as i, jsxs as z, Fragment as ge } from "react/jsx-runtime";
2
+ import { u as ye, g as be, b as Oe, J as Ne, c as Te, v as Ie, G as Ee, d as ve, L as Ae, f as _e, e as Fe, x as Se, s as G, a as Be, h as $, i as P, m as Le, K as Q, k as Me, B as Re, p as Ce, j as Ue, S as ke } from "./index-Drqj9Ait.js";
3
3
  import { useQueryClient as De, useQuery as N } from "@tanstack/react-query";
4
4
  import { useState as J, useMemo as d, useCallback as c } from "react";
5
- const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
5
+ const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
6
6
  formsTableBody: qe,
7
- modalHeading: He,
8
- customAccordianItem: we
9
- }, Ve = "startConsultation", $e = ({
7
+ modalHeading: we,
8
+ customAccordianItem: He
9
+ }, Ve = "startConsultation", Ge = ({
10
10
  episodeOfCareUuids: B,
11
11
  encounterUuids: m,
12
- config: W,
13
- disableActions: Y = !1,
12
+ config: Y,
13
+ disableActions: Z = !1,
14
14
  activeEncounterUuid: p = null
15
15
  }) => {
16
- const { t: n } = ge(), u = be(), [y, S] = J(!1), [s, M] = J(null), {
17
- numberOfVisits: Z,
16
+ const { t: n } = ye(), u = be(), [g, L] = J(!1), [s, M] = J(null), {
17
+ numberOfVisits: W,
18
18
  hideThumbnail: X = !1,
19
- forms: g
20
- } = W ?? {}, ee = Oe(
19
+ forms: y
20
+ } = Y ?? {}, ee = Oe(
21
21
  ke.EDIT_OBSERVATIONS
22
- ), { userPrivileges: b } = Ne(), I = ee && !Y && !!p, R = Te(
22
+ ), { userPrivileges: b } = Ne(), I = ee && !Z && !!p, R = Te(
23
23
  B,
24
24
  m
25
25
  ), re = De(), {
@@ -30,16 +30,16 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
30
30
  refetch: ae
31
31
  } = N({
32
32
  queryKey: ["forms", u, B],
33
- queryFn: () => Ie(u, void 0, Z),
33
+ queryFn: () => Ie(u, void 0, W),
34
34
  enabled: !!u && !R
35
35
  }), D = d(() => {
36
36
  let e = C;
37
37
  return m && m.length > 0 && (e = e.filter(
38
38
  (r) => m.includes(r.encounterUuid)
39
- )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
- (r) => g.some((o) => o.toLowerCase() === r.formName.toLowerCase())
39
+ )), Array.isArray(y) && y.length > 0 && (e = e.filter(
40
+ (r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [C, m, g]), { data: O = [] } = N({
42
+ }, [C, m, y]), { data: O = [] } = N({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ee()
45
45
  }), q = c(
@@ -56,38 +56,38 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
56
56
  ), f = c(
57
57
  (e) => !p || e.encounterUuid !== p ? !1 : q(e.formName),
58
58
  [p, q]
59
- ), H = c(
59
+ ), w = c(
60
60
  (e) => O.find((r) => r.name === e)?.uuid,
61
61
  [O]
62
62
  ), E = d(() => {
63
63
  if (s)
64
- return H(s.formName);
65
- }, [s, H]), {
64
+ return w(s.formName);
65
+ }, [s, w]), {
66
66
  data: l,
67
67
  isLoading: te,
68
68
  isError: se,
69
- error: A
69
+ error: v
70
70
  } = N({
71
71
  queryKey: ["formMetadata", E],
72
- queryFn: () => Ae(E),
73
- enabled: !!E && y
72
+ queryFn: () => ve(E),
73
+ enabled: !!E && g
74
74
  }), {
75
- data: _,
75
+ data: A,
76
76
  isLoading: ne,
77
77
  isError: ie,
78
- error: v
78
+ error: _
79
79
  } = N({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
- queryFn: () => _e(s.encounterUuid),
82
- enabled: !!s?.encounterUuid && y
81
+ queryFn: () => Ae(s.encounterUuid),
82
+ enabled: !!s?.encounterUuid && g
83
83
  });
84
- ve(
84
+ _e(
85
85
  (e) => {
86
86
  e.patientUUID === u && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
87
87
  },
88
88
  [u]
89
89
  );
90
- const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Le(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
90
+ const de = d(() => !A?.entry || !s?.formName ? [] : A.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Fe(e) ? Se(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [A, s?.formName]), le = d(() => {
91
91
  if (!l?.schema) return;
92
92
  const e = [], r = (o) => {
93
93
  (o ?? []).forEach((t) => {
@@ -103,8 +103,8 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
103
103
  const e = {}, r = (o, t) => {
104
104
  for (const a of o)
105
105
  if (a.type === "section") {
106
- const L = a.label?.value ?? "Section";
107
- r(a.controls ?? [], L);
106
+ const S = a.label?.value ?? "Section";
107
+ r(a.controls ?? [], S);
108
108
  } else
109
109
  a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
110
110
  };
@@ -124,22 +124,22 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
124
124
  l.schema.controls ?? []
125
125
  ), Object.keys(e).length > 0 ? e : void 0;
126
126
  }, [l]), ue = d(() => {
127
- if (A)
128
- return $(A).message;
129
127
  if (v)
130
- return $(v).message;
131
- }, [A, v]), h = d(
128
+ return G(v).message;
129
+ if (_)
130
+ return G(_).message;
131
+ }, [v, _]), h = d(
132
132
  () => [
133
133
  { key: "recordedOn", header: n("RECORDED_ON") },
134
134
  { key: "recordedBy", header: n("RECORDED_BY") }
135
135
  ],
136
136
  [n]
137
- ), w = d(
137
+ ), H = d(
138
138
  () => [...h, { key: "actions", header: n("ACTIONS") }],
139
139
  [h, n]
140
140
  ), fe = c(
141
- (e) => I && e.some((r) => f(r)) ? w : h,
142
- [I, f, w, h]
141
+ (e) => I && e.some((r) => f(r)) ? H : h,
142
+ [I, f, H, h]
143
143
  ), he = h, pe = d(
144
144
  () => [
145
145
  { key: "recordedOn", sortable: !0 },
@@ -151,7 +151,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
151
151
  (r, o) => {
152
152
  const t = o.formName;
153
153
  r[t] ??= [];
154
- const a = o.providers.map((L) => L.providerName).filter(Boolean).join(", ");
154
+ const a = o.providers.map((S) => S.providerName).filter(Boolean).join(", ");
155
155
  return r[t].push({
156
156
  id: o.encounterUuid,
157
157
  formName: o.formName,
@@ -172,9 +172,9 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
172
172
  })
173
173
  ).sort((r, o) => r.formName.localeCompare(o.formName));
174
174
  }, [D, n]), j = c((e) => {
175
- M(e), S(!0);
175
+ M(e), L(!0);
176
176
  }, []), x = c(() => {
177
- S(!1), M(null);
177
+ L(!1), M(null);
178
178
  }, []), F = c((e) => {
179
179
  globalThis.dispatchEvent(
180
180
  new CustomEvent(Ve, {
@@ -191,12 +191,12 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
191
191
  (e, r) => {
192
192
  switch (r) {
193
193
  case "recordedOn":
194
- return /* @__PURE__ */ i(Se, { onClick: () => j(e), children: e.recordedOn });
194
+ return /* @__PURE__ */ i(Le, { onClick: () => j(e), children: e.recordedOn });
195
195
  case "recordedBy":
196
196
  return e.recordedBy;
197
197
  case "actions":
198
198
  return f(e) ? /* @__PURE__ */ i(
199
- G,
199
+ $,
200
200
  {
201
201
  label: n("EDIT_OBSERVATION_FORM"),
202
202
  kind: "ghost",
@@ -212,7 +212,7 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
212
212
  },
213
213
  [j, F, f, n]
214
214
  );
215
- return /* @__PURE__ */ z(ye, { children: [
215
+ return /* @__PURE__ */ z(ge, { children: [
216
216
  /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || R ? /* @__PURE__ */ i(
217
217
  Q,
218
218
  {
@@ -254,17 +254,17 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
254
254
  o
255
255
  );
256
256
  }) }) }),
257
- y && s && /* @__PURE__ */ i(
257
+ g && s && /* @__PURE__ */ i(
258
258
  Ce,
259
259
  {
260
260
  id: "modalIdForActionAreaLayout",
261
261
  portalId: "main-display-area",
262
- open: y,
262
+ open: g,
263
263
  onRequestClose: x,
264
264
  modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
265
265
  /* @__PURE__ */ i("span", { children: s.formName }),
266
266
  I && f(s) && /* @__PURE__ */ i(
267
- G,
267
+ $,
268
268
  {
269
269
  label: n("EDIT_OBSERVATION_FORM"),
270
270
  kind: "ghost",
@@ -301,5 +301,5 @@ const qe = "FormsTable-module_formsTableBody__SvGha", He = "FormsTable-module_mo
301
301
  ] });
302
302
  };
303
303
  export {
304
- $e as default
304
+ Ge as default
305
305
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-sm0hMebt.js";
2
- import { bV as d, bW as f, bX as e } from "./index-CZ8_yvJC.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D4-akifd.js";
2
+ import { bV as d, bW as f, bX as e } from "./index-Drqj9Ait.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
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-sm0hMebt.js";
2
- import { bV as v, bW as C, bX as e } from "./index-CZ8_yvJC.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-D4-akifd.js";
2
+ import { bV as v, bW as C, bX as e } from "./index-Drqj9Ait.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,9 +1,9 @@
1
1
  import { jsxs as N, jsx as u } from "react/jsx-runtime";
2
- import { g as B, Z as M, u as S, l as k, n as w, e as x, o as H, N as Q, A as z, q as G, K as j, M as P, r as A, t as Z, C as J, v as Y, y as W, z as X, V as ee } from "./index-CZ8_yvJC.js";
2
+ import { g as q, Z as w, u as S, l as H, w as k, f as z, _ as Q, C as x, z as G, n as M, K as Y, N as j, Y as A, A as P, o as Z, q as J, y as W, H as X, V as ee } from "./index-Drqj9Ait.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as g } from "react";
4
+ import { useRef as se, useEffect as I, useMemo as g } from "react";
5
5
  const C = (a, n, d, l, b, r) => {
6
- const t = Z(a, n, b), s = t.value, o = J(s);
6
+ const t = P(a, n, b), s = t.value, o = Z(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
9
  W,
@@ -23,9 +23,9 @@ const C = (a, n, d, l, b, r) => {
23
23
  )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
24
  const m = b("OBSERVATIONS_RECORDED_BY", {
25
25
  provider: t.provider
26
- }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
26
+ }), p = a.display, h = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ J,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -60,7 +60,7 @@ const C = (a, n, d, l, b, r) => {
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = S(), b = (r, t, s) => {
63
- const o = P(r.encounterDetails, l);
63
+ const o = j(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ N(
65
65
  A,
66
66
  {
@@ -113,43 +113,43 @@ const C = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = M(), { t: o } = S(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = w(), { t: o } = S(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => k(e),
119
+ queryFn: () => H(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- _(() => {
124
- i.forEach((e, h) => {
125
- if (e.isError && !r.current.has(h)) {
126
- const q = d[h];
123
+ I(() => {
124
+ i.forEach((e, y) => {
125
+ if (e.isError && !r.current.has(y)) {
126
+ const B = d[y];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
130
130
  type: "error"
131
- }), r.current.add(h);
132
- } else e.isError || r.current.delete(h);
131
+ }), r.current.add(y);
132
+ } else e.isError || r.current.delete(y);
133
133
  });
134
134
  }, [i, d]);
135
- const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
135
+ const m = g(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = g(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = g(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
137
  isLoading: D,
138
138
  isError: R,
139
139
  refetch: T
140
140
  } = te({
141
141
  queryKey: le(t, p),
142
- queryFn: () => w(t, p),
143
- enabled: !!t && p.length > 0 && y
142
+ queryFn: () => k(t, p),
143
+ enabled: !!t && p.length > 0 && h
144
144
  });
145
- x(
145
+ z(
146
146
  (e) => {
147
147
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
- (h) => p.includes(h)
148
+ (y) => p.includes(y)
149
149
  ) && T();
150
150
  },
151
151
  [t, T]
152
- ), _(() => {
152
+ ), I(() => {
153
153
  R && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
@@ -158,13 +158,13 @@ const C = (a, n, d, l, b, r) => {
158
158
  }, [R]);
159
159
  const f = g(() => {
160
160
  if (!c) return [];
161
- const e = H(c), h = Q(e);
162
- return z(h);
161
+ const e = Q(c), y = x(e);
162
+ return G(y);
163
163
  }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], O = D || !y, I = R && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, K = I ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !O && !I, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], O = D || !h, _ = R && h, L = (!c || c.entry?.length === 0 || p.length === 0) && h, K = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const C = (a, n, d, l, b, r) => {
174
174
  className: $.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- G,
177
+ M,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -191,7 +191,7 @@ const C = (a, n, d, l, b, r) => {
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- j,
194
+ Y,
195
195
  {
196
196
  headers: F,
197
197
  rows: [],
@@ -1,4 +1,4 @@
1
- import { bY as we, bZ as z, b_ as xt, b$ as B, bW as q, bX as y, c0 as Ro, c1 as ye, c2 as R, c3 as _, c4 as k, c5 as N, c6 as A, c7 as bs, c8 as ir, c9 as $e, ca as G, cb as Hn, cc as Vn, cd as dt, ce as D, cf as xs, cg as cn, ch as Be, ci as ws, cj as qt, ck as zt, cl as $s, cm as Cs, cn as $n, co as Ss, cp as Nr, cq as Bt, cr as zo, cs as ks, ct as Es, cu as j, cv as Gr, cw as Ms, cx as Ds, cy as sr, cz as As, cA as Ts, cB as zn, cC as Fs, cD as Is, cE as Z, cF as Ps, cG as Ls } from "./index-CZ8_yvJC.js";
1
+ import { bY as we, bZ as z, b_ as xt, b$ as B, bW as q, bX as y, c0 as Ro, c1 as ye, c2 as R, c3 as _, c4 as k, c5 as N, c6 as A, c7 as bs, c8 as ir, c9 as $e, ca as G, cb as Hn, cc as Vn, cd as dt, ce as D, cf as xs, cg as cn, ch as Be, ci as ws, cj as qt, ck as zt, cl as $s, cm as Cs, cn as $n, co as Ss, cp as Nr, cq as Bt, cr as zo, cs as ks, ct as Es, cu as j, cv as Gr, cw as Ms, cx as Ds, cy as sr, cz as As, cA as Ts, cB as zn, cC as Fs, cD as Is, cE as Z, cF as Ps, cG as Ls } from "./index-Drqj9Ait.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,4 +1,4 @@
1
- import { bT as i, bU as o } from "./index-CZ8_yvJC.js";
1
+ import { bT as i, bU as o } from "./index-Drqj9Ait.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -1,11 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { u as g, J as u, bG as b, bQ as f, bR as p, bS as _, aG as x, bM as N } from "./index-CZ8_yvJC.js";
2
+ import { u as g, J as u, bG as b, bQ as f, bR as p, bS as _, aG as x, bM as N } from "./index-Drqj9Ait.js";
3
3
  import { lazy as h, useMemo as n, Suspense as C } from "react";
4
4
  import "@tanstack/react-query";
5
- import { u as E } from "./hook-DClwnGw8.js";
5
+ import { u as E } from "./hook-YKsGTiIP.js";
6
6
  const L = {
7
7
  "org.bahmni.clinical.v2.search": h(
8
- () => import("./index-BQtavgKZ.js")
8
+ () => import("./index-CtA8Gu0E.js")
9
9
  )
10
10
  }, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", S = "index-module_message__Ib5Iw", t = {
11
11
  page: v,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { u as r, cH as l, cI as o, cJ as c, b6 as m, b7 as g, cK as p, cL as h, cM as b, aG as u } from "./index-CZ8_yvJC.js";
2
+ import { u as r, cH as l, cI as o, cJ as c, b6 as m, b7 as g, cK as p, cL as h, cM as b, aG as u } from "./index-Drqj9Ait.js";
3
3
  import { Suspense as _ } from "react";
4
4
  import "@tanstack/react-query";
5
5
  const $ = "index-module_loading__FAL7n", y = "index-module_message__KjCnF", E = "index-module_panel__j5vTu", s = {