@bahmni/clinical-app 0.0.1-dev.425 → 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,10 +1,10 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { u as useTranslation, V, E as ENCOUNTER_CONCEPTS_URL, G as Gr, s as wWt, A as As, x as BAHMNI_USER_LOCATION_COOKIE_NAME, I as Xm, L as up, g as g0, M as vb2, N as Eb2, T as mb2, _ as Wx2, a0 as ll1, a1 as pb2, a2 as t0, a3 as Vi, a4 as zd, a5 as UE, a6 as Bd, a7 as Os, a8 as dist, a9 as nt, aa as we, ab as as, ac as m_, ad as O_, ae as A_, af as Vb2, ag as bb2, ah as Rz2, z as z1, h as hp, ai as P_, aj as Fy2, ak as tb2, al as jb2, am as $b2, an as Ab2, l as ln1, ao as nb, ap as wb2, aq as Rb, ar as Ls, as as ab, at as Wb, au as S_, av as nb2, aw as L_, ax as U_, ay as CLINICAL_V2_CONFIG_BASE_URL, az as H_, aA as i0, aB as un, aC as q_, aD as y_, aE as Jb, aF as aL2, aG as ib, aH as V_, aI as B_, aJ as Zb, aK as ub2, aL as fv, aM as p_, aN as z_, aO as Rt, aP as Vr, aQ as ov, aR as lv, Z as Zr, aS as Nb, aT as ub, aU as hb, $ as $Gt, aV as Pb2, aW as Fb2, aX as Cb, aY as Db, aZ as yb2, a_ as se, a$ as STOP_REASON_VALUESET_EXPAND_URL, b0 as Be, b1 as qE, b2 as STOP_REASON_VALUESET_TITLE, b3 as If, b4 as rs, b5 as kb2, b6 as Ib, b7 as Lb, b8 as _0, b9 as f_, ba as E0, bb as cn, bc as N4, bd as c3, be as Ob2, bf as WE, bg as xb, bh as Mb, bi as Ub, bj as Fb, bk as ji, bl as os, bm as Eb, bn as I_, bo as dv, bp as Qb, bq as Xb, br as Kb, bs as CDSS_SERVER_CONFIG_URL, bt as C_, bu as Yi, bv as J0, bw as et, bx as hn1, by as _b2, bz as vw, bA as _b, bB as bb, bC as hb2, bD as Xt, bE as Sb, bF as Tb, bG as vb, bH as Yr1, bI as Wr1, bJ as v0, bK as Ob, bL as Ni, bM as CE, bN as BAHMNI_CLINICAL_PATH, bO as ZE, bP as Pw, bQ as zb2, bR as Lb2, bS as bz2, bT as Y01, bU as XE, bV as an1 } from "./index-ksRzXiTW.js";
2
+ import { u as useTranslation, V, E as ENCOUNTER_CONCEPTS_URL, G as Gr, B as wWt, I as As, J as BAHMNI_USER_LOCATION_COOKIE_NAME, X as Xm, L as up, g as g0, M as vb2, N as Eb2, O as mb2, P as Wx2, T as ll1, _ as pb2, a0 as t0, a1 as Vi, a2 as zd, a3 as UE, a4 as Bd, a5 as Os, a6 as dist, a7 as nt, a8 as we, a9 as as, aa as m_, ab as O_, ac as A_, ad as Vb2, ae as bb2, af as Rz2, z as z1, h as hp, ag as P_, ah as Fy2, ai as tb2, aj as jb2, ak as $b2, al as Ab2, d as dn1, am as nb, an as wb2, ao as Rb, ap as Ls, aq as ab, ar as Wb, as as S_, at as nb2, au as L_, av as U_, aw as CLINICAL_V2_CONFIG_BASE_URL, ax as H_, ay as i0, az as un, aA as q_, aB as y_, aC as Jb, aD as aL2, aE as ib, aF as V_, aG as B_, aH as Zb, aI as ub2, aJ as fv, aK as p_, aL as z_, aM as Rt, aN as Vr, aO as ov, aP as lv, Z as Zr, aQ as Nb, aR as ub, aS as hb, $ as $Gt, aT as Pb2, aU as Fb2, aV as Cb, aW as Db, aX as yb2, aY as se, aZ as STOP_REASON_VALUESET_EXPAND_URL, a_ as Be, a$ as qE, b0 as STOP_REASON_VALUESET_TITLE, b1 as If, b2 as rs, b3 as kb2, b4 as Ib, b5 as Lb, b6 as _0, b7 as f_, b8 as E0, b9 as cn, ba as N4, bb as c3, bc as Ob2, bd as WE, be as xb, bf as Mb, bg as Ub, bh as Fb, bi as ji, bj as os, bk as Eb, bl as I_, bm as dv, bn as Qb, bo as Xb, bp as Kb, bq as CDSS_SERVER_CONFIG_URL, br as C_, bs as Yi, bt as J0, bu as et, bv as fn1, bw as _b2, bx as vw, by as _b, bz as bb, bA as hb2, bB as Xt, bC as Sb, bD as Tb, bE as vb, bF as Xr1, bG as Gr1, bH as v0, bI as Ob, bJ as Ni, bK as CE, bL as BAHMNI_CLINICAL_PATH, bM as ZE, bN as Pw, bO as zb2, bP as Lb2, bQ as bz2, bR as X01, bS as XE, bT as sn1 } from "./index-DtI3QOMb.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-D9PIGcVh.js";
7
+ import { u as useClinicalConfig } from "./hook-CPPANRiZ.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 : {};
@@ -139846,9 +139846,9 @@ const allergiesFormTile = "AllergiesForm-module_allergiesFormTile__1UsbU", aller
139846
139846
  duplicateNotification: duplicateNotification$2
139847
139847
  }, allergiesQueryKeys = (p) => ["allergies", p], AllergiesForm = React__default.memo(({ encounterSessionStartContext: p }) => {
139848
139848
  const c = !!p?.preloadedAllergies, { t: a } = useTranslation(), s = g0(), { addNotification: f } = z1(), d = hp(
139849
- ln1.ALLERGIES
139849
+ dn1.ALLERGIES
139850
139850
  ), h = hp(
139851
- ln1.EDIT_ALLERGIES
139851
+ dn1.EDIT_ALLERGIES
139852
139852
  ), [E, g] = useState(""), [R, T] = useState(null), [M, x] = useState(!1), [I, k] = useState(
139853
139853
  null
139854
139854
  ), {
@@ -140171,7 +140171,7 @@ const investigationsFormTile = "InvestigationsForm-module_investigationsFormTile
140171
140171
  duplicateNotification: duplicateNotification$1
140172
140172
  }, InvestigationsForm = React__default.memo(() => {
140173
140173
  const { t: p } = useTranslation(), c = g0(), { addNotification: a } = z1(), s = hp(
140174
- ln1.INVESTIGATIONS
140174
+ dn1.INVESTIGATIONS
140175
140175
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), { activeEncounter: T, matchReasons: M } = Rb(), I = M.includes("MATCHED") ? T?.id : void 0, {
140176
140176
  data: k,
140177
140177
  refetch: N,
@@ -140584,7 +140584,7 @@ const conditionsAndDiagnosesTile = "ConditionsAndDiagnoses-module_conditionsAndD
140584
140584
  duplicateNotification
140585
140585
  }, ConditionsAndDiagnoses = React__default.memo(() => {
140586
140586
  const { t: p } = useTranslation(), c = g0(), { addNotification: a } = z1(), s = hp(
140587
- ln1.CONDITIONS_AND_DIAGNOSES
140587
+ dn1.CONDITIONS_AND_DIAGNOSES
140588
140588
  ), [f, d] = useState(""), [h, E] = useState(null), [g, R] = useState(!1), {
140589
140589
  selectedDiagnoses: T,
140590
140590
  selectedConditions: M,
@@ -143564,7 +143564,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143564
143564
  submittedFormUuids: R = EMPTY_SET
143565
143565
  }) => {
143566
143566
  const { t: T } = useTranslation(), M = hp(
143567
- ln1.OBSERVATIONS
143567
+ dn1.OBSERVATIONS
143568
143568
  ), [x, I] = useState(""), [k, N] = useState(null), { getFormData: S } = useObservationFormsStore(), Z = useMemo(() => {
143569
143569
  if (!x.trim()) return h;
143570
143570
  const oe = x.toLowerCase().trim().split(/\s+/);
@@ -145244,7 +145244,7 @@ const ConsultationPad = ({
145244
145244
  onToggleActionAreaExpand: s
145245
145245
  }) => {
145246
145246
  const { t: f } = useTranslation(), { addNotification: d } = z1(), h = g0(), { activeEpisodeId: E } = useClinicalAppData(), { clinicalConfig: g, isLoading: R } = useClinicalConfig(), { encounterConcepts: T } = useEncounterConcepts(), M = hp(
145247
- ln1.ADD_VISITS
145247
+ dn1.ADD_VISITS
145248
145248
  ), x = useActionAreaExpandProps({
145249
145249
  isExpanded: a,
145250
145250
  onToggleExpand: s
@@ -145410,7 +145410,7 @@ const ConsultationPad = ({
145410
145410
  visitUuids: f
145411
145411
  }) => {
145412
145412
  const { t: d } = useTranslation(), { matchReasons: h, canEditOrCreate: E, activeEncounter: g } = Rb(), R = h.includes("NO_ACTIVE_VISIT"), T = h.includes("MATCHED"), x = h.includes("MATCHED") ? g?.id ?? null : null, I = (N, S, Z) => {
145413
- const B = hn1(N.type);
145413
+ const B = fn1(N.type);
145414
145414
  if (!B)
145415
145415
  return /* @__PURE__ */ jsx("div", { className: styles$4.widgetError, children: /* @__PURE__ */ jsx("p", { children: d("CONTROL_NOT_FOUND", { type: N.type }) }) }, `${N.type}-${S}`);
145416
145416
  const z = S < Z - 1;
@@ -145603,7 +145603,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145603
145603
  }) => {
145604
145604
  const { t: s } = useTranslation();
145605
145605
  return hp(
145606
- ln1.ENCOUNTER
145606
+ dn1.ENCOUNTER
145607
145607
  ) ? a ? /* @__PURE__ */ jsx(
145608
145608
  hb2,
145609
145609
  {
@@ -145681,7 +145681,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145681
145681
  "data-active-encounter-uuid": T && M?.id ? M.id : void 0,
145682
145682
  "data-active-practitioner-uuid": s?.uuid ?? void 0,
145683
145683
  children: [
145684
- /* @__PURE__ */ jsx(Yr1, {}),
145684
+ /* @__PURE__ */ jsx(Xr1, {}),
145685
145685
  /* @__PURE__ */ jsxs("div", { className: styles$2.actionButtons, children: [
145686
145686
  /* @__PURE__ */ jsx(
145687
145687
  ConsultationActionButton,
@@ -145692,7 +145692,7 @@ const CONSULTATION_START_EVENT = "startConsultation", dispatchConsultationStart
145692
145692
  }
145693
145693
  ),
145694
145694
  /* @__PURE__ */ jsx(
145695
- Wr1,
145695
+ Gr1,
145696
145696
  {
145697
145697
  printOptions: c,
145698
145698
  renderContext: z,
@@ -146045,7 +146045,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146045
146045
  const Ae = () => {
146046
146046
  const Ie = I.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
146047
146047
  return Ie && c.contextInformation?.program ? /* @__PURE__ */ jsx(
146048
- an1,
146048
+ sn1,
146049
146049
  {
146050
146050
  programUUID: Ie,
146051
146051
  config: {
@@ -146064,7 +146064,7 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
146064
146064
  {
146065
146065
  breadcrumbItems: X,
146066
146066
  globalActions: S,
146067
- userMenu: /* @__PURE__ */ jsx(Y01, {}),
146067
+ userMenu: /* @__PURE__ */ jsx(X01, {}),
146068
146068
  sideNavItems: E ? [] : ne,
146069
146069
  activeSideNavItemId: Ee,
146070
146070
  onSideNavItemClick: ye,
@@ -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, U as J, K as X, w as Z, Y as ee, p as te } from "./index-ksRzXiTW.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, V] = l(k), [F, 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
- }, []), H = 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: q, isError: y, error: b } = ae({
47
+ }, []), { data: i, isLoading: H, isError: y, error: b } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  E,
@@ -144,7 +144,7 @@ const Te = [
144
144
  headers: j,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
146
  rows: K,
147
- loading: q,
147
+ loading: H,
148
148
  errorStateMessage: y ? b?.message : null,
149
149
  sortable: P,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
@@ -152,7 +152,7 @@ const Te = [
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
155
- totalItems: F,
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: H,
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-CcZ2-18K.js";
2
- import { b$ as d, c0 as f, c1 as e } from "./index-ksRzXiTW.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-CcZ2-18K.js";
2
- import { b$ as v, c0 as C, c1 as e } from "./index-ksRzXiTW.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"