@bahmni/clinical-app 0.0.1-dev.108 → 0.0.1-dev.110

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 (34) hide show
  1. package/dist/{FormsTable-BhgvFijg-DpVuvYKa.js → FormsTable-DvQygCpm-DU5ePiaA.js} +53 -53
  2. package/dist/{LNWAZHJI-CSzbmhBu.js → LNWAZHJI-DbMownaN.js} +5 -5
  3. package/dist/{MWZ6AO7Z-BHBRGSOE.js → MWZ6AO7Z-BfeNGPBG.js} +5 -5
  4. package/dist/Observations-DHohreqe-DGIi6QZy.js +503 -0
  5. package/dist/{YPM2AS64--kUlzXUl.js → YPM2AS64-BGgRsB8q.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 +1 -0
  9. package/dist/components/forms/medications/SelectedMedicationItem.d.ts.map +1 -1
  10. package/dist/components/forms/vaccinations/SelectedVaccinationItem.d.ts +23 -0
  11. package/dist/components/forms/vaccinations/SelectedVaccinationItem.d.ts.map +1 -0
  12. package/dist/components/forms/vaccinations/VaccinationForm.d.ts +10 -0
  13. package/dist/components/forms/vaccinations/VaccinationForm.d.ts.map +1 -0
  14. package/dist/constants/app.d.ts +0 -2
  15. package/dist/constants/app.d.ts.map +1 -1
  16. package/dist/hooks/useMedicationConfig.d.ts.map +1 -1
  17. package/dist/hooks/useMedicationSearch.d.ts.map +1 -1
  18. package/dist/{index-jQa2f6J7.js → index-BzD6Dx9A.js} +44673 -43558
  19. package/dist/index.css +1 -1
  20. package/dist/index.js +2 -2
  21. package/dist/locales/locale_en.json +21 -1
  22. package/dist/locales/locale_es.json +21 -1
  23. package/dist/models/medication.d.ts +1 -0
  24. package/dist/models/medication.d.ts.map +1 -1
  25. package/dist/models/medicationConfig.d.ts +1 -29
  26. package/dist/models/medicationConfig.d.ts.map +1 -1
  27. package/dist/services/medicationService.d.ts +1 -3
  28. package/dist/services/medicationService.d.ts.map +1 -1
  29. package/dist/stores/medicationsStore.d.ts +1 -0
  30. package/dist/stores/medicationsStore.d.ts.map +1 -1
  31. package/dist/stores/vaccinationsStore.d.ts +28 -0
  32. package/dist/stores/vaccinationsStore.d.ts.map +1 -0
  33. package/dist/utils/fhir/medicationRequestResourceCreator.d.ts.map +1 -1
  34. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import { jsx as o, jsxs as p, Fragment as z } from "react/jsx-runtime";
2
- import { u as X, C as Y, _ as W, a as f, b as Z, V as ee, Q as $, A as re, c as ae, l as oe, E as ne, t as I, G as te, N, e as se, X as de, d as ie, J as me } from "./index-jQa2f6J7.js";
3
- import { useState as U, useMemo as b, useCallback as g } from "react";
2
+ import { u as Y, T as W, K as X, a as f, C as Z, L as ee, Q as I, b as re, O as ae, D as oe, c as ne, r as G, F as te, d as N, R as se, e as de, f as ie, g as me } from "./index-BzD6Dx9A.js";
3
+ import { useState as U, useMemo as _, useCallback as g } from "react";
4
4
  import { createPortal as le } from "react-dom";
5
- const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", _e = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", he = "_rowLabel_1pd36_58", ye = "_rowValue_1pd36_67", ve = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ce = "_memberValue_1pd36_94", Le = "_abnormalValue_1pd36_102", Oe = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Te = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Fe = "_nestedGroupMembers_1pd36_141", r = {
5
+ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", ge = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", he = "_rowLabel_1pd36_58", ye = "_rowValue_1pd36_67", ve = "_groupMembers_1pd36_75", Le = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Oe = "_abnormalValue_1pd36_102", Ce = "_commentSection_1pd36_110", Re = "_commentText_1pd36_116", Te = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Fe = "_nestedGroupMembers_1pd36_141", r = {
6
6
  formsTableBody: ce,
7
7
  customAccordianItem: ue,
8
8
  formContent: pe,
9
- formDetailsContainer: _e,
10
- observation: be,
9
+ formDetailsContainer: be,
10
+ observation: _e,
11
11
  groupContainer: fe,
12
12
  rowContainer: ge,
13
13
  groupLabel: Ne,
14
14
  rowLabel: he,
15
15
  rowValue: ye,
16
16
  groupMembers: ve,
17
- memberRow: Ae,
17
+ memberRow: Le,
18
18
  memberLabel: Me,
19
- memberValue: Ce,
20
- abnormalValue: Le,
21
- commentSection: Oe,
19
+ memberValue: Ae,
20
+ abnormalValue: Oe,
21
+ commentSection: Ce,
22
22
  commentText: Re,
23
23
  nestedGroup: Te,
24
24
  nestedGroupLabel: De,
25
25
  nestedGroupMembers: Fe
26
- }, Ee = "ABNORMAL", q = (e) => {
27
- const i = e.concept?.units, m = e.concept?.lowNormal, a = e.concept?.hiNormal, l = m != null, c = a != null, u = l && c ? ` (${m} - ${a})` : l ? ` (>${m})` : c ? ` (<${a})` : "", t = e.interpretation && e.interpretation.toUpperCase() === Ee;
26
+ }, we = "ABNORMAL", q = (e) => {
27
+ const i = e.concept?.units, m = e.concept?.lowNormal, a = e.concept?.hiNormal, l = m != null, c = a != null, u = l && c ? ` (${m} - ${a})` : l ? ` (>${m})` : c ? ` (<${a})` : "", t = e.interpretation && e.interpretation.toUpperCase() === we;
28
28
  return { units: i, rangeString: u, isAbnormal: t };
29
29
  }, x = ({
30
30
  member: e,
@@ -86,7 +86,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
86
86
  ]
87
87
  }
88
88
  );
89
- }, Ge = ({
89
+ }, Be = ({
90
90
  observation: e,
91
91
  index: i
92
92
  }) => {
@@ -145,24 +145,24 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
145
145
  },
146
146
  `${e.concept.uuid}-${i}`
147
147
  );
148
- }, Ie = ({
148
+ }, Ge = ({
149
149
  episodeOfCareUuids: e,
150
150
  encounterUuids: i,
151
151
  config: m
152
152
  }) => {
153
- const { t: a } = X(), l = Y(), [c, u] = U(!1), [t, M] = U(null), k = m?.numberOfVisits, C = W(
153
+ const { t: a } = Y(), l = W(), [c, u] = U(!1), [t, M] = U(null), k = m?.numberOfVisits, A = X(
154
154
  e,
155
155
  i
156
156
  ), {
157
157
  data: h = [],
158
- isLoading: L,
159
- isError: O,
160
- error: H
158
+ isLoading: O,
159
+ isError: C,
160
+ error: K
161
161
  } = f({
162
162
  queryKey: ["forms", l, e],
163
163
  queryFn: () => se(l, void 0, k),
164
- enabled: !!l && !C
165
- }), R = b(() => !i || i.length === 0 ? h : h.filter(
164
+ enabled: !!l && !A
165
+ }), R = _(() => !i || i.length === 0 ? h : h.filter(
166
166
  (n) => i.includes(n.encounterUuid)
167
167
  ), [h, i]), { data: T = [] } = f({
168
168
  queryKey: ["observationForms"],
@@ -170,12 +170,12 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
170
170
  }), D = g(
171
171
  (n) => T.find((s) => s.name === n)?.uuid,
172
172
  [T]
173
- ), y = b(() => {
173
+ ), y = _(() => {
174
174
  if (t)
175
175
  return D(t.formName);
176
176
  }, [t, D]), {
177
- data: we,
178
- isLoading: j,
177
+ data: Ee,
178
+ isLoading: H,
179
179
  error: F
180
180
  } = f({
181
181
  queryKey: ["formMetadata", y],
@@ -183,37 +183,37 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
183
183
  enabled: !!y && c
184
184
  }), {
185
185
  data: v,
186
- isLoading: K,
187
- error: E
186
+ isLoading: j,
187
+ error: w
188
188
  } = f({
189
189
  queryKey: ["formsEncounter", t?.encounterUuid],
190
190
  queryFn: () => me(t.encounterUuid, !0),
191
191
  enabled: !!t?.encounterUuid && c
192
- }), G = b(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
192
+ }), B = _(() => !v?.observations || !t?.formName ? [] : v.observations.filter(
193
193
  (n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(t.formName)
194
- ), [v?.observations, t?.formName]), w = b(
194
+ ), [v?.observations, t?.formName]), E = _(
195
195
  () => [
196
196
  { key: "recordedOn", header: a("FORM_RECORDED_ON") },
197
197
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
198
198
  ],
199
199
  [a]
200
- ), P = b(
200
+ ), J = _(
201
201
  () => [
202
202
  { key: "recordedOn", sortable: !0 },
203
203
  { key: "recordedBy", sortable: !0 }
204
204
  ],
205
205
  []
206
- ), B = b(() => {
206
+ ), S = _(() => {
207
207
  const n = R.reduce(
208
208
  (s, d) => {
209
- const _ = d.formName;
210
- s[_] ??= [];
211
- const A = d.providers.map((J) => J.providerName).filter(Boolean).join(", ");
212
- return s[_].push({
209
+ const b = d.formName;
210
+ s[b] ??= [];
211
+ const L = d.providers.map((Q) => Q.providerName).filter(Boolean).join(", ");
212
+ return s[b].push({
213
213
  id: d.encounterUuid,
214
214
  formName: d.formName,
215
215
  recordedOn: Z(d.encounterDateTime, a, te).formattedResult,
216
- recordedBy: A ?? "--",
216
+ recordedBy: L ?? "--",
217
217
  encounterDateTime: d.encounterDateTime,
218
218
  encounterUuid: d.encounterUuid
219
219
  }), s;
@@ -224,15 +224,15 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
224
224
  ([s, d]) => ({
225
225
  formName: s,
226
226
  records: d.sort(
227
- (_, A) => A.encounterDateTime - _.encounterDateTime
227
+ (b, L) => L.encounterDateTime - b.encounterDateTime
228
228
  )
229
229
  })
230
230
  ).sort((s, d) => s.formName.localeCompare(d.formName));
231
231
  }, [R, a]), V = g((n) => {
232
232
  M(n), u(!0);
233
- }, []), Q = g(() => {
233
+ }, []), P = g(() => {
234
234
  u(!1), M(null);
235
- }, []), S = g(
235
+ }, []), $ = g(
236
236
  (n, s) => {
237
237
  switch (s) {
238
238
  case "recordedOn":
@@ -246,21 +246,21 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
246
246
  [V]
247
247
  );
248
248
  return /* @__PURE__ */ p(z, { children: [
249
- /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: L || O || B.length === 0 || C ? /* @__PURE__ */ o(
250
- $,
249
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: O || C || S.length === 0 || A ? /* @__PURE__ */ o(
250
+ I,
251
251
  {
252
- headers: w,
252
+ headers: E,
253
253
  ariaLabel: a("FORMS_HEADING"),
254
254
  rows: [],
255
- loading: L,
256
- errorStateMessage: O ? H?.message : void 0,
255
+ loading: O,
256
+ errorStateMessage: C ? K?.message : void 0,
257
257
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
258
- renderCell: S,
258
+ renderCell: $,
259
259
  className: r.formsTableBody,
260
260
  "data-testid": "sortable-data-table"
261
261
  }
262
- ) : /* @__PURE__ */ o(re, { align: "start", children: B.map((n, s) => {
263
- const { formName: d, records: _ } = n;
262
+ ) : /* @__PURE__ */ o(re, { align: "start", children: S.map((n, s) => {
263
+ const { formName: d, records: b } = n;
264
264
  return /* @__PURE__ */ o(
265
265
  ae,
266
266
  {
@@ -269,16 +269,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
269
269
  testId: `accordian-title-${d}`,
270
270
  open: s === 0,
271
271
  children: /* @__PURE__ */ o(
272
- $,
272
+ I,
273
273
  {
274
- headers: w,
274
+ headers: E,
275
275
  ariaLabel: a("FORMS_HEADING"),
276
- rows: _,
276
+ rows: b,
277
277
  loading: !1,
278
278
  errorStateMessage: "",
279
- sortable: P,
279
+ sortable: J,
280
280
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
281
- renderCell: S,
281
+ renderCell: $,
282
282
  className: r.formsTableBody,
283
283
  "data-testid": "forms-data-table"
284
284
  }
@@ -293,14 +293,14 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
293
293
  {
294
294
  id: "formDetailsModal",
295
295
  open: c,
296
- onRequestClose: Q,
296
+ onRequestClose: P,
297
297
  modalHeading: t.formName,
298
298
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
299
299
  passiveModal: !0,
300
300
  size: "md",
301
301
  testId: "form-details-modal",
302
- children: /* @__PURE__ */ o("div", { className: r.formContent, children: j || K ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children: I(F).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ o("div", { children: I(E).message ?? a("ERROR_FETCHING_FORM_DATA") }) : G.length > 0 ? /* @__PURE__ */ o("div", { className: r.formDetailsContainer, children: G.map((n, s) => /* @__PURE__ */ o(
303
- Ge,
302
+ children: /* @__PURE__ */ o("div", { className: r.formContent, children: H || j ? /* @__PURE__ */ o(ne, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ o("div", { children: G(F).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ o("div", { children: G(w).message ?? a("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ o("div", { className: r.formDetailsContainer, children: B.map((n, s) => /* @__PURE__ */ o(
303
+ Be,
304
304
  {
305
305
  observation: n,
306
306
  index: s
@@ -314,5 +314,5 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
314
314
  ] });
315
315
  };
316
316
  export {
317
- Ie as default
317
+ Ge as default
318
318
  };
@@ -1,9 +1,9 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64--kUlzXUl.js";
2
- import { g as f, f as d, h as e } from "./index-jQa2f6J7.js";
3
- var h = (a) => {
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BGgRsB8q.js";
2
+ import { J as d, M as f, N as e } from "./index-BzD6Dx9A.js";
3
+ var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), n = f(), s = d(() => {
6
+ }), n = d(), s = f(() => {
7
7
  const o = r.theme_preference || l;
8
8
  return o !== "system" ? o : n();
9
9
  });
@@ -27,7 +27,7 @@ var h = (a) => {
27
27
  });
28
28
  }
29
29
  });
30
- }, C = h;
30
+ }, C = p;
31
31
  export {
32
32
  C as default
33
33
  };
@@ -1,9 +1,9 @@
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--kUlzXUl.js";
2
- import { g as h, f as v, h as e } from "./index-jQa2f6J7.js";
3
- var C = (t) => {
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-BGgRsB8q.js";
2
+ import { J as v, M as C, N as e } from "./index-BzD6Dx9A.js";
3
+ var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), a = h(), l = v(() => {
6
+ }), a = v(), l = C(() => {
7
7
  const n = r.theme_preference || c;
8
8
  return n !== "system" ? n : a();
9
9
  });
@@ -36,7 +36,7 @@ var C = (t) => {
36
36
  });
37
37
  }
38
38
  });
39
- }, p = C;
39
+ }, p = h;
40
40
  export {
41
41
  p as default
42
42
  };