Skip to content

Commit

Permalink
UI: Upload DICOM Objects, JPEGs or MPEG2 to any configured STOW-RS se…
Browse files Browse the repository at this point in the history
…rver #1332
  • Loading branch information
shral committed Apr 9, 2018
1 parent d96b1dc commit 8d528a6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions dcm4chee-arc-ui2/src/app/studies/studies.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,10 @@ clipboard.hasPatient = haspatient || (_.size(clipboard.patient) > 0);
}
}
}
getWebApps(){
return this.$http.get('../webapps?dcmWebServiceClass=STOW_RS')
.map(res => j4care.redirectOnAuthResponse(res));
}
isTargetInClipboard(target, clipboard){
let contains = false;
_.forEach(clipboard.otherObjects, (m, i) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h6 *ngIf="subTitle">{{subTitle}}</h6>
</mat-select>
</div>
</div>
<div class="content">
<div class="content" *ngIf="result.exportType === 'nonedicom'">
<p>Batch ID</p>
<input type="text" [(ngModel)]="result.batchID">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<h5>Upload DICOM data</h5>
<div class="content">
<label>Select the ae title:</label>
<mat-select [ngModel]="selectedAe" (ngModelChange)="selectedAe = $event">
<!-- <mat-select [ngModel]="selectedAe" (ngModelChange)="selectedAe = $event">
<mat-option *ngFor="let ae of aes" [value]="ae.dicomAETitle" title="{{ae.dicomDescription}}">{{ ae.dicomAETitle }}</mat-option>
</mat-select>-->
<label>Select the STOW-RS server:</label>
<mat-select [ngModel]="selectedWebApp" (ngModelChange)="selectedWebApp = $event">
<mat-option *ngFor="let webApp of webApps" [value]="webApp" title="{{webApp.dcmWebAppName }}({{webApp.dicomAETitle }},{{webApp.dicomDeviceName}})">{{ webApp.dcmWebAppName }}</mat-option>
</mat-select>
<!--<input type="file" ng2FileSelect [uploader]="vendorUpload" />-->
<label>Chose DICOM Files to upload:</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {UploadDicomService} from './upload-dicom.service';
import * as _ from 'lodash';
import {AppService} from "../../../app.service";
import {J4careHttpService} from "../../../helpers/j4care-http.service";
import {StudiesService} from "../../../studies/studies.service";

@Component({
selector: 'app-upload-dicom',
Expand All @@ -20,6 +21,8 @@ export class UploadDicomComponent implements OnInit{
fileList: File[];
xmlHttpRequest;
percentComplete: any;
webApps;
selectedWebApp;
public vendorUpload: FileUploader = new FileUploader({
url: ``,
// allowedMimeType:['application/octet-stream','application/zip']
Expand All @@ -30,7 +33,8 @@ export class UploadDicomComponent implements OnInit{
public dialogRef: MatDialogRef<UploadDicomComponent>,
private $http:J4careHttpService,
private service: UploadDicomService,
public mainservice:AppService
public mainservice:AppService,
private studieService:StudiesService
) {
this.service.progress$.subscribe(
data => {
Expand All @@ -52,6 +56,7 @@ export class UploadDicomComponent implements OnInit{
this.vendorUpload.onBeforeUploadItem = (item) => {
this.addFileNameHeader(item.file.name);
};
this.getWebApps();
}
addFileNameHeader(fileName) {
// var boundary=Math.random().toString().substr(2);
Expand Down Expand Up @@ -187,4 +192,15 @@ export class UploadDicomComponent implements OnInit{
set aes(value) {
this._aes = value;
}
getWebApps(){
this.studieService.getWebApps().subscribe((res)=>{
this.webApps = res;
this.webApps.forEach(webApp=>{
if(webApp.dicomAETitle === this._selectedAe)
this.selectedWebApp = webApp;
});
},(err)=>{

});
}
}

0 comments on commit 8d528a6

Please sign in to comment.