Exemplo n.º 1
0
        /// <summary>
        /// Handle the Mesage Received Event for DICOM N-ACTION-RQ messages.
        /// </summary>
        /// <param name="dicomProtocolMessage">Received DICOM Protocol Message.</param>
        public override void ScpMessageReceivedEventHandler(DicomProtocolMessage dicomProtocolMessage)
        {
            // use the common config option 1 to determine how the storage commitment should be handled
            if (ConfigOption1.Equals("DO_STORAGE_COMMITMENT_ON_SINGLE_ASSOCIATION") == false)
            {
                if (dicomProtocolMessage is DicomMessage)
                {
                    DicomMessage dicomMessage = (DicomMessage)dicomProtocolMessage;

                    // check for the N-ACTION-RQ
                    if (dicomMessage.CommandSet.DimseCommand == DvtkData.Dimse.DimseCommand.NACTIONRQ)
                    {
                        // produce a DICOM trigger for the Storage Commitment SCU - N-EVENT-REPORT-RQ
                        DicomTrigger storageCommitTrigger = GenerateTrigger(dicomMessage);
                        bool         triggerResult        = ParentActor.TriggerActorInstances(ActorName.Type, storageCommitTrigger, false);
                    }
                }
            }

            // call base implementation to generate event, update transaction log and cleanup data warehouse
            base.ScpMessageReceivedEventHandler(dicomProtocolMessage);
        }