@bahmni/clinical-app 0.0.1-dev.424 → 0.0.1-dev.426

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,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { g as x, u as G, z as W, H as J, q as X, w as Z, Y as ee, p as te } from "./index-Bue3rusE.js";
2
+ import { g as x, u as G, z as W, q as J, K as X, w as Z, Y as ee, p as te } from "./index-DtI3QOMb.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 = {
@@ -38,13 +38,13 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, H] = l(k), [V, A] = l(void 0), M = h((e) => {
41
+ ), E = x(), { t: n } = G(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [q, A] = l(void 0), M = h((e) => {
42
42
  U(e), w(!0);
43
- }, []), q = h(() => {
43
+ }, []), F = h(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
45
45
  }, []), v = h((e) => {
46
46
  O((t) => new Set(t).add(e));
47
- }, []), { data: i, isLoading: F, isError: y, error: b } = ae({
47
+ }, []), { data: i, isLoading: H, isError: y, error: b } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  E,
@@ -91,13 +91,13 @@ const Te = [
91
91
  }, [s, o]);
92
92
  const z = h(
93
93
  (e, t) => {
94
- t !== u ? (H(t), C(1), A(void 0)) : C(e);
94
+ t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
97
  ), N = _(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), j = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = _(() => ie(N, n), [N, n]), K = _(
100
+ ), K = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = _(() => ie(N, n), [N, n]), P = _(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -141,18 +141,18 @@ const Te = [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
144
- headers: P,
144
+ headers: j,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: j,
147
- loading: F,
146
+ rows: K,
147
+ loading: H,
148
148
  errorStateMessage: y ? b?.message : null,
149
- sortable: K,
149
+ sortable: P,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
151
  renderCell: Q,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
- totalItems: V,
155
+ totalItems: q,
156
156
  page: f,
157
157
  onPageChange: z
158
158
  }
@@ -163,7 +163,7 @@ const Te = [
163
163
  id: "modalIdForActionAreaLayout",
164
164
  portalId: "main-display-area",
165
165
  open: s,
166
- onRequestClose: q,
166
+ onRequestClose: F,
167
167
  modalHeading: o.documentIdentifier,
168
168
  passiveModal: !0,
169
169
  size: "lg",
@@ -0,0 +1,252 @@
1
+ import { jsx as n, jsxs as V, Fragment as ne } from "react/jsx-runtime";
2
+ import { u as ie, g as de, h as le, Z as me, y as ue, W as ce, e as fe, a as ye, m as ge, f as he, $ as pe, R as Ne, w as Te, C as q, H as $, K as Oe, Y as K, F as Ie, j as be, p as Ee, v as _e, d as Ae } from "./index-DtI3QOMb.js";
3
+ import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
+ import { useState as j, useMemo as i, useCallback as d } from "react";
5
+ const Ce = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", p = {
6
+ formsTableBody: Ce,
7
+ modalHeading: Fe,
8
+ customAccordianItem: Re
9
+ }, Le = "startConsultation", Me = ({
10
+ episodeOfCareUuids: _,
11
+ encounterUuids: l,
12
+ config: x,
13
+ disableActions: z = !1,
14
+ activeEncounterUuid: y = null
15
+ }) => {
16
+ const { t: o } = ie(), m = de(), [N, A] = j(!1), [t, v] = j(null), {
17
+ numberOfVisits: G,
18
+ hideThumbnail: Q = !1,
19
+ forms: g
20
+ } = x ?? {}, Y = le(
21
+ Ae.EDIT_OBSERVATIONS
22
+ ), { userPrivileges: h } = me(), T = Y && !z && !!y, C = ue(
23
+ _,
24
+ l
25
+ ), W = ve(), {
26
+ data: F = [],
27
+ isLoading: R,
28
+ isError: L,
29
+ error: Z,
30
+ refetch: P
31
+ } = E({
32
+ queryKey: ["forms", m, _],
33
+ queryFn: () => ce(m, void 0, G),
34
+ enabled: !!m && !C
35
+ }), B = i(() => {
36
+ let e = F;
37
+ return l && l.length > 0 && (e = e.filter(
38
+ (r) => l.includes(r.encounterUuid)
39
+ )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
+ (r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
+ )), e;
42
+ }, [F, l, g]), { data: U = [] } = E({
43
+ queryKey: ["observationForms"],
44
+ queryFn: () => fe()
45
+ }), D = d(
46
+ (e) => {
47
+ const r = U.find(
48
+ (s) => s.name.toLowerCase() === e.toLowerCase()
49
+ );
50
+ if (!r?.privileges || r.privileges.length === 0) return !0;
51
+ if (!h || h.length === 0) return !1;
52
+ const a = new Set(h.map((s) => s.name));
53
+ return r.privileges.some(
54
+ (s) => a.has(s.privilegeName) && s.editable
55
+ );
56
+ },
57
+ [U, h]
58
+ ), u = d(
59
+ (e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
60
+ [y, D]
61
+ ), {
62
+ data: O,
63
+ isLoading: J,
64
+ isError: X,
65
+ error: I
66
+ } = E({
67
+ queryKey: ["formsEncounterFHIR", t?.encounterUuid],
68
+ queryFn: () => ye(t.encounterUuid),
69
+ enabled: !!t?.encounterUuid && N
70
+ });
71
+ ge(
72
+ (e) => {
73
+ e.patientUUID === m && (P(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
74
+ },
75
+ [m]
76
+ );
77
+ const ee = i(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? pe(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [O, t?.formName]), re = i(() => {
78
+ if (I)
79
+ return Ne(I).message;
80
+ }, [I]), c = i(
81
+ () => [
82
+ { key: "recordedOn", header: o("RECORDED_ON") },
83
+ { key: "recordedBy", header: o("RECORDED_BY") }
84
+ ],
85
+ [o]
86
+ ), S = i(
87
+ () => [...c, { key: "actions", header: o("ACTIONS") }],
88
+ [c, o]
89
+ ), ae = d(
90
+ (e) => T && e.some((r) => u(r)) ? S : c,
91
+ [T, u, S, c]
92
+ ), oe = c, te = i(
93
+ () => [
94
+ { key: "recordedOn", sortable: !0 },
95
+ { key: "recordedBy", sortable: !0 }
96
+ ],
97
+ []
98
+ ), M = i(() => {
99
+ const e = B.reduce(
100
+ (r, a) => {
101
+ const s = a.formName;
102
+ r[s] ??= [];
103
+ const f = a.providers.map((se) => se.providerName).filter(Boolean).join(", ");
104
+ return r[s].push({
105
+ id: a.encounterUuid,
106
+ formName: a.formName,
107
+ recordedOn: Te(a.encounterDateTime, o, !0).formattedResult,
108
+ recordedBy: f ?? "--",
109
+ encounterDateTime: a.encounterDateTime,
110
+ encounterUuid: a.encounterUuid
111
+ }), r;
112
+ },
113
+ {}
114
+ );
115
+ return Object.entries(e).map(
116
+ ([r, a]) => ({
117
+ formName: r,
118
+ records: a.sort(
119
+ (s, f) => f.encounterDateTime - s.encounterDateTime
120
+ )
121
+ })
122
+ ).sort((r, a) => r.formName.localeCompare(a.formName));
123
+ }, [B, o]), w = d((e) => {
124
+ v(e), A(!0);
125
+ }, []), k = d(() => {
126
+ A(!1), v(null);
127
+ }, []), b = d((e) => {
128
+ globalThis.dispatchEvent(
129
+ new CustomEvent(Le, {
130
+ detail: {
131
+ editOnly: "observationForms",
132
+ editTitle: "EDIT_OBSERVATION_FORM_TITLE",
133
+ sourceEncounterUuid: e.encounterUuid,
134
+ formName: e.formName,
135
+ directFormMode: !0
136
+ }
137
+ })
138
+ );
139
+ }, []), H = d(
140
+ (e, r) => {
141
+ switch (r) {
142
+ case "recordedOn":
143
+ return /* @__PURE__ */ n(Oe, { onClick: () => w(e), children: e.recordedOn });
144
+ case "recordedBy":
145
+ return e.recordedBy;
146
+ case "actions":
147
+ return u(e) ? /* @__PURE__ */ n(
148
+ q,
149
+ {
150
+ label: o("EDIT_OBSERVATION_FORM"),
151
+ kind: "ghost",
152
+ size: "sm",
153
+ testId: `edit-form-${e.encounterUuid}`,
154
+ onClick: () => b(e),
155
+ children: /* @__PURE__ */ n($, {})
156
+ }
157
+ ) : null;
158
+ default:
159
+ return null;
160
+ }
161
+ },
162
+ [w, b, u, o]
163
+ );
164
+ return /* @__PURE__ */ V(ne, { children: [
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || L || M.length === 0 || C ? /* @__PURE__ */ n(
166
+ K,
167
+ {
168
+ headers: oe,
169
+ ariaLabel: o("FORMS_HEADING"),
170
+ rows: [],
171
+ loading: R,
172
+ errorStateMessage: L ? Z?.message : void 0,
173
+ emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
+ renderCell: H,
175
+ className: p.formsTableBody,
176
+ dataTestId: "forms-table"
177
+ }
178
+ ) : /* @__PURE__ */ n(Ie, { align: "start", children: M.map((e, r) => {
179
+ const { formName: a, records: s } = e, f = ae(s);
180
+ return /* @__PURE__ */ n(
181
+ be,
182
+ {
183
+ title: a,
184
+ className: p.customAccordianItem,
185
+ testId: `accordian-title-${a}`,
186
+ open: r === 0,
187
+ children: /* @__PURE__ */ n(
188
+ K,
189
+ {
190
+ headers: f,
191
+ ariaLabel: o("FORMS_HEADING"),
192
+ rows: s,
193
+ loading: !1,
194
+ errorStateMessage: "",
195
+ sortable: te,
196
+ emptyStateMessage: o("FORMS_UNAVAILABLE"),
197
+ renderCell: H,
198
+ className: p.formsTableBody,
199
+ dataTestId: `forms-table-${a}`
200
+ }
201
+ )
202
+ },
203
+ a
204
+ );
205
+ }) }) }),
206
+ N && t && /* @__PURE__ */ n(
207
+ Ee,
208
+ {
209
+ id: "modalIdForActionAreaLayout",
210
+ portalId: "main-display-area",
211
+ open: N,
212
+ onRequestClose: k,
213
+ modalHeading: /* @__PURE__ */ V("div", { className: p.modalHeading, children: [
214
+ /* @__PURE__ */ n("span", { children: t.formName }),
215
+ T && u(t) && /* @__PURE__ */ n(
216
+ q,
217
+ {
218
+ label: o("EDIT_OBSERVATION_FORM"),
219
+ kind: "ghost",
220
+ size: "sm",
221
+ testId: `edit-form-modal-${t.encounterUuid}`,
222
+ onClick: () => {
223
+ k(), b(t);
224
+ },
225
+ children: /* @__PURE__ */ n($, {})
226
+ }
227
+ )
228
+ ] }),
229
+ modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
230
+ passiveModal: !0,
231
+ size: "md",
232
+ testId: "form-details-modal",
233
+ children: /* @__PURE__ */ n(
234
+ _e,
235
+ {
236
+ observations: ee,
237
+ isLoading: J,
238
+ isError: X,
239
+ errorMessage: re,
240
+ emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
241
+ testIdPrefix: t.formName,
242
+ hideThumbnail: Q,
243
+ formName: t.formName
244
+ }
245
+ )
246
+ }
247
+ )
248
+ ] });
249
+ };
250
+ export {
251
+ Me as default
252
+ };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BYjtWbOU.js";
2
- import { b$ as d, c0 as f, c1 as e } from "./index-Bue3rusE.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BieTnFCg.js";
2
+ import { bZ as d, b_ as f, b$ as e } from "./index-DtI3QOMb.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-BYjtWbOU.js";
2
- import { b$ as v, c0 as C, c1 as e } from "./index-Bue3rusE.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-BieTnFCg.js";
2
+ import { bZ as v, b_ as C, b$ as e } from "./index-DtI3QOMb.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -0,0 +1,246 @@
1
+ import { jsxs as S, jsx as o } from "react/jsx-runtime";
2
+ import { g as x, z as M, u as U, b as j, y as G, U as H, c as Y, m as J, t as P, o as W, r as X, n as Z, i as ee, Y as ae, Q as se, k as V, l as re, s as te, w as ie, x as ne, A as oe, S as de, D as le } from "./index-DtI3QOMb.js";
3
+ import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
4
+ import { useRef as me, useEffect as L, useMemo as E } from "react";
5
+ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
+ observations: pe,
7
+ title: be,
8
+ wrapper: he,
9
+ secondary: ve
10
+ }, B = (s, l, n, d, u, r) => {
11
+ const t = re(s, l, u), e = t.value, m = te(e);
12
+ let i = e;
13
+ m === "Image" && (i = /* @__PURE__ */ o(
14
+ oe,
15
+ {
16
+ imageSrc: e,
17
+ alt: e,
18
+ id: `${e}-img`,
19
+ hideThumbnail: r
20
+ }
21
+ )), m === "Video" && (i = /* @__PURE__ */ o(
22
+ de,
23
+ {
24
+ id: `${e}-video`,
25
+ videoSrc: e,
26
+ hideThumbnail: r
27
+ }
28
+ )), m === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
29
+ const p = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
30
+ /* @__PURE__ */ o("span", { children: t.header.display }),
31
+ t.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: t.header.referenceRange })
32
+ ] }), c = u("OBSERVATIONS_RECORDED_BY", {
33
+ provider: t.provider
34
+ }), b = s.effectiveDateTime ? ie(s.effectiveDateTime, u, !0).formattedResult : void 0, f = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
35
+ /* @__PURE__ */ o("span", { children: c }),
36
+ b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
37
+ ] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
38
+ return /* @__PURE__ */ o(
39
+ ne,
40
+ {
41
+ header: p,
42
+ value: i,
43
+ info: f,
44
+ id: R,
45
+ testId: R,
46
+ ariaLabel: R
47
+ },
48
+ `obs-${s.id}`
49
+ );
50
+ }, ye = (s, l, n, d, u, r, t) => /* @__PURE__ */ o(
51
+ V,
52
+ {
53
+ title: s.display,
54
+ id: `grouped-obs-${s.display}-${d}`,
55
+ open: n,
56
+ children: s.members?.map(
57
+ (e, m) => B(
58
+ e,
59
+ m,
60
+ u,
61
+ r,
62
+ l,
63
+ t
64
+ )
65
+ )
66
+ },
67
+ `grouped-obs-${s.id}`
68
+ ), Oe = ({
69
+ groupedData: s,
70
+ title: l = "",
71
+ hideThumbnail: n
72
+ }) => {
73
+ const { t: d } = U(), u = (r, t, e) => {
74
+ const m = se(r.encounterDetails, d);
75
+ return /* @__PURE__ */ S(
76
+ V,
77
+ {
78
+ title: m,
79
+ id: `encounter-${r.encounterId}`,
80
+ open: t,
81
+ children: [
82
+ r.observations.map(
83
+ (i, p) => B(
84
+ i,
85
+ p,
86
+ e,
87
+ l,
88
+ d,
89
+ n
90
+ )
91
+ ),
92
+ r.groupedObservations.map(
93
+ (i, p) => ye(
94
+ i,
95
+ d,
96
+ t,
97
+ p,
98
+ e,
99
+ l,
100
+ n
101
+ )
102
+ )
103
+ ]
104
+ },
105
+ `encounter-${r.encounterId}`
106
+ );
107
+ };
108
+ return /* @__PURE__ */ o(
109
+ "div",
110
+ {
111
+ id: "obs-by-encounter",
112
+ "data-testid": "obs-by-encounter-test-id",
113
+ "aria-label": "obs-by-encounter-aria-label",
114
+ children: s.map(
115
+ (r, t) => u(r, t === 0, t)
116
+ )
117
+ }
118
+ );
119
+ }, Re = (s) => ["conceptUuid", s], _e = (s, l, n, d) => [
120
+ "observations",
121
+ s,
122
+ ...l,
123
+ n,
124
+ d
125
+ ], Se = ({
126
+ config: s,
127
+ episodeOfCareUuids: l,
128
+ encounterUuids: n
129
+ }) => {
130
+ const d = s, {
131
+ conceptNames: u = [],
132
+ conceptUuid: r = [],
133
+ hideThumbnail: t = !1,
134
+ scope: e = "all"
135
+ } = d, m = me(/* @__PURE__ */ new Set()), i = x(), { addNotification: p } = M(), { t: c } = U(), b = ce({
136
+ queries: u.map((a) => ({
137
+ queryKey: Re(a),
138
+ queryFn: () => j(a),
139
+ enabled: !!a
140
+ }))
141
+ });
142
+ L(() => {
143
+ const a = b.some((z) => z.isError), y = m.current.size > 0;
144
+ a && !y ? (p({
145
+ title: c("ERROR_DEFAULT_TITLE"),
146
+ message: c("ERROR_FETCHING_OBSERVATIONS"),
147
+ type: "error"
148
+ }), m.current.add(0)) : !a && y && m.current.clear();
149
+ }, [b, p, c]);
150
+ const f = E(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = E(() => [.../* @__PURE__ */ new Set([...f, ...r])], [f, r]), v = E(() => u.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, u.length]), R = e === "latest" || e === "latest-encounter", F = G(
151
+ l,
152
+ n
153
+ ), {
154
+ data: _,
155
+ isLoading: w,
156
+ isError: I,
157
+ refetch: N
158
+ } = ue({
159
+ queryKey: _e(
160
+ i,
161
+ h,
162
+ n,
163
+ e
164
+ ),
165
+ queryFn: () => R ? H(
166
+ i,
167
+ h,
168
+ n
169
+ ) : Y(
170
+ i,
171
+ h,
172
+ n
173
+ ),
174
+ enabled: !!i && h.length > 0 && v && !F
175
+ });
176
+ J(
177
+ (a) => {
178
+ a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
+ (y) => h.includes(y)
180
+ ) && N();
181
+ },
182
+ [i, N]
183
+ ), L(() => {
184
+ I && p({
185
+ title: c("ERROR_DEFAULT_TITLE"),
186
+ message: c("ERROR_FETCHING_OBSERVATIONS"),
187
+ type: "error"
188
+ });
189
+ }, [I]);
190
+ const $ = E(() => {
191
+ if (!_) return [];
192
+ let a = P(_);
193
+ e === "latest-encounter" && (a = W(a));
194
+ const y = X(a);
195
+ return Z(y);
196
+ }, [_, e]), k = [
197
+ { key: "name", header: "name" },
198
+ { key: "value", header: "value" },
199
+ { key: "form", header: "form" }
200
+ ], A = w || !v, D = I && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, K = D ? c("ERROR_FETCHING_OBSERVATIONS") : null, Q = C ? c("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, g = d.titleTranslationKey, T = g ? c(g) : "";
201
+ return /* @__PURE__ */ S(
202
+ "div",
203
+ {
204
+ id: "observations",
205
+ "data-testid": g ? `observations-${T}` : "observations",
206
+ "aria-label": "observations-aria-label",
207
+ className: O.observations,
208
+ children: [
209
+ /* @__PURE__ */ o(
210
+ ee,
211
+ {
212
+ id: "observations-title",
213
+ testId: g ? `observations-title-${T}` : "observations-title",
214
+ title: T,
215
+ className: O.title,
216
+ children: /* @__PURE__ */ o("p", { children: T })
217
+ }
218
+ ),
219
+ q ? /* @__PURE__ */ o(
220
+ Oe,
221
+ {
222
+ groupedData: $,
223
+ title: T,
224
+ hideThumbnail: t
225
+ }
226
+ ) : /* @__PURE__ */ o(
227
+ ae,
228
+ {
229
+ headers: k,
230
+ rows: [],
231
+ ariaLabel: c("OBSERVATIONS"),
232
+ loading: A,
233
+ errorStateMessage: K,
234
+ emptyStateMessage: Q ?? c("NO_OBSERVATIONS_AVAILABLE"),
235
+ dataTestId: "observations-table"
236
+ }
237
+ )
238
+ ]
239
+ }
240
+ );
241
+ };
242
+ export {
243
+ Re as conceptUuidQueryKeys,
244
+ Se as default,
245
+ _e as observationsQueryKeys
246
+ };
@@ -1,4 +1,4 @@
1
- import { c2 as we, c3 as z, c4 as xt, c5 as B, c0 as q, c1 as y, c6 as Ro, c7 as ye, c8 as R, c9 as _, ca as k, cb as N, cc as A, cd as bs, ce as ir, cf as $e, cg as G, ch as Hn, ci as Vn, cj as dt, ck as D, cl as xs, cm as cn, cn as Be, co as ws, cp as qt, cq as zt, cr as $s, cs as Cs, ct as $n, cu as Ss, cv as Nr, cw as Bt, cx as zo, cy as ks, cz as Es, cA as j, cB as Gr, cC as Ms, cD as Ds, cE as sr, cF as As, cG as Ts, cH as zn, cI as Fs, cJ as Is, cK as Z, cL as Ps, cM as Ls } from "./index-Bue3rusE.js";
1
+ import { c0 as we, c1 as z, c2 as xt, c3 as B, b_ as q, b$ as y, c4 as Ro, c5 as ye, c6 as R, c7 as _, c8 as k, c9 as N, ca as A, cb as bs, cc as ir, cd as $e, ce as G, cf as Hn, cg as Vn, ch as dt, ci as D, cj as xs, ck as cn, cl as Be, cm as ws, cn as qt, co as zt, cp as $s, cq as Cs, cr as $n, cs as Ss, ct as Nr, cu as Bt, cv as zo, cw as ks, cx as Es, cy as j, cz as Gr, cA as Ms, cB as Ds, cC as sr, cD as As, cE as Ts, cF as zn, cG as Fs, cH as Is, cI as Z, cJ as Ps, cK as Ls } from "./index-DtI3QOMb.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 { bZ as i, b_ as o } from "./index-Bue3rusE.js";
1
+ import { bX as i, bY as o } from "./index-DtI3QOMb.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -1,16 +1,16 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { u as g, e as u, bM as b, bW as f, bX as x, bY as p, aK as _, bS as N } from "./index-Bue3rusE.js";
2
+ import { u as g, Z as u, bK as b, bU as f, bV as x, bW as p, aI as _, bQ as N } from "./index-DtI3QOMb.js";
3
3
  import { lazy as h, useMemo as t, Suspense as C } from "react";
4
4
  import "@tanstack/react-query";
5
- import { u as E } from "./hook-w3I7UPm-.js";
5
+ import { u as E } from "./hook-CPPANRiZ.js";
6
6
  const L = {
7
7
  "org.bahmni.clinical.v2.search": h(
8
- () => import("./index-C1m1M5AX.js")
8
+ () => import("./index-C-zc6_Ur.js")
9
9
  )
10
- }, v = "index-module_page__16xxw", y = "index-module_loading__wNI-4", I = "index-module_message__Ib5Iw", l = {
10
+ }, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", y = "index-module_message__Ib5Iw", l = {
11
11
  page: v,
12
- loading: y,
13
- message: I
12
+ loading: I,
13
+ message: y
14
14
  }, w = () => {
15
15
  const { t: i } = g(), { clinicalConfig: o } = E(), { userPrivileges: r } = u(), m = t(
16
16
  () => [
@@ -1,5 +1,5 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { u as r, cN as l, cO as o, cP as c, bc as m, bd as g, cQ as h, cR as p, cS as b, aK as u } from "./index-Bue3rusE.js";
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { u as r, cL as l, cM as o, cN as c, ba as m, bb as g, cO as h, cP as p, cQ as b, aI as u } from "./index-DtI3QOMb.js";
3
3
  import { Suspense as _ } from "react";
4
4
  import "@tanstack/react-query";
5
5
  const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
@@ -8,7 +8,7 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
8
8
  panel: y
9
9
  }, T = ({ extensions: i }) => {
10
10
  const { t: n } = r();
11
- return i.length === 0 ? null : /* @__PURE__ */ t(l, { children: [
11
+ return i.length === 0 ? null : /* @__PURE__ */ d(l, { children: [
12
12
  /* @__PURE__ */ e(
13
13
  o,
14
14
  {
@@ -38,7 +38,7 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
38
38
  }
39
39
  ),
40
40
  /* @__PURE__ */ e(h, { children: i.map((a) => {
41
- const d = p(
41
+ const t = p(
42
42
  a.extensionParams?.searchHandler ?? ""
43
43
  )?.component;
44
44
  return /* @__PURE__ */ e(
@@ -48,7 +48,7 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
48
48
  className: s.panel,
49
49
  "data-testid": `${a.id}-panel-test-id`,
50
50
  "aria-label": `Panel ${a.id}`,
51
- children: d && a.extensionParams ? /* @__PURE__ */ e(
51
+ children: t && a.extensionParams ? /* @__PURE__ */ e(
52
52
  _,
53
53
  {
54
54
  fallback: /* @__PURE__ */ e(
@@ -58,7 +58,7 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
58
58
  className: s.loading
59
59
  }
60
60
  ),
61
- children: /* @__PURE__ */ e(d, { extensionParams: a.extensionParams })
61
+ children: /* @__PURE__ */ e(t, { extensionParams: a.extensionParams })
62
62
  }
63
63
  ) : /* @__PURE__ */ e(
64
64
  "p",