@bahmni/clinical-app 0.0.1-dev.297 → 0.0.1-dev.300

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 (33) hide show
  1. package/dist/{DocumentsTable-BJtJiMs--CIauHF7H.js → DocumentsTable-Oa377NEu-6r1KWBoV.js} +11 -11
  2. package/dist/{FormsTable-BsQ0bAGt-Tek3f-Wg.js → FormsTable-BO27TVHP-DQmPABy6.js} +39 -39
  3. package/dist/{LNWAZHJI-CzHnCrgL.js → LNWAZHJI-FiLyhK9w.js} +10 -10
  4. package/dist/{MWZ6AO7Z-BEoVdCCo.js → MWZ6AO7Z-BBLkNqg2.js} +4 -4
  5. package/dist/{Observations-LoD_iXCM-D4VyKw51.js → Observations-BqZmx-FE-CNov5A3O.js} +30 -30
  6. package/dist/{YPM2AS64-CyW_tsfn.js → YPM2AS64-DpZ5exPa.js} +1 -1
  7. package/dist/components/consultationPad/index.d.ts.map +1 -1
  8. package/dist/components/consultationPad/utils.d.ts.map +1 -1
  9. package/dist/components/forms/index.d.ts.map +1 -1
  10. package/dist/components/forms/medicationRequest/schema.json.d.ts +38 -0
  11. package/dist/components/forms/models.d.ts +6 -0
  12. package/dist/components/forms/models.d.ts.map +1 -1
  13. package/dist/components/forms/stopMedications/StopMedicationForm.d.ts +8 -0
  14. package/dist/components/forms/stopMedications/StopMedicationForm.d.ts.map +1 -0
  15. package/dist/components/forms/stopMedications/index.d.ts +2 -0
  16. package/dist/components/forms/stopMedications/index.d.ts.map +1 -0
  17. package/dist/components/patientHeader/PatientHeader.d.ts.map +1 -1
  18. package/dist/{index-CaDZ9Qhz.js → index-2Wl5Vr1S.js} +21718 -21340
  19. package/dist/index.css +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/locales/locale_en.json +14 -3
  22. package/dist/locales/locale_es.json +14 -3
  23. package/dist/models/medicationConfig.d.ts +11 -0
  24. package/dist/models/medicationConfig.d.ts.map +1 -1
  25. package/dist/services/consultationBundleService.d.ts +1 -1
  26. package/dist/services/consultationBundleService.d.ts.map +1 -1
  27. package/dist/services/stopMedicationService.d.ts +26 -0
  28. package/dist/services/stopMedicationService.d.ts.map +1 -0
  29. package/dist/stores/index.d.ts +1 -0
  30. package/dist/stores/index.d.ts.map +1 -1
  31. package/dist/stores/stopMedicationsStore.d.ts +21 -0
  32. package/dist/stores/stopMedicationsStore.d.ts.map +1 -0
  33. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, B as J, w as X, m as Z, c as ee, n as te } from "./index-CaDZ9Qhz.js";
2
+ import { u as G, a as W, h as Y, j as J, w as X, m as Z, c as ee, n as te } from "./index-2Wl5Vr1S.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 = {
@@ -18,7 +18,7 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
18
18
  uploadedBy: "DOCUMENTS_UPLOADED_BY",
19
19
  attachments: "DOCUMENTS_ATTACHMENTS"
20
20
  };
21
- function B(a) {
21
+ function R(a) {
22
22
  return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
23
23
  }
24
24
  function ie(a, g) {
@@ -33,7 +33,7 @@ const Te = [
33
33
  "attachments",
34
34
  "uploadedOn",
35
35
  "uploadedBy"
36
- ], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, R = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
36
+ ], he = /\.(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(
@@ -44,7 +44,7 @@ const Te = [
44
44
  w(!1), U(null), D(/* @__PURE__ */ new Set());
45
45
  }, []), v = _((e) => {
46
46
  D((t) => new Set(t).add(e));
47
- }, []), { data: i, isLoading: q, isError: b, error: y } = ae({
47
+ }, []), { data: i, isLoading: j, isError: b, error: y } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  E,
@@ -74,9 +74,9 @@ const Te = [
74
74
  const e = new AbortController();
75
75
  return (async () => {
76
76
  if (!s || !o) return;
77
- const t = /* @__PURE__ */ new Set(), m = R(o);
77
+ const t = /* @__PURE__ */ new Set(), m = B(o);
78
78
  for (let c = 0; c < m.length; c++) {
79
- const S = B(m[c].url);
79
+ const S = R(m[c].url);
80
80
  try {
81
81
  (await fetch(S, {
82
82
  method: "HEAD",
@@ -89,7 +89,7 @@ const Te = [
89
89
  e.signal.aborted || D(t);
90
90
  })(), () => e.abort();
91
91
  }, [s, o]);
92
- const j = _(
92
+ const q = _(
93
93
  (e, t) => {
94
94
  t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
@@ -104,7 +104,7 @@ const Te = [
104
104
  })),
105
105
  [f]
106
106
  ), T = p(
107
- () => o ? R(o) : [],
107
+ () => o ? B(o) : [],
108
108
  [o]
109
109
  ), Q = _(
110
110
  (e, t) => {
@@ -144,7 +144,7 @@ const Te = [
144
144
  headers: z,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
146
  rows: P,
147
- loading: q,
147
+ loading: j,
148
148
  errorStateMessage: b ? y?.message : null,
149
149
  sortable: K,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
@@ -154,7 +154,7 @@ const Te = [
154
154
  pageSize: u,
155
155
  totalItems: F,
156
156
  page: O,
157
- onPageChange: j
157
+ onPageChange: q
158
158
  }
159
159
  ) }),
160
160
  s && o && /* @__PURE__ */ r(
@@ -169,7 +169,7 @@ 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 = B(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), I = $.has(t);
172
+ const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), I = $.has(t);
173
173
  return m === "#" || I ? /* @__PURE__ */ h(
174
174
  "div",
175
175
  {
@@ -1,5 +1,5 @@
1
- import { jsx as s, jsxs as X, Fragment as W } from "react/jsx-runtime";
2
- import { a as ee, u as re, v as ae, k as oe, I as te, Z as se, S as ne, e as de, _ as D, m as ie, w as me, c as U, O as ue, L as le, n as ce, K as fe, R as ye } from "./index-CaDZ9Qhz.js";
1
+ import { jsx as s, jsxs as W, Fragment as Z } from "react/jsx-runtime";
2
+ import { a as ee, u as re, v as ae, F as oe, B as te, P as se, k as ne, e as de, _ as S, m as ie, w as me, c as U, O as ue, L as le, n as ce, K as fe, I as ye } from "./index-2Wl5Vr1S.js";
3
3
  import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as y } from "react";
5
5
  const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", O = {
@@ -7,7 +7,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
7
7
  customAccordianItem: ge
8
8
  }, Ne = (m) => m ? m.extension?.find(
9
9
  (n) => n.url === ye
10
- )?.valueString : void 0, Le = ({
10
+ )?.valueString : void 0, Fe = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
13
  config: H
@@ -16,36 +16,36 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
16
16
  numberOfVisits: k,
17
17
  hideThumbnail: w = !1,
18
18
  forms: c
19
- } = H ?? {}, L = ae(
19
+ } = H ?? {}, F = ae(
20
20
  m,
21
21
  n
22
22
  ), K = be(), {
23
- data: T = [],
24
- isLoading: F,
25
- isError: _,
23
+ data: L = [],
24
+ isLoading: T,
25
+ isError: B,
26
26
  error: j,
27
27
  refetch: x
28
28
  } = f({
29
29
  queryKey: ["forms", u, m],
30
30
  queryFn: () => oe(u, void 0, k),
31
- enabled: !!u && !L
32
- }), M = d(() => {
33
- let e = T;
31
+ enabled: !!u && !F
32
+ }), _ = d(() => {
33
+ let e = L;
34
34
  return n && n.length > 0 && (e = e.filter(
35
35
  (r) => n.includes(r.encounterUuid)
36
36
  )), Array.isArray(c) && c.length > 0 && (e = e.filter(
37
37
  (r) => c.some((a) => a.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
- }, [T, n, c]), { data: v = [] } = f({
39
+ }, [L, n, c]), { data: M = [] } = f({
40
40
  queryKey: ["observationForms"],
41
41
  queryFn: () => te()
42
- }), B = y(
43
- (e) => v.find((r) => r.name === e)?.uuid,
44
- [v]
42
+ }), v = y(
43
+ (e) => M.find((r) => r.name === e)?.uuid,
44
+ [M]
45
45
  ), b = d(() => {
46
46
  if (o)
47
- return B(o.formName);
48
- }, [o, B]), {
47
+ return v(o.formName);
48
+ }, [o, v]), {
49
49
  isLoading: V,
50
50
  isError: $,
51
51
  error: p
@@ -69,14 +69,14 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
69
69
  },
70
70
  [u]
71
71
  );
72
- const Q = d(() => !g?.entry || !o?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
72
+ const P = d(() => !g?.entry || !o?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
73
73
  const r = Ne(e);
74
74
  return !r || r.includes(o.formName);
75
- }), [g, o?.formName]), P = d(() => {
75
+ }), [g, o?.formName]), Q = d(() => {
76
76
  if (p)
77
- return D(p).message;
77
+ return S(p).message;
78
78
  if (N)
79
- return D(N).message;
79
+ return S(N).message;
80
80
  }, [p, N]), E = d(
81
81
  () => [
82
82
  { key: "recordedOn", header: t("RECORDED_ON") },
@@ -89,12 +89,12 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
89
89
  { key: "recordedBy", sortable: !0 }
90
90
  ],
91
91
  []
92
- ), R = d(() => {
93
- const e = M.reduce(
92
+ ), C = d(() => {
93
+ const e = _.reduce(
94
94
  (r, a) => {
95
95
  const i = a.formName;
96
96
  r[i] ??= [];
97
- const h = a.providers.map((J) => J.providerName).filter(Boolean).join(", ");
97
+ const h = a.providers.map((X) => X.providerName).filter(Boolean).join(", ");
98
98
  return r[i].push({
99
99
  id: a.encounterUuid,
100
100
  formName: a.formName,
@@ -114,38 +114,38 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
114
114
  )
115
115
  })
116
116
  ).sort((r, a) => r.formName.localeCompare(a.formName));
117
- }, [M, t]), S = y((e) => {
117
+ }, [_, t]), D = y((e) => {
118
118
  I(e), A(!0);
119
- }, []), Z = y(() => {
119
+ }, []), J = y(() => {
120
120
  A(!1), I(null);
121
- }, []), C = y(
121
+ }, []), R = y(
122
122
  (e, r) => {
123
123
  switch (r) {
124
124
  case "recordedOn":
125
- return /* @__PURE__ */ s(me, { onClick: () => S(e), children: e.recordedOn });
125
+ return /* @__PURE__ */ s(me, { onClick: () => D(e), children: e.recordedOn });
126
126
  case "recordedBy":
127
127
  return e.recordedBy;
128
128
  default:
129
129
  return null;
130
130
  }
131
131
  },
132
- [S]
132
+ [D]
133
133
  );
134
- return /* @__PURE__ */ X(W, { children: [
135
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ || R.length === 0 || L ? /* @__PURE__ */ s(
134
+ return /* @__PURE__ */ W(Z, { children: [
135
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: T || B || C.length === 0 || F ? /* @__PURE__ */ s(
136
136
  U,
137
137
  {
138
138
  headers: E,
139
139
  ariaLabel: t("FORMS_HEADING"),
140
140
  rows: [],
141
- loading: F,
142
- errorStateMessage: _ ? j?.message : void 0,
141
+ loading: T,
142
+ errorStateMessage: B ? j?.message : void 0,
143
143
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
144
- renderCell: C,
144
+ renderCell: R,
145
145
  className: O.formsTableBody,
146
146
  dataTestId: "forms-table"
147
147
  }
148
- ) : /* @__PURE__ */ s(ue, { align: "start", children: R.map((e, r) => {
148
+ ) : /* @__PURE__ */ s(ue, { align: "start", children: C.map((e, r) => {
149
149
  const { formName: a, records: i } = e;
150
150
  return /* @__PURE__ */ s(
151
151
  le,
@@ -164,7 +164,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
164
164
  errorStateMessage: "",
165
165
  sortable: Y,
166
166
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
167
- renderCell: C,
167
+ renderCell: R,
168
168
  className: O.formsTableBody,
169
169
  dataTestId: `forms-table-${a}`
170
170
  }
@@ -179,7 +179,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
179
179
  id: "modalIdForActionAreaLayout",
180
180
  portalId: "main-display-area",
181
181
  open: l,
182
- onRequestClose: Z,
182
+ onRequestClose: J,
183
183
  modalHeading: o.formName,
184
184
  modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
185
185
  passiveModal: !0,
@@ -188,10 +188,10 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
188
188
  children: /* @__PURE__ */ s(
189
189
  fe,
190
190
  {
191
- observations: Q,
191
+ observations: P,
192
192
  isLoading: V || z,
193
193
  isError: $ || G,
194
- errorMessage: P,
194
+ errorMessage: Q,
195
195
  emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
196
196
  testIdPrefix: o.formName,
197
197
  hideThumbnail: w
@@ -202,5 +202,5 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
202
202
  ] });
203
203
  };
204
204
  export {
205
- Le as default
205
+ Fe as default
206
206
  };
@@ -1,25 +1,25 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CyW_tsfn.js";
2
- import { j as d, l as f, o as e } from "./index-CaDZ9Qhz.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-DpZ5exPa.js";
2
+ import { g as d, i as f, l as e } from "./index-2Wl5Vr1S.js";
3
3
  var p = (a) => {
4
- const [r, o] = c({
4
+ const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
6
6
  }), n = d(), s = f(() => {
7
- const t = r.theme_preference || l;
8
- return t !== "system" ? t : n();
7
+ const o = r.theme_preference || l;
8
+ return o !== "system" ? o : n();
9
9
  });
10
- return e(i.Provider, {
10
+ return e(v.Provider, {
11
11
  value: a,
12
12
  get children() {
13
13
  return e(m, {
14
14
  localStore: r,
15
- setLocalStore: o,
15
+ setLocalStore: t,
16
16
  get children() {
17
- return e(u.Provider, {
17
+ return e(i.Provider, {
18
18
  value: s,
19
19
  get children() {
20
- return e(v, {
20
+ return e(u, {
21
21
  localStore: r,
22
- setLocalStore: o
22
+ setLocalStore: t
23
23
  });
24
24
  }
25
25
  });
@@ -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-CyW_tsfn.js";
2
- import { j as v, l as C, o as e } from "./index-CaDZ9Qhz.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-DpZ5exPa.js";
2
+ import { g as v, i as C, l as e } from "./index-2Wl5Vr1S.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -10,12 +10,12 @@ var h = (t) => {
10
10
  return e(d.Provider, {
11
11
  value: t,
12
12
  get children() {
13
- return e(u, {
13
+ return e(i, {
14
14
  disabled: !0,
15
15
  localStore: r,
16
16
  setLocalStore: o,
17
17
  get children() {
18
- return e(i.Provider, {
18
+ return e(u.Provider, {
19
19
  value: l,
20
20
  get children() {
21
21
  return e(m, {
@@ -1,12 +1,12 @@
1
- import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { u as B, h as V, a as N, D as w, $ as G, e as M, q as k, b as z, G as Q, z as x, c as j, U as P, d as D, W, f as J, g as Y, M as X, i as Z, A as ee } from "./index-CaDZ9Qhz.js";
1
+ import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
+ import { u as V, h as q, a as N, S as w, Z as G, e as M, Y as k, J as z, X as Q, z as x, c as J, b as Y, E as A, G as j, d as P, f as X, M as Z, R as W, A as ee } from "./index-2Wl5Vr1S.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as R } from "react";
5
- const A = (a, n, d, l, b, r) => {
6
- const t = W(a, n, b), s = t.value, o = J(s);
4
+ import { useRef as se, useEffect as $, useMemo as R } from "react";
5
+ const H = (a, n, d, l, b, r) => {
6
+ const t = j(a, n, b), s = t.value, o = P(s);
7
7
  let i = s;
8
8
  o === "Image" && (i = /* @__PURE__ */ u(
9
- X,
9
+ Z,
10
10
  {
11
11
  imageSrc: s,
12
12
  alt: s,
@@ -14,7 +14,7 @@ const A = (a, n, d, l, b, r) => {
14
14
  hideThumbnail: r
15
15
  }
16
16
  )), o === "Video" && (i = /* @__PURE__ */ u(
17
- Z,
17
+ W,
18
18
  {
19
19
  id: `${s}-video`,
20
20
  videoSrc: s,
@@ -25,7 +25,7 @@ const A = (a, n, d, l, b, r) => {
25
25
  provider: t.provider
26
26
  }), p = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${p}-${d}-${n}` : `${y}-${p}-${d}-${n}`;
27
27
  return /* @__PURE__ */ u(
28
- Y,
28
+ X,
29
29
  {
30
30
  header: t.header,
31
31
  value: i,
@@ -37,13 +37,13 @@ const A = (a, n, d, l, b, r) => {
37
37
  `obs-${a.id}`
38
38
  );
39
39
  }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
40
- D,
40
+ A,
41
41
  {
42
42
  title: a.display,
43
43
  id: `grouped-obs-${a.display}-${l}`,
44
44
  open: d,
45
45
  children: a.members?.map(
46
- (s, o) => A(
46
+ (s, o) => H(
47
47
  s,
48
48
  o,
49
49
  b,
@@ -60,16 +60,16 @@ const A = (a, n, d, l, b, r) => {
60
60
  hideThumbnail: d
61
61
  }) => {
62
62
  const { t: l } = N(), b = (r, t, s) => {
63
- const o = P(r.encounterDetails, l);
64
- return /* @__PURE__ */ S(
65
- D,
63
+ const o = Y(r.encounterDetails, l);
64
+ return /* @__PURE__ */ I(
65
+ A,
66
66
  {
67
67
  title: o,
68
68
  id: `encounter-${r.encounterId}`,
69
69
  open: t,
70
70
  children: [
71
71
  r.observations.map(
72
- (i, m) => A(
72
+ (i, m) => H(
73
73
  i,
74
74
  m,
75
75
  s,
@@ -105,7 +105,7 @@ const A = (a, n, d, l, b, r) => {
105
105
  )
106
106
  }
107
107
  );
108
- }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", I = {
108
+ }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
109
109
  observations: ie,
110
110
  title: ne
111
111
  }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
@@ -113,20 +113,20 @@ const A = (a, 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()), t = B(), { addNotification: s } = V(), { t: o } = N(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => w(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 q = d[h];
126
+ const B = d[h];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: q }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -134,7 +134,7 @@ const A = (a, n, d, l, b, r) => {
134
134
  }, [i, d]);
135
135
  const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
136
  data: c,
137
- isLoading: H,
137
+ isLoading: D,
138
138
  isError: T,
139
139
  refetch: g
140
140
  } = te({
@@ -149,7 +149,7 @@ const A = (a, n, d, l, b, r) => {
149
149
  ) && g();
150
150
  },
151
151
  [t, g]
152
- ), _(() => {
152
+ ), $(() => {
153
153
  T && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
@@ -164,14 +164,14 @@ const A = (a, n, d, l, b, r) => {
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], $ = H || !y, f = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, U = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = L ? o("NO_OBSERVATIONS_FOUND") : void 0, C = O.length > 0 && !$ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
- return /* @__PURE__ */ S(
167
+ ], f = D || !y, _ = T && y, L = (!c || c.entry?.length === 0 || p.length === 0) && y, K = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, C = L ? o("NO_OBSERVATIONS_FOUND") : void 0, U = O.length > 0 && !f && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
+ return /* @__PURE__ */ I(
169
169
  "div",
170
170
  {
171
171
  id: "observations",
172
172
  "data-testid": E ? `observations-${v}` : "observations",
173
173
  "aria-label": "observations-aria-label",
174
- className: I.observations,
174
+ className: S.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
177
  x,
@@ -179,11 +179,11 @@ const A = (a, n, d, l, b, r) => {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
181
181
  title: v,
182
- className: I.title,
182
+ className: S.title,
183
183
  children: /* @__PURE__ */ u("p", { children: v })
184
184
  }
185
185
  ),
186
- C ? /* @__PURE__ */ u(
186
+ U ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
189
  groupedData: O,
@@ -191,14 +191,14 @@ const A = (a, n, d, l, b, r) => {
191
191
  hideThumbnail: b
192
192
  }
193
193
  ) : /* @__PURE__ */ u(
194
- j,
194
+ J,
195
195
  {
196
196
  headers: F,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: $,
200
- errorStateMessage: U,
201
- emptyStateMessage: K,
199
+ loading: f,
200
+ errorStateMessage: K,
201
+ emptyStateMessage: C,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { p as we, r as z, s as xt, t as B, l as q, o as y, P as Ro, x as ye, y as R, C as _, E as k, F as N, H as A, J as bs, N as ir, Q as $e, T as U, V as Hn, X as Vn, Y 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-CaDZ9Qhz.js";
1
+ import { o as we, p as z, q as xt, r as B, i as q, l as y, s as Ro, t as ye, x as R, y as _, C as k, D as N, H as A, N as bs, Q as ir, T as $e, 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-2Wl5Vr1S.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,CAodnD,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,CA0fnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -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;;;;;;EAmB9D"}
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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AACrB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AAExB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AACrB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,mBAAmB,CAAC;AAE3B,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC"}
@@ -23,6 +23,44 @@ declare const _default: {
23
23
  }
24
24
  }
25
25
  }
26
+ },
27
+ "stopReasons": {
28
+ "type": "array",
29
+ "description": "Reasons for stopping a medication",
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "stopMedicationFields": {
35
+ "type": "object",
36
+ "description": "Visibility and mandatory configuration for stop medication form fields",
37
+ "additionalProperties": false,
38
+ "properties": {
39
+ "stopDate": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "properties": {
43
+ "isVisible": { "type": "boolean" },
44
+ "isMandatory": { "type": "boolean" }
45
+ }
46
+ },
47
+ "stopReason": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "properties": {
51
+ "isVisible": { "type": "boolean" },
52
+ "isMandatory": { "type": "boolean" }
53
+ }
54
+ },
55
+ "note": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "isVisible": { "type": "boolean" },
60
+ "isMandatory": { "type": "boolean" }
61
+ }
62
+ }
63
+ }
26
64
  }
27
65
  }
28
66
  }
@@ -18,6 +18,12 @@ export interface InputControl {
18
18
  createBundleEntries?: (ctx: EncounterContext) => BundleEntry[];
19
19
  updateItemCDSCards?: (itemId: string, cards: CDSCard[]) => void;
20
20
  hasCriticalCDSCards?: () => boolean;
21
+ /**
22
+ * Optional direct submit handler. When present, the ConsultationPad calls this
23
+ * instead of including the form's data in the consultation bundle.
24
+ * Used for forms that call dedicated FHIR operations (e.g., $stop).
25
+ */
26
+ onDirectSubmit?: () => Promise<void>;
21
27
  }
22
28
  export interface EncounterContext {
23
29
  encounterSubject: Reference;
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/components/forms/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,IAAI,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAExG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAChD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;QAC5D,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;KACjD,CAAC,CAAC;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,WAAW,EAAE,CAAC;IAC/D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAChE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,IAAI,CAAC;IACvB,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/components/forms/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,IAAI,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAExG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;IAChD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;QAC5D,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;KACjD,CAAC,CAAC;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAC1C,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,WAAW,EAAE,CAAC;IAC/D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAChE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC;IACpC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,IAAI,CAAC;IACvB,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { EncounterSessionStartContext } from '../../../events/startConsultation';
3
+ interface StopMedicationFormProps {
4
+ encounterSessionStartContext?: EncounterSessionStartContext;
5
+ }
6
+ declare const StopMedicationForm: React.FC<StopMedicationFormProps>;
7
+ export default StopMedicationForm;
8
+ //# sourceMappingURL=StopMedicationForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StopMedicationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/stopMedications/StopMedicationForm.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AActF,UAAU,uBAAuB;IAC/B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiNzD,CAAC;AAIF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/stopMedications/index.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PatientHeader.d.ts","sourceRoot":"","sources":["../../../src/components/patientHeader/PatientHeader.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAqC,MAAM,OAAO,CAAC;AAQ1D,UAAU,kBAAkB;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqH/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"PatientHeader.d.ts","sourceRoot":"","sources":["../../../src/components/patientHeader/PatientHeader.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAqC,MAAM,OAAO,CAAC;AAQ1D,UAAU,kBAAkB;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsH/C,CAAC;AAEF,eAAe,aAAa,CAAC"}