Beispiel #1
0
        void OnPrintJobStatusUpdate(object sender, StatusUpdateEventArgs e)
        {
            var printJob = sender as PrintJob;

            if (printJob != null && printJob.SendNEventReport)
            {
                var reportRequest = new DicomNEventReportRequest(printJob.SOPClassUID, printJob.SOPInstanceUID, e.EventTypeId);
                var ds            = new DicomDataset
                {
                    { DicomTag.ExecutionStatusInfo, e.ExecutionStatusInfo },
                    { DicomTag.FilmSessionLabel, e.FilmSessionLabel },
                    { DicomTag.PrinterName, e.PrinterName }
                };

                reportRequest.Dataset = ds;
                SendRequest(reportRequest);
            }
        }
Beispiel #2
0
        protected virtual void OnStatusUpdate(string info)
        {
            ExecutionStatus     = Status.ToString();
            ExecutionStatusInfo = info;

            if (Status != PrintJobStatus.Failure)
            {
                Log.Info("Print Job {0} Status {1}: {2}", SOPInstanceUID.UID.Split('.').Last(), Status, info);
            }
            else
            {
                Log.Error("Print Job {0} Status {1}: {2}", SOPInstanceUID.UID.Split('.').Last(), Status, info);
            }
            if (StatusUpdate != null)
            {
                var args = new StatusUpdateEventArgs((ushort)Status, info, Session.FilmSessionLabel, PrinterName);
                StatusUpdate(this, args);
            }
        }