private ReportingWorklistItemSummary GetWorklistItemSummary(ProtocolProcedureStep reportingProcedureStep)
        {
            var worklistItem = new ReportingWorklistItem();

            worklistItem.InitializeFromProcedureStep(reportingProcedureStep, WorklistItemField.ProcedureStepCreationTime);
            return(new ReportingWorkflowAssembler().CreateWorklistItemSummary(worklistItem, this.PersistenceContext));
        }
		protected override bool Execute(ReportingWorklistItem item)
		{
			// check if the document is already open
			if (ActivateIfAlreadyOpen(item))
				return true;

			ReportingWorklistItem replacementStep = null;
			Platform.GetService<IProtocollingWorkflowService>(
				delegate(IProtocollingWorkflowService service)
				{
					ReviseSubmittedProtocolResponse response = service.ReviseSubmittedProtocol(new ReviseSubmittedProtocolRequest(item.OrderRef));
					replacementStep = response.ReplacementStep;
				});

			if (replacementStep == null)
				return false;

			// open the report editor
			ProtocollingComponentDocument protocollingComponentDocument = new ProtocollingComponentDocument(
				replacementStep,
				ProtocollingComponentMode.Edit,
				this.Context);
			protocollingComponentDocument.Open();

			Type selectedFolderType = this.Context.SelectedFolder.GetType();
			protocollingComponentDocument.Closed += delegate { DocumentManager.InvalidateFolder(selectedFolderType); };

			return true;
		}
Esempio n. 3
0
        public ReportingWorklistItemSummary CreateWorklistItemSummary(ReportingWorklistItem domainItem, IPersistenceContext context)
        {
            PersonNameAssembler assembler = new PersonNameAssembler();

            return(new ReportingWorklistItemSummary(
                       domainItem.ProcedureStepRef,
                       domainItem.ProcedureRef,
                       domainItem.OrderRef,
                       domainItem.PatientRef,
                       domainItem.PatientProfileRef,
                       domainItem.ReportRef,
                       new MrnAssembler().CreateMrnDetail(domainItem.Mrn),
                       assembler.CreatePersonNameDetail(domainItem.PatientName),
                       domainItem.AccessionNumber,
                       EnumUtils.GetEnumValueInfo(domainItem.OrderPriority, context),
                       EnumUtils.GetEnumValueInfo(domainItem.PatientClass),
                       domainItem.DiagnosticServiceName,
                       domainItem.ProcedureName,
                       domainItem.ProcedurePortable,
                       domainItem.HasErrors,
                       EnumUtils.GetEnumValueInfo(domainItem.ProcedureLaterality, context),
                       domainItem.ProcedureStepName,
                       domainItem.Time,
                       domainItem.ActivityStatus.HasValue ? EnumUtils.GetEnumValueInfo(domainItem.ActivityStatus.Value, context) : null,
                       domainItem.ReportPartIndex
                       ));
        }
Esempio n. 4
0
		private static bool ActivateIfAlreadyOpen(ReportingWorklistItem item)
		{
			Workspace workspace = DocumentManager.Get<ProtocollingComponentDocument>(item.OrderRef);
			if (workspace != null)
			{
				workspace.Activate();
				return true;
			}
			return false;
		}
Esempio n. 5
0
        private static bool ActivateIfAlreadyOpen(ReportingWorklistItem item)
        {
            Workspace workspace = DocumentManager.Get <ProtocollingComponentDocument>(item.OrderRef);

            if (workspace != null)
            {
                workspace.Activate();
                return(true);
            }
            return(false);
        }
Esempio n. 6
0
        protected override bool Execute(ReportingWorklistItem item)
        {
            // check if the document is already open
            if (ActivateIfAlreadyOpen(item))
            {
                return(true);
            }

            ReportingWorklistItem replacementStep = null;

            Platform.GetService <IProtocollingWorkflowService>(
                delegate(IProtocollingWorkflowService service)
            {
                ReviseSubmittedProtocolResponse response = service.ReviseSubmittedProtocol(new ReviseSubmittedProtocolRequest(item.OrderRef));
                replacementStep = response.ReplacementStep;
            });

            if (replacementStep == null)
            {
                return(false);
            }

            // open the report editor
            ProtocollingComponentDocument protocollingComponentDocument = new ProtocollingComponentDocument(
                replacementStep,
                ProtocollingComponentMode.Edit,
                this.Context);

            protocollingComponentDocument.Open();

            Type selectedFolderType = this.Context.SelectedFolder.GetType();

            protocollingComponentDocument.Closed += delegate { DocumentManager.InvalidateFolder(selectedFolderType); };

            return(true);
        }