public void View(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrder panelSetOrder) { YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet = YellowstonePathology.Business.PanelSet.Model.PanelSetCollection.GetAll().GetPanelSet(panelSetOrder.PanelSetId); YellowstonePathology.Business.Interface.ICaseDocument doc = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(accessionOrder, panelSetOrder, Business.Document.ReportSaveModeEnum.Draft); doc.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo); string fileName = string.Empty; if (panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.PublishedDocument || panelSet.ResultDocumentSource == Business.PanelSet.Model.ResultDocumentSourceEnum.RetiredTestDocument) { fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser); } else { fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); } switch (doc.NativeDocumentFormat) { case Business.Document.NativeDocumentFormatEnum.Word: YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); break; case Business.Document.NativeDocumentFormatEnum.XPS: YellowstonePathology.UI.XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer(); xpsDocumentViewer.ViewDocument(fileName); xpsDocumentViewer.ShowDialog(); break; } }
public object GetSearchObject() { object result = null; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_SearchText); if(orderIdParser.IsValidReportNo == true) { result = new YellowstonePathology.Business.ReportNo(this.m_SearchText); } else if(orderIdParser.IsValidMasterAccessionNo == true) { result = YellowstonePathology.Business.MasterAccessionNo.Parse(this.m_SearchText, true); } else { YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = null; if (YellowstonePathology.Business.MasterAccessionNo.TryParse(this.m_SearchText, false, out masterAccessionNo) == true) { result = masterAccessionNo; } else { YellowstonePathology.Business.PatientName patientName = null; if (YellowstonePathology.Business.PatientName.TryParse(this.m_SearchText, out patientName) == true) { result = patientName; } } } return result; }
private void AddPage(string reportNo, string lastName, bool acidWash) { PageContent pageContent = new PageContent(); FixedPage fixedPage = new FixedPage(); StackPanel rowStackPanel = new StackPanel(); rowStackPanel.Orientation = Orientation.Horizontal; rowStackPanel.Margin = new Thickness(9, 5, 5, 5); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(reportNo); string labelLine1 = string.Empty; string labelLine2 = string.Empty; string masterAccessionNo = orderIdParser.MasterAccessionNo; string crc = YellowstonePathology.Business.BarcodeScanning.CytycCRC32.ComputeCrc(masterAccessionNo); labelLine1 = YellowstonePathology.Business.BarcodeScanning.CrcLabel.LabelLine1(masterAccessionNo); labelLine2 = YellowstonePathology.Business.BarcodeScanning.CrcLabel.LabelLine2(masterAccessionNo, crc); CytologySlideLabelPanel label1 = new CytologySlideLabelPanel(labelLine1, labelLine2, lastName, acidWash); CytologySlideLabelPanel label2 = new CytologySlideLabelPanel(labelLine1, labelLine2, lastName, acidWash); CytologySlideLabelPanel label3 = new CytologySlideLabelPanel(labelLine1, labelLine2, lastName, acidWash); rowStackPanel.Children.Add(label1); rowStackPanel.Children.Add(label2); rowStackPanel.Children.Add(label3); fixedPage.Children.Add(rowStackPanel); ((System.Windows.Markup.IAddChild)pageContent).AddChild(fixedPage); this.Pages.Add(pageContent); }
public YellowstonePathology.YpiConnect.Contract.MethodResult Download(ref YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { if (remoteFile.UseReportNoToFindFile == true) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(remoteFile.ReportNo); switch (remoteFile.CaseDocumentType) { case Contract.CaseDocumentTypeEnum.TIF: remoteFile.FullPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser) + remoteFile.ReportNo + ".tif"; break; case Contract.CaseDocumentTypeEnum.XPS: remoteFile.FullPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser) + remoteFile.ReportNo + ".xps"; break; } } YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = remoteFile.Load(); if (methodResult.Success == false) { string sendTo = "*****@*****.**"; string messageText = "Error while attempting file download, file does not exist: " + remoteFile.FileName; YellowstonePathology.YpiConnect.Contract.Message message = new Contract.Message(sendTo, webServiceAccount); message.ClientText = messageText; MessageService messageService = new MessageService(); messageService.Send(message); } return methodResult; }
private YellowstonePathology.Business.ReportDistribution.Model.DistributionResult HandleFaxDistribution(YellowstonePathology.Business.ReportDistribution.Model.TestOrderReportDistribution testOrderReportDistribution) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(testOrderReportDistribution.ReportNo); string tifCaseFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser); return(YellowstonePathology.Business.ReportDistribution.Model.FaxSubmission.Submit(testOrderReportDistribution.FaxNumber, testOrderReportDistribution.ReportNo, tifCaseFileName)); }
private void ButtonSendFax_Click(object sender, RoutedEventArgs args) { string message = string.Empty; if (this.StVClientDOHReportViewCollection.Count > 0) { foreach (YellowstonePathology.Business.View.StVClientDOHReportView view in this.StVClientDOHReportViewCollection) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(view.ReportNo); string tifCaseFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser); if (File.Exists(tifCaseFileName) == true) { YellowstonePathology.Business.ReportDistribution.Model.FaxSubmission.Submit("4062373672", view.ReportNo, tifCaseFileName); } else { message = message + view.ReportNo + ", "; } } if (message.Length > 0) { message = message.Substring(0, message.Length - 2); MessageBox.Show("The report/s listed were not faxed as the corresponding file was not found." + Environment.NewLine + message); } else { MessageBox.Show("Faxes sent."); } } else { MessageBox.Show("No Faxes to send."); } }
public void ShowHistoryReport(string reportNo) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(reportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameDoc(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
public object GetSearchObject() { object result = null; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_SearchText); if (orderIdParser.IsValidReportNo == true) { result = new YellowstonePathology.Business.ReportNo(this.m_SearchText); } else if (orderIdParser.IsValidMasterAccessionNo == true) { result = YellowstonePathology.Business.MasterAccessionNo.Parse(this.m_SearchText, true); } else { YellowstonePathology.Business.MasterAccessionNo masterAccessionNo = null; if (YellowstonePathology.Business.MasterAccessionNo.TryParse(this.m_SearchText, false, out masterAccessionNo) == true) { result = masterAccessionNo; } else { YellowstonePathology.Business.PatientName patientName = null; if (YellowstonePathology.Business.PatientName.TryParse(this.m_SearchText, out patientName) == true) { result = patientName; } } } return(result); }
private void ListViewFiles_SelectionChanged(object sender, SelectionChangedEventArgs e) { this.m_AccessionOrder = null; this.m_CaseDocuments = null; if (this.ListViewFiles.SelectedItem != null) { string pdfFilePath = (string)this.ListViewFiles.SelectedItem; string text = this.ExtractTextFromPdf(pdfFilePath); string[] lines = text.Split('\n'); foreach (string line in lines) { string regx = @"(Specimen ID: )(\d\d-\d+)"; System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(regx); System.Text.RegularExpressions.Match match = regex.Match(line); if (match.Captures.Count != 0) { string masterAccessionNo = match.Groups[2].Value; this.m_AccessionOrder = Business.Persistence.DocumentGateway.Instance.PullAccessionOrder(masterAccessionNo, this); Business.OrderIdParser orderIdParser = new Business.OrderIdParser(masterAccessionNo); string casePath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); this.m_CaseDocuments = System.IO.Directory.GetFiles(casePath).ToList <string>(); } } } this.NotifyPropertyChanged("AccessionOrder"); this.NotifyPropertyChanged("CaseDocuments"); }
public YellowstonePathology.YpiConnect.Contract.MethodResult Download(ref YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.WebServiceAccount webServiceAccount) { if (remoteFile.UseReportNoToFindFile == true) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(remoteFile.ReportNo); switch (remoteFile.CaseDocumentType) { case Contract.CaseDocumentTypeEnum.TIF: remoteFile.FullPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser) + remoteFile.ReportNo + ".tif"; break; case Contract.CaseDocumentTypeEnum.XPS: remoteFile.FullPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser) + remoteFile.ReportNo + ".xps"; break; } } YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = remoteFile.Load(); if (methodResult.Success == false) { string sendTo = "*****@*****.**"; string messageText = "Error while attempting file download, file does not exist: " + remoteFile.FileName; YellowstonePathology.YpiConnect.Contract.Message message = new Contract.Message(sendTo, webServiceAccount); message.ClientText = messageText; MessageService messageService = new MessageService(); messageService.Send(message); } return(methodResult); }
private void Twain_ScanningComplete(object sender, ScanningCompleteEventArgs e) { IsEnabled = true; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_AccessionOrder.MasterAccessionNo); this.m_FileName = YellowstonePathology.Business.Requisition.GetNextFileName(orderIdParser); this.NotifyPropertyChanged("FileName"); YellowstonePathology.Business.Requisition.Save(this.m_FileName, this.m_ImageList); }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.InvasiveBreastPanel.InvasiveBreastPanelWordDocument invasiveBreastPanel = new Business.Test.InvasiveBreastPanel.InvasiveBreastPanelWordDocument(this.m_AccessionOrder, this.m_InvasiveBreastPanel, Business.Document.ReportSaveModeEnum.Draft); invasiveBreastPanel.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_InvasiveBreastPanel.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void ListViewCaseHistoryList_DoublClick(object sender, RoutedEventArgs args) { if (this.listViewCaseHistoryList.SelectedItems.Count != 0) { YellowstonePathology.Business.Surgical.PathologistHistoryItem pathologistHistoryItem = (YellowstonePathology.Business.Surgical.PathologistHistoryItem) this.listViewCaseHistoryList.SelectedItem; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(pathologistHistoryItem.ReportNo); string path = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameDoc(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWord(path); } }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.LynchSyndrome.LynchSyndromeEvaluationWordDocument lynchSyndromeEvaluation = new Business.Test.LynchSyndrome.LynchSyndromeEvaluationWordDocument(this.m_AccessionOrder, this.m_PanelSetOrderLynchSyndromeEvaluation, Business.Document.ReportSaveModeEnum.Draft); lynchSyndromeEvaluation.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrderLynchSyndromeEvaluation.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.EosinophiliaByFISH.EosinophiliaByFISHWordDocument report = new Business.Test.EosinophiliaByFISH.EosinophiliaByFISHWordDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileWordDocument report = new Business.Test.ComprehensiveColonCancerProfile.ComprehensiveColonCancerProfileWordDocument(this.m_AccessionOrder, this.m_ComprehensiveColonCancerProfile, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_ComprehensiveColonCancerProfile.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
public void ShowCaseDocument(object target, ExecutedRoutedEventArgs args) { this.Save(false); YellowstonePathology.Business.Test.Surgical.SurgicalWordDocument report = new YellowstonePathology.Business.Test.Surgical.SurgicalWordDocument(this.m_TypingUI.AccessionOrder, this.m_TypingUI.SurgicalTestOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_TypingUI.SurgicalTestOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.KRASStandardReflex.KRASStandardReflexWordDocument report = new YellowstonePathology.Business.Test.KRASStandardReflex.KRASStandardReflexWordDocument(this.m_AccessionOrder, this.m_KRASStandardReflexTestOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_KRASStandardReflexResult.KRASStandardReflexTestOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void HyperLinkOpenFolder_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_ReportNo); string folderPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.Process p = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("Explorer.exe", folderPath); p.StartInfo = info; p.Start(); }
public void ButtonViewDocument_Click(object sender, RoutedEventArgs args) { if (this.m_TypingUI.SurgicalTestOrder != null && this.m_TypingUI.SurgicalTestOrder.ReportNo != string.Empty) { this.Save(false); YellowstonePathology.Business.Test.Surgical.SurgicalWordDocument report = new YellowstonePathology.Business.Test.Surgical.SurgicalWordDocument(this.m_TypingUI.AccessionOrder, this.m_TypingUI.SurgicalTestOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_TypingUI.SurgicalTestOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); } }
private void ButtonOK_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.TextBlockReportNo.Text); if (orderIdParser.ReportNo == null) { MessageBox.Show("The report number entered is invalid."); } else { this.OK(this, new CustomEventArgs.ReportNoReturnEventArgs(orderIdParser.ReportNo)); } }
private void ButtonOK_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.TextMasterAccessionNo.Text); if (orderIdParser.MasterAccessionNo == null) { MessageBox.Show("The report number entered is invalid."); } else { this.UseThisMasterAccessionNo(this, new CustomEventArgs.MasterAccessionNoReturnEventArgs(orderIdParser.MasterAccessionNo)); } }
private void AddMaterialTrackingLog(YellowstonePathology.Business.Test.AliquotOrder aliquotOrder, YellowstonePathology.Business.Facility.Model.Facility thisFacility, string thisLocation) { this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Input, new System.Threading.ThreadStart(delegate() { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); Business.OrderIdParser orderIdParse = new Business.OrderIdParser(aliquotOrder.AliquotOrderId); YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLog materialTrackingLog = new Business.MaterialTracking.Model.MaterialTrackingLog(objectId, aliquotOrder.AliquotOrderId, null, thisFacility.FacilityId, thisFacility.FacilityName, thisLocation, "Block Scanned", "Block Scanned At Embeding", "Block", orderIdParse.MasterAccessionNo, aliquotOrder.Label, aliquotOrder.ClientAccessioned, null); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingLog, Window.GetWindow(this)); })); }
private void HandleReportNoSearch() { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.TextBoxReportNo.Text); if (orderIdParser.ReportNo != null) { UI.Navigation.PageNavigationReturnEventArgs args = new UI.Navigation.PageNavigationReturnEventArgs(UI.Navigation.PageNavigationDirectionEnum.Next, this.TextBoxReportNo.Text); this.Return(this, args); } else { MessageBox.Show("The Report No is not valid."); } }
public void ButtonViewDocument_Click(object sender, RoutedEventArgs args) { Save(false); if (this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.PanelSetId != 19 && this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.PanelSetId != 20) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(this.m_FlowUI.AccessionOrder, this.m_FlowUI.PanelSetOrderLeukemiaLymphoma, Business.Document.ReportSaveModeEnum.Draft); caseDocument.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); } }
private void ButtonOpenDocumentFolder_Click(object sender, RoutedEventArgs e) { if (this.m_FlowUI.AccessionOrder != null) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.ReportNo); string folderPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.Process p = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("Explorer.exe", folderPath); p.StartInfo = info; p.Start(); } }
private void HandleReportNoSearch() { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.TextBoxReportNo.Text); if(orderIdParser.ReportNo != null) { UI.Navigation.PageNavigationReturnEventArgs args = new UI.Navigation.PageNavigationReturnEventArgs(UI.Navigation.PageNavigationDirectionEnum.Next, this.TextBoxReportNo.Text); this.Return(this, args); } else { MessageBox.Show("The Report No is not valid."); } }
private bool DoesXPSDocumentExist() { bool result = true; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string xpsFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser); if (System.IO.File.Exists(xpsFileName) == false) { result = false; } return(result); }
private bool HasCaseBeenPublished() { bool result = true; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string tifFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser); if (System.IO.File.Exists(tifFileName) == false) { result = false; } return(result); }
private void ContextMenuOpenDocumentsFolder_Click(object sender, RoutedEventArgs e) { if (this.ListViewSurgicalCaseList.SelectedItems.Count != 0) { YellowstonePathology.Business.Surgical.SurgicalOrderListItem surgicalOrderListItem = (YellowstonePathology.Business.Surgical.SurgicalOrderListItem) this.ListViewSurgicalCaseList.SelectedItem; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(surgicalOrderListItem.ReportNo); string folderPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.Process p = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("Explorer.exe", folderPath); p.StartInfo = info; p.Start(); } }
private void HyperLinkFax_Click(object sender, RoutedEventArgs e) { Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string preauthFileName = Business.Document.CaseDocument.GetCaseFileNameTifPreAuth(orderIdParser); if (System.IO.File.Exists(preauthFileName) == true) { Business.ReportDistribution.Model.FaxSubmission.Submit(this.m_PanelSetOrder.Fax, this.m_PanelSetOrder.ReportNo + "Preauthorization Notification", preauthFileName); MessageBox.Show("The fax was successfully submitted."); } else { MessageBox.Show("The document must be published first."); } }
public void ButtonViewReport_Click(object sender, RoutedEventArgs args) { if (this.m_FlowUI.AccessionOrder != null) { Save(false); if (this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.PanelSetId == 20) { YellowstonePathology.Business.Test.LLP.LeukemiaLymphomaWordDocument report = new YellowstonePathology.Business.Test.LLP.LeukemiaLymphomaWordDocument(this.m_FlowUI.AccessionOrder, this.m_FlowUI.PanelSetOrderLeukemiaLymphoma, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_FlowUI.PanelSetOrderLeukemiaLymphoma.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); } } }
private void HyperLinkPrintLabel_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPAP(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(panelSetOrder.ReportNo); string dummyReportNo = (orderIdParser.ReportNoYear + 50).ToString() + "-" + orderIdParser.MasterAccessionNoNumber + "." + orderIdParser.ReportNoLetter; YellowstonePathology.UI.Login.CytologySlideLabelDocument cytologySlideLabelDocument = new Login.CytologySlideLabelDocument(dummyReportNo, this.m_AccessionOrder.PLastName, false); System.Windows.Controls.PrintDialog printDialog = new System.Windows.Controls.PrintDialog(); System.Printing.PrintServer printServer = new System.Printing.LocalPrintServer(); System.Printing.PrintQueue printQueue = printServer.GetPrintQueue(YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.CytologySlideLabelPrinter); printDialog.PrintQueue = printQueue; printDialog.PrintDocument(cytologySlideLabelDocument.DocumentPaginator, "Slide Labels"); }
private void TextBoxReportNoSearch_KeyUp(object sender, KeyEventArgs e) { Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxReportNoSearch.Text.ToUpper()); object textSearchObject = textSearchHandler.GetSearchObject(); string searchText = string.Empty; if (e.Key == Key.Enter) { searchText = this.TextBoxReportNoSearch.Text.ToUpper(); if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = ((YellowstonePathology.Business.ReportNo)textSearchObject).Value; } else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo) { searchText = ((YellowstonePathology.Business.MasterAccessionNo)textSearchObject).Value; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText); searchText = orderIdParser.CreateCyotlogyReportNoFromMasterAccessionNo(); } } if (e.Key == Key.Up) { if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, 1); } } if (e.Key == Key.Down) { if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, -1); } } if (string.IsNullOrEmpty(searchText) == false) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText); if (orderIdParser.IsValidCytologyReportNo == true) { this.m_CytologyUI.SetAccessionOrderByReportNo(searchText); } else { System.Windows.MessageBox.Show(searchText + " is not a valid Cytology report number."); } } }
public ReportOrderDetailPage(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, string reportNo, YellowstonePathology.Business.User.SystemIdentity systemIdentity) { this.m_AccessionOrder = accessionOrder; this.m_PanelSetOrder = accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(reportNo); this.m_SystemIdentity = systemIdentity; this.m_UserCollection = YellowstonePathology.Business.User.SystemUserCollectionInstance.Instance.SystemUserCollection; this.m_FacilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); this.m_ReportDocumentPath = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNamePDF(orderIdParser); InitializeComponent(); DataContext = this; this.Closing += new System.ComponentModel.CancelEventHandler(ReportOrderDetailPage_Closing); }
private void ButtonParse_Click(object sender, RoutedEventArgs e) { string text = this.TextBoxText.Text; string[] rows = text.Split('\n'); StringBuilder insertStatements = new StringBuilder(); char[] delimeters = new char[2]; delimeters[0] = '\t'; delimeters[1] = ' '; List<PsaImport> importList = new List<PsaImport>(); foreach(string row in rows) { string [] cols = row.Split(delimeters); if (cols.Length == 2) { if (string.IsNullOrEmpty(cols[0]) == false) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(cols[0]); if (orderIdParser.IsLegacyPSAReportNo == true) { string reportNo = orderIdParser.LegacyReportNoFromLegacyPSAReportNo; DateTime postDate = DateTime.Parse(cols[1].Trim()); importList.Add(new PsaImport(reportNo, postDate)); string insert = "Insert tblPsaImport (ReportNo, PostDate) values ('" + reportNo + "', '" + postDate.ToShortDateString() + "');"; insertStatements.AppendLine(insert); } else { Console.WriteLine("ReportNo Not Valid: " + row); } } } else { Console.WriteLine("Row Not valid: " + row); } } this.TextBoxText.Text = insertStatements.ToString(); }
public void ShowDocument(string file) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(file); string fileName = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); fileName += file + ".xps"; FileStream fileStream = File.OpenRead(fileName); byte[] bytes = new byte[fileStream.Length]; fileStream.Read(bytes, 0, bytes.Length); fileStream.Close(); MemoryStream memoryStream = new MemoryStream(bytes); string tempPath = "pack://" + file + ".xps"; System.IO.Packaging.Package package = System.IO.Packaging.Package.Open(memoryStream); m_Uri = new Uri(tempPath); System.IO.Packaging.PackageStore.AddPackage(m_Uri, package); m_Document = new XpsDocument(package, System.IO.Packaging.CompressionOption.Maximum, tempPath); FixedDocumentSequence fixedDocumentSequence = m_Document.GetFixedDocumentSequence(); this.DocumentViewerReports.Document = fixedDocumentSequence as IDocumentPaginatorSource; }
private bool DoesXPSDocumentExist() { bool result = true; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string xpsFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser); if (System.IO.File.Exists(xpsFileName) == false) { result = false; } return result; }
private void TextBoxReportNoSearch_KeyUp(object sender, KeyEventArgs e) { Surgical.TextSearchHandler textSearchHandler = new Surgical.TextSearchHandler(this.TextBoxReportNoSearch.Text.ToUpper()); object textSearchObject = textSearchHandler.GetSearchObject(); string searchText = string.Empty; if (e.Key == Key.Enter) { searchText = this.TextBoxReportNoSearch.Text.ToUpper(); if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = ((YellowstonePathology.Business.ReportNo)textSearchObject).Value; } else if (textSearchObject is YellowstonePathology.Business.MasterAccessionNo) { searchText = ((YellowstonePathology.Business.MasterAccessionNo)textSearchObject).Value; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText); searchText = orderIdParser.CreateCyotlogyReportNoFromMasterAccessionNo(); } } if (e.Key == Key.Up) { if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, 1); } } if (e.Key == Key.Down) { if (textSearchObject is YellowstonePathology.Business.ReportNo) { searchText = YellowstonePathology.Business.OrderIdParser.IncrementReportNo(this.TextBoxReportNoSearch.Text, -1); } } if (string.IsNullOrEmpty(searchText) == false) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(searchText); if (orderIdParser.IsValidCytologyReportNo == true) { this.m_CytologyUI.SetAccessionOrderByReportNo(searchText); } else System.Windows.MessageBox.Show(searchText + " is not a valid Cytology report number."); } }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(this.m_PanelSetOrder.Indicator) == false) { YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHWordDocument report = new YellowstonePathology.Business.Test.HER2AmplificationByISH.HER2AmplificationByISHWordDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); } else { MessageBox.Show("We cannot show the document until the indication has been set."); } }
private void HyperLinkPublish_Click(object sender, RoutedEventArgs e) { if (this.m_PanelSetOrder.Final == true) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Normal); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); YellowstonePathology.Business.Rules.MethodResult methodResult = caseDocument.DeleteCaseFiles(orderIdParser); if (methodResult.Success == true) { caseDocument.Render(); caseDocument.Publish(); MessageBox.Show("The document has been published."); } else { MessageBox.Show(methodResult.Message); } } else { MessageBox.Show("You cannot publish this case until it's final."); } }
private void ButtonCreateXPSDocs_Click(object sender, RoutedEventArgs e) { //YellowstonePathology.Business.DataContext.YpiData dataContext = new Business.DataContext.YpiData(); //List<YellowstonePathology.Business.ReportNo> reportNumbers = dataContext.GetReportNumbers().ToList<YellowstonePathology.Business.ReportNo>(); YellowstonePathology.Business.ReportNoCollection reportNumbers = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetReportNumbers(); foreach (YellowstonePathology.Business.ReportNo reportNo in reportNumbers) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(reportNo.Value); string xpsDoc = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameXPS(orderIdParser); if (System.IO.File.Exists(xpsDoc) == false) { YellowstonePathology.Business.Document.CaseDocument.SaveDocAsXPS(orderIdParser); } } }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.BCL1t1114.BCL1t1114WordDocument report = new YellowstonePathology.Business.Test.BCL1t1114.BCL1t1114WordDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void ContextMenuOpenDocumentsFolder_Click(object sender, RoutedEventArgs e) { if (this.ListViewSurgicalCaseList.SelectedItems.Count != 0) { YellowstonePathology.Business.Surgical.SurgicalOrderListItem surgicalOrderListItem = (YellowstonePathology.Business.Surgical.SurgicalOrderListItem)this.ListViewSurgicalCaseList.SelectedItem; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(surgicalOrderListItem.ReportNo); string folderPath = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); System.Diagnostics.Process process = new System.Diagnostics.Process(); System.Diagnostics.Process p = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo("Explorer.exe", folderPath); p.StartInfo = info; p.Start(); } }
private bool HasCaseBeenPublished() { bool result = true; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string tifFileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser); if (System.IO.File.Exists(tifFileName) == false) { result = false; } return result; }
private void ButtonMove_Click(object sender, RoutedEventArgs e) { if (this.ComboBoxServerFolder.SelectedItem != null) { ServerFolder serverFolder = (ServerFolder)this.ComboBoxServerFolder.SelectedItem; if (this.ListViewScannedFiles.SelectedItems.Count != 0) { ScannedFile scannedFile = (ScannedFile)this.ListViewScannedFiles.SelectedItem; YellowstonePathology.Business.Document.CaseDocumentCollection caseDocumentCollection = new Business.Document.CaseDocumentCollection(this.m_ReportNo); YellowstonePathology.Business.Document.CaseDocumentCollection requisitions = caseDocumentCollection.GetRequisitions(); int nextReqNo = requisitions.Count + 1; YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_ReportNo); if (orderIdParser.ReportNo != null || orderIdParser.MasterAccessionNo != null) { string newFileName = System.IO.Path.Combine(YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser), this.m_ReportNo + ".REQ." + nextReqNo.ToString() + ".TIF"); if (orderIdParser.IsLegacyReportNo == false) { string masterAccessionNo = orderIdParser.MasterAccessionNo; newFileName = System.IO.Path.Combine(YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser), masterAccessionNo + ".REQ." + nextReqNo.ToString() + ".TIF"); } if (scannedFile.Extension.ToUpper() == ".TIF") { System.IO.File.Copy(scannedFile.Name, newFileName); } else if (scannedFile.Extension.ToUpper() == ".JPG") { System.Drawing.Imaging.ImageCodecInfo myImageCodecInfo; System.Drawing.Imaging.Encoder myEncoder; System.Drawing.Imaging.EncoderParameter myEncoderParameter; System.Drawing.Imaging.EncoderParameters myEncoderParameters; myImageCodecInfo = GetEncoderInfo("image/tiff"); myEncoder = System.Drawing.Imaging.Encoder.Compression; myEncoderParameters = new System.Drawing.Imaging.EncoderParameters(1); myEncoderParameter = new System.Drawing.Imaging.EncoderParameter(myEncoder, (long)System.Drawing.Imaging.EncoderValue.CompressionCCITT4); myEncoderParameters.Param[0] = myEncoderParameter; System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(scannedFile.Name); bitmap.Save(newFileName, myImageCodecInfo, myEncoderParameters); bitmap.Dispose(); } System.IO.File.Delete(scannedFile.Name); this.StackPanelImage.Children.RemoveRange(0, this.StackPanelImage.Children.Count); this.m_ServerFileCollection = new ScannedFileCollection(); this.m_ServerFileCollection.LoadFiles(serverFolder.Path); this.NotifyPropertyChanged("ServerFileCollection"); this.ListViewScannedFiles.SelectedIndex = 0; if (orderIdParser.IsLegacyReportNo) this.ReportNo = this.ReportNo.Substring(0, 4); else this.ReportNo = this.ReportNo.Substring(0, 3); } else { MessageBox.Show("The Master Accession No should be used for the new style report - 13-123.S \nThe Report No needs to be used for old style reports - S13-123", "Use correct identifier"); } } } }
private void HandleNewCaseSearch(string masterAccessionNoOrReportNo) { if (this.m_TypingUI.SurgicalTestOrder != null) { YellowstonePathology.Business.User.UserPreferenceInstance.Instance.UserPreference.LastReportNo = this.m_TypingUI.SurgicalTestOrder.ReportNo; YellowstonePathology.Business.User.UserPreferenceInstance.Instance.Save(); } YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(masterAccessionNoOrReportNo); if (orderIdParser.IsLegacyReportNo == true) { this.TextBoxReportNoSearch.Text.ToUpper(); this.GetSurgicalCase(this.TextBoxReportNoSearch.Text); } else if (orderIdParser.IsValidMasterAccessionNo == true) { this.TextBoxReportNoSearch.Text = orderIdParser.CreateSurgicalReportNoFromMasterAccessionNo(); this.GetSurgicalCase(this.TextBoxReportNoSearch.Text); } }
private void HyperLinkShowDocument_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisTemplate cysticFibrosisTemplate = (YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisTemplate)this.ComboBoxTemplate.SelectedItem; if (cysticFibrosisTemplate.TemplateId > 0) { YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisWordDocument report = new YellowstonePathology.Business.Test.CysticFibrosis.CysticFibrosisWordDocument(this.m_AccessionOrder, this.m_PanelSetOrder, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrder.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); } else { MessageBox.Show("A Report Template must be selected before you may view the report."); } }
public void ShowCaseDocument() { YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapWordDocument report = new YellowstonePathology.Business.Test.ThinPrepPap.ThinPrepPapWordDocument(this.m_AccessionOrder, this.m_PanelSetOrderCytology, Business.Document.ReportSaveModeEnum.Draft); report.Render(); YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(this.m_PanelSetOrderCytology.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetDraftDocumentFilePath(orderIdParser); YellowstonePathology.Business.Document.CaseDocument.OpenWordDocumentWithWordViewer(fileName); }
private void FindY() { YellowstonePathology.Business.ReportNoCollection reportNoCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetReportNumbers(); YellowstonePathology.Business.ReportNoCollection fix = new Business.ReportNoCollection(); foreach (YellowstonePathology.Business.ReportNo reportNo in reportNoCollection) { YellowstonePathology.Business.OrderIdParser orderIdParser = new Business.OrderIdParser(reportNo.Value); string path = YellowstonePathology.Document.CaseDocumentPath.GetPath(orderIdParser); string[] files = System.IO.Directory.GetFiles(path); foreach (string file in files) { if(file.Contains(".Y.") == true) { //System.IO.File.Delete(file); if (fix.Exists(reportNo.Value) == false) { fix.Add(reportNo); } } } } /* foreach (YellowstonePathology.Business.ReportNo reportNo in fix) { YellowstonePathology.Business.Interface.ICaseDocument caseDocument = YellowstonePathology.Business.Document.DocumentFactory.GetDocument(116); YellowstonePathology.Domain.OrderIdParser orderIdParser = new Domain.OrderIdParser(reportNo.Value); YellowstonePathology.Business.Rules.MethodResult methodResult = caseDocument.DeleteCaseFiles(orderIdParser); if (methodResult.Success == true) { caseDocument.Render(orderIdParser.MasterAccessionNo, reportNo.Value, YellowstonePathology.Business.Document.ReportSaveModeEnum.Normal); caseDocument.Publish(); } else { Console.WriteLine(methodResult.Message); } } */ }