public ProcedureStepDetail CreateProcedureStepDetail(ProcedureStep ps, IPersistenceContext context) { var staffAssembler = new StaffAssembler(); var modalityAssembler = new ModalityAssembler(); return(new ProcedureStepDetail( ps.GetRef(), ps.Name, ps.GetClass().Name, ps.Is <ModalityProcedureStep>() ? ps.As <ModalityProcedureStep>().Description : null, EnumUtils.GetEnumValueInfo(ps.State, context), ps.CreationTime, ps.Scheduling == null ? null : ps.Scheduling.StartTime, ps.StartTime, ps.EndTime, ps.AssignedStaff == null ? null : staffAssembler.CreateStaffSummary(ps.AssignedStaff, context), ps.PerformingStaff == null ? null : staffAssembler.CreateStaffSummary(ps.PerformingStaff, context), ps.Is <ModalityProcedureStep>() ? modalityAssembler.CreateModalitySummary(ps.As <ModalityProcedureStep>().Modality) : null)); }
private void CheckStatus(ActivityStatus status, ProcedureStep o) { Assert.AreEqual(status, o.State, string.Format("Exptected {0} status {1}", o.GetClass().Name, status.ToString())); }