Ejemplo n.º 1
0
        protected override ProcedureStep CreateScheduledCopy()
        {
            ProtocolResolutionStep newStep = new ProtocolResolutionStep(this.Protocol);

            this.Procedure.AddProcedureStep(newStep);
            return(newStep);
        }
        public void Test_Name()
        {
            Protocol protocol = new Protocol(new Procedure());
            ProtocolResolutionStep procedureStep = new ProtocolResolutionStep(protocol);

            Assert.AreEqual("Protocol Resolution", procedureStep.Name);
        }
Ejemplo n.º 3
0
        public void Test_Name()
        {
            Protocol protocol = new Protocol(new Procedure());
            ProtocolResolutionStep procedureStep = new ProtocolResolutionStep(protocol);

            Assert.AreEqual("Protocol Resolution", procedureStep.Name);
        }
        public void Test_ShouldCancel()
        {
            Protocol protocol = new Protocol(new Procedure());
            ProtocolResolutionStep procedureStep = new ProtocolResolutionStep(protocol);
            procedureStep.Protocol.Reject(
                new ProtocolRejectReasonEnum(Convert.ToString(ProtocolRejectReasonEnum.DescriptionLength), "GRJ", "Generic Rejection"));

            Assert.IsTrue(procedureStep.ShouldCancel);
        }
Ejemplo n.º 5
0
        public void Test_ShouldCancel()
        {
            Protocol protocol = new Protocol(new Procedure());
            ProtocolResolutionStep procedureStep = new ProtocolResolutionStep(protocol);

            procedureStep.Protocol.Reject(
                new ProtocolRejectReasonEnum(Convert.ToString(ProtocolRejectReasonEnum.DescriptionLength), "GRJ", "Generic Rejection"));

            Assert.IsTrue(procedureStep.ShouldCancel);
        }
Ejemplo n.º 6
0
            public void Execute(ProtocolAssignmentStep assignmentStep, Staff rejectedBy, ProtocolRejectReasonEnum reason)
            {
                if (assignmentStep.State == ActivityStatus.SC)
                {
                    assignmentStep.Start(rejectedBy);
                }
                assignmentStep.Discontinue();
                assignmentStep.Protocol.Reject(reason);

                // TODO: one resolution step or one per procedure?
                ProtocolResolutionStep resolutionStep = new ProtocolResolutionStep(assignmentStep.Protocol);

                assignmentStep.Procedure.AddProcedureStep(resolutionStep);
            }
Ejemplo n.º 7
0
            public void Execute(Order order, Staff resolvingStaff)
            {
                foreach (Procedure rp in order.Procedures)
                {
                    ProtocolResolutionStep resolutionStep = ScheduledProcedureStep <ProtocolResolutionStep>(rp);

                    if (resolutionStep != null)
                    {
                        resolutionStep.Complete(resolvingStaff);
                        resolutionStep.Protocol.Resolve();
                        ProtocolAssignmentStep assignmentStep = new ProtocolAssignmentStep(resolutionStep.Protocol);
                        rp.AddProcedureStep(assignmentStep);
                    }
                }
            }
Ejemplo n.º 8
0
            public override bool CanExecute(Order order, Staff currentUserStaff)
            {
                foreach (Procedure rp in order.Procedures)
                {
                    ProtocolResolutionStep resolutionStep = ScheduledProcedureStep <ProtocolResolutionStep>(rp);

                    if (resolutionStep != null)
                    {
                        if (resolutionStep.State == ActivityStatus.SC)
                        {
                            return(true);
                        }
                    }
                }

                return(false);
            }
        protected override ProcedureStep CreateScheduledCopy()
		{
			ProtocolResolutionStep newStep = new ProtocolResolutionStep(this.Protocol);
			this.Procedure.AddProcedureStep(newStep);
			return newStep;
		}