private static void AuditLog(Study study, List<UpdateItem> fields)
{
Platform.CheckForNullReference(study, "study");
Platform.CheckForNullReference(fields, "fields");
var helper =
new DicomInstancesAccessedAuditHelper(ServerPlatform.AuditSource,
EventIdentificationContentsEventOutcomeIndicator.Success,
EventIdentificationContentsEventActionCode.U);
helper.AddUser(new AuditPersonActiveParticipant(
SessionManager.Current.Credentials.UserName,
null,
SessionManager.Current.Credentials.DisplayName));
var participant = new AuditStudyParticipantObject(study.StudyInstanceUid, study.AccessionNumber);
string updateDescription = StringUtilities.Combine(
fields, ";",
item => String.Format("Tag=\"{0}\" Value=\"{1}\"", item.DicomTag.Name, item.Value)
);
participant.ParticipantObjectDetailString = updateDescription;
helper.AddStudyParticipantObject(participant);
ServerAuditHelper.LogAuditMessage(helper);
}