Skip to content

Commit

Permalink
UI Navigation page -> MWL tab : SOPClassesInStudy sent as query filte…
Browse files Browse the repository at this point in the history
…r in MWL requests #2456
  • Loading branch information
shral committed Apr 2, 2020
1 parent ba36ee8 commit f3f3eea
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dcm4chee-arc-ui2/src/app/study/study/study.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class StudyComponent implements OnInit, OnDestroy, AfterContentChecked{
this.route.params.subscribe(params => {
this.patients = [];
this.internal = !this.internal;
console.log("this.selectedElements",this.selectedElements);
this.service.clearFilterObject(params.tab, this.filter);
this.studyConfig.tab = undefined;
setTimeout(()=>{
this.internal = !this.internal;
Expand Down
60 changes: 58 additions & 2 deletions dcm4chee-arc-ui2/src/app/study/study/study.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
DicomLevel,
DicomMode,
DicomResponseType, DiffAttributeSet,
FilterSchema,
SelectDropdown, SelectedDetailObject, SelectionAction,
FilterSchema, FilterSchemaElement,
SelectDropdown, SelectedDetailObject, SelectionAction, StudyFilterConfig,
UniqueSelectIdObject
} from "../../interfaces";
import {Globalvar} from "../../constants/globalvar";
Expand Down Expand Up @@ -236,6 +236,62 @@ export class StudyService {
return dropdown;
};

clearFilterObject(tab: DicomMode, filterObject:StudyFilterConfig){
const keys = this.getFilterKeysFromTab(tab);
Object.keys(filterObject.filterModel).forEach(filterKey=>{
if(keys.indexOf(filterKey) === -1){
delete filterObject.filterModel[filterKey];
}
});
}

getFilterKeysFromTab(tab:DicomMode){
if(tab){
return (()=>{
switch (tab) {
case "patient":
return [
...Globalvar.PATIENT_FILTER_SCHEMA([], false),
...Globalvar.PATIENT_FILTER_SCHEMA([], true)
].filter(filter => {
return filter.filterKey != "aet";
});
break;
case "mwl":
return [
...Globalvar.MWL_FILTER_SCHEMA(false),
...Globalvar.MWL_FILTER_SCHEMA(true)
];
break;
case "uwl":
return [
...Globalvar.UWL_FILTER_SCHEMA(false),
...Globalvar.UWL_FILTER_SCHEMA(true)
];
break;
case "diff":
return [
...Globalvar.DIFF_FILTER_SCHEMA([],[],false),
...Globalvar.DIFF_FILTER_SCHEMA([],[],true)
].filter(filter => {
return filter.filterKey != "aet";
});
break;
default:
return [
...Globalvar.STUDY_FILTER_SCHEMA([],false),
...Globalvar.STUDY_FILTER_SCHEMA([],true)
].filter(filter => {
return filter.filterKey != "aet";
});
}
})().map((filterSchemaElement:FilterSchemaElement)=>{
return filterSchemaElement.filterKey;
})
}
return [];
}

getFilterSchema(tab: DicomMode, aets: Aet[], quantityText: { count: string, size: string }, filterMode: ('main' | 'expand'), webApps?: DcmWebApp[], attributeSet?:SelectDropdown<DiffAttributeSet>[],showCount?:boolean) {
let schema: FilterSchema;
let lineLength: number = 3;
Expand Down

0 comments on commit f3f3eea

Please sign in to comment.