protected void BuildHPI() { if (patientID != 0) { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0); hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); int rowCount = hpiDs.Tables[0].Rows.Count; //nomograms are in a second result set /* preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString(); * preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString(); * preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString(); * postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString(); */ // set the value of the biopsy Id that is to be REMOVED from the results of the // stored proc spFormListBiopsies so that the biopsy is only listed once in the // hpi section of the form if (hpiDs.Tables[1].Rows[0]["DxBiopsyId"] != null && hpiDs.Tables[1].Rows[0]["DxBiopsyId"].ToString().Length > 0) { hpiBiopsyId = (int)hpiDs.Tables[1].Rows[0]["DxBiopsyId"]; } } }
protected void BuildHPI() { if (patientID != 0) { try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0); hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); int rowCount = hpiDs.Tables[0].Rows.Count; if (hpiDs.Tables[1].Rows[0]["DxBiopsyId"] != null && hpiDs.Tables[1].Rows[0]["DxBiopsyId"].ToString().Length > 0) { hpiBiopsyId = (int)hpiDs.Tables[1].Rows[0]["DxBiopsyId"]; ShowDxBiopsy(hpiBiopsyId); } } catch (Exception ex) { hpi.Visible = false; //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output"); ExceptionHandler.Publish(ex); } } }
protected void BuildHPI() { if (patientID != 0) { try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0); hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); int rowCount = hpiDs.Tables[0].Rows.Count; //nomograms are in a second result set //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString(); //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString(); //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString(); NomogramDa nda = new NomogramDa(); try { preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString(); } catch { } try { preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString(); } catch { } try { preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString(); } catch { } try { preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString(); } catch { } } catch (Exception ex) { //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output"); ExceptionHandler.Publish(ex); } } // else // { // HpiSpacer.Height = NumHpiRowsAllowed*12; // } }
protected void BindData(Object Sender, RepeaterItemEventArgs e) { Literal ProbsPlans = (Literal)e.Item.FindControl("ProbsPlans"); Literal PtHPI = (Literal)e.Item.FindControl("PtHPI"); if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView drv = (DataRowView)e.Item.DataItem; string PtId = drv["ApptPatientId"].ToString(); string physician = drv["ApptPhysician"].ToString(); if (!string.IsNullOrEmpty(PtId)) { //gets all problems from recent encounter per patient per physician DataTable ProbsDt = da.GetProblems(PtId, physician); StringBuilder plstr = new StringBuilder(); StringBuilder str = new StringBuilder(); if (ProbsDt.Rows.Count > 0) { foreach (DataRow probs in ProbsDt.Rows) { string ProbPlanDt = probs["EnteredDate"].ToString(); string ProbName = probs["ProblemName"].ToString(); int PtprobId = int.Parse(probs["PatientProblemId"].ToString()); //gets all plans per problem DataTable PlansDt = da.GetPlans(PtprobId); if (PlansDt.Rows.Count > 0) { foreach (DataRow plans in PlansDt.Rows) { string PlanName = plans["PlanName"].ToString(); plstr.Append(PlanName + ", "); } str.Append("<strong>Problem:</strong> " + ProbName + "<br/><strong>Plans:</strong> " + plstr.ToString() + "<br/><br/>"); } ProbsPlans.Text = "<strong>Visit Date:</strong> " + ProbPlanDt + "<br/>" + str.ToString(); plstr.Remove(0, plstr.Length); } } //gets HPI data for each patient PatientDa ptDa = new PatientDa(); DataSet hpiDs = ptDa.GetPatientHPI(int.Parse(PtId), 0, 0); StringBuilder hpiStr = new StringBuilder(); if (hpiDs.Tables[0].Rows.Count > 0) { foreach (DataRow hpi in hpiDs.Tables[0].Rows) { string hpiData = hpi["patientHPI"].ToString(); hpiStr.Append(hpiData + "<br/>"); } } PtHPI.Text = hpiStr.ToString(); } } }
protected void BuildHPI() { if (patientID != 0) { try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(this.patientID, 0, 0); hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); int rowCount = hpiDs.Tables[0].Rows.Count; //nomograms are in a second result set /* * preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString(); * preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString(); * preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString(); * postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString(); */ // set the value of the biopsy Id that is to be REMOVED from the results of the // stored proc spFormListBiopsies so that the biopsy is only listed once in the // hpi section of the form if (hpiDs.Tables[1].Rows[0]["DxBiopsyId"] != null && hpiDs.Tables[1].Rows[0]["DxBiopsyId"].ToString().Length > 0) { hpiBiopsyId = (int)hpiDs.Tables[1].Rows[0]["DxBiopsyId"]; } } catch (Exception ex) { hpi.Visible = false; //Caisis.UI.Other.EmailError.SendErrorEmail( "Clinic Form: " + this._formTitle, "error creating hpi output"); ExceptionHandler.Publish(ex); } } }
override protected void Page_Load(object sender, System.EventArgs e) { if (Session[SessionKey.PatientId] != null && Session[SessionKey.PatientId].ToString().Length > 0) { int patientID = (int)Session[SessionKey.PatientId]; SecurityController sc = new SecurityController(); string userName = sc.GetUserName(); reportTitle = "Patient Summary Report"; patientName = Session[SessionKey.PtFirstName].ToString() + " " + Session[SessionKey.PtLastName].ToString() + " MRN: " + Session[SessionKey.PtMRN].ToString() + " " + System.DateTime.Now; //Narrator //Narrative narrative = new Narrative(); //narrative.GetByParent(patientID); DataView narrative = BusinessObject.GetByParentAsDataView <Narrative>(patientID); //narrative.DataSourceView.Sort = "EnteredTime DESC"; narrative.Sort = "EnteredTime DESC"; //rptNarrator.DataSource = narrative.DataSourceView; rptNarrator.DataSource = narrative; rptNarrator.DataBind(); //Allergies //Allergy allergy = new Allergy(); //allergy.GetByParent(patientID); //rptAllergies.DataSource = allergy.DataSourceView; rptAllergies.DataSource = BusinessObject.GetByParentAsDataView <Allergy>(patientID); rptAllergies.DataBind(); //Medications //Medication med = new Medication(); //med.GetByParent(patientID); //rptMedications.DataSource = med.DataSourceView; rptMedications.DataSource = BusinessObject.GetByParentAsDataView <Medication>(patientID); rptMedications.DataBind(); //Comorbidities //Comorbidity com = new Comorbidity(); //com.GetByParent(patientID); //rptComorbidities.DataSource = com.DataSourceView; rptComorbidities.DataSource = BusinessObject.GetByParentAsDataView <Comorbidity>(patientID); rptComorbidities.DataBind(); //HPI SUmmary try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(patientID, 0, 0); //DataSet hpiDs = DataAccessHelper.GetList(phiCom); rptHPI.DataSource = hpiDs.Tables[0].DefaultView; rptHPI.DataBind(); } catch (Exception ex) { ExceptionHandler.Publish(ex); } //nomograms are in a second result set //base.preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString(); //base.preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString(); //base.preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString(); //postRP2yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP2yrNomo"].ToString(); //postRP5yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP5yrNomo"].ToString(); //base.postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString(); NomogramDa nda = new NomogramDa(); try { preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString(); } catch { } try { preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString(); } catch { } try { preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString(); } catch { } try { preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString(); } catch { } try { postRP2yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 2), 0)).ToString(); } catch { } try { postRP5yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 5), 0)).ToString(); } catch { } try { postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString(); } catch { } try { postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString(); } catch { } //Chron List: displays most relevant/common list ChronoDa da = new ChronoDa(); DataSet ds = da.GetChronoList(patientID, chronListName, HttpContext.Current.User.Identity.Name); rptChrono.DataSource = ds.Tables[0].DefaultView; rptChrono.DataBind(); recordCount = ds.Tables[0].Rows.Count; BuildChart(); } }
override protected void Page_Load(object sender, System.EventArgs e) { if (Session[SessionKey.PatientId] != null && !Session[SessionKey.PatientId].ToString().Equals("")) { int patientID = (int)Session[SessionKey.PatientId]; SecurityController sc = new SecurityController(); string userName = sc.GetUserName(); reportTitle = "Patient Summary Report"; PatientController pc = new PatientController(); Patient p = new Patient(); p.Get(patientID); patientName = pc.GetPatientName(p, true) + " " + pc.GetPatientMRN(p) + " " + System.DateTime.Now; //patientName = Session[SessionKey.PtFirstName].ToString() + " " + Session[SessionKey.PtLastName].ToString() + " MRN: " + Session[SessionKey.PtMRN].ToString() + " " + System.DateTime.Now; //Narrator //Narrative narrative = new Narrative(); //narrative.GetByParent(patientID); //narrative.DataSourceView.Sort = "EnteredTime DESC"; //rptNarrator.DataSource = narrative.DataSourceView; DataView narrative = BusinessObject.GetByParentAsDataView <Narrative>(patientID); narrative.Sort = "EnteredTime DESC"; rptNarrator.DataSource = narrative; rptNarrator.DataBind(); //Allergies //Allergy allergy = new Allergy(); //allergy.GetByParent(patientID); //rptAllergies.DataSource = allergy.DataSourceView; rptAllergies.DataSource = BusinessObject.GetByParentAsDataView <Allergy>(patientID); rptAllergies.DataBind(); //Medications //Medication med = new Medication(); //med.GetByParent(patientID); //rptMedications.DataSource = med.DataSourceView; rptMedications.DataSource = BusinessObject.GetByParentAsDataView <Medication>(patientID); rptMedications.DataBind(); //Comorbidities //Comorbidity com = new Comorbidity(); //com.GetByParent(patientID); //rptComorbidities.DataSource = com.DataSourceView; rptComorbidities.DataSource = BusinessObject.GetByParentAsDataView <Comorbidity>(patientID); rptComorbidities.DataBind(); //HPI SUmmary PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPI(patientID, 0, 0); //DataSet hpiDs = DataAccessHelper.GetList(phiCom); rptHPI.DataSource = hpiDs.Tables[0].DefaultView; rptHPI.DataBind(); //nomograms are in a second result set //preRPNomo.Text = hpiDs.Tables[1].Rows[0]["preRPNomo"].ToString(); //preXRTNomo.Text = hpiDs.Tables[1].Rows[0]["preXRTNomo"].ToString(); //preBrachyNomo.Text = hpiDs.Tables[1].Rows[0]["preBrachyNomo"].ToString(); //postRP2yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP2yrNomo"].ToString(); //postRP5yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP5yrNomo"].ToString(); //postRP7yrNomo.Text = hpiDs.Tables[1].Rows[0]["postRP7yrNomo"].ToString(); NomogramDa nda = new NomogramDa(); try { preRP5Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 5), 0)).ToString(); } catch { } try { preRP10Nomo.Text = ((int)Math.Round(nda.GetPreRPResult(patientID, 10), 0)).ToString(); } catch { } try { preXRTNomo.Text = ((int)Math.Round(nda.GetPreXRTResult(patientID), 0)).ToString(); } catch { } try { preBrachyNomo.Text = ((int)Math.Round(nda.GetPreBrachyResult(patientID), 0)).ToString(); } catch { } try { postRP2yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 2), 0)).ToString(); } catch { } try { postRP5yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 5), 0)).ToString(); } catch { } try { postRP7yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 7), 0)).ToString(); } catch { } try { postRP10yrNomo.Text = ((int)Math.Round(nda.GetPostRPResult(patientID, 10), 0)).ToString(); } catch { } //Chron List: displays most relevant/common list BuildChronList(sender, e); // build charts BuildChart(); // log view base.LogReportView(); } else // no patient in session { patientName = "Please select a patient before generating this report."; } SetControlsVisibility(); }
//Get HPI data; formatted OnItemBound protected void BuildHPI() { try { DataSet hpiDs = new DataSet(); Caisis.Controller.DiseaseController dc = new Caisis.Controller.DiseaseController(); string currentDisease = dc.GetDiseaseView(); PatientDa pDa = new PatientDa(); // show most relevant HPI if (currentDisease.ToUpper().Contains("BREAST")) { hpiDs = pDa.GetPatientHPIBreast(this.patientID); HpiTypeDisplay.Text = " (" + currentDisease + ")"; } else if (currentDisease.ToUpper().Contains("BLADDER")) { hpiDs = pDa.GetPatientHPIBladder(this.patientID); HpiTypeDisplay.Text = " (" + currentDisease + ")"; } else if (currentDisease.ToUpper().Contains("KIDNEY")) { hpiDs = pDa.GetPatientHPIKidney(this.patientID); HpiTypeDisplay.Text = " (" + currentDisease + ")"; } else if (currentDisease.ToUpper().Contains("TESTIS")) { hpiDs = pDa.GetPatientHPITestis(this.patientID); HpiTypeDisplay.Text = " (" + currentDisease + ")"; } else { hpiDs = pDa.GetPatientHPI(this.patientID, 0, 0); } int HpiRecordCount = hpiDs.Tables[0].Rows.Count; if (HpiRecordCount > 6) { double rowsPerColumn = HpiRecordCount / 2; RowsAllowed = ((int)Math.Round(rowsPerColumn)) - 1; } else { RowsAllowed = HpiRecordCount; } if (currentDisease.ToUpper().Contains("BREAST")) { hpiBreast.DataSource = hpiDs.Tables[0].DefaultView; hpiBreast.DataBind(); } else { hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); } } catch (Exception ex) { HPIerrorMsg.Visible = true; HPIerrorMsg.Text = "Error creating the hpi. The administrator has been notified."; ExceptionHandler.Publish(ex); } }