Hi all member
i have tried import the image from my Disk to Workstation by source code(using copy of Method: ClearCanvas.ImageViewer.Services.Tools.DicomFileImportTool.Import() ). the Images are moved to the FileStore location but the Local datastore don't exists that Imported study. so that when i do search on Mystudies, that study not show, is there Any thing wrong.
My Code:
void Import Image()
{
List filenames = LoadFilesName(ImagePath);
Import(filenames);
}
public void Import(List pathList)
{
List filePaths = new List();
foreach (string path in pathList)
{
filePaths.Add(path);
}
FileImportRequest request = new FileImportRequest();
request.FilePaths = filePaths;
request.BadFileBehaviour = BadFileBehaviour.Ignore;
request.Recursive = true;
request.FileImportBehaviour = FileImportBehaviour.Move;
LocalDataStoreServiceClient client = new LocalDataStoreServiceClient();
try
{
client.Open();
client.Import(request);
client.Close();
AuditHelper.LogImportStudies(new AuditedInstances(), EventSource.CurrentUser, EventResult.Success);
}
catch (EndpointNotFoundException)
{
client.Abort();
//this.Context.DesktopWindow.ShowMessageBox(SR.MessageImportLocalDataStoreServiceNotRunning, MessageBoxActions.Ok);
}
catch (Exception e)
{
client.Abort();
//ExceptionHandler.Report(e, SR.MessageFailedToImportSelection, this.Context.DesktopWindow);
}
}
Please help
How can i call Auto-Import a specific Local Directory Images to Workstation....