@bahmni/clinical-app 0.0.1-dev.321 → 0.0.1-dev.322

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 { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-CXEUxtH6.js";
2
+ import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-LOEbl8UI.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as N, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
2
- import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, p as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as pe, $ as be } from "./index-CXEUxtH6.js";
2
+ import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, p as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as pe, $ as be } from "./index-LOEbl8UI.js";
3
3
  import { useQueryClient as ge, useQuery as h } from "@tanstack/react-query";
4
4
  import { useState as w, useMemo as d, useCallback as p } from "react";
5
5
  const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-CD-7Dwnv.js";
2
- import { f, i as d, l as e } from "./index-CXEUxtH6.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-OhPs02Kg.js";
2
+ import { f, i as d, l as e } from "./index-LOEbl8UI.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-CD-7Dwnv.js";
2
- import { f as v, i as C, l as e } from "./index-CXEUxtH6.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-OhPs02Kg.js";
2
+ import { f as v, i as C, l as e } from "./index-LOEbl8UI.js";
3
3
  var f = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { n as k, o as K, u as N, k as Q, Z as q, p as G, J as x, X as z, b as w, c as H, O as J, G as Y, E as M, Y as j, d as P, e as X, M as Z, S as W, z as ee } from "./index-CXEUxtH6.js";
2
+ import { n as k, o as K, u as N, k as Q, Z as q, p as G, J as x, X as z, b as w, c as H, O as J, G as Y, E as M, Y as j, d as P, e as X, M as Z, S as W, z as ee } from "./index-LOEbl8UI.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as O } from "react";
5
5
  const D = (t, n, d, l, b, r) => {
@@ -1,4 +1,4 @@
1
- import { m as we, q as z, r as xt, s as B, i as q, l as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-CXEUxtH6.js";
1
+ import { m as we, q as z, r as xt, s as B, i as q, l as y, t as Ro, y as ye, A as R, C as _, H as k, I as N, K as A, L as bs, N as ir, R as $e, T as U, V as Hn, W as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-LOEbl8UI.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -95884,7 +95884,7 @@ const aMt = [
95884
95884
  },
95885
95885
  {
95886
95886
  type: "patientDocuments",
95887
- component: lazy$1(() => import("./DocumentsTable-DJp5cpq1-B-XFXrH2.js"))
95887
+ component: lazy$1(() => import("./DocumentsTable-DJp5cpq1-CggJU5sZ.js"))
95888
95888
  },
95889
95889
  {
95890
95890
  type: "flowSheet",
@@ -95892,7 +95892,7 @@ const aMt = [
95892
95892
  },
95893
95893
  {
95894
95894
  type: "forms",
95895
- component: lazy$1(() => import("./FormsTable-eYSyFNI4-D5oekewT.js"))
95895
+ component: lazy$1(() => import("./FormsTable-eYSyFNI4-Bbc90ZH8.js"))
95896
95896
  },
95897
95897
  {
95898
95898
  type: "labOrders",
@@ -95900,7 +95900,7 @@ const aMt = [
95900
95900
  },
95901
95901
  {
95902
95902
  type: "observations",
95903
- component: lazy$1(() => import("./Observations-DqC-iu2a-DxfaOgBy.js"))
95903
+ component: lazy$1(() => import("./Observations-DqC-iu2a-BJvfdrBn.js"))
95904
95904
  },
95905
95905
  {
95906
95906
  type: "ordersControl",
@@ -188383,7 +188383,7 @@ var displayValue = (u, c = !1) => {
188383
188383
  const c = render(() => {
188384
188384
  const a = this, [d] = this.#n, [m] = this.#r, [_] = this.#o, [g] = this.#l, [E] = this.#p, [A] = this.#e;
188385
188385
  let C;
188386
- return this.#c ? C = this.#c : (C = lazy(() => import("./LNWAZHJI-BibJSlJ9.js")), this.#c = C), setupStyleSheet(this.#d, this.#a), createComponent(C, mergeProps$1({
188386
+ return this.#c ? C = this.#c : (C = lazy(() => import("./LNWAZHJI-BNemVuec.js")), this.#c = C), setupStyleSheet(this.#d, this.#a), createComponent(C, mergeProps$1({
188387
188387
  get queryFlavor() {
188388
188388
  return a.#f;
188389
188389
  },
@@ -188481,7 +188481,7 @@ var displayValue = (u, c = !1) => {
188481
188481
  const c = render(() => {
188482
188482
  const a = this, [d] = this.#n, [m] = this.#r, [_] = this.#o, [g] = this.#l, [E] = this.#p, [A] = this.#e, [C] = this.#c;
188483
188483
  let b;
188484
- return this.#i ? b = this.#i : (b = lazy(() => import("./MWZ6AO7Z-NnDfp4BU.js")), this.#i = b), setupStyleSheet(this.#d, this.#a), createComponent(b, mergeProps$1({
188484
+ return this.#i ? b = this.#i : (b = lazy(() => import("./MWZ6AO7Z-1fGlEowY.js")), this.#i = b), setupStyleSheet(this.#d, this.#a), createComponent(b, mergeProps$1({
188485
188485
  get queryFlavor() {
188486
188486
  return a.#f;
188487
188487
  },
@@ -331943,7 +331943,7 @@ const ConsultationPad = ({
331943
331943
  return g && c.length > 0 ? /* @__PURE__ */ jsx(UH2, { description: d("LOADING_CLINICAL_DATA"), role: "status" }) : E ? /* @__PURE__ */ jsx("div", { className: "alert alert-danger", children: d("ERROR_FETCHING_CLINICAL_DATA") }) : /* @__PURE__ */ jsx(ClinicalAppContext.Provider, { value: C, children: u });
331944
331944
  };
331945
331945
  ClinicalAppProvider.displayName = "clinical apps provider";
331946
- const DASHBOARD_CONFIG_URL = (u) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/${u}`, EPISODE_UUID_SEARCH_PARAMS_KEY = "episodeUuid", CURRENT_DASHBOARD_SEARCH_PARAMS_KEY = "currentDashboard", PROGRAM_UUID_SEARCH_PARAMS_KEY = "programUuid", $schema = "http://json-schema.org/draft-07/schema#", title = "Clinical Dashboard Configuration Schema", description = "Schema for dashboards in clinical app which contains sections and associated controls", type = "object", additionalProperties = !1, required = ["sections"], properties = { sections: { type: "array", description: "Section in a dashboard", items: { type: "object", additionalProperties: !1, required: ["name", "icon", "controls"], properties: { name: { type: "string", description: "Display name of the section" }, translationKey: { type: "string", description: "Translation key for the section name" }, icon: { type: "string", description: "Fontawesome Icon name for the section" }, controls: { type: "array", description: "List of controls in the section", items: { type: "object", additionalProperties: !1, required: ["type"], properties: { type: { type: "string", description: "Type of the control" }, requiredPrivileges: { type: "array", description: "List of required privileges for the control", items: { type: "string" } }, config: { type: "object", description: "Configuration for the control. For 'programs' type, see programsConfig definition.", properties: { pageSize: { type: "number", description: "Number of rows per page" }, fields: { type: "array", description: "Fields to display. Each entry must be an object with 'name' and optional 'enableTranslation'.", items: { type: "object", required: ["name"], additionalProperties: !1, properties: { name: { type: "string", description: "Field or program attribute name to display. Built-in values: 'programName', 'startDate', 'endDate', 'outcome', 'state'. Any other value is treated as a program attribute name." }, enableTranslation: { type: "boolean", description: "When true, the cell value is translated via i18n key PROGRAM_ATTRIBUTE_VALUE_<FIELD>_<VALUE>" } } } } } } } } } } } } }, dashboardConfigSchema = {
331946
+ const DASHBOARD_CONFIG_URL = (u) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/${u}`, EPISODE_UUID_SEARCH_PARAMS_KEY = "episodeUuid", CURRENT_DASHBOARD_SEARCH_PARAMS_KEY = "currentDashboard", PROGRAM_UUID_SEARCH_PARAMS_KEY = "programUuid", $schema = "http://json-schema.org/draft-07/schema#", title = "Clinical Dashboard Configuration Schema", description = "Schema for dashboards in clinical app which contains sections and associated controls", type = "object", additionalProperties = !1, required = ["sections"], properties = { sections: { type: "array", description: "Section in a dashboard", items: { type: "object", additionalProperties: !1, required: ["name", "icon", "controls"], properties: { name: { type: "string", description: "Display name of the section" }, translationKey: { type: "string", description: "Translation key for the section name" }, icon: { type: "string", description: "Fontawesome Icon name for the section" }, controls: { type: "array", description: "List of controls in the section", items: { type: "object", additionalProperties: !1, required: ["type"], properties: { type: { type: "string", description: "Type of the control" }, requiredPrivileges: { type: "array", description: "List of required privileges for the control", items: { type: "string" } }, config: { type: "object", description: "Configuration for the control. For 'programs' type, see programsConfig definition." } } } } } } } }, dashboardConfigSchema = {
331947
331947
  $schema,
331948
331948
  title,
331949
331949
  description,
@@ -332043,7 +332043,7 @@ const DASHBOARD_CONFIG_URL = (u) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
332043
332043
  useEffect(() => {
332044
332044
  Xbe && m({
332045
332045
  title: u("ERROR_LOADING_DASHBOARD_CONFIG"),
332046
- message: Xbe.message,
332046
+ message: u(Xbe.message),
332047
332047
  type: "error"
332048
332048
  });
332049
332049
  }, [Xbe]);
@@ -332095,6 +332095,15 @@ const DASHBOARD_CONFIG_URL = (u) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
332095
332095
  role: "status"
332096
332096
  }
332097
332097
  );
332098
+ if (Xbe || !Kme)
332099
+ return /* @__PURE__ */ jsx(
332100
+ "div",
332101
+ {
332102
+ id: "error-loading-dashboard-config",
332103
+ "data-testid": "error-loading-dashboard-config-test-id",
332104
+ children: u("ERROR_LOADING_DASHBOARD_CONFIG")
332105
+ }
332106
+ );
332098
332107
  const Nut = () => {
332099
332108
  const a_t = M.get(PROGRAM_UUID_SEARCH_PARAMS_KEY);
332100
332109
  return a_t && c.contextInformation?.program ? /* @__PURE__ */ jsx(
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { at as i } from "./index-CXEUxtH6.js";
1
+ import { at as i } from "./index-LOEbl8UI.js";
2
2
  export {
3
3
  i as ClinicalApp
4
4
  };
@@ -193,6 +193,7 @@
193
193
  "ERROR_INVALID_PATIENT_UUID": "Invalid patient UUID",
194
194
  "ERROR_LOADING_ALLERGIES": "Error loading allergies",
195
195
  "ERROR_LOADING_DASHBOARD": "Error loading dashboard",
196
+ "ERROR_LOADING_DASHBOARD_CONFIG": "Error loading dashboard configuration",
196
197
  "ERROR_LOADING_IMMUNIZATION_DETAILS": "Error loading immunization details",
197
198
  "ERROR_LOADING_OBSERVATIONS": "Error loading observations",
198
199
  "ERROR_LOADING_PINNED_FORMS": "Error loading Pinned Forms",
@@ -193,6 +193,7 @@
193
193
  "ERROR_INVALID_PATIENT_UUID": "UUID de paciente inválido",
194
194
  "ERROR_LOADING_ALLERGIES": "Error al cargar alergias",
195
195
  "ERROR_LOADING_DASHBOARD": "Error al cargar el panel",
196
+ "ERROR_LOADING_DASHBOARD_CONFIG": "Error al cargar la configuración del panel",
196
197
  "ERROR_LOADING_IMMUNIZATION_DETAILS": "Error al cargar los detalles de la inmunización",
197
198
  "ERROR_LOADING_OBSERVATIONS": "Error al cargar observaciones",
198
199
  "ERROR_LOADING_PINNED_FORMS": "Error al cargar Formularios Anclados",
@@ -1 +1 @@
1
- {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAqCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAmR7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAMN,MAAM,OAAO,CAAC;AAqCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EA6R7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -47,32 +47,7 @@ declare const _default: {
47
47
  },
48
48
  "config": {
49
49
  "type": "object",
50
- "description": "Configuration for the control. For 'programs' type, see programsConfig definition.",
51
- "properties": {
52
- "pageSize": {
53
- "type": "number",
54
- "description": "Number of rows per page"
55
- },
56
- "fields": {
57
- "type": "array",
58
- "description": "Fields to display. Each entry must be an object with 'name' and optional 'enableTranslation'.",
59
- "items": {
60
- "type": "object",
61
- "required": ["name"],
62
- "additionalProperties": false,
63
- "properties": {
64
- "name": {
65
- "type": "string",
66
- "description": "Field or program attribute name to display. Built-in values: 'programName', 'startDate', 'endDate', 'outcome', 'state'. Any other value is treated as a program attribute name."
67
- },
68
- "enableTranslation": {
69
- "type": "boolean",
70
- "description": "When true, the cell value is translated via i18n key PROGRAM_ATTRIBUTE_VALUE_<FIELD>_<VALUE>"
71
- }
72
- }
73
- }
74
- }
75
- }
50
+ "description": "Configuration for the control. For 'programs' type, see programsConfig definition."
76
51
  }
77
52
  }
78
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/clinical-app",
3
- "version": "0.0.1-dev.321",
3
+ "version": "0.0.1-dev.322",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",