public void Execute(ReportPart reportPart, IPersistenceContext context)
		{
			if (_enabled == false)
				return;

			LogicalHL7Event.ReportPublished.EnqueueEvents(reportPart.Report);
		}
Exemple #2
0
        /// <summary>
        /// Constructor for creating a new radiology report for the specified procedure.
        /// </summary>
        /// <param name="procedure">The procedure being reported.</param>
        public Report(Procedure procedure)
        {
            _procedures = new HashedSet<Procedure>();
            _parts = new List<ReportPart>();

            _procedures.Add(procedure);
            procedure.Reports.Add(this);

            // create the main report part
            ReportPart mainReport = new ReportPart(this, 0);
            _parts.Add(mainReport);
        }
Exemple #3
0
        /// <summary>
        /// Constructor for creating a new radiology report for the specified procedure.
        /// </summary>
        /// <param name="procedure">The procedure being reported.</param>
        public Report(Procedure procedure)
        {
            _procedures = new HashedSet <Procedure>();
            _parts      = new List <ReportPart>();

            _procedures.Add(procedure);
            procedure.Reports.Add(this);

            // create the main report part
            ReportPart mainReport = new ReportPart(this, 0);

            _parts.Add(mainReport);
        }
		public void Execute(ReportPart reportPart, IPersistenceContext context)
		{
			var order = reportPart.Report.Procedures.First().Order;
			foreach (var recipient in order.ResultRecipients)
			{
				var item = Create(
					order.AccessionNumber,
					reportPart.Report.GetRef(),
					recipient.PractitionerContactPoint.Practitioner.GetRef(),
					recipient.PractitionerContactPoint.GetRef());

				context.Lock(item, DirtyState.New);
			}
		}
Exemple #5
0
        /// <summary>
        /// Adds a new part to this report.
        /// </summary>
        /// <returns></returns>
        public virtual ReportPart AddAddendum()
        {
            if (_status == ReportStatus.X)
            {
                throw new WorkflowException("Cannot add an addendum because the report was cancelled.");
            }
            if (this.ActivePart != null)
            {
                throw new WorkflowException("Cannot add an addendum because the report, or a previous addendum, has not been completed.");
            }

            ReportPart part = new ReportPart(this, _parts.Count);

            _parts.Add(part);

            UpdateStatus();

            return(part);
        }
Exemple #6
0
        public ReportPartDetail CreateReportPartDetail(ReportPart reportPart, IPersistenceContext context)
        {
            StaffAssembler staffAssembler = new StaffAssembler();
            ReportPartDetail summary = new ReportPartDetail(
                reportPart.GetRef(),
                reportPart.Index,
                reportPart.Index > 0,
                EnumUtils.GetEnumValueInfo(reportPart.Status, context),
                reportPart.CreationTime,
                reportPart.PreliminaryTime,
                reportPart.CompletedTime,
                reportPart.CancelledTime,
                reportPart.Supervisor == null ? null : staffAssembler.CreateStaffSummary(reportPart.Supervisor, context),
                reportPart.Interpreter == null ? null : staffAssembler.CreateStaffSummary(reportPart.Interpreter, context),
                reportPart.Transcriber == null ? null : staffAssembler.CreateStaffSummary(reportPart.Transcriber, context),
                reportPart.TranscriptionSupervisor == null ? null : staffAssembler.CreateStaffSummary(reportPart.TranscriptionSupervisor, context),
                reportPart.Verifier == null ? null : staffAssembler.CreateStaffSummary(reportPart.Verifier, context),
                EnumUtils.GetEnumValueInfo(reportPart.TranscriptionRejectReason),
				ExtendedPropertyUtils.Copy(reportPart.ExtendedProperties));

            return summary;
        }
 public ReportingProcedureStep(Procedure procedure, ReportPart reportPart)
     :base(procedure)
 {
     _reportPart = reportPart;
 }
Exemple #8
0
        /// <summary>
        /// Adds a new part to this report.
        /// </summary>
        /// <returns></returns>
        public virtual ReportPart AddAddendum()
        {
            if(_status == ReportStatus.X)
				throw new WorkflowException("Cannot add an addendum because the report was cancelled.");
			if (this.ActivePart != null)
                throw new WorkflowException("Cannot add an addendum because the report, or a previous addendum, has not been completed.");

            ReportPart part = new ReportPart(this, _parts.Count);
            _parts.Add(part);

            UpdateStatus();
            
            return part;
        }
 public ReportingProcedureStep(Procedure procedure, ReportPart reportPart)
     : base(procedure)
 {
     _reportPart = reportPart;
 }