Skip to content

Commit

Permalink
include report information in the header if filtered to report.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ committed Oct 3, 2023
1 parent 74a3fd4 commit 8e39cf6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions frontend/src/app/pages/report-labs/report-labs.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
<ng-container [ngTemplateOutlet]="loading ? isLoadingTemplate : isEmptyReport ? emptyReport : report"></ng-container>

<ng-template #report>

<!-- Report Details -->
<div class="row" *ngIf="reportDisplayModel">
<div class="col-12 mt-3 mb-3">
<h1 class="az-dashboard-title">Report Info</h1>
</div>
<div class="col-12">
<fhir-resource [displayModel]="reportDisplayModel" [showDetails]="true"></fhir-resource>
</div>
</div>



<!-- Observations Title -->
<div class="row mt-5 mb-3">
<div class="col-6">
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/app/pages/report-labs/report-labs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -36,6 +39,7 @@ export class ReportLabsComponent implements OnInit {
reportSourceId: string = ''
reportResourceType: string = ''
reportResourceId: string = ''
reportDisplayModel: FastenDisplayModel = null

//currentPage data
observationGroups: ObservationGroup = {}
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8e39cf6

Please # to comment.