@bahmni/clinical-app 0.0.1-dev.314 → 0.0.1-dev.316

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
- import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-b8sno1-Q.js";
1
+ import { jsx as r, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
+ import { n as Q, u as Y, o as W, U as J, a as X, g as Z, O as ee, h as te } from "./index-Cqbdtt4O.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as N, useMemo as p } 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,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, D] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = G(), { t: n } = W(), { addNotification: M } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
41
+ ), E = Q(), { t: n } = Y(), { addNotification: M } = W(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
42
42
  w(e), U(!0);
43
43
  }, []), H = _(() => {
44
44
  U(!1), w(null), D(/* @__PURE__ */ new Set());
@@ -106,7 +106,7 @@ const Te = [
106
106
  ), T = p(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), Q = _(
109
+ ), x = _(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -137,7 +137,7 @@ const Te = [
137
137
  },
138
138
  [L, n]
139
139
  );
140
- return /* @__PURE__ */ h(x, { children: [
140
+ return /* @__PURE__ */ h(G, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
@@ -148,7 +148,7 @@ const Te = [
148
148
  errorStateMessage: b ? y?.message : null,
149
149
  sortable: K,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
- renderCell: Q,
151
+ renderCell: x,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
@@ -1,30 +1,30 @@
1
- import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
2
- import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as k, w as fe, v as ye, h as he, Q as be, k as pe } from "./index-b8sno1-Q.js";
3
- import { useQueryClient as ge, useQuery as h } from "@tanstack/react-query";
4
- import { useState as j, useMemo as d, useCallback as b } from "react";
1
+ import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
2
+ import { u as ae, n as se, x as te, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as be, $ as ge } from "./index-Cqbdtt4O.js";
3
+ import { useQueryClient as pe, useQuery as h } from "@tanstack/react-query";
4
+ import { useState as w, useMemo as d, useCallback as b } from "react";
5
5
  const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: Oe
8
8
  }, Ae = (m) => m ? m.extension?.find(
9
- (l) => l.url === pe
9
+ (l) => l.url === ge
10
10
  )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: l,
13
- config: w
13
+ config: k
14
14
  }) => {
15
- const { t: n } = te(), c = oe(), [f, T] = j(!1), [o, v] = j(null), {
15
+ const { t: n } = ae(), c = se(), [f, T] = w(!1), [s, v] = w(null), {
16
16
  numberOfVisits: x,
17
- hideThumbnail: K = !1,
17
+ hideThumbnail: $ = !1,
18
18
  forms: y
19
- } = w ?? {}, F = se(
19
+ } = k ?? {}, F = te(
20
20
  m,
21
21
  l
22
- ), Q = ge(), {
22
+ ), K = pe(), {
23
23
  data: I = [],
24
24
  isLoading: B,
25
25
  isError: E,
26
- error: V,
27
- refetch: H
26
+ error: Q,
27
+ refetch: V
28
28
  } = h({
29
29
  queryKey: ["forms", c, m],
30
30
  queryFn: () => ne(c, void 0, x),
@@ -34,7 +34,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
34
34
  return l && l.length > 0 && (e = e.filter(
35
35
  (r) => l.includes(r.encounterUuid)
36
36
  )), Array.isArray(y) && y.length > 0 && (e = e.filter(
37
- (r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
37
+ (r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
39
  }, [I, l, y]), { data: D = [] } = h({
40
40
  queryKey: ["observationForms"],
@@ -42,43 +42,43 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
42
42
  }), S = b(
43
43
  (e) => D.find((r) => r.name === e)?.uuid,
44
44
  [D]
45
- ), p = d(() => {
46
- if (o)
47
- return S(o.formName);
48
- }, [o, S]), {
45
+ ), g = d(() => {
46
+ if (s)
47
+ return S(s.formName);
48
+ }, [s, S]), {
49
49
  data: u,
50
- isLoading: $,
50
+ isLoading: H,
51
51
  isError: z,
52
- error: g
52
+ error: p
53
53
  } = h({
54
- queryKey: ["formMetadata", p],
55
- queryFn: () => ie(p),
56
- enabled: !!p && f
54
+ queryKey: ["formMetadata", g],
55
+ queryFn: () => ie(g),
56
+ enabled: !!g && f
57
57
  }), {
58
58
  data: N,
59
59
  isLoading: G,
60
60
  isError: P,
61
61
  error: O
62
62
  } = h({
63
- queryKey: ["formsEncounterFHIR", o?.encounterUuid],
64
- queryFn: () => le(o.encounterUuid),
65
- enabled: !!o?.encounterUuid && f
63
+ queryKey: ["formsEncounterFHIR", s?.encounterUuid],
64
+ queryFn: () => le(s.encounterUuid),
65
+ enabled: !!s?.encounterUuid && f
66
66
  });
67
67
  ue(
68
68
  (e) => {
69
- e.patientUUID === c && e.updatedConcepts.size > 0 && (H(), Q.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
69
+ e.patientUUID === c && e.updatedConcepts.size > 0 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
70
70
  },
71
71
  [c]
72
72
  );
73
- const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
73
+ const Y = d(() => !N?.entry || !s?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
74
74
  const r = Ae(e);
75
- return !r || r.includes(o.formName);
76
- }), [N, o?.formName]), J = d(() => {
75
+ return !r || r.includes(s.formName);
76
+ }), [N, s?.formName]), J = d(() => {
77
77
  if (!u?.schema) return;
78
- const e = [], r = (a) => {
79
- (a ?? []).forEach((s) => {
80
- const t = s;
81
- t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
78
+ const e = [], r = (o) => {
79
+ (o ?? []).forEach((t) => {
80
+ const a = t;
81
+ a.id != null && e.push(String(a.id)), a.controls && r(a.controls);
82
82
  });
83
83
  };
84
84
  return r(
@@ -86,24 +86,24 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
86
86
  ), e.length > 0 ? e : void 0;
87
87
  }, [u]), W = d(() => {
88
88
  if (!u?.schema) return;
89
- const e = {}, r = (a, s) => {
90
- for (const t of a)
91
- if (t.type === "section") {
92
- const A = t.label?.value ?? "Section";
93
- r(t.controls ?? [], A);
89
+ const e = {}, r = (o, t) => {
90
+ for (const a of o)
91
+ if (a.type === "section") {
92
+ const A = a.label?.value ?? "Section";
93
+ r(a.controls ?? [], A);
94
94
  } else
95
- t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
95
+ a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
96
96
  };
97
97
  return r(
98
98
  u.schema.controls ?? [],
99
99
  null
100
100
  ), Object.keys(e).length > 0 ? e : void 0;
101
101
  }, [u]), X = d(() => {
102
- if (g)
103
- return q(g).message;
102
+ if (p)
103
+ return q(p).message;
104
104
  if (O)
105
105
  return q(O).message;
106
- }, [g, O]), _ = d(
106
+ }, [p, O]), _ = d(
107
107
  () => [
108
108
  { key: "recordedOn", header: n("RECORDED_ON") },
109
109
  { key: "recordedBy", header: n("RECORDED_BY") }
@@ -117,29 +117,29 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
117
117
  []
118
118
  ), C = d(() => {
119
119
  const e = L.reduce(
120
- (r, a) => {
121
- const s = a.formName;
122
- r[s] ??= [];
123
- const t = a.providers.map((A) => A.providerName).filter(Boolean).join(", ");
124
- return r[s].push({
125
- id: a.encounterUuid,
126
- formName: a.formName,
127
- recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
128
- recordedBy: t ?? "--",
129
- encounterDateTime: a.encounterDateTime,
130
- encounterUuid: a.encounterUuid
120
+ (r, o) => {
121
+ const t = o.formName;
122
+ r[t] ??= [];
123
+ const a = o.providers.map((A) => A.providerName).filter(Boolean).join(", ");
124
+ return r[t].push({
125
+ id: o.encounterUuid,
126
+ formName: o.formName,
127
+ recordedOn: me(o.encounterDateTime, n, !0).formattedResult,
128
+ recordedBy: a ?? "--",
129
+ encounterDateTime: o.encounterDateTime,
130
+ encounterUuid: o.encounterUuid
131
131
  }), r;
132
132
  },
133
133
  {}
134
134
  );
135
135
  return Object.entries(e).map(
136
- ([r, a]) => ({
136
+ ([r, o]) => ({
137
137
  formName: r,
138
- records: a.sort(
139
- (s, t) => t.encounterDateTime - s.encounterDateTime
138
+ records: o.sort(
139
+ (t, a) => a.encounterDateTime - t.encounterDateTime
140
140
  )
141
141
  })
142
- ).sort((r, a) => r.formName.localeCompare(a.formName));
142
+ ).sort((r, o) => r.formName.localeCompare(o.formName));
143
143
  }, [L, n]), R = b((e) => {
144
144
  v(e), T(!0);
145
145
  }, []), ee = b(() => {
@@ -157,57 +157,57 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
157
157
  },
158
158
  [R]
159
159
  );
160
- return /* @__PURE__ */ re(ae, { children: [
160
+ return /* @__PURE__ */ re(oe, { children: [
161
161
  /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || E || C.length === 0 || F ? /* @__PURE__ */ i(
162
- k,
162
+ j,
163
163
  {
164
164
  headers: _,
165
165
  ariaLabel: n("FORMS_HEADING"),
166
166
  rows: [],
167
167
  loading: B,
168
- errorStateMessage: E ? V?.message : void 0,
168
+ errorStateMessage: E ? Q?.message : void 0,
169
169
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
170
170
  renderCell: U,
171
171
  className: M.formsTableBody,
172
172
  dataTestId: "forms-table"
173
173
  }
174
174
  ) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
175
- const { formName: a, records: s } = e;
175
+ const { formName: o, records: t } = e;
176
176
  return /* @__PURE__ */ i(
177
177
  ye,
178
178
  {
179
- title: a,
179
+ title: o,
180
180
  className: M.customAccordianItem,
181
- testId: `accordian-title-${a}`,
181
+ testId: `accordian-title-${o}`,
182
182
  open: r === 0,
183
183
  children: /* @__PURE__ */ i(
184
- k,
184
+ j,
185
185
  {
186
186
  headers: _,
187
187
  ariaLabel: n("FORMS_HEADING"),
188
- rows: s,
188
+ rows: t,
189
189
  loading: !1,
190
190
  errorStateMessage: "",
191
191
  sortable: Z,
192
192
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
193
193
  renderCell: U,
194
194
  className: M.formsTableBody,
195
- dataTestId: `forms-table-${a}`
195
+ dataTestId: `forms-table-${o}`
196
196
  }
197
197
  )
198
198
  },
199
- a
199
+ o
200
200
  );
201
201
  }) }) }),
202
- f && o && /* @__PURE__ */ i(
202
+ f && s && /* @__PURE__ */ i(
203
203
  he,
204
204
  {
205
205
  id: "modalIdForActionAreaLayout",
206
206
  portalId: "main-display-area",
207
207
  open: f,
208
208
  onRequestClose: ee,
209
- modalHeading: o.formName,
210
- modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
209
+ modalHeading: s.formName,
210
+ modalLabel: `${s.recordedOn} | ${s.recordedBy}`,
211
211
  passiveModal: !0,
212
212
  size: "md",
213
213
  testId: "form-details-modal",
@@ -215,12 +215,12 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
215
215
  be,
216
216
  {
217
217
  observations: Y,
218
- isLoading: $ || G,
218
+ isLoading: H || G,
219
219
  isError: z || P,
220
220
  errorMessage: X,
221
221
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
222
- testIdPrefix: o.formName,
223
- hideThumbnail: K,
222
+ testIdPrefix: s.formName,
223
+ hideThumbnail: $,
224
224
  controlOrder: J,
225
225
  sectionMap: W
226
226
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-CIinz4Bh.js";
2
- import { i as d, l as f, m as e } from "./index-b8sno1-Q.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-HWEZ87Al.js";
2
+ import { i as d, l as f, m as e } from "./index-Cqbdtt4O.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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-CIinz4Bh.js";
2
- import { i as v, l as C, m as e } from "./index-b8sno1-Q.js";
1
+ import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-HWEZ87Al.js";
2
+ import { i as v, l as C, m as e } from "./index-Cqbdtt4O.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,7 +1,7 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { n as K, o as q, u as N, $ as G, Z as Q, b as k, J as w, X as x, c as z, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-b8sno1-Q.js";
2
+ import { n as k, o as K, u as N, k as Q, Z as q, b as G, J as x, X as z, c as w, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-Cqbdtt4O.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as O } from "react";
4
+ import { useRef as se, useEffect as $, useMemo as O } from "react";
5
5
  const D = (t, n, d, l, b, r) => {
6
6
  const a = j(t, n, b), s = a.value, o = P(s);
7
7
  let i = s;
@@ -113,14 +113,14 @@ const D = (t, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = q(), { t: o } = N(), i = te({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = K(), { t: o } = N(), i = te({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => G(e),
119
+ queryFn: () => Q(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- _(() => {
123
+ $(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
126
  const V = d[h];
@@ -139,32 +139,32 @@ const D = (t, n, d, l, b, r) => {
139
139
  refetch: T
140
140
  } = ae({
141
141
  queryKey: le(a, p),
142
- queryFn: () => Q(a, p),
142
+ queryFn: () => q(a, p),
143
143
  enabled: !!a && p.length > 0 && y
144
144
  });
145
- k(
145
+ G(
146
146
  (e) => {
147
147
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
149
  ) && T();
150
150
  },
151
151
  [a, T]
152
- ), _(() => {
152
+ ), $(() => {
153
153
  R && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
158
  }, [R]);
159
- const $ = O(() => {
159
+ const f = O(() => {
160
160
  if (!c) return [];
161
- const e = w(c), h = x(e);
162
- return z(h);
161
+ const e = x(c), h = z(e);
162
+ return w(h);
163
163
  }, [c]), L = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], f = F || !y, g = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = g ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !f && !g, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], g = F || !y, _ = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ I(
169
169
  "div",
170
170
  {
@@ -186,7 +186,7 @@ const D = (t, n, d, l, b, r) => {
186
186
  B ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: $,
189
+ groupedData: f,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
@@ -196,7 +196,7 @@ const D = (t, n, d, l, b, r) => {
196
196
  headers: L,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: f,
199
+ loading: g,
200
200
  errorStateMessage: C,
201
201
  emptyStateMessage: U,
202
202
  dataTestId: "observations-table"
@@ -1,4 +1,4 @@
1
- import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-b8sno1-Q.js";
1
+ import { p as we, q as z, r as xt, s as B, l as q, m as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-Cqbdtt4O.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAsBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0fnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAsBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2fnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -7,6 +7,7 @@ interface ObservationFormsContainerProps {
7
7
  onRemoveForm?: (formUuid: string) => void;
8
8
  onFormObservationsChange?: (formUuid: string, observations: Form2Observation[], validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR) => void;
9
9
  existingObservations?: Form2Observation[];
10
+ activeEncounterUuid?: string | null;
10
11
  }
11
12
  declare const ObservationFormsContainer: React.FC<ObservationFormsContainerProps>;
12
13
  export default ObservationFormsContainer;
@@ -1 +1 @@
1
- {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAMjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAQlC,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,KACrC,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC3C;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAmXvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAUjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAgBlC,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,KACrC,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAgavE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { PatientData } from '@bahmni/form2-controls';
1
2
  import { Form2Observation, FormMetadata } from '@bahmni/services';
2
3
  type FormDataRecord = Record<string, unknown> & {
3
4
  control?: Record<string, unknown> & {
@@ -19,6 +20,6 @@ type FormDataRecord = Record<string, unknown> & {
19
20
  value?: unknown;
20
21
  children?: FormDataRecord[];
21
22
  };
22
- export declare const executeOnFormSaveEvent: (metadata: FormMetadata, observations: Form2Observation[], patientUuid: string, formData?: FormDataRecord) => Form2Observation[];
23
+ export declare const executeOnFormSaveEvent: (metadata: FormMetadata, observations: Form2Observation[], patient: PatientData, formData?: FormDataRecord) => Form2Observation[];
23
24
  export {};
24
25
  //# sourceMappingURL=formEventExecutor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formEventExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/observations/utils/formEventExecutor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUlE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,KAAK,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,YAAY,EACtB,cAAc,gBAAgB,EAAE,EAChC,aAAa,MAAM,EACnB,WAAW,cAAc,KACxB,gBAAgB,EAkDlB,CAAC"}
1
+ {"version":3,"file":"formEventExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/observations/utils/formEventExecutor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUlE,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAClC,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,KAAK,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5B,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,YAAY,EACtB,cAAc,gBAAgB,EAAE,EAChC,SAAS,WAAW,EACpB,WAAW,cAAc,KACxB,gBAAgB,EAkDlB,CAAC"}