From 8e39cf60a797565218d1ba4c5b5537eb4257eaca Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Tue, 3 Oct 2023 13:05:48 -0700 Subject: [PATCH] include report information in the header if filtered to report. --- .../pages/report-labs/report-labs.component.html | 13 +++++++++++++ .../app/pages/report-labs/report-labs.component.ts | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/frontend/src/app/pages/report-labs/report-labs.component.html b/frontend/src/app/pages/report-labs/report-labs.component.html index f9df16a3a..1b674b490 100644 --- a/frontend/src/app/pages/report-labs/report-labs.component.html +++ b/frontend/src/app/pages/report-labs/report-labs.component.html @@ -8,6 +8,19 @@ + + +
+
+

Report Info

+
+
+ +
+
+ + +
diff --git a/frontend/src/app/pages/report-labs/report-labs.component.ts b/frontend/src/app/pages/report-labs/report-labs.component.ts index 6b27b74ef..1e307ad82 100644 --- a/frontend/src/app/pages/report-labs/report-labs.component.ts +++ b/frontend/src/app/pages/report-labs/report-labs.component.ts @@ -7,6 +7,9 @@ import {forkJoin, Observable} from 'rxjs'; import {flatMap, map, mergeMap} from 'rxjs/operators'; import {ResponseWrapper} from '../../models/response-wrapper'; import {ActivatedRoute, Params} from '@angular/router'; +import {FastenDisplayModel} from '../../../lib/models/fasten/fasten-display-model'; +import {fhirModelFactory} from '../../../lib/models/factory'; +import {ResourceType} from '../../../lib/models/constants'; class ObservationGroup {[key: string]: ResourceFhir[]} class ObservationGroupInfo { @@ -36,6 +39,7 @@ export class ReportLabsComponent implements OnInit { reportSourceId: string = '' reportResourceType: string = '' reportResourceId: string = '' + reportDisplayModel: FastenDisplayModel = null //currentPage data observationGroups: ObservationGroup = {} @@ -113,6 +117,8 @@ export class ReportLabsComponent implements OnInit { mergeMap((diagnosticReports) => { let diagnosticReport = diagnosticReports?.[0] console.log("diagnosticReport", diagnosticReport) + this.reportDisplayModel = fhirModelFactory(diagnosticReport.source_resource_type as ResourceType, diagnosticReport) + //get a list of all the observations associated with this report let observationIds = fhirpath.evaluate(diagnosticReport.resource_raw, "DiagnosticReport.result.reference")