@bahmni/widgets 0.0.1-dev.217 → 0.0.1-dev.220

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/{DocumentsTable-D6QA5iit.js → DocumentsTable-CzTsPYJg.js} +10 -10
  2. package/dist/{FormsTable-BaoRiLls.js → FormsTable-Bj2-Fk7L.js} +47 -47
  3. package/dist/{Observations-CuBh2HjE.js → Observations-iTkADFbN.js} +35 -35
  4. package/dist/appContext/AppContextProvider.d.ts.map +1 -1
  5. package/dist/immunizationHistory/ImmunizationHistory.d.ts +5 -0
  6. package/dist/immunizationHistory/ImmunizationHistory.d.ts.map +1 -0
  7. package/dist/immunizationHistory/__tests__/__mocks__/immunizationMocks.d.ts +6 -0
  8. package/dist/immunizationHistory/__tests__/__mocks__/immunizationMocks.d.ts.map +1 -0
  9. package/dist/immunizationHistory/components/AdministeredTab.d.ts +7 -0
  10. package/dist/immunizationHistory/components/AdministeredTab.d.ts.map +1 -0
  11. package/dist/immunizationHistory/components/NotAdministeredTab.d.ts +7 -0
  12. package/dist/immunizationHistory/components/NotAdministeredTab.d.ts.map +1 -0
  13. package/dist/immunizationHistory/constants.d.ts +5 -0
  14. package/dist/immunizationHistory/constants.d.ts.map +1 -0
  15. package/dist/immunizationHistory/index.d.ts +2 -0
  16. package/dist/immunizationHistory/index.d.ts.map +1 -0
  17. package/dist/immunizationHistory/model.d.ts +24 -0
  18. package/dist/immunizationHistory/model.d.ts.map +1 -0
  19. package/dist/immunizationHistory/utils.d.ts +5 -0
  20. package/dist/immunizationHistory/utils.d.ts.map +1 -0
  21. package/dist/{index-Bf3AimmC.js → index-CVIZL5V2.js} +24572 -24087
  22. package/dist/index.css +1 -1
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +23 -22
  26. package/dist/registry/widgetMap.d.ts.map +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as _, Fragment as Q } from "react/jsx-runtime";
2
- import { u as W, a as X, k as J, c as Z, i as x, d as ee, y as te } from "./index-Bf3AimmC.js";
2
+ import { u as W, a as X, Y as J, r as Z, E as x, b as ee, y as te } from "./index-CVIZL5V2.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as p, useEffect as N, useMemo as f } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -37,9 +37,9 @@ const _e = [
37
37
  ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, R = (n) => n.attachments.length > 0 ? n.attachments : n.documentUrl ? [{ url: n.documentUrl, contentType: n.contentType }] : [], Ne = ({ config: n, encounterUuids: E }) => {
38
38
  const [d, M] = l(!1), [r, U] = l(
39
39
  null
40
- ), [k, A] = l(
40
+ ), [P, A] = l(
41
41
  /* @__PURE__ */ new Set()
42
- ), T = W(), { t: o } = ae(), { addNotification: w } = X(), P = Number(n?.pageSize) || 5, [D, O] = l(1), [m, F] = l(P), [$, C] = l(void 0), b = p((e) => {
42
+ ), T = W(), { t: o } = ae(), { addNotification: w } = X(), F = Number(n?.pageSize) || 5, [D, O] = l(1), [m, $] = l(F), [k, C] = l(void 0), b = p((e) => {
43
43
  U(e), M(!0);
44
44
  }, []), V = p(() => {
45
45
  M(!1), U(null), A(/* @__PURE__ */ new Set());
@@ -92,13 +92,13 @@ const _e = [
92
92
  }, [d, r]);
93
93
  const H = p(
94
94
  (e, t) => {
95
- t !== m ? (F(t), O(1), C(void 0)) : O(e);
95
+ t !== m ? ($(t), O(1), C(void 0)) : O(e);
96
96
  },
97
97
  [m]
98
98
  ), g = f(
99
99
  () => n?.fields ?? _e,
100
100
  [n?.fields]
101
- ), q = f(() => [...u?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [u]), G = f(() => he(g, o), [g, o]), Y = f(
101
+ ), Y = f(() => [...u?.documents ?? []].sort((t, a) => !t.uploadedOn && !a.uploadedOn ? 0 : t.uploadedOn ? a.uploadedOn ? new Date(a.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [u]), q = f(() => he(g, o), [g, o]), G = f(
102
102
  () => g.map((e) => ({
103
103
  key: e,
104
104
  sortable: e !== "action"
@@ -142,18 +142,18 @@ const _e = [
142
142
  /* @__PURE__ */ s("div", { "data-testid": "documents-table", children: /* @__PURE__ */ s(
143
143
  ee,
144
144
  {
145
- headers: G,
145
+ headers: q,
146
146
  ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
147
- rows: q,
147
+ rows: Y,
148
148
  loading: z,
149
149
  errorStateMessage: y ? S?.message : null,
150
- sortable: Y,
150
+ sortable: G,
151
151
  emptyStateMessage: o("DOCUMENTS_NO_RECORDS"),
152
152
  renderCell: K,
153
153
  className: c.documentsTableBody,
154
154
  dataTestId: "documents-table",
155
155
  pageSize: m,
156
- totalItems: $,
156
+ totalItems: k,
157
157
  page: D,
158
158
  onPageChange: H
159
159
  }
@@ -170,7 +170,7 @@ const _e = [
170
170
  size: "lg",
171
171
  testId: "document-view-modal",
172
172
  children: /* @__PURE__ */ s("div", { className: c.documentViewerContainer, children: h.map((e, t) => {
173
- const a = j(e.url), I = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), v = k.has(t);
173
+ const a = j(e.url), I = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), v = P.has(t);
174
174
  return a === "#" || v ? /* @__PURE__ */ _(
175
175
  "div",
176
176
  {
@@ -1,52 +1,52 @@
1
- import { jsx as n, jsxs as W, Fragment as Z } from "react/jsx-runtime";
2
- import { A as ee, u as re, b as te, w as oe, e as ae, v as se, l as ne, C as de, R as q, i as ie, c as ce, d as U, X as me, Q as le, y as ue, O as fe } from "./index-Bf3AimmC.js";
1
+ import { jsx as n, jsxs as X, Fragment as Z } from "react/jsx-runtime";
2
+ import { j as ee, u as re, R as te, C as oe, P as ae, I as se, S as ne, G as de, c as q, E as ie, r as me, b as U, Q as ce, e as le, y as ue, O as fe } from "./index-CVIZL5V2.js";
3
3
  import { useQueryClient as ye, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as x, useMemo as d, useCallback as y } from "react";
5
5
  import { useTranslation as pe } from "react-i18next";
6
6
  const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
7
7
  formsTableBody: be,
8
8
  customAccordianItem: ge
9
- }, he = (c) => c ? c.extension?.find(
9
+ }, he = (m) => m ? m.extension?.find(
10
10
  (p) => p.url === ee
11
- )?.valueString : void 0, Ae = ({
12
- episodeOfCareUuids: c,
11
+ )?.valueString : void 0, Ie = ({
12
+ episodeOfCareUuids: m,
13
13
  encounterUuids: i,
14
14
  config: p
15
15
  }) => {
16
- const { t: s } = pe(), m = re(), [l, E] = x(!1), [t, A] = x(null), { numberOfVisits: k, hideThumbnail: P = !1 } = p ?? {}, D = te(
17
- c,
16
+ const { t: s } = pe(), c = re(), [l, v] = x(!1), [t, I] = x(null), { numberOfVisits: P, hideThumbnail: k = !1 } = p ?? {}, D = te(
17
+ m,
18
18
  i
19
- ), w = ye(), {
19
+ ), j = ye(), {
20
20
  data: b = [],
21
- isLoading: I,
22
- isError: M,
21
+ isLoading: M,
22
+ isError: R,
23
23
  error: H,
24
24
  refetch: K
25
25
  } = f({
26
- queryKey: ["forms", m, c],
27
- queryFn: () => oe(m, void 0, k),
28
- enabled: !!m && !D
29
- }), B = d(() => !i || i.length === 0 ? b : b.filter(
26
+ queryKey: ["forms", c, m],
27
+ queryFn: () => oe(c, void 0, P),
28
+ enabled: !!c && !D
29
+ }), A = d(() => !i || i.length === 0 ? b : b.filter(
30
30
  (e) => i.includes(e.encounterUuid)
31
- ), [b, i]), { data: R = [] } = f({
31
+ ), [b, i]), { data: B = [] } = f({
32
32
  queryKey: ["observationForms"],
33
33
  queryFn: () => ae()
34
34
  }), T = y(
35
- (e) => R.find((r) => r.name === e)?.uuid,
36
- [R]
35
+ (e) => B.find((r) => r.name === e)?.uuid,
36
+ [B]
37
37
  ), g = d(() => {
38
38
  if (t)
39
39
  return T(t.formName);
40
40
  }, [t, T]), {
41
41
  isLoading: Q,
42
- isError: j,
42
+ isError: G,
43
43
  error: h
44
44
  } = f({
45
45
  queryKey: ["formMetadata", g],
46
46
  queryFn: () => se(g),
47
47
  enabled: !!g && l
48
48
  }), {
49
- data: v,
49
+ data: E,
50
50
  isLoading: V,
51
51
  isError: $,
52
52
  error: F
@@ -57,14 +57,14 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
57
57
  });
58
58
  de(
59
59
  (e) => {
60
- e.patientUUID === m && e.updatedConcepts.size > 0 && (K(), w.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
60
+ e.patientUUID === c && e.updatedConcepts.size > 0 && (K(), j.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
61
61
  },
62
- [m]
62
+ [c]
63
63
  );
64
- const z = d(() => !v?.entry || !t?.formName ? [] : v.entry.filter((a) => a.resource?.resourceType === "Observation").map((a) => a.resource).filter((a) => {
64
+ const w = d(() => !E?.entry || !t?.formName ? [] : E.entry.filter((a) => a.resource?.resourceType === "Observation").map((a) => a.resource).filter((a) => {
65
65
  const r = he(a);
66
66
  return !r || r.includes(t.formName);
67
- }), [v, t?.formName]), G = d(() => {
67
+ }), [E, t?.formName]), z = d(() => {
68
68
  if (h)
69
69
  return q(h).message;
70
70
  if (F)
@@ -75,18 +75,18 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
75
75
  { key: "recordedBy", header: s("RECORDED_BY") }
76
76
  ],
77
77
  [s]
78
- ), X = d(
78
+ ), Y = d(
79
79
  () => [
80
80
  { key: "recordedOn", sortable: !0 },
81
81
  { key: "recordedBy", sortable: !0 }
82
82
  ],
83
83
  []
84
84
  ), _ = d(() => {
85
- const e = B.reduce(
85
+ const e = A.reduce(
86
86
  (r, o) => {
87
87
  const u = o.formName;
88
88
  r[u] ??= [];
89
- const N = o.providers.map((J) => J.providerName).filter(Boolean).join(", ");
89
+ const N = o.providers.map((W) => W.providerName).filter(Boolean).join(", ");
90
90
  return r[u].push({
91
91
  id: o.encounterUuid,
92
92
  formName: o.formName,
@@ -106,38 +106,38 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
106
106
  )
107
107
  })
108
108
  ).sort((r, o) => r.formName.localeCompare(o.formName));
109
- }, [B, s]), C = y((e) => {
110
- A(e), E(!0);
111
- }, []), Y = y(() => {
112
- E(!1), A(null);
113
- }, []), S = y(
109
+ }, [A, s]), S = y((e) => {
110
+ I(e), v(!0);
111
+ }, []), J = y(() => {
112
+ v(!1), I(null);
113
+ }, []), C = y(
114
114
  (e, a) => {
115
115
  switch (a) {
116
116
  case "recordedOn":
117
- return /* @__PURE__ */ n(ce, { onClick: () => C(e), children: e.recordedOn });
117
+ return /* @__PURE__ */ n(me, { onClick: () => S(e), children: e.recordedOn });
118
118
  case "recordedBy":
119
119
  return e.recordedBy;
120
120
  default:
121
121
  return null;
122
122
  }
123
123
  },
124
- [C]
124
+ [S]
125
125
  );
126
- return /* @__PURE__ */ W(Z, { children: [
127
- /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: I || M || _.length === 0 || D ? /* @__PURE__ */ n(
126
+ return /* @__PURE__ */ X(Z, { children: [
127
+ /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: M || R || _.length === 0 || D ? /* @__PURE__ */ n(
128
128
  U,
129
129
  {
130
130
  headers: L,
131
131
  ariaLabel: s("FORMS_HEADING"),
132
132
  rows: [],
133
- loading: I,
134
- errorStateMessage: M ? H?.message : void 0,
133
+ loading: M,
134
+ errorStateMessage: R ? H?.message : void 0,
135
135
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
136
- renderCell: S,
136
+ renderCell: C,
137
137
  className: O.formsTableBody,
138
138
  dataTestId: "forms-table"
139
139
  }
140
- ) : /* @__PURE__ */ n(me, { align: "start", children: _.map((e, a) => {
140
+ ) : /* @__PURE__ */ n(ce, { align: "start", children: _.map((e, a) => {
141
141
  const { formName: r, records: o } = e;
142
142
  return /* @__PURE__ */ n(
143
143
  le,
@@ -154,9 +154,9 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
154
154
  rows: o,
155
155
  loading: !1,
156
156
  errorStateMessage: "",
157
- sortable: X,
157
+ sortable: Y,
158
158
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
159
- renderCell: S,
159
+ renderCell: C,
160
160
  className: O.formsTableBody,
161
161
  dataTestId: `forms-table-${r}`
162
162
  }
@@ -171,7 +171,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
171
171
  id: "modalIdForActionAreaLayout",
172
172
  portalId: "main-display-area",
173
173
  open: l,
174
- onRequestClose: Y,
174
+ onRequestClose: J,
175
175
  modalHeading: t.formName,
176
176
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
177
177
  passiveModal: !0,
@@ -180,13 +180,13 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
180
180
  children: /* @__PURE__ */ n(
181
181
  fe,
182
182
  {
183
- observations: z,
183
+ observations: w,
184
184
  isLoading: Q || V,
185
- isError: j || $,
186
- errorMessage: G,
185
+ isError: G || $,
186
+ errorMessage: z,
187
187
  emptyStateMessage: s("NO_FORM_DATA_AVAILABLE"),
188
188
  testIdPrefix: t.formName,
189
- hideThumbnail: P
189
+ hideThumbnail: k
190
190
  }
191
191
  )
192
192
  }
@@ -194,5 +194,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
194
194
  ] });
195
195
  };
196
196
  export {
197
- Ae as default
197
+ Ie as default
198
198
  };
@@ -1,13 +1,13 @@
1
- import { jsx as l, jsxs as S } from "react/jsx-runtime";
2
- import { f as V, g as D, t as k, h as K, o as Q, j as w, E as G, M as P, u as j, a as H, m as z, n as Y, C as J, p as W, q as X, s as Z, r as x, d as ee } from "./index-Bf3AimmC.js";
1
+ import { jsx as l, jsxs as C } from "react/jsx-runtime";
2
+ import { f as k, g as D, t as q, A as G, l as K, M as Q, V as w, d as P, u as H, a as j, h as z, i as Y, G as J, k as W, m as X, s as Z, n as x, b as ee } from "./index-CVIZL5V2.js";
3
3
  import { useQueries as te, useQuery as se } from "@tanstack/react-query";
4
- import { useRef as oe, useEffect as C, useMemo as g } from "react";
4
+ import { useRef as oe, useEffect as N, useMemo as g } from "react";
5
5
  import { useTranslation as U } from "react-i18next";
6
- const B = (t, i, c, d, u, r) => {
7
- const s = k(t, i, u), o = s.value, a = K(o);
6
+ const A = (t, i, c, d, u, r) => {
7
+ const s = q(t, i, u), o = s.value, a = G(o);
8
8
  let n = o;
9
9
  a === "Image" && (n = /* @__PURE__ */ l(
10
- w,
10
+ Q,
11
11
  {
12
12
  imageSrc: o,
13
13
  alt: o,
@@ -15,7 +15,7 @@ const B = (t, i, c, d, u, r) => {
15
15
  hideThumbnail: r
16
16
  }
17
17
  )), a === "Video" && (n = /* @__PURE__ */ l(
18
- G,
18
+ w,
19
19
  {
20
20
  id: `${o}-video`,
21
21
  videoSrc: o,
@@ -24,9 +24,9 @@ const B = (t, i, c, d, u, r) => {
24
24
  )), a === "PDF" && (n = /* @__PURE__ */ l(P, { id: `${o}-pdf`, src: o }));
25
25
  const b = u("OBSERVATIONS_RECORDED_BY", {
26
26
  provider: s.provider
27
- }), p = t.display, v = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = d ? `${d}-${v}-${p}-${c}-${i}` : `${v}-${p}-${c}-${i}`;
27
+ }), p = t.display, m = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = d ? `${d}-${m}-${p}-${c}-${i}` : `${m}-${p}-${c}-${i}`;
28
28
  return /* @__PURE__ */ l(
29
- Q,
29
+ K,
30
30
  {
31
31
  header: s.header,
32
32
  value: n,
@@ -44,7 +44,7 @@ const B = (t, i, c, d, u, r) => {
44
44
  id: `grouped-obs-${t.display}-${d}`,
45
45
  open: c,
46
46
  children: t.members?.map(
47
- (o, a) => B(
47
+ (o, a) => A(
48
48
  o,
49
49
  a,
50
50
  u,
@@ -61,8 +61,8 @@ const B = (t, i, c, d, u, r) => {
61
61
  hideThumbnail: c
62
62
  }) => {
63
63
  const { t: d } = U(), u = (r, s, o) => {
64
- const a = V(r.encounterDetails, d);
65
- return /* @__PURE__ */ S(
64
+ const a = k(r.encounterDetails, d);
65
+ return /* @__PURE__ */ C(
66
66
  D,
67
67
  {
68
68
  title: a,
@@ -70,7 +70,7 @@ const B = (t, i, c, d, u, r) => {
70
70
  open: s,
71
71
  children: [
72
72
  r.observations.map(
73
- (n, b) => B(
73
+ (n, b) => A(
74
74
  n,
75
75
  b,
76
76
  o,
@@ -106,35 +106,35 @@ const B = (t, i, c, d, u, r) => {
106
106
  )
107
107
  }
108
108
  );
109
- }, ne = "_observations_kfbhq_1", ie = "_title_kfbhq_12", N = {
109
+ }, ne = "_observations_kfbhq_1", ie = "_title_kfbhq_12", S = {
110
110
  observations: ne,
111
111
  title: ie
112
- }, ce = (t) => ["conceptUuid", t], de = (t, i) => ["observations", t, ...i], me = ({ config: t }) => {
112
+ }, ce = (t) => ["conceptUuid", t], de = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
113
113
  const i = t, {
114
114
  conceptNames: c = [],
115
115
  conceptUuid: d = [],
116
116
  hideThumbnail: u = !1
117
- } = i, r = oe(/* @__PURE__ */ new Set()), s = j(), { addNotification: o } = H(), { t: a } = U(), n = te({
117
+ } = i, r = oe(/* @__PURE__ */ new Set()), s = H(), { addNotification: o } = j(), { t: a } = U(), n = te({
118
118
  queries: c.map((e) => ({
119
119
  queryKey: ce(e),
120
120
  queryFn: () => z(e),
121
121
  enabled: !!e
122
122
  }))
123
123
  });
124
- C(() => {
125
- n.forEach((e, m) => {
126
- if (e.isError && !r.current.has(m)) {
127
- const R = c[m];
124
+ N(() => {
125
+ n.forEach((e, v) => {
126
+ if (e.isError && !r.current.has(v)) {
127
+ const R = c[v];
128
128
  o({
129
129
  title: a("ERROR_DEFAULT_TITLE"),
130
130
  message: a("ERROR_FETCHING_CONCEPT", { conceptName: R }),
131
131
  type: "error"
132
- }), r.current.add(m);
133
- } else e.isError || r.current.delete(m);
132
+ }), r.current.add(v);
133
+ } else e.isError || r.current.delete(v);
134
134
  });
135
135
  }, [n, c]);
136
136
  const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), p = g(() => [.../* @__PURE__ */ new Set([...b, ...d])], [b, d]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
137
- data: v,
137
+ data: m,
138
138
  isLoading: y,
139
139
  isError: O,
140
140
  refetch: T
@@ -150,7 +150,7 @@ const B = (t, i, c, d, u, r) => {
150
150
  ) && T();
151
151
  },
152
152
  [s, T]
153
- ), C(() => {
153
+ ), N(() => {
154
154
  O && o({
155
155
  title: a("ERROR_DEFAULT_TITLE"),
156
156
  message: a("ERROR_FETCHING_OBSERVATIONS"),
@@ -158,21 +158,21 @@ const B = (t, i, c, d, u, r) => {
158
158
  });
159
159
  }, [O]);
160
160
  const I = g(() => {
161
- if (!v) return [];
162
- const e = W(v), m = X(e);
163
- return Z(m);
164
- }, [v]), A = [
161
+ if (!m) return [];
162
+ const e = W(m), v = X(e);
163
+ return Z(v);
164
+ }, [m]), B = [
165
165
  { key: "name", header: "name" },
166
166
  { key: "value", header: "value" },
167
167
  { key: "form", header: "form" }
168
- ], _ = y || !f, $ = O && f, F = (!v || v.entry?.length === 0 || p.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, q = I.length > 0 && !_ && !$, h = i.titleTranslationKey, E = h ? a(h) : "";
169
- return /* @__PURE__ */ S(
168
+ ], _ = y || !f, $ = O && f, F = (!m || m.entry?.length === 0 || p.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, V = I.length > 0 && !_ && !$, h = i.titleTranslationKey, E = h ? a(h) : "";
169
+ return /* @__PURE__ */ C(
170
170
  "div",
171
171
  {
172
172
  id: "observations",
173
173
  "data-testid": h ? `observations-${E}` : "observations",
174
174
  "aria-label": "observations-aria-label",
175
- className: N.observations,
175
+ className: S.observations,
176
176
  children: [
177
177
  /* @__PURE__ */ l(
178
178
  x,
@@ -180,11 +180,11 @@ const B = (t, i, c, d, u, r) => {
180
180
  id: "observations-title",
181
181
  testId: h ? `observations-title-${E}` : "observations-title",
182
182
  title: E,
183
- className: N.title,
183
+ className: S.title,
184
184
  children: /* @__PURE__ */ l("p", { children: E })
185
185
  }
186
186
  ),
187
- q ? /* @__PURE__ */ l(
187
+ V ? /* @__PURE__ */ l(
188
188
  ae,
189
189
  {
190
190
  groupedData: I,
@@ -194,7 +194,7 @@ const B = (t, i, c, d, u, r) => {
194
194
  ) : /* @__PURE__ */ l(
195
195
  ee,
196
196
  {
197
- headers: A,
197
+ headers: B,
198
198
  rows: [],
199
199
  ariaLabel: a("OBSERVATIONS"),
200
200
  loading: _,
@@ -209,6 +209,6 @@ const B = (t, i, c, d, u, r) => {
209
209
  };
210
210
  export {
211
211
  ce as conceptUuidQueryKeys,
212
- me as default,
212
+ ve as default,
213
213
  de as observationsQueryKeys
214
214
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AppContextProvider.d.ts","sourceRoot":"","sources":["../../src/appContext/AppContextProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAEpD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAWhE,CAAC"}
1
+ {"version":3,"file":"AppContextProvider.d.ts","sourceRoot":"","sources":["../../src/appContext/AppContextProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAEpD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgBhE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { WidgetProps } from '../registry/model';
3
+ declare const ImmunizationHistory: React.FC<WidgetProps>;
4
+ export default ImmunizationHistory;
5
+ //# sourceMappingURL=ImmunizationHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImmunizationHistory.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/ImmunizationHistory.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkBhD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2F9C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Immunization } from 'fhir/r4';
2
+ export declare const mockAdministeredImmunization: Immunization;
3
+ export declare const mockMinimalAdministeredImmunization: Immunization;
4
+ export declare const mockMinimalNotAdministeredImmunization: Immunization;
5
+ export declare const mockNotAdministeredImmunization: Immunization;
6
+ //# sourceMappingURL=immunizationMocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"immunizationMocks.d.ts","sourceRoot":"","sources":["../../../../src/immunizationHistory/__tests__/__mocks__/immunizationMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,4BAA4B,EAAE,YA8B1C,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,YAQjD,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,YAOpD,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,YAc7C,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface AdministeredTabProps {
3
+ patientUUID: string;
4
+ }
5
+ declare const AdministeredTab: React.FC<AdministeredTabProps>;
6
+ export default AdministeredTab;
7
+ //# sourceMappingURL=AdministeredTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/AdministeredTab.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;CACrB;AAiBD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmJnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface NotAdministeredTabProps {
3
+ patientUUID: string;
4
+ }
5
+ declare const NotAdministeredTab: React.FC<NotAdministeredTabProps>;
6
+ export default NotAdministeredTab;
7
+ //# sourceMappingURL=NotAdministeredTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotAdministeredTab.d.ts","sourceRoot":"","sources":["../../../src/immunizationHistory/components/NotAdministeredTab.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,UAAU,uBAAuB;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAgBD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsEzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const FHIR_EXT_IMMUNIZATION_DRUG = "http://fhir.bahmni.org/ext/immunization/administeredProduct";
2
+ export declare const ADMINISTERING_PROVIDER_CODE = "AP";
3
+ export declare const ORDERING_PROVIDER_CODE = "OP";
4
+ export declare const ADD_IMMUNIZATIONS_PRIVILEGE = "Add Immunizations";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,gEACwB,CAAC;AAChE,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAChD,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,2BAA2B,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as ImmunizationHistory } from './ImmunizationHistory';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,24 @@
1
+ export interface AdministeredImmunizationViewModel {
2
+ id: string;
3
+ code: string | null;
4
+ doseSequence: string | null;
5
+ drugName: string | null;
6
+ administeredOn: string | null;
7
+ administeredLocation: string | null;
8
+ route: string | null;
9
+ site: string | null;
10
+ manufacturer: string | null;
11
+ batchNumber: string | null;
12
+ recordedBy: string | null;
13
+ orderedBy: string | null;
14
+ notes: string | null;
15
+ hasDetails: boolean;
16
+ }
17
+ export interface NotAdministeredImmunizationViewModel {
18
+ id: string;
19
+ code: string | null;
20
+ reason: string | null;
21
+ date: string | null;
22
+ recordedBy: string | null;
23
+ }
24
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ import { Immunization } from 'fhir/r4';
2
+ import { AdministeredImmunizationViewModel, NotAdministeredImmunizationViewModel } from './model';
3
+ export declare function createAdministeredImmunizationViewModel(immunization: Immunization): AdministeredImmunizationViewModel;
4
+ export declare function createNotAdministeredImmunizationViewModel(immunization: Immunization): NotAdministeredImmunizationViewModel;
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/immunizationHistory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACrC,MAAM,SAAS,CAAC;AA2BjB,wBAAgB,uCAAuC,CACrD,YAAY,EAAE,YAAY,GACzB,iCAAiC,CAmCnC;AAED,wBAAgB,0CAA0C,CACxD,YAAY,EAAE,YAAY,GACzB,oCAAoC,CAQtC"}