@bahmni/widgets 0.0.1-dev.417 → 0.0.1-dev.419

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 T, Fragment as Y } from "react/jsx-runtime";
2
- import { u as W, a as X, G as J, V as Z, s as x, b as ee, F as te } from "./index-BKKc70c1.js";
2
+ import { u as J, a as W, J as X, V as Z, i as x, b as ee, F as te } from "./index-BPLc87jq.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -39,7 +39,7 @@ const Te = [
39
39
  null
40
40
  ), [V, A] = l(
41
41
  /* @__PURE__ */ new Set()
42
- ), E = W(), { t: o } = ae(), { addNotification: w } = X(), P = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
42
+ ), E = J(), { t: o } = ae(), { addNotification: w } = W(), P = Number(n?.pageSize) || 5, [N, C] = l(1), [u, $] = l(P), [k, O] = l(void 0), v = _((e) => {
43
43
  U(e), L(!0);
44
44
  }, []), z = _(() => {
45
45
  L(!1), U(null), A(/* @__PURE__ */ new Set());
@@ -54,7 +54,7 @@ const Te = [
54
54
  u
55
55
  ],
56
56
  enabled: !!E,
57
- queryFn: () => J(
57
+ queryFn: () => X(
58
58
  E,
59
59
  f,
60
60
  u,
@@ -98,7 +98,7 @@ const Te = [
98
98
  ), D = p(
99
99
  () => n?.fields ?? Te,
100
100
  [n?.fields]
101
- ), G = p(() => [...i?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [i]), j = p(() => he(D, o), [D, o]), K = p(
101
+ ), j = p(() => [...i?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [i]), K = p(() => he(D, o), [D, o]), G = p(
102
102
  () => D.map((e) => ({
103
103
  key: e,
104
104
  sortable: e !== "attachments"
@@ -142,12 +142,12 @@ const Te = [
142
142
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
143
143
  ee,
144
144
  {
145
- headers: j,
145
+ headers: K,
146
146
  ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
147
- rows: G,
147
+ rows: j,
148
148
  loading: H,
149
149
  errorStateMessage: S ? b?.message : null,
150
- sortable: K,
150
+ sortable: G,
151
151
  emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
152
152
  renderCell: Q,
153
153
  className: c.documentsTableBody,
@@ -1,35 +1,35 @@
1
1
  import { jsx as n, jsxs as $, Fragment as ge } from "react/jsx-runtime";
2
- import { u as Ne, c as Oe, d as pe, T as Te, S as Ee, _ as Fe, e as Ie, n as _e, f as Ae, g as ve, h as Re, i as De, j, s as Me, C as K, B as z, V as Le, b as Q, r as Se, k as Be, F as Ce, O as Ue, l as we } from "./index-BKKc70c1.js";
3
- import { useQueryClient as ke, useQuery as O } from "@tanstack/react-query";
2
+ import { u as Oe, c as Ne, d as pe, A as Te, O as Ee, T as Fe, S as Ie, e as Ae, f as _e, g as ve, h as Re, j as De, G as j, i as Me, C as K, B as z, V as Le, b as Q, r as Se, k as Be, F as Ce, l as Ue, m as we } from "./index-BPLc87jq.js";
3
+ import { useQueryClient as Ve, useQuery as N } from "@tanstack/react-query";
4
4
  import { useState as W, useMemo as i, useCallback as d } from "react";
5
- import { useTranslation as He } from "react-i18next";
6
- const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", p = {
7
- formsTableBody: Ve,
5
+ import { useTranslation as ke } from "react-i18next";
6
+ const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", p = {
7
+ formsTableBody: He,
8
8
  modalHeading: qe,
9
9
  customAccordianItem: Pe
10
- }, xe = "startConsultation", Qe = ({
10
+ }, Ge = "startConsultation", Qe = ({
11
11
  episodeOfCareUuids: R,
12
12
  encounterUuids: m,
13
13
  config: Y,
14
14
  disableActions: J = !1,
15
15
  activeEncounterUuid: b = null
16
16
  }) => {
17
- const { t: o } = He(), c = Ne(), [y, D] = W(!1), [s, M] = W(null), {
17
+ const { t: s } = ke(), c = Oe(), [y, D] = W(!1), [o, M] = W(null), {
18
18
  numberOfVisits: X,
19
19
  hideThumbnail: Z = !1,
20
20
  forms: h
21
- } = Y ?? {}, ee = Oe(
21
+ } = Y ?? {}, ee = Ne(
22
22
  we.EDIT_OBSERVATIONS
23
23
  ), { userPrivileges: g } = pe(), T = ee && !J && !!b, L = Te(
24
24
  R,
25
25
  m
26
- ), re = ke(), {
26
+ ), re = Ve(), {
27
27
  data: S = [],
28
28
  isLoading: B,
29
29
  isError: C,
30
30
  error: te,
31
31
  refetch: ae
32
- } = O({
32
+ } = N({
33
33
  queryKey: ["forms", c, R],
34
34
  queryFn: () => Ee(c, void 0, X),
35
35
  enabled: !!c && !L
@@ -40,12 +40,12 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
40
40
  )), Array.isArray(h) && h.length > 0 && (e = e.filter(
41
41
  (r) => h.some((t) => t.toLowerCase() === r.formName.toLowerCase())
42
42
  )), e;
43
- }, [S, m, h]), { data: N = [] } = O({
43
+ }, [S, m, h]), { data: O = [] } = N({
44
44
  queryKey: ["observationForms"],
45
45
  queryFn: () => Fe()
46
46
  }), w = d(
47
47
  (e) => {
48
- const r = N.find((a) => a.name === e);
48
+ const r = O.find((a) => a.name === e);
49
49
  if (!r?.privileges || r.privileges.length === 0) return !0;
50
50
  if (!g || g.length === 0) return !1;
51
51
  const t = new Set(g.map((a) => a.name));
@@ -53,22 +53,22 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
53
53
  (a) => t.has(a.privilegeName) && a.editable
54
54
  );
55
55
  },
56
- [N, g]
56
+ [O, g]
57
57
  ), u = d(
58
58
  (e) => !b || e.encounterUuid !== b ? !1 : w(e.formName),
59
59
  [b, w]
60
- ), k = d(
61
- (e) => N.find((t) => t.name === e)?.uuid,
62
- [N]
60
+ ), V = d(
61
+ (e) => O.find((t) => t.name === e)?.uuid,
62
+ [O]
63
63
  ), E = i(() => {
64
- if (s)
65
- return k(s.formName);
66
- }, [s, k]), {
67
- data: H,
68
- isLoading: se,
69
- isError: oe,
64
+ if (o)
65
+ return V(o.formName);
66
+ }, [o, V]), {
67
+ data: k,
68
+ isLoading: oe,
69
+ isError: se,
70
70
  error: F
71
- } = O({
71
+ } = N({
72
72
  queryKey: ["formMetadata", E],
73
73
  queryFn: () => Ie(E),
74
74
  enabled: !!E && y
@@ -76,38 +76,38 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
76
76
  data: I,
77
77
  isLoading: ne,
78
78
  isError: ie,
79
- error: _
80
- } = O({
81
- queryKey: ["formsEncounterFHIR", s?.encounterUuid],
82
- queryFn: () => _e(s.encounterUuid),
83
- enabled: !!s?.encounterUuid && y
79
+ error: A
80
+ } = N({
81
+ queryKey: ["formsEncounterFHIR", o?.encounterUuid],
82
+ queryFn: () => Ae(o.encounterUuid),
83
+ enabled: !!o?.encounterUuid && y
84
84
  });
85
- Ae(
85
+ _e(
86
86
  (e) => {
87
87
  e.patientUUID === c && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
88
88
  },
89
89
  [c]
90
90
  );
91
- const de = i(() => !I?.entry || !s?.formName ? [] : I.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => ve(r) ? Re(r)?.toLowerCase() === s.formName.toLowerCase() : !0), [I, s?.formName]), { controlOrder: le, sectionMap: me, conceptDatatypeMap: ce } = i(
92
- () => De(H?.schema),
93
- [H]
91
+ const de = i(() => !I?.entry || !o?.formName ? [] : I.entry.filter((r) => r.resource?.resourceType === "Observation").map((r) => r.resource).filter((r) => ve(r) ? Re(r)?.toLowerCase() === o.formName.toLowerCase() : !0), [I, o?.formName]), { controlOrder: le, sectionMap: me, conceptDatatypeMap: ce } = i(
92
+ () => De(k?.schema),
93
+ [k]
94
94
  ), ue = i(() => {
95
95
  if (F)
96
96
  return j(F).message;
97
- if (_)
98
- return j(_).message;
99
- }, [F, _]), f = i(
97
+ if (A)
98
+ return j(A).message;
99
+ }, [F, A]), f = i(
100
100
  () => [
101
- { key: "recordedOn", header: o("RECORDED_ON") },
102
- { key: "recordedBy", header: o("RECORDED_BY") }
101
+ { key: "recordedOn", header: s("RECORDED_ON") },
102
+ { key: "recordedBy", header: s("RECORDED_BY") }
103
103
  ],
104
- [o]
105
- ), V = i(
106
- () => [...f, { key: "actions", header: o("ACTIONS") }],
107
- [f, o]
104
+ [s]
105
+ ), H = i(
106
+ () => [...f, { key: "actions", header: s("ACTIONS") }],
107
+ [f, s]
108
108
  ), fe = d(
109
- (e) => T && e.some((t) => u(t)) ? V : f,
110
- [T, u, V, f]
109
+ (e) => T && e.some((t) => u(t)) ? H : f,
110
+ [T, u, H, f]
111
111
  ), be = f, ye = i(
112
112
  () => [
113
113
  { key: "recordedOn", sortable: !0 },
@@ -123,7 +123,7 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
123
123
  return t[l].push({
124
124
  id: a.encounterUuid,
125
125
  formName: a.formName,
126
- recordedOn: Me(a.encounterDateTime, o, !0).formattedResult,
126
+ recordedOn: Me(a.encounterDateTime, s, !0).formattedResult,
127
127
  recordedBy: v ?? "--",
128
128
  encounterDateTime: a.encounterDateTime,
129
129
  encounterUuid: a.encounterUuid
@@ -139,13 +139,13 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
139
139
  )
140
140
  })
141
141
  ).sort((t, a) => t.formName.localeCompare(a.formName));
142
- }, [U, o]), P = d((e) => {
142
+ }, [U, s]), P = d((e) => {
143
143
  M(e), D(!0);
144
- }, []), x = d(() => {
144
+ }, []), G = d(() => {
145
145
  D(!1), M(null);
146
- }, []), A = d((e) => {
146
+ }, []), _ = d((e) => {
147
147
  globalThis.dispatchEvent(
148
- new CustomEvent(xe, {
148
+ new CustomEvent(Ge, {
149
149
  detail: {
150
150
  editOnly: "observationForms",
151
151
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -155,7 +155,7 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
155
155
  }
156
156
  })
157
157
  );
158
- }, []), G = d(
158
+ }, []), x = d(
159
159
  (e, r) => {
160
160
  switch (r) {
161
161
  case "recordedOn":
@@ -166,11 +166,11 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
166
166
  return u(e) ? /* @__PURE__ */ n(
167
167
  K,
168
168
  {
169
- label: o("EDIT_OBSERVATION_FORM"),
169
+ label: s("EDIT_OBSERVATION_FORM"),
170
170
  kind: "ghost",
171
171
  size: "sm",
172
172
  testId: `edit-form-${e.encounterUuid}`,
173
- onClick: () => A(e),
173
+ onClick: () => _(e),
174
174
  children: /* @__PURE__ */ n(z, {})
175
175
  }
176
176
  ) : null;
@@ -178,19 +178,19 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
178
178
  return null;
179
179
  }
180
180
  },
181
- [P, A, u, o]
181
+ [P, _, u, s]
182
182
  );
183
183
  return /* @__PURE__ */ $(ge, { children: [
184
184
  /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || C || q.length === 0 || L ? /* @__PURE__ */ n(
185
185
  Q,
186
186
  {
187
187
  headers: be,
188
- ariaLabel: o("FORMS_HEADING"),
188
+ ariaLabel: s("FORMS_HEADING"),
189
189
  rows: [],
190
190
  loading: B,
191
191
  errorStateMessage: C ? te?.message : void 0,
192
- emptyStateMessage: o("FORMS_UNAVAILABLE"),
193
- renderCell: G,
192
+ emptyStateMessage: s("FORMS_UNAVAILABLE"),
193
+ renderCell: x,
194
194
  className: p.formsTableBody,
195
195
  dataTestId: "forms-table"
196
196
  }
@@ -207,13 +207,13 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
207
207
  Q,
208
208
  {
209
209
  headers: l,
210
- ariaLabel: o("FORMS_HEADING"),
210
+ ariaLabel: s("FORMS_HEADING"),
211
211
  rows: a,
212
212
  loading: !1,
213
213
  errorStateMessage: "",
214
214
  sortable: ye,
215
- emptyStateMessage: o("FORMS_UNAVAILABLE"),
216
- renderCell: G,
215
+ emptyStateMessage: s("FORMS_UNAVAILABLE"),
216
+ renderCell: x,
217
217
  className: p.formsTableBody,
218
218
  dataTestId: `forms-table-${t}`
219
219
  }
@@ -222,30 +222,30 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
222
222
  t
223
223
  );
224
224
  }) }) }),
225
- y && s && /* @__PURE__ */ n(
225
+ y && o && /* @__PURE__ */ n(
226
226
  Ce,
227
227
  {
228
228
  id: "modalIdForActionAreaLayout",
229
229
  portalId: "main-display-area",
230
230
  open: y,
231
- onRequestClose: x,
231
+ onRequestClose: G,
232
232
  modalHeading: /* @__PURE__ */ $("div", { className: p.modalHeading, children: [
233
- /* @__PURE__ */ n("span", { children: s.formName }),
234
- T && u(s) && /* @__PURE__ */ n(
233
+ /* @__PURE__ */ n("span", { children: o.formName }),
234
+ T && u(o) && /* @__PURE__ */ n(
235
235
  K,
236
236
  {
237
- label: o("EDIT_OBSERVATION_FORM"),
237
+ label: s("EDIT_OBSERVATION_FORM"),
238
238
  kind: "ghost",
239
239
  size: "sm",
240
- testId: `edit-form-modal-${s.encounterUuid}`,
240
+ testId: `edit-form-modal-${o.encounterUuid}`,
241
241
  onClick: () => {
242
- x(), A(s);
242
+ G(), _(o);
243
243
  },
244
244
  children: /* @__PURE__ */ n(z, {})
245
245
  }
246
246
  )
247
247
  ] }),
248
- modalLabel: `${s.recordedOn} | ${s.recordedBy}`,
248
+ modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
249
249
  passiveModal: !0,
250
250
  size: "md",
251
251
  testId: "form-details-modal",
@@ -253,11 +253,11 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
253
253
  Ue,
254
254
  {
255
255
  observations: de,
256
- isLoading: se || ne,
257
- isError: oe || ie,
256
+ isLoading: oe || ne,
257
+ isError: se || ie,
258
258
  errorMessage: ue,
259
- emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
260
- testIdPrefix: s.formName,
259
+ emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
260
+ testIdPrefix: o.formName,
261
261
  hideThumbnail: Z,
262
262
  controlOrder: le,
263
263
  sectionMap: me,
@@ -1,14 +1,14 @@
1
1
  import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { m as z, D as F, t as G, o as H, s as P, p as j, q as x, R as J, v as Y, u as W, a as X, I as Z, T as ee, w as se, x as te, f as re, y as ae, z as oe, A as ne, E as ie, H as ce, b as le } from "./index-BKKc70c1.js";
2
+ import { n as z, D as F, t as G, o as H, i as P, p as j, q as x, R as J, s as Y, u as W, a as X, v as Z, A as ee, w as se, x as te, f as re, y as ae, z as oe, E as ne, H as ie, I as ce, b as le } from "./index-BPLc87jq.js";
3
3
  import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
4
4
  import { useRef as pe, useEffect as C, useMemo as I } from "react";
5
- import { useTranslation as w } from "react-i18next";
5
+ import { useTranslation as V } from "react-i18next";
6
6
  const be = "Observations-module_observations__RKSyo", me = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
7
7
  observations: be,
8
8
  title: me,
9
9
  wrapper: ve,
10
10
  secondary: ye
11
- }, U = (t, l, n, c, u, r) => {
11
+ }, w = (t, l, n, c, u, r) => {
12
12
  const a = G(t, l, u), e = a.value, p = H(e);
13
13
  let o = e;
14
14
  p === "Image" && (o = /* @__PURE__ */ i(
@@ -35,7 +35,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
35
35
  }), m = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
36
36
  /* @__PURE__ */ i("span", { children: d }),
37
37
  m && /* @__PURE__ */ i("span", { className: y.secondary, children: m })
38
- ] }), v = t.display, T = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = c ? `${c}-${T}-${v}-${n}-${l}` : `${T}-${v}-${n}-${l}`;
38
+ ] }), v = t.display, g = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = c ? `${c}-${g}-${v}-${n}-${l}` : `${g}-${v}-${n}-${l}`;
39
39
  return /* @__PURE__ */ i(
40
40
  j,
41
41
  {
@@ -55,7 +55,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
55
55
  id: `grouped-obs-${t.display}-${c}`,
56
56
  open: n,
57
57
  children: t.members?.map(
58
- (e, p) => U(
58
+ (e, p) => w(
59
59
  e,
60
60
  p,
61
61
  u,
@@ -71,7 +71,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
71
71
  title: l = "",
72
72
  hideThumbnail: n
73
73
  }) => {
74
- const { t: c } = w(), u = (r, a, e) => {
74
+ const { t: c } = V(), u = (r, a, e) => {
75
75
  const p = z(r.encounterDetails, c);
76
76
  return /* @__PURE__ */ N(
77
77
  F,
@@ -81,7 +81,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
81
81
  open: a,
82
82
  children: [
83
83
  r.observations.map(
84
- (o, b) => U(
84
+ (o, b) => w(
85
85
  o,
86
86
  b,
87
87
  e,
@@ -133,7 +133,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
133
133
  conceptUuid: r = [],
134
134
  hideThumbnail: a = !1,
135
135
  scope: e = "all"
136
- } = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } = w(), m = de({
136
+ } = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = X(), { t: d } = V(), m = de({
137
137
  queries: u.map((s) => ({
138
138
  queryKey: Ee(s),
139
139
  queryFn: () => Z(s),
@@ -148,12 +148,12 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
148
148
  type: "error"
149
149
  }), p.current.add(0)) : !s && R && p.current.clear();
150
150
  }, [m, b, d]);
151
- const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), T = e === "latest" || e === "latest-encounter", O = ee(
151
+ const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
152
152
  l,
153
153
  n
154
154
  ), {
155
155
  data: E,
156
- isLoading: V,
156
+ isLoading: U,
157
157
  isError: S,
158
158
  refetch: D
159
159
  } = ue({
@@ -163,7 +163,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
163
163
  n,
164
164
  e
165
165
  ),
166
- queryFn: () => T ? se(
166
+ queryFn: () => g ? se(
167
167
  o,
168
168
  v,
169
169
  n
@@ -198,12 +198,12 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
198
198
  { key: "name", header: "name" },
199
199
  { key: "value", header: "value" },
200
200
  { key: "form", header: "form" }
201
- ], L = V || !f, B = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, Q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !L && !B, g = c.titleTranslationKey, h = g ? d(g) : "";
201
+ ], L = U || !f, B = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, Q = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !L && !B, T = c.titleTranslationKey, h = T ? d(T) : "";
202
202
  return /* @__PURE__ */ N(
203
203
  "div",
204
204
  {
205
205
  id: "observations",
206
- "data-testid": g ? `observations-${h}` : "observations",
206
+ "data-testid": T ? `observations-${h}` : "observations",
207
207
  "aria-label": "observations-aria-label",
208
208
  className: y.observations,
209
209
  children: [
@@ -211,7 +211,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
211
211
  ce,
212
212
  {
213
213
  id: "observations-title",
214
- testId: g ? `observations-title-${h}` : "observations-title",
214
+ testId: T ? `observations-title-${h}` : "observations-title",
215
215
  title: h,
216
216
  className: y.title,
217
217
  children: /* @__PURE__ */ i("p", { children: h })
@@ -104131,7 +104131,7 @@ const gBe = (t) => ["radiologyInvestigation", t], wKt = async (t, e, r, n) => {
104131
104131
  V(F), M(
104132
104132
  "qa"
104133
104133
  /* QA */
104134
- );
104134
+ ), C();
104135
104135
  },
104136
104136
  children: a("RADIOLOGY_VIEW_QA")
104137
104137
  }
@@ -104145,7 +104145,7 @@ const gBe = (t) => ["radiologyInvestigation", t], wKt = async (t, e, r, n) => {
104145
104145
  V(F), M(
104146
104146
  "report"
104147
104147
  /* REPORT */
104148
- );
104148
+ ), C();
104149
104149
  },
104150
104150
  children: a("RADIOLOGY_VIEW_REPORT")
104151
104151
  }
@@ -114905,7 +114905,7 @@ const y01 = [
114905
114905
  },
114906
114906
  {
114907
114907
  type: "patientDocuments",
114908
- component: l0(() => import("./DocumentsTable-DMIaNWVl.js"))
114908
+ component: l0(() => import("./DocumentsTable-DqmH8Fxj.js"))
114909
114909
  },
114910
114910
  {
114911
114911
  type: "flowSheet",
@@ -114913,7 +114913,7 @@ const y01 = [
114913
114913
  },
114914
114914
  {
114915
114915
  type: "forms",
114916
- component: l0(() => import("./FormsTable-C4GSkGM8.js"))
114916
+ component: l0(() => import("./FormsTable-cov-e4_0.js"))
114917
114917
  },
114918
114918
  {
114919
114919
  type: "labOrders",
@@ -114921,7 +114921,7 @@ const y01 = [
114921
114921
  },
114922
114922
  {
114923
114923
  type: "observations",
114924
- component: l0(() => import("./Observations-C6aIPO5C.js"))
114924
+ component: l0(() => import("./Observations-By1U1Mnx.js"))
114925
114925
  },
114926
114926
  {
114927
114927
  type: "ordersControl",
@@ -115275,33 +115275,33 @@ const fPe = o.createContext(void 0), $01 = () => {
115275
115275
  };
115276
115276
  export {
115277
115277
  hBe as $,
115278
- _r1 as A,
115278
+ vi as A,
115279
115279
  Vc as B,
115280
115280
  A2 as C,
115281
115281
  Y01 as D,
115282
- Cr1 as E,
115282
+ _r1 as E,
115283
115283
  p0 as F,
115284
- Er1 as G,
115285
- di as H,
115286
- mr1 as I,
115287
- bMt as J,
115288
- yr1 as K,
115289
- Mr1 as L,
115290
- djt as M,
115291
- kjt as N,
115292
- h8 as O,
115284
+ S1 as G,
115285
+ Cr1 as H,
115286
+ di as I,
115287
+ Er1 as J,
115288
+ bMt as K,
115289
+ yr1 as L,
115290
+ Mr1 as M,
115291
+ djt as N,
115292
+ vr1 as O,
115293
115293
  br1 as P,
115294
- pUt as Q,
115294
+ kjt as Q,
115295
115295
  LIe as R,
115296
- vr1 as S,
115297
- vi as T,
115298
- UUt as U,
115296
+ NTt as S,
115297
+ JZe as T,
115298
+ pUt as U,
115299
115299
  qr as V,
115300
- XUt as W,
115301
- nGt as X,
115302
- eWt as Y,
115303
- gKt as Z,
115304
- JZe as _,
115300
+ UUt as W,
115301
+ XUt as X,
115302
+ nGt as Y,
115303
+ eWt as Z,
115304
+ gKt as _,
115305
115305
  z1 as a,
115306
115306
  KKt as a0,
115307
115307
  BYt as a1,
@@ -115345,24 +115345,24 @@ export {
115345
115345
  Y1 as b,
115346
115346
  i8 as c,
115347
115347
  en as d,
115348
- NTt as e,
115348
+ uTt as e,
115349
115349
  mr as f,
115350
115350
  dBe as g,
115351
115351
  VGt as h,
115352
- yGt as i,
115353
- S1 as j,
115352
+ wt as i,
115353
+ yGt as j,
115354
115354
  Fo as k,
115355
- Dr1 as l,
115356
- xr1 as m,
115357
- uTt as n,
115355
+ h8 as l,
115356
+ Dr1 as m,
115357
+ xr1 as n,
115358
115358
  k9e as o,
115359
115359
  Ryt as p,
115360
115360
  TIe as q,
115361
115361
  Po as r,
115362
- wt as s,
115362
+ OIe as s,
115363
115363
  Nr1 as t,
115364
115364
  v0 as u,
115365
- OIe as v,
115365
+ mr1 as v,
115366
115366
  gr1 as w,
115367
115367
  wr1 as x,
115368
115368
  Ar1 as y,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ai as o, ag as r, N as n, af as g, Q as c, Y as l, l as d, a8 as P, ao as m, U as v, J as C, W as u, K as A, L as T, a3 as b, a6 as p, a0 as N, az as S, aB as W, aC as h, X as I, aa as L, ab as U, O as f, P as D, a5 as R, a7 as y, $ as O, Z as x, a1 as _, a4 as E, ax as k, aw as F, ae as G, a2 as H, an as M, ak as V, aj as q, i as w, h as z, au as B, at as K, am as Y, aq as j, ar as J, as as Q, al as X, ap as Z, M as $, av as aa, ah as ea, a9 as sa, ac as ta, c as ia, aA as oa, a as ra, ad as na, u as ga, ay as ca, d as la } from "./index-BKKc70c1.js";
1
+ import { ai as o, ag as r, Q as n, af as g, U as c, Z as l, m as d, a8 as P, ao as m, W as v, K as C, X as u, L as A, M as T, a3 as b, a6 as p, a0 as N, az as S, aB as W, aC as h, Y as I, aa as L, ab as U, l as f, P as D, a5 as R, a7 as y, $ as _, _ as x, a1 as O, a4 as E, ax as k, aw as F, ae as G, a2 as H, an as M, ak as V, aj as j, j as q, h as w, au as z, at as B, am as K, aq as Y, ar as Q, as as X, al as Z, ap as $, N as J, av as aa, ah as ea, a9 as sa, ac as ta, c as ia, aA as oa, a as ra, ad as na, u as ga, ay as ca, d as la } from "./index-BPLc87jq.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -30,9 +30,9 @@ export {
30
30
  D as PatientDetails,
31
31
  R as PatientProgramsTable,
32
32
  y as ProgramDetails,
33
- O as RadiologyInvestigationReport,
33
+ _ as RadiologyInvestigationReport,
34
34
  x as RadiologyInvestigationTable,
35
- _ as SearchPatient,
35
+ O as SearchPatient,
36
36
  E as TaskList,
37
37
  k as UserActionProvider,
38
38
  F as UserGlobalAction,
@@ -40,18 +40,18 @@ export {
40
40
  H as VitalFlowSheet,
41
41
  M as clearSearchWidgetRegistry,
42
42
  V as createConfigHook,
43
- q as createConfigProvider,
44
- w as deriveFormSchemaData,
45
- z as extractFormName,
46
- B as getAllWidgetConfigs,
47
- K as getAllWidgetTypes,
48
- Y as getSearchWidget,
49
- j as getWidget,
50
- J as getWidgetConfig,
51
- Q as hasWidget,
52
- X as registerSearchWidget,
53
- Z as registerWidget,
54
- $ as renderDocumentTile,
43
+ j as createConfigProvider,
44
+ q as deriveFormSchemaData,
45
+ w as extractFormName,
46
+ z as getAllWidgetConfigs,
47
+ B as getAllWidgetTypes,
48
+ K as getSearchWidget,
49
+ Y as getWidget,
50
+ Q as getWidgetConfig,
51
+ X as hasWidget,
52
+ Z as registerSearchWidget,
53
+ $ as registerWidget,
54
+ J as renderDocumentTile,
55
55
  aa as resetWidgetRegistry,
56
56
  ea as useActivePractitioner,
57
57
  sa as useCommandPalette,
@@ -1 +1 @@
1
- {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAiBhD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAsBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiiBtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAiBhD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAsBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmiBtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.417",
3
+ "version": "0.0.1-dev.419",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",