@bahmni/clinical-app 0.0.1-dev.123 → 0.0.1-dev.124

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.
@@ -1,8 +1,8 @@
1
- import { jsx as t, jsxs as p, Fragment as J } from "react/jsx-runtime";
2
- import { u as Q, C as Y, K as W, a as h, H as Z, R as ee, q as V, O as re, T as ae, L as oe, b as te, w as x, G as ne, I as v, c as se, n as me, o as de, r as ie } from "./index-vp_PW6ZA.js";
3
- import { useState as U, useMemo as N, useCallback as y } from "react";
1
+ import { jsx as t, jsxs as p, Fragment as z } from "react/jsx-runtime";
2
+ import { u as J, C as Q, Y as W, a as h, H as Z, R as ee, q as G, O as re, L as ae, b as oe, c as te, w as x, G as ne, I as v, d as se, n as me, o as de, r as ie } from "./index-j3_DWPjg.js";
3
+ import { useState as q, useMemo as N, useCallback as y } 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", be = "_formDetailsContainer_1pd36_25", _e = "_observation_1pd36_30", fe = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ge = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", ye = "_groupMembers_1pd36_75", ve = "_memberRow_1pd36_81", Te = "_memberLabel_1pd36_86", Le = "_memberValue_1pd36_94", Me = "_abnormalValue_1pd36_102", Ae = "_commentSection_1pd36_110", Ce = "_commentText_1pd36_116", Oe = "_nestedGroup_1pd36_125", Re = "_nestedGroupLabel_1pd36_132", De = "_nestedGroupMembers_1pd36_141", o = {
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", Ne = "_rowContainer_1pd36_43", $e = "_groupLabel_1pd36_48", ge = "_rowLabel_1pd36_58", he = "_rowValue_1pd36_67", ye = "_groupMembers_1pd36_75", ve = "_memberRow_1pd36_81", Me = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Le = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Oe = "_commentText_1pd36_116", Re = "_nestedGroup_1pd36_125", Ce = "_nestedGroupLabel_1pd36_132", De = "_nestedGroupMembers_1pd36_141", o = {
6
6
  formsTableBody: ce,
7
7
  customAccordianItem: ue,
8
8
  formContent: pe,
@@ -15,15 +15,15 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
15
15
  rowValue: he,
16
16
  groupMembers: ye,
17
17
  memberRow: ve,
18
- memberLabel: Te,
19
- memberValue: Le,
20
- abnormalValue: Me,
21
- commentSection: Ae,
22
- commentText: Ce,
23
- nestedGroup: Oe,
24
- nestedGroupLabel: Re,
18
+ memberLabel: Me,
19
+ memberValue: Ae,
20
+ abnormalValue: Le,
21
+ commentSection: Te,
22
+ commentText: Oe,
23
+ nestedGroup: Re,
24
+ nestedGroupLabel: Ce,
25
25
  nestedGroupMembers: De
26
- }, Fe = "ABNORMAL", q = (e) => {
26
+ }, Fe = "ABNORMAL", U = (e) => {
27
27
  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() === Fe;
28
28
  return { units: s, rangeString: c, isAbnormal: a };
29
29
  }, H = ({
@@ -69,7 +69,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
69
69
  ]
70
70
  }
71
71
  );
72
- const { units: a, rangeString: b, isAbnormal: _ } = q(e);
72
+ const { units: a, rangeString: b, isAbnormal: _ } = U(e);
73
73
  return /* @__PURE__ */ p(
74
74
  "div",
75
75
  {
@@ -113,7 +113,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
113
113
  index: s,
114
114
  formName: d = ""
115
115
  }) => {
116
- const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } = q(e), a = d ? `${d}-` : "";
116
+ const r = e.groupMembers && e.groupMembers.length > 0, { units: u, rangeString: m, isAbnormal: c } = U(e), a = d ? `${d}-` : "";
117
117
  return /* @__PURE__ */ p(
118
118
  "div",
119
119
  {
@@ -188,53 +188,53 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
188
188
  },
189
189
  `${e.concept.uuid}-${s}`
190
190
  );
191
- }, Ve = ({
191
+ }, Ge = ({
192
192
  episodeOfCareUuids: e,
193
193
  encounterUuids: s,
194
194
  config: d
195
195
  }) => {
196
- const { t: r } = Q(), u = Y(), [m, c] = U(!1), [a, b] = U(null), _ = d?.numberOfVisits, $ = W(
196
+ const { t: r } = J(), u = Q(), [m, c] = q(!1), [a, b] = q(null), _ = d?.numberOfVisits, $ = W(
197
197
  e,
198
198
  s
199
199
  ), {
200
200
  data: g = [],
201
- isLoading: A,
202
- isError: C,
201
+ isLoading: T,
202
+ isError: O,
203
203
  error: k
204
204
  } = h({
205
205
  queryKey: ["forms", u, e],
206
206
  queryFn: () => se(u, void 0, _),
207
207
  enabled: !!u && !$
208
- }), O = N(() => !s || s.length === 0 ? g : g.filter(
208
+ }), R = N(() => !s || s.length === 0 ? g : g.filter(
209
209
  (n) => s.includes(n.encounterUuid)
210
- ), [g, s]), { data: R = [] } = h({
210
+ ), [g, s]), { data: C = [] } = h({
211
211
  queryKey: ["observationForms"],
212
212
  queryFn: me
213
213
  }), D = y(
214
- (n) => R.find((l) => l.name === n)?.uuid,
215
- [R]
216
- ), T = N(() => {
214
+ (n) => C.find((l) => l.name === n)?.uuid,
215
+ [C]
216
+ ), M = N(() => {
217
217
  if (a)
218
218
  return D(a.formName);
219
219
  }, [a, D]), {
220
220
  data: Ie,
221
- isLoading: K,
221
+ isLoading: j,
222
222
  error: F
223
223
  } = h({
224
- queryKey: ["formMetadata", T],
225
- queryFn: () => de(T),
226
- enabled: !!T && m
224
+ queryKey: ["formMetadata", M],
225
+ queryFn: () => de(M),
226
+ enabled: !!M && m
227
227
  }), {
228
- data: L,
229
- isLoading: j,
228
+ data: A,
229
+ isLoading: K,
230
230
  error: w
231
231
  } = h({
232
232
  queryKey: ["formsEncounter", a?.encounterUuid],
233
233
  queryFn: () => ie(a.encounterUuid, !0),
234
234
  enabled: !!a?.encounterUuid && m
235
- }), I = N(() => !L?.observations || !a?.formName ? [] : L.observations.filter(
235
+ }), I = N(() => !A?.observations || !a?.formName ? [] : A.observations.filter(
236
236
  (n) => "formFieldPath" in n && typeof n.formFieldPath == "string" && n.formFieldPath.includes(a.formName)
237
- ), [L?.observations, a?.formName]), B = N(
237
+ ), [A?.observations, a?.formName]), E = N(
238
238
  () => [
239
239
  { key: "recordedOn", header: r("FORM_RECORDED_ON") },
240
240
  { key: "recordedBy", header: r("FORM_RECORDED_BY") }
@@ -246,17 +246,17 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
246
246
  { key: "recordedBy", sortable: !0 }
247
247
  ],
248
248
  []
249
- ), E = N(() => {
250
- const n = O.reduce(
249
+ ), B = N(() => {
250
+ const n = R.reduce(
251
251
  (l, i) => {
252
252
  const f = i.formName;
253
253
  l[f] ??= [];
254
- const M = i.providers.map((z) => z.providerName).filter(Boolean).join(", ");
254
+ const L = i.providers.map((Y) => Y.providerName).filter(Boolean).join(", ");
255
255
  return l[f].push({
256
256
  id: i.encounterUuid,
257
257
  formName: i.formName,
258
258
  recordedOn: Z(i.encounterDateTime, r, ne).formattedResult,
259
- recordedBy: M ?? "--",
259
+ recordedBy: L ?? "--",
260
260
  encounterDateTime: i.encounterDateTime,
261
261
  encounterUuid: i.encounterUuid
262
262
  }), l;
@@ -267,15 +267,15 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
267
267
  ([l, i]) => ({
268
268
  formName: l,
269
269
  records: i.sort(
270
- (f, M) => M.encounterDateTime - f.encounterDateTime
270
+ (f, L) => L.encounterDateTime - f.encounterDateTime
271
271
  )
272
272
  })
273
273
  ).sort((l, i) => l.formName.localeCompare(i.formName));
274
- }, [O, r]), S = y((n) => {
274
+ }, [R, r]), S = y((n) => {
275
275
  b(n), c(!0);
276
276
  }, []), X = y(() => {
277
277
  c(!1), b(null);
278
- }, []), G = y(
278
+ }, []), V = y(
279
279
  (n, l) => {
280
280
  switch (l) {
281
281
  case "recordedOn":
@@ -288,21 +288,21 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
288
288
  },
289
289
  [S]
290
290
  );
291
- return /* @__PURE__ */ p(J, { children: [
292
- /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: A || C || E.length === 0 || $ ? /* @__PURE__ */ t(
293
- V,
291
+ return /* @__PURE__ */ p(z, { children: [
292
+ /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: T || O || B.length === 0 || $ ? /* @__PURE__ */ t(
293
+ G,
294
294
  {
295
- headers: B,
295
+ headers: E,
296
296
  ariaLabel: r("FORMS_HEADING"),
297
297
  rows: [],
298
- loading: A,
299
- errorStateMessage: C ? k?.message : void 0,
298
+ loading: T,
299
+ errorStateMessage: O ? k?.message : void 0,
300
300
  emptyStateMessage: r("FORMS_UNAVAILABLE"),
301
- renderCell: G,
301
+ renderCell: V,
302
302
  className: o.formsTableBody,
303
303
  dataTestId: "forms-table"
304
304
  }
305
- ) : /* @__PURE__ */ t(re, { align: "start", children: E.map((n, l) => {
305
+ ) : /* @__PURE__ */ t(re, { align: "start", children: B.map((n, l) => {
306
306
  const { formName: i, records: f } = n;
307
307
  return /* @__PURE__ */ t(
308
308
  ae,
@@ -312,16 +312,16 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
312
312
  testId: `accordian-title-${i}`,
313
313
  open: l === 0,
314
314
  children: /* @__PURE__ */ t(
315
- V,
315
+ G,
316
316
  {
317
- headers: B,
317
+ headers: E,
318
318
  ariaLabel: r("FORMS_HEADING"),
319
319
  rows: f,
320
320
  loading: !1,
321
321
  errorStateMessage: "",
322
322
  sortable: P,
323
323
  emptyStateMessage: r("FORMS_UNAVAILABLE"),
324
- renderCell: G,
324
+ renderCell: V,
325
325
  className: o.formsTableBody,
326
326
  dataTestId: `forms-table-${i}`
327
327
  }
@@ -342,7 +342,7 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
342
342
  passiveModal: !0,
343
343
  size: "md",
344
344
  testId: "form-details-modal",
345
- children: /* @__PURE__ */ t("div", { className: o.formContent, children: K || j ? /* @__PURE__ */ t(te, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: x(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: x(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
345
+ children: /* @__PURE__ */ t("div", { className: o.formContent, children: j || K ? /* @__PURE__ */ t(te, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: x(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: x(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
346
346
  we,
347
347
  {
348
348
  observation: n,
@@ -358,5 +358,5 @@ const ce = "_formsTableBody_1pd36_1", ue = "_customAccordianItem_1pd36_6", pe =
358
358
  ] });
359
359
  };
360
360
  export {
361
- Ve as default
361
+ Ge as default
362
362
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-JtPd3t32.js";
2
- import { i as d, j as f, k as e } from "./index-vp_PW6ZA.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-WVGvLIXB.js";
2
+ import { i as d, j as f, k as e } from "./index-j3_DWPjg.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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-JtPd3t32.js";
2
- import { i as v, j as C, k as e } from "./index-vp_PW6ZA.js";
1
+ import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-WVGvLIXB.js";
2
+ import { i as v, j as C, k as e } from "./index-j3_DWPjg.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as _, jsx as b } from "react/jsx-runtime";
2
- import { C as F, d as G, u as I, e as U, f as Q, a as k, J as x, q as K, X, D as A, Q as H, A as j, g as J, h as P, t as Y } from "./index-vp_PW6ZA.js";
2
+ import { C as F, T as G, u as I, e as U, f as Q, a as k, J as x, q as K, X, g as A, Q as H, A as j, D as J, h as P, t as Y } from "./index-j3_DWPjg.js";
3
3
  import { useRef as Z, useEffect as S, useMemo as h } from "react";
4
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 ? X(e.date, n).formattedResult : n("DATE_ERROR_PARSE"), re = (e) => {
5
5
  if (!e.observationValue?.value)
@@ -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 = N || !c, R = y && c, V = (!p || p.entry?.length === 0 || v.length === 0) && c, q = R ? s("ERROR_FETCHING_OBSERVATIONS") : null, L = V ? s("NO_OBSERVATIONS_FOUND") : void 0, M = E.length > 0 && !O && !R, f = n.titleTranslationKey, m = f ? s(f) : "";
298
+ ], R = N || !c, O = y && c, V = (!p || p.entry?.length === 0 || v.length === 0) && c, q = O ? s("ERROR_FETCHING_OBSERVATIONS") : null, L = V ? s("NO_OBSERVATIONS_FOUND") : void 0, M = E.length > 0 && !R && !O, f = n.titleTranslationKey, m = f ? s(f) : "";
299
299
  return /* @__PURE__ */ _(
300
300
  "div",
301
301
  {
@@ -320,7 +320,7 @@ const w = (e, n, t, a, r) => {
320
320
  headers: C,
321
321
  rows: [],
322
322
  ariaLabel: s("OBSERVATIONS"),
323
- loading: O,
323
+ loading: R,
324
324
  errorStateMessage: q,
325
325
  emptyStateMessage: L,
326
326
  dataTestId: "observations-table"
@@ -1,4 +1,4 @@
1
- import { l as we, m as z, p as xt, s as B, j as q, k as y, P as Ro, v as ye, S as R, x as _, y as k, z as N, B as A, E as bs, F as ir, M as $e, N as U, U as Hn, V as Vn, W as dt, Y as D, Z as xs, _ 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-vp_PW6ZA.js";
1
+ import { l as we, m as z, p as xt, s as B, j as q, k as y, P as Ro, v as ye, S as R, x as _, y as k, z as N, B as A, E as bs, F as ir, K as $e, M as U, N as Hn, U as Vn, V as dt, W as D, Z as xs, _ 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-j3_DWPjg.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,CA0anD,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,CA8anD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"InvestigationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/investigations/InvestigationsForm.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EA6L9B,CAAC;AAIH,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"InvestigationsForm.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/investigations/InvestigationsForm.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAmU9B,CAAC;AAIH,eAAe,kBAAkB,CAAC"}