Exemple #1
0
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa hpiDa = new PatientDa();


                    DataSet hpiDs = hpiDa.GetPatientHPITestis(this.patientID);
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();


//					int rowCount = hpiDs.Tables[0].Rows.Count;
//					if (rowCount < NumHpiRowsAllowed)
//					{
//						int newHeight = (NumHpiRowsAllowed-rowCount)*10;
//						HpiSpacer.Height = newHeight;
//					}
                }
                catch (Exception ex)
                {
                    HpiSpacer.Height = NumHpiRowsAllowed * 10;
                    ExceptionHandler.Publish(ex);
                }
            }
            else
            {
                HpiSpacer.Height = NumHpiRowsAllowed * 10;
            }
        }
Exemple #2
0
        protected void BuildHPI()
        {
            if (patientID != 0)
            {
                try
                {
                    PatientDa hpiDa = new PatientDa();


                    DataSet hpiDs = hpiDa.GetPatientHPITestis(this.patientID);
                    hpi.DataSource = hpiDs.Tables[0].DefaultView;
                    hpi.DataBind();


//					int rowCount = hpiDs.Tables[0].Rows.Count;
                }
                catch (Exception ex)
                {
                    ExceptionHandler.Publish(ex);
                }
            }
        }
Exemple #3
0
        //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);
            }
        }