protected void BuildHPI() { if (patientID != 0) { try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPIBreast(this.patientID); if (hpiDs.Tables[0].Rows.Count > 0) { DataColumn VarOrderNumCol = new DataColumn("VarOrderNum", typeof(System.Int32)); hpiDs.Tables[0].Columns.Add(VarOrderNumCol); DataColumn IsAppendedRowCol = new DataColumn("RowType", typeof(System.String)); hpiDs.Tables[0].Columns.Add(IsAppendedRowCol); for (int i = 0; i < hpiDs.Tables[0].Rows.Count; i++) { hpiDs.Tables[0].Rows[i]["VarOrderNum"] = i; hpiDs.Tables[0].Rows[i]["RowType"] = "normal"; } int currentRowId = 0; for (int k = 0; k < hpiDs.Tables[0].Rows.Count; k++) { currentRowId = Convert.ToInt16(hpiDs.Tables[0].Rows[k]["RowId"]); for (int j = 0; j < hpiDs.Tables[0].Rows.Count; j++) { if (j != k && hpiDs.Tables[0].Rows[j]["RelatedRowId"].Equals(currentRowId)) { hpiDs.Tables[0].Rows[j]["VarOrderNum"] = hpiDs.Tables[0].Rows[k]["VarOrderNum"]; hpiDs.Tables[0].Rows[j]["RowType"] = "multi"; hpiDs.Tables[0].Rows[k]["RowType"] = "start multi"; } } } DataView hpiDv = hpiDs.Tables[0].DefaultView; hpiDv.Sort = "VarOrderNum ASC, RowId ASC"; hpi.DataSource = hpiDv; hpi.DataBind(); } } catch (Exception ex) { hpi.Visible = false; ExceptionHandler.Publish(ex); } } }
protected void BuildHPI() { if (patientID != 0) { try { PatientDa hpiDa = new PatientDa(); DataSet hpiDs = hpiDa.GetPatientHPIBreast(this.patientID); hpi.DataSource = hpiDs.Tables[0].DefaultView; hpi.DataBind(); int rowCount = hpiDs.Tables[0].Rows.Count; } catch (Exception ex) { hpi.Visible = false; ExceptionHandler.Publish(ex); } } }
//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); } }