@bahmni/clinical-app 0.0.1-dev.439 → 0.0.1-dev.440

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 (29) hide show
  1. package/dist/{ConsultationPage-nPYT9Y19.js → ConsultationPage-BYmrmLYy.js} +7900 -7760
  2. package/dist/{DocumentsTable-DOPEQt14-CqCk4rt4.js → DocumentsTable-CirHKvw9-C14hnZnd.js} +14 -14
  3. package/dist/{FormsTable-5kbGeeFq-DrJXsY_l.js → FormsTable-CqUGhZ65-mzxEMwwT.js} +90 -90
  4. package/dist/{LNWAZHJI-CjKDCEXQ.js → LNWAZHJI-DCXOn2QA.js} +5 -5
  5. package/dist/{MWZ6AO7Z-BN1CxgzQ.js → MWZ6AO7Z-DDPI1559.js} +2 -2
  6. package/dist/{Observations-BUz9smcC-DxJuZdK1.js → Observations-BhAU90jX-s1YfkDul.js} +55 -55
  7. package/dist/{YPM2AS64-9e9ECVpU.js → YPM2AS64-BO9HNslJ.js} +1 -1
  8. package/dist/components/consultationPad/index.d.ts.map +1 -1
  9. package/dist/components/consultationPad/utils.d.ts +13 -0
  10. package/dist/components/consultationPad/utils.d.ts.map +1 -1
  11. package/dist/components/forms/allergies/AllergiesForm.d.ts.map +1 -1
  12. package/dist/components/forms/allergies/SelectedAllergyItem.d.ts +12 -3
  13. package/dist/components/forms/allergies/SelectedAllergyItem.d.ts.map +1 -1
  14. package/dist/components/forms/allergies/index.d.ts.map +1 -1
  15. package/dist/components/forms/models.d.ts +8 -0
  16. package/dist/components/forms/models.d.ts.map +1 -1
  17. package/dist/constants/errors.d.ts +1 -0
  18. package/dist/constants/errors.d.ts.map +1 -1
  19. package/dist/{hook-DFRmaZrJ.js → hook-D8h3x6mN.js} +1 -1
  20. package/dist/{index-BP7diYfY.js → index-CUDJLcGC.js} +27 -27
  21. package/dist/{index-Zds56XNI.js → index-CUk3F169.js} +16 -16
  22. package/dist/{index-CyvuKZwu.js → index-qHxzHYCk.js} +32101 -32028
  23. package/dist/index.js +1 -1
  24. package/dist/locales/locale_en.json +3 -0
  25. package/dist/locales/locale_es.json +3 -0
  26. package/dist/services/encounterBundleService.d.ts.map +1 -1
  27. package/dist/stores/allergyStore.d.ts +15 -5
  28. package/dist/stores/allergyStore.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import { jsxs as I, jsx as o } from "react/jsx-runtime";
2
- import { d as Q, z as j, u as L, i as G, H as M, O as P, T as x, w as Y, P as J, U as W, F as X, j as Z, m as ee, $ as ae, n as se, o as U, B as te, Y as re, h as ie, p as ne, r as oe, t as de, v as le } from "./index-CyvuKZwu.js";
2
+ import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-qHxzHYCk.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
- import { useRef as pe, useEffect as D, useMemo as g } from "react";
5
- const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
- observations: me,
4
+ import { useRef as me, useEffect as L, useMemo as g } from "react";
5
+ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
+ observations: pe,
7
7
  title: be,
8
8
  wrapper: he,
9
9
  secondary: ve
10
- }, F = (s, l, n, d, c, t) => {
11
- const r = te(s, l, c), e = r.value, p = re(e);
10
+ }, V = (s, l, n, d, c, t) => {
11
+ const r = te(s, l, c), e = r.value, m = re(e);
12
12
  let i = e;
13
- p === "Image" && (i = /* @__PURE__ */ o(
13
+ m === "Image" && (i = /* @__PURE__ */ o(
14
14
  oe,
15
15
  {
16
16
  imageSrc: e,
@@ -18,29 +18,29 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
18
18
  id: `${e}-img`,
19
19
  hideThumbnail: t
20
20
  }
21
- )), p === "Video" && (i = /* @__PURE__ */ o(
21
+ )), m === "Video" && (i = /* @__PURE__ */ o(
22
22
  de,
23
23
  {
24
24
  id: `${e}-video`,
25
25
  videoSrc: e,
26
26
  hideThumbnail: t
27
27
  }
28
- )), p === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
29
- const m = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
28
+ )), m === "PDF" && (i = /* @__PURE__ */ o(le, { id: `${e}-pdf`, src: e }));
29
+ const p = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
30
30
  /* @__PURE__ */ o("span", { children: r.header.display }),
31
31
  r.header.referenceRange && /* @__PURE__ */ o("span", { className: O.secondary, children: r.header.referenceRange })
32
32
  ] }), u = c("OBSERVATIONS_RECORDED_BY", {
33
33
  provider: r.provider
34
- }), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, f = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
34
+ }), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */ I("div", { className: O.wrapper, children: [
35
35
  /* @__PURE__ */ o("span", { children: u }),
36
36
  b && /* @__PURE__ */ o("span", { className: O.secondary, children: b })
37
37
  ] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${n}-${l}` : `${v}-${h}-${n}-${l}`;
38
38
  return /* @__PURE__ */ o(
39
39
  ne,
40
40
  {
41
- header: m,
41
+ header: p,
42
42
  value: i,
43
- info: f,
43
+ info: E,
44
44
  id: R,
45
45
  testId: R,
46
46
  ariaLabel: R
@@ -54,9 +54,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
54
54
  id: `grouped-obs-${s.display}-${d}`,
55
55
  open: n,
56
56
  children: s.members?.map(
57
- (e, p) => F(
57
+ (e, m) => V(
58
58
  e,
59
- p,
59
+ m,
60
60
  c,
61
61
  t,
62
62
  l,
@@ -70,19 +70,19 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
70
70
  title: l = "",
71
71
  hideThumbnail: n
72
72
  }) => {
73
- const { t: d } = L(), c = (t, r, e) => {
74
- const p = se(t.encounterDetails, d);
73
+ const { t: d } = F(), c = (t, r, e) => {
74
+ const m = se(t.encounterDetails, d);
75
75
  return /* @__PURE__ */ I(
76
76
  U,
77
77
  {
78
- title: p,
78
+ title: m,
79
79
  id: `encounter-${t.encounterId}`,
80
80
  open: r,
81
81
  children: [
82
82
  t.observations.map(
83
- (i, m) => F(
83
+ (i, p) => V(
84
84
  i,
85
- m,
85
+ p,
86
86
  e,
87
87
  l,
88
88
  d,
@@ -90,11 +90,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
90
90
  )
91
91
  ),
92
92
  t.groupedObservations.map(
93
- (i, m) => ye(
93
+ (i, p) => ye(
94
94
  i,
95
95
  d,
96
96
  r,
97
- m,
97
+ p,
98
98
  e,
99
99
  l,
100
100
  n
@@ -116,7 +116,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
116
116
  )
117
117
  }
118
118
  );
119
- }, Re = (s) => ["conceptUuid", s], Te = (s, l, n, d) => [
119
+ }, Re = (s) => ["conceptUuid", s], _e = (s, l, n, d) => [
120
120
  "observations",
121
121
  s,
122
122
  ...l,
@@ -132,77 +132,77 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
132
132
  conceptUuid: t = [],
133
133
  hideThumbnail: r = !1,
134
134
  scope: e = "all"
135
- } = d, p = pe(/* @__PURE__ */ new Set()), i = Q(), { addNotification: m } = j(), { t: u } = L(), b = ue({
135
+ } = d, m = me(/* @__PURE__ */ new Set()), i = G(), { addNotification: p } = H(), { t: u } = F(), b = ue({
136
136
  queries: c.map((a) => ({
137
137
  queryKey: Re(a),
138
- queryFn: () => G(a),
138
+ queryFn: () => j(a),
139
139
  enabled: !!a
140
140
  }))
141
141
  });
142
- D(() => {
143
- const a = b.some((H) => H.isError), y = p.current.size > 0;
144
- a && !y ? (m({
142
+ L(() => {
143
+ const a = b.some((z) => z.isError), y = m.current.size > 0;
144
+ a && !y ? (p({
145
145
  title: u("ERROR_DEFAULT_TITLE"),
146
146
  message: u("ERROR_FETCHING_OBSERVATIONS"),
147
147
  type: "error"
148
- }), p.current.add(0)) : !a && y && p.current.clear();
149
- }, [b, m, u]);
150
- const f = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...f, ...t])], [f, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = M(
148
+ }), m.current.add(0)) : !a && y && m.current.clear();
149
+ }, [b, p, u]);
150
+ const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", B = J(
151
151
  l,
152
152
  n
153
153
  ), {
154
- data: T,
154
+ data: _,
155
155
  isLoading: w,
156
156
  isError: S,
157
157
  refetch: N
158
158
  } = ce({
159
- queryKey: Te(
159
+ queryKey: _e(
160
160
  i,
161
161
  h,
162
162
  n,
163
163
  e
164
164
  ),
165
- queryFn: () => R ? P(
165
+ queryFn: () => R ? M(
166
166
  i,
167
167
  h,
168
168
  n
169
- ) : x(
169
+ ) : Y(
170
170
  i,
171
171
  h,
172
172
  n
173
173
  ),
174
- enabled: !!i && h.length > 0 && v && !V
174
+ enabled: !!i && h.length > 0 && v && !B
175
175
  });
176
- Y(
176
+ x(
177
177
  (a) => {
178
178
  a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
179
  (y) => h.includes(y)
180
180
  ) && N();
181
181
  },
182
182
  [i, N]
183
- ), D(() => {
184
- S && m({
183
+ ), L(() => {
184
+ S && p({
185
185
  title: u("ERROR_DEFAULT_TITLE"),
186
186
  message: u("ERROR_FETCHING_OBSERVATIONS"),
187
187
  type: "error"
188
188
  });
189
189
  }, [S]);
190
190
  const $ = g(() => {
191
- if (!T) return [];
192
- let a = J(T);
193
- e === "latest-encounter" && (a = W(a));
194
- const y = X(a);
195
- return Z(y);
196
- }, [T, e]), k = [
191
+ if (!_) return [];
192
+ let a = P(_);
193
+ e === "latest-encounter" && (a = X(a));
194
+ const y = Z(a);
195
+ return W(y);
196
+ }, [_, e]), K = [
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], A = w || !v, B = S && v, q = (!T || T.entry?.length === 0 || h.length === 0) && v, C = B ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = q ? u("NO_OBSERVATIONS_FOUND") : void 0, z = $.length > 0 && !A && !B, E = d.titleTranslationKey, _ = E ? u(E) : "";
200
+ ], A = w || !v, D = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
201
201
  return /* @__PURE__ */ I(
202
202
  "div",
203
203
  {
204
204
  id: "observations",
205
- "data-testid": E ? `observations-${_}` : "observations",
205
+ "data-testid": T ? `observations-${f}` : "observations",
206
206
  "aria-label": "observations-aria-label",
207
207
  className: O.observations,
208
208
  children: [
@@ -210,28 +210,28 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
210
210
  ee,
211
211
  {
212
212
  id: "observations-title",
213
- testId: E ? `observations-title-${_}` : "observations-title",
214
- title: _,
213
+ testId: T ? `observations-title-${f}` : "observations-title",
214
+ title: f,
215
215
  className: O.title,
216
- children: /* @__PURE__ */ o("p", { children: _ })
216
+ children: /* @__PURE__ */ o("p", { children: f })
217
217
  }
218
218
  ),
219
- z ? /* @__PURE__ */ o(
219
+ q ? /* @__PURE__ */ o(
220
220
  Oe,
221
221
  {
222
222
  groupedData: $,
223
- title: _,
223
+ title: f,
224
224
  hideThumbnail: r
225
225
  }
226
226
  ) : /* @__PURE__ */ o(
227
227
  ae,
228
228
  {
229
- headers: k,
229
+ headers: K,
230
230
  rows: [],
231
231
  ariaLabel: u("OBSERVATIONS"),
232
232
  loading: A,
233
233
  errorStateMessage: C,
234
- emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
234
+ emptyStateMessage: Q ?? u("NO_OBSERVATIONS_AVAILABLE"),
235
235
  dataTestId: "observations-table"
236
236
  }
237
237
  )
@@ -242,5 +242,5 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
242
242
  export {
243
243
  Re as conceptUuidQueryKeys,
244
244
  Ie as default,
245
- Te as observationsQueryKeys
245
+ _e as observationsQueryKeys
246
246
  };
@@ -1,4 +1,4 @@
1
- import { c0 as we, c1 as z, c2 as xt, c3 as B, b_ as q, b$ as y, c4 as Ro, c5 as ye, c6 as R, c7 as _, c8 as k, c9 as N, ca as A, cb as bs, cc as ir, cd as $e, ce as G, cf as Hn, cg as Vn, ch as dt, ci as D, cj as xs, ck as cn, cl as Be, cm as ws, cn as qt, co as zt, cp as $s, cq as Cs, cr as $n, cs as Ss, ct as Nr, cu as Bt, cv as zo, cw as ks, cx as Es, cy as j, cz as Gr, cA as Ms, cB as Ds, cC as sr, cD as As, cE as Ts, cF as zn, cG as Fs, cH as Is, cI as Z, cJ as Ps, cK as Ls } from "./index-CyvuKZwu.js";
1
+ import { c6 as we, c7 as z, c8 as xt, c9 as B, c4 as q, c5 as y, ca as Ro, cb as ye, cc as R, cd as _, ce as k, cf as N, cg as A, ch as bs, ci as ir, cj as $e, ck as G, cl as Hn, cm as Vn, cn as dt, co as D, cp as xs, cq as cn, cr as Be, cs as ws, ct as qt, cu as zt, cv as $s, cw as Cs, cx as $n, cy as Ss, cz as Nr, cA as Bt, cB as zo, cC as ks, cD as Es, cE as j, cF as Gr, cG as Ms, cH as Ds, cI as sr, cJ as As, cK as Ts, cL as zn, cM as Fs, cN as Is, cO as Z, cP as Ps, cQ as Ls } from "./index-qHxzHYCk.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":"AAmBA,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAuBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8iBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAON,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAwBnF,UAAU,oBAAoB;IAC5B,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAykBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -10,6 +10,19 @@ export declare function getActiveEncounter(args: {
10
10
  }): Encounter | null | undefined;
11
11
  export declare function loadEncounterInputControls(config: ConsultationPad | undefined): InputControl[];
12
12
  export declare function getActiveEntries(registry: InputControl[], encounterType: string, editOnlyKey?: string): InputControl[];
13
+ /**
14
+ * Splits the active entries into those that submit directly (REST) and
15
+ * those that go through the encounter bundle. An entry may do both:
16
+ * controls that can only save part of their data through the bundle
17
+ * (allergies) declare hasBundleData() to say whether the bundle flow is
18
+ * still needed. hasBundleData() may be async (e.g. allergies awaits its
19
+ * install-specific concept uuid before deciding), so this resolves before
20
+ * createBundleEntries runs.
21
+ */
22
+ export declare function resolveSubmissionEntries(activeEntries: InputControl[]): Promise<{
23
+ directSubmitEntries: InputControl[];
24
+ bundleEntries: InputControl[];
25
+ }>;
13
26
  export declare function captureUpdatedResources(entries: InputControl[]): {
14
27
  conditions: boolean;
15
28
  allergies: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,KAAK,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,eAAe,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,gBAAgB,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,sBAAsB,EAAE,WAAW,CAAC;CACrC,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAe/B;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,YAAY,EAAE,CA6BhB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,YAAY,EAAE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{"version":3,"file":"AllergiesForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/AllergiesForm.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAYtF;;;;;GAKG;AACH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D,CA2QC,CAAC;AAIH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"AllergiesForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/AllergiesForm.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAYtF;;;;;GAKG;AACH,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5B,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;CAC7D,CA+TC,CAAC;AAIH,eAAe,aAAa,CAAC"}
@@ -8,14 +8,23 @@ import { AllergyInputEntry } from '../../../models/allergy';
8
8
  export interface SelectedAllergyItemProps {
9
9
  /** The allergy input entry containing all allergy data */
10
10
  allergy: AllergyInputEntry;
11
+ /**
12
+ * Whether `allergy` is on the Other, Non-Coded concept. Computed by the
13
+ * parent (which knows the install's resolved concept uuid) rather than
14
+ * read here, since this component is memoized and would otherwise miss a
15
+ * change to that resolved uuid — none of its other props depend on it.
16
+ */
17
+ isNonCoded: boolean;
11
18
  /** Available reaction concepts for the multiselect */
12
19
  reactionConcepts: Coding[];
13
20
  /** Callback function to update allergy severity */
14
- updateSeverity: (allergyId: string, severity: Coding | null) => void;
21
+ updateSeverity: (entryId: string, severity: Coding | null) => void;
15
22
  /** Callback function to update allergy reactions */
16
- updateReactions: (allergyId: string, reactions: Coding[]) => void;
23
+ updateReactions: (entryId: string, reactions: Coding[]) => void;
17
24
  /** Callback function to update allergy note */
18
- updateNote: (allergyId: string, note: string) => void;
25
+ updateNote: (entryId: string, note: string) => void;
26
+ /** Callback to update the free-text name of a non-coded allergen */
27
+ updateNonCodedAllergen: (entryId: string, name: string) => void;
19
28
  }
20
29
  /**
21
30
  * Component for rendering a selected allergy with severity dropdown and reactions multiselect
@@ -1 +1 @@
1
- {"version":3,"file":"SelectedAllergyItem.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/SelectedAllergyItem.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,OAAO,EAAE,iBAAiB,CAAC;IAC3B,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,mDAAmD;IACnD,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACrE,oDAAoD;IACpD,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAClE,+CAA+C;IAC/C,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAwH3D,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"SelectedAllergyItem.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/SelectedAllergyItem.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI5D;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,0DAA0D;IAC1D,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,mDAAmD;IACnD,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,oDAAoD;IACpD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAChE,+CAA+C;IAC/C,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,oEAAoE;IACpE,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE;AAED;;;;GAIG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAyI3D,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/index.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/allergies/index.ts"],"names":[],"mappings":"AAqIA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
@@ -22,6 +22,14 @@ export interface InputControl {
22
22
  hasData: () => boolean;
23
23
  subscribe: (cb: () => void) => () => void;
24
24
  createBundleEntries?: (ctx: EncounterContext) => BundleEntry[];
25
+ /**
26
+ * Only consulted when onDirectSubmit is also defined. A control with
27
+ * onDirectSubmit but no hasBundleData is assumed to have moved all its data
28
+ * to the direct-submit path and will NOT contribute to the bundle. May
29
+ * return a promise if answering requires resolving install-specific
30
+ * config first; consultationPad awaits it before building the bundle.
31
+ */
32
+ hasBundleData?: () => boolean | Promise<boolean>;
25
33
  updateItemCDSCards?: (itemId: string, cards: CDSCard[]) => void;
26
34
  hasCriticalCDSCards?: () => boolean;
27
35
  onDirectSubmit?: () => Promise<void>;
@@ -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,gBAAgB;IAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,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;IAC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INVALID_CONDITION_PARAMS: string;
18
+ PARTIAL_SAVE: string;
18
19
  };
19
20
  export declare const PINNED_FORMS_ERROR_MESSAGES: {
20
21
  USER_NOT_FOUND: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/constants/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;CAOvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/constants/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;CAQvC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { bX as i, bY as o } from "./index-CyvuKZwu.js";
1
+ import { c1 as i, c2 as o } from "./index-qHxzHYCk.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -1,66 +1,66 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { u as r, cL as l, cM as o, cN as c, ba as m, bb as g, cO as h, cP as p, cQ as b, aI as u } from "./index-CyvuKZwu.js";
1
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
+ import { u as r, cR as l, cS as o, cT as c, bg as m, bh as g, cU as h, cV as p, cW as b, aO as u } from "./index-qHxzHYCk.js";
3
3
  import { Suspense as _ } from "react";
4
4
  import "@tanstack/react-query";
5
5
  const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
6
6
  loading: E,
7
7
  message: $,
8
8
  panel: y
9
- }, T = ({ extensions: i }) => {
9
+ }, w = ({ extensions: i }) => {
10
10
  const { t: n } = r();
11
11
  return i.length === 0 ? null : /* @__PURE__ */ d(l, { children: [
12
- /* @__PURE__ */ e(
12
+ /* @__PURE__ */ a(
13
13
  o,
14
14
  {
15
15
  id: "search-extension-tab-list",
16
16
  "data-testid": "search-extension-tab-list-test-id",
17
17
  "aria-label": "Search Extensions",
18
- children: i.map((a) => /* @__PURE__ */ e(
18
+ children: i.map((e) => /* @__PURE__ */ a(
19
19
  c,
20
20
  {
21
- id: `search-tab-${a.id}`,
22
- "data-testid": `search-tab-${a.id}-test-id`,
23
- "aria-label": `Search Tab ${a.id}`,
24
- renderIcon: a.icon ? () => /* @__PURE__ */ e(
21
+ id: `search-tab-${e.id}`,
22
+ "data-testid": `search-tab-${e.id}-test-id`,
23
+ "aria-label": `Search Tab ${e.id}`,
24
+ renderIcon: e.icon ? () => /* @__PURE__ */ a(
25
25
  m,
26
26
  {
27
- id: `${a.id}-icon`,
28
- testId: `${a.id}-icon-test-id`,
29
- ariaLabel: `Icon ${a.id}`,
30
- name: a.icon,
27
+ id: `${e.id}-icon`,
28
+ testId: `${e.id}-icon-test-id`,
29
+ ariaLabel: `Icon ${e.id}`,
30
+ name: e.icon,
31
31
  size: g.SM
32
32
  }
33
33
  ) : void 0,
34
- children: n(a.translationKey)
34
+ children: n(e.translationKey)
35
35
  },
36
- a.id
36
+ e.id
37
37
  ))
38
38
  }
39
39
  ),
40
- /* @__PURE__ */ e(h, { children: i.map((a) => {
40
+ /* @__PURE__ */ a(h, { children: i.map((e) => {
41
41
  const t = p(
42
- a.extensionParams?.searchHandler ?? ""
42
+ e.extensionParams?.searchHandler ?? ""
43
43
  )?.component;
44
- return /* @__PURE__ */ e(
44
+ return /* @__PURE__ */ a(
45
45
  b,
46
46
  {
47
- id: `${a.id}-panel`,
47
+ id: `${e.id}-panel`,
48
48
  className: s.panel,
49
- "data-testid": `${a.id}-panel-test-id`,
50
- "aria-label": `Panel ${a.id}`,
51
- children: t && a.extensionParams ? /* @__PURE__ */ e(
49
+ "data-testid": `${e.id}-panel-test-id`,
50
+ "aria-label": `Panel ${e.id}`,
51
+ children: t && e.extensionParams ? /* @__PURE__ */ a(
52
52
  _,
53
53
  {
54
- fallback: /* @__PURE__ */ e(
54
+ fallback: /* @__PURE__ */ a(
55
55
  u,
56
56
  {
57
57
  type: "multi",
58
58
  className: s.loading
59
59
  }
60
60
  ),
61
- children: /* @__PURE__ */ e(t, { extensionParams: a.extensionParams })
61
+ children: /* @__PURE__ */ a(t, { extensionParams: e.extensionParams })
62
62
  }
63
- ) : /* @__PURE__ */ e(
63
+ ) : /* @__PURE__ */ a(
64
64
  "p",
65
65
  {
66
66
  id: "extension-widget-not-registered",
@@ -71,11 +71,11 @@ const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y =
71
71
  }
72
72
  )
73
73
  },
74
- a.id
74
+ e.id
75
75
  );
76
76
  }) })
77
77
  ] });
78
78
  };
79
79
  export {
80
- T as default
80
+ w as default
81
81
  };
@@ -1,31 +1,31 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { u as g, k as u, bK as b, bU as x, bV as f, bW as p, aI as _, bQ as N } from "./index-CyvuKZwu.js";
3
- import { lazy as h, useMemo as t, Suspense as L } from "react";
2
+ import { u as g, k as u, bQ as b, b_ as f, b$ as x, c0 as _, aO as p, bW as N } from "./index-qHxzHYCk.js";
3
+ import { lazy as h, useMemo as t, Suspense as C } from "react";
4
4
  import "@tanstack/react-query";
5
- import { u as C } from "./hook-DFRmaZrJ.js";
6
- const E = {
5
+ import { u as E } from "./hook-D8h3x6mN.js";
6
+ const L = {
7
7
  "org.bahmni.clinical.v2.search": h(
8
- () => import("./index-BP7diYfY.js")
8
+ () => import("./index-CUDJLcGC.js")
9
9
  )
10
- }, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", P = "index-module_message__Ib5Iw", l = {
10
+ }, v = "index-module_page__16xxw", I = "index-module_loading__wNI-4", O = "index-module_message__Ib5Iw", l = {
11
11
  page: v,
12
12
  loading: I,
13
- message: P
14
- }, w = () => {
15
- const { t: i } = g(), { clinicalConfig: o } = C(), { userPrivileges: r } = u(), m = t(
13
+ message: O
14
+ }, k = () => {
15
+ const { t: i } = g(), { clinicalConfig: o } = E(), { userPrivileges: r } = u(), m = t(
16
16
  () => [
17
17
  { id: "home", label: i("HOME_LABEL"), href: b },
18
18
  { id: "clinical", label: i("CLINICAL_LABEL"), isCurrentPage: !0 }
19
19
  ],
20
20
  [i]
21
21
  ), c = t(
22
- () => x(o?.extensions ?? []),
22
+ () => f(o?.extensions ?? []),
23
23
  [o]
24
24
  ), d = t(
25
25
  () => Array.from(c.entries()).map(([e, a]) => ({
26
26
  pointId: e,
27
- Handler: E[e],
28
- filtered: f(
27
+ Handler: L[e],
28
+ filtered: x(
29
29
  a,
30
30
  r
31
31
  ).filter(
@@ -35,7 +35,7 @@ const E = {
35
35
  [c, r]
36
36
  );
37
37
  return /* @__PURE__ */ s(
38
- p,
38
+ _,
39
39
  {
40
40
  header: /* @__PURE__ */ s(N, { breadcrumbItems: m }),
41
41
  main: /* @__PURE__ */ s(
@@ -51,10 +51,10 @@ const E = {
51
51
  id: e,
52
52
  "data-testid": `${e}-test-id`,
53
53
  children: /* @__PURE__ */ s(
54
- L,
54
+ C,
55
55
  {
56
56
  fallback: /* @__PURE__ */ s(
57
- _,
57
+ p,
58
58
  {
59
59
  type: "multi",
60
60
  className: l.loading
@@ -81,5 +81,5 @@ const E = {
81
81
  );
82
82
  };
83
83
  export {
84
- w as default
84
+ k as default
85
85
  };