public void DicomStudyDeletedAuditTest() { DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( new DicomAuditSource("testApp", "Site", AuditSourceTypeCodeEnum.ApplicationServerProcessTierInMultiTierSystem), EventIdentificationContentsEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditPersonActiveParticipant("testUser", "test@test", "Test Name")); DicomAttributeCollection collection = new DicomAttributeCollection(); SetupMultiframeXA(collection, 128, 128, 2); helper.AddPatientParticipantObject(new AuditPatientParticipantObject(collection)); helper.AddStorageInstance(new StorageInstance(new DicomMessage(new DicomAttributeCollection(), collection))); string output = helper.Serialize(true); Assert.IsNotEmpty(output); Assert.Ignore("Skipping schema validation due to schema bug #9455"); Exception exception; if (!helper.Verify(out exception)) { throw exception; } }
protected void DeleteButton_Clicked(object sender, ImageClickEventArgs e) { if (Page.IsValid) { try { string reason = ReasonListBox.SelectedItem.Text; if (!String.IsNullOrEmpty(SaveReasonAsName.Text)) { SaveCustomReason(); reason = SaveReasonAsName.Text; } OnDeletingStudies(); StudyController controller = new StudyController(); foreach (DeleteStudyInfo study in DeletingStudies) { try { controller.DeleteStudy(study.StudyKey, reason + "::" + Comment.Text); // Audit log DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( ServerPlatform.AuditSource, EventIdentificationContentsEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditPersonActiveParticipant( SessionManager.Current.Credentials.UserName, null, SessionManager.Current.Credentials.DisplayName)); helper.AddStudyParticipantObject(new AuditStudyParticipantObject( study.StudyInstanceUid, study.AccessionNumber ?? string.Empty)); ServerAuditHelper.LogAuditMessage(helper); } catch (Exception ex) { Platform.Log(LogLevel.Error, ex, "DeleteClicked failed: Unable to delete studies"); throw; } } OnStudiesDeleted(); } finally { Close(); } } else { EnsureDialogVisible(); } }
private void AuditLog(Study affectedStudy) { // Audit log DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( ServerPlatform.AuditSource, EventIdentificationContentsEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditPersonActiveParticipant( SessionManager.Current.Credentials. UserName, null, SessionManager.Current.Credentials. DisplayName)); helper.AddStudyParticipantObject(new AuditStudyParticipantObject( affectedStudy.StudyInstanceUid, affectedStudy.AccessionNumber ?? string.Empty)); ServerPlatform.LogAuditMessage(helper); }
protected virtual void OnStudyDeleted() { // Audit log DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( ServerPlatform.AuditSource, EventIdentificationContentsEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditProcessActiveParticipant(ServerPartition.AeTitle)); helper.AddStudyParticipantObject(new AuditStudyParticipantObject( StorageLocation.StudyInstanceUid, Study == null ? string.Empty : Study.AccessionNumber)); ServerPlatform.LogAuditMessage(helper); IList <IDeleteStudyProcessorExtension> extensions = LoadExtensions(); foreach (IDeleteStudyProcessorExtension ext in extensions) { if (ext.Enabled) { ext.OnStudyDeleted(); } } }
public void DicomStudyDeletedAuditTest() { DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( new DicomAuditSource("testApp", "Site", AuditSourceTypeCodeEnum.ApplicationServerProcessTierInMultiTierSystem), EventIdentificationTypeEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditPersonActiveParticipant("testUser", "test@test", "Test Name")); DicomAttributeCollection collection = new DicomAttributeCollection(); SetupMultiframeXA(collection, 128, 128, 2); helper.AddPatientParticipantObject(new AuditPatientParticipantObject(collection)); helper.AddStorageInstance(new StorageInstance(new DicomMessage(new DicomAttributeCollection(), collection))); string output = helper.Serialize(true); Assert.IsNotEmpty(output); string failure; bool result = helper.Verify(out failure); Assert.IsTrue(result, failure); }
public void DicomStudyDeletedAuditTest() { DicomStudyDeletedAuditHelper helper = new DicomStudyDeletedAuditHelper( new DicomAuditSource("testApp", "Site", AuditSourceTypeCodeEnum.ApplicationServerProcessTierInMultiTierSystem), EventIdentificationContentsEventOutcomeIndicator.Success); helper.AddUserParticipant(new AuditPersonActiveParticipant("testUser", "test@test", "Test Name")); DicomAttributeCollection collection = new DicomAttributeCollection(); SetupMultiframeXA(collection, 128, 128, 2); helper.AddPatientParticipantObject(new AuditPatientParticipantObject(collection)); helper.AddStorageInstance(new StorageInstance(new DicomMessage(new DicomAttributeCollection(), collection))); string output = helper.Serialize(true); Assert.IsNotEmpty(output); Assert.Ignore("Skipping schema validation due to schema bug #9455"); Exception exception; if (!helper.Verify(out exception)) throw exception; }