@bahmni/widgets 0.0.1-dev.215 → 0.0.1-dev.216

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.
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { DiagnosesTable } from './diagnoses';
6
6
  export { MedicationsTable } from './medications';
7
7
  export { RadiologyInvestigationTable } from './radiologyInvestigation';
8
8
  export { RadiologyInvestigationReport } from './radiologyInvestigationReport';
9
+ export { ObservationsRenderer } from './observationsRenderer';
9
10
  export { LabInvestigation } from './labinvestigation';
10
11
  export { SearchPatient } from './searchPatient';
11
12
  export { VitalFlowSheet } from './vitalFlowSheet';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,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OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AAGzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,yBAAyB,EACzB,KAAK,6BAA6B,GACnC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAG1E,OAAO,EACL,cAAc,EACd,SAAS,EACT,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a3 as s, a1 as t, A as o, a0 as r, z as n, $ as g, B as l, D as P, J as c, L as d, F as v, U as T, W as A, P as b, N as p, T as C, H as f, G as W, S as u, _ as I, V as S, a5 as m, a4 as D, ab as N, aa as R, a7 as U, a8 as y, a9 as L, a6 as h, ac as x, a2 as G, Z as H, a as V, u as _, Y as E } from "./index-Cu7kAJjg.js";
1
+ import { a1 as s, $ as t, x as o, _ as r, z as n, Z as g, B as l, D as P, I as d, L as v, F as c, N as T, T as b, O as A, P as p, J as C, K as f, H as I, G as W, S as u, Y as R, V as S, a3 as m, a2 as D, a9 as N, a8 as U, a5 as x, a6 as y, a7 as L, a4 as O, aa as h, a0 as G, W as H, a as V, u as _, U as E } from "./index-BrKymTP5.js";
2
2
  import "react";
3
3
  export {
4
4
  s as ActivePractitionerContext,
@@ -9,28 +9,29 @@ export {
9
9
  g as CONSULTATION_PAD_PRIVILEGES,
10
10
  l as ConditionsTable,
11
11
  P as DiagnosesTable,
12
- c as GenericServiceRequestTable,
13
- d as LabInvestigation,
14
- v as MedicationsTable,
12
+ d as GenericServiceRequestTable,
13
+ v as LabInvestigation,
14
+ c as MedicationsTable,
15
15
  T as NotificationProvider,
16
- A as NotificationServiceComponent,
17
- b as PatientDetails,
18
- p as PatientProgramsTable,
19
- C as ProgramDetails,
20
- f as RadiologyInvestigationReport,
16
+ b as NotificationServiceComponent,
17
+ A as ObservationsRenderer,
18
+ p as PatientDetails,
19
+ C as PatientProgramsTable,
20
+ f as ProgramDetails,
21
+ I as RadiologyInvestigationReport,
21
22
  W as RadiologyInvestigationTable,
22
23
  u as SearchPatient,
23
- I as UserPrivilegeProvider,
24
+ R as UserPrivilegeProvider,
24
25
  S as VitalFlowSheet,
25
26
  m as createConfigHook,
26
27
  D as createConfigProvider,
27
28
  N as getAllWidgetConfigs,
28
- R as getAllWidgetTypes,
29
- U as getWidget,
29
+ U as getAllWidgetTypes,
30
+ x as getWidget,
30
31
  y as getWidgetConfig,
31
32
  L as hasWidget,
32
- h as registerWidget,
33
- x as resetWidgetRegistry,
33
+ O as registerWidget,
34
+ h as resetWidgetRegistry,
34
35
  G as useActivePractitioner,
35
36
  H as useHasPrivilege,
36
37
  V as useNotification,
@@ -32,6 +32,7 @@ export interface ExtractedObservation {
32
32
  members?: ExtractedObservation[];
33
33
  sortId?: string;
34
34
  conceptId?: string;
35
+ comment?: string;
35
36
  }
36
37
  export interface ExtractedObservationsResult {
37
38
  observations: ExtractedObservation[];
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/observations/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EACA,UAAU,GACV,UAAU,GACV,QAAQ,GACR,SAAS,GACT,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,UAAU,GACV,QAAQ,GACR,aAAa,CAAC;IAClB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,gBAAgB,CAA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,uBAAuB,EAAE,CAW3B"}
@@ -0,0 +1,15 @@
1
+ import { Observation } from 'fhir/r4';
2
+ import { default as React } from 'react';
3
+ export interface ObservationsRendererProps {
4
+ observations: Observation[];
5
+ isLoading?: boolean;
6
+ isError?: boolean;
7
+ errorMessage?: string;
8
+ emptyStateMessage?: string;
9
+ className?: string;
10
+ testIdPrefix?: string;
11
+ hideThumbnail?: boolean;
12
+ }
13
+ export declare const ObservationsRenderer: React.FC<ObservationsRendererProps>;
14
+ export default ObservationsRenderer;
15
+ //# sourceMappingURL=ObservationsRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObservationsRenderer.d.ts","sourceRoot":"","sources":["../../src/observationsRenderer/ObservationsRenderer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAWvC,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA6ND,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA0EpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ObservationsRenderer, default } from './ObservationsRenderer';
2
+ export type { ObservationsRendererProps } from './ObservationsRenderer';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observationsRenderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACvE,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface QualityAssessmentProps {
3
+ imagingStudyId: string | null;
4
+ onDateLoaded?: (date: string | undefined) => void;
5
+ }
6
+ export declare const QualityAssessment: React.FC<QualityAssessmentProps>;
7
+ export default QualityAssessment;
8
+ //# sourceMappingURL=QualityAssessment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QualityAssessment.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/QualityAssessment.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8C9D,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAchD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAiBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0YtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAQ5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAehD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAsBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAoctD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadiologyInvestigationReport.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationReport/RadiologyInvestigationReport.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAyKD,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CACjD,iCAAiC,CAiFlC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"RadiologyInvestigationReport.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigationReport/RadiologyInvestigationReport.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAAE,CACjD,iCAAiC,CAmClC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Observation, Reference } from 'fhir/r4';
2
+ import { ExtractedObservation, ObservationValue } from '../observations/models';
3
+ export declare const extractId: (ref?: string | Reference) => string | undefined;
4
+ export declare function isAbnormalInterpretation(observation: Observation): boolean;
5
+ export declare function extractObservationValue(observation: Observation): ObservationValue | undefined;
6
+ export declare function getObservationDisplayInfo(observation: ExtractedObservation): {
7
+ rangeString: string;
8
+ isAbnormal: boolean;
9
+ };
10
+ export declare function sortObservationsBySortId(observations: ExtractedObservation[]): ExtractedObservation[];
11
+ export declare function groupMultiSelectObservations(observations: ExtractedObservation[]): ExtractedObservation[];
12
+ export declare function transformObservations(observations: Observation[]): ExtractedObservation[];
13
+ //# sourceMappingURL=Observations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Observations.d.ts","sourceRoot":"","sources":["../../src/utils/Observations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAWhF,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAG7D,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAY1E;AAqDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,GACvB,gBAAgB,GAAG,SAAS,CAqD9B;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,oBAAoB,GAAG;IAC5E,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB,CAyBA;AAED,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,oBAAoB,EAAE,GACnC,oBAAoB,EAAE,CAKxB;AAED,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,oBAAoB,EAAE,GACnC,oBAAoB,EAAE,CA0BxB;AAED,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,WAAW,EAAE,GAC1B,oBAAoB,EAAE,CAqDxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.215",
3
+ "version": "0.0.1-dev.216",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,436 +0,0 @@
1
- import { jsxs as f, jsx as a, Fragment as j } from "react/jsx-runtime";
2
- import { f as Q, e as R, g as oe, h as se, E as ne, M as de, i as ie, O as le, u as ce, j as me, k as ue, m as pe, l as be, n as fe, I as _e, b as ye, c as $e, d as k, X as ge, Q as he, y as ve, K as Ne, R as H } from "./index-Cu7kAJjg.js";
3
- import { useQueryClient as Oe, useQuery as L } from "@tanstack/react-query";
4
- import { useState as K, useMemo as v, useCallback as M } from "react";
5
- import { useTranslation as T } from "react-i18next";
6
- const Fe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Me = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Ce = "_observation_1pd36_30", De = "_groupContainer_1pd36_39", Ve = "_rowContainer_1pd36_43", Ie = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Ee = "_rowValue_1pd36_67", we = "_groupMembers_1pd36_75", Be = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", Ge = "_memberValue_1pd36_94", Se = "_abnormalValue_1pd36_102", qe = "_commentSection_1pd36_110", Ue = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", Pe = "_nestedGroupLabel_1pd36_132", ke = "_nestedGroupMembers_1pd36_141", o = {
7
- formsTableBody: Fe,
8
- customAccordianItem: Le,
9
- formContent: Me,
10
- formDetailsContainer: Re,
11
- observation: Ce,
12
- groupContainer: De,
13
- rowContainer: Ve,
14
- groupLabel: Ie,
15
- rowLabel: Te,
16
- rowValue: Ee,
17
- groupMembers: we,
18
- memberRow: Be,
19
- memberLabel: Ae,
20
- memberValue: Ge,
21
- abnormalValue: Se,
22
- commentSection: qe,
23
- commentText: Ue,
24
- nestedGroup: xe,
25
- nestedGroupLabel: Pe,
26
- nestedGroupMembers: ke
27
- }, z = (e, r) => {
28
- const t = oe(e);
29
- return t === "Image" ? /* @__PURE__ */ a(
30
- se,
31
- {
32
- imageSrc: e,
33
- alt: e,
34
- id: `${e}-img`,
35
- hideThumbnail: r
36
- }
37
- ) : t === "Video" ? /* @__PURE__ */ a(
38
- ne,
39
- {
40
- id: `${e}-video`,
41
- videoSrc: e,
42
- hideThumbnail: r
43
- }
44
- ) : t === "PDF" ? /* @__PURE__ */ a(de, { id: `${e}-pdf`, src: e }) : e;
45
- }, X = (e) => {
46
- const r = e.observationValue?.referenceRange?.low?.value, t = e.observationValue?.referenceRange?.high?.value, s = r != null, n = t != null;
47
- let l = "";
48
- s && n ? l = ` (${r} - ${t})` : s ? l = ` (>${r})` : n && (l = ` (<${t})`);
49
- const c = e.observationValue?.isAbnormal === !0;
50
- return { rangeString: l, isAbnormal: c };
51
- }, W = ({
52
- member: e,
53
- depth: r = 0,
54
- memberIndex: t = 0,
55
- formName: s = "",
56
- comment: n,
57
- hideThumbnail: l
58
- }) => {
59
- const { t: c } = T(), d = e.members && e.members.length > 0, p = e.display, m = s ? `${s}-` : "";
60
- if (d)
61
- return /* @__PURE__ */ f(
62
- "div",
63
- {
64
- className: o.nestedGroup,
65
- "data-testid": `${m}obs-nested-group-${p}-${t}`,
66
- children: [
67
- /* @__PURE__ */ a(
68
- "div",
69
- {
70
- className: o.nestedGroupLabel,
71
- "data-testid": `${m}obs-nested-group-label-${p}-${t}`,
72
- style: { paddingLeft: `${r * 16}px` },
73
- children: p
74
- }
75
- ),
76
- /* @__PURE__ */ a(
77
- "div",
78
- {
79
- className: o.nestedGroupMembers,
80
- "data-testid": `${m}obs-nested-group-members-${p}-${t}`,
81
- children: e.members?.map((N, O) => /* @__PURE__ */ a(
82
- W,
83
- {
84
- member: N,
85
- depth: r + 1,
86
- memberIndex: O,
87
- formName: s,
88
- hideThumbnail: l
89
- },
90
- `${N.id}`
91
- ))
92
- }
93
- )
94
- ]
95
- }
96
- );
97
- const { rangeString: h, isAbnormal: _ } = X(e), y = Q(e, c), $ = y ? z(y, l) : null;
98
- return /* @__PURE__ */ f(j, { children: [
99
- /* @__PURE__ */ f(
100
- "div",
101
- {
102
- className: o.memberRow,
103
- "data-testid": `${m}obs-member-row-${p}-${t}`,
104
- style: { paddingLeft: `${r * 16}px` },
105
- children: [
106
- /* @__PURE__ */ f(
107
- "p",
108
- {
109
- className: R(
110
- o.memberLabel,
111
- _ ? o.abnormalValue : ""
112
- ),
113
- "data-testid": `${m}obs-member-label-${p}-${t}`,
114
- children: [
115
- p,
116
- h
117
- ]
118
- }
119
- ),
120
- /* @__PURE__ */ a(
121
- "div",
122
- {
123
- className: R(
124
- o.memberValue,
125
- _ ? o.abnormalValue : ""
126
- ),
127
- "data-testid": `${m}obs-member-value-${p}-${t}`,
128
- children: $
129
- }
130
- )
131
- ]
132
- }
133
- ),
134
- n && /* @__PURE__ */ a(
135
- "div",
136
- {
137
- className: o.commentSection,
138
- "data-testid": `${m}obs-member-comment-${p}-${t}`,
139
- style: { paddingLeft: `${r * 16}px` },
140
- children: /* @__PURE__ */ f("span", { className: o.commentText, children: [
141
- n,
142
- e.encounter?.provider && ` - by ${e.encounter.provider}`
143
- ] })
144
- }
145
- )
146
- ] });
147
- }, He = ({
148
- observation: e,
149
- index: r,
150
- formName: t = "",
151
- comment: s,
152
- hideThumbnail: n
153
- }) => {
154
- const { t: l } = T(), c = e.members && e.members.length > 0, { rangeString: d, isAbnormal: p } = X(e), m = t ? `${t}-` : "", h = Q(e, l), _ = h ? z(h, n) : null;
155
- return /* @__PURE__ */ f(
156
- "div",
157
- {
158
- className: o.observation,
159
- "data-testid": `${m}observation-item-${e.display}-${r}`,
160
- children: [
161
- /* @__PURE__ */ f(
162
- "div",
163
- {
164
- className: c ? o.groupContainer : o.rowContainer,
165
- "data-testid": `${m}observation-container-${e.display}-${r}`,
166
- children: [
167
- /* @__PURE__ */ f(
168
- "p",
169
- {
170
- className: R(
171
- c ? o.groupLabel : o.rowLabel,
172
- !c && p ? o.abnormalValue : ""
173
- ),
174
- "data-testid": `${m}observation-label-${e.display}-${r}`,
175
- children: [
176
- e.display,
177
- !c && d && /* @__PURE__ */ a("span", { className: o.rangeInfo, children: d })
178
- ]
179
- }
180
- ),
181
- c ? /* @__PURE__ */ a(
182
- "div",
183
- {
184
- className: o.groupMembers,
185
- "data-testid": `${m}observation-group-members-${e.display}-${r}`,
186
- children: e.members?.map((y, $) => /* @__PURE__ */ a(
187
- W,
188
- {
189
- member: y,
190
- depth: 0,
191
- memberIndex: $,
192
- formName: t,
193
- hideThumbnail: n
194
- },
195
- `${y.id}`
196
- ))
197
- }
198
- ) : /* @__PURE__ */ a(
199
- "div",
200
- {
201
- className: R(
202
- o.rowValue,
203
- p ? o.abnormalValue : ""
204
- ),
205
- "data-testid": `${m}observation-value-${e.display}-${r}`,
206
- children: _
207
- }
208
- )
209
- ]
210
- }
211
- ),
212
- s && /* @__PURE__ */ a(
213
- "div",
214
- {
215
- className: o.commentSection,
216
- "data-testid": `${m}observation-comment-${e.display}-${r}`,
217
- children: /* @__PURE__ */ f("span", { className: o.commentText, children: [
218
- s,
219
- e.encounter?.provider && ` - by ${e.encounter.provider}`
220
- ] })
221
- }
222
- )
223
- ]
224
- },
225
- `${e.id}-${r}`
226
- );
227
- }, Ke = (e) => e ? e.extension?.find(
228
- (t) => t.url === le
229
- )?.valueString : void 0, je = (e) => {
230
- if (e)
231
- return e.note?.[0]?.text;
232
- }, Qe = (e, r) => e.entry?.find((t) => t.resource?.id === r)?.resource, I = (e, r) => {
233
- const t = Qe(e, r);
234
- return t ? {
235
- formFieldPath: Ke(t),
236
- comment: je(t)
237
- } : {};
238
- }, ze = (e, r) => {
239
- if (!e?.entry || !r)
240
- return [];
241
- const t = ie(e);
242
- return [
243
- ...t.observations.map((n) => {
244
- const { formFieldPath: l, comment: c } = I(
245
- e,
246
- n.id
247
- );
248
- return { obs: n, formFieldPath: l, comment: c };
249
- }),
250
- ...t.groupedObservations.flatMap((n) => {
251
- const { formFieldPath: l } = I(e, n.id);
252
- return (n.members ?? []).map((c) => {
253
- const { comment: d } = I(e, c.id);
254
- return { obs: c, formFieldPath: l, comment: d };
255
- });
256
- })
257
- ].filter(
258
- ({ formFieldPath: n }) => !n || n.includes(r)
259
- );
260
- }, er = ({
261
- episodeOfCareUuids: e,
262
- encounterUuids: r,
263
- config: t
264
- }) => {
265
- const { t: s } = T(), n = ce(), [l, c] = K(!1), [d, p] = K(null), { numberOfVisits: m, hideThumbnail: h = !1 } = t ?? {}, _ = me(
266
- e,
267
- r
268
- ), y = Oe(), {
269
- data: $ = [],
270
- isLoading: N,
271
- isError: O,
272
- error: Y,
273
- refetch: J
274
- } = L({
275
- queryKey: ["forms", n, e],
276
- queryFn: () => ue(n, void 0, m),
277
- enabled: !!n && !_
278
- }), E = v(() => !r || r.length === 0 ? $ : $.filter(
279
- (i) => r.includes(i.encounterUuid)
280
- ), [$, r]), { data: w = [] } = L({
281
- queryKey: ["observationForms"],
282
- queryFn: () => pe()
283
- }), B = M(
284
- (i) => w.find((u) => u.name === i)?.uuid,
285
- [w]
286
- ), C = v(() => {
287
- if (d)
288
- return B(d.formName);
289
- }, [d, B]), { isLoading: Z, error: A } = L({
290
- queryKey: ["formMetadata", C],
291
- queryFn: () => be(C),
292
- enabled: !!C && l
293
- }), {
294
- data: D,
295
- isLoading: ee,
296
- error: G
297
- } = L({
298
- queryKey: ["formsEncounterFHIR", d?.encounterUuid],
299
- queryFn: () => fe(d.encounterUuid),
300
- enabled: !!d?.encounterUuid && l
301
- });
302
- _e(
303
- (i) => {
304
- i.patientUUID === n && i.updatedConcepts.size > 0 && (J(), y.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
305
- },
306
- [n]
307
- );
308
- const S = v(() => !D || !d?.formName ? [] : ze(
309
- D,
310
- d.formName
311
- ), [D, d?.formName]), q = v(
312
- () => [
313
- { key: "recordedOn", header: s("FORM_RECORDED_ON") },
314
- { key: "recordedBy", header: s("FORM_RECORDED_BY") }
315
- ],
316
- [s]
317
- ), re = v(
318
- () => [
319
- { key: "recordedOn", sortable: !0 },
320
- { key: "recordedBy", sortable: !0 }
321
- ],
322
- []
323
- ), U = v(() => {
324
- const i = E.reduce(
325
- (u, b) => {
326
- const F = b.formName;
327
- u[F] ??= [];
328
- const V = b.providers.map((ae) => ae.providerName).filter(Boolean).join(", ");
329
- return u[F].push({
330
- id: b.encounterUuid,
331
- formName: b.formName,
332
- recordedOn: ye(b.encounterDateTime, s, !0).formattedResult,
333
- recordedBy: V ?? "--",
334
- encounterDateTime: b.encounterDateTime,
335
- encounterUuid: b.encounterUuid
336
- }), u;
337
- },
338
- {}
339
- );
340
- return Object.entries(i).map(
341
- ([u, b]) => ({
342
- formName: u,
343
- records: b.sort(
344
- (F, V) => V.encounterDateTime - F.encounterDateTime
345
- )
346
- })
347
- ).sort((u, b) => u.formName.localeCompare(b.formName));
348
- }, [E, s]), x = M((i) => {
349
- p(i), c(!0);
350
- }, []), te = M(() => {
351
- c(!1), p(null);
352
- }, []), P = M(
353
- (i, g) => {
354
- switch (g) {
355
- case "recordedOn":
356
- return /* @__PURE__ */ a($e, { onClick: () => x(i), children: i.recordedOn });
357
- case "recordedBy":
358
- return i.recordedBy;
359
- default:
360
- return null;
361
- }
362
- },
363
- [x]
364
- );
365
- return /* @__PURE__ */ f(j, { children: [
366
- /* @__PURE__ */ a("div", { "data-testid": "forms-table", children: N || O || U.length === 0 || _ ? /* @__PURE__ */ a(
367
- k,
368
- {
369
- headers: q,
370
- ariaLabel: s("FORMS_HEADING"),
371
- rows: [],
372
- loading: N,
373
- errorStateMessage: O ? Y?.message : void 0,
374
- emptyStateMessage: s("FORMS_UNAVAILABLE"),
375
- renderCell: P,
376
- className: o.formsTableBody,
377
- dataTestId: "forms-table"
378
- }
379
- ) : /* @__PURE__ */ a(ge, { align: "start", children: U.map((i, g) => {
380
- const { formName: u, records: b } = i;
381
- return /* @__PURE__ */ a(
382
- he,
383
- {
384
- title: u,
385
- className: o.customAccordianItem,
386
- testId: `accordian-title-${u}`,
387
- open: g === 0,
388
- children: /* @__PURE__ */ a(
389
- k,
390
- {
391
- headers: q,
392
- ariaLabel: s("FORMS_HEADING"),
393
- rows: b,
394
- loading: !1,
395
- errorStateMessage: "",
396
- sortable: re,
397
- emptyStateMessage: s("FORMS_UNAVAILABLE"),
398
- renderCell: P,
399
- className: o.formsTableBody,
400
- dataTestId: `forms-table-${u}`
401
- }
402
- )
403
- },
404
- u
405
- );
406
- }) }) }),
407
- l && d && /* @__PURE__ */ a(
408
- ve,
409
- {
410
- id: "modalIdForActionAreaLayout",
411
- portalId: "main-display-area",
412
- open: l,
413
- onRequestClose: te,
414
- modalHeading: d.formName,
415
- modalLabel: `${d.recordedOn} | ${d.recordedBy}`,
416
- passiveModal: !0,
417
- size: "md",
418
- testId: "form-details-modal",
419
- children: /* @__PURE__ */ a("div", { className: o.formContent, children: Z || ee ? /* @__PURE__ */ a(Ne, { width: "100%", lineCount: 3 }) : A ? /* @__PURE__ */ a("div", { children: H(A).message ?? s("ERROR_FETCHING_FORM_METADATA") }) : G ? /* @__PURE__ */ a("div", { children: H(G).message ?? s("ERROR_FETCHING_FORM_DATA") }) : S.length > 0 ? /* @__PURE__ */ a("div", { className: o.formDetailsContainer, children: S.map(({ obs: i, comment: g }, u) => /* @__PURE__ */ a(
420
- He,
421
- {
422
- observation: i,
423
- index: u,
424
- formName: d.formName,
425
- comment: g,
426
- hideThumbnail: h
427
- },
428
- `${i.id}`
429
- )) }) : /* @__PURE__ */ a("div", { children: s("NO_FORM_DATA_AVAILABLE") }) })
430
- }
431
- )
432
- ] });
433
- };
434
- export {
435
- er as default
436
- };
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ExtractedObservation } from '../observations/models';
3
- interface ObservationItemProps {
4
- observation: ExtractedObservation;
5
- index: number;
6
- formName?: string;
7
- comment?: string;
8
- hideThumbnail?: boolean;
9
- }
10
- export declare const ObservationItem: React.FC<ObservationItemProps>;
11
- export default ObservationItem;
12
- //# sourceMappingURL=ObservationItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObservationItem.d.ts","sourceRoot":"","sources":["../../src/forms/ObservationItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,UAAU,oBAAoB;IAC5B,WAAW,EAAE,oBAAoB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA2KD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoF1D,CAAC;AAEF,eAAe,eAAe,CAAC"}