Esempio n. 1
0
 protected void BuildHPI()
 {
     try
     {
         PatientDa pDa   = new PatientDa();
         DataSet   hpiDs = pDa.GetPatientHPIKidney(this._patientId);
         DataView  view  = GetPatientHPIKidneyView(hpiDs.Tables[0]);
         hpi.DataSource = view;
         hpi.DataBind();
     }
     catch (Exception ex)
     {
         hpi.Visible = false;
         ExceptionHandler.Publish(ex);
     }
 }
Esempio n. 2
0
 protected void BuildHPI()
 {
     if (patientID != 0)
     {
         try
         {
             PatientDa pDa   = new PatientDa();
             DataSet   hpiDs = pDa.GetPatientHPIKidney(this.patientID);
             hpi.DataSource = hpiDs.Tables[0].DefaultView;
             hpi.DataBind();
         }
         catch (Exception ex)
         {
             hpi.Visible = false;
             ExceptionHandler.Publish(ex);
         }
     }
 }
Esempio n. 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);
            }
        }