Example #1
0
        public void SendSeries(IDicomServiceNode remoteAEInfo, IStudyRootData study, string[] seriesInstanceUids, WorkItemPriorityEnum priority)
        {
            EventResult result = EventResult.Success;

            try
            {
                var request = new DicomSendSeriesRequest
                {
                    DestinationServerName     = remoteAEInfo.Name,
                    DestinationServerAETitle  = remoteAEInfo.AETitle,
                    DestinationServerHostname = remoteAEInfo.ScpParameters != null ? remoteAEInfo.ScpParameters.HostName : null,
                    DestinationServerPort     = remoteAEInfo.ScpParameters != null ? remoteAEInfo.ScpParameters.Port : 0,
                    SeriesInstanceUids        = new List <string>(),
                    Priority = priority,
                    Study    = new WorkItemStudy(study),
                    Patient  = new WorkItemPatient(study)
                };

                request.SeriesInstanceUids.AddRange(seriesInstanceUids);
                InsertRequest(request, new DicomSendProgress());
            }
            catch (Exception ex)
            {
                result    = EventResult.MajorFailure;
                Exception = ex;
                throw;
            }
            finally
            {
                var instances = new AuditedInstances();
                instances.AddInstance(study.PatientId, study.PatientsName, study.StudyInstanceUid);

                AuditHelper.LogBeginSendInstances(remoteAEInfo.AETitle, remoteAEInfo.ScpParameters.HostName,
                                                  instances,
                                                  string.IsNullOrEmpty(Request.UserName)
                                                                        ? EventSource.CurrentProcess
                                                                        : EventSource.CurrentUser, result);
            }
        }
Example #2
0
        public void SendSeries(IDicomServiceNode remoteAEInfo, IStudyRootData study, string[] seriesInstanceUids, WorkItemPriorityEnum priority)
        {
            EventResult result = EventResult.Success;
            try
            {
                var request = new DicomSendSeriesRequest
                                  {
                                      DestinationServerName = remoteAEInfo.Name,
                                      SeriesInstanceUids = new List<string>(),
                                      Priority = priority,
                                      Study = new WorkItemStudy(study),
                                      Patient = new WorkItemPatient(study)
                                  };

                request.SeriesInstanceUids.AddRange(seriesInstanceUids);
                InsertRequest(request, new DicomSendProgress());
            }
            catch (Exception ex)
            {
                result = EventResult.MajorFailure;
                Exception = ex;
                throw;
            }
            finally
            {
                var instances = new AuditedInstances();
                instances.AddInstance(study.PatientId, study.PatientsName, study.StudyInstanceUid);

                AuditHelper.LogBeginSendInstances(remoteAEInfo.AETitle, remoteAEInfo.ScpParameters.HostName,
                                                  instances,
                                                  string.IsNullOrEmpty(Request.UserName)
                                                      ? EventSource.CurrentProcess
                                                      : EventSource.CurrentUser, result);
            }
        }