Skip to content

Commit e9be988

Browse files
Merge branch 'dev' into users/mtherien/LEGLINK-294-bad-response
2 parents 54aec24 + 2b33689 commit e9be988

15 files changed

Lines changed: 265 additions & 33 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ jobs:
170170
shell: bash
171171
run: |
172172
set -o pipefail
173+
export ADHOC_REPORT_TEST_DOWNLOAD_PATH=adhoc-report
173174
mkdir -p ./Tests/BackendE2ETests/TestResults
174175
mkdir -p ./test-logs
175176
@@ -262,7 +263,7 @@ jobs:
262263
uses: actions/upload-artifact@v4
263264
with:
264265
name: adhoc-report-submission-zip
265-
path: ./Tests/BackendE2ETests/TestResults/adhoc-report-test-submission.zip
266+
path: ./Tests/BackendE2ETests/bin/**/adhoc-report-test-submission.zip
266267
if-no-files-found: ignore
267268

268269
- name: Tear down services

Web/Admin.UI/angular.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
"builder": "@angular/build:karma",
9696
"options": {
9797
"main": "src/test.ts",
98-
"polyfills": "src/polyfills.ts",
98+
"polyfills": [
99+
"src/polyfills.ts"
100+
],
99101
"tsConfig": "tsconfig.spec.json",
100102
"karmaConfig": "karma.conf.js",
101103
"assets": [
@@ -104,8 +106,14 @@
104106
],
105107
"styles": [
106108
"@angular/material/prebuilt-themes/indigo-pink.css",
107-
"src/styles.css"
109+
"src/styles.scss"
108110
],
111+
"stylePreprocessorOptions": {
112+
"includePaths": [
113+
"src",
114+
"src/styles"
115+
]
116+
},
109117
"scripts": []
110118
}
111119
}

Web/Admin.UI/src/app/components/core/donut-chart/donut-chart.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ export class DonutChartComponent implements AfterViewInit, OnChanges, OnDestroy
2222

2323
@Input() data: Record<string, number> = {};
2424
@Input() enableSelection: boolean = false;
25+
/** Optional label → color (hex/CSS) map. Labels not present fall back to the default palette. */
26+
@Input() colorMap?: Record<string, string>;
2527
@Output() sliceSelected = new EventEmitter<string>();
2628
@ViewChild('container', { static: true }) container!: ElementRef;
2729
@ViewChild('chart', { static: true }) chart!: ElementRef<SVGSVGElement>;
@@ -61,7 +63,8 @@ export class DonutChartComponent implements AfterViewInit, OnChanges, OnDestroy
6163
.attr('transform', `translate(${width / 2}, ${height / 2})`);
6264

6365
const dataEntries = Object.entries(this.data);
64-
const color = d3.scaleOrdinal(d3.schemeTableau10);
66+
const fallbackColor = d3.scaleOrdinal(d3.schemeTableau10);
67+
const color = (label: string): string => this.colorMap?.[label] ?? fallbackColor(label);
6568

6669
const pie = d3.pie<any>().value(d => d[1]);
6770
const arc = d3.arc<d3.PieArcDatum<[string, number]>>()

Web/Admin.UI/src/app/components/data-acquisition/query-plan-config/query-plan-config.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { QueryPlanConfigComponent } from './query-plan-config.component';
3+
import { QueryPlanConfigFormComponent } from './query-plan-config.component';
44

5-
describe('QueryPlanConfigComponent', () => {
6-
let component: QueryPlanConfigComponent;
7-
let fixture: ComponentFixture<QueryPlanConfigComponent>;
5+
describe('QueryPlanConfigFormComponent', () => {
6+
let component: QueryPlanConfigFormComponent;
7+
let fixture: ComponentFixture<QueryPlanConfigFormComponent>;
88

99
beforeEach(async () => {
1010
await TestBed.configureTestingModule({
11-
imports: [QueryPlanConfigComponent]
11+
imports: [QueryPlanConfigFormComponent]
1212
})
1313
.compileComponents();
1414

15-
fixture = TestBed.createComponent(QueryPlanConfigComponent);
15+
fixture = TestBed.createComponent(QueryPlanConfigFormComponent);
1616
component = fixture.componentInstance;
1717
fixture.detectChanges();
1818
});

Web/Admin.UI/src/app/components/query-dispatch/query-dispatch-config-dialog/query-dispatch-config-dialog.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { QueryConfigDialogComponent } from './query-dispatch-config-dialog.component';
3+
import { QueryDispatchConfigDialogComponent } from './query-dispatch-config-dialog.component';
44

55
describe('CensusConfigDialogComponent', () => {
6-
let component: QueryConfigDialogComponent;
7-
let fixture: ComponentFixture<QueryConfigDialogComponent>;
6+
let component: QueryDispatchConfigDialogComponent;
7+
let fixture: ComponentFixture<QueryDispatchConfigDialogComponent>;
88

99
beforeEach(async () => {
1010
await TestBed.configureTestingModule({
11-
imports: [ QueryConfigDialogComponent ]
11+
imports: [ QueryDispatchConfigDialogComponent ]
1212
})
1313
.compileComponents();
1414

15-
fixture = TestBed.createComponent(QueryConfigDialogComponent);
15+
fixture = TestBed.createComponent(QueryDispatchConfigDialogComponent);
1616
component = fixture.componentInstance;
1717
fixture.detectChanges();
1818
});

Web/Admin.UI/src/app/components/query-dispatch/query-dispatch-config-form/query-dispatch-config-form.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { QueryConfigFormComponent } from './query-dispatch-config-form.component';
3+
import { QueryDispatchConfigFormComponent } from './query-dispatch-config-form.component';
44

55
describe('CensusConfigFormComponent', () => {
6-
let component: QueryConfigFormComponent;
7-
let fixture: ComponentFixture<QueryConfigFormComponent>;
6+
let component: QueryDispatchConfigFormComponent;
7+
let fixture: ComponentFixture<QueryDispatchConfigFormComponent>;
88

99
beforeEach(async () => {
1010
await TestBed.configureTestingModule({
11-
imports: [ QueryConfigFormComponent ]
11+
imports: [ QueryDispatchConfigFormComponent ]
1212
})
1313
.compileComponents();
1414

15-
fixture = TestBed.createComponent(QueryConfigFormComponent);
15+
fixture = TestBed.createComponent(QueryDispatchConfigFormComponent);
1616
component = fixture.componentInstance;
1717
fixture.detectChanges();
1818
});

Web/Admin.UI/src/app/components/tenant/acquisition-log/acquisition-log-view/acquisition-log-view.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class AcquisitionLogViewComponent implements OnInit {
148148
selectedPriorityFilter: string = 'Any';
149149
queryPhaseFilterOptions: string[] = [ "Initial", "Supplemental", "Referential", "Polling", "Monitoring" ];
150150
selectedQueryPhaseFilter: string = 'Any';
151-
queryTypeFilterOptions: string[] = [ "Read", "Search", "BulkDataRequest", "BulkDataPoll" ];
151+
queryTypeFilterOptions: string[] = [ "Read", "Search", "SearchPost", "BulkDataRequest", "BulkDataPoll" ];
152152
selectedQueryTypeFilter: string = 'Any';
153153
statusFilterOptions: string[] = [ "Pending", "Ready", "Processing", "Completed", "Failed", "Cancelled", "MaxRetriesReached", "ConfigurationMissing", "Skipped", "Queued"];
154154
selectedStatusFilter: string[] = [];

Web/Admin.UI/src/app/components/tenant/facility-view/view-report/view-report.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,19 @@
112112
</div>
113113
<div class="report-chart-row">
114114
<div class="report-chart-cell">
115-
<app-donut-chart [data]="measureIpCountsData"></app-donut-chart>
115+
<app-donut-chart [data]="measureIpCountsData" [colorMap]="measureIpColors"></app-donut-chart>
116116
</div>
117117
<div class="report-chart-cell">
118118
<app-donut-chart
119119
[data]="reportStatusData"
120+
[colorMap]="reportStatusColors"
120121
[enableSelection]="true"
121122
(sliceSelected)="onReportStatusSliceSelected($event)"></app-donut-chart>
122123
</div>
123124
<div class="report-chart-cell">
124125
<app-donut-chart
125126
[data]="submissionStatusData"
127+
[colorMap]="submissionStatusColors"
126128
[enableSelection]="true"
127129
(sliceSelected)="onSubmissionStatusSliceSelected($event)"></app-donut-chart>
128130
</div>

Web/Admin.UI/src/app/components/tenant/facility-view/view-report/view-report.component.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
faXmark
3535
} from '@fortawesome/free-solid-svg-icons';
3636
import {LoadingService} from 'src/app/services/loading.service';
37+
import {ChartColorService} from 'src/app/services/chart-color.service';
3738
import {DonutChartComponent} from 'src/app/components/core/donut-chart/donut-chart.component';
3839
import {ViewReportTableCommandComponent} from './table-command/view-report-table-command.component';
3940
import {AcquisitionLogService} from '../../acquisition-log/acquisition-log.service';
@@ -99,9 +100,30 @@ export class ViewReportComponent implements OnInit {
99100
// Add summary data for donut charts
100101
reportEntrySummary: IReportEntrySummary | undefined;
101102
measureIpCountsData: Record<string, number> = {};
103+
// Stable colors per report type, persisted across refreshes via ChartColorService.
104+
measureIpColors: Record<string, string> = {};
102105
reportStatusData: Record<string, number> = {};
103106
submissionStatusData: Record<string, number> = {};
104107

108+
// Fixed donut-chart colors keyed by the labels produced by
109+
// getReportingStatusText / getSubmissionStatusText. Labels not listed
110+
// fall back to the chart's default palette.
111+
reportStatusColors: Record<string, string> = {
112+
'Patient Identified': '#1f77b4', // blue - in pipeline
113+
'Pending Validation': '#ff9800', // amber - in progress
114+
'Passed Validation': '#2ca02c', // green - good
115+
'Failed Validation': '#d62728', // red - bad
116+
'Not Reportable': '#9e9e9e', // grey - neutral
117+
};
118+
submissionStatusColors: Record<string, string> = {
119+
'Pending Validation': '#ff9800', // amber - in progress
120+
'Submitting': '#1f77b4', // blue - in progress
121+
'Submitted': '#2ca02c', // green - good
122+
'Failed Submission': '#d62728', // red - bad
123+
'Not Eligible': '#9e9e9e', // grey - neutral
124+
'Pending': '#bdbdbd', // light grey - neutral
125+
};
126+
105127
defaultPageNumber: number = 0
106128
defaultPageSize: number = 10;
107129
sortBy: string | null = null;
@@ -142,7 +164,8 @@ export class ViewReportComponent implements OnInit {
142164
private facilityViewService: FacilityViewService,
143165
private acquisitionLogService: AcquisitionLogService,
144166
private loadingService: LoadingService,
145-
private reportService: ReportService) { }
167+
private reportService: ReportService,
168+
private chartColorService: ChartColorService) { }
146169

147170
ngOnInit(): void {
148171
const savedPageSize = localStorage.getItem(this.PAGE_SIZE_KEY);
@@ -235,6 +258,10 @@ export class ViewReportComponent implements OnInit {
235258
next: (data) => {
236259
this.reportEntrySummary = data;
237260
this.measureIpCountsData = data.reportTypeCounts;
261+
this.measureIpColors = this.chartColorService.getColorMap(
262+
'measure-report-type',
263+
Object.keys(data.reportTypeCounts)
264+
);
238265
this.reportStatusData = Object.entries(data.reportingStatusCounts).reduce((acc, [statusKey, count]) => {
239266
const statusValue = this.toReportingStatus(statusKey);
240267
const label = statusValue !== null ? this.getReportingStatusText(statusValue) : statusKey;

Web/Admin.UI/src/app/components/testing/patient-listacquired-form/patient-listacquired-form.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { PatientListacquiredFormComponent } from './patient-listacquired-form.component';
3+
import { PatientListAcquiredComponent } from './patient-listacquired-form.component';
44

5-
describe('PatientListacquiredFormComponent', () => {
6-
let component: PatientListacquiredFormComponent;
7-
let fixture: ComponentFixture<PatientListacquiredFormComponent>;
5+
describe('PatientListAcquiredComponent', () => {
6+
let component: PatientListAcquiredComponent;
7+
let fixture: ComponentFixture<PatientListAcquiredComponent>;
88

99
beforeEach(async () => {
1010
await TestBed.configureTestingModule({
11-
imports: [PatientListacquiredFormComponent]
11+
imports: [PatientListAcquiredComponent]
1212
})
1313
.compileComponents();
1414

15-
fixture = TestBed.createComponent(PatientListacquiredFormComponent);
15+
fixture = TestBed.createComponent(PatientListAcquiredComponent);
1616
component = fixture.componentInstance;
1717
fixture.detectChanges();
1818
});

0 commit comments

Comments
 (0)