Example #1
0
		public CompleteInterpretationForVerificationResponse CompleteInterpretationForVerification(CompleteInterpretationForVerificationRequest request)
		{
			var interpretation = this.PersistenceContext.Load<ReportingProcedureStep>(request.ReportingStepRef, EntityLoadFlags.CheckVersion);
			var supervisor = ResolveSupervisor(interpretation, request.SupervisorRef);

			SaveReportHelper(request.ReportPartExtendedProperties, interpretation, supervisor, true);
			UpdatePriority(interpretation, request.Priority);

			ValidateReportTextExists(interpretation);

			var op = new Operations.CompleteInterpretationForVerification();
			var nextStep = op.Execute(interpretation, this.CurrentUserStaff, new PersistentWorkflow(this.PersistenceContext));

			this.PersistenceContext.SynchState();
			return new CompleteInterpretationForVerificationResponse
					{
						InterpretationStepRef = interpretation.GetRef(),
						VerificationStepRef = nextStep.GetRef()
					};
		}
		private void ExecuteHelper(EntityRef procedureStepRef, EntityRef supervisorRef)
		{
			Platform.GetService<IReportingWorkflowService>(
				delegate(IReportingWorkflowService service)
				{
					CompleteInterpretationForVerificationRequest request = new CompleteInterpretationForVerificationRequest(procedureStepRef);
					request.SupervisorRef = supervisorRef;
					service.CompleteInterpretationForVerification(request);
				});
		}