@bahmni/clinical-app 0.0.1-dev.325 → 0.0.1-dev.328

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.
Files changed (30) hide show
  1. package/dist/{ConsultationPage-veadoKKn.js → ConsultationPage-BLvxF8kV.js} +16671 -15458
  2. package/dist/{DocumentsTable-DEMSFjaR-4O-XPd0Q.js → DocumentsTable-Cd0rZQF3-CAeFGxaz.js} +11 -11
  3. package/dist/{FormsTable-DMc11j4e-CTExfA42.js → FormsTable-CgyxKp9V-fNe7NXXc.js} +32 -32
  4. package/dist/{LNWAZHJI-ChUeeDXZ.js → LNWAZHJI-SQd0D-eQ.js} +2 -2
  5. package/dist/{MWZ6AO7Z-DEy3kmtN.js → MWZ6AO7Z-P43V0sDv.js} +2 -2
  6. package/dist/{Observations-Cy5krW_v-BVQYtQCK.js → Observations-3VgJK5Ks-BF9if6iv.js} +36 -36
  7. package/dist/{YPM2AS64-CiGBMGOA.js → YPM2AS64-Cqh6aPgw.js} +1 -1
  8. package/dist/components/consultationPad/index.d.ts.map +1 -1
  9. package/dist/components/consultationPad/utils.d.ts +1 -0
  10. package/dist/components/consultationPad/utils.d.ts.map +1 -1
  11. package/dist/components/forms/observations/ObservationFormsContainer.d.ts +7 -1
  12. package/dist/components/forms/observations/ObservationFormsContainer.d.ts.map +1 -1
  13. package/dist/components/forms/observations/ObservationFormsPanel.d.ts +5 -1
  14. package/dist/components/forms/observations/ObservationFormsPanel.d.ts.map +1 -1
  15. package/dist/{hook-By86Vcmq.js → hook-DE7_WRwf.js} +1 -1
  16. package/dist/{index-BMr_A7ej.js → index-BHPHdADf.js} +18825 -18727
  17. package/dist/{index-CzGCg-Cz.js → index-DEe43Szm.js} +1 -1
  18. package/dist/{index-DyxK6V4W.js → index-DSm8uWLC.js} +3 -3
  19. package/dist/index.js +1 -1
  20. package/dist/locales/locale_en.json +1 -0
  21. package/dist/locales/locale_es.json +1 -0
  22. package/dist/services/encounterBundleService.d.ts +5 -1
  23. package/dist/services/encounterBundleService.d.ts.map +1 -1
  24. package/dist/stores/index.d.ts +1 -0
  25. package/dist/stores/index.d.ts.map +1 -1
  26. package/dist/stores/observationFormsStore.d.ts +8 -2
  27. package/dist/stores/observationFormsStore.d.ts.map +1 -1
  28. package/dist/utils/fhir/observationResourceCreator.d.ts +1 -1
  29. package/dist/utils/fhir/observationResourceCreator.d.ts.map +1 -1
  30. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Q } from "react/jsx-runtime";
2
- import { n as G, u as W, o as Y, c as J, a as X, g as Z, O as ee, p as te } from "./index-BMr_A7ej.js";
2
+ import { n as G, u as W, o as Y, w as J, f as X, g as Z, O as ee, p as te } from "./index-BHPHdADf.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as N, 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 = {
@@ -33,7 +33,7 @@ const Te = [
33
33
  "attachments",
34
34
  "uploadedOn",
35
35
  "uploadedBy"
36
- ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Oe = ({ config: a, encounterUuids: g }) => {
36
+ ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
37
37
  const [s, w] = l(!1), [o, U] = l(
38
38
  null
39
39
  ), [$, D] = l(
@@ -82,8 +82,8 @@ const Te = [
82
82
  method: "HEAD",
83
83
  signal: e.signal
84
84
  })).ok || t.add(c);
85
- } catch (f) {
86
- f instanceof Error && f.name !== "AbortError" && t.add(c);
85
+ } catch (O) {
86
+ O instanceof Error && O.name !== "AbortError" && t.add(c);
87
87
  }
88
88
  }
89
89
  e.signal.aborted || D(t);
@@ -94,15 +94,15 @@ const Te = [
94
94
  t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
- ), O = _(
97
+ ), f = _(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), P = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), x = _(() => ie(O, n), [O, n]), z = _(
101
- () => O.map((e) => ({
100
+ ), P = _(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), x = _(() => ie(f, n), [f, n]), z = _(
101
+ () => f.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
104
104
  })),
105
- [O]
105
+ [f]
106
106
  ), T = _(
107
107
  () => o ? B(o) : [],
108
108
  [o]
@@ -169,8 +169,8 @@ const Te = [
169
169
  size: "lg",
170
170
  testId: "document-view-modal",
171
171
  children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
172
- const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), f = $.has(t);
173
- return m === "#" || f ? /* @__PURE__ */ p(
172
+ const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = $.has(t);
173
+ return m === "#" || O ? /* @__PURE__ */ p(
174
174
  "div",
175
175
  {
176
176
  className: d.attachmentError,
@@ -223,5 +223,5 @@ const Te = [
223
223
  ] });
224
224
  };
225
225
  export {
226
- Oe as default
226
+ fe as default
227
227
  };
@@ -1,42 +1,42 @@
1
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, l as ne, i as de, s as ie, b as le, d as ue, D as x, g as me, a as ce, O as q, w as fe, v as ye, p as be, e as pe, r as ge } from "./index-BMr_A7ej.js";
2
+ import { u as te, n as oe, N as se, a as ne, e as de, m as ie, b as le, j as me, D as q, g as ue, f as ce, O as x, v as fe, E as ye, p as be, c as pe, d as ge } from "./index-BHPHdADf.js";
3
3
  import { useQueryClient as he, useQuery as b } from "@tanstack/react-query";
4
- import { useState as w, useMemo as d, useCallback as p } from "react";
4
+ import { useState as j, useMemo as d, useCallback as p } from "react";
5
5
  const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", v = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: Oe
8
- }, Ae = (m) => m ? m.extension?.find(
8
+ }, Ae = (u) => u ? u.extension?.find(
9
9
  (l) => l.url === ge
10
- )?.valueString : void 0, Ee = ({
11
- episodeOfCareUuids: m,
10
+ )?.valueString : void 0, De = ({
11
+ episodeOfCareUuids: u,
12
12
  encounterUuids: l,
13
13
  config: k
14
14
  }) => {
15
- const { t: n } = te(), c = oe(), [f, I] = w(!1), [o, T] = w(null), {
16
- numberOfVisits: j,
15
+ const { t: n } = te(), c = oe(), [f, E] = j(!1), [o, I] = j(null), {
16
+ numberOfVisits: w,
17
17
  hideThumbnail: H = !1,
18
18
  forms: y
19
- } = k ?? {}, D = se(
20
- m,
19
+ } = k ?? {}, T = se(
20
+ u,
21
21
  l
22
22
  ), K = he(), {
23
- data: E = [],
23
+ data: D = [],
24
24
  isLoading: F,
25
25
  isError: L,
26
26
  error: V,
27
27
  refetch: $
28
28
  } = b({
29
- queryKey: ["forms", c, m],
30
- queryFn: () => ne(c, void 0, j),
31
- enabled: !!c && !D
29
+ queryKey: ["forms", c, u],
30
+ queryFn: () => ne(c, void 0, w),
31
+ enabled: !!c && !T
32
32
  }), B = d(() => {
33
- let e = E;
33
+ let e = D;
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
37
  (r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
- }, [E, l, y]), { data: M = [] } = b({
39
+ }, [D, l, y]), { data: M = [] } = b({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => de()
42
42
  }), S = p(
@@ -46,7 +46,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
46
46
  if (o)
47
47
  return S(o.formName);
48
48
  }, [o, S]), {
49
- data: u,
49
+ data: m,
50
50
  isLoading: z,
51
51
  isError: G,
52
52
  error: h
@@ -64,7 +64,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
64
64
  queryFn: () => le(o.encounterUuid),
65
65
  enabled: !!o?.encounterUuid && f
66
66
  });
67
- ue(
67
+ me(
68
68
  (e) => {
69
69
  e.patientUUID === c && e.updatedConcepts.size > 0 && ($(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
70
70
  },
@@ -74,7 +74,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
74
74
  const r = Ae(e);
75
75
  return !r || r.includes(o.formName);
76
76
  }), [N, o?.formName]), P = d(() => {
77
- if (!u?.schema) return;
77
+ if (!m?.schema) return;
78
78
  const e = [], r = (a) => {
79
79
  (a ?? []).forEach((s) => {
80
80
  const t = s;
@@ -82,10 +82,10 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
82
82
  });
83
83
  };
84
84
  return r(
85
- u.schema.controls ?? []
85
+ m.schema.controls ?? []
86
86
  ), e.length > 0 ? e : void 0;
87
- }, [u]), W = d(() => {
88
- if (!u?.schema) return;
87
+ }, [m]), W = d(() => {
88
+ if (!m?.schema) return;
89
89
  const e = {}, r = (a, s) => {
90
90
  for (const t of a)
91
91
  if (t.type === "section") {
@@ -95,14 +95,14 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
95
95
  t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
96
96
  };
97
97
  return r(
98
- u.schema.controls ?? [],
98
+ m.schema.controls ?? [],
99
99
  null
100
100
  ), Object.keys(e).length > 0 ? e : void 0;
101
- }, [u]), X = d(() => {
101
+ }, [m]), X = d(() => {
102
102
  if (h)
103
- return x(h).message;
103
+ return q(h).message;
104
104
  if (O)
105
- return x(O).message;
105
+ return q(O).message;
106
106
  }, [h, O]), _ = d(
107
107
  () => [
108
108
  { key: "recordedOn", header: n("RECORDED_ON") },
@@ -124,7 +124,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
124
124
  return r[s].push({
125
125
  id: a.encounterUuid,
126
126
  formName: a.formName,
127
- recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
127
+ recordedOn: ue(a.encounterDateTime, n, !0).formattedResult,
128
128
  recordedBy: t ?? "--",
129
129
  encounterDateTime: a.encounterDateTime,
130
130
  encounterUuid: a.encounterUuid
@@ -141,9 +141,9 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
141
141
  })
142
142
  ).sort((r, a) => r.formName.localeCompare(a.formName));
143
143
  }, [B, n]), R = p((e) => {
144
- T(e), I(!0);
144
+ I(e), E(!0);
145
145
  }, []), ee = p(() => {
146
- I(!1), T(null);
146
+ E(!1), I(null);
147
147
  }, []), U = p(
148
148
  (e, r) => {
149
149
  switch (r) {
@@ -158,8 +158,8 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
158
158
  [R]
159
159
  );
160
160
  return /* @__PURE__ */ re(ae, { children: [
161
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || L || C.length === 0 || D ? /* @__PURE__ */ i(
162
- q,
161
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: F || L || C.length === 0 || T ? /* @__PURE__ */ i(
162
+ x,
163
163
  {
164
164
  headers: _,
165
165
  ariaLabel: n("FORMS_HEADING"),
@@ -181,7 +181,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
181
181
  testId: `accordian-title-${a}`,
182
182
  open: r === 0,
183
183
  children: /* @__PURE__ */ i(
184
- q,
184
+ x,
185
185
  {
186
186
  headers: _,
187
187
  ariaLabel: n("FORMS_HEADING"),
@@ -230,5 +230,5 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
230
230
  ] });
231
231
  };
232
232
  export {
233
- Ee as default
233
+ De as default
234
234
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CiGBMGOA.js";
2
- import { bC as d, bD as f, bE as e } from "./index-BMr_A7ej.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Cqh6aPgw.js";
2
+ import { bC as d, bD as f, bE as e } from "./index-BHPHdADf.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-CiGBMGOA.js";
2
- import { bC as C, bD as v, bE as e } from "./index-BMr_A7ej.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-Cqh6aPgw.js";
2
+ import { bC as C, bD as v, bE as e } from "./index-BHPHdADf.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,12 +1,12 @@
1
1
  import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { n as q, o as K, u as N, f as k, h as M, d as Q, m as w, j as z, k as j, q as G, O as H, t as P, I as C, y as Z, C as J, z as Y, A as W, Z as X, B as ee } from "./index-BMr_A7ej.js";
2
+ import { n as B, o as M, u as N, h as K, i as k, j as H, H as Q, M as j, x as P, k as w, O as G, V as z, q as x, l as J, C as Y, r as W, _ as X, P as Z, R as ee } from "./index-BHPHdADf.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";
5
- const x = (t, n, d, l, b, r) => {
6
- const a = Z(t, n, b), s = a.value, o = J(s);
4
+ import { useRef as se, useEffect as $, useMemo as E } from "react";
5
+ const C = (t, n, d, l, b, r) => {
6
+ const a = J(t, n, b), s = a.value, o = Y(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
- W,
9
+ X,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
@@ -14,7 +14,7 @@ const x = (t, n, d, l, b, r) => {
14
14
  hideThumbnail: r
15
15
  }
16
16
  )), o === "Video" && (i = /* @__PURE__ */ u(
17
- X,
17
+ Z,
18
18
  {
19
19
  id: `${s}-video`,
20
20
  videoSrc: s,
@@ -25,7 +25,7 @@ const x = (t, n, d, l, b, r) => {
25
25
  provider: a.provider
26
26
  }), p = t.display, y = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ W,
29
29
  {
30
30
  header: a.header,
31
31
  value: i,
@@ -37,13 +37,13 @@ const x = (t, n, d, l, b, r) => {
37
37
  `obs-${t.id}`
38
38
  );
39
39
  }, re = (t, n, d, l, b, r, a) => /* @__PURE__ */ u(
40
- C,
40
+ x,
41
41
  {
42
42
  title: t.display,
43
43
  id: `grouped-obs-${t.display}-${l}`,
44
44
  open: d,
45
45
  children: t.members?.map(
46
- (s, o) => x(
46
+ (s, o) => C(
47
47
  s,
48
48
  o,
49
49
  b,
@@ -60,16 +60,16 @@ const x = (t, n, d, l, b, r) => {
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = N(), b = (r, a, s) => {
63
- const o = P(r.encounterDetails, l);
63
+ const o = z(r.encounterDetails, l);
64
64
  return /* @__PURE__ */ S(
65
- C,
65
+ x,
66
66
  {
67
67
  title: o,
68
68
  id: `encounter-${r.encounterId}`,
69
69
  open: a,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => x(
72
+ (i, m) => C(
73
73
  i,
74
74
  m,
75
75
  s,
@@ -113,36 +113,36 @@ const x = (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 = q(), { addNotification: s } = K(), { t: o } = N(), i = te({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = M(), { t: o } = N(), i = te({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => k(e),
119
+ queryFn: () => K(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
- const V = d[h];
126
+ const q = d[h];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: V }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
133
133
  });
134
134
  }, [i, d]);
135
- const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
135
+ const m = E(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = E(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = E(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: A,
138
- isError: R,
137
+ isLoading: D,
138
+ isError: O,
139
139
  refetch: T
140
140
  } = ae({
141
141
  queryKey: le(a, p),
142
- queryFn: () => M(a, p),
142
+ queryFn: () => k(a, p),
143
143
  enabled: !!a && p.length > 0 && y
144
144
  });
145
- Q(
145
+ H(
146
146
  (e) => {
147
147
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
@@ -150,34 +150,34 @@ const x = (t, n, d, l, b, r) => {
150
150
  },
151
151
  [a, T]
152
152
  ), $(() => {
153
- R && s({
153
+ O && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
- }, [R]);
159
- const f = O(() => {
158
+ }, [O]);
159
+ const _ = E(() => {
160
160
  if (!c) return [];
161
- const e = w(c), h = z(e);
162
- return j(h);
163
- }, [c]), D = [
161
+ const e = Q(c), h = j(e);
162
+ return P(h);
163
+ }, [c]), F = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], g = A || !y, _ = R && y, F = (!c || c.entry?.length === 0 || p.length === 0) && y, L = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, B = F ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], g = D || !y, f = O && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, A = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = _.length > 0 && !g && !f, R = n.titleTranslationKey, v = R ? o(R) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
- "data-testid": E ? `observations-${v}` : "observations",
172
+ "data-testid": R ? `observations-${v}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- G,
177
+ w,
178
178
  {
179
179
  id: "observations-title",
180
- testId: E ? `observations-title-${v}` : "observations-title",
180
+ testId: R ? `observations-title-${v}` : "observations-title",
181
181
  title: v,
182
182
  className: I.title,
183
183
  children: /* @__PURE__ */ u("p", { children: v })
@@ -186,19 +186,19 @@ const x = (t, n, d, l, b, r) => {
186
186
  U ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: f,
189
+ groupedData: _,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- H,
194
+ G,
195
195
  {
196
- headers: D,
196
+ headers: F,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
199
  loading: g,
200
- errorStateMessage: L,
201
- emptyStateMessage: B,
200
+ errorStateMessage: A,
201
+ emptyStateMessage: V,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { bF as we, bG as z, bH as xt, bI as B, bD as q, bE as y, bJ as Ro, bK as ye, bL as R, bM as _, bN as k, bO as N, bP as A, bQ as bs, bR as ir, bS as $e, bT as U, bU as Hn, bV as Vn, bW as dt, bX as D, bY as xs, bZ as cn, b_ as Be, b$ as ws, c0 as qt, c1 as zt, c2 as $s, c3 as Cs, c4 as $n, c5 as Ss, c6 as Nr, c7 as Bt, c8 as zo, c9 as ks, ca as Es, cb as j, cc as Ur, cd as Ms, ce as Ds, cf as sr, cg as As, ch as Ts, ci as zn, cj as Fs, ck as Is, cl as Z, cm as Ps, cn as Ls } from "./index-BMr_A7ej.js";
1
+ import { bF as we, bG as z, bH as xt, bI as B, bD as q, bE as y, bJ as Ro, bK as ye, bL as R, bM as _, bN as k, bO as N, bP as A, bQ as bs, bR as ir, bS as $e, bT as U, bU as Hn, bV as Vn, bW as dt, bX as D, bY as xs, bZ as cn, b_ as Be, b$ as ws, c0 as qt, c1 as zt, c2 as $s, c3 as Cs, c4 as $n, c5 as Ss, c6 as Nr, c7 as Bt, c8 as zo, c9 as ks, ca as Es, cb as j, cc as Ur, cd as Ms, ce as Ds, cf as sr, cg as As, ch as Ts, ci as zn, cj as Fs, ck as Is, cl as Z, cm as Ps, cn as Ls } from "./index-BHPHdADf.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,CA2fnD,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,CAkgBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -8,5 +8,6 @@ export declare function captureUpdatedResources(entries: InputControl[]): {
8
8
  medications: boolean;
9
9
  immunizationHistory: boolean;
10
10
  serviceRequests: Record<string, boolean>;
11
+ observationFormsWithBasedOn: boolean;
11
12
  };
12
13
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE,EACxB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,YAAY,EAAE,CAehB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,EAAE;;;;;;EAsB9D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE,EACxB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,MAAM,GACnB,YAAY,EAAE,CAehB;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,YAAY,EAAE;;;;;;;EA+B9D"}
@@ -1,13 +1,19 @@
1
1
  import { ObservationForm, Form2Observation } from '@bahmni/services';
2
+ import { Reference } from 'fhir/r4';
2
3
  import { default as React } from 'react';
3
4
  import { VALIDATION_STATE_EMPTY, VALIDATION_STATE_MANDATORY, VALIDATION_STATE_INVALID, VALIDATION_STATE_SCRIPT_ERROR } from '../../../constants/forms';
5
+ import { EncounterSessionStartContext } from '../../../events/startConsultation';
4
6
  interface ObservationFormsContainerProps {
5
7
  onViewingFormChange: (viewingForm: ObservationForm | null) => void;
6
8
  viewingForm?: ObservationForm | null;
7
9
  onRemoveForm?: (formUuid: string) => void;
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;
10
+ onFormObservationsChange?: (formUuid: string, observations: Form2Observation[], validationErrorType?: null | typeof VALIDATION_STATE_EMPTY | typeof VALIDATION_STATE_MANDATORY | typeof VALIDATION_STATE_INVALID | typeof VALIDATION_STATE_SCRIPT_ERROR, basedOn?: Reference) => void;
9
11
  existingObservations?: Form2Observation[];
10
12
  activeEncounterUuid?: string | null;
13
+ directMode?: boolean;
14
+ onDirectModeSubmit?: () => void | Promise<void>;
15
+ onDirectModeCancel?: () => void;
16
+ encounterSessionStartContext?: EncounterSessionStartContext;
11
17
  }
12
18
  declare const ObservationFormsContainer: React.FC<ObservationFormsContainerProps>;
13
19
  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,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
+ {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAUjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAiBtF,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,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAicvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import { default as React } from 'react';
2
- declare const ObservationFormsPanel: React.FC;
2
+ import { EncounterSessionStartContext } from '../../../events/startConsultation';
3
+ interface ObservationFormsPanelProps {
4
+ encounterSessionStartContext?: EncounterSessionStartContext;
5
+ }
6
+ declare const ObservationFormsPanel: React.FC<ObservationFormsPanelProps>;
3
7
  export default ObservationFormsPanel;
4
8
  //# sourceMappingURL=ObservationFormsPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ObservationFormsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAOjD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAiDlC,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ObservationFormsPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAOtF,UAAU,0BAA0B;IAClC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CA+E/D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { bA as i, bB as o } from "./index-BMr_A7ej.js";
1
+ import { bA as i, bB as o } from "./index-BHPHdADf.js";
2
2
  import "react";
3
3
  const l = i(
4
4
  o,