private StudyItem ConvertToStudyItem(StudyRootStudyIdentifier study) { string studyLoaderName; ApplicationEntity applicationEntity; ServerPartition partiton = ServerPartitionMonitor.Instance.GetPartition(study.RetrieveAeTitle); if (partiton != null) { studyLoaderName = WebViewerServices.Default.StudyLoaderName; string host = WebViewerServices.Default.ArchiveServerHostname; int port = WebViewerServices.Default.ArchiveServerPort; int headerPort = WebViewerServices.Default.ArchiveServerHeaderPort; int wadoPort = WebViewerServices.Default.ArchiveServerWADOPort; applicationEntity = new ApplicationEntity() { AETitle = study.RetrieveAeTitle, ScpParameters = new ScpParameters(host, port), StreamingParameters = new StreamingParameters(headerPort, wadoPort) }; } else { Device theDevice = FindServer(study.RetrieveAeTitle); if (theDevice != null) { // TODO (Marmot) - Need to get this to work with changes in marmot applicationEntity = new ApplicationEntity() { ScpParameters = new ScpParameters(theDevice.IpAddress, theDevice.Port), AETitle = theDevice.AeTitle }; } else // (node == null) { Platform.Log(LogLevel.Warn, String.Format("Unable to find server information '{0}' in order to load study '{1}'", study.RetrieveAeTitle, study.StudyInstanceUid)); return(null); } } var item = new StudyItem(study, ServiceNodeExtensions.ToServiceNode(applicationEntity)); if (String.IsNullOrEmpty(item.InstanceAvailability)) { item.InstanceAvailability = "ONLINE"; } return(item); }
public static LoadStudyArgs CreateLoadStudyArgs(StudyRootStudyIdentifier identifier) { // TODO: Need to think about this more. What's the best way to swap different loader? // Do we need to support loading studies from multiple servers? string host = WebViewerServices.Default.ArchiveServerHostname; int port = WebViewerServices.Default.ArchiveServerPort; int headerPort = WebViewerServices.Default.ArchiveServerHeaderPort; int wadoPort = WebViewerServices.Default.ArchiveServerWADOPort; var serverAe = new ApplicationEntity { ScpParameters = new ScpParameters(host, port), StreamingParameters = new StreamingParameters(headerPort, wadoPort), AETitle = identifier.RetrieveAeTitle }; // TODO (Marmot) - Need to figure out how this works with the changes for Marmot return(new LoadStudyArgs(identifier.StudyInstanceUid, ServiceNodeExtensions.ToServiceNode(serverAe))); }