private void InitializeModalityProcedureStepInProgress(DvtkData.Dimse.DimseCommand command) { // Generate a new MPPS Instance UID InBuiltDefaultTagValues inbuiltDefaultTagValues = new InBuiltDefaultTagValues(); System.String uidRoot = inbuiltDefaultTagValues.UidRoot; DicomTagValueAutoSetUid tagValueUid = new DicomTagValueAutoSetUid(AffectedEntityEnum.PerformedProcedureStepEntity, Tag.AFFECTED_SOP_INSTANCE_UID, uidRoot, 1); _mppsInstanceUid = tagValueUid.Value; // Create the MPPS In-Progress message _nCreateSetMppsInProgress = new DvtkHighLevelInterface.Dicom.Messages.DicomMessage(command); }
/// <summary> /// Send the Storage Commitment message - use the storage commitment details /// built up during any previous SendModalityImagesStored() operations. /// The N-ACTION-RQ will be sent to the Image Manager. /// /// If the configured ActorOption1 for the DicomPeerToPeerConfiguration from the /// AcquisitionModalityActor to the ImageManagerActor is set to the string /// "DO_STORAGE_COMMITMENT_ON_SINGLE_ASSOCIATION" then the framework expects the /// Image Manager to return the N-EVENT-REPORT details over the same association /// as the N-ACTION details were sent. If the ActorOption1 configuration parameter /// is not set as above then the framework will expect the Image Manger to return /// the N-EVENT-REPORT details over a different association than the one used for the /// N-ACTION details. /// </summary> /// <param name="awaitNEventReport">Boolean indicating whether to wait for the /// N-EVENT-REPORT - either over the same or different association before returning /// to the caller.</param> /// <param name="timeOut">Time (in Seconds) to wait for the N-EVENT-REPORT to be sent /// from the Image Manager - only used if "awaitNEventReport" is set true.</param> /// <returns>Boolean indicating success or failure.</returns> public bool SendStorageCommitment(bool awaitNEventReport, int timeOut) { // Check if we need to wait for the Event Report if (awaitNEventReport == true) { // Subscribe to the event SubscribeStorageCommitmentNEventReportResponseEvent(); } // Generate a new Storage Commitment Transaction UID InBuiltDefaultTagValues inbuiltDefaultTagValues = new InBuiltDefaultTagValues(); System.String uidRoot = inbuiltDefaultTagValues.UidRoot; DicomTagValueAutoSetUid tagValueUid = new DicomTagValueAutoSetUid(AffectedEntityEnum.AnyEntity, Tag.TRANSACTION_UID, uidRoot, 1); _storageCommitTransactionUid = tagValueUid.Value; DvtkHighLevelInterface.Dicom.Messages.DicomMessage nActionStorageCommitment = new DvtkHighLevelInterface.Dicom.Messages.DicomMessage(DvtkData.Dimse.DimseCommand.NACTIONRQ); GenerateTriggers.MakeNActionStorageCommitment(_storageCommitItems, nActionStorageCommitment, _storageCommitTransactionUid, _mppsInstanceUid); // Trigger the N-ACTION-RQ Storage Commitment DicomTrigger trigger = new DicomTrigger(TransactionNameEnum.RAD_10); trigger.AddItem(nActionStorageCommitment, "1.2.840.10008.1.20.1", "1.2.840.10008.1.2"); // RAD-10 - trigger the ImageManager bool result = TriggerActorInstances(ActorTypeEnum.ImageManager, trigger, true); if (result == true) { // Check if we need to wait for the Event Report if (awaitNEventReport == true) { // Wait for the N-Event-Report response // for the given timeout result = WaitStorageCommitmentNEventReportResponse(timeOut); // Unsubscribe to the event UnsubscribeStorageCommitmentNEventReportResponseEvent(); } } return result; }