예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.PresentedComplaints), ddlPresentingComplaints);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.Cause), ddlCause);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.Complications), ddlComplications);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.Care), ddlCare);

            #region displays the values from DB (including Listbox values)
            long       theID   = 1;
            Complaints theComp = new ComplaintsDAO().Retrieve(theID);
            TxtDuration.Value            = theComp.DurationOfComplaints;
            txtHistoryOfComplaints.Value = theComp.HistoryOfPresentingComplaints;
            WebObjects.displayStoredSelectedListBoxValues(theComp.TheComplaints, ddlPresentingComplaints);
            WebObjects.displayStoredSelectedListBoxValues(theComp.TheComplications, ddlComplications);
            WebObjects.displayStoredSelectedListBoxValues(theComp.TheCause, ddlCause);
            WebObjects.displayStoredSelectedListBoxValues(theComp.TheCare, ddlCare);
            #endregion

            Patient patient = SessionObjects.ThePatient;
            if (patient != null && patient.TheComplaints != null)
            {
                TxtDuration.Value            = patient.TheComplaints.DurationOfComplaints;
                txtHistoryOfComplaints.Value = patient.TheComplaints.HistoryOfPresentingComplaints;
                WebObjects.displayStoredSelectedListBoxValues(patient.TheComplaints.TheComplaints, ddlPresentingComplaints);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheComplaints.TheComplications, ddlComplications);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheComplaints.TheCause, ddlCause);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheComplaints.TheCare, ddlCare);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.GeneralExam), ddlGeneralExam);
            //WebObjects.EnumToListBox(typeof(TheCancerProject.Core.Texture), ddlTexture);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.LocationOfLesion), ddlLocationOfLesion);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.QuadrantLocated), ddlQuadrantLocated);

            Patient patient = SessionObjects.ThePatient;

            if (patient != null && patient.TheGeneralExamination != null)
            {
                txtWeight.Value            = patient.TheGeneralExamination.Weight;
                txtHeight.Value            = patient.TheGeneralExamination.Height;
                txtBMI.Value               = patient.TheGeneralExamination.BMI;
                txtBSA.Value               = patient.TheGeneralExamination.BSA;
                txtTemperature.Value       = patient.TheGeneralExamination.Temperature;
                txtShape.Value             = patient.TheGeneralExamination.Shape;
                txtOtherObservations.Value = patient.TheGeneralExamination.OtherObservations;
                txtColorOfSkinArea.Value   = patient.TheGeneralExamination.ColorOfSkinArea;
                txtBloodPressure.Value     = patient.TheGeneralExamination.BloodPressure;
                txtRespiratoryRate.Value   = patient.TheGeneralExamination.RespiratoryRate;
                txtHeartSounds.Value       = patient.TheGeneralExamination.HeartSounds;
                txtPulseRRate.Value        = patient.TheGeneralExamination.PulseRate;
                ddlSymmetry.SelectedValue  = Enum.GetName(typeof(Symmetry), SessionObjects.ThePatient.TheGeneralExamination.TheSymmetry);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheGeneralExamination.TheGeneralExam, ddlGeneralExam);
                //WebObjects.displayStoredSelectedListBoxValues(patient.TheGeneralExamination.TheTexture, ddlTexture);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheGeneralExamination.TheLocationOfLesion, ddlLocationOfLesion);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheGeneralExamination.QuadrantLocated, ddlQuadrantLocated);
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.AxillaryLymphNodes), ddlAxillaryLymphNodes);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.SupraclavicularNodes), ddlSupraClavicularNodes);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.AnteriorChestWallNodules), ddlAnteriorChestWallNodules);
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.LocationOfLesions), ddlLocationOfLesions);

            Patient patient = SessionObjects.ThePatient;

            if (patient != null && patient.TheBreastAndAxillaryExamination != null)
            {
                chkElevated.Checked             = patient.TheBreastAndAxillaryExamination.Elevated;
                chkDeviated.Checked             = patient.TheBreastAndAxillaryExamination.Deviated;
                chkCracks.Checked               = patient.TheBreastAndAxillaryExamination.Cracks;
                chkFissure.Checked              = patient.TheBreastAndAxillaryExamination.Fissure;
                chkUlcer.Checked                = patient.TheBreastAndAxillaryExamination.Ulcer;
                chkScales.Checked               = patient.TheBreastAndAxillaryExamination.Scale;
                chkDischarge.Checked            = patient.TheBreastAndAxillaryExamination.Discharge;
                txtFindingsUnderBreast.Value    = patient.TheBreastAndAxillaryExamination.FindingsUnderBreast;
                txtFindingsWithArmsOnHips.Value = patient.TheBreastAndAxillaryExamination.FindingsUnderArms;
                txtNumberOfLesions.Value        = patient.TheBreastAndAxillaryExamination.NumberOfLesions;
                txtSize.Value         = patient.TheBreastAndAxillaryExamination.Size;
                txtAreolaColour.Value = patient.TheBreastAndAxillaryExamination.AreolaColor;
                txtSurface.Value      = patient.TheBreastAndAxillaryExamination.Surface;
                //chkFissures.Checked = patient.TheBreastAndAxillaryExamination.Elevated;
                ddlBreastWithLesion.SelectedValue = Enum.GetName(typeof(BreastWithLesion), SessionObjects.ThePatient.TheBreastAndAxillaryExamination.TheBreastWithLesion);
                ddlTemperature.SelectedValue      = Enum.GetName(typeof(Temperature), SessionObjects.ThePatient.TheBreastAndAxillaryExamination.TheTemperature);
                ddlAppearance.SelectedValue       = Enum.GetName(typeof(Appearance), SessionObjects.ThePatient.TheBreastAndAxillaryExamination.Appearance);
                ddlTypeOfDischarge.SelectedValue  = Enum.GetName(typeof(TypeOfDischarge), SessionObjects.ThePatient.TheBreastAndAxillaryExamination.TypeOfDischarge);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheBreastAndAxillaryExamination.TheAxillaryLymphNodes, ddlAxillaryLymphNodes);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheBreastAndAxillaryExamination.TheSupraclavicularNodes, ddlSupraClavicularNodes);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheBreastAndAxillaryExamination.TheAnteriorChestWallNodules, ddlAnteriorChestWallNodules);
                WebObjects.displayStoredSelectedListBoxValues(patient.TheBreastAndAxillaryExamination.TheLocationOfLesions, ddlLocationOfLesions);
            }
        }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.AxillaryLymphNodes), ddlAxillaryLymphNodes);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.SupraclavicularNodes), ddlSupraClavicularNodes);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.AnteriorChestWallNodules), ddlAnteriorChestWallNodules);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.LocationOfLesions), ddlLocationOfLesions);
 }
예제 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.GeneralExam), ddlGeneralExam);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.Texture), ddlTexture);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.LocationOfLesion), ddlLocationOfLesion);
     WebObjects.EnumToListBox(typeof(TheCancerProject.Core.QuadrantLocated), ddlQuadrantLocated);
 }
예제 #6
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            bool doNotSaveInDB = false;

            if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
            {
                if (doNotSaveInDB)
                {
                    Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                }
            }
            string generalExam = WebObjects.selectedListBoxValues(ddlGeneralExam);
            string s           = string.Empty;
        }
예제 #7
0
        //protected void Renderer(HtmlTextWriter writer)
        //{
        //    MemoryStream mem = new MemoryStream();
        //    StreamWriter twr = new StreamWriter(mem);
        //    HtmlTextWriter myWriter = new HtmlTextWriter(twr);
        //    base.Render(myWriter);
        //    myWriter.Flush();
        //    myWriter.Dispose();
        //    StreamReader strmRdr = new StreamReader(mem);
        //    strmRdr.BaseStream.Position = 0;
        //    string pageContent = strmRdr.ReadToEnd();
        //    strmRdr.Dispose();
        //    mem.Dispose();
        //    writer.Write(pageContent);
        //    CreatePDFDocument(pageContent);


        //}
        //protected override void Render(HtmlTextWriter writer)
        //{
        //    MemoryStream mem = new MemoryStream();
        //    StreamWriter twr = new StreamWriter(mem);
        //    HtmlTextWriter myWriter = new HtmlTextWriter(twr);
        //    base.Render(myWriter);
        //    myWriter.Flush();
        //    myWriter.Dispose();
        //    StreamReader strmRdr = new StreamReader(mem);
        //    strmRdr.BaseStream.Position = 0;
        //    string pageContent = strmRdr.ReadToEnd();
        //    strmRdr.Dispose();
        //    mem.Dispose();
        //    writer.Write(pageContent);
        //    CreatePDFDocument(pageContent);


        //}
        //public void CreatePDFDocument(string strHtml)
        //{

        //    string strFileName = HttpContext.Current.Server.MapPath("test.pdf");
        //    // step 1: creation of a document-object
        //    Document document = new Document();
        //    // step 2:
        //    // we create a writer that listens to the document
        //    PdfWriter.GetInstance(document, new FileStream(strFileName, FileMode.Create));
        //    StringReader se = new StringReader(strHtml);
        //    HTMLWorker obj = new HTMLWorker(document);
        //    document.Open();
        //    //document.Add(se);
        //    obj.Parse(se);
        //    document.Close();
        //    ShowPdf(strFileName);



        //}
        public void CreatePDFDocument()
        {
            // Create a Document object
            var document = new Document(PageSize.A4, 50, 50, 25, 25);

            // Create a new PdfWriter object, specifying the output stream
            var output = new MemoryStream();
            var writer = PdfWriter.GetInstance(document, output);

            // Open the Document for writing
            document.Open();

            //... Step 3: Add elements to the document! ...
            //...

            var titleFont         = FontFactory.GetFont("Arial", 18, Font.BOLD);
            var subTitleFont      = FontFactory.GetFont("Arial", 14, Font.BOLD);
            var boldTableFont     = FontFactory.GetFont("Arial", 12, Font.BOLD);
            var endingMessageFont = FontFactory.GetFont("Arial", 10, Font.ITALIC);
            var bodyFont          = FontFactory.GetFont("Arial", 12, Font.NORMAL);

            var orderInfoTable = new PdfPTable(2);

            orderInfoTable.HorizontalAlignment = 0;
            orderInfoTable.SpacingBefore       = 10;
            orderInfoTable.SpacingAfter        = 10;
            orderInfoTable.DefaultCell.Border  = 0;
            orderInfoTable.SetWidths(new int[] { 1, 4 });

            string presentedComplaints = WebObjects.selectedListBoxValues(ddlPresentingComplaints);

            orderInfoTable.AddCell(new Phrase("Complaints:", boldTableFont));
            foreach (var item in presentedComplaints.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
            {
                orderInfoTable.AddCell(item);
            }
            orderInfoTable.AddCell(new Phrase("Duration:", boldTableFont));
            orderInfoTable.AddCell((TxtDuration.Value));

            document.Add(orderInfoTable);

            // Close the Document - this saves the document contents to the output stream
            document.Close();
            Response.ContentType = "application/pdf";
            Response.AddHeader("Content-Disposition", string.Format("attachment;filename=Receipt-{0}.pdf", DateTime.Now.ToShortDateString()));
            //Response.Write(output);
            Response.BinaryWrite(output.ToArray());
            //Response.WriteFile(output.ToString());
        }
예제 #8
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            bool doNotSaveInDB = false;

            if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
            {
                if (doNotSaveInDB)
                {
                    Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                }
            }

            string axillaryLymphNodes = WebObjects.selectedListBoxValues(ddlAxillaryLymphNodes);
            string s = string.Empty;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            WebObjects.EnumToListBox(typeof(TheCancerProject.Core.PastMedicalHistory), ddlPastMedHistory);
            Patient patient = SessionObjects.ThePatient;

            if (patient != null && patient.ThePreliminaryExamination != null)
            {
                txtAllergicReactions.Value      = patient.ThePreliminaryExamination.AllergicReactions;
                txtDurationOfMenses.Value       = patient.ThePreliminaryExamination.DurationOfMenses;
                txtLengthOfMenstrualCycle.Value = patient.ThePreliminaryExamination.LengthOfMestrualCycle;
                txtParity.Value = patient.ThePreliminaryExamination.Parity;
                txtPastSurgicalHistory.Value = patient.ThePreliminaryExamination.PastSurgicalHistory;
                txtRoutineMedications.Value  = patient.ThePreliminaryExamination.RoutineMedications;
                WebObjects.displayStoredSelectedListBoxValues(patient.ThePreliminaryExamination.MedicalHistory, ddlPastMedHistory);
            }
        }
예제 #10
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            TheCancerProject.Core.Patient thePatient         = SessionObjects.ThePatient;
            TheCancerProject.Core.Patient thePatientToVerify = SessionObjects.ThePatient;
            PreliminaryExamination        entityToReplace    = new PreliminaryExamination(); //HINT:Manually Create

            try
            {
                bool doNotSaveInDB = false;
                if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
                {
                    if (doNotSaveInDB)
                    {
                        Response.Redirect("~/ThePages/Create/GeneralExamination.aspx", false);
                    }
                }
                //if (string.IsNullOrWhiteSpace(dateMenarche.Value))
                //{
                //    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                //    {
                //        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Please Enter a valid Menarche Date" + "', function(){location = '/ThePages/Create/Biodata.aspx';});</script>", false);
                //    }
                //}
                string pastMedicalHistory = WebObjects.selectedListBoxValues(ddlPastMedHistory);

                //TheCancerProject.Core.PreliminaryExamination thePreliminaryExamInSession = (thePatient != null) ? thePatient.ThePreliminaryExamination : null;
                TheCancerProject.Core.PreliminaryExamination thePreliminaryExam = new Core.PreliminaryExamination();
                //theBiodata = theBiodataList.First();
                thePreliminaryExam.AllergicReactions     = (string.IsNullOrWhiteSpace(txtAllergicReactions.Value)) ? txtAllergicReactions.Value : txtAllergicReactions.Value.Trim();
                thePreliminaryExam.DurationOfMenses      = (string.IsNullOrWhiteSpace(txtDurationOfMenses.Value)) ? txtDurationOfMenses.Value : txtDurationOfMenses.Value.Trim();
                thePreliminaryExam.LengthOfMestrualCycle = (string.IsNullOrWhiteSpace(txtLengthOfMenstrualCycle.Value)) ? txtLengthOfMenstrualCycle.Value : txtLengthOfMenstrualCycle.Value.Trim();
                thePreliminaryExam.Parity = (string.IsNullOrWhiteSpace(txtParity.Value)) ? txtParity.Value : txtParity.Value.Trim();
                thePreliminaryExam.PastSurgicalHistory = (string.IsNullOrWhiteSpace(txtPastSurgicalHistory.Value)) ? txtPastSurgicalHistory.Value : txtPastSurgicalHistory.Value.Trim();
                thePreliminaryExam.RoutineMedications  = (string.IsNullOrWhiteSpace(txtRoutineMedications.Value)) ? txtRoutineMedications.Value : txtRoutineMedications.Value.Trim();
                thePreliminaryExam.Menarche            = (string.IsNullOrWhiteSpace(txtMenarche.Value)) ? txtMenarche.Value : txtMenarche.Value.Trim();
                thePreliminaryExam.MedicalHistory      = pastMedicalHistory;
                //thePreliminaryExam.Menarche = Convert.ToDateTime(dateMenarche.Value);
                thePreliminaryExam.DateCreated = DateTime.Now;
                thePreliminaryExam.DateUpdated = DateTime.Now;
                thePreliminaryExam.UniqueID    = SessionObjects.PatientUniqueID; //HINT:Manually Create
                Patient thePatientToSave = new Patient {
                    TheBiodata = (thePatient != null) ? thePatient.TheBiodata : null, TheHospital = (thePatient != null) ? thePatient.TheHospital : null, TheBreastAndAxillaryExamination = (thePatient != null) ? thePatient.TheBreastAndAxillaryExamination : null, TheComplaints = (thePatient != null) ? thePatient.TheComplaints : null, TheEventsOnAdmission = (thePatient != null) ? thePatient.TheEventsOnAdmission : null, TheGeneralExamination = (thePatient != null) ? thePatient.TheGeneralExamination : null, ThePreliminaryExamination = thePreliminaryExam, LastUserAdministeringTreatment = (thePatient != null) ? thePatient.LastUserAdministeringTreatment : null, TheClinicVisits = (thePatient != null) ? thePatient.TheClinicVisits : null, TheInvestigation = (thePatient != null) ? thePatient.TheInvestigation : null, TheProcedures = (thePatient != null) ? thePatient.TheProcedures : null, TheDiagnoses = (thePatient != null) ? thePatient.TheDiagnoses : null, DateCreated = DateTime.Now, DateUpdated = DateTime.Now
                };

                if (thePatient != null)  //HINT:Manually Create
                {
                    thePatient.ThePreliminaryExamination = thePreliminaryExam;
                }
                else
                {
                    thePatient = thePatientToSave;
                }

                if (thePatientToVerify == null)
                {
                    PreliminaryExamDAO.Save(thePreliminaryExam);
                    PatientDAO.Save(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                           //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/GeneralExamination.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.ThePreliminaryExamination != null && thePatientToVerify.ThePreliminaryExamination.Id <= 0)
                {
                    PreliminaryExamDAO.Save(thePreliminaryExam);
                    entityToReplace = new PreliminaryExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    thePatient.ThePreliminaryExamination = entityToReplace;                                        //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);              //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                        //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/GeneralExamination.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.ThePreliminaryExamination != null && thePatientToVerify.ThePreliminaryExamination.Id > 0 && thePatientToVerify.ThePreliminaryExamination != thePreliminaryExam) //HINT:Manually Create
                {
                    thePreliminaryExam.Id = thePatient.ThePreliminaryExamination.Id;                                                                                                                                                                                   //HINT:Manually Create
                    PreliminaryExamDAO.Update(thePreliminaryExam);
                    entityToReplace = new PreliminaryExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                                     //HINT:Manually Create
                    thePatient.ThePreliminaryExamination = entityToReplace;                                                                                                                                                                                            //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                                                  //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                                                                                                                                                                            //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/GeneralExamination.aspx", false);
                }
                else if (thePatientToVerify.ThePreliminaryExamination != null && thePatientToVerify.ThePreliminaryExamination == thePreliminaryExam)
                {
                    //If it's the same data, don't save or update, just redirect
                    Response.Redirect("~/ThePages/Create/GeneralExamination.aspx", false);
                }
                else
                {
                    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Unknown error encountered. Kindly contact admin!!!" + "', function(){location = '/Start/Login.aspx';});</script>", false);
                    }
                }
            }
            catch (Exception ex)
            {
                string errorMessage = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", @"<script type='text/javascript'>alertify.alert('Message', """ + errorMessage.Replace("\n", "").Replace("\r", "") + @""", function(){});</script>", false);
                }
            }
        }
예제 #11
0
 protected void btnFinsih_Click(object sender, EventArgs e)
 {
     WebObjects.ClearAllSessionObjects();
     Response.Redirect("~/ThePages/View/ViewListOfPatients.aspx", false);
 }
        //protected void txtBMI_Click(object sender, EventArgs e)
        //{
        //    int height, weight = 0;
        //    if (!string.IsNullOrWhiteSpace(txtWeight.Value) && int.TryParse(txtWeight.Value, out weight) && !string.IsNullOrWhiteSpace(txtHeight.Value) && int.TryParse(txtHeight.Value, out height))
        //    {
        //        txtBMI.Value = (weight / height).ToString();
        //    }
        //}
        protected void btnNext_Click(object sender, EventArgs e)
        {
            TheCancerProject.Core.Patient thePatient = SessionObjects.ThePatient;
            TheCancerProject.Core.Patient thePatientToVerify = SessionObjects.ThePatient;
            float height, weight = 0;

            Core.GeneralExamination entityToReplace = new Core.GeneralExamination(); //HINT:Manually Create
            try
            {
                bool doNotSaveInDB = false;
                if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
                {
                    if (doNotSaveInDB)
                    {
                        Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                    }
                }

                string generalExam = WebObjects.selectedListBoxValues(ddlGeneralExam);
                //string Texture = WebObjects.selectedListBoxValues(ddlTexture);
                string locationOfLesion = WebObjects.selectedListBoxValues(ddlLocationOfLesion);
                string quadrantLocated  = WebObjects.selectedListBoxValues(ddlQuadrantLocated);

                //TheCancerProject.Core.Complaints theComplaintInSession = (thePatient!=null) ?thePatient.TheComplaints : null;
                TheCancerProject.Core.GeneralExamination theGeneralExam = new Core.GeneralExamination();
                theGeneralExam.TheGeneralExam = generalExam;
                //theGeneralExam.TheTexture = Texture;
                theGeneralExam.TheLocationOfLesion = locationOfLesion;
                theGeneralExam.QuadrantLocated     = quadrantLocated;
                theGeneralExam.TheSymmetry         = (Core.Symmetry)Enum.Parse(typeof(Core.Symmetry), ddlSymmetry.SelectedValue);
                theGeneralExam.Weight = (string.IsNullOrWhiteSpace(txtWeight.Value)) ? txtWeight.Value : txtWeight.Value.Trim();
                theGeneralExam.Height = (string.IsNullOrWhiteSpace(txtHeight.Value)) ? txtHeight.Value : txtHeight.Value.Trim();
                if (!string.IsNullOrWhiteSpace(txtWeight.Value) && float.TryParse(txtWeight.Value, out weight) && !string.IsNullOrWhiteSpace(txtHeight.Value) && float.TryParse(txtHeight.Value, out height))
                {
                    txtBMI.Value = (weight / height).ToString();
                    txtBSA.Value = Math.Sqrt(((height * 100) * weight) / 3600).ToString();
                }
                else
                {
                    txtBMI.Value = string.Empty;
                    txtBSA.Value = string.Empty;
                }
                theGeneralExam.BMI               = (string.IsNullOrWhiteSpace(txtBMI.Value)) ? txtBMI.Value : txtBMI.Value.Trim();
                theGeneralExam.BSA               = (string.IsNullOrWhiteSpace(txtBSA.Value)) ? txtBSA.Value : txtBSA.Value.Trim();
                theGeneralExam.Temperature       = (string.IsNullOrWhiteSpace(txtTemperature.Value)) ? txtTemperature.Value : txtTemperature.Value.Trim();
                theGeneralExam.Shape             = (string.IsNullOrWhiteSpace(txtShape.Value)) ? txtShape.Value : txtShape.Value.Trim();
                theGeneralExam.OtherObservations = (string.IsNullOrWhiteSpace(txtOtherObservations.Value)) ? txtOtherObservations.Value : txtOtherObservations.Value.Trim();
                theGeneralExam.ColorOfSkinArea   = (string.IsNullOrWhiteSpace(txtColorOfSkinArea.Value)) ? txtColorOfSkinArea.Value : txtColorOfSkinArea.Value.Trim();
                theGeneralExam.BloodPressure     = (string.IsNullOrWhiteSpace(txtBloodPressure.Value)) ? txtBloodPressure.Value : txtBloodPressure.Value.Trim();
                theGeneralExam.RespiratoryRate   = (string.IsNullOrWhiteSpace(txtRespiratoryRate.Value)) ? txtRespiratoryRate.Value : txtRespiratoryRate.Value.Trim();
                theGeneralExam.HeartSounds       = (string.IsNullOrWhiteSpace(txtHeartSounds.Value)) ? txtHeartSounds.Value : txtHeartSounds.Value.Trim();
                theGeneralExam.PulseRate         = (string.IsNullOrWhiteSpace(txtPulseRRate.Value)) ? txtPulseRRate.Value : txtPulseRRate.Value.Trim();
                theGeneralExam.DateCreated       = DateTime.Now;
                theGeneralExam.DateUpdated       = DateTime.Now;
                theGeneralExam.UniqueID          = SessionObjects.PatientUniqueID; //HINT:Manually Create
                Patient thePatientToSave = new Patient {
                    TheBiodata = (thePatient != null) ? thePatient.TheBiodata : null, TheHospital = (thePatient != null) ? thePatient.TheHospital : null, TheBreastAndAxillaryExamination = (thePatient != null) ? thePatient.TheBreastAndAxillaryExamination : null, TheComplaints = (thePatient != null) ? thePatient.TheComplaints : null, TheEventsOnAdmission = (thePatient != null) ? thePatient.TheEventsOnAdmission : null, TheGeneralExamination = theGeneralExam, ThePreliminaryExamination = (thePatient != null) ? thePatient.ThePreliminaryExamination : null, LastUserAdministeringTreatment = (thePatient != null) ? thePatient.LastUserAdministeringTreatment : null, TheClinicVisits = (thePatient != null) ? thePatient.TheClinicVisits : null, TheInvestigation = (thePatient != null) ? thePatient.TheInvestigation : null, TheProcedures = (thePatient != null) ? thePatient.TheProcedures : null, TheDiagnoses = (thePatient != null) ? thePatient.TheDiagnoses : null, DateCreated = DateTime.Now, DateUpdated = DateTime.Now
                };

                if (thePatient != null)  //HINT:Manually Create
                {
                    thePatient.TheGeneralExamination = theGeneralExam;
                }
                else
                {
                    thePatient = thePatientToSave;
                }

                if (thePatientToVerify == null)
                {
                    GeneralExamDAO.Save(theGeneralExam);
                    PatientDAO.Save(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                           //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.TheGeneralExamination != null && thePatientToVerify.TheGeneralExamination.Id <= 0)
                {
                    GeneralExamDAO.Save(theGeneralExam);
                    entityToReplace = new GeneralExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    thePatient.TheGeneralExamination = entityToReplace;                                        //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);          //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                    //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.TheGeneralExamination != null && thePatientToVerify.TheGeneralExamination.Id > 0 && thePatientToVerify.TheGeneralExamination != theGeneralExam) //HINT:Manually Create
                {
                    theGeneralExam.Id = thePatient.TheGeneralExamination.Id;                                                                                                                                                                           //HINT:Manually Create
                    GeneralExamDAO.Update(theGeneralExam);
                    entityToReplace = new GeneralExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                         //HINT:Manually Create
                    thePatient.TheGeneralExamination = entityToReplace;                                                                                                                                                                                //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                                  //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                                                                                                                                                            //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                }
                else if (thePatientToVerify.TheGeneralExamination != null && thePatientToVerify.TheGeneralExamination == theGeneralExam)
                {
                    //If it's the same data, don't save or update, just redirect
                    Response.Redirect("~/ThePages/Create/BreastAndAxillaryExamination.aspx", false);
                }
                else
                {
                    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Unknown error encountered. Kindly contact admin!!!" + "', function(){location = '/Start/Login.aspx';});</script>", false);
                    }
                }
            }
            catch (Exception ex)
            {
                string errorMessage = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", @"<script type='text/javascript'>alertify.alert('Message', """ + errorMessage.Replace("\n", "").Replace("\r", "") + @""", function(){});</script>", false);
                }
            }
        }
예제 #13
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            TheCancerProject.Core.Patient thePatient         = SessionObjects.ThePatient;
            TheCancerProject.Core.Patient thePatientToVerify = SessionObjects.ThePatient;
            try
            {
                bool doNotSaveInDB = false;
                if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
                {
                    if (doNotSaveInDB)
                    {
                        Response.Redirect("~/ThePages/Create/HistoryAndPreliminaryExamination.aspx", false);
                    }
                }

                string presentedComplaints = WebObjects.selectedListBoxValues(ddlPresentingComplaints);
                string cause         = WebObjects.selectedListBoxValues(ddlCause);
                string complications = WebObjects.selectedListBoxValues(ddlComplications);
                string care          = WebObjects.selectedListBoxValues(ddlCare);

                //TheCancerProject.Core.Complaints theComplaintInSession = (thePatient!=null) ?thePatient.TheComplaints : null;
                TheCancerProject.Core.Complaints theComplaint = new Core.Complaints();
                //theBiodata = theBiodataList.First();
                theComplaint.DurationOfComplaints          = (string.IsNullOrWhiteSpace(TxtDuration.Value)) ?TxtDuration.Value : TxtDuration.Value.Trim();
                theComplaint.HistoryOfPresentingComplaints = (string.IsNullOrWhiteSpace(txtHistoryOfComplaints.Value)) ? txtHistoryOfComplaints.Value : txtHistoryOfComplaints.Value.Trim();
                theComplaint.TheComplaints    = presentedComplaints;
                theComplaint.TheCause         = cause;
                theComplaint.TheComplications = complications;
                theComplaint.TheCare          = care;
                theComplaint.DateCreated      = DateTime.Now;
                theComplaint.DateUpdated      = DateTime.Now;
                Patient thePatientToSave = new Patient {
                    TheBiodata = (thePatient != null) ? thePatient.TheBiodata :null, TheHospital = (thePatient != null) ? thePatient.TheHospital :null, TheBreastAndAxillaryExamination = (thePatient != null) ?thePatient.TheBreastAndAxillaryExamination :null, TheComplaints = theComplaint, TheEventsOnAdmission = (thePatient != null) ? thePatient.TheEventsOnAdmission :null, TheGeneralExamination = (thePatient != null) ? thePatient.TheGeneralExamination : null, ThePreliminaryExamination = (thePatient != null) ?thePatient.ThePreliminaryExamination : null, LastUserAdministeringTreatment = (thePatient != null) ?thePatient.LastUserAdministeringTreatment : null, DateCreated = DateTime.Now, DateUpdated = DateTime.Now
                };
                //thePatient.TheBiodata = theBiodata;
                //thePatient.TheComplaints = theComplaint;
                thePatient = thePatientToSave;
                SessionObjects.ThePatient = thePatient;
                if (thePatientToVerify.TheComplaints == null)
                {
                    ComplaintsDAO.Save(theComplaint);
                    PatientDAO.Save(thePatientToSave);
                    Response.Redirect("~/ThePages/Create/HistoryAndPreliminaryExamination.aspx", false);
                }
                else if (thePatientToVerify.TheComplaints != null && thePatientToVerify.TheComplaints != theComplaint)
                {
                    ComplaintsDAO.Save(theComplaint);
                    PatientDAO.Update(thePatientToSave);
                    Response.Redirect("~/ThePages/Create/HistoryAndPreliminaryExamination.aspx", false);
                }
                else if (thePatientToVerify.TheComplaints != null && thePatientToVerify.TheComplaints == theComplaint)
                {
                    //If it's the same data, don't save or update, just redirect
                    Response.Redirect("~/ThePages/Create/HistoryAndPreliminaryExamination.aspx", false);
                }
                //else if (theBiodataList != null && theBiodataList.Count > 1)
                //{
                //    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                //    {
                //        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Multiple Biodata Exists for this patient. Kindly contact admin!!!" + "', function(){location = '/Start/Login.aspx';});</script>", false);
                //    }
                //}
                else
                {
                    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Unknown error encountered. Kindly contact admin!!!" + "', function(){location = '/Start/Login.aspx';});</script>", false);
                    }
                }
                //if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                //{
                //    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Admin Saved Successfully" + "', function(){location = '/Start/Login.aspx';});</script>", false);
                //}
            }
            catch (Exception ex)
            {
                string errorMessage = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", @"<script type='text/javascript'>alertify.alert('Message', """ + errorMessage.Replace("\n", "").Replace("\r", "") + @""", function(){});</script>", false);
                }
            }
        }
예제 #14
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            TheCancerProject.Core.Patient     thePatient         = SessionObjects.ThePatient;
            TheCancerProject.Core.Patient     thePatientToVerify = SessionObjects.ThePatient;
            Core.BreastAndAxillaryExamination entityToReplace    = new Core.BreastAndAxillaryExamination(); //HINT:Manually Create

            try
            {
                bool doNotSaveInDB = false;
                if (System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"] != null && Boolean.TryParse(System.Configuration.ConfigurationManager.AppSettings["DoNotSaveInDB"], out doNotSaveInDB))
                {
                    if (doNotSaveInDB)
                    {
                        Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                    }
                }

                string axillaryLymphNodes       = WebObjects.selectedListBoxValues(ddlAxillaryLymphNodes);
                string anteriorChestWallNodules = WebObjects.selectedListBoxValues(ddlSupraClavicularNodes);
                string supraClavicularNodes     = WebObjects.selectedListBoxValues(ddlAnteriorChestWallNodules);
                string locationOfLesions        = WebObjects.selectedListBoxValues(ddlLocationOfLesions);

                //TheCancerProject.Core.Complaints theComplaintInSession = (thePatient!=null) ?thePatient.TheComplaints : null;
                TheCancerProject.Core.BreastAndAxillaryExamination theBreastAndAxillaryExamination = new Core.BreastAndAxillaryExamination();
                theBreastAndAxillaryExamination.TheAxillaryLymphNodes       = axillaryLymphNodes;
                theBreastAndAxillaryExamination.TheAnteriorChestWallNodules = anteriorChestWallNodules;
                theBreastAndAxillaryExamination.TheSupraclavicularNodes     = supraClavicularNodes;
                theBreastAndAxillaryExamination.TheLocationOfLesions        = locationOfLesions;
                theBreastAndAxillaryExamination.TheBreastWithLesion         = (Core.BreastWithLesion)Enum.Parse(typeof(Core.BreastWithLesion), ddlBreastWithLesion.SelectedValue);
                theBreastAndAxillaryExamination.TheTemperature      = (Core.Temperature)Enum.Parse(typeof(Core.Temperature), ddlTemperature.SelectedValue);
                theBreastAndAxillaryExamination.Appearance          = (Core.Appearance)Enum.Parse(typeof(Core.Appearance), ddlAppearance.SelectedValue);
                theBreastAndAxillaryExamination.TypeOfDischarge     = (Core.TypeOfDischarge)Enum.Parse(typeof(Core.TypeOfDischarge), ddlTypeOfDischarge.SelectedValue);
                theBreastAndAxillaryExamination.FindingsUnderBreast = (string.IsNullOrWhiteSpace(txtFindingsUnderBreast.Value)) ? txtFindingsUnderBreast.Value : txtFindingsUnderBreast.Value.Trim();
                theBreastAndAxillaryExamination.FindingsUnderArms   = (string.IsNullOrWhiteSpace(txtFindingsWithArmsOnHips.Value)) ? txtFindingsWithArmsOnHips.Value : txtFindingsWithArmsOnHips.Value.Trim();
                theBreastAndAxillaryExamination.NumberOfLesions     = (string.IsNullOrWhiteSpace(txtNumberOfLesions.Value)) ? txtNumberOfLesions.Value : txtNumberOfLesions.Value.Trim();
                theBreastAndAxillaryExamination.Size        = (string.IsNullOrWhiteSpace(txtSize.Value)) ? txtSize.Value : txtSize.Value.Trim();
                theBreastAndAxillaryExamination.AreolaColor = (string.IsNullOrWhiteSpace(txtAreolaColour.Value)) ? txtAreolaColour.Value : txtAreolaColour.Value.Trim();
                theBreastAndAxillaryExamination.Surface     = (string.IsNullOrWhiteSpace(txtSurface.Value)) ? txtSurface.Value : txtSurface.Value.Trim();
                theBreastAndAxillaryExamination.Elevated    = chkElevated.Checked;
                theBreastAndAxillaryExamination.Deviated    = chkDeviated.Checked;
                theBreastAndAxillaryExamination.Cracks      = chkCracks.Checked;
                theBreastAndAxillaryExamination.Fissure     = chkFissure.Checked;
                theBreastAndAxillaryExamination.Ulcer       = chkUlcer.Checked;
                theBreastAndAxillaryExamination.Scale       = chkScales.Checked;
                theBreastAndAxillaryExamination.Discharge   = chkDischarge.Checked;
                theBreastAndAxillaryExamination.DateCreated = DateTime.Now;
                theBreastAndAxillaryExamination.DateUpdated = DateTime.Now;
                theBreastAndAxillaryExamination.UniqueID    = SessionObjects.PatientUniqueID; //HINT:Manually Create
                Patient thePatientToSave = new Patient {
                    TheBiodata = (thePatient != null) ? thePatient.TheBiodata : null, TheHospital = (thePatient != null) ? thePatient.TheHospital : null, TheBreastAndAxillaryExamination = theBreastAndAxillaryExamination, TheComplaints = (thePatient != null) ? thePatient.TheComplaints : null, TheEventsOnAdmission = (thePatient != null) ? thePatient.TheEventsOnAdmission : null, TheGeneralExamination = (thePatient != null) ? thePatient.TheGeneralExamination : null, ThePreliminaryExamination = (thePatient != null) ? thePatient.ThePreliminaryExamination : null, LastUserAdministeringTreatment = (thePatient != null) ? thePatient.LastUserAdministeringTreatment : null, TheClinicVisits = (thePatient != null) ? thePatient.TheClinicVisits : null, TheInvestigation = (thePatient != null) ? thePatient.TheInvestigation : null, TheProcedures = (thePatient != null) ? thePatient.TheProcedures : null, TheDiagnoses = (thePatient != null) ? thePatient.TheDiagnoses : null, DateCreated = DateTime.Now, DateUpdated = DateTime.Now
                };

                if (thePatient != null)  //HINT:Manually Create
                {
                    thePatient.TheBreastAndAxillaryExamination = theBreastAndAxillaryExamination;
                }
                else
                {
                    thePatient = thePatientToSave;
                }
                if (thePatientToVerify == null) //nothing in session
                {
                    B_And_A_ExamDAO.Save(theBreastAndAxillaryExamination);
                    PatientDAO.Save(thePatientToSave);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                           //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.TheBreastAndAxillaryExamination != null && thePatientToVerify.TheBreastAndAxillaryExamination.Id <= 0)
                {
                    B_And_A_ExamDAO.Save(theBreastAndAxillaryExamination);
                    entityToReplace = new B_And_A_ExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID); //HINT:Manually Create
                    thePatient.TheBreastAndAxillaryExamination = entityToReplace;                               //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);           //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                     //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                }
                else if (thePatientToVerify != null && thePatientToVerify.Id > 0 && thePatientToVerify.TheBreastAndAxillaryExamination != null && thePatientToVerify.TheBreastAndAxillaryExamination.Id > 0 && thePatientToVerify.TheBreastAndAxillaryExamination != theBreastAndAxillaryExamination) //HINT:Manually Create
                {
                    theBreastAndAxillaryExamination.Id = thePatient.TheBreastAndAxillaryExamination.Id;                                                                                                                                                                                               //HINT:Manually Create
                    B_And_A_ExamDAO.Update(theBreastAndAxillaryExamination);
                    entityToReplace = new B_And_A_ExamDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                                                                       //HINT:Manually Create
                    thePatient.TheBreastAndAxillaryExamination = entityToReplace;                                                                                                                                                                                                                     //HINT:Manually Create
                    PatientDAO.Update(thePatient);
                    thePatient = new PatientDAO().RetrieveByUniqueID(SessionObjects.PatientUniqueID);                                                                                                                                                                                                 //HINT:Manually Create
                    SessionObjects.ThePatient = thePatient;                                                                                                                                                                                                                                           //HINT:Manually Create
                    Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                }
                else if (thePatientToVerify.TheBreastAndAxillaryExamination != null && thePatientToVerify.TheBreastAndAxillaryExamination == theBreastAndAxillaryExamination)
                {
                    //If it's the same data, don't save or update, just redirect
                    Response.Redirect("~/ThePages/Create/EventsOnAdmission.aspx", false);
                }
                else
                {
                    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                    {
                        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", "<script type='text/javascript'>alertify.alert('Message', '" + "Unknown error encountered. Kindly contact admin!!!" + "', function(){location = '/ThePages/Create/BreastAndAxillaryExamination.aspx';});</script>", false);
                    }
                }
            }
            catch (Exception ex)
            {
                string errorMessage = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                if (!Page.ClientScript.IsClientScriptBlockRegistered(this.GetType(), "message"))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "message", @"<script type='text/javascript'>alertify.alert('Message', """ + errorMessage.Replace("\n", "").Replace("\r", "") + @""", function(){});</script>", false);
                }
            }
        }