private ReportingWorklistItemSummary GetWorklistItemSummary(ProtocolProcedureStep reportingProcedureStep) { var worklistItem = new ReportingWorklistItem(); worklistItem.InitializeFromProcedureStep(reportingProcedureStep, WorklistItemField.ProcedureStepCreationTime); return(new ReportingWorkflowAssembler().CreateWorklistItemSummary(worklistItem, this.PersistenceContext)); }
public override bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { // cannot cancel a step that is already completed or cancelled if (step.IsTerminated) { return(false); } // can only cancel scheduled pending and approval steps if (step.State == ActivityStatus.SC && step.Protocol.Status != ProtocolStatus.AA && step.Protocol.Status != ProtocolStatus.PN) { return(false); } // no need to cancel unassigned pending or approval steps if (step.State == ActivityStatus.SC && (step.Protocol.Status == ProtocolStatus.PN || step.Protocol.Status == ProtocolStatus.AA) && step.AssignedStaff == null) { return(false); } return(true); }
public ProtocolProcedureStepDetail CreateProtocolProcedureStepDetail(ProtocolProcedureStep step, IPersistenceContext context) { ProtocolProcedureStepDetail detail = new ProtocolProcedureStepDetail(); detail.ProtocolProcedureStepRef = step.GetRef(); detail.Status = EnumUtils.GetEnumValueInfo(step.State, context); detail.ProtocolRef = step.Protocol.GetRef(); return(detail); }
public override bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { if (step.State != ActivityStatus.SC) { return(false); } if (step.Protocol.Status != ProtocolStatus.AA) { return(false); } if (!Equals(step.Protocol.Author, currentUserStaff)) { return(false); } return(true); }
public override bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { if (step.PerformingStaff != null && !Equals(step.PerformingStaff, currentUserStaff)) { return(false); } if (step.State != ActivityStatus.IP) { return(false); } if (step.Protocol.Status != ProtocolStatus.PN) { return(false); } return(true); }
public override bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { if (step.State != ActivityStatus.SC) { return(false); } if (step.Protocol.Status == ProtocolStatus.AA && Equals(step.Protocol.Author, currentUserStaff)) { return(false); } // If supervisor is specified, it must be this user if (step.Protocol.Status == ProtocolStatus.AA && step.Protocol.Supervisor != null && !Equals(step.Protocol.Supervisor, currentUserStaff)) { return(false); } return(true); }
public override bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { if (step.PerformingStaff != null && !Equals(step.PerformingStaff, currentUserStaff)) { return(false); } if (step.Protocol.Status == ProtocolStatus.PR || step.Protocol.Status == ProtocolStatus.RJ) { return(false); } if (step.Protocol.Status == ProtocolStatus.PN && step.State != ActivityStatus.IP) { return(false); } if (step.Protocol.Status == ProtocolStatus.AA && (step.State != ActivityStatus.SC && step.State != ActivityStatus.IP)) { return(false); } // Cannot approve own submitted items if (step.Protocol.Status == ProtocolStatus.AA && step.Protocol.Supervisor == null && Equals(step.Protocol.Author, currentUserStaff)) { return(false); } // If supervisor is specified, it must be this user if (step.Protocol.Status == ProtocolStatus.AA && step.Protocol.Supervisor != null && !Equals(step.Protocol.Supervisor, currentUserStaff)) { return(false); } return(true); }
public virtual bool CanExecute(ProtocolProcedureStep step, Staff currentUserStaff) { return(false); }