private void CytologyUI_AccessionChanged(object sender, EventArgs e) { this.m_CytologyResultsWorkspace.TextBoxReportNoSearch.Text = this.m_CytologyUI.PanelSetOrderCytology.ReportNo; YellowstonePathology.Business.Document.CaseDocumentCollection caseDocumentCollection = new Business.Document.CaseDocumentCollection(this.m_CytologyUI.AccessionOrder, this.m_CytologyUI.PanelSetOrderCytology.ReportNo); this.m_DocumentViewer.ShowDocument(caseDocumentCollection.GetFirstRequisition()); this.m_LabEventsControlTab.SetCurrentOrder(this.m_CytologyUI.AccessionOrder); this.m_CytologyResultsWorkspace.SelectAppropriatePanel(); }
private void PatientDetailPage_Back(object sender, EventArgs e) { YellowstonePathology.Business.Document.CaseDocumentCollection caseDocumentCollection = new Business.Document.CaseDocumentCollection(this.m_ReportSearchList.CurrentReportSearchItem.ReportNo); YellowstonePathology.Business.Document.CaseDocument firstRequisition = caseDocumentCollection.GetFirstRequisition(); if (this.m_TifDocumentViewer != null) { this.m_TifDocumentViewer.Close(); } if (this.m_BillingWindowPrimary.PageNavigator.HasDualMonitors() == false) { this.m_BillingWindowSecondary.Close(); } if (firstRequisition != null) { this.BillingPage_ShowTIFDocument(this, new CustomEventArgs.FileNameReturnEventArgs(firstRequisition.FullFileName)); } }
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 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 PatientDetailPage_Next(object sender, EventArgs e) { YellowstonePathology.Business.Document.CaseDocumentCollection caseDocumentCollection = new Business.Document.CaseDocumentCollection(this.m_ReportSearchList.CurrentReportSearchItem.ReportNo); YellowstonePathology.Business.Document.CaseDocument firstRequisition = caseDocumentCollection.GetFirstRequisition(); if (this.m_TifDocumentViewer != null) this.m_TifDocumentViewer.Close(); if (this.m_BillingWindowPrimary.PageNavigator.HasDualMonitors() == false) { this.m_BillingWindowSecondary.Close(); } if (firstRequisition != null) { this.BillingPage_ShowTIFDocument(this, new CustomEventArgs.FileNameReturnEventArgs(firstRequisition.FullFileName)); } }