Example #1
0
		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);
		}
Example #2
0
		public ProcedureStepSummary CreateProcedureStepSummary(ProcedureStep ps, IPersistenceContext context)
		{
			var assembler = new ProcedureAssembler();
			var modalityAssembler = new ModalityAssembler();
			return new ProcedureStepSummary(
				ps.GetRef(),
				ps.Name,
				EnumUtils.GetEnumValueInfo(ps.State, context),
				ps.StartTime,
				ps.EndTime,
				ps.Is<ModalityProcedureStep>() ? modalityAssembler.CreateModalitySummary(ps.As<ModalityProcedureStep>().Modality) : null,
				assembler.CreateProcedureSummary(ps.Procedure, context));
		}
Example #3
0
		protected override bool IsRelatedStep(ProcedureStep step)
		{
			// can't have relatives if no protocol
			if (this.Protocol == null)
				return false;

			// relatives must be protocol steps
			if (!step.Is<ProtocolProcedureStep>())
				return false;

			// check if tied to same protocol
			ProtocolProcedureStep that = step.As<ProtocolProcedureStep>();
			return that.Protocol != null && Equals(this.Protocol, that.Protocol);
		}
Example #4
0
        protected override bool IsRelatedStep(ProcedureStep step)
        {
            // can't have relatives if no protocol
            if (this.Protocol == null)
            {
                return(false);
            }

            // relatives must be protocol steps
            if (!step.Is <ProtocolProcedureStep>())
            {
                return(false);
            }

            // check if tied to same protocol
            ProtocolProcedureStep that = step.As <ProtocolProcedureStep>();

            return(that.Protocol != null && Equals(this.Protocol, that.Protocol));
        }
        protected override bool IsRelatedStep(ProcedureStep step)
        {
            // can't have relatives if no report
            if (this.Report == null)
            {
                return(false);
            }

            // relatives must be reporting steps
            if (!step.Is <ReportingProcedureStep>())
            {
                return(false);
            }

            // check if tied to same report
            ReportingProcedureStep that = step.As <ReportingProcedureStep>();

            return(that.Report != null && Equals(this.Report, that.Report));
        }
		protected override bool IsRelatedStep(ProcedureStep step)
		{
			// can't have relatives if no report
			if(this.Report == null)
				return false;

			// relatives must be reporting steps
			if (!step.Is<ReportingProcedureStep>())
				return false;

			// check if tied to same report
			ReportingProcedureStep that = step.As<ReportingProcedureStep>();
			return that.Report != null && Equals(this.Report, that.Report);
		}