@bahmni/widgets 0.0.1-dev.128 → 0.0.1-dev.129
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/{FormsTable-h4wqET5z.js → FormsTable-PPgCOSmM.js} +34 -34
- package/dist/{Observations-DJ0_gW7h.js → Observations-CY1mdxu2.js} +1 -1
- package/dist/{index-BEusKCC8.js → index-DN-Xic0O.js} +11399 -11320
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/labinvestigation/AttachmentViewer.d.ts +10 -0
- package/dist/labinvestigation/AttachmentViewer.d.ts.map +1 -0
- package/dist/labinvestigation/LabInvestigation.d.ts.map +1 -1
- package/dist/labinvestigation/LabInvestigationItem.d.ts.map +1 -1
- package/dist/labinvestigation/models.d.ts +10 -1
- package/dist/labinvestigation/models.d.ts.map +1 -1
- package/dist/labinvestigation/utils.d.ts +16 -6
- package/dist/labinvestigation/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as t, v as s, A as r, i as o, D as n, G as g, j as l, M as c, N as P, s as d, P as v, r as T, R as b, n as W, U as A, q as f, T as u, Q as C, B as U, E as m, O as p, z as y, W as D, x as N, g as R, u as S, t as h } from "./index-
|
|
1
|
+
import { y as t, v as s, A as r, i as o, D as n, G as g, j as l, M as c, N as P, s as d, P as v, r as T, R as b, n as W, U as A, q as f, T as u, Q as C, B as U, E as m, O as p, z as y, W as D, x as N, g as R, u as S, t as h } from "./index-DN-Xic0O.js";
|
|
2
2
|
import "react";
|
|
3
3
|
export {
|
|
4
4
|
t as ActivePractitionerContext,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Attachment } from './models';
|
|
3
|
+
interface AttachmentViewerProps {
|
|
4
|
+
attachment: Attachment;
|
|
5
|
+
index: number;
|
|
6
|
+
totalCount: number;
|
|
7
|
+
}
|
|
8
|
+
declare const AttachmentViewer: React.FC<AttachmentViewerProps>;
|
|
9
|
+
export default AttachmentViewer;
|
|
10
|
+
//# sourceMappingURL=AttachmentViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttachmentViewer.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/AttachmentViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOtC,UAAU,qBAAqB;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAiCrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA8BhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqM3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabInvestigationItem.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigationItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabInvestigationItem.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigationItem.tsx"],"names":[],"mappings":"AASA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,0BAA0B,EAA4B,MAAM,UAAU,CAAC;AAIhF,UAAU,yBAAyB;IACjC,IAAI,EAAE,0BAA0B,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2K7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -2,6 +2,11 @@ export declare enum LabInvestigationPriority {
|
|
|
2
2
|
stat = "Urgent",
|
|
3
3
|
routine = "Routine"
|
|
4
4
|
}
|
|
5
|
+
export interface Attachment {
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly contentType?: string;
|
|
9
|
+
}
|
|
5
10
|
export interface FormattedLabInvestigations {
|
|
6
11
|
readonly id: string;
|
|
7
12
|
readonly testName: string;
|
|
@@ -12,6 +17,8 @@ export interface FormattedLabInvestigations {
|
|
|
12
17
|
readonly result?: string | LabTestResult[];
|
|
13
18
|
readonly testType: string;
|
|
14
19
|
readonly note?: string;
|
|
20
|
+
readonly reportId?: string;
|
|
21
|
+
readonly attachments?: Attachment[];
|
|
15
22
|
}
|
|
16
23
|
export interface LabInvestigationsByDate {
|
|
17
24
|
readonly date: string;
|
|
@@ -21,10 +28,12 @@ export interface LabInvestigationsByDate {
|
|
|
21
28
|
export interface LabTestResult {
|
|
22
29
|
status: string;
|
|
23
30
|
TestName: string;
|
|
24
|
-
|
|
31
|
+
value: string;
|
|
32
|
+
unit: string;
|
|
25
33
|
referenceRange: string;
|
|
26
34
|
reportedOn: string;
|
|
27
35
|
actions: string;
|
|
28
36
|
interpretation?: string;
|
|
37
|
+
attachment?: Attachment;
|
|
29
38
|
}
|
|
30
39
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/models.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,IAAI,WAAW;IACf,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/models.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,IAAI,WAAW;IACf,OAAO,YAAY;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,0BAA0B,EAAE,CAAC;CAC9C;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Bundle, ServiceRequest, DiagnosticReport, Observation } from 'fhir/r4';
|
|
2
|
-
import { FormattedLabInvestigations, LabInvestigationPriority, LabInvestigationsByDate, LabTestResult } from './models';
|
|
2
|
+
import { FormattedLabInvestigations, LabInvestigationPriority, LabInvestigationsByDate, LabTestResult, Attachment } from './models';
|
|
3
|
+
export declare enum REFERENCE_RANGE_CODE {
|
|
4
|
+
NORMAL = "normal"
|
|
5
|
+
}
|
|
3
6
|
export declare function filterLabInvestigationEntries(labInvestigationBundle: Bundle<ServiceRequest>): ServiceRequest[];
|
|
4
7
|
/**
|
|
5
8
|
* Maps a FHIR priority code to LabInvestigationPriority enum
|
|
@@ -12,22 +15,29 @@ export declare function groupLabInvestigationsByDate(labTests: FormattedLabInves
|
|
|
12
15
|
* Sorts tests within each date group to show urgent tests first
|
|
13
16
|
*/
|
|
14
17
|
export declare function sortLabInvestigationsByPriority(labTestsByDate: LabInvestigationsByDate[]): LabInvestigationsByDate[];
|
|
15
|
-
export declare function getProcessedTestIds(diagnosticReports: DiagnosticReport[] | undefined): string[];
|
|
16
18
|
/**
|
|
17
|
-
*
|
|
19
|
+
* Enriches lab investigation tests with diagnostic report information (reportId and attachments)
|
|
20
|
+
* @param tests - Array of formatted lab tests
|
|
21
|
+
* @param diagnosticReports - Array of diagnostic reports
|
|
22
|
+
* @returns Enriched array of tests with reportId and attachments populated
|
|
18
23
|
*/
|
|
19
|
-
export declare function
|
|
24
|
+
export declare function updateInvestigationsWithReportInfo(tests: FormattedLabInvestigations[], diagnosticReports: DiagnosticReport[] | undefined): FormattedLabInvestigations[];
|
|
20
25
|
export declare function extractDiagnosticReportsFromBundle(bundle: Bundle<DiagnosticReport> | undefined): DiagnosticReport[];
|
|
21
26
|
export declare function extractObservationsFromBundle(bundle: Bundle | undefined): Observation[];
|
|
27
|
+
/**
|
|
28
|
+
* Extracts attachments from DiagnosticReport's presentedForm array
|
|
29
|
+
* @param diagnosticReport - The diagnostic report resource
|
|
30
|
+
* @returns Array of attachments or undefined if none exist
|
|
31
|
+
*/
|
|
32
|
+
export declare function extractAttachmentsFromDiagnosticReport(diagnosticReport: DiagnosticReport | undefined): Attachment[] | undefined;
|
|
22
33
|
export declare function formatObservationsAsLabTestResults(observations: Observation[], t: (key: string) => string): LabTestResult[];
|
|
23
|
-
export declare function mapDiagnosticReportBundlesToTestResults(bundles: (Bundle | undefined)[], t: (key: string) => string): Map<string, LabTestResult[]>;
|
|
24
34
|
/**
|
|
25
35
|
* Maps a single diagnostic report bundle to test results
|
|
26
36
|
* @param bundle - DiagnosticReport bundle with observations
|
|
27
37
|
* @param t - Translation function
|
|
28
38
|
* @returns Array of LabTestResult or undefined if no valid results
|
|
29
39
|
*/
|
|
30
|
-
export declare function
|
|
40
|
+
export declare function mapDiagnosticReportBundleToTestResults(bundle: Bundle | undefined, t: (key: string) => string): LabTestResult[] | undefined;
|
|
31
41
|
/**
|
|
32
42
|
* Updates tests with results from diagnostic report bundles
|
|
33
43
|
* @param tests - Array of formatted lab tests
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAChF,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,UAAU,EACX,MAAM,UAAU,CAAC;AAElB,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;CAClB;AAED,wBAAgB,6BAA6B,CAC3C,sBAAsB,EAAE,MAAM,CAAC,cAAc,CAAC,GAC7C,cAAc,EAAE,CA6BlB;AAED;;IAEI;AACJ,eAAO,MAAM,2BAA2B,GACtC,SAAS,cAAc,KACtB,wBASF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,SAAS,cAAc,KAAG,MAcpE,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,cAAc,EAAE,EACnC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,0BAA0B,EAAE,CA2B9B;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,0BAA0B,EAA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