コード例 #1
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                // Publication steps cannot be cancelled after starting
                if (step.Is <PublicationStep>() && step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                // cannot cancel an unclaimed interpretation step
                if (step.Is <InterpretationStep>() && step.AssignedStaff == null)
                {
                    return(false);
                }

                // cannot cancel once transcription has begun
                if (step.Is <TranscriptionStep>() && step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                // cannot cancel a step that is already completed or cancelled
                if (step.IsTerminated)
                {
                    return(false);
                }

                return(true);
            }
コード例 #2
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                if (!step.Is <InterpretationStep>() && !step.Is <TranscriptionReviewStep>())
                {
                    return(false);
                }

                // interpretation steps must be in progress
                if (step.Is <InterpretationStep>() && step.State != ActivityStatus.IP)
                {
                    return(false);
                }

                // transcription review step must not be terminated
                if (step.Is <TranscriptionReviewStep>() && step.IsTerminated)
                {
                    return(false);
                }

                // must not be assigned to someone else
                if (!Equals(step.AssignedStaff, executingStaff))
                {
                    return(false);
                }

                return(true);
            }
コード例 #3
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                if (!step.Is <VerificationStep>())
                {
                    return(false);
                }

                // must not be already completed or cancelled
                if (step.IsTerminated)
                {
                    return(false);
                }

                if (step.AssignedStaff != null && !Equals(executingStaff, step.AssignedStaff))
                {
                    return(false);
                }

                if (step.ReportPart.Supervisor != null && !Equals(executingStaff, step.ReportPart.Supervisor))
                {
                    return(false);
                }

                return(true);
            }
コード例 #4
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                if (!step.Is <VerificationStep>())
                {
                    return(false);
                }

                // must be scheduled
                if (step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                if (step.AssignedStaff != null && !Equals(executingStaff, step.AssignedStaff))
                {
                    return(false);
                }

                if (step.ReportPart.Supervisor != null && !Equals(executingStaff, step.ReportPart.Supervisor))
                {
                    return(false);
                }

                return(true);
            }
コード例 #5
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                if (!step.Is <PublicationStep>())
                {
                    return(false);
                }

                // must be a scheduled publication step
                if (step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                // can only publish reports verified by the same staff
                if (!Equals(step.ReportPart.Verifier, executingStaff))
                {
                    return(false);
                }

                return(true);
            }
コード例 #6
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                if (step.Is <VerificationStep>() == false)
                {
                    return(false);
                }

                // must be scheduled
                if (step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                // cannot revise a report that was read by someone else
                if (!Equals(step.ReportPart.Interpreter, executingStaff))
                {
                    return(false);
                }

                return(true);
            }
コード例 #7
0
            public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
            {
                // must be an interpretation step
                if (step.Is <TranscriptionReviewStep>() == false)
                {
                    return(false);
                }

                // must be scheduled
                if (step.State != ActivityStatus.SC)
                {
                    return(false);
                }

                // must not be assigned to another staff
                if (!Equals(step.AssignedStaff, executingStaff))
                {
                    return(false);
                }

                return(true);
            }
コード例 #8
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				if (!step.Is<VerificationStep>())
					return false;

				// must not be already completed or cancelled
				if (step.IsTerminated)
					return false;

				if (step.AssignedStaff != null && !Equals(executingStaff, step.AssignedStaff))
					return false;

				if (step.ReportPart.Supervisor != null && !Equals(executingStaff, step.ReportPart.Supervisor))
					return false;

				return true;
			}
コード例 #9
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				if (!step.Is<PublicationStep>())
					return false;

				// must be a scheduled publication step
				if (step.State != ActivityStatus.SC)
					return false;

				// can only publish reports verified by the same staff
				if (!Equals(step.ReportPart.Verifier, executingStaff))
					return false;

				return true;
			}
コード例 #10
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				if (!step.Is<VerificationStep>())
					return false;

				// must be scheduled
				if (step.State != ActivityStatus.SC)
					return false;

				if (step.AssignedStaff != null && !Equals(executingStaff, step.AssignedStaff))
					return false;

				if (step.ReportPart.Supervisor != null && !Equals(executingStaff, step.ReportPart.Supervisor))
					return false;

				return true;
			}
コード例 #11
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				if (step.Is<VerificationStep>() == false)
					return false;

				// must be scheduled
				if (step.State != ActivityStatus.SC)
					return false;

				// cannot revise a report that was read by someone else
				if (!Equals(step.ReportPart.Interpreter, executingStaff))
					return false;

				return true;
			}
コード例 #12
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				// Publication steps cannot be cancelled after starting
				if (step.Is<PublicationStep>() && step.State != ActivityStatus.SC)
					return false;

				// cannot cancel an unclaimed interpretation step
				if (step.Is<InterpretationStep>() && step.AssignedStaff == null)
					return false;

				// cannot cancel once transcription has begun
				if (step.Is<TranscriptionStep>() && step.State != ActivityStatus.SC)
					return false;

				// cannot cancel a step that is already completed or cancelled
				if (step.IsTerminated)
					return false;

				return true;
			}
コード例 #13
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				if (!step.Is<InterpretationStep>() && !step.Is<TranscriptionReviewStep>())
					return false;

				// interpretation steps must be in progress
				if (step.Is<InterpretationStep>() && step.State != ActivityStatus.IP)
					return false;

				// transcription review step must not be terminated
				if (step.Is<TranscriptionReviewStep>() && step.IsTerminated)
					return false;

				// must not be assigned to someone else
				if (!Equals(step.AssignedStaff, executingStaff))
					return false;

				return true;
			}
コード例 #14
0
ファイル: Operations.cs プロジェクト: m-berkani/ClearCanvas
			public override bool CanExecute(ReportingProcedureStep step, Staff executingStaff)
			{
				// must be an interpretation step
				if (step.Is<TranscriptionReviewStep>() == false)
					return false;

				// must be scheduled
				if (step.State != ActivityStatus.SC)
					return false;

				// must not be assigned to another staff
				if (!Equals(step.AssignedStaff, executingStaff))
					return false;

				return true;
			}