@bahmni/clinical-app 0.0.1-dev.367 → 0.0.1-dev.368

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 { B, z as ENCOUNTER_CONCEPTS_URL, C as Yr, D as Di, F as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, G as Dm, L as pSe, g as gr, N as kH2, P as IH2, T as TH2, Q as gM2, V as rc1, W as AH2, X as vE, Z as Ii, a0 as Id, a1 as iE, a2 as Nd, a3 as Es, a4 as dist, a5 as yt, a6 as ye, a7 as ns, a8 as Ib, a9 as Vb, aa as Hb, ab as BH2, ac as KH2, ad as oV2, K as K1, E as E3, ae as Bb, af as sH2, ag as VH2, ah as pC2, ai as XH2, aj as JH2, O as OYt, ak as w_, al as RH2, am as q_, an as Os, ao as __, ap as iv, aq as Fb, ar as HH2, as as Jb, at as Zb, au as CLINICAL_V2_CONFIG_BASE_URL, av as s_, aw as PE, ax as Qr, ay as t_, az as Cb, aA as cv, aB as Og2, aC as v_, aD as n_, aE as o_, aF as dv, aG as DH2, aH as Sv, aI as Nb, aJ as a_, aK as Kt, aL as jr, aM as yv, aN as vv, J as J0, aO as B_, aP as S_, aQ as A_, H as HYt, aR as iC2, aS as sC2, aT as G_, aU as Y_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as CH2, aZ as mf, a_ as Zn, a$ as oC2, b0 as z_, b1 as K_, b2 as jE, b3 as Pb, b4 as FE, b5 as J_, b6 as an, b7 as N4, b8 as c3, b9 as rC2, ba as Q_, bb as X_, bc as Pi, bd as rs, be as C_, bf as Gb, bg as Tv, bh as uv, bi as lv, bj as av, bk as CDSS_SERVER_CONFIG_URL, bl as IYt, bm as UH2, bn as Jy, bo as L_, bp as x_, bq as $H2, br as ml1, bs as U_, bt as M_, bu as k_, bv as VYt, bw as gYt, bx as HE, by as F_, bz as GH2, bA as rE, bB as BAHMNI_CLINICAL_PATH, bC as bE, bD as H_, bE as qH2, bF as WH2, bG as QE2, bH as zGt, bI as EE, bJ as CYt } from "./index-DET3dQtT.js";
2
+ import { B, y as ENCOUNTER_CONCEPTS_URL, z as Yr, D as Di, C as BAHMNI_USER_LOCATION_COOKIE_NAME, u as useTranslation, F as Dm, G as pSe, g as gr, I as kH2, L as IH2, N as TH2, O as gM2, P as rc1, X as AH2, Z as vE, _ as Ii, a0 as Id, a1 as iE, a2 as Nd, a3 as Es, a4 as dist, a5 as yt, a6 as ye, a7 as ns, a8 as Ib, a9 as Vb, aa as Hb, ab as BH2, ac as KH2, ad as oV2, K as K1, E as E3, ae as Bb, af as sH2, ag as VH2, ah as pC2, ai as XH2, aj as JH2, T as TYt, ak as w_, al as RH2, am as q_, an as Os, ao as __, ap as iv, aq as Fb, ar as HH2, as as Jb, at as Zb, au as CLINICAL_V2_CONFIG_BASE_URL, av as s_, aw as PE, ax as Qr, ay as t_, az as Cb, aA as cv, aB as Og2, aC as v_, aD as n_, aE as o_, aF as dv, aG as DH2, aH as Sv, aI as Nb, aJ as a_, aK as Kt, aL as jr, aM as yv, aN as vv, J as J0, aO as B_, aP as S_, aQ as A_, V as VYt, aR as iC2, aS as sC2, aT as G_, aU as Y_, aV as STOP_REASON_VALUESET_URL, aW as STOP_REASON_VALUESET_EXPAND_URL, aX as STOP_MEDICATION_URL, aY as CH2, aZ as mf, a_ as Zn, a$ as oC2, b0 as z_, b1 as K_, b2 as jE, b3 as Pb, b4 as FE, b5 as J_, b6 as an, b7 as N4, b8 as c3, b9 as rC2, ba as Q_, bb as X_, bc as Pi, bd as rs, be as C_, bf as Gb, bg as Tv, bh as uv, bi as lv, bj as av, bk as CDSS_SERVER_CONFIG_URL, bl as $Yt, bm as UH2, bn as Jy, bo as L_, bp as x_, bq as $H2, br as ml1, bs as U_, bt as M_, bu as k_, bv as yYt, bw as wYt, bx as HE, by as F_, bz as GH2, bA as rE, bB as BAHMNI_CLINICAL_PATH, bC as bE, bD as H_, bE as qH2, bF as WH2, bG as QE2, bH as CGt, bI as EE, bJ as NYt } from "./index-BY927skX.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-CWMbSSog.js";
7
+ import { u as useClinicalConfig } from "./hook-yw3n2ASf.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 : {};
@@ -139626,9 +139626,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139626
139626
  duplicateNotification: duplicateNotification$2
139627
139627
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139628
139628
  const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = gr(), { addNotification: f } = K1(), d = E3(
139629
- OYt.ALLERGIES
139629
+ TYt.ALLERGIES
139630
139630
  ), h = E3(
139631
- OYt.EDIT_ALLERGIES
139631
+ TYt.EDIT_ALLERGIES
139632
139632
  ), [E, C] = useState(""), [R, T] = useState(null), [H, M] = useState(!1), [$, k] = useState(
139633
139633
  null
139634
139634
  ), {
@@ -139951,7 +139951,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
139951
139951
  duplicateNotification: duplicateNotification$1
139952
139952
  }, InvestigationsForm = React__default.memo(() => {
139953
139953
  const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s = E3(
139954
- OYt.INVESTIGATIONS
139954
+ TYt.INVESTIGATIONS
139955
139955
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), { activeEncounter: T, matchReasons: H } = q_(), $ = H.includes("MATCHED") ? T?.id : void 0, {
139956
139956
  data: k,
139957
139957
  refetch: I,
@@ -140364,7 +140364,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140364
140364
  duplicateNotification
140365
140365
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140366
140366
  const { t: p } = useTranslation(), c = gr(), { addNotification: a } = K1(), s = E3(
140367
- OYt.CONDITIONS_AND_DIAGNOSES
140367
+ TYt.CONDITIONS_AND_DIAGNOSES
140368
140368
  ), [f, d] = useState(""), [h, E] = useState(null), [C, R] = useState(!1), {
140369
140369
  selectedDiagnoses: T,
140370
140370
  selectedConditions: H,
@@ -143319,7 +143319,7 @@ function useSubmittedEncounterForms(p) {
143319
143319
  ), useMemo(() => {
143320
143320
  const C = d?.entry?.map((T) => T.resource).filter((T) => T?.resourceType === "Observation") ?? [], R = /* @__PURE__ */ new Set();
143321
143321
  for (const T of C) {
143322
- const H = HYt(T);
143322
+ const H = VYt(T);
143323
143323
  if (!H) continue;
143324
143324
  const M = p.find(($) => $.name === H);
143325
143325
  M && R.add(M.uuid);
@@ -143344,7 +143344,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143344
143344
  submittedFormUuids: R = EMPTY_SET
143345
143345
  }) => {
143346
143346
  const { t: T } = useTranslation(), H = E3(
143347
- OYt.OBSERVATIONS
143347
+ TYt.OBSERVATIONS
143348
143348
  ), [M, $] = useState(""), [k, I] = useState(null), { getFormData: S } = useObservationFormsStore(), z = useMemo(() => {
143349
143349
  if (!M.trim()) return h;
143350
143350
  const ee = M.toLowerCase().trim().split(/\s+/);
@@ -144921,7 +144921,7 @@ const ConsultationPad = ({
144921
144921
  visitUuids: f
144922
144922
  }) => {
144923
144923
  const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: C } = q_(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), M = h.includes("MATCHED") ? C?.id ?? null : null, $ = (I, S, z) => {
144924
- const O = IYt(I.type);
144924
+ const O = $Yt(I.type);
144925
144925
  if (!O)
144926
144926
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: I.type }) }) }, `${I.type}-${S}`);
144927
144927
  const Z = S < z - 1;
@@ -145115,7 +145115,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145115
145115
  }) => {
145116
145116
  const { t: s } = useTranslation();
145117
145117
  return E3(
145118
- OYt.ENCOUNTER
145118
+ TYt.ENCOUNTER
145119
145119
  ) ? a ? /* @__PURE__ */ jsx(
145120
145120
  $H2,
145121
145121
  {
@@ -145194,7 +145194,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145194
145194
  "data-active-encounter-uuid": T && H?.id ? H.id : void 0,
145195
145195
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145196
145196
  children: [
145197
- /* @__PURE__ */ jsx(VYt, {}),
145197
+ /* @__PURE__ */ jsx(yYt, {}),
145198
145198
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145199
145199
  /* @__PURE__ */ jsx(
145200
145200
  ConsultationActionButton,
@@ -145205,7 +145205,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145205
145205
  }
145206
145206
  ),
145207
145207
  /* @__PURE__ */ jsx(
145208
- gYt,
145208
+ wYt,
145209
145209
  {
145210
145210
  printOptions: c,
145211
145211
  renderContext: Z,
@@ -145549,7 +145549,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145549
145549
  const re = () => {
145550
145550
  const ae = H.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
145551
145551
  return ae && c.contextInformation?.program ? /* @__PURE__ */ jsx(
145552
- CYt,
145552
+ NYt,
145553
145553
  {
145554
145554
  programUUID: ae,
145555
145555
  config: {
@@ -145568,7 +145568,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145568
145568
  {
145569
145569
  breadcrumbItems: O,
145570
145570
  globalActions: k,
145571
- userMenu: /* @__PURE__ */ jsx(zGt, {}),
145571
+ userMenu: /* @__PURE__ */ jsx(CGt, {}),
145572
145572
  sideNavItems: te,
145573
145573
  activeSideNavItemId: ee,
145574
145574
  onSideNavItemClick: le,
@@ -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 Y, K as W, w as J, a as X, b as Z, U as ee, p as te } from "./index-DET3dQtT.js";
2
+ import { g as G, u as Y, K as W, m as J, w as X, a as Z, U as ee, p as te } from "./index-BY927skX.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 = {
@@ -34,14 +34,14 @@ const Te = [
34
34
  "uploadedOn",
35
35
  "uploadedBy"
36
36
  ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
37
- const [s, S] = l(!1), [o, U] = l(
37
+ const [s, w] = l(!1), [o, U] = l(
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
41
  ), E = G(), { t: n } = Y(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = h((e) => {
42
- U(e), S(!0);
42
+ U(e), w(!0);
43
43
  }, []), H = h(() => {
44
- S(!1), U(null), O(/* @__PURE__ */ new Set());
44
+ w(!1), U(null), O(/* @__PURE__ */ new Set());
45
45
  }, []), v = h((e) => {
46
46
  O((t) => new Set(t).add(e));
47
47
  }, []), { data: i, isLoading: q, isError: b, error: y } = ae({
@@ -76,9 +76,9 @@ const Te = [
76
76
  if (!s || !o) return;
77
77
  const t = /* @__PURE__ */ new Set(), m = B(o);
78
78
  for (let c = 0; c < m.length; c++) {
79
- const w = R(m[c].url);
79
+ const S = R(m[c].url);
80
80
  try {
81
- (await fetch(w, {
81
+ (await fetch(S, {
82
82
  method: "HEAD",
83
83
  signal: e.signal
84
84
  })).ok || t.add(c);
@@ -169,7 +169,7 @@ const Te = [
169
169
  size: "lg",
170
170
  testId: "document-view-modal",
171
171
  children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
172
- const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), D = $.has(t);
172
+ const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), D = $.has(t);
173
173
  return m === "#" || D ? /* @__PURE__ */ p(
174
174
  "div",
175
175
  {
@@ -196,7 +196,7 @@ const Te = [
196
196
  "/",
197
197
  T.length
198
198
  ] }),
199
- w ? /* @__PURE__ */ r(
199
+ S ? /* @__PURE__ */ r(
200
200
  "img",
201
201
  {
202
202
  src: m,
@@ -1,34 +1,34 @@
1
- import { jsx as i, jsxs as z, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, g as pe, E as be, J as Oe, c as Ne, m as Te, h as Ee, f as Ie, e as Ae, d as _e, R as ve, H as Se, s as K, b as Fe, i as x, t as P, a as Re, U as G, S as Ue, $ as Ce, p as Be, Y as Le, O as De } from "./index-DET3dQtT.js";
3
- import { useQueryClient as Me, useQuery as N } from "@tanstack/react-query";
4
- import { useState as Q, useMemo as d, useCallback as l } from "react";
5
- const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
1
+ import { jsx as i, jsxs as z, Fragment as ge } from "react/jsx-runtime";
2
+ import { u as he, g as pe, E as be, J as Ne, b as Oe, f as Te, d as Ee, c as Ie, Q as Ae, e as _e, R as ve, V as Se, s as K, a as Fe, h as Q, t as x, w as Re, U as P, S as Ue, $ as Ce, p as Be, Y as Le, T as Me } from "./index-BY927skX.js";
3
+ import { useQueryClient as De, useQuery as O } from "@tanstack/react-query";
4
+ import { useState as G, useMemo as d, useCallback as l } from "react";
5
+ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", T = {
6
6
  formsTableBody: ke,
7
- modalHeading: qe,
8
- customAccordianItem: we
9
- }, He = "startConsultation", ze = ({
7
+ modalHeading: we,
8
+ customAccordianItem: qe
9
+ }, Ve = "startConsultation", ze = ({
10
10
  episodeOfCareUuids: R,
11
11
  encounterUuids: u,
12
12
  config: J,
13
13
  disableActions: X = !1,
14
- activeEncounterUuid: y = null
14
+ activeEncounterUuid: g = null
15
15
  }) => {
16
- const { t: n } = ge(), c = pe(), [g, U] = Q(!1), [s, C] = Q(null), {
16
+ const { t: n } = he(), c = pe(), [h, U] = G(!1), [s, C] = G(null), {
17
17
  numberOfVisits: Z,
18
18
  hideThumbnail: W = !1,
19
19
  forms: p
20
20
  } = J ?? {}, ee = be(
21
- De.EDIT_OBSERVATIONS
22
- ), { userPrivileges: b } = Oe(), E = ee && !X && !!y, B = Ne(
21
+ Me.EDIT_OBSERVATIONS
22
+ ), { userPrivileges: b } = Ne(), E = ee && !X && !!g, B = Oe(
23
23
  R,
24
24
  u
25
- ), re = Me(), {
25
+ ), re = De(), {
26
26
  data: L = [],
27
- isLoading: D,
28
- isError: M,
27
+ isLoading: M,
28
+ isError: D,
29
29
  error: oe,
30
30
  refetch: ae
31
- } = N({
31
+ } = O({
32
32
  queryKey: ["forms", c, R],
33
33
  queryFn: () => Te(c, void 0, Z),
34
34
  enabled: !!c && !B
@@ -39,12 +39,12 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
39
39
  )), Array.isArray(p) && p.length > 0 && (e = e.filter(
40
40
  (r) => p.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [L, u, p]), { data: O = [] } = N({
42
+ }, [L, u, p]), { data: N = [] } = O({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ee()
45
- }), q = l(
45
+ }), w = l(
46
46
  (e) => {
47
- const r = O.find((a) => a.name === e);
47
+ const r = N.find((a) => a.name === e);
48
48
  if (!r?.privileges || r.privileges.length === 0) return !0;
49
49
  if (!b || b.length === 0) return !1;
50
50
  const o = new Set(b.map((a) => a.name));
@@ -52,34 +52,34 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
52
52
  (a) => o.has(a.privilegeName) && a.editable
53
53
  );
54
54
  },
55
- [O, b]
55
+ [N, b]
56
56
  ), f = l(
57
- (e) => !y || e.encounterUuid !== y ? !1 : q(e.formName),
58
- [y, q]
59
- ), w = l(
60
- (e) => O.find((r) => r.name === e)?.uuid,
61
- [O]
57
+ (e) => !g || e.encounterUuid !== g ? !1 : w(e.formName),
58
+ [g, w]
59
+ ), q = l(
60
+ (e) => N.find((r) => r.name === e)?.uuid,
61
+ [N]
62
62
  ), I = d(() => {
63
63
  if (s)
64
- return w(s.formName);
65
- }, [s, w]), {
64
+ return q(s.formName);
65
+ }, [s, q]), {
66
66
  data: m,
67
67
  isLoading: te,
68
68
  isError: se,
69
69
  error: A
70
- } = N({
70
+ } = O({
71
71
  queryKey: ["formMetadata", I],
72
72
  queryFn: () => Ie(I),
73
- enabled: !!I && g
73
+ enabled: !!I && h
74
74
  }), {
75
75
  data: _,
76
76
  isLoading: ne,
77
77
  isError: ie,
78
78
  error: v
79
- } = N({
79
+ } = O({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
81
  queryFn: () => Ae(s.encounterUuid),
82
- enabled: !!s?.encounterUuid && g
82
+ enabled: !!s?.encounterUuid && h
83
83
  });
84
84
  _e(
85
85
  (e) => {
@@ -117,25 +117,25 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
117
117
  return K(A).message;
118
118
  if (v)
119
119
  return K(v).message;
120
- }, [A, v]), h = d(
120
+ }, [A, v]), y = d(
121
121
  () => [
122
122
  { key: "recordedOn", header: n("RECORDED_ON") },
123
123
  { key: "recordedBy", header: n("RECORDED_BY") }
124
124
  ],
125
125
  [n]
126
- ), H = d(
127
- () => [...h, { key: "actions", header: n("ACTIONS") }],
128
- [h, n]
126
+ ), V = d(
127
+ () => [...y, { key: "actions", header: n("ACTIONS") }],
128
+ [y, n]
129
129
  ), ce = l(
130
- (e) => E && e.some((r) => f(r)) ? H : h,
131
- [E, f, H, h]
132
- ), fe = h, he = d(
130
+ (e) => E && e.some((r) => f(r)) ? V : y,
131
+ [E, f, V, y]
132
+ ), fe = y, ye = d(
133
133
  () => [
134
134
  { key: "recordedOn", sortable: !0 },
135
135
  { key: "recordedBy", sortable: !0 }
136
136
  ],
137
137
  []
138
- ), V = d(() => {
138
+ ), H = d(() => {
139
139
  const e = k.reduce(
140
140
  (r, o) => {
141
141
  const a = o.formName;
@@ -166,7 +166,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
166
166
  U(!1), C(null);
167
167
  }, []), S = l((e) => {
168
168
  globalThis.dispatchEvent(
169
- new CustomEvent(He, {
169
+ new CustomEvent(Ve, {
170
170
  detail: {
171
171
  editOnly: "observationForms",
172
172
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -185,14 +185,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
185
185
  return e.recordedBy;
186
186
  case "actions":
187
187
  return f(e) ? /* @__PURE__ */ i(
188
- x,
188
+ Q,
189
189
  {
190
190
  label: n("EDIT_OBSERVATION_FORM"),
191
191
  kind: "ghost",
192
192
  size: "sm",
193
193
  testId: `edit-form-${e.encounterUuid}`,
194
194
  onClick: () => S(e),
195
- children: /* @__PURE__ */ i(P, {})
195
+ children: /* @__PURE__ */ i(x, {})
196
196
  }
197
197
  ) : null;
198
198
  default:
@@ -201,21 +201,21 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
201
201
  },
202
202
  [$, S, f, n]
203
203
  );
204
- return /* @__PURE__ */ z(ye, { children: [
205
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: D || M || V.length === 0 || B ? /* @__PURE__ */ i(
206
- G,
204
+ return /* @__PURE__ */ z(ge, { children: [
205
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: M || D || H.length === 0 || B ? /* @__PURE__ */ i(
206
+ P,
207
207
  {
208
208
  headers: fe,
209
209
  ariaLabel: n("FORMS_HEADING"),
210
210
  rows: [],
211
- loading: D,
212
- errorStateMessage: M ? oe?.message : void 0,
211
+ loading: M,
212
+ errorStateMessage: D ? oe?.message : void 0,
213
213
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
214
214
  renderCell: j,
215
215
  className: T.formsTableBody,
216
216
  dataTestId: "forms-table"
217
217
  }
218
- ) : /* @__PURE__ */ i(Ue, { align: "start", children: V.map((e, r) => {
218
+ ) : /* @__PURE__ */ i(Ue, { align: "start", children: H.map((e, r) => {
219
219
  const { formName: o, records: a } = e, t = ce(a);
220
220
  return /* @__PURE__ */ i(
221
221
  Ce,
@@ -225,14 +225,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
225
225
  testId: `accordian-title-${o}`,
226
226
  open: r === 0,
227
227
  children: /* @__PURE__ */ i(
228
- G,
228
+ P,
229
229
  {
230
230
  headers: t,
231
231
  ariaLabel: n("FORMS_HEADING"),
232
232
  rows: a,
233
233
  loading: !1,
234
234
  errorStateMessage: "",
235
- sortable: he,
235
+ sortable: ye,
236
236
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
237
237
  renderCell: j,
238
238
  className: T.formsTableBody,
@@ -243,17 +243,17 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
243
243
  o
244
244
  );
245
245
  }) }) }),
246
- g && s && /* @__PURE__ */ i(
246
+ h && s && /* @__PURE__ */ i(
247
247
  Be,
248
248
  {
249
249
  id: "modalIdForActionAreaLayout",
250
250
  portalId: "main-display-area",
251
- open: g,
251
+ open: h,
252
252
  onRequestClose: Y,
253
253
  modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
254
254
  /* @__PURE__ */ i("span", { children: s.formName }),
255
255
  E && f(s) && /* @__PURE__ */ i(
256
- x,
256
+ Q,
257
257
  {
258
258
  label: n("EDIT_OBSERVATION_FORM"),
259
259
  kind: "ghost",
@@ -262,7 +262,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
262
262
  onClick: () => {
263
263
  Y(), S(s);
264
264
  },
265
- children: /* @__PURE__ */ i(P, {})
265
+ children: /* @__PURE__ */ i(x, {})
266
266
  }
267
267
  )
268
268
  ] }),
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-AgEWaI9q.js";
2
- import { bN as d, bO as f, bP as e } from "./index-DET3dQtT.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-D4QUzxh4.js";
2
+ import { bN as d, bO as f, bP as e } from "./index-BY927skX.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-AgEWaI9q.js";
2
- import { bN as v, bO as C, bP as e } from "./index-DET3dQtT.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-D4QUzxh4.js";
2
+ import { bN as v, bO as C, bP as e } from "./index-BY927skX.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 S, jsx as u } from "react/jsx-runtime";
2
- import { g as B, K as V, u as N, j as M, k, d as x, x as Q, A as G, _ as j, l as w, U as H, M as z, q as A, n as P, v as J, I as W, o as X, r as Z, y as ee } from "./index-DET3dQtT.js";
2
+ import { g as V, K as q, u as N, i as M, j as k, e as x, k as H, x as Q, A as G, l as j, U as w, H as z, W as A, M as P, v as W, n as J, o as X, q as Z, r as ee } from "./index-BY927skX.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as $, useMemo as E } from "react";
4
+ import { useRef as se, useEffect as _, useMemo as E } from "react";
5
5
  const D = (a, n, d, l, b, r) => {
6
- const t = P(a, n, b), s = t.value, o = J(s);
6
+ const t = P(a, n, b), s = t.value, o = W(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
9
  X,
@@ -25,7 +25,7 @@ const D = (a, n, d, l, b, r) => {
25
25
  provider: t.provider
26
26
  }), p = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${p}-${d}-${n}` : `${v}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- W,
28
+ J,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -113,20 +113,20 @@ const D = (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 } = V(), { t: o } = N(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => M(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- $(() => {
123
+ _(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const q = d[h];
126
+ const B = d[h];
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
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -149,7 +149,7 @@ const D = (a, n, d, l, b, r) => {
149
149
  ) && g();
150
150
  },
151
151
  [t, g]
152
- ), $(() => {
152
+ ), _(() => {
153
153
  T && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
@@ -158,13 +158,13 @@ const D = (a, n, d, l, b, r) => {
158
158
  }, [T]);
159
159
  const O = E(() => {
160
160
  if (!c) return [];
161
- const e = Q(c), h = G(e);
162
- return j(h);
161
+ const e = H(c), h = Q(e);
162
+ return G(h);
163
163
  }, [c]), L = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], _ = F || !v, f = T && v, U = (!c || c.entry?.length === 0 || p.length === 0) && v, C = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, Y = O.length > 0 && !_ && !f, R = n.titleTranslationKey, y = R ? o(R) : "";
167
+ ], $ = F || !v, f = T && v, U = (!c || c.entry?.length === 0 || p.length === 0) && v, C = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, Y = O.length > 0 && !$ && !f, R = n.titleTranslationKey, y = R ? o(R) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const D = (a, n, d, l, b, r) => {
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- w,
177
+ j,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: R ? `observations-title-${y}` : "observations-title",
@@ -191,12 +191,12 @@ const D = (a, n, d, l, b, r) => {
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- H,
194
+ w,
195
195
  {
196
196
  headers: L,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: _,
199
+ loading: $,
200
200
  errorStateMessage: C,
201
201
  emptyStateMessage: K,
202
202
  dataTestId: "observations-table"
@@ -1,4 +1,4 @@
1
- import { bQ as we, bR as z, bS as xt, bT as B, bO as q, bP as y, bU as Ro, bV as ye, bW as R, bX as _, bY as k, bZ as N, b_ as A, b$ as bs, c0 as ir, c1 as $e, c2 as U, c3 as Hn, c4 as Vn, c5 as dt, c6 as D, c7 as xs, c8 as cn, c9 as Be, ca as ws, cb as qt, cc as zt, cd as $s, ce as Cs, cf as $n, cg as Ss, ch as Nr, ci as Bt, cj as zo, ck as ks, cl as Es, cm as j, cn as Ur, co as Ms, cp as Ds, cq as sr, cr as As, cs as Ts, ct as zn, cu as Fs, cv as Is, cw as Z, cx as Ps, cy as Os } from "./index-DET3dQtT.js";
1
+ import { bQ as we, bR as z, bS as xt, bT as B, bO as q, bP as y, bU as Ro, bV as ye, bW as R, bX as _, bY as k, bZ as N, b_ as A, b$ as bs, c0 as ir, c1 as $e, c2 as U, c3 as Hn, c4 as Vn, c5 as dt, c6 as D, c7 as xs, c8 as cn, c9 as Be, ca as ws, cb as qt, cc as zt, cd as $s, ce as Cs, cf as $n, cg as Ss, ch as Nr, ci as Bt, cj as zo, ck as ks, cl as Es, cm as j, cn as Ur, co as Ms, cp as Ds, cq as sr, cr as As, cs as Ts, ct as zn, cu as Fs, cv as Is, cw as Z, cx as Ps, cy as Os } from "./index-BY927skX.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,4 +1,4 @@
1
- import { bL as i, bM as o } from "./index-DET3dQtT.js";
1
+ import { bL as i, bM as o } from "./index-BY927skX.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";