@bahmni/clinical-app 0.0.1-dev.404 → 0.0.1-dev.405

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,10 +1,10 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { u as useTranslation, H as B, I as ENCOUNTER_CONCEPTS_URL, L as Yr, $ as $Ut, M as Li, N as BAHMNI_USER_LOCATION_COOKIE_NAME, O as Fm, Q as Qh, v as v0, R as vb2, S as Eb2, T as mb2, W as Wx2, U as ll1, X as pb2, Z as ME, a0 as Ci, a1 as Md, a2 as _E, a3 as kd, a4 as vs, a5 as dist, a6 as yt, a7 as ge, a8 as ss, a9 as G_, aa as sb, ab as ob, ac as Vb2, ad as bb2, ae as Rz2, z as z1, e as e8, af as ab, ag as Fy2, ah as tb2, ai as jb2, aj as $b2, ak as Ab2, k as pr1, al as xb, am as wb2, an as rv, ao as Ps, ap as Ub, aq as Ov, ar as rb, as as nb2, at as pb, au as gb, av as CLINICAL_V2_CONFIG_BASE_URL, aw as bb, ax as HE, ay as Qr, az as wb, aA as W_, aB as Av, aC as aL2, aD as qb, aE as _b, aF as vb, aG as Nv, aH as ub2, aI as Hv, aJ as Y_, aK as Tb, aL as St, aM as jr, aN as kv, aO as jv, a as en, aP as iv, aQ as jb, aR as Bb, h as eGt, aS as Pb2, aT as Fb2, aU as lv, aV as uv, aW as yb2, aX as ne, aY as STOP_REASON_VALUESET_EXPAND_URL, aZ as Be, a_ as vE, a$ as _f, b0 as es$2, b1 as STOP_REASON_VALUESET_TITLE, b2 as kb2, b3 as cv, b4 as fv, b5 as r_, b6 as B_, b7 as t_, b8 as an, b9 as N4, ba as c3, bb as Ob2, bc as IE, bd as dv, be as hv, bf as mv, bg as gv, bh as Di, bi as ns, bj as Jb, bk as ub, bl as Vv, bm as Pv, bn as $v, bo as Sv, bp as CDSS_SERVER_CONFIG_URL, bq as db, br as Ui, bs as P_, bt as Ze, bu as gr1, bv as _b2, bw as aw, bx as Qb, by as Xb, bz as hb2, bA as Xt, bB as tv, bC as ev, bD as Zb, bE as rr1, bF as X01, bG as s_, bH as nv, bI as wi, bJ as mE, bK as BAHMNI_CLINICAL_PATH, bL as xE, bM as fw, bN as zb2, bO as Lb2, bP as bz2, bQ as h01, bR as LE, bS as dr1 } from "./index-hyQPbI9a.js";
2
+ import { u as useTranslation, H as B, I as ENCOUNTER_CONCEPTS_URL, L as Yr, $ as $Ut, M as Li, N as BAHMNI_USER_LOCATION_COOKIE_NAME, O as Fm, Q as Qh, v as v0, R as vb2, S as Eb2, T as mb2, W as Wx2, U as ll1, X as pb2, Z as ME, a0 as Ci, a1 as Md, a2 as _E, a3 as kd, a4 as vs, a5 as dist, a6 as yt, a7 as ge, a8 as ss, a9 as G_, aa as sb, ab as ob, ac as Vb2, ad as bb2, ae as Rz2, z as z1, e as e8, af as ab, ag as Fy2, ah as tb2, ai as jb2, aj as $b2, ak as Ab2, k as pr1, al as xb, am as wb2, an as rv, ao as Ps, ap as Ub, aq as Ov, ar as rb, as as nb2, at as pb, au as gb, av as CLINICAL_V2_CONFIG_BASE_URL, aw as bb, ax as HE, ay as Qr, az as wb, aA as W_, aB as Av, aC as aL2, aD as qb, aE as _b, aF as vb, aG as Nv, aH as ub2, aI as Hv, aJ as Y_, aK as Tb, aL as St, aM as jr, aN as kv, aO as jv, a as en, aP as iv, aQ as jb, aR as Bb, h as eGt, aS as Pb2, aT as Fb2, aU as lv, aV as uv, aW as yb2, aX as ne, aY as STOP_REASON_VALUESET_EXPAND_URL, aZ as Be, a_ as vE, a$ as _f, b0 as es$2, b1 as STOP_REASON_VALUESET_TITLE, b2 as kb2, b3 as cv, b4 as fv, b5 as r_, b6 as B_, b7 as t_, b8 as an, b9 as N4, ba as c3, bb as Ob2, bc as IE, bd as dv, be as hv, bf as mv, bg as gv, bh as Di, bi as ns, bj as Jb, bk as ub, bl as Vv, bm as Pv, bn as $v, bo as Sv, bp as CDSS_SERVER_CONFIG_URL, bq as db, br as Ui, bs as P_, bt as Ze, bu as gr1, bv as _b2, bw as aw, bx as Qb, by as Xb, bz as hb2, bA as Xt, bB as tv, bC as ev, bD as Zb, bE as rr1, bF as X01, bG as s_, bH as nv, bI as wi, bJ as mE, bK as BAHMNI_CLINICAL_PATH, bL as xE, bM as fw, bN as zb2, bO as Lb2, bP as bz2, bQ as h01, bR as LE, bS as dr1 } from "./index-BeQYubv7.js";
3
3
  import * as React from "react";
4
4
  import React__default, { createContext, useContext, useState, useCallback, useEffect, useMemo, Children, useRef, useLayoutEffect, forwardRef, isValidElement, cloneElement, useReducer, Component, useImperativeHandle, PureComponent, createRef, useSyncExternalStore, Suspense } from "react";
5
5
  import { useQuery, useQueries, useQueryClient } from "@tanstack/react-query";
6
6
  import { useNavigate, useSearchParams } from "react-router-dom";
7
- import { u as useClinicalConfig } from "./hook-B_OOkf7H.js";
7
+ import { u as useClinicalConfig } from "./hook-y5iu13v4.js";
8
8
  import * as ReactDOM from "react-dom";
9
9
  import ReactDOM__default, { createPortal } from "react-dom";
10
10
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -143626,7 +143626,7 @@ const observationFormsTile = "ObservationForms-module_observationFormsTile__AZ0b
143626
143626
  ] : Z.length === 0 ? [
143627
143627
  {
143628
143628
  id: "",
143629
- label: "No forms available",
143629
+ label: V("OBSERVATION_FORMS_NO_FORMS_AVAILABLE"),
143630
143630
  disabled: !0
143631
143631
  }
143632
143632
  ] : Z.map((re) => {
@@ -144695,7 +144695,7 @@ const executeOnFormSaveEvent = (p, c, a, s) => {
144695
144695
  {
144696
144696
  onClick: We,
144697
144697
  className: `${styles$8.pinIconContainer} ${Fe ? styles$8.pinned : styles$8.unpinned}`,
144698
- title: Fe ? "Unpin form" : "Pin form",
144698
+ title: H(Fe ? "OBSERVATION_FORMS_UNPIN_TOOLTIP" : "OBSERVATION_FORMS_PIN_TOOLTIP"),
144699
144699
  children: /* @__PURE__ */ jsx(N4, { id: "pin-icon", name: "fa-thumbtack", size: c3.SM })
144700
144700
  }
144701
144701
  );
@@ -145904,8 +145904,12 @@ const DASHBOARD_CONFIG_URL = (p) => `${CLINICAL_V2_CONFIG_BASE_URL}/dashboards/$
145904
145904
  enabled: !!O
145905
145905
  }), N = useMemo(() => U ? isPatientNotFoundError(F) ? wi : "ERROR_FETCHING_PATIENT_DATA" : null, [U, F]), K = !O || !!z, X = useMemo(
145906
145906
  () => [
145907
- { id: "home", label: "Home", href: mE },
145908
- { id: "clinical", label: "Clinical", href: BAHMNI_CLINICAL_PATH },
145907
+ { id: "home", label: p("HOME_LABEL"), href: mE },
145908
+ {
145909
+ id: "clinical",
145910
+ label: p("CLINICAL_LABEL"),
145911
+ href: BAHMNI_CLINICAL_PATH
145912
+ },
145909
145913
  {
145910
145914
  id: "current",
145911
145915
  label: z?.fullName ? xE(z.fullName) : p("CURRENT_PATIENT"),
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as G } from "react/jsx-runtime";
2
- import { v as Q, u as Y, z as J, J as W, q as X, w as Z, K as ee, p as te } from "./index-hyQPbI9a.js";
2
+ import { v as Q, u as Y, z as J, J as W, q as X, w as Z, K as ee, p as te } from "./index-BeQYubv7.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } 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 P, Fragment as ye } from "react/jsx-runtime";
2
- import { u as ge, v as be, e as Oe, a as Ne, b as Te, Y as Ie, d as Ae, c as Ee, f as ve, m as _e, g as Fe, h as Se, i as $, w as Me, A as x, V as Y, q as Re, K as G, P as Be, F as Ce, p as Le, j as Ue, k as De } from "./index-hyQPbI9a.js";
2
+ import { u as ge, v as be, e as Oe, a as Ne, b as Te, Y as Ie, d as Ae, c as Ee, f as ve, m as _e, g as Fe, h as Se, i as $, w as Me, A as x, V as Y, q as Re, K as G, P as Be, F as Ce, p as Le, j as Ue, k as De } from "./index-BeQYubv7.js";
3
3
  import { useQueryClient as ke, useQuery as N } from "@tanstack/react-query";
4
4
  import { useState as Q, useMemo as d, useCallback as c } from "react";
5
5
  const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", Ve = "FormsTable-module_customAccordianItem__isszs", T = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CS3xJG6s.js";
2
- import { bY as d, bZ as f, b_ as e } from "./index-hyQPbI9a.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-H0_C5EN5.js";
2
+ import { bY as d, bZ as f, b_ as e } from "./index-BeQYubv7.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 u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-CS3xJG6s.js";
2
- import { bY as v, bZ as C, b_ as e } from "./index-hyQPbI9a.js";
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-H0_C5EN5.js";
2
+ import { bY as v, bZ as C, b_ as e } from "./index-BeQYubv7.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -0,0 +1,213 @@
1
+ import { jsxs as $, jsx as u } from "react/jsx-runtime";
2
+ import { v as q, z as G, u as N, l as k, G as x, m as z, n as Q, o as w, s as H, r as M, K as j, t as P, _ as A, x as J, C as Y, y as W, E as X, B as Z, D as ee } from "./index-BeQYubv7.js";
3
+ import { useQueries as ae, useQuery as re } from "@tanstack/react-query";
4
+ import { useRef as te, useEffect as f, useMemo as O } from "react";
5
+ const L = (a, n, d, l, b, o) => {
6
+ const r = J(a, n, b), t = r.value, s = Y(t);
7
+ let i = t;
8
+ s === "Image" && (i = /* @__PURE__ */ u(
9
+ X,
10
+ {
11
+ imageSrc: t,
12
+ alt: t,
13
+ id: `${t}-img`,
14
+ hideThumbnail: o
15
+ }
16
+ )), s === "Video" && (i = /* @__PURE__ */ u(
17
+ Z,
18
+ {
19
+ id: `${t}-video`,
20
+ videoSrc: t,
21
+ hideThumbnail: o
22
+ }
23
+ )), s === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${t}-pdf`, src: t }));
24
+ const m = b("OBSERVATIONS_RECORDED_BY", {
25
+ provider: r.provider
26
+ }), p = a.display, h = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
27
+ return /* @__PURE__ */ u(
28
+ W,
29
+ {
30
+ header: r.header,
31
+ value: i,
32
+ info: m,
33
+ id: c,
34
+ testId: c,
35
+ ariaLabel: c
36
+ },
37
+ `obs-${a.id}`
38
+ );
39
+ }, se = (a, n, d, l, b, o, r) => /* @__PURE__ */ u(
40
+ A,
41
+ {
42
+ title: a.display,
43
+ id: `grouped-obs-${a.display}-${l}`,
44
+ open: d,
45
+ children: a.members?.map(
46
+ (t, s) => L(
47
+ t,
48
+ s,
49
+ b,
50
+ o,
51
+ n,
52
+ r
53
+ )
54
+ )
55
+ },
56
+ `grouped-obs-${a.id}`
57
+ ), oe = ({
58
+ groupedData: a,
59
+ title: n = "",
60
+ hideThumbnail: d
61
+ }) => {
62
+ const { t: l } = N(), b = (o, r, t) => {
63
+ const s = P(o.encounterDetails, l);
64
+ return /* @__PURE__ */ $(
65
+ A,
66
+ {
67
+ title: s,
68
+ id: `encounter-${o.encounterId}`,
69
+ open: r,
70
+ children: [
71
+ o.observations.map(
72
+ (i, m) => L(
73
+ i,
74
+ m,
75
+ t,
76
+ n,
77
+ l,
78
+ d
79
+ )
80
+ ),
81
+ o.groupedObservations.map(
82
+ (i, m) => se(
83
+ i,
84
+ l,
85
+ r,
86
+ m,
87
+ t,
88
+ n,
89
+ d
90
+ )
91
+ )
92
+ ]
93
+ },
94
+ `encounter-${o.encounterId}`
95
+ );
96
+ };
97
+ return /* @__PURE__ */ u(
98
+ "div",
99
+ {
100
+ id: "obs-by-encounter",
101
+ "data-testid": "obs-by-encounter-test-id",
102
+ "aria-label": "obs-by-encounter-aria-label",
103
+ children: a.map(
104
+ (o, r) => b(o, r === 0, r)
105
+ )
106
+ }
107
+ );
108
+ }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", S = {
109
+ observations: ie,
110
+ title: ne
111
+ }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
112
+ const n = a, {
113
+ conceptNames: d = [],
114
+ conceptUuid: l = [],
115
+ hideThumbnail: b = !1
116
+ } = n, o = te(/* @__PURE__ */ new Set()), r = q(), { addNotification: t } = G(), { t: s } = N(), i = ae({
117
+ queries: d.map((e) => ({
118
+ queryKey: de(e),
119
+ queryFn: () => k(e),
120
+ enabled: !!e
121
+ }))
122
+ });
123
+ f(() => {
124
+ i.forEach((e, y) => {
125
+ if (e.isError && !o.current.has(y)) {
126
+ const U = d[y];
127
+ t({
128
+ title: s("ERROR_DEFAULT_TITLE"),
129
+ message: s("ERROR_FETCHING_CONCEPT", { conceptName: U }),
130
+ type: "error"
131
+ }), o.current.add(y);
132
+ } else e.isError || o.current.delete(y);
133
+ });
134
+ }, [i, d]);
135
+ const m = O(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = O(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = O(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
+ data: c,
137
+ isLoading: D,
138
+ isError: T,
139
+ refetch: R
140
+ } = re({
141
+ queryKey: le(r, p),
142
+ queryFn: () => x(r, p),
143
+ enabled: !!r && p.length > 0 && h
144
+ });
145
+ z(
146
+ (e) => {
147
+ e.patientUUID === r && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
+ (y) => p.includes(y)
149
+ ) && R();
150
+ },
151
+ [r, R]
152
+ ), f(() => {
153
+ T && t({
154
+ title: s("ERROR_DEFAULT_TITLE"),
155
+ message: s("ERROR_FETCHING_OBSERVATIONS"),
156
+ type: "error"
157
+ });
158
+ }, [T]);
159
+ const _ = O(() => {
160
+ if (!c) return [];
161
+ const e = Q(c), y = w(e);
162
+ return H(y);
163
+ }, [c]), V = [
164
+ { key: "name", header: "name" },
165
+ { key: "value", header: "value" },
166
+ { key: "form", header: "form" }
167
+ ], g = D || !h, I = T && h, B = (!c || c.entry?.length === 0 || p.length === 0) && h, C = I ? s("ERROR_FETCHING_OBSERVATIONS") : null, F = B ? s("NO_OBSERVATIONS_FOUND") : void 0, K = _.length > 0 && !g && !I, E = n.titleTranslationKey, v = E ? s(E) : "";
168
+ return /* @__PURE__ */ $(
169
+ "div",
170
+ {
171
+ id: "observations",
172
+ "data-testid": E ? `observations-${v}` : "observations",
173
+ "aria-label": "observations-aria-label",
174
+ className: S.observations,
175
+ children: [
176
+ /* @__PURE__ */ u(
177
+ M,
178
+ {
179
+ id: "observations-title",
180
+ testId: E ? `observations-title-${v}` : "observations-title",
181
+ title: v,
182
+ className: S.title,
183
+ children: /* @__PURE__ */ u("p", { children: v })
184
+ }
185
+ ),
186
+ K ? /* @__PURE__ */ u(
187
+ oe,
188
+ {
189
+ groupedData: _,
190
+ title: v,
191
+ hideThumbnail: b
192
+ }
193
+ ) : /* @__PURE__ */ u(
194
+ j,
195
+ {
196
+ headers: V,
197
+ rows: [],
198
+ ariaLabel: s("OBSERVATIONS"),
199
+ loading: g,
200
+ errorStateMessage: C,
201
+ emptyStateMessage: F ?? s("NO_OBSERVATIONS_AVAILABLE"),
202
+ dataTestId: "observations-table"
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ );
208
+ };
209
+ export {
210
+ de as conceptUuidQueryKeys,
211
+ pe as default,
212
+ le as observationsQueryKeys
213
+ };
@@ -1,4 +1,4 @@
1
- import { b$ as we, c0 as z, c1 as xt, c2 as B, bZ as q, b_ as y, c3 as Ro, c4 as ye, c5 as R, c6 as _, c7 as k, c8 as N, c9 as A, ca as bs, cb as ir, cc as $e, cd as G, ce as Hn, cf as Vn, cg as dt, ch as D, ci as xs, cj as cn, ck as Be, cl as ws, cm as qt, cn as zt, co as $s, cp as Cs, cq as $n, cr as Ss, cs as Nr, ct as Bt, cu as zo, cv as ks, cw as Es, cx as j, cy as Gr, cz as Ms, cA as Ds, cB as sr, cC as As, cD as Ts, cE as zn, cF as Fs, cG as Is, cH as Z, cI as Ps, cJ as Ls } from "./index-hyQPbI9a.js";
1
+ import { b$ as we, c0 as z, c1 as xt, c2 as B, bZ as q, b_ as y, c3 as Ro, c4 as ye, c5 as R, c6 as _, c7 as k, c8 as N, c9 as A, ca as bs, cb as ir, cc as $e, cd as G, ce as Hn, cf as Vn, cg as dt, ch as D, ci as xs, cj as cn, ck as Be, cl as ws, cm as qt, cn as zt, co as $s, cp as Cs, cq as $n, cr as Ss, cs as Nr, ct as Bt, cu as zo, cv as ks, cw as Es, cx as j, cy as Gr, cz as Ms, cA as Ds, cB as sr, cC as As, cD as Ts, cE as zn, cF as Fs, cG as Is, cH as Z, cI as Ps, cJ as Ls } from "./index-BeQYubv7.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":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAajB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAa,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAyBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CA6nBvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ObservationFormsContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/observations/ObservationFormsContainer.tsx"],"names":[],"mappings":"AAYA,OAAO,wCAAwC,CAAC;AAChD,OAAO,oCAAoC,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,gBAAgB,EAajB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAa,SAAS,EAAQ,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,EAEL,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAyBtF,UAAU,8BAA8B;IACtC,mBAAmB,EAAE,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wBAAwB,CAAC,EAAE,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,gBAAgB,EAAE,EAChC,mBAAmB,CAAC,EAChB,IAAI,GACJ,OAAO,sBAAsB,GAC7B,OAAO,0BAA0B,GACjC,OAAO,wBAAwB,GAC/B,OAAO,6BAA6B,EACxC,OAAO,CAAC,EAAE,SAAS,KAChB,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,QAAA,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAioBvE,CAAC;AAuBF,eAAe,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { bW as i, bX as o } from "./index-hyQPbI9a.js";
1
+ import { bW as i, bX as o } from "./index-BeQYubv7.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -114288,7 +114288,7 @@ const bC0 = [
114288
114288
  },
114289
114289
  {
114290
114290
  type: "patientDocuments",
114291
- component: J0(() => import("./DocumentsTable-BmYFio6a-CoYtK307.js"))
114291
+ component: J0(() => import("./DocumentsTable-CIJwgXmb-o0sXPKHx.js"))
114292
114292
  },
114293
114293
  {
114294
114294
  type: "flowSheet",
@@ -114296,7 +114296,7 @@ const bC0 = [
114296
114296
  },
114297
114297
  {
114298
114298
  type: "forms",
114299
- component: J0(() => import("./FormsTable-Dn0dYzgO-D1MJT4Gu.js"))
114299
+ component: J0(() => import("./FormsTable-DMPfuqmY-D_sXbv9-.js"))
114300
114300
  },
114301
114301
  {
114302
114302
  type: "labOrders",
@@ -114304,7 +114304,7 @@ const bC0 = [
114304
114304
  },
114305
114305
  {
114306
114306
  type: "observations",
114307
- component: J0(() => import("./Observations-BgGdEmnb-C9800CVt.js"))
114307
+ component: J0(() => import("./Observations-BflI1_YX-BjS2VTeV.js"))
114308
114308
  },
114309
114309
  {
114310
114310
  type: "ordersControl",
@@ -210179,7 +210179,7 @@ var uQt = (t, e = !1) => {
210179
210179
  const e = wp2(() => {
210180
210180
  const r = this, [n] = this.#n, [a] = this.#o, [l] = this.#a, [c] = this.#l, [i] = this.#p, [s] = this.#e;
210181
210181
  let d;
210182
- return this.#c ? d = this.#c : (d = fp2(() => import("./LNWAZHJI-DuUPX0Qx.js")), this.#c = d), Rp2(this.#h, this.#r), hp2(d, pp2({
210182
+ return this.#c ? d = this.#c : (d = fp2(() => import("./LNWAZHJI-D4ol89Mi.js")), this.#c = d), Rp2(this.#h, this.#r), hp2(d, pp2({
210183
210183
  get queryFlavor() {
210184
210184
  return r.#d;
210185
210185
  },
@@ -210277,7 +210277,7 @@ var uQt = (t, e = !1) => {
210277
210277
  const e = wp2(() => {
210278
210278
  const r = this, [n] = this.#n, [a] = this.#o, [l] = this.#a, [c] = this.#l, [i] = this.#p, [s] = this.#e, [d] = this.#c;
210279
210279
  let u;
210280
- return this.#i ? u = this.#i : (u = fp2(() => import("./MWZ6AO7Z-BiTDxA1Z.js")), this.#i = u), Rp2(this.#h, this.#r), hp2(u, pp2({
210280
+ return this.#i ? u = this.#i : (u = fp2(() => import("./MWZ6AO7Z-XAVFwIqJ.js")), this.#i = u), Rp2(this.#h, this.#r), hp2(u, pp2({
210281
210281
  get queryFlavor() {
210282
210282
  return r.#d;
210283
210283
  },
@@ -210433,7 +210433,7 @@ const OGt = {
210433
210433
  id: "clinical-config",
210434
210434
  name: "Clinical Config",
210435
210435
  displayName: "ClinicalConfigProvider"
210436
- }), WGt = J0(() => import("./ConsultationPage-CUu_1kOX.js")), KGt = J0(() => import("./index-pGvKzBuQ.js")), GGt = [
210436
+ }), WGt = J0(() => import("./ConsultationPage-C5i0v-TV.js")), KGt = J0(() => import("./index-Ddj2oHwb.js")), GGt = [
210437
210437
  {
210438
210438
  path: ":patientUuid",
210439
210439
  component: WGt
@@ -1,11 +1,11 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { u as g, a as u, bJ as b, bT as f, bU as x, bV as p, aH as _, bP as N } from "./index-hyQPbI9a.js";
2
+ import { u as g, a as u, bJ as b, bT as f, bU as x, bV as p, aH as _, bP as N } from "./index-BeQYubv7.js";
3
3
  import { lazy as h, useMemo as t, Suspense as E } from "react";
4
4
  import "@tanstack/react-query";
5
- import { u as C } from "./hook-B_OOkf7H.js";
5
+ import { u as C } from "./hook-y5iu13v4.js";
6
6
  const L = {
7
7
  "org.bahmni.clinical.v2.search": h(
8
- () => import("./index-BsA2EI4u.js")
8
+ () => import("./index-uelg_Ga5.js")
9
9
  )
10
10
  }, v = "index-module_page__16xxw", P = "index-module_loading__wNI-4", H = "index-module_message__Ib5Iw", l = {
11
11
  page: v,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { u as r, cK as l, cL as o, cM as c, b9 as m, ba as g, cN as h, cO as p, cP as b, aH as u } from "./index-hyQPbI9a.js";
2
+ import { u as r, cK as l, cL as o, cM as c, b9 as m, ba as g, cN as h, cO as p, cP as b, aH as u } from "./index-BeQYubv7.js";
3
3
  import { Suspense as _ } from "react";
4
4
  import "@tanstack/react-query";
5
5
  const E = "index-module_loading__eyE2k", $ = "index-module_message__95HmH", y = "index-module_panel__8VJh2", s = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { cQ as c } from "./index-hyQPbI9a.js";
1
+ import { cQ as c } from "./index-BeQYubv7.js";
2
2
  export {
3
3
  c as ClinicalApp
4
4
  };
@@ -472,10 +472,13 @@
472
472
  "OBSERVATION_FORMS_LOADING_FORMS": "Loading forms...",
473
473
  "OBSERVATION_FORMS_MANDATORY_ERROR_MESSAGE": "Please fix errors in Observation forms before submitting the consultation",
474
474
  "OBSERVATION_FORMS_MANDATORY_ERROR_TITLE": "Observation forms have errors",
475
+ "OBSERVATION_FORMS_NO_FORMS_AVAILABLE": "No forms available",
475
476
  "OBSERVATION_FORMS_NO_FORMS_FOUND": "No matching Forms found",
477
+ "OBSERVATION_FORMS_PIN_TOOLTIP": "Pin form",
476
478
  "OBSERVATION_FORMS_SEARCH_ARIA_LABEL": "Search for observation forms",
477
479
  "OBSERVATION_FORMS_SEARCH_PLACEHOLDER": "Search to add Observation Form",
478
480
  "OBSERVATION_FORMS_SECTION_TITLE": "Observation Forms",
481
+ "OBSERVATION_FORMS_UNPIN_TOOLTIP": "Unpin form",
479
482
  "OBSERVATION_FORM_CONTINUE_ANYWAY_BUTTON": "Continue Anyway",
480
483
  "OBSERVATION_FORM_COPYOVER_NOTICE": "You are in copy-over mode. It will create a new instance.",
481
484
  "OBSERVATION_FORM_DISCARD_BUTTON": "Discard Form",
@@ -474,10 +474,13 @@
474
474
  "OBSERVATION_FORMS_LOADING_FORMS": "Cargando formularios...",
475
475
  "OBSERVATION_FORMS_MANDATORY_ERROR_MESSAGE": "Por favor corrija los errores en los formularios de observación antes de enviar la consulta",
476
476
  "OBSERVATION_FORMS_MANDATORY_ERROR_TITLE": "Los formularios de observación tienen errores",
477
+ "OBSERVATION_FORMS_NO_FORMS_AVAILABLE": "No hay formularios disponibles",
477
478
  "OBSERVATION_FORMS_NO_FORMS_FOUND": "No se encontraron formularios coincidentes",
479
+ "OBSERVATION_FORMS_PIN_TOOLTIP": "Fijar formulario",
478
480
  "OBSERVATION_FORMS_SEARCH_ARIA_LABEL": "Buscar formularios de observación",
479
481
  "OBSERVATION_FORMS_SEARCH_PLACEHOLDER": "Buscar para agregar formulario de observación",
480
482
  "OBSERVATION_FORMS_SECTION_TITLE": "Formularios de Observación",
483
+ "OBSERVATION_FORMS_UNPIN_TOOLTIP": "Dejar de fijar formulario",
481
484
  "OBSERVATION_FORM_CONTINUE_ANYWAY_BUTTON": "Continuar de todos modos",
482
485
  "OBSERVATION_FORM_COPYOVER_NOTICE": "Está en modo de copia. Esto creará una nueva instancia.",
483
486
  "OBSERVATION_FORM_DISCARD_BUTTON": "Descartar Formulario",
@@ -1 +1 @@
1
- {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAMN,MAAM,OAAO,CAAC;AAsCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAqV7B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ConsultationPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConsultationPage.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAMN,MAAM,OAAO,CAAC;AAsCf;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAyV7B,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.404",
3
+ "version": "0.0.1-dev.405",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,213 +0,0 @@
1
- import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { v as q, z as G, u as N, l as k, G as x, m as z, n as Q, o as w, s as H, r as M, K as j, t as P, _ as D, x as J, C as Y, y as W, E as X, B as Z, D as ee } from "./index-hyQPbI9a.js";
3
- import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as I, useMemo as T } from "react";
5
- const C = (a, n, d, l, b, r) => {
6
- const t = J(a, n, b), s = t.value, o = Y(s);
7
- let i = s;
8
- o === "Image" && (i = /* @__PURE__ */ u(
9
- X,
10
- {
11
- imageSrc: s,
12
- alt: s,
13
- id: `${s}-img`,
14
- hideThumbnail: r
15
- }
16
- )), o === "Video" && (i = /* @__PURE__ */ u(
17
- Z,
18
- {
19
- id: `${s}-video`,
20
- videoSrc: s,
21
- hideThumbnail: r
22
- }
23
- )), o === "PDF" && (i = /* @__PURE__ */ u(ee, { id: `${s}-pdf`, src: s }));
24
- const m = b("OBSERVATIONS_RECORDED_BY", {
25
- provider: t.provider
26
- }), p = a.display, h = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${h}-${p}-${d}-${n}` : `${h}-${p}-${d}-${n}`;
27
- return /* @__PURE__ */ u(
28
- W,
29
- {
30
- header: t.header,
31
- value: i,
32
- info: m,
33
- id: c,
34
- testId: c,
35
- ariaLabel: c
36
- },
37
- `obs-${a.id}`
38
- );
39
- }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
40
- D,
41
- {
42
- title: a.display,
43
- id: `grouped-obs-${a.display}-${l}`,
44
- open: d,
45
- children: a.members?.map(
46
- (s, o) => C(
47
- s,
48
- o,
49
- b,
50
- r,
51
- n,
52
- t
53
- )
54
- )
55
- },
56
- `grouped-obs-${a.id}`
57
- ), oe = ({
58
- groupedData: a,
59
- title: n = "",
60
- hideThumbnail: d
61
- }) => {
62
- const { t: l } = N(), b = (r, t, s) => {
63
- const o = P(r.encounterDetails, l);
64
- return /* @__PURE__ */ S(
65
- D,
66
- {
67
- title: o,
68
- id: `encounter-${r.encounterId}`,
69
- open: t,
70
- children: [
71
- r.observations.map(
72
- (i, m) => C(
73
- i,
74
- m,
75
- s,
76
- n,
77
- l,
78
- d
79
- )
80
- ),
81
- r.groupedObservations.map(
82
- (i, m) => re(
83
- i,
84
- l,
85
- t,
86
- m,
87
- s,
88
- n,
89
- d
90
- )
91
- )
92
- ]
93
- },
94
- `encounter-${r.encounterId}`
95
- );
96
- };
97
- return /* @__PURE__ */ u(
98
- "div",
99
- {
100
- id: "obs-by-encounter",
101
- "data-testid": "obs-by-encounter-test-id",
102
- "aria-label": "obs-by-encounter-aria-label",
103
- children: a.map(
104
- (r, t) => b(r, t === 0, t)
105
- )
106
- }
107
- );
108
- }, ie = "Observations-module_observations__RKSyo", ne = "Observations-module_title__TJL3z", $ = {
109
- observations: ie,
110
- title: ne
111
- }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
112
- const n = a, {
113
- conceptNames: d = [],
114
- conceptUuid: l = [],
115
- hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = q(), { addNotification: s } = G(), { t: o } = N(), i = ae({
117
- queries: d.map((e) => ({
118
- queryKey: de(e),
119
- queryFn: () => k(e),
120
- enabled: !!e
121
- }))
122
- });
123
- I(() => {
124
- i.forEach((e, y) => {
125
- if (e.isError && !r.current.has(y)) {
126
- const U = d[y];
127
- s({
128
- title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: U }),
130
- type: "error"
131
- }), r.current.add(y);
132
- } else e.isError || r.current.delete(y);
133
- });
134
- }, [i, d]);
135
- const m = T(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = T(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), h = T(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
136
- data: c,
137
- isLoading: F,
138
- isError: R,
139
- refetch: g
140
- } = te({
141
- queryKey: le(t, p),
142
- queryFn: () => x(t, p),
143
- enabled: !!t && p.length > 0 && h
144
- });
145
- z(
146
- (e) => {
147
- e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
- (y) => p.includes(y)
149
- ) && g();
150
- },
151
- [t, g]
152
- ), I(() => {
153
- R && s({
154
- title: o("ERROR_DEFAULT_TITLE"),
155
- message: o("ERROR_FETCHING_OBSERVATIONS"),
156
- type: "error"
157
- });
158
- }, [R]);
159
- const O = T(() => {
160
- if (!c) return [];
161
- const e = Q(c), y = w(e);
162
- return H(y);
163
- }, [c]), L = [
164
- { key: "name", header: "name" },
165
- { key: "value", header: "value" },
166
- { key: "form", header: "form" }
167
- ], _ = F || !h, f = R && h, A = (!c || c.entry?.length === 0 || p.length === 0) && h, K = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = O.length > 0 && !_ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
168
- return /* @__PURE__ */ S(
169
- "div",
170
- {
171
- id: "observations",
172
- "data-testid": E ? `observations-${v}` : "observations",
173
- "aria-label": "observations-aria-label",
174
- className: $.observations,
175
- children: [
176
- /* @__PURE__ */ u(
177
- M,
178
- {
179
- id: "observations-title",
180
- testId: E ? `observations-title-${v}` : "observations-title",
181
- title: v,
182
- className: $.title,
183
- children: /* @__PURE__ */ u("p", { children: v })
184
- }
185
- ),
186
- B ? /* @__PURE__ */ u(
187
- oe,
188
- {
189
- groupedData: O,
190
- title: v,
191
- hideThumbnail: b
192
- }
193
- ) : /* @__PURE__ */ u(
194
- j,
195
- {
196
- headers: L,
197
- rows: [],
198
- ariaLabel: o("OBSERVATIONS"),
199
- loading: _,
200
- errorStateMessage: K,
201
- emptyStateMessage: V,
202
- dataTestId: "observations-table"
203
- }
204
- )
205
- ]
206
- }
207
- );
208
- };
209
- export {
210
- de as conceptUuidQueryKeys,
211
- pe as default,
212
- le as observationsQueryKeys
213
- };