private void LogHistory() { Platform.Log(LogLevel.Debug, "Logging history record..."); using (IUpdateContext ctx = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { // create the change log based on info stored in the queue entry var changeLog = new ReprocessStudyChangeLog { TimeStamp = Platform.Time, StudyInstanceUid = StorageLocation.StudyInstanceUid, Reason = _queueData.ChangeLog != null ? _queueData.ChangeLog.Reason : "N/A", User = _queueData.ChangeLog != null ? _queueData.ChangeLog.User : "******" }; StudyHistory history = ServerPlatform.CreateStudyHistoryRecord(ctx, StorageLocation, null, StudyHistoryTypeEnum.Reprocessed, null, changeLog); if (history != null) { ctx.Commit(); } } }