@bahmni/clinical-app 0.0.1-dev.178 → 0.0.1-dev.179

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,5 +1,5 @@
1
1
  import { jsxs as N, jsx as w, Fragment as St } from "react/jsx-runtime";
2
- import { f as kt, u as jt, o as Wt, a as Pt, b as Ut, A as $t, G as Kt, p as Ft, K as h, c as Yt } from "./index-8iPdmuOw.js";
2
+ import { f as kt, u as jt, o as Wt, a as Pt, b as Ut, A as $t, G as Kt, p as Ft, K as h, c as Yt } from "./index-Cxdp7X4o.js";
3
3
  import e, { useState as A, useCallback as g, useEffect as qt, useMemo as z } from "react";
4
4
  function Gt(t, r, n) {
5
5
  return (r = Xt(r)) in t ? Object.defineProperty(t, r, {
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as p, Fragment as P } from "react/jsx-runtime";
2
- import { u as ee, f as re, E as ae, d as te, a as A, H as oe, b as ne, D as se, A as U, e as de, Y as me, G as ie, y as le, Z as q, P as ce, p as ue, T as F, g as be, h as pe, i as _e, j as fe, U as $e, q as ge, W as ve, F as he } from "./index-8iPdmuOw.js";
2
+ import { u as ee, f as re, E as ae, d as te, a as A, H as oe, b as ne, D as se, A as U, e as de, Y as me, G as ie, y as le, Z as q, P as ce, p as ue, T as F, g as be, h as pe, i as _e, j as fe, U as $e, q as ge, W as ve, F as he } from "./index-Cxdp7X4o.js";
3
3
  import { useState as H, useMemo as h, useCallback as R } from "react";
4
4
  const ye = "_formsTableBody_1pd36_1", Ne = "_customAccordianItem_1pd36_6", Ae = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Ce = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Ie = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Me = "_groupMembers_1pd36_75", Ve = "_memberRow_1pd36_81", Se = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Ee = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", xe = "_commentText_1pd36_116", Be = "_nestedGroup_1pd36_125", Ge = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
5
5
  formsTableBody: ye,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-qvj5apBg.js";
2
- import { r as d, s as f, t as e } from "./index-8iPdmuOw.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BY2y0ACF.js";
2
+ import { r as d, s as f, t as e } from "./index-Cxdp7X4o.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-qvj5apBg.js";
2
- import { r as v, s as C, t as e } from "./index-8iPdmuOw.js";
1
+ import { c as l, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-BY2y0ACF.js";
2
+ import { r as v, s as C, t as e } from "./index-Cxdp7X4o.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = l({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as c } from "react/jsx-runtime";
2
- import { f as q, o as C, u as N, k as H, B as Q, a as K, H as j, P as w, Q as x, l as G, m as M, A as P, J as X, V as S, X as J, g as z, R as Y, h as Z, i as W, n as ee } from "./index-8iPdmuOw.js";
2
+ import { f as q, o as C, u as N, k as H, B as Q, a as K, H as j, P as w, Q as x, l as G, m as M, A as P, J as X, V as S, X as J, g as z, R as Y, h as Z, i as W, n as ee } from "./index-Cxdp7X4o.js";
3
3
  import { useRef as te, useEffect as T, useMemo as R } from "react";
4
4
  const A = (t, d, i, l, s) => {
5
5
  const a = J(t, d), r = a.value, o = z(r);
@@ -1,4 +1,4 @@
1
- import { v as we, w as z, x as xt, z as B, s as q, t as y, C as Ro, I as ye, S as R, L as _, M as k, N, O as A, _ as bs, $ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Ls } from "./index-8iPdmuOw.js";
1
+ import { v as we, w as z, x as xt, z as B, s as q, t as y, C as Ro, I as ye, S as R, L as _, M as k, N, O as A, _ as bs, $ as ir, a0 as $e, a1 as U, a2 as Hn, a3 as Vn, a4 as dt, a5 as D, a6 as xs, a7 as cn, a8 as Be, a9 as ws, aa as qt, ab as zt, ac as $s, ad as Cs, ae as $n, af as Ss, ag as Nr, ah as Bt, ai as zo, aj as ks, ak as Es, al as j, am as Ur, an as Ms, ao as Ds, ap as sr, aq as As, ar as Ts, as as zn, at as Fs, au as Is, av as Z, aw as Ps, ax as Ls } from "./index-Cxdp7X4o.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -160159,7 +160159,7 @@ const htt = [
160159
160159
  },
160160
160160
  {
160161
160161
  type: "patientDocuments",
160162
- component: lazy$1(() => import("./DocumentsTable-BmGSz9jH-M35LQ6dU.js"))
160162
+ component: lazy$1(() => import("./DocumentsTable-BmGSz9jH-M7OaN9dN.js"))
160163
160163
  },
160164
160164
  {
160165
160165
  type: "flowSheet",
@@ -160167,7 +160167,7 @@ const htt = [
160167
160167
  },
160168
160168
  {
160169
160169
  type: "forms",
160170
- component: lazy$1(() => import("./FormsTable-BJRW7p5f-DM8E_e0W.js"))
160170
+ component: lazy$1(() => import("./FormsTable-BJRW7p5f-rGPhCTd-.js"))
160171
160171
  },
160172
160172
  {
160173
160173
  type: "labOrders",
@@ -160175,7 +160175,7 @@ const htt = [
160175
160175
  },
160176
160176
  {
160177
160177
  type: "observations",
160178
- component: lazy$1(() => import("./Observations-COFCQoqc-xlYWoUFE.js"))
160178
+ component: lazy$1(() => import("./Observations-COFCQoqc-B0cvTb-o.js"))
160179
160179
  },
160180
160180
  {
160181
160181
  type: "ordersControl",
@@ -162076,7 +162076,7 @@ var displayValue = (n, e = !1) => {
162076
162076
  const e = render(() => {
162077
162077
  const a = this, [r] = this.#o, [l] = this.#d, [c] = this.#f, [f] = this.#u, [u] = this.#h, [m] = this.#t;
162078
162078
  let A;
162079
- return this.#s ? A = this.#s : (A = lazy(() => import("./LNWAZHJI-DX6qMJo9.js")), this.#s = A), setupStyleSheet(this.#l, this.#i), createComponent(A, mergeProps({
162079
+ return this.#s ? A = this.#s : (A = lazy(() => import("./LNWAZHJI-Co8F4lyY.js")), this.#s = A), setupStyleSheet(this.#l, this.#i), createComponent(A, mergeProps({
162080
162080
  get queryFlavor() {
162081
162081
  return a.#n;
162082
162082
  },
@@ -162174,7 +162174,7 @@ var displayValue = (n, e = !1) => {
162174
162174
  const e = render(() => {
162175
162175
  const a = this, [r] = this.#o, [l] = this.#d, [c] = this.#f, [f] = this.#u, [u] = this.#h, [m] = this.#t, [A] = this.#s;
162176
162176
  let g;
162177
- return this.#c ? g = this.#c : (g = lazy(() => import("./MWZ6AO7Z-BAONl-A_.js")), this.#c = g), setupStyleSheet(this.#l, this.#i), createComponent(g, mergeProps({
162177
+ return this.#c ? g = this.#c : (g = lazy(() => import("./MWZ6AO7Z-CD-lYobP.js")), this.#c = g), setupStyleSheet(this.#l, this.#i), createComponent(g, mergeProps({
162178
162178
  get queryFlavor() {
162179
162179
  return a.#n;
162180
162180
  },
@@ -209192,15 +209192,7 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209192
209192
  sections: n.sections.map(
209193
209193
  (e) => e.id ? e : { ...e, id: zy$1() }
209194
209194
  )
209195
- } : n, breadcrumbItems = [
209196
- { id: "home", label: "Home", href: Ty$1 },
209197
- {
209198
- id: "clinical",
209199
- label: "Clinical",
209200
- href: BAHMNI_CLINICAL_PATH
209201
- },
209202
- { id: "current", label: "Current Patient", isCurrentPage: !0 }
209203
- ], globalActions = [
209195
+ } : n, globalActions = [
209204
209196
  {
209205
209197
  id: "search",
209206
209198
  label: "Search",
@@ -209223,34 +209215,42 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209223
209215
  }
209224
209216
  }
209225
209217
  ], ConsultationPage = () => {
209226
- const { t: n } = useTranslation(), { clinicalConfig: e, isLoading: a } = useClinicalConfig(), { userPrivileges: r } = Yet(), { addNotification: l } = on$1(), [c, f] = useState(!1), [u] = useSearchParams(), m = useObservationFormsStore((N) => N.viewingForm), A = useMemo(() => {
209227
- const N = u.get(EPISODE_UUID_SEARCH_PARAMS_KEY);
209228
- return N ? N.split(",").map((H) => H.trim()).filter(Boolean) : [];
209229
- }, [u]), g = u.get(
209218
+ const { t: n } = useTranslation(), { clinicalConfig: e, isLoading: a } = useClinicalConfig(), { userPrivileges: r } = Yet(), { addNotification: l } = on$1(), [c, f] = useState(!1), [u] = useSearchParams(), m = useObservationFormsStore((H) => H.viewingForm), A = [
209219
+ { id: "home", label: "Home", href: Ty$1 },
209220
+ {
209221
+ id: "clinical",
209222
+ label: "Clinical",
209223
+ href: BAHMNI_CLINICAL_PATH
209224
+ },
209225
+ { id: "current", label: n("CURRENT_PATIENT"), isCurrentPage: !0 }
209226
+ ], g = useMemo(() => {
209227
+ const H = u.get(EPISODE_UUID_SEARCH_PARAMS_KEY);
209228
+ return H ? H.split(",").map((k) => k.trim()).filter(Boolean) : [];
209229
+ }, [u]), w = u.get(
209230
209230
  CURRENT_DASHBOARD_SEARCH_PARAMS_KEY
209231
- ), w = useMemo(() => e ? g ? e.dashboards?.find(
209232
- (N) => N.name === g
209233
- ) : getDefaultDashboard(e.dashboards || []) : null, [e, g]), v = w?.url ?? null, {
209234
- data: C,
209235
- isLoading: z,
209236
- error: _
209231
+ ), v = useMemo(() => e ? w ? e.dashboards?.find(
209232
+ (H) => H.name === w
209233
+ ) : getDefaultDashboard(e.dashboards || []) : null, [e, w]), C = v?.url ?? null, {
209234
+ data: z,
209235
+ isLoading: _,
209236
+ error: y
209237
209237
  } = useQuery({
209238
- queryKey: ["dashboardConfig", v],
209238
+ queryKey: ["dashboardConfig", C],
209239
209239
  queryFn: () => _w$1(
209240
- DASHBOARD_CONFIG_URL(v),
209240
+ DASHBOARD_CONFIG_URL(C),
209241
209241
  dashboardConfigSchema
209242
209242
  ),
209243
209243
  select: addSectionIds,
209244
- enabled: !!v
209244
+ enabled: !!C
209245
209245
  });
209246
209246
  useEffect(() => {
209247
- _ && l({
209247
+ y && l({
209248
209248
  title: n("ERROR_LOADING_DASHBOARD_CONFIG"),
209249
- message: _.message,
209249
+ message: y.message,
209250
209250
  type: "error"
209251
209251
  });
209252
- }, [_]);
209253
- const y = useMemo(() => C ? getSidebarItems(C, n) : [], [C, n]), { activeItemId: x, handleItemClick: E } = C72(y);
209252
+ }, [y]);
209253
+ const x = useMemo(() => z ? getSidebarItems(z, n) : [], [z, n]), { activeItemId: E, handleItemClick: M } = C72(x);
209254
209254
  if (a)
209255
209255
  return /* @__PURE__ */ jsx(
209256
209256
  V72,
@@ -209262,13 +209262,13 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209262
209262
  );
209263
209263
  if (!r)
209264
209264
  return /* @__PURE__ */ jsx(V72, { description: n("LOADING_USER_PRIVILEGES"), role: "status" });
209265
- if (!w) {
209266
- const N = g ? n("ERROR_DASHBOARD_NOT_CONFIGURED", {
209267
- dashboardName: g
209265
+ if (!v) {
209266
+ const H = w ? n("ERROR_DASHBOARD_NOT_CONFIGURED", {
209267
+ dashboardName: w
209268
209268
  }) : n("ERROR_NO_DEFAULT_DASHBOARD");
209269
209269
  return l({
209270
209270
  title: n("ERROR_DEFAULT_TITLE"),
209271
- message: N,
209271
+ message: H,
209272
209272
  type: "error"
209273
209273
  }), /* @__PURE__ */ jsx(
209274
209274
  "div",
@@ -209278,7 +209278,7 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209278
209278
  }
209279
209279
  );
209280
209280
  }
209281
- if (z)
209281
+ if (_)
209282
209282
  return /* @__PURE__ */ jsx(
209283
209283
  V72,
209284
209284
  {
@@ -209288,29 +209288,29 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209288
209288
  role: "status"
209289
209289
  }
209290
209290
  );
209291
- const M = () => {
209292
- const N = u.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
209293
- return N && e.contextInformation?.program ? /* @__PURE__ */ jsx(
209291
+ const N = () => {
209292
+ const H = u.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
209293
+ return H && e.contextInformation?.program ? /* @__PURE__ */ jsx(
209294
209294
  rrt,
209295
209295
  {
209296
- programUUID: N,
209296
+ programUUID: H,
209297
209297
  config: {
209298
209298
  fields: e.contextInformation?.program?.fields ?? []
209299
209299
  }
209300
209300
  }
209301
209301
  ) : null;
209302
209302
  };
209303
- return /* @__PURE__ */ jsx(ClinicalAppProvider, { episodeUuids: A, children: /* @__PURE__ */ jsx(
209303
+ return /* @__PURE__ */ jsx(ClinicalAppProvider, { episodeUuids: g, children: /* @__PURE__ */ jsx(
209304
209304
  E72,
209305
209305
  {
209306
209306
  headerWSideNav: /* @__PURE__ */ jsx(
209307
209307
  Io2,
209308
209308
  {
209309
- breadcrumbItems,
209309
+ breadcrumbItems: A,
209310
209310
  globalActions,
209311
- sideNavItems: y,
209312
- activeSideNavItemId: x,
209313
- onSideNavItemClick: E,
209311
+ sideNavItems: x,
209312
+ activeSideNavItemId: E,
209313
+ onSideNavItemClick: M,
209314
209314
  isRail: c
209315
209315
  }
209316
209316
  ),
@@ -209343,15 +209343,15 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209343
209343
  setIsActionAreaVisible: f
209344
209344
  }
209345
209345
  ),
209346
- M()
209346
+ N()
209347
209347
  ]
209348
209348
  }
209349
209349
  ),
209350
209350
  /* @__PURE__ */ jsx(
209351
209351
  DashboardContainer,
209352
209352
  {
209353
- sections: C.sections,
209354
- activeItemId: x
209353
+ sections: z.sections,
209354
+ activeItemId: E
209355
209355
  }
209356
209356
  )
209357
209357
  ]
@@ -209362,7 +209362,7 @@ const DASHBOARD_CONFIG_URL = (n) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
209362
209362
  actionArea: /* @__PURE__ */ jsx(
209363
209363
  ConsultationPad,
209364
209364
  {
209365
- onClose: () => f((N) => !N)
209365
+ onClose: () => f((H) => !H)
209366
209366
  }
209367
209367
  )
209368
209368
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ay as i } from "./index-8iPdmuOw.js";
1
+ import { ay as i } from "./index-Cxdp7X4o.js";
2
2
  export {
3
3
  i as ClinicalApp
4
4
  };
@@ -103,6 +103,7 @@
103
103
  "CONSULTATION_SUBMITTED_SUCCESS_MESSAGE": "Consultation saved successfully",
104
104
  "CONSULTATION_SUBMITTED_SUCCESS_TITLE": "Success",
105
105
  "CONTROL_NOT_FOUND": "No controls registered for type: {{type}}",
106
+ "CURRENT_PATIENT": "Current Patient",
106
107
  "DASHBOARD_TITLE_EPISODE_OF_CARE_KEY": "Episode of Care",
107
108
  "DEFAULT_AND_PINNED_FORMS_NO_FORMS_FOUND": "No default or pinned Forms",
108
109
  "DEFAULT_AND_PINNED_FORMS_TITLE": "Default and pinned Forms",
@@ -103,6 +103,7 @@
103
103
  "CONSULTATION_SUBMITTED_SUCCESS_MESSAGE": "Consulta salvado correctamente",
104
104
  "CONSULTATION_SUBMITTED_SUCCESS_TITLE": "Éxito",
105
105
  "CONTROL_NOT_FOUND": "No se encontraron controles registrados para el tipo: {{type}}",
106
+ "CURRENT_PATIENT": "Paciente Actual",
106
107
  "DASHBOARD_TITLE_EPISODE_OF_CARE_KEY": "Episodio de Atención",
107
108
  "DEFAULT_AND_PINNED_FORMS_NO_FORMS_FOUND": "No hay formularios predeterminados o fijados",
108
109
  "DEFAULT_AND_PINNED_FORMS_TITLE": "Formularios predeterminados y anclados",
@@ -1 +1 @@
1
- {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AA+DtE;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAmL7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAqDtE;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EA6L7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/clinical-app",
3
- "version": "0.0.1-dev.178",
3
+ "version": "0.0.1-dev.179",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",