private void ButtonPatientDetails_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(this.m_TypingUI.AccessionOrder.SvhMedicalRecord) == false) { YellowstonePathology.Business.Patient.Model.SVHBillingDataCollection svhBillingDataCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetSVHBillingDataCollection(this.m_TypingUI.AccessionOrder.SvhMedicalRecord); if (svhBillingDataCollection.Count > 0) { YellowstonePathology.Business.Patient.Model.SVHBillingData svhBillingDate = svhBillingDataCollection.GetMostRecent(); YellowstonePathology.UI.Billing.PatientDetailPage patientDetailPage = new Billing.PatientDetailPage(svhBillingDate); patientDetailPage.Back += new Billing.PatientDetailPage.BackEventHandler(PatientDetailPage_Return); patientDetailPage.Next += new Billing.PatientDetailPage.NextEventHandler(PatientDetailPage_Return); Login.Receiving.LoginPageWindow loginPageWindow = new Login.Receiving.LoginPageWindow(); loginPageWindow.PageNavigator.Navigate(patientDetailPage); loginPageWindow.ShowDialog(); } else { System.Windows.MessageBox.Show("No additional data to show."); } } else { System.Windows.MessageBox.Show("The Medical Record Number is blank. No additional data to show."); } }
private void BillingPage_ShowPatientDetailPage(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.m_AccessionOrder.SvhMedicalRecord) == false) { YellowstonePathology.Business.Patient.Model.SVHBillingDataCollection svhBillingDataCollection = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetSVHBillingDataCollection(this.m_AccessionOrder.SvhMedicalRecord); if (svhBillingDataCollection.Count > 0) { YellowstonePathology.Business.Patient.Model.SVHBillingData svhBillingDate = svhBillingDataCollection.GetMostRecent(); YellowstonePathology.UI.Billing.PatientDetailPage patientDetailPage = new PatientDetailPage(svhBillingDate); patientDetailPage.Back += new Billing.PatientDetailPage.BackEventHandler(PatientDetailPage_Back); patientDetailPage.Next += new Billing.PatientDetailPage.NextEventHandler(PatientDetailPage_Next); if (this.m_BillingWindowPrimary.PageNavigator.HasDualMonitors() == false) { this.m_BillingWindowSecondary = new BillingWindowSecondary(); this.m_BillingWindowSecondary.Show(); } this.m_BillingWindowSecondary.PageNavigator.Navigate(patientDetailPage); } else { System.Windows.MessageBox.Show("No additional data to show."); } } else { System.Windows.MessageBox.Show("The Medical Record Number is blank. No additional data to show."); } }
public static YellowstonePathology.Business.Patient.Model.SVHBillingDataCollection GetSVHBillingDataCollection(string mrn) { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "select * from tblSVHBillingData where MRN = @MRN"; cmd.Parameters.Add("@MRN", SqlDbType.VarChar).Value = mrn; cmd.CommandType = CommandType.Text; YellowstonePathology.Business.Patient.Model.SVHBillingDataCollection result = new YellowstonePathology.Business.Patient.Model.SVHBillingDataCollection(); using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.BaseData.SqlConnectionString)) { cn.Open(); cmd.Connection = cn; using (SqlDataReader dr = cmd.ExecuteReader()) { while (dr.Read()) { YellowstonePathology.Business.Patient.Model.SVHBillingData svhBillingData = new YellowstonePathology.Business.Patient.Model.SVHBillingData(); YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(svhBillingData, dr); sqlDataReaderPropertyWriter.WriteProperties(); result.Add(svhBillingData); } } } return result; }