private static void EnqueueWorkItem(ReportPart reportPart, ExtensionInfo publicationAction) { var workQueueItem = new WorkQueueItem("Publication Action"); workQueueItem.ExtendedProperties.Add("ReportPartRef", reportPart.GetRef().Serialize()); workQueueItem.ExtendedProperties.Add("ActionType", publicationAction.ExtensionClass.FullName); PersistenceScope.CurrentContext.Lock(workQueueItem, DirtyState.New); }
public ReportPartDetail CreateReportPartDetail(ReportPart reportPart, IPersistenceContext context) { StaffAssembler staffAssembler = new StaffAssembler(); ReportPartDetail summary = new ReportPartDetail( reportPart.GetRef(), reportPart.Index, reportPart.Index > 0, EnumUtils.GetEnumValueInfo(reportPart.Status, context), reportPart.CreationTime, reportPart.PreliminaryTime, reportPart.CompletedTime, reportPart.CancelledTime, reportPart.Supervisor == null ? null : staffAssembler.CreateStaffSummary(reportPart.Supervisor, context), reportPart.Interpreter == null ? null : staffAssembler.CreateStaffSummary(reportPart.Interpreter, context), reportPart.Transcriber == null ? null : staffAssembler.CreateStaffSummary(reportPart.Transcriber, context), reportPart.TranscriptionSupervisor == null ? null : staffAssembler.CreateStaffSummary(reportPart.TranscriptionSupervisor, context), reportPart.Verifier == null ? null : staffAssembler.CreateStaffSummary(reportPart.Verifier, context), EnumUtils.GetEnumValueInfo(reportPart.TranscriptionRejectReason), ExtendedPropertyUtils.Copy(reportPart.ExtendedProperties)); return(summary); }
private static void EnqueueWorkItem(ReportPart reportPart, ExtensionInfo publicationAction) { var actionType = publicationAction.ExtensionClass.FullName; var action = (IPublicationAction) new PublicationActionExtensionPoint().CreateExtension(new ClassNameExtensionFilter(actionType)); if (!action.Enabled) { return; } var workQueueItem = new WorkQueueItem("Publication Action"); workQueueItem.ExtendedProperties.Add("ReportPartRef", reportPart.GetRef().Serialize()); workQueueItem.ExtendedProperties.Add("ActionType", actionType); var procedure = reportPart.Report.Procedures.First(); workQueueItem.ExtendedProperties.Add("ProcedureType", procedure.Type.Name); workQueueItem.ExtendedProperties.Add("AccessionNumber", procedure.Order.AccessionNumber); workQueueItem.ExtendedProperties.Add("StudyInstanceUID", procedure.StudyInstanceUID); PersistenceScope.CurrentContext.Lock(workQueueItem, DirtyState.New); }