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; }
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 )); }
private static bool ActivateIfAlreadyOpen(ReportingWorklistItem item) { Workspace workspace = DocumentManager.Get<ProtocollingComponentDocument>(item.OrderRef); if (workspace != null) { workspace.Activate(); return true; } return false; }
private static bool ActivateIfAlreadyOpen(ReportingWorklistItem item) { Workspace workspace = DocumentManager.Get <ProtocollingComponentDocument>(item.OrderRef); if (workspace != null) { workspace.Activate(); return(true); } return(false); }
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); }