@bahmni/clinical-app 0.0.1-dev.144 → 0.0.1-dev.145

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 (27) hide show
  1. package/dist/{FormsTable-Dpfi4Dm7-DbKsSggq.js → FormsTable-BHeAQgqW-DX63Mm9Q.js} +49 -49
  2. package/dist/{LNWAZHJI-OARAah4n.js → LNWAZHJI-MRURtnw3.js} +2 -2
  3. package/dist/{MWZ6AO7Z-BIiDAyIh.js → MWZ6AO7Z-CpumjdVA.js} +2 -2
  4. package/dist/{Observations-DQ6cetK6-DpLs4Q70.js → Observations-GGAuVXyN-D5AKhuNm.js} +26 -26
  5. package/dist/{YPM2AS64-BkYAzaXN.js → YPM2AS64-DJeg6kXJ.js} +1 -1
  6. package/dist/components/consultationPad/ConsultationPad.d.ts.map +1 -1
  7. package/dist/components/forms/medications/MedicationsForm.d.ts.map +1 -1
  8. package/dist/components/forms/medications/SelectedMedicationItem.d.ts.map +1 -1
  9. package/dist/components/forms/vaccinations/SelectedVaccinationItem.d.ts.map +1 -1
  10. package/dist/components/forms/vaccinations/VaccinationForm.d.ts +1 -2
  11. package/dist/components/forms/vaccinations/VaccinationForm.d.ts.map +1 -1
  12. package/dist/{index-BiKGMCL-.js → index-CFtzCIz2.js} +34008 -33627
  13. package/dist/index.css +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/locales/locale_en.json +1 -0
  16. package/dist/locales/locale_es.json +1 -0
  17. package/dist/models/medication.d.ts +1 -0
  18. package/dist/models/medication.d.ts.map +1 -1
  19. package/dist/services/medicationService.d.ts +10 -1
  20. package/dist/services/medicationService.d.ts.map +1 -1
  21. package/dist/stores/medicationsStore.d.ts.map +1 -1
  22. package/dist/stores/vaccinationsStore.d.ts.map +1 -1
  23. package/dist/utils/fhir/codeUtilities.d.ts +41 -0
  24. package/dist/utils/fhir/codeUtilities.d.ts.map +1 -0
  25. package/dist/utils/fhir/medicationUtilities.d.ts +33 -0
  26. package/dist/utils/fhir/medicationUtilities.d.ts.map +1 -0
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { jsx as t, jsxs as p, Fragment as J } from "react/jsx-runtime";
2
- import { u as z, V as Y, a as W, b as h, d as Z, g as ee, $ as x, F as re, q as ae, c as oe, x as te, y as G, B as ne, E as v, Q as se, J as me, X as de, G as ie } from "./index-BiKGMCL-.js";
1
+ import { jsx as t, jsxs as p, Fragment as Q } from "react/jsx-runtime";
2
+ import { u as X, V as Y, h as J, a as h, d as Z, w as ee, $ as x, q as re, W as ae, F as oe, _ as te, y as G, P as ne, b as v, n as se, t as de, r as me, e as ie } from "./index-CFtzCIz2.js";
3
3
  import { useState as U, useMemo as $, useCallback as y } from "react";
4
4
  const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue = "_formContent_1pd36_18", pe = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", _e = "_groupContainer_1pd36_39", fe = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", Ne = "_rowLabel_1pd36_58", ge = "_rowValue_1pd36_67", he = "_groupMembers_1pd36_75", ye = "_memberRow_1pd36_81", ve = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Me = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Le = "_commentText_1pd36_116", Ce = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Oe = "_nestedGroupMembers_1pd36_141", o = {
5
5
  formsTableBody: le,
@@ -23,36 +23,36 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
23
23
  nestedGroupLabel: De,
24
24
  nestedGroupMembers: Oe
25
25
  }, Re = "ABNORMAL", q = (e) => {
26
- const s = e.concept?.units, d = e.concept?.lowNormal, r = e.concept?.hiNormal, u = d != null, m = r != null, c = u && m ? ` (${d} - ${r})` : u ? ` (>${d})` : m ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() === Re;
26
+ const s = e.concept?.units, m = e.concept?.lowNormal, r = e.concept?.hiNormal, u = m != null, d = r != null, c = u && d ? ` (${m} - ${r})` : u ? ` (>${m})` : d ? ` (<${r})` : "", a = e.interpretation && e.interpretation.toUpperCase() === Re;
27
27
  return { units: s, rangeString: c, isAbnormal: a };
28
28
  }, k = ({
29
29
  member: e,
30
30
  depth: s = 0,
31
- memberIndex: d = 0,
31
+ memberIndex: m = 0,
32
32
  formName: r = ""
33
33
  }) => {
34
- const u = e.groupMembers && e.groupMembers.length > 0, m = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name, c = r ? `${r}-` : "";
34
+ const u = e.groupMembers && e.groupMembers.length > 0, d = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name, c = r ? `${r}-` : "";
35
35
  if (u)
36
36
  return /* @__PURE__ */ p(
37
37
  "div",
38
38
  {
39
39
  className: o.nestedGroup,
40
- "data-testid": `${c}obs-nested-group-${m}-${d}`,
40
+ "data-testid": `${c}obs-nested-group-${d}-${m}`,
41
41
  children: [
42
42
  /* @__PURE__ */ t(
43
43
  "div",
44
44
  {
45
45
  className: o.nestedGroupLabel,
46
- "data-testid": `${c}obs-nested-group-label-${m}-${d}`,
46
+ "data-testid": `${c}obs-nested-group-label-${d}-${m}`,
47
47
  style: { paddingLeft: `${s * 16}px` },
48
- children: m
48
+ children: d
49
49
  }
50
50
  ),
51
51
  /* @__PURE__ */ t(
52
52
  "div",
53
53
  {
54
54
  className: o.nestedGroupMembers,
55
- "data-testid": `${c}obs-nested-group-members-${m}-${d}`,
55
+ "data-testid": `${c}obs-nested-group-members-${d}-${m}`,
56
56
  children: e.groupMembers?.map((N, g) => /* @__PURE__ */ t(
57
57
  k,
58
58
  {
@@ -73,7 +73,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
73
73
  "div",
74
74
  {
75
75
  className: o.memberRow,
76
- "data-testid": `${c}obs-member-row-${m}-${d}`,
76
+ "data-testid": `${c}obs-member-row-${d}-${m}`,
77
77
  style: { paddingLeft: `${s * 16}px` },
78
78
  children: [
79
79
  /* @__PURE__ */ p(
@@ -83,9 +83,9 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
83
83
  o.memberLabel,
84
84
  _ ? o.abnormalValue : ""
85
85
  ),
86
- "data-testid": `${c}obs-member-label-${m}-${d}`,
86
+ "data-testid": `${c}obs-member-label-${d}-${m}`,
87
87
  children: [
88
- m,
88
+ d,
89
89
  b
90
90
  ]
91
91
  }
@@ -97,7 +97,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
97
97
  o.memberValue,
98
98
  _ ? o.abnormalValue : ""
99
99
  ),
100
- "data-testid": `${c}obs-member-value-${m}-${d}`,
100
+ "data-testid": `${c}obs-member-value-${d}-${m}`,
101
101
  children: [
102
102
  e.valueAsString,
103
103
  a && ` ${a}`
@@ -110,9 +110,9 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
110
110
  }, Fe = ({
111
111
  observation: e,
112
112
  index: s,
113
- formName: d = ""
113
+ formName: m = ""
114
114
  }) => {
115
- const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } = q(e), a = d ? `${d}-` : "";
115
+ const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: d, isAbnormal: c } = q(e), a = m ? `${m}-` : "";
116
116
  return /* @__PURE__ */ p(
117
117
  "div",
118
118
  {
@@ -135,7 +135,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
135
135
  "data-testid": `${a}observation-label-${e.conceptNameToDisplay}-${s}`,
136
136
  children: [
137
137
  e.conceptNameToDisplay,
138
- !r && m && /* @__PURE__ */ t("span", { className: o.rangeInfo, children: m })
138
+ !r && d && /* @__PURE__ */ t("span", { className: o.rangeInfo, children: d })
139
139
  ]
140
140
  }
141
141
  ),
@@ -150,7 +150,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
150
150
  member: b,
151
151
  depth: 0,
152
152
  memberIndex: _,
153
- formName: d
153
+ formName: m
154
154
  },
155
155
  `${b.concept.uuid}`
156
156
  ))
@@ -187,12 +187,12 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
187
187
  },
188
188
  `${e.concept.uuid}-${s}`
189
189
  );
190
- }, Ve = ({
190
+ }, Se = ({
191
191
  episodeOfCareUuids: e,
192
192
  encounterUuids: s,
193
- config: d
193
+ config: m
194
194
  }) => {
195
- const { t: r } = z(), u = Y(), [m, c] = U(!1), [a, b] = U(null), _ = d?.numberOfVisits, N = W(
195
+ const { t: r } = X(), u = Y(), [d, c] = U(!1), [a, b] = U(null), _ = m?.numberOfVisits, N = J(
196
196
  e,
197
197
  s
198
198
  ), {
@@ -208,7 +208,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
208
208
  (n) => s.includes(n.encounterUuid)
209
209
  ), [g, s]), { data: O = [] } = h({
210
210
  queryKey: ["observationForms"],
211
- queryFn: () => me()
211
+ queryFn: () => de()
212
212
  }), R = y(
213
213
  (n) => O.find((l) => l.name === n)?.uuid,
214
214
  [O]
@@ -217,40 +217,40 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
217
217
  return R(a.formName);
218
218
  }, [a, R]), {
219
219
  data: we,
220
- isLoading: j,
220
+ isLoading: P,
221
221
  error: F
222
222
  } = h({
223
223
  queryKey: ["formMetadata", A],
224
- queryFn: () => de(A),
225
- enabled: !!A && m
224
+ queryFn: () => me(A),
225
+ enabled: !!A && d
226
226
  }), {
227
227
  data: M,
228
- isLoading: K,
228
+ isLoading: j,
229
229
  error: w
230
230
  } = h({
231
231
  queryKey: ["formsEncounter", a?.encounterUuid],
232
232
  queryFn: () => ie(a.encounterUuid, !0),
233
- enabled: !!a?.encounterUuid && m
234
- }), E = $(() => !M?.observations || !a?.formName ? [] : M.observations.filter(
233
+ enabled: !!a?.encounterUuid && d
234
+ }), I = $(() => !M?.observations || !a?.formName ? [] : M.observations.filter(
235
235
  (n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(a.formName)
236
- ), [M?.observations, a?.formName]), I = $(
236
+ ), [M?.observations, a?.formName]), V = $(
237
237
  () => [
238
238
  { key: "recordedOn", header: r("FORM_RECORDED_ON") },
239
239
  { key: "recordedBy", header: r("FORM_RECORDED_BY") }
240
240
  ],
241
241
  [r]
242
- ), P = $(
242
+ ), K = $(
243
243
  () => [
244
244
  { key: "recordedOn", sortable: !0 },
245
245
  { key: "recordedBy", sortable: !0 }
246
246
  ],
247
247
  []
248
- ), B = $(() => {
248
+ ), E = $(() => {
249
249
  const n = D.reduce(
250
250
  (l, i) => {
251
251
  const f = i.formName;
252
252
  l[f] ??= [];
253
- const T = i.providers.map((X) => X.providerName).filter(Boolean).join(", ");
253
+ const T = i.providers.map((W) => W.providerName).filter(Boolean).join(", ");
254
254
  return l[f].push({
255
255
  id: i.encounterUuid,
256
256
  formName: i.formName,
@@ -270,38 +270,38 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
270
270
  )
271
271
  })
272
272
  ).sort((l, i) => l.formName.localeCompare(i.formName));
273
- }, [D, r]), V = y((n) => {
273
+ }, [D, r]), S = y((n) => {
274
274
  b(n), c(!0);
275
- }, []), Q = y(() => {
275
+ }, []), z = y(() => {
276
276
  c(!1), b(null);
277
- }, []), S = y(
277
+ }, []), B = y(
278
278
  (n, l) => {
279
279
  switch (l) {
280
280
  case "recordedOn":
281
- return /* @__PURE__ */ t(ee, { onClick: () => V(n), children: n.recordedOn });
281
+ return /* @__PURE__ */ t(ee, { onClick: () => S(n), children: n.recordedOn });
282
282
  case "recordedBy":
283
283
  return n.recordedBy;
284
284
  default:
285
285
  return null;
286
286
  }
287
287
  },
288
- [V]
288
+ [S]
289
289
  );
290
- return /* @__PURE__ */ p(J, { children: [
291
- /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: L || C || B.length === 0 || N ? /* @__PURE__ */ t(
290
+ return /* @__PURE__ */ p(Q, { children: [
291
+ /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: L || C || E.length === 0 || N ? /* @__PURE__ */ t(
292
292
  x,
293
293
  {
294
- headers: I,
294
+ headers: V,
295
295
  ariaLabel: r("FORMS_HEADING"),
296
296
  rows: [],
297
297
  loading: L,
298
298
  errorStateMessage: C ? H?.message : void 0,
299
299
  emptyStateMessage: r("FORMS_UNAVAILABLE"),
300
- renderCell: S,
300
+ renderCell: B,
301
301
  className: o.formsTableBody,
302
302
  dataTestId: "forms-table"
303
303
  }
304
- ) : /* @__PURE__ */ t(re, { align: "start", children: B.map((n, l) => {
304
+ ) : /* @__PURE__ */ t(re, { align: "start", children: E.map((n, l) => {
305
305
  const { formName: i, records: f } = n;
306
306
  return /* @__PURE__ */ t(
307
307
  ae,
@@ -313,14 +313,14 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
313
313
  children: /* @__PURE__ */ t(
314
314
  x,
315
315
  {
316
- headers: I,
316
+ headers: V,
317
317
  ariaLabel: r("FORMS_HEADING"),
318
318
  rows: f,
319
319
  loading: !1,
320
320
  errorStateMessage: "",
321
- sortable: P,
321
+ sortable: K,
322
322
  emptyStateMessage: r("FORMS_UNAVAILABLE"),
323
- renderCell: S,
323
+ renderCell: B,
324
324
  className: o.formsTableBody,
325
325
  dataTestId: `forms-table-${i}`
326
326
  }
@@ -329,18 +329,18 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
329
329
  i
330
330
  );
331
331
  }) }) }),
332
- m && a && /* @__PURE__ */ t(
332
+ d && a && /* @__PURE__ */ t(
333
333
  oe,
334
334
  {
335
335
  id: "modalIdForActionAreaLayout",
336
- open: m,
337
- onRequestClose: Q,
336
+ open: d,
337
+ onRequestClose: z,
338
338
  modalHeading: a.formName,
339
339
  modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
340
340
  passiveModal: !0,
341
341
  size: "md",
342
342
  testId: "form-details-modal",
343
- children: /* @__PURE__ */ t("div", { className: o.formContent, children: j || K ? /* @__PURE__ */ t(te, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: G(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: G(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : E.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: E.map((n, l) => /* @__PURE__ */ t(
343
+ children: /* @__PURE__ */ t("div", { className: o.formContent, children: P || j ? /* @__PURE__ */ t(te, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: G(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: G(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
344
344
  Fe,
345
345
  {
346
346
  observation: n,
@@ -354,5 +354,5 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
354
354
  ] });
355
355
  };
356
356
  export {
357
- Ve as default
357
+ Se as default
358
358
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BkYAzaXN.js";
2
- import { j as d, k as f, l as e } from "./index-BiKGMCL-.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DJeg6kXJ.js";
2
+ import { j as d, k as f, l as e } from "./index-CFtzCIz2.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-BkYAzaXN.js";
2
- import { j as v, k as C, l as e } from "./index-BiKGMCL-.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-DJeg6kXJ.js";
2
+ import { j as v, k as C, l as e } from "./index-CFtzCIz2.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 _, jsx as b } from "react/jsx-runtime";
2
- import { V as B, e as F, u as I, f as k, K, b as x, h as Q, $ as G, W as H, N as A, U as Y, i as j, z, A as P, Y as W } from "./index-BiKGMCL-.js";
3
- import { useRef as X, useEffect as S, useMemo as h } from "react";
4
- const Z = "normal", J = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? H(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
2
+ import { V as F, c as U, u as I, f as k, X as Q, a as x, g as G, $ as K, G as H, C as w, J as X, i as j, T as J, O as P, Q as Y } from "./index-CFtzCIz2.js";
3
+ import { useRef as Z, useEffect as S, useMemo as h } from "react";
4
+ const z = "normal", W = "http://terminology.hl7.org/CodeSystem/referencerange-meaning", ee = "A", te = "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation", ne = (e, n) => e?.date ? H(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
5
5
  if (!e.observationValue?.value)
6
6
  return "";
7
7
  const { value: n, unit: t } = e.observationValue;
@@ -59,7 +59,7 @@ function se(e) {
59
59
  if (i && i.length > 0) {
60
60
  const l = i.find(
61
61
  (v) => v.type?.coding?.some(
62
- (c) => c.system === J && c.code === Z
62
+ (c) => c.system === W && c.code === z
63
63
  )
64
64
  );
65
65
  l && (l.low || l.high) && (u.referenceRange = {
@@ -111,9 +111,9 @@ function ue(e, n) {
111
111
  location: t.location?.[0]?.location?.display
112
112
  };
113
113
  }
114
- function N(e, n, t) {
114
+ function A(e, n, t) {
115
115
  const a = $(e.encounter), r = (e.hasMember ?? []).map((o) => $(o)).map((o) => o ? t.get(o) : void 0).filter((o) => !!o).map(
116
- (o) => N(o, n, t)
116
+ (o) => A(o, n, t)
117
117
  );
118
118
  return {
119
119
  id: e.id,
@@ -136,7 +136,7 @@ function le(e) {
136
136
  const r = [], o = [];
137
137
  return t.forEach((i, s) => {
138
138
  if (a.has(s)) return;
139
- const u = N(
139
+ const u = A(
140
140
  i,
141
141
  n,
142
142
  t
@@ -176,10 +176,10 @@ function ce(e) {
176
176
  return !a && !r ? 0 : a ? r ? new Date(r).getTime() - new Date(a).getTime() : -1 : 1;
177
177
  });
178
178
  }
179
- const w = (e, n, t, a, r) => {
180
- const o = ae(e, n), i = o.value, s = Y(i);
179
+ const D = (e, n, t, a, r) => {
180
+ const o = ae(e, n), i = o.value, s = X(i);
181
181
  let u = i;
182
- s === "Image" && (u = /* @__PURE__ */ b(z, { imageSrc: i, alt: i, id: `${i}-img` })), s === "Video" && (u = /* @__PURE__ */ b(P, { id: `${i}-video`, videoSrc: i }));
182
+ s === "Image" && (u = /* @__PURE__ */ b(J, { imageSrc: i, alt: i, id: `${i}-img` })), s === "Video" && (u = /* @__PURE__ */ b(P, { id: `${i}-video`, videoSrc: i }));
183
183
  const l = r("OBSERVATIONS_RECORDED_BY", {
184
184
  provider: o.provider
185
185
  }), v = e.display, c = e.observationValue?.isAbnormal ? "abnormal-obs" : "obs", p = a ? `${a}-${c}-${v}-${t}-${n}` : `${c}-${v}-${t}-${n}`;
@@ -196,13 +196,13 @@ const w = (e, n, t, a, r) => {
196
196
  `obs-${e.id}`
197
197
  );
198
198
  }, ve = (e, n, t, a, r, o) => /* @__PURE__ */ b(
199
- A,
199
+ w,
200
200
  {
201
201
  title: e.display,
202
202
  id: `grouped-obs-${e.display}-${a}`,
203
203
  open: t,
204
204
  children: e.children.map(
205
- (i, s) => w(i, s, r, o, n)
205
+ (i, s) => D(i, s, r, o, n)
206
206
  )
207
207
  },
208
208
  `grouped-obs-${e.id}`
@@ -213,14 +213,14 @@ const w = (e, n, t, a, r) => {
213
213
  const { t } = I(), a = (r, o, i) => {
214
214
  const s = ne(r.encounterDetails, t);
215
215
  return /* @__PURE__ */ _(
216
- A,
216
+ w,
217
217
  {
218
218
  title: s,
219
219
  id: `encounter-${r.encounterId}`,
220
220
  open: o,
221
221
  children: [
222
222
  r.observations.map(
223
- (u, l) => w(u, l, i, n, t)
223
+ (u, l) => D(u, l, i, n, t)
224
224
  ),
225
225
  r.groupedObservations.map(
226
226
  (u, l) => ve(
@@ -252,20 +252,20 @@ const w = (e, n, t, a, r) => {
252
252
  observations: be,
253
253
  title: ge
254
254
  }, me = (e) => ["conceptUuid", e], fe = (e, n) => ["observations", e, ...n], Ee = ({ config: e }) => {
255
- const n = e, { conceptNames: t = [], conceptUuid: a = [] } = n, r = X(/* @__PURE__ */ new Set()), o = B(), { addNotification: i } = F(), { t: s } = I(), u = k({
255
+ const n = e, { conceptNames: t = [], conceptUuid: a = [] } = n, r = Z(/* @__PURE__ */ new Set()), o = F(), { addNotification: i } = U(), { t: s } = I(), u = k({
256
256
  queries: t.map((d) => ({
257
257
  queryKey: me(d),
258
- queryFn: () => K(d),
258
+ queryFn: () => Q(d),
259
259
  enabled: !!d
260
260
  }))
261
261
  });
262
262
  S(() => {
263
263
  u.forEach((d, g) => {
264
264
  if (d.isError && !r.current.has(g)) {
265
- const q = t[g];
265
+ const B = t[g];
266
266
  i({
267
267
  title: s("ERROR_DEFAULT_TITLE"),
268
- message: s("ERROR_FETCHING_CONCEPT", { conceptName: q }),
268
+ message: s("ERROR_FETCHING_CONCEPT", { conceptName: B }),
269
269
  type: "error"
270
270
  }), r.current.add(g);
271
271
  } else d.isError || r.current.delete(g);
@@ -273,11 +273,11 @@ const w = (e, n, t, a, r) => {
273
273
  }, [u, t]);
274
274
  const l = h(() => u.map((d) => d.data?.uuid).filter((d) => !!d), [u]), v = h(() => [.../* @__PURE__ */ new Set([...l, ...a])], [l, a]), c = h(() => t.length === 0 ? !0 : u.every((d) => !d.isLoading), [u, t.length]), {
275
275
  data: p,
276
- isLoading: D,
276
+ isLoading: N,
277
277
  isError: y
278
278
  } = x({
279
279
  queryKey: fe(o, v),
280
- queryFn: () => W(o, v),
280
+ queryFn: () => Y(o, v),
281
281
  enabled: !!o && v.length > 0 && c
282
282
  });
283
283
  S(() => {
@@ -295,7 +295,7 @@ const w = (e, n, t, a, r) => {
295
295
  { key: "name", header: "name" },
296
296
  { key: "value", header: "value" },
297
297
  { key: "form", header: "form" }
298
- ], O = D || !c, R = y && c, C = (!p || p.entry?.length === 0 || v.length === 0) && c, U = R ? s("ERROR_FETCHING_OBSERVATIONS") : null, L = C ? s("NO_OBSERVATIONS_FOUND") : void 0, M = E.length > 0 && !O && !R, f = n.titleTranslationKey, m = f ? s(f) : "";
298
+ ], O = N || !c, R = y && c, C = (!p || p.entry?.length === 0 || v.length === 0) && c, L = R ? s("ERROR_FETCHING_OBSERVATIONS") : null, M = C ? s("NO_OBSERVATIONS_FOUND") : void 0, q = E.length > 0 && !O && !R, f = n.titleTranslationKey, m = f ? s(f) : "";
299
299
  return /* @__PURE__ */ _(
300
300
  "div",
301
301
  {
@@ -305,7 +305,7 @@ const w = (e, n, t, a, r) => {
305
305
  className: T.observations,
306
306
  children: [
307
307
  /* @__PURE__ */ b(
308
- Q,
308
+ G,
309
309
  {
310
310
  id: "observations-title",
311
311
  testId: f ? `observations-title-${m}` : "observations-title",
@@ -314,15 +314,15 @@ const w = (e, n, t, a, r) => {
314
314
  children: /* @__PURE__ */ b("p", { children: m })
315
315
  }
316
316
  ),
317
- M ? /* @__PURE__ */ b(pe, { groupedData: E, title: m }) : /* @__PURE__ */ b(
318
- G,
317
+ q ? /* @__PURE__ */ b(pe, { groupedData: E, title: m }) : /* @__PURE__ */ b(
318
+ K,
319
319
  {
320
320
  headers: V,
321
321
  rows: [],
322
322
  ariaLabel: s("OBSERVATIONS"),
323
323
  loading: O,
324
- errorStateMessage: U,
325
- emptyStateMessage: L,
324
+ errorStateMessage: L,
325
+ emptyStateMessage: M,
326
326
  dataTestId: "observations-table"
327
327
  }
328
328
  )
@@ -1,4 +1,4 @@
1
- import { m as we, n as z, o as xt, p as B, k as q, l as m, P as Ro, r as me, S as R, t as _, s as k, v as N, w as A, C as bs, D as ir, H as $e, I as U, L as Hn, M as Vn, O as dt, R as D, T as xs, Z as cn, _ as Be, a0 as ws, a1 as qt, a2 as zt, a3 as $s, a4 as Cs, a5 as $n, a6 as Ss, a7 as Nr, a8 as Bt, a9 as zo, aa as ks, ab as Es, ac as j, ad as Ur, ae as Ms, af as Ds, ag as sr, ah as As, ai as Ts, aj as zn, ak as Fs, al as Is, am as Z, an as Ps, ao as Ls } from "./index-BiKGMCL-.js";
1
+ import { m as we, o as z, p as xt, s as B, k as q, l as m, v as Ro, x as me, S as R, z as _, A as k, B as N, D as A, E as bs, H as ir, I as $e, K as U, L as Hn, M as Vn, N as dt, R as D, U as xs, Y as cn, Z as Be, a0 as ws, a1 as qt, a2 as zt, a3 as $s, a4 as Cs, a5 as $n, a6 as Ss, a7 as Nr, a8 as Bt, a9 as zo, aa as ks, ab as Es, ac as j, ad as Ur, ae as Ms, af as Ds, ag as sr, ah as As, ai as Ts, aj as zn, ak as Fs, al as Is, am as Z, an as Ps, ao as Ls } from "./index-CFtzCIz2.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":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA2CzC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8anD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ConsultationPad.d.ts","sourceRoot":"","sources":["../../../src/components/consultationPad/ConsultationPad.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA2CzC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+anD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MedicationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/MedicationsForm.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA4B,MAAM,OAAO,CAAC;AASjD;;;;;GAKG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EA6K3B,CAAC;AAIH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"MedicationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/MedicationsForm.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAkBpE;;;;;GAKG;AAEH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAuQ3B,CAAC;AAIH,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectedMedicationItem.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/SelectedMedicationItem.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAS/E,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,CAAC,YAAY,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 {"version":3,"file":"SelectedMedicationItem.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/medications/SelectedMedicationItem.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAS/E,MAAM,WAAW,2BAA2B;IAC1C,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,gBAAgB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7E,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,cAAc,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,kBAAkB,EAAE,CAClB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,kBAAkB,GAAG,IAAI,KAC5B,IAAI,CAAC;IACV,iBAAiB,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IACxE,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,eAAe,E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react';
2
2
  /**
3
3
  * VaccinationForm component
4
4
  *
5
- * A component that displays a search interface for vaccinations and a list of selected vaccinations.
6
- * It allows users to search for vaccinations, select them, and specify dosage, frequency, route, timing, and duration.
5
+ * Uses the same FHIR code-based overlap/duplicate detection as MedicationsForm.
7
6
  */
8
7
  declare const VaccinationForm: React.FC;
9
8
  export default VaccinationForm;
@@ -1 +1 @@
1
- {"version":3,"file":"VaccinationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/vaccinations/VaccinationForm.tsx"],"names":[],"mappings":"AASA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD;;;;;GAKG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAkM3B,CAAC;AAIH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"VaccinationForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/vaccinations/VaccinationForm.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAmBpE;;;;GAIG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAkR3B,CAAC;AAIH,eAAe,eAAe,CAAC"}