示例#1
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.DssOrderFiller:
                // received Image Availability Query [RAD-11] or
                // received Performed Work Status Update [RAD-42]
                break;

            case ActorNameEnum.PerformedProcedureStepManager:
                // received Modality Procedure Step In Progress [RAD-6] or
                // received Modality Procedure Step Completed [RAD-7] or
                // received Creator Procedure Step In Progress [RAD-20] or
                // received Creator Procedure Step Completed [RAD-21]
                break;

            case ActorNameEnum.AcquisitionModality:
                // received Storage Commitment [RAD-10]
                break;

            case ActorNameEnum.EvidenceCreator:
                // received Storage Commitment [RAD-10]
                break;

            case ActorNameEnum.ReportManager:
                // received Image Availability Query [RAD-11]
                break;

            default:
                break;
            }
        }
示例#2
0
        public virtual void AssociationReleasedEventHandler(DicomThread dicomThread)
        {
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionReceived);

            foreach (DicomMessage dicomMessage in dicomThread.DataWarehouse.Messages(dicomThread).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            // publish the transaction event to any interested parties
            PublishEvent(ActorName, transaction);

            // get the next transaction number - needed to sort the
            // transactions correctly
            int transactionNumber = TransactionNumber.GetNextTransactionNumber();

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(transactionNumber,
                                                                        ParentActor.ActorName,
                                                                        ActorName,
                                                                        transaction,
                                                                        dicomThread.ResultsFileName,
                                                                        dicomThread.NrOfErrors,
                                                                        dicomThread.NrOfWarnings);

            ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            dicomThread.DataWarehouse.ClearMessages(dicomThread);
        }
示例#3
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.AcquisitionModality:
            // received Modality Procedure Step In Progress [RAD-6] or
            // received Modality Procedur Step Completed [RAD-7]
            case ActorNameEnum.EvidenceCreator:
            {
                // received Creator Procedure Step In Progress [RAD-20] or
                // received Creator Procedure Step Completed [RAD-21]
                TransactionNameEnum transactionName = dicomTransaction.TransactionName;
                DicomMessage        dicomMessage    = (DicomMessage)dicomTransaction.DicomMessages[0];

                // make a trigger from the transaction message
                DicomTrigger dicomTrigger = new DicomTrigger(transactionName);
                dicomTrigger.Trigger = dicomMessage;

                // trigger the following actors
                TriggerActor(ActorNameEnum.DssOrderFiller, dicomTrigger);
                TriggerActor(ActorNameEnum.ImageManager, dicomTrigger);
                break;
            }

            default:
                break;
            }
        }
示例#4
0
        public void SetComparators(Dvtk.Comparator.BaseComparatorCollection comparatorCollection)
        {
            if (_transaction is DicomTransaction)
            {
                System.String name = System.String.Empty;

                DicomTransaction dicomTransaction = (DicomTransaction)_transaction;
                switch (dicomTransaction.Direction)
                {
                case TransactionDirectionEnum.TransactionReceived:
                    name = System.String.Format("Received by {0} from {1}", ActorNames.Name(_fromActorName), ActorNames.Name(_toActorName));
                    break;

                case TransactionDirectionEnum.TransactionSent:
                    name = System.String.Format("Sent from {0} to {1}", ActorNames.Name(_fromActorName), ActorNames.Name(_toActorName));
                    break;

                default:
                    break;
                }

                for (int i = 0; i < dicomTransaction.DicomMessages.Count; i++)
                {
                    DicomMessage dicomMessage = (DicomMessage)dicomTransaction.DicomMessages[i];

                    DvtkHighLevelInterface.Comparator.Comparator comparator = new DvtkHighLevelInterface.Comparator.Comparator(name);
                    Dvtk.Comparator.DicomComparator dicomComparator         = comparator.InitializeDicomComparator(dicomMessage);
                    if (dicomComparator != null)
                    {
                        comparatorCollection.Add(dicomComparator);
                    }
                }
            }
        }
示例#5
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.PrintComposer:
                // received Print Request with Presentation LUT [RAD-23]
                break;

            default:
                break;
            }
        }
示例#6
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.ImageArchive:
                // received Retrieve Images [RAD-16]
                break;

            default:
                break;
            }
        }
示例#7
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.ImageManager:
                // received Storage Commitment [RAD-10]
                break;

            default:
                break;
            }
        }
示例#8
0
        public void ConsoleDisplay()
        {
            Console.WriteLine("<<- {0} -------------------------------------------------------------->>", _transactionNumber);
            if (_transaction is DicomTransaction)
            {
                DicomTransaction dicomTransaction = (DicomTransaction)_transaction;
                switch (dicomTransaction.Direction)
                {
                case TransactionDirectionEnum.TransactionReceived:
                    Console.WriteLine("DICOM Transaction received by {0}", ActorNames.Name(_fromActorName));
                    Console.WriteLine("from {0}", ActorNames.Name(_toActorName));
                    break;

                case TransactionDirectionEnum.TransactionSent:
                    Console.WriteLine("DICOM Transaction sent from {0}", ActorNames.Name(_fromActorName));
                    Console.WriteLine("to {0}", ActorNames.Name(_toActorName));
                    break;

                default:
                    break;
                }
                Console.WriteLine("{0} errors, {1} warnings", _nrErrors, _nrWarnings);
                for (int i = 0; i < dicomTransaction.DicomMessages.Count; i++)
                {
                    Console.WriteLine("DICOM Message {0}...", i + 1);
                    DicomMessage dicomMessage = (DicomMessage)dicomTransaction.DicomMessages[i];
                    if (dicomMessage.CommandSet != null)
                    {
                        Console.WriteLine("Command Attributes: {0}", dicomMessage.CommandSet.Count);
                    }
                    if (dicomMessage.DataSet != null)
                    {
                        Console.WriteLine("Dataset Attributes: {0}", dicomMessage.DataSet.Count);
                    }
                }
            }
            else
            {
                Hl7Transaction hl7Transaction = (Hl7Transaction)_transaction;
            }
            Console.WriteLine("Results Filename: \"{0}\"", _resultsFilename);

            Console.WriteLine("<<------------------------------------------------------------------>>");
        }
示例#9
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.AcquisitionModality:
                // received Modality Images Stored [RAD-8]
                break;

            case ActorNameEnum.EvidenceCreator:
                // received Creator Images Stored [RAD-18]
                break;

            case ActorNameEnum.ImageDisplay:
                // received Query Images [RAD-14] or
                // received Retrieve Images [RAD-16]
                break;

            default:
                break;
            }
        }
示例#10
0
        public override void AfterProcessTrigger(Object trigger)
        {
            // save the transaction
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionSent);

            foreach (DicomMessage dicomMessage in this.DataWarehouse.Messages(this).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            ActorsTransaction actorsTransaction = new ActorsTransaction(_transactionNumber,
                                                                        _dicomClient.ParentActor.ActorName,
                                                                        _dicomClient.ActorName,
                                                                        transaction,
                                                                        this.ResultsFileName,
                                                                        this.NrOfErrors,
                                                                        this.NrOfWarnings);

            _dicomClient.ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            this.DataWarehouse.ClearMessages(this);
        }
示例#11
0
        public override void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
        {
            switch (actorName)
            {
            case ActorNameEnum.AcquisitionModality:
                // received Query Modality Worklist [RAD-5]
                break;

            case ActorNameEnum.PerformedProcedureStepManager:
                // received Modality Procedure Step In Progress [RAD-6] or
                // received Modality Procedure Step Completed [RAD-7] or
                // received Creator Procedure Step In Progress [RAD-20] or
                // received Creator Procedure Step Completed [RAD-21]
                break;

            case ActorNameEnum.ImageManager:
                // received Instance Availability Notification [RAD-49]
                break;

            default:
                break;
            }
        }
示例#12
0
        public override void AfterProcessTrigger(Object trigger)
        {
            // save the transaction
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionSent);
            foreach (DicomMessage dicomMessage in this.DataWarehouse.Messages(this).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            ActorsTransaction actorsTransaction = new ActorsTransaction(_transactionNumber,
                _dicomClient.ParentActor.ActorName,
                _dicomClient.ActorName,
                transaction,
                this.ResultsFileName,
                this.NrOfErrors,
                this.NrOfWarnings);
            _dicomClient.ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            this.DataWarehouse.ClearMessages(this);
        }
示例#13
0
文件: BaseActor.cs 项目: ewcasas/DVTK
 public virtual void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
 {
 }
示例#14
0
        public virtual void AssociationReleasedEventHandler(DicomThread dicomThread)
        {
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionReceived);

            foreach (DicomMessage dicomMessage in dicomThread.DataWarehouse.Messages(dicomThread).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            // publish the transaction event to any interested parties
            PublishEvent(ActorName, transaction);

            // get the next transaction number - needed to sort the
            // transactions correctly
            int transactionNumber = TransactionNumber.GetNextTransactionNumber();

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(transactionNumber,
                                                                        ParentActor.ActorName,
                                                                        ActorName,
                                                                        transaction,
                                                                        dicomThread.ResultsFileName,
                                                                        dicomThread.NrOfErrors,
                                                                        dicomThread.NrOfWarnings);
            ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            dicomThread.DataWarehouse.ClearMessages(dicomThread);
        }
示例#15
0
 public virtual void HandleTransactionFrom(ActorNameEnum actorName, DicomTransaction dicomTransaction)
 {
 }