@bahmni/widgets 0.0.1-dev.130 → 0.0.1-dev.133

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,34 +1,33 @@
1
- import { jsxs as b, jsx as a, Fragment as Y } from "react/jsx-runtime";
2
- import { c as L, u as J, x as W, z as Z, H as ee, B as te, M as re, X as oe, l as ae, K as U, g as se, a as ne, p as de, b as ce, d as q, e as le } from "./index-BSN2bEIC.js";
3
- import { useQuery as h } from "@tanstack/react-query";
1
+ import { jsxs as b, jsx as o, Fragment as Y } from "react/jsx-runtime";
2
+ import { c as L, u as J, x as W, z as Z, H as ee, B as te, M as re, X as ae, l as oe, K as U, g as se, a as ne, p as de, b as ce, d as q, e as le } from "./index-xqzBm5Np.js";
3
+ import { useQuery as y } from "@tanstack/react-query";
4
4
  import { useState as H, useMemo as g, useCallback as M } from "react";
5
- import { createPortal as me } from "react-dom";
6
- import { useTranslation as ie } from "react-i18next";
7
- const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ye = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", Me = "_groupMembers_1pd36_75", Le = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Te = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Ce = "_nestedGroup_1pd36_125", Fe = "_nestedGroupLabel_1pd36_132", ve = "_nestedGroupMembers_1pd36_141", o = {
8
- formsTableBody: ue,
9
- customAccordianItem: pe,
10
- formContent: be,
11
- formDetailsContainer: _e,
12
- observation: fe,
13
- groupContainer: ge,
14
- rowContainer: Ne,
15
- groupLabel: $e,
16
- rowLabel: ye,
5
+ import { useTranslation as me } from "react-i18next";
6
+ const ie = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", $e = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", ye = "_groupMembers_1pd36_75", Me = "_memberRow_1pd36_81", Le = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Te = "_abnormalValue_1pd36_102", Ae = "_commentSection_1pd36_110", Oe = "_commentText_1pd36_116", Re = "_nestedGroup_1pd36_125", Ce = "_nestedGroupLabel_1pd36_132", Fe = "_nestedGroupMembers_1pd36_141", a = {
7
+ formsTableBody: ie,
8
+ customAccordianItem: ue,
9
+ formContent: pe,
10
+ formDetailsContainer: be,
11
+ observation: _e,
12
+ groupContainer: fe,
13
+ rowContainer: ge,
14
+ groupLabel: Ne,
15
+ rowLabel: $e,
17
16
  rowValue: he,
18
- groupMembers: Me,
19
- memberRow: Le,
20
- memberLabel: Ae,
17
+ groupMembers: ye,
18
+ memberRow: Me,
19
+ memberLabel: Le,
21
20
  memberValue: De,
22
21
  abnormalValue: Te,
23
- commentSection: Oe,
24
- commentText: Re,
25
- nestedGroup: Ce,
26
- nestedGroupLabel: Fe,
27
- nestedGroupMembers: ve
28
- }, we = "ABNORMAL", P = (e) => {
29
- const s = e.concept?.units, c = e.concept?.lowNormal, t = e.concept?.hiNormal, u = c != null, n = t != null, l = u && n ? ` (${c} - ${t})` : u ? ` (>${c})` : n ? ` (<${t})` : "", r = e.interpretation && e.interpretation.toUpperCase() === we;
22
+ commentSection: Ae,
23
+ commentText: Oe,
24
+ nestedGroup: Re,
25
+ nestedGroupLabel: Ce,
26
+ nestedGroupMembers: Fe
27
+ }, ve = "ABNORMAL", k = (e) => {
28
+ const s = e.concept?.units, c = e.concept?.lowNormal, t = e.concept?.hiNormal, u = c != null, n = t != null, l = u && n ? ` (${c} - ${t})` : u ? ` (>${c})` : n ? ` (<${t})` : "", r = e.interpretation && e.interpretation.toUpperCase() === ve;
30
29
  return { units: s, rangeString: l, isAbnormal: r };
31
- }, k = ({
30
+ }, P = ({
32
31
  member: e,
33
32
  depth: s = 0,
34
33
  memberIndex: c = 0,
@@ -39,25 +38,25 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
39
38
  return /* @__PURE__ */ b(
40
39
  "div",
41
40
  {
42
- className: o.nestedGroup,
41
+ className: a.nestedGroup,
43
42
  "data-testid": `${l}obs-nested-group-${n}-${c}`,
44
43
  children: [
45
- /* @__PURE__ */ a(
44
+ /* @__PURE__ */ o(
46
45
  "div",
47
46
  {
48
- className: o.nestedGroupLabel,
47
+ className: a.nestedGroupLabel,
49
48
  "data-testid": `${l}obs-nested-group-label-${n}-${c}`,
50
49
  style: { paddingLeft: `${s * 16}px` },
51
50
  children: n
52
51
  }
53
52
  ),
54
- /* @__PURE__ */ a(
53
+ /* @__PURE__ */ o(
55
54
  "div",
56
55
  {
57
- className: o.nestedGroupMembers,
56
+ className: a.nestedGroupMembers,
58
57
  "data-testid": `${l}obs-nested-group-members-${n}-${c}`,
59
- children: e.groupMembers?.map((N, $) => /* @__PURE__ */ a(
60
- k,
58
+ children: e.groupMembers?.map((N, $) => /* @__PURE__ */ o(
59
+ P,
61
60
  {
62
61
  member: N,
63
62
  depth: s + 1,
@@ -71,11 +70,11 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
71
70
  ]
72
71
  }
73
72
  );
74
- const { units: r, rangeString: _, isAbnormal: f } = P(e);
73
+ const { units: r, rangeString: _, isAbnormal: f } = k(e);
75
74
  return /* @__PURE__ */ b(
76
75
  "div",
77
76
  {
78
- className: o.memberRow,
77
+ className: a.memberRow,
79
78
  "data-testid": `${l}obs-member-row-${n}-${c}`,
80
79
  style: { paddingLeft: `${s * 16}px` },
81
80
  children: [
@@ -83,8 +82,8 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
83
82
  "p",
84
83
  {
85
84
  className: L(
86
- o.memberLabel,
87
- f ? o.abnormalValue : ""
85
+ a.memberLabel,
86
+ f ? a.abnormalValue : ""
88
87
  ),
89
88
  "data-testid": `${l}obs-member-label-${n}-${c}`,
90
89
  children: [
@@ -97,8 +96,8 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
97
96
  "p",
98
97
  {
99
98
  className: L(
100
- o.memberValue,
101
- f ? o.abnormalValue : ""
99
+ a.memberValue,
100
+ f ? a.abnormalValue : ""
102
101
  ),
103
102
  "data-testid": `${l}obs-member-value-${n}-${c}`,
104
103
  children: [
@@ -110,45 +109,45 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
110
109
  ]
111
110
  }
112
111
  );
113
- }, Ee = ({
112
+ }, we = ({
114
113
  observation: e,
115
114
  index: s,
116
115
  formName: c = ""
117
116
  }) => {
118
- const t = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: n, isAbnormal: l } = P(e), r = c ? `${c}-` : "";
117
+ const t = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: n, isAbnormal: l } = k(e), r = c ? `${c}-` : "";
119
118
  return /* @__PURE__ */ b(
120
119
  "div",
121
120
  {
122
- className: o.observation,
121
+ className: a.observation,
123
122
  "data-testid": `${r}observation-item-${e.conceptNameToDisplay}-${s}`,
124
123
  children: [
125
124
  /* @__PURE__ */ b(
126
125
  "div",
127
126
  {
128
- className: t ? o.groupContainer : o.rowContainer,
127
+ className: t ? a.groupContainer : a.rowContainer,
129
128
  "data-testid": `${r}observation-container-${e.conceptNameToDisplay}-${s}`,
130
129
  children: [
131
130
  /* @__PURE__ */ b(
132
131
  "p",
133
132
  {
134
133
  className: L(
135
- t ? o.groupLabel : o.rowLabel,
136
- !t && l ? o.abnormalValue : ""
134
+ t ? a.groupLabel : a.rowLabel,
135
+ !t && l ? a.abnormalValue : ""
137
136
  ),
138
137
  "data-testid": `${r}observation-label-${e.conceptNameToDisplay}-${s}`,
139
138
  children: [
140
139
  e.conceptNameToDisplay,
141
- !t && n && /* @__PURE__ */ a("span", { className: o.rangeInfo, children: n })
140
+ !t && n && /* @__PURE__ */ o("span", { className: a.rangeInfo, children: n })
142
141
  ]
143
142
  }
144
143
  ),
145
- t ? /* @__PURE__ */ a(
144
+ t ? /* @__PURE__ */ o(
146
145
  "div",
147
146
  {
148
- className: o.groupMembers,
147
+ className: a.groupMembers,
149
148
  "data-testid": `${r}observation-group-members-${e.conceptNameToDisplay}-${s}`,
150
- children: e.groupMembers?.map((_, f) => /* @__PURE__ */ a(
151
- k,
149
+ children: e.groupMembers?.map((_, f) => /* @__PURE__ */ o(
150
+ P,
152
151
  {
153
152
  member: _,
154
153
  depth: 0,
@@ -162,8 +161,8 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
162
161
  "p",
163
162
  {
164
163
  className: L(
165
- o.rowValue,
166
- l ? o.abnormalValue : ""
164
+ a.rowValue,
165
+ l ? a.abnormalValue : ""
167
166
  ),
168
167
  "data-testid": `${r}observation-value-${e.conceptNameToDisplay}-${s}`,
169
168
  children: [
@@ -175,12 +174,12 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
175
174
  ]
176
175
  }
177
176
  ),
178
- e.comment && /* @__PURE__ */ a(
177
+ e.comment && /* @__PURE__ */ o(
179
178
  "div",
180
179
  {
181
- className: o.commentSection,
180
+ className: a.commentSection,
182
181
  "data-testid": `${r}observation-comment-${e.conceptNameToDisplay}-${s}`,
183
- children: /* @__PURE__ */ b("span", { className: o.commentText, children: [
182
+ children: /* @__PURE__ */ b("span", { className: a.commentText, children: [
184
183
  e.comment,
185
184
  e.providers?.[0]?.name && ` - by ${e.providers[0].name}`
186
185
  ] })
@@ -190,12 +189,12 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
190
189
  },
191
190
  `${e.concept.uuid}-${s}`
192
191
  );
193
- }, He = ({
192
+ }, Ue = ({
194
193
  episodeOfCareUuids: e,
195
194
  encounterUuids: s,
196
195
  config: c
197
196
  }) => {
198
- const { t } = ie(), u = J(), [n, l] = H(!1), [r, _] = H(null), f = c?.numberOfVisits, N = W(
197
+ const { t } = me(), u = J(), [n, l] = H(!1), [r, _] = H(null), f = c?.numberOfVisits, N = W(
199
198
  e,
200
199
  s
201
200
  ), {
@@ -203,40 +202,40 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
203
202
  isLoading: O,
204
203
  isError: R,
205
204
  error: K
206
- } = h({
205
+ } = y({
207
206
  queryKey: ["forms", u, e],
208
207
  queryFn: () => Z(u, void 0, f),
209
208
  enabled: !!u && !N
210
209
  }), C = g(() => !s || s.length === 0 ? $ : $.filter(
211
210
  (d) => s.includes(d.encounterUuid)
212
- ), [$, s]), { data: F = [] } = h({
211
+ ), [$, s]), { data: F = [] } = y({
213
212
  queryKey: ["observationForms"],
214
213
  queryFn: () => ee()
215
214
  }), v = M(
216
215
  (d) => F.find((m) => m.name === d)?.uuid,
217
216
  [F]
218
- ), A = g(() => {
217
+ ), D = g(() => {
219
218
  if (r)
220
219
  return v(r.formName);
221
220
  }, [r, v]), {
222
- data: Be,
221
+ data: Ee,
223
222
  isLoading: j,
224
223
  error: w
225
- } = h({
226
- queryKey: ["formMetadata", A],
227
- queryFn: () => te(A),
228
- enabled: !!A && n
224
+ } = y({
225
+ queryKey: ["formMetadata", D],
226
+ queryFn: () => te(D),
227
+ enabled: !!D && n
229
228
  }), {
230
- data: D,
229
+ data: T,
231
230
  isLoading: x,
232
231
  error: E
233
- } = h({
232
+ } = y({
234
233
  queryKey: ["formsEncounter", r?.encounterUuid],
235
234
  queryFn: () => re(r.encounterUuid, !0),
236
235
  enabled: !!r?.encounterUuid && n
237
- }), B = g(() => !D?.observations || !r?.formName ? [] : D.observations.filter(
236
+ }), B = g(() => !T?.observations || !r?.formName ? [] : T.observations.filter(
238
237
  (p) => "formFieldPath" in p && typeof p.formFieldPath == "string" && p.formFieldPath.includes(r.formName)
239
- ), [D?.observations, r?.formName]), I = g(
238
+ ), [T?.observations, r?.formName]), I = g(
240
239
  () => [
241
240
  { key: "recordedOn", header: t("FORM_RECORDED_ON") },
242
241
  { key: "recordedBy", header: t("FORM_RECORDED_BY") }
@@ -251,14 +250,14 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
251
250
  ), V = g(() => {
252
251
  const d = C.reduce(
253
252
  (m, i) => {
254
- const y = i.formName;
255
- m[y] ??= [];
256
- const T = i.providers.map((Q) => Q.providerName).filter(Boolean).join(", ");
257
- return m[y].push({
253
+ const h = i.formName;
254
+ m[h] ??= [];
255
+ const A = i.providers.map((Q) => Q.providerName).filter(Boolean).join(", ");
256
+ return m[h].push({
258
257
  id: i.encounterUuid,
259
258
  formName: i.formName,
260
- recordedOn: oe(i.encounterDateTime, t, le).formattedResult,
261
- recordedBy: T ?? "--",
259
+ recordedOn: ae(i.encounterDateTime, t, le).formattedResult,
260
+ recordedBy: A ?? "--",
262
261
  encounterDateTime: i.encounterDateTime,
263
262
  encounterUuid: i.encounterUuid
264
263
  }), m;
@@ -269,7 +268,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
269
268
  ([m, i]) => ({
270
269
  formName: m,
271
270
  records: i.sort(
272
- (y, T) => T.encounterDateTime - y.encounterDateTime
271
+ (h, A) => A.encounterDateTime - h.encounterDateTime
273
272
  )
274
273
  })
275
274
  ).sort((m, i) => m.formName.localeCompare(i.formName));
@@ -281,7 +280,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
281
280
  (d, p) => {
282
281
  switch (p) {
283
282
  case "recordedOn":
284
- return /* @__PURE__ */ a(ae, { onClick: () => S(d), children: d.recordedOn });
283
+ return /* @__PURE__ */ o(oe, { onClick: () => S(d), children: d.recordedOn });
285
284
  case "recordedBy":
286
285
  return d.recordedBy;
287
286
  default:
@@ -291,7 +290,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
291
290
  [S]
292
291
  );
293
292
  return /* @__PURE__ */ b(Y, { children: [
294
- /* @__PURE__ */ a("div", { "data-testid": "forms-table", children: O || R || V.length === 0 || N ? /* @__PURE__ */ a(
293
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || R || V.length === 0 || N ? /* @__PURE__ */ o(
295
294
  U,
296
295
  {
297
296
  headers: I,
@@ -301,19 +300,19 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
301
300
  errorStateMessage: R ? K?.message : void 0,
302
301
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
303
302
  renderCell: G,
304
- className: o.formsTableBody,
303
+ className: a.formsTableBody,
305
304
  dataTestId: "forms-table"
306
305
  }
307
- ) : /* @__PURE__ */ a(se, { align: "start", children: V.map((d, p) => {
306
+ ) : /* @__PURE__ */ o(se, { align: "start", children: V.map((d, p) => {
308
307
  const { formName: m, records: i } = d;
309
- return /* @__PURE__ */ a(
308
+ return /* @__PURE__ */ o(
310
309
  ne,
311
310
  {
312
311
  title: m,
313
- className: o.customAccordianItem,
312
+ className: a.customAccordianItem,
314
313
  testId: `accordian-title-${m}`,
315
314
  open: p === 0,
316
- children: /* @__PURE__ */ a(
315
+ children: /* @__PURE__ */ o(
317
316
  U,
318
317
  {
319
318
  headers: I,
@@ -324,7 +323,7 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
324
323
  sortable: z,
325
324
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
326
325
  renderCell: G,
327
- className: o.formsTableBody,
326
+ className: a.formsTableBody,
328
327
  dataTestId: `forms-table-${m}`
329
328
  }
330
329
  )
@@ -332,33 +331,30 @@ const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", be =
332
331
  m
333
332
  );
334
333
  }) }) }),
335
- n && r && me(
336
- /* @__PURE__ */ a(
337
- de,
338
- {
339
- id: "modalIdForActionAreaLayout",
340
- open: n,
341
- onRequestClose: X,
342
- modalHeading: r.formName,
343
- modalLabel: `${r.recordedOn} | ${r.recordedBy}`,
344
- passiveModal: !0,
345
- size: "md",
346
- testId: "form-details-modal",
347
- children: /* @__PURE__ */ a("div", { className: o.formContent, children: j || x ? /* @__PURE__ */ a(ce, { width: "100%", lineCount: 3 }) : w ? /* @__PURE__ */ a("div", { children: q(w).message ?? t("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ a("div", { children: q(E).message ?? t("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ a("div", { className: o.formDetailsContainer, children: B.map((d, p) => /* @__PURE__ */ a(
348
- Ee,
349
- {
350
- observation: d,
351
- index: p,
352
- formName: r.formName
353
- },
354
- `${d.concept.uuid}`
355
- )) }) : /* @__PURE__ */ a("div", { children: t("NO_FORM_DATA_AVAILABLE") }) })
356
- }
357
- ),
358
- document.getElementById("actionAreaLayout") ?? document.body
334
+ n && r && /* @__PURE__ */ o(
335
+ de,
336
+ {
337
+ id: "modalIdForActionAreaLayout",
338
+ open: n,
339
+ onRequestClose: X,
340
+ modalHeading: r.formName,
341
+ modalLabel: `${r.recordedOn} | ${r.recordedBy}`,
342
+ passiveModal: !0,
343
+ size: "md",
344
+ testId: "form-details-modal",
345
+ children: /* @__PURE__ */ o("div", { className: a.formContent, children: j || x ? /* @__PURE__ */ o(ce, { width: "100%", lineCount: 3 }) : w ? /* @__PURE__ */ o("div", { children: q(w).message ?? t("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ o("div", { children: q(E).message ?? t("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ o("div", { className: a.formDetailsContainer, children: B.map((d, p) => /* @__PURE__ */ o(
346
+ we,
347
+ {
348
+ observation: d,
349
+ index: p,
350
+ formName: r.formName
351
+ },
352
+ `${d.concept.uuid}`
353
+ )) }) : /* @__PURE__ */ o("div", { children: t("NO_FORM_DATA_AVAILABLE") }) })
354
+ }
359
355
  )
360
356
  ] });
361
357
  };
362
358
  export {
363
- He as default
359
+ Ue as default
364
360
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as v, jsxs as _ } from "react/jsx-runtime";
2
- import { J as F, L as N, f as K, h as k, i as q, V as Q, u as G, j as P, k as x, C as H, T as j, K as Y } from "./index-BSN2bEIC.js";
2
+ import { J as F, L as N, f as K, h as k, i as q, V as Q, u as G, j as P, k as x, C as H, T as j, K as Y } from "./index-xqzBm5Np.js";
3
3
  import { useQueries as z, useQuery as J } from "@tanstack/react-query";
4
4
  import { useRef as W, useEffect as S, useMemo as y } from "react";
5
5
  import { useTranslation as A } from "react-i18next";
@@ -1 +1 @@
1
- {"version":3,"file":"FormsTable.d.ts","sourceRoot":"","sources":["../../src/forms/FormsTable.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD;;;GAGG;AACH,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAuRrC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FormsTable.d.ts","sourceRoot":"","sources":["../../src/forms/FormsTable.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD;;;GAGG;AACH,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoRrC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -59397,7 +59397,18 @@ const ike = "_container_1ml42_1", ske = "_accordion_1ml42_5", lke = "_rows_1ml42
59397
59397
  }
59398
59398
  ) })
59399
59399
  }
59400
- ), $n = ({ testId: t, children: e, ...r }) => /* @__PURE__ */ ne(Mse, { ...r, "data-testid": t, children: e });
59400
+ ), $n = ({ testId: t, children: e, ...r }) => foe(
59401
+ /* @__PURE__ */ ne(
59402
+ "div",
59403
+ {
59404
+ id: "modal-root",
59405
+ "data-testid": "modal-root-test-id",
59406
+ "aria-label": "modal-root-aria-label",
59407
+ children: /* @__PURE__ */ ne(Mse, { ...r, "data-testid": t, children: e })
59408
+ }
59409
+ ),
59410
+ document.getElementById("main-display-area") ?? document.body
59411
+ );
59401
59412
  $n.Header = D3;
59402
59413
  $n.Body = jie;
59403
59414
  $n.Footer = Da;
@@ -59444,7 +59455,7 @@ const cke = "_thumbnailButton_u66io_1", dke = "_thumbnailImage_u66io_28", uke =
59444
59455
  )
59445
59456
  }
59446
59457
  ),
59447
- /* @__PURE__ */ ne(
59458
+ l && /* @__PURE__ */ ne(
59448
59459
  $n,
59449
59460
  {
59450
59461
  open: l,
@@ -59452,7 +59463,7 @@ const cke = "_thumbnailButton_u66io_1", dke = "_thumbnailImage_u66io_28", uke =
59452
59463
  modalHeading: a,
59453
59464
  passiveModal: !0,
59454
59465
  size: "lg",
59455
- id: `${r}-modal`,
59466
+ id: "modalIdForActionAreaLayout",
59456
59467
  testId: `${r}-modal-test-id`,
59457
59468
  children: /* @__PURE__ */ ne("div", { className: so.modalImageContainer, children: /* @__PURE__ */ ne(
59458
59469
  "img",
@@ -59524,7 +59535,7 @@ const cke = "_thumbnailButton_u66io_1", dke = "_thumbnailImage_u66io_28", uke =
59524
59535
  ]
59525
59536
  }
59526
59537
  ),
59527
- /* @__PURE__ */ ne(
59538
+ s && /* @__PURE__ */ ne(
59528
59539
  $n,
59529
59540
  {
59530
59541
  open: s,
@@ -59532,7 +59543,7 @@ const cke = "_thumbnailButton_u66io_1", dke = "_thumbnailImage_u66io_28", uke =
59532
59543
  modalHeading: n,
59533
59544
  passiveModal: !0,
59534
59545
  size: "lg",
59535
- id: `${e}-modal`,
59546
+ id: "modalIdForActionAreaLayout",
59536
59547
  testId: `${e}-modal-test-id`,
59537
59548
  children: /* @__PURE__ */ ne("div", { className: Pn.modalVideoContainer, children: /* @__PURE__ */ ne(
59538
59549
  "video",
@@ -74686,29 +74697,26 @@ const GJe = ({
74686
74697
  ] })
74687
74698
  ] }),
74688
74699
  v(),
74689
- g && i && foe(
74690
- /* @__PURE__ */ ne(
74691
- $n,
74692
- {
74693
- open: i,
74694
- onRequestClose: () => s(!1),
74695
- passiveModal: !0,
74696
- modalHeading: H,
74697
- testId: "attachments-modal",
74698
- size: "lg",
74699
- id: "modalIdForActionAreaLayout",
74700
- children: /* @__PURE__ */ ne($n.Body, { children: /* @__PURE__ */ ne("div", { className: Ut.attachmentsContainer, children: t.attachments.map((m, V) => /* @__PURE__ */ ne(
74701
- kJe,
74702
- {
74703
- attachment: m,
74704
- index: V + 1,
74705
- totalCount: t.attachments.length
74706
- },
74707
- m.id || V
74708
- )) }) })
74709
- }
74710
- ),
74711
- document.getElementById("actionAreaLayout") ?? document.body
74700
+ g && i && /* @__PURE__ */ ne(
74701
+ $n,
74702
+ {
74703
+ open: i,
74704
+ onRequestClose: () => s(!1),
74705
+ passiveModal: !0,
74706
+ modalHeading: H,
74707
+ testId: "attachments-modal",
74708
+ size: "lg",
74709
+ id: "modalIdForActionAreaLayout",
74710
+ children: /* @__PURE__ */ ne($n.Body, { children: /* @__PURE__ */ ne("div", { className: Ut.attachmentsContainer, children: t.attachments.map((m, V) => /* @__PURE__ */ ne(
74711
+ kJe,
74712
+ {
74713
+ attachment: m,
74714
+ index: V + 1,
74715
+ totalCount: t.attachments.length
74716
+ },
74717
+ m.id || V
74718
+ )) }) })
74719
+ }
74712
74720
  )
74713
74721
  ] });
74714
74722
  }, XJe = async (t, e, r, n, a) => {
@@ -76084,7 +76092,7 @@ const QGe = (t) => ["programs", t], eXe = async (t, e) => {
76084
76092
  {
76085
76093
  id: `program-details-${h}`,
76086
76094
  label: l[h],
76087
- value: d3e.includes(h) ? d(h) : h in a.attributes ? a.attributes[h] : "-"
76095
+ value: d3e.includes(h) ? d(h) : a?.attributes?.[h] ?? "-"
76088
76096
  }
76089
76097
  ) }, h)) })
76090
76098
  ]
@@ -76198,7 +76206,7 @@ const FXe = () => {
76198
76206
  },
76199
76207
  {
76200
76208
  type: "forms",
76201
- component: a1(() => import("./FormsTable-27SfK3Hl.js"))
76209
+ component: a1(() => import("./FormsTable-C2KLZRTw.js"))
76202
76210
  },
76203
76211
  {
76204
76212
  type: "labOrders",
@@ -76206,7 +76214,7 @@ const FXe = () => {
76206
76214
  },
76207
76215
  {
76208
76216
  type: "observations",
76209
- component: a1(() => import("./Observations-DWsuk40D.js"))
76217
+ component: a1(() => import("./Observations-DtvFoA_1.js"))
76210
76218
  },
76211
76219
  {
76212
76220
  type: "ordersControl",