static void scu_AfterCMove(object sender, AfterCMoveEventArgs e) { DicomConnection scu = sender as DicomConnection; string msg = string.Format(CMOVE_RESPONSE_RECEIVED, e.MessageId, e.PresentationID, e.AffectedClass, e.Status, e.Remaining, e.Completed, e.Failed, e.Warning); Utils.LogEvent(LogType.Information, MessageDirection.Input, msg, DicomCommandType.CMove, e.Dataset, scu, null); }
private void SendPatientMove(DicomDataSet wrapper, string DestAE) { bool moveFinish = false; try { BeforeCMoveEventArgs e = new BeforeCMoveEventArgs(ActiveScp, wrapper, DicomCommandPriorityType.Medium, string.IsNullOrEmpty(DestAE) ? Association.Calling : DestAE); byte pid = 0; DicomCommandPriorityType priority; pid = Association.FindAbstract(DicomUidType.PatientRootQueryMove); e.MessageId = 1; e.PresentationID = pid; e.AffectedClass = DicomUidType.StudyRootQueryMove; priority = OnBeforeCMove(e); CurrentPid = pid; CurrentMessageId = e.MessageId; LogSendCMoveRequest(pid, e.MessageId, DicomUidType.PatientRootQueryMove, priority, string.IsNullOrEmpty(DestAE) ? Association.Calling : DestAE, wrapper); SendCMoveRequest(pid, e.MessageId, DicomUidType.PatientRootQueryMove, priority, string.IsNullOrEmpty(DestAE) ? Association.Calling : DestAE, wrapper); Wait(); moveFinish = true; } catch (Exception e) { if (IsConnected()) { OnBeforeClose(); Close(); OnAfterClose(); } throw e; } if (moveFinish) { AfterCMoveEventArgs e = new AfterCMoveEventArgs(ActiveScp, parameters.Completed, parameters.Failed, parameters.Warning, parameters.Dataset, parameters.Status); e.PresentationID = parameters.PresentationID; e.MessageId = parameters.MessageID; e.AffectedClass = parameters.AffectedClass; e.Remaining = parameters.Remaining; Release(); OnAfterCMove(e);; } if (IsConnected()) { OnBeforeClose(); Close(); OnAfterClose(); } }
private void find_AfterCMove(object sender, AfterCMoveEventArgs e) { if (((e.Status != DicomCommandStatusType.Success) && (e.Status != DicomCommandStatusType.Pending) && (e.Status != DicomCommandStatusType.Warning))) { throw new Leadtools.Dicom.Scu.Common.ClientCommunicationException("Move operation failed.", e.Status); } }
void _find_AfterCMove(object sender, AfterCMoveEventArgs e) { if ((e.Status != DicomCommandStatusType.Success) && (e.Status != DicomCommandStatusType.Pending) && (e.Status != DicomCommandStatusType.Warning)) { #region LOG { string message = @"MoveObjectsJob Failure: " + e.Status.ToString(); Logger.Global.Log(string.Empty, string.Empty, -1, string.Empty, string.Empty, -1, DicomCommandType.Undefined, DateTime.Now, LogType.Information, MessageDirection.None, message, null, null); } #endregion throw new Exception("Move operation failed: " + e.Status.ToString()); } }