Exemplo n.º 1
0
        public static Object GetFoodData(string ClientID)
        {
            DataTable dtFoodList = new DataTable();

            //BusinessHelper<IFoodMaster>.Use(FoodMasterManager =>
            //{
            //    dtFoodList = FoodMasterManager.GetFoodList();
            //});

            dtFoodList = new FoodMasterManager().GetFoodList();

            DataTable dtFoodUnitList = new DataTable();

            //BusinessHelper<IFoodMaster>.Use(FoodMasterManager =>
            //{
            //    dtFoodUnitList = FoodMasterManager.GetFoodUnitList();
            //});
            dtFoodUnitList = new FoodMasterManager().GetFoodUnitList();

            string[] foods       = dtFoodList.Rows[0][0].ToString().Split('~');
            string[] units       = dtFoodUnitList.Rows[0][0].ToString().Split(',');
            FoodData objFoodData = new FoodData();

            objFoodData.foodNames = foods;
            objFoodData.foodUnits = units;
            return(objFoodData);
            //return new Object();
        }
Exemplo n.º 2
0
        public static Object GetFoodNutrients(string FoodName, string foodQuantity, string foodUnit)
        {
            double    foodQty         = Convert.ToDouble(foodQuantity == string.Empty?"0":foodQuantity);
            DataTable dtFoodNutrients = new DataTable();

            BusinessHelper <IFoodMaster> .Use(FoodMasterManager =>
            {
                dtFoodNutrients = FoodMasterManager.GetFoodMajorNutrients(FoodName, foodQty, foodUnit);
            });

            FoodMajorNutrients objFoodNutrients = new FoodMajorNutrients();

            objFoodNutrients.foodID   = dtFoodNutrients.Rows[0]["FoodID"].ToString();
            objFoodNutrients.foodName = dtFoodNutrients.Rows[0]["FoodName"].ToString();
            objFoodNutrients.energy   = dtFoodNutrients.Rows[0]["Energy"].ToString();
            objFoodNutrients.protein  = dtFoodNutrients.Rows[0]["Protein"].ToString();
            objFoodNutrients.fat      = dtFoodNutrients.Rows[0]["Fat"].ToString();
            objFoodNutrients.fibre    = dtFoodNutrients.Rows[0]["Fibre"].ToString();

            return(objFoodNutrients);
        }
Exemplo n.º 3
0
        public string ClientReport(DietMaster objDietMaster, string PatientID)
        {
            double ProteinTotal = 0, CalorieTotal = 0;

            System.Text.StringBuilder strBody  = new System.Text.StringBuilder("");
            System.Text.StringBuilder strBody1 = new System.Text.StringBuilder("");
            strBody.Append("<html<head><title></title>");
            // The setting specifies document's view after it is downloaded as Print
            // instead of the default Web Layout
            strBody.Append("<style>");
            strBody.Append("table{ margin-left:2%; width:88%; }");
            strBody.Append("td{padding:5px; font-family:verdana; font-size:10pt;}");
            strBody.Append(".first{width:250px;font-weight:700; }");
            strBody.Append(".second{}");
            strBody.Append(".mcomplaint{line-height:22px;}");
            strBody.Append(".thead{background-color:darkred;color:floralwhite;}");
            strBody.Append(".rowcontent{text-align: left;}");
            strBody.Append(".firstu{width:350px; text-align:start; font-weight:700; }");
            strBody.Append(".secondu{}");
            strBody.Append(".middleu{}");
            // strBody.Append("<link rel='stylesheet' type='text/css' href ='mystyle.css'>");
            strBody.Append("@media print {.page-break  { display: block; page-break-before: always; }} table {font-family: Calibri; font-size: 18px; font-size: x-medium } @media print {thead {display: table-header-group;}}</style>");

            strBody.Append("</head>");
            //strBody.Append("<h3 align='center' color='black'>PH_CLINIC</h3>");
            strBody.Append("<h4 align='center' color='black'><u>PH_REPORT</u></h4>");

            //Client Info
            strBody.Append("<table cellspacing='0px' border='1'><tr><td colspan='2' align='right'>Date : " + DateTime.UtcNow.AddHours(5.5).ToString("dd-MMM-yyyy") + "</td></tr>");
            strBody.Append("<tr><td class='first'  align='left'>Name  </td>");
            strBody.Append("<td class='second'>" + objDietMaster.CustomerName + " " + objDietMaster.MiddleName + " " + objDietMaster.LastName + "</td></tr>");
            strBody.Append("<tr><td class='first' align='left'>ID  </td>");
            strBody.Append("<td class='second'>" + objDietMaster.CustomerID + "</td></tr>");

            if (!string.IsNullOrEmpty(objDietMaster.CustomerAge.ToString()))
            {
                strBody.Append("<tr><td class='first' align='left'>Age  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.CustomerAge + "</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.MeasuredWeight.ToString()) && !objDietMaster.MeasuredWeight.ToString().Equals("0"))
            {
                strBody.Append("<tr><td  class='first' align='left'>Wt.  </td>");
                strBody.Append("<td class='second' >" + objDietMaster.MeasuredWeight + " kg</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.MeasuredHeight.ToString()) && !objDietMaster.MeasuredHeight.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>Ht.  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.MeasuredHeight * 100 + " Cm</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.CalculatedBMI.ToString()) && !objDietMaster.CalculatedBMI.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>BMI  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.CalculatedBMI + " kg/m<sup>2</sup></td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.FatPer.ToString()) && !objDietMaster.FatPer.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>Fat %  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.FatPer + " %</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.MussleMass.ToString()) && !objDietMaster.MussleMass.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>Mussle Mass  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.MussleMass + " Kg</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.IdealBodyWeight.ToString()) && !objDietMaster.IdealBodyWeight.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>Ideal Body Weight.  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.IdealBodyWeight + " kg</td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.MeasuredWaist.ToString()) && !objDietMaster.MeasuredWaist.ToString().Equals("0"))
            {
                strBody.Append("<tr><td class='first' align='left'>Waist Circumference  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.MeasuredWaist * 100 + " Cm (Normal Range:Male-94 Cm ,Female-80 Cm)</td></tr>");
            }

            if (!string.IsNullOrEmpty(objDietMaster.VisceralFat.ToString()) && !objDietMaster.VisceralFat.ToString().Equals("0"))
            {
                strBody.Append("<tr><td  class='first' align='left'>Visceral Fat </td>");
                strBody.Append("<td class='second'>" + objDietMaster.VisceralFat + " </td></tr>");
            }
            if (!string.IsNullOrEmpty(objDietMaster.AnthrpometricsNotes.ToString()))
            {
                strBody.Append("<tr><td class='first' align='left'>Remark  </td>");
                strBody.Append("<td class='second'>" + objDietMaster.AnthrpometricsNotes.Replace("\n", "<br/>") + " </td></tr>");
            }

            strBody.Append("</table><br/>");

            strBody.Append("<table id='mcomplaint' border='1' cellspacing='0px'><tr><td class='thead'><b>Medical complaints:</b></td></tr><tr><td class='rowcontent'><ol><li>BMI : " + objDietMaster.BMICategory + "</li>");
            string weighlossgain = objDietMaster.WeightGainLossMonth >= 0 ? (objDietMaster.WeightGainLossMonth == 0 ? "No weight gain and loss" : "Recent weight gain") : "Recent Weight loss";

            strBody.Append("<li>" + weighlossgain + "</li>");
            if (objDietMaster.Thyroid.ToString().ToUpper() == "YES")
            {
                strBody.Append("<li>" + objDietMaster.ThyroidType.ToString() + "</li>");
            }

            //BioChemical Complaints
            if (!objDietMaster.FastingGlucose.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Fasting Glucose :" + (objDietMaster.FastingGlucose.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.FastingGlucose)) + "mg/dL");
            }
            if (!objDietMaster.PP.ToString().Equals("-1"))
            {
                strBody1.Append("<li>PP :" + (objDietMaster.PP.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.PP)) + "mg/dL");
            }
            if (!objDietMaster.HB.ToString().Equals("-1"))
            {
                strBody1.Append("<li>HB :" + (objDietMaster.HB.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.HB)) + "g/dL");
            }
            if (!objDietMaster.Creatinine.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Creatinine :" + (objDietMaster.Creatinine.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.Creatinine)) + " g/dL");
            }
            if (!objDietMaster.Albumin.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Albumin :" + (objDietMaster.Albumin.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.Albumin)) + " g/dL");
            }
            if (!objDietMaster.HbA1C.ToString().Equals("-1"))
            {
                strBody1.Append("<li>HbA1C :" + (objDietMaster.HbA1C.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.HbA1C)) + " %");
            }
            if (!objDietMaster.AltSGPT.ToString().Equals("-1"))
            {
                strBody1.Append("<li>ALT (SGPT) :" + (objDietMaster.AltSGPT.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.AltSGPT)) + " IU/L");
            }
            if (!objDietMaster.AltSGOT.ToString().Equals("-1"))
            {
                strBody1.Append("<li>ALT (SGOT) :" + (objDietMaster.AltSGOT.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.AltSGOT)) + " IU/L");
            }
            if (!objDietMaster.Hematocrit.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Hematocrit :" + (objDietMaster.Hematocrit.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.Hematocrit)) + " %");
            }
            if (!objDietMaster.Triglycerides.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Triglycerides :" + (objDietMaster.Triglycerides.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.Triglycerides)) + " mg/dL");
            }
            if (!objDietMaster.TSH.ToString().Equals("-1"))
            {
                strBody1.Append("<li>TSH :" + (objDietMaster.TSH.ToString().ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.TSH)) + " U/ml");
            }
            if (!objDietMaster.HDL.ToString().Equals("-1"))
            {
                strBody1.Append("<li>HDL :" + (objDietMaster.HDL.ToString().ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.HDL)) + " mg/dL");
            }
            if (!objDietMaster.LDL.ToString().Equals("-1"))
            {
                strBody1.Append("<li>LDL :" + (objDietMaster.LDL.ToString().ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.LDL)) + " mg/dL");
            }
            if (!objDietMaster.UricAcid.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Uric Acid :" + (objDietMaster.UricAcid.ToString().ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.UricAcid)) + " mg/dL");
            }
            if (!objDietMaster.TotalCholesterol.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Total Cholesterol :" + (objDietMaster.TotalCholesterol.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.TotalCholesterol)) + " mg/dL");
            }
            if (!objDietMaster.AlkalinePhosphatase.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Alkaline Phosphatase :" + (objDietMaster.AlkalinePhosphatase.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.AlkalinePhosphatase)) + " IU/L");
            }
            if (!objDietMaster.VitaminD3.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Vitamin D3 :" + (objDietMaster.VitaminD3.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.VitaminD3)) + "ng/L");
            }
            if (!objDietMaster.VitaminB12.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Vitamin B12 :" + (objDietMaster.VitaminB12.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.VitaminB12)) + "ng/L");
            }
            if (!objDietMaster.BSL.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Random BSL :" + (objDietMaster.BSL.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.BSL)) + "mg/dl");
            }
            if (!objDietMaster.Platelet.ToString().Equals("-1"))
            {
                strBody1.Append("<li>Platelet :" + (objDietMaster.Platelet.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.Platelet)));
            }
            if (!objDietMaster.RBC.ToString().Equals("-1"))
            {
                strBody1.Append("<li>RBC :" + (objDietMaster.RBC.ToString().Equals("-1") ? "Normal" : Convert.ToString(objDietMaster.RBC)));
            }
            if (!string.IsNullOrEmpty(objDietMaster.BioChemicalLabNotes.ToString()))
            {
                strBody1.Append("<li>Remark :" + objDietMaster.BioChemicalLabNotes.Replace("\n", "<br/>"));
            }
            if (!string.IsNullOrEmpty(objDietMaster.OthersBioChemicalLabs.ToString()))
            {
                strBody1.Append("<li>Others :" + objDietMaster.OthersBioChemicalLabs.Replace("\n", "<br/>"));
            }

            if (!string.IsNullOrEmpty(strBody1.ToString()))
            {
                strBody.Append("<li>BioChemical Findings");
                strBody.Append("<ul type='square'>" + strBody1 + "</ul>");
            }
            //Comorbidity
            strBody.Append("<li>Comorbidity");
            strBody.Append("<ul type='square'>");
            if (!string.IsNullOrEmpty(objDietMaster.CHF) && !objDietMaster.CHF.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>CHF :" + objDietMaster.CHF);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Asthma) && !objDietMaster.Asthma.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Asthma :" + objDietMaster.Asthma);
            }
            if (!string.IsNullOrEmpty(objDietMaster.SleepApnea) && !objDietMaster.SleepApnea.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Sleep Apnea :" + objDietMaster.SleepApnea);
            }
            if (!string.IsNullOrEmpty(objDietMaster.IHD) && !objDietMaster.IHD.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>IHD :" + objDietMaster.IHD);
            }
            //if (!string.IsNullOrEmpty(objDietMaster.FunctionalStatus))
            //    strBody.Append("<li>Functional Status :" + objDietMaster.FunctionalStatus);
            if (!string.IsNullOrEmpty(objDietMaster.Diabetes) && !objDietMaster.Diabetes.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Diabetes :" + objDietMaster.Diabetes);
            }
            if (!string.IsNullOrEmpty(objDietMaster.LeverDisorders) && !objDietMaster.LeverDisorders.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Liver Disorders :" + objDietMaster.LeverDisorders);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Hypertension) && !objDietMaster.Hypertension.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Hypertension :" + objDietMaster.Hypertension);
            }
            if (!string.IsNullOrEmpty(objDietMaster.CardiacDisorders) && !objDietMaster.Hypertension.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Cardiac Disorders :" + objDietMaster.CardiacDisorders);
            }
            if (!string.IsNullOrEmpty(objDietMaster.KidneyDisorders) && !objDietMaster.KidneyDisorders.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Kidney Disorders :" + objDietMaster.KidneyDisorders);
            }
            if (!string.IsNullOrEmpty(objDietMaster.ComorbidityNotes))
            {
                strBody.Append("<li>Remark :" + objDietMaster.ComorbidityNotes);
            }
            if (!string.IsNullOrEmpty(objDietMaster.ComorbidityOthers))
            {
                strBody.Append("<li>Others :" + objDietMaster.ComorbidityOthers.Replace("\n", "<br/>"));
            }
            strBody.Append("</ul></li>");


            //Clinical Complaints
            strBody.Append("<li>Clinical Complaints</li>");
            strBody.Append("<ul type='square'>");
            if (!string.IsNullOrEmpty(objDietMaster.Heartburn) && !objDietMaster.Heartburn.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Heartburn :" + objDietMaster.Heartburn);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Vomiting) && !objDietMaster.Vomiting.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Vomiting" + objDietMaster.Vomiting);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Bloating) && !objDietMaster.Bloating.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Bloating :" + objDietMaster.Bloating);
            }
            if (!string.IsNullOrEmpty(objDietMaster.LaxativeAntacide) && !objDietMaster.LaxativeAntacide.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Use Any Luxative/Antacid :" + objDietMaster.LaxativeAntacide);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Gas) && !objDietMaster.Gas.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Gas :" + objDietMaster.Gas);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Constipation) && !objDietMaster.Constipation.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Constipation :" + objDietMaster.Constipation);
            }
            if (!string.IsNullOrEmpty(objDietMaster.Diarrhoea) && !objDietMaster.Diarrhoea.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Diarrhoea :" + objDietMaster.Diarrhoea);
            }
            if (!string.IsNullOrEmpty(objDietMaster.HomeRemedy) && !objDietMaster.HomeRemedy.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Follow Home Remedy :" + objDietMaster.HomeRemedy);
            }
            if (!string.IsNullOrEmpty(objDietMaster.TakeVitaminSup) && !objDietMaster.TakeVitaminSup.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Vitamin Suplement :" + objDietMaster.TakeVitaminSup);
                if (!string.IsNullOrEmpty(objDietMaster.VitaminSupDet))
                {
                    strBody.Append("<li>Vitamin Suplement Details :" + objDietMaster.VitaminSupDet);
                }
            }
            if (!string.IsNullOrEmpty(objDietMaster.TakeMineralSup) && !objDietMaster.TakeMineralSup.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Mineral Suplement :" + objDietMaster.TakeMineralSup);
                if (!string.IsNullOrEmpty(objDietMaster.MineralSupDet))
                {
                    strBody.Append("<li>Mineral Suplement Details :" + objDietMaster.MineralSupDet);
                }
            }
            if (!string.IsNullOrEmpty(objDietMaster.OralDrugDType) && !objDietMaster.OralDrugDType.ToUpper().Equals("NO"))
            {
                strBody.Append("<li>Oral Drug Type :" + objDietMaster.OralDrugDType);
                if (!string.IsNullOrEmpty(objDietMaster.OralDrugDet))
                {
                    strBody.Append("<li>Oral Drug  Details :" + objDietMaster.OralDrugDet);
                }
            }
            if (!string.IsNullOrEmpty(objDietMaster.ClinicComplaintsNotes))
            {
                strBody.Append("<li>Remark :" + objDietMaster.ClinicComplaintsNotes.Replace("\n", "<br/>"));
            }
            strBody.Append("</ul>");
            strBody.Append("</ol></td></tr></table><br/>");

            strBody.Append("<table width=100% border='1' cellspacing='0px'><tr class='thead'><td>Diet Type:" + objDietMaster.DietType + "</td></tr>");
            if (!string.IsNullOrEmpty(objDietMaster.ExcersizeDetail))
            {
                strBody.Append("<tr><td>Exercise Details:</td></tr><tr><td>" + objDietMaster.ExcersizeDetail + "</td></tr>");
            }
            strBody.Append("<tr><td class='thead'><b>Medical Nutrition Therapy</b></td></tr><tr><td class='rowcontent'><ol contenteditable='true'><li>Calorie Management:&nbsp;CALORIE_TOTAL</li><li>Protein Management:&nbsp;PROTEIN_TOTAL</li>");
            if (objDietMaster.WeightGainLossMonth != 0)
            {
                strBody.Append("<li>Prevent further " + (objDietMaster.WeightGainLossMonth > 0 ? "weight gain" : "Weight loss") + "</li>");
            }
            if (objDietMaster.Thyroid.ToString().ToUpper() == "YES")
            {
                strBody.Append("<li>control " + objDietMaster.ThyroidType.ToString() + " through Medical management and MNT</li>");
            }
            strBody.Append("</td></tr></table>");
            strBody.Append("<table width=100%><tr><td class='thead'><b> &nbsp;Other Nutrients :</b></td></tr><tr><td class='rowcontent'>Balanced Nutrients as per Recommended Dietary Allowances </td></tr></table><br/><br/>");
            //strBody.Append("<table width=100%><tr><td><b>Diet Recall </b></td></tr></table>");

            DataTable dtFoodListWithID = new DataTable();

            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
            {
                SqlDataAdapter da = new SqlDataAdapter("SELECT  FMnFoodID FoodID,FMsFoodname FoodName,(select FGsGroupName from FoodGroupMaster where FGnGroupId=FMsFoodType) 'FoodType' FROM FoodMaster", con);
                da.Fill(dtFoodListWithID);
            }


            DataTable dtFoodGroupImages = new DataTable();

            using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
            {
                SqlDataAdapter da = new SqlDataAdapter("SELECT  * FROM FoodGroupMaster", con);
                da.Fill(dtFoodGroupImages);
            }
            ////Get Customer Recall Diet Details
            int custID = Convert.ToInt32(PatientID);
            int i      = 0;

            //strBody.Append("<div style='page-break-before: always;'>");
            if (!string.IsNullOrEmpty(objDietMaster.GrainsServings) || !string.IsNullOrEmpty(objDietMaster.DalsServings) || !string.IsNullOrEmpty(objDietMaster.MilkServings) || !string.IsNullOrEmpty(objDietMaster.NonvegServings) || !string.IsNullOrEmpty(objDietMaster.VegetablesServings) ||
                !string.IsNullOrEmpty(objDietMaster.FruitsServings) || !string.IsNullOrEmpty(objDietMaster.SugarServings) || !string.IsNullOrEmpty(objDietMaster.WaterServings) || !string.IsNullOrEmpty(objDietMaster.BiscuitServings))
            {
                strBody.Append("<p style='page-break-before: always;'>&nbsp;</p><table width='90%'><tbody><tr><td><b>Dietary allowance recommended / day:</b></td></tr></tbody></table>");
                strBody.Append("<table border='1' width='90%' style='border-collapse: collapse;margin-top: 20px;' bordercolor='black'><thead><tr><th style='text-align: center' width='30%'>Food Group</th><th style='text-align: center' width='70%'>Servings</th></tr></thead>");
                //<th style='text-align: center'>Images</th></tr>");
                strBody.Append("<tr><td class='firstu'>Grains and Cereals</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.GrainsServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("GRAINS AND CEREALS")).First().Field <string>("FGsDefaultText") : objDietMaster.GrainsServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("GRAINS AND CEREALS") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("GRAINS AND CEREALS")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Dals Pulses and Legumes</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.DalsServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("DALS PULSES AND LEGUMES")).First().Field <string>("FGsDefaultText") : objDietMaster.DalsServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("DALS PULSES AND LEGUMES") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("DALS PULSES AND LEGUMES")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Milk and Milk Products</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.MilkServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("MILK AND MILK PRODUCTS")).First().Field <string>("FGsDefaultText") : objDietMaster.MilkServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("MILK AND MILK PRODUCTS") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("MILK AND MILK PRODUCTS")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Non-vegetarian foods</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.NonvegServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("NON-VEGETARIAN FOODS")).First().Field <string>("FGsDefaultText") : objDietMaster.NonvegServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("NON-VEGETARIAN FOODS") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("NON-VEGETARIAN FOODS")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Vegetables</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.VegetablesServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("VEGETABLES")).First().Field <string>("FGsDefaultText") : objDietMaster.VegetablesServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("VEGETABLES") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("VEGETABLES")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Fruits</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.FruitsServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FRUITS")).First().Field <string>("FGsDefaultText") : objDietMaster.FruitsServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FRUITS") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FRUITS")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Sugar</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.SugarServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("SUGAR")).First().Field <string>("FGsDefaultText") : objDietMaster.SugarServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("SUGAR") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("SUGAR")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Fat</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.FatServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FAT")).First().Field <string>("FGsDefaultText") : objDietMaster.FatServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FAT") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("FAT")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Water</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + (string.IsNullOrEmpty(objDietMaster.WaterServings) ? dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("WATER")).First().Field <string>("FGsDefaultText") : objDietMaster.WaterServings).Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("WATER") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("WATER")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("<tr><td class='firstu'>Miscellaneous</td>");
                strBody.Append("<td class='secondu'><p contenteditable='true'>" + objDietMaster.BiscuitServings.Replace("\n", "<br/>") + "</p></td>");
                //if (dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("BISCUIT") && !string.IsNullOrEmpty(Convert.ToString(x["FGsImage"]))).Count() > 0)
                //    strBody.Append("<td><img src='../Upload/FoodGroup/" + dtFoodGroupImages.AsEnumerable().Where(x => Convert.ToString(x["FGsGroupName"]).ToUpper().Equals("BISCUIT")).First().Field<string>("FGsImage") + "' height=50px width=50px></td></tr>");
                //else
                //    strBody.Append("<td></td></tr>");
                strBody.Append("</tr>");
                strBody.Append("</table><br/>");
            }
            //strBody.Append("</div>");

            strBody.Append("<table width=90% border='1' cellspacing='0px'><tr><td class='thead'><b>Meal Plan</b></td></tr></table><br/>");
            //strBody.Append("<table width=90%><tr><td>You are recommended to follow a <b>CALORIE_TOTAL</b> Calorie diet plan to reach the desired weight.");
            //strBody.Append("Here is sample menu options to help you understand your diet.</td></tr></table><br/><br/><br/>");
            strBody.Append("<table border='1' width='90%' style='border-collapse: collapse;margin-top: 20px;' bordercolor='black'><thead><tr><th align=center width='10%' bgcolor='darksalmon' ><b>Time</b></th><th align=center width='30%' bgcolor='darksalmon'><b>Exchange</b></th><th align=center width='60%' bgcolor='darksalmon'><b>Diet Chart</b></th></tr></thead>");
            DataTable dtRecommendedDietDetail = new DataTable();

            dtRecommendedDietDetail = new RecommendedDietManager().GetRecommendedDietDetails(custID);

            List <RecommendedDietDetails> lstRecommendedDietDetails = new List <RecommendedDietDetails>();

            foreach (DataRow drRecommendedDiet in dtRecommendedDietDetail.Rows)
            {
                RecommendedDietDetails objRecommendedDietDetails = new RecommendedDietDetails();
                objRecommendedDietDetails.CustomerID = custID;
                objRecommendedDietDetails.VisitDate  = Convert.ToDateTime(drRecommendedDiet["VisitDate"]);
                objRecommendedDietDetails.Notes      = Convert.ToString(drRecommendedDiet["Notes"]);

                List <MealDetails> lstMealDetails = new List <MealDetails>();
                for (int mealID = 1; mealID <= 12; mealID++)
                {
                    string   mealName = "Meal" + mealID;
                    string[] mealDetailSeperatingChars         = { "@@" };
                    char[]   mealFoodItemSeperatingChars       = { '~' };
                    char[]   mealFoodItemDetailSeperatingChars = { '|' };

                    string[] strMealDetails = Convert.ToString(drRecommendedDiet[mealName]).Split(mealDetailSeperatingChars, StringSplitOptions.None);

                    MealDetails objMealDetails = new MealDetails();
                    objMealDetails.MealName = mealName;
                    objMealDetails.Time     = Convert.ToDateTime(strMealDetails[0]);
                    objMealDetails.Days     = Convert.ToString(strMealDetails[1]);

                    List <MealFoodDetails> lstMealFoodDetails = new List <MealFoodDetails>();
                    string[] strMealFoodDetails = Convert.ToString(strMealDetails[2]).Split(mealFoodItemSeperatingChars, StringSplitOptions.RemoveEmptyEntries);

                    if (strMealFoodDetails.Count() > 0)
                    {
                        //strBody.Append("<tr><td align=center><b><h4>" + "Meal " + mealID + " - " + Convert.ToDateTime(objMealDetails.Time).ToShortTimeString() + "</h4></b></td>");
                        strBody.Append("<tr><td align=center class='firstu' width='20%'><b><h4>" + Convert.ToDateTime(objMealDetails.Time).ToShortTimeString() + "</h4></b></td>");
                    }
                    else
                    {
                        continue;
                    }

                    i = 0;
                    string remark = string.Empty;
                    foreach (String strFoodItem in strMealFoodDetails)
                    {
                        MealFoodDetails objMealFoodDetails = new MealFoodDetails();
                        string[]        strFoodItemDetail  = strFoodItem.Split(mealFoodItemDetailSeperatingChars, StringSplitOptions.None);

                        var    foodRows    = dtFoodListWithID.Select("FoodID = " + Convert.ToInt16(strFoodItemDetail[0]));
                        string strFoodName = Convert.ToString(foodRows[0]["FoodName"]);


                        DataTable dtFoodNutrients = new DataTable();
                        dtFoodNutrients = new FoodMasterManager().GetFoodMajorNutrients(strFoodName, Convert.ToDouble(strFoodItemDetail[1]), Convert.ToString(strFoodItemDetail[2]));
                        CalorieTotal   += Convert.ToDouble(dtFoodNutrients.Rows[0]["Energy"]);
                        ProteinTotal   += Convert.ToDouble(dtFoodNutrients.Rows[0]["Protein"]);

                        if (i == 0)
                        {
                            strBody.Append("<td class='middleu' width='40%'>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "<br/>");
                        }
                        else
                        {
                            strBody.Append(strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "<br/>");
                        }
                        i++;
                        remark = remark + (Convert.ToString(strFoodItemDetail[3]) + "<br/>");
                    }
                    strBody.Append("</td><td class='secondu' width='40%'>" + remark + "</td></tr>");
                }
            }
            strBody.Append("</table><br/><br/>");
            //}

            strBody.Append("<p style='page-break-before: always;'>&nbsp;</p><table><tbody><tr><td><b>Things to Remember :</b></td></tr></tbody></table>");
            strBody.Append("<div id='ThingsRemember'><table width=90% border='1' cellspacing='0px'><tr><td class='rowcontent'><ol contenteditable='true'><li>Suspected food allergens are dairy, soy, gluten.(you need to be cautious with these foods.) eat small meals if it doesn't  bother you can increase the intake</li>");
            strBody.Append("<li>Take adequate rest</li><li>Drink water</li><li>If you feel muscle spasms  include calcium supplement's/ and monitor vitamin D and B12</li><li>Exercise:  walk/swim 45 minutes /daily</li></td></tr></table></div>");
            strBody.Append("<table width=90% border='1' cellspacing='0px'><tr><td class='thead'><b>Supplements Advised:</b></td></tr><tr><td class='firstu'> <p id='pgSupplements' onblur='return ManageEditableContents();' contenteditable='true'>Nil{SUPPLEMENTS}</p><br/></td></tr></table>");
            strBody.Append("<table width=90% border='1' cellspacing='0px'><tr><td class='thead'><b>Investigation Advised:</b></td></tr></table><p id='pgInvestigations' onblur='return ManageEditableContents();' contenteditable='true'>{INVESTIGATION}</p><br/>");
            strBody.Append("<table width=90% border='1' cellspacing='0px'><tr><td class='thead'><b>Follow up date :</b></td></tr><tr><td class='firstu'><p contenteditable='true'>After 15 days with weight and improvement symptoms.</p></td></tr></table><br/><br/>");
            strBody.Append("<table width=90% border='1' cellspacing='0px'><tr><td>PH_USER</td></tr><tr><td>Consultant Nutritionist & Registered Dietician</td></tr><tr><td class='firstu'>PH_CLINIC</td></tr><tr><td class='firstu'><p contenteditable='true'>Mob No:&nbsp;PH_MOB</p><br/><br/></td></tr></table>");
            strBody.Append("</div>");
            strBody.Append("</div>");
            //</body></html>");
            //strBody.Replace("CALORIE_TOTAL", Convert.ToString(CalorieTotal) + " (g)");
            //strBody.Replace("PROTEIN_TOTAL", Convert.ToString(ProteinTotal) + " (kcal)");
            return(strBody.ToString());
        }
Exemplo n.º 4
0
        protected static string bindhistory(int i, string date, string date2)
        {
            int j = 0;

            System.Text.StringBuilder strBody = new System.Text.StringBuilder("");
            if (dtSearchMaster.Tables[0].Rows.Count > i)
            {
                strBody.Append("<table align='center' width='100%'><tr><td colspan='4' align='center'><b>" + Convert.ToString(dtSearchMaster.Tables[0].Rows[i]["CDsCustName"]) + " " + Convert.ToString(dtSearchMaster.Tables[0].Rows[i]["CDsLastName"]) + "</b></td></tr>");
                strBody.Append("<tr><td align='left'>Patient ID :" + Convert.ToString(dtSearchMaster.Tables[0].Rows[i]["CDnCustomerIDPK"]) + "</td><td colspan='2'>DOB:" + String.Format("{0:dd-MMM-yyyy}", Convert.ToDateTime(dtSearchMaster.Tables[0].Rows[i]["CDdtDOB"])) + "</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[0].Rows[i]["CDnCustAge"]) + "Y/" + (Convert.ToString(dtSearchMaster.Tables[0].Rows[i]["CDnGender"]) == "0" ? "M" : "F") + "</td></tr></table>");
                strBody.Append("<hr size='1' width='100%'>");
            }
            //Anthropometics
            for (j = 0; j < dtSearchMaster.Tables[1].Rows.Count; j++)
            {
                if (String.Format("{0:dd-MMM-yyyy(HH:mm)}", Convert.ToDateTime(dtSearchMaster.Tables[1].Rows[j]["AMdtUpdated"])).Equals(date))
                {
                    strBody.Append(" <table  align='center' width='100%'><tr><td colspan='3' align='center'><b>Anthropometics</b></td></tr><tr><td align='left'>Measured Wt. " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnMeasWt"]) + " kg</td><td align='right'>BMI " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnCalculatedBMI"]) + "</td><td colspan=2 align='right'>BMI Category " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnBMICat"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Measured Ht. " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnMeasHt"]) + " m</td><td align='right'>MUAC " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnMUAC"]) + "cm</td><td align='right'>Measured Waist " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnMeasWaist"]) + "cm</td></tr>");
                    strBody.Append("<tr><td align='left'>Ideal Body Wt. " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnIdealBodyWt"]) + " kg</td><td align='right'>Neck Circumference " + Convert.ToString(dtSearchMaster.Tables[1].Rows[j]["AMnNeckCircum"]) + "</td><td align='right'></td></tr>");
                    strBody.Append("</table>");
                    break;
                }
            }
            for (j = 0; j < dtSearchMaster.Tables[2].Rows.Count; j++)
            {
                //Bio Chemical Labs
                if (String.Format("{0:dd-MMM-yyyy(HH:mm)}", Convert.ToDateTime(dtSearchMaster.Tables[2].Rows[j]["BCLdtUpdated"])).Equals(date))
                {
                    strBody.Append("<hr size='1' width='100%'>");
                    strBody.Append("<table align='center' width='100%'><tr><td colspan='9' align='center'><b>Bio Chemical Labs</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Fasting Glucose</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnFastingGluc"]) + "</td><td align='left'>mg/dL</td>");
                    strBody.Append("<td align='left'>Creatinine</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnCreatinine"]) + "</td><td align='left'>g/dL</td>");
                    strBody.Append("<td align='left'>Albumin</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnAlbumin"]) + "</td><td align='left'>g/dL</td></tr>");
                    strBody.Append("<tr><td align='left'>HbA1C</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnHbA1C"]) + "</td><td align='left'>%</td>");
                    strBody.Append("<td align='left'>ALT (SGPT)</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnAltSGPT"]) + "</td><td align='left'>IU/L</td>");
                    strBody.Append("<td align='left'>ALT (SGOT)</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnAltSGOT"]) + "</td></td><td align='left'>IU/L</td></tr>");
                    strBody.Append("<tr><td align='left'>Hematocrit</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnHematocrit"]) + "</td><td align='left'>(%)</td>");
                    strBody.Append("<td align='left'>Triglycerides</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnTriglycerides"]) + "</td><td align='left'>mg/dL</td>");
                    strBody.Append("<td align='left'>HDL</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnHDL"]) + "</td><td align='left'>mg/dL</td></tr>");
                    strBody.Append("<tr><td align='left'>Total Cholesterol</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnTotCholesterol"]) + "</td><td align='left'>mg/dL</td>");
                    strBody.Append("<td align='left'>Alkaline Phosphatase</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnAlkalinePhosphatase"]) + "</td><td align='left'>IU/L</td>");
                    strBody.Append("<td align='left'>Vitamin D3</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnVitaminD3"]) + "</td><td align='left'></td></tr>");
                    strBody.Append("<tr><td align='left'>Vitamin B12</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLnVitaminB12"]) + "</td><td align='left'></td>");
                    strBody.Append("<td align='left'>Others</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[2].Rows[j]["BCLsOthers"]) + "</td><td align='left'></td></tr></table>");
                    break;
                }
            }
            for (j = 0; j < dtSearchMaster.Tables[3].Rows.Count; j++)
            {
                //COMORBIDITY
                if (String.Format("{0:dd-MMM-yyyy(HH:mm)}", Convert.ToDateTime(dtSearchMaster.Tables[3].Rows[j]["CBdtUpdated"])).Equals(date))
                {
                    strBody.Append("<hr size='1' width='100%'>");
                    strBody.Append("<table align='center' width='100%'><tr><td colspan='4' align='center' ><b>Comorbidity</b></td></tr>");
                    strBody.Append("<tr><td align='left'>CHF :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsCHF"]) + "</td><td>Asthma :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsAsthma"]) + "</td>");
                    strBody.Append("<td>Thyroid :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsThyroid"]) + "</td><td align='right'>IHD :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsIHD"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left' colspan='4'>Functional Status :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsFunctionalStatus"]) + "</td></tr>");
                    strBody.Append("<tr><td colspan='4' align='center'><b>Chronic Diseases</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Diabetes :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsDiabetes"]) + "</td><td>Liver Disorders :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsLeverDis"]) + "</td>");
                    strBody.Append("<td>Hypertension :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsHypertension"]) + "</td><td align='right'>Cardiac Disorders :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsCardiacDis"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Kidney Disorders :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsKidneyDis"]) + "</td><td>Followed Perticular Diet Details :" + Convert.ToString(dtSearchMaster.Tables[3].Rows[j]["CBsParticularProbDet"]) + "</td></tr></table>");
                    break;
                }
            }
            for (j = 0; j < dtSearchMaster.Tables[4].Rows.Count; j++)
            {
                if (String.Format("{0:dd-MMM-yyyy(HH:mm)}", Convert.ToDateTime(dtSearchMaster.Tables[4].Rows[j]["DLdtUpdated"])).Equals(date))
                {
                    //Diet And Lifestyle
                    strBody.Append("<hr size='1' width='100%'>");
                    strBody.Append("<table  align='center' width='100%'><tr><td colspan='4' align='center'><b>Diet And Lifestyle</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Regular Execise</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLsRegExersize"]) + "</td><td align='right'>Alcohol</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLsAlcohol"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Smoking</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLsSmoking"]) + "</td><td align='right'>Sleep Hours Per Day</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLnSleepPerDay"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Exercise Detail</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLsExcersizeDetail"]) + "</td><td></td><td></td></tr>");
                    strBody.Append("<tr><td colspan='4' align='left'><b>Diet History</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Diet Type</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsDietType"]) + "</td><td align='right'>Eat When Stress</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsStressEat"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Frequency Of Outside Eat</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsFreqOutEat"]) + "</td><td align='right'>Eat When Bored</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsBoredEat"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Typical Meal in Day</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHnTypicalMealDay"]) + "</td><td align='right'>Do You Have Breakfast Everyday</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsBreakfast"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Typical Snax in Day</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHnTypicalSnaxDay"]) + "</td><td align='right'>Eat when watching TV	</td><td align='right'>"+ Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsWatchTVEat"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Caloric Beverages</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsCaloricbeverages"]) + "</td><td align='right'>Tried Wt. Loss Diet Before</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsWtLossDiet"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Wt. Loss/Gain in Sixth Month</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DHsWtLossGainSixMon"]) + "</td><td></td><td></td></tr>");
                    strBody.Append("<tr><td colspan='6' align='left'><b>Fat and Oil</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Oil Detail</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLsOilUseDetail"]) + "</td><td align='right'>Oil Quantity in Month</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLnOilQuantityMonth"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>No of Family Members</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLnMembersInFamily"]) + "</td><td align='right'>Sugar Quantity in Month</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[4].Rows[j]["DLnSugarQuantity"]) + "</td></tr></table>");
                    break;
                }
            }
            for (j = 0; j < dtSearchMaster.Tables[5].Rows.Count; j++)
            {
                //Clinical Complaints
                if (String.Format("{0:dd-MMM-yyyy(HH:mm)}", Convert.ToDateTime(dtSearchMaster.Tables[5].Rows[j]["CCdtUpdated"])).Equals(date))
                {
                    strBody.Append("<hr size='1' width='100%'>");
                    strBody.Append("<table align='center' width='100%'><tr><td colspan='6' align='center'><b>Clinical Complaints</b></td></tr>");
                    strBody.Append("<tr><td colspan='6' align='left'><b>Gastrointestinal Problems</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Heartburn </td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsHeartburn"]) + "</td><td align='right'>Vomiting</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsVomiting"]) + "</td>");
                    strBody.Append("<td align='right'>Bloating</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsBloating"]) + "</td><tr><tr><td align='left'>Use Any Luxative/Antacid</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsConstipation"]) + "</td>");
                    strBody.Append("<td align='right'>Gas</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsGas"]) + "</td><td align='right'>Constipation</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsLaxaAnta"]) + "</td></tr>");
                    strBody.Append("<tr><td align='left'>Diarrhoea</td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsDiarrhoea"]) + "</td><td align='right'>Follow Home Remedy</td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["GPsHomeRem"]) + "</td></tr>");
                    strBody.Append("<td colspan='4' align='left'><b>Medication</b></td></tr>");
                    strBody.Append("<tr><td align='left'>Vitamin Suplement </td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsVitaminSup"]) + "</td><td align='right'>Vitamin Suplement Details</td> <td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsVitaminSupDet"]) + "</td>");
                    strBody.Append("<td align='right'>Mineral Suplement </td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsMineralSup"]) + "</td></tr><tr><td align='left'>Mineral Suplement Details </td><td align='left'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsMineralSupDet"]) + "</td>");
                    strBody.Append("<td align='right'>Oral Drug Type </td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsOralDrugType"]) + "</td><td align='right'>Oral Drug  Details </td><td align='right'>" + Convert.ToString(dtSearchMaster.Tables[5].Rows[j]["MCsOralDrugDet"]) + "</td></tr></table>");
                    break;
                }
            }
            ///Recall diet Details
            DataTable dtFoodListWithID = new FoodMasterManager().GetFoodListWithID();
            //Get Customer Recall Diet Details
            int       custID             = Convert.ToInt32(HttpContext.Current.Session["PatientID"]);
            int       k                  = 0;
            DataTable dtRecallDietDetail = new DataTable();

            dtRecallDietDetail = new RecallDietManager().GetRecallDietDetailsHistory(custID, date2);
            if (dtRecallDietDetail.Rows.Count > 0)
            {
                strBody.Append("<hr size='1' width='100%'>");
                strBody.Append("<table width=90%><tr><td><b>Recall Diet</b></td></tr></table><br/>");
                strBody.Append("<table border=1 width=90%  align=center cellpadding='2'><tr><td align=center><b>Meals</b></td><td align=center><b>Meal Details</b></td><td align=center><b>Diet Chart</b></td></tr>");

                List <RecallDietDetails> lstRecallDietDetails = new List <RecallDietDetails>();
                foreach (DataRow drRecallDiet in dtRecallDietDetail.Rows)
                {
                    RecallDietDetails objRecallDietDetails = new RecallDietDetails();
                    objRecallDietDetails.CustomerID = custID;
                    objRecallDietDetails.VisitDate  = Convert.ToDateTime(drRecallDiet["VisitDate"]);
                    objRecallDietDetails.Notes      = Convert.ToString(drRecallDiet["Notes"]);
                    List <MealDetails> lstMealDetails = new List <MealDetails>();

                    for (int mealID = 1; mealID <= 12; mealID++)
                    {
                        string   mealName = "Meal" + mealID;
                        string[] mealDetailSeperatingChars         = { "@@" };
                        char[]   mealFoodItemSeperatingChars       = { '~' };
                        char[]   mealFoodItemDetailSeperatingChars = { '|' };

                        string[]    strMealDetails = Convert.ToString(drRecallDiet[mealName]).Split(mealDetailSeperatingChars, StringSplitOptions.None);
                        MealDetails objMealDetails = new MealDetails();
                        objMealDetails.MealName = mealName;
                        objMealDetails.Time     = Convert.ToDateTime(strMealDetails[0]);
                        objMealDetails.Days     = Convert.ToString(strMealDetails[1]);

                        List <MealFoodDetails> lstMealFoodDetails = new List <MealFoodDetails>();
                        string[] strMealFoodDetails = Convert.ToString(strMealDetails[2]).Split(mealFoodItemSeperatingChars, StringSplitOptions.RemoveEmptyEntries);

                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("<tr><td align=center><b>" + "Meal " + mealID + " (" + Convert.ToDateTime(objMealDetails.Time).ToShortTimeString() + ")</b></td>");
                        }
                        k = 0;
                        string remark = string.Empty;
                        foreach (String strFoodItem in strMealFoodDetails)
                        {
                            MealFoodDetails objMealFoodDetails = new MealFoodDetails();
                            string[]        strFoodItemDetail  = strFoodItem.Split(mealFoodItemDetailSeperatingChars, StringSplitOptions.None);

                            var    foodRows    = dtFoodListWithID.Select("FoodID = " + Convert.ToInt16(strFoodItemDetail[0]));
                            string strFoodName = Convert.ToString(foodRows[0]["FoodName"]);
                            if (k == 0)
                            {
                                strBody.Append("<td><ul><li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }
                            else
                            {
                                strBody.Append("<li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }
                            ++k;
                            remark = remark + ("&nbsp;&nbsp;" + Convert.ToString(strFoodItemDetail[3]) + "<br/>");
                        }
                        //strBody.Append("</td></tr></table>");
                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("</ul></td><td>" + remark + "</td></tr>");
                        }
                    }
                    strBody.Append("</table>");
                }
            }

            //Recommended Diet
            DataTable dtRecommendedDietDetail = new DataTable();

            dtRecommendedDietDetail = new RecommendedDietManager().GetRecommendedDietDetailsHistory(custID, date2);
            List <RecommendedDietDetails> lstRecommendedDietDetails = new List <RecommendedDietDetails>();

            if (dtRecommendedDietDetail.Rows.Count > 0)
            {
                strBody.Append("<hr size='1' width='100%'>");
                strBody.Append("<table width=90%><tr><td><b>Recommended Diet</b></td></tr></table><br/>");
                strBody.Append("<table border=1 width=90% align=center cellpadding='2'><tr><td align=center><b>Meals</b></td><td align=center><b>Meal Details</b></td><td align=center><b>Diet Chart</b></td></tr>");

                foreach (DataRow drRecommendedDiet in dtRecommendedDietDetail.Rows)
                {
                    RecommendedDietDetails objRecommendedDietDetails = new RecommendedDietDetails();
                    objRecommendedDietDetails.CustomerID = custID;
                    objRecommendedDietDetails.VisitDate  = Convert.ToDateTime(drRecommendedDiet["VisitDate"]);
                    objRecommendedDietDetails.Notes      = Convert.ToString(drRecommendedDiet["Notes"]);

                    List <MealDetails> lstMealDetails = new List <MealDetails>();
                    for (int mealID = 1; mealID <= 12; mealID++)
                    {
                        string   mealName = "Meal" + mealID;
                        string[] mealDetailSeperatingChars         = { "@@" };
                        char[]   mealFoodItemSeperatingChars       = { '~' };
                        char[]   mealFoodItemDetailSeperatingChars = { '|' };

                        string[] strMealDetails = Convert.ToString(drRecommendedDiet[mealName]).Split(mealDetailSeperatingChars, StringSplitOptions.None);

                        MealDetails objMealDetails = new MealDetails();
                        objMealDetails.MealName = mealName;
                        objMealDetails.Time     = Convert.ToDateTime(strMealDetails[0]);
                        objMealDetails.Days     = Convert.ToString(strMealDetails[1]);

                        List <MealFoodDetails> lstMealFoodDetails = new List <MealFoodDetails>();
                        string[] strMealFoodDetails = Convert.ToString(strMealDetails[2]).Split(mealFoodItemSeperatingChars, StringSplitOptions.RemoveEmptyEntries);

                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("<tr><td align=center><b>" + "Meal " + mealID + " (" + Convert.ToDateTime(objMealDetails.Time).ToShortTimeString() + ")</b></td>");
                        }

                        k = 0;
                        string remark = string.Empty;
                        foreach (String strFoodItem in strMealFoodDetails)
                        {
                            MealFoodDetails objMealFoodDetails = new MealFoodDetails();
                            string[]        strFoodItemDetail  = strFoodItem.Split(mealFoodItemDetailSeperatingChars, StringSplitOptions.None);

                            var    foodRows    = dtFoodListWithID.Select("FoodID = " + Convert.ToInt16(strFoodItemDetail[0]));
                            string strFoodName = Convert.ToString(foodRows[0]["FoodName"]);

                            if (k == 0)
                            {
                                strBody.Append("<td><ul><li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }
                            else
                            {
                                strBody.Append("<li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }

                            k++;
                            remark = remark + ("&nbsp;&nbsp;" + Convert.ToString(strFoodItemDetail[3]) + "<br/>");
                        }
                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("</ul></td><td>" + remark + "</td></tr>");
                        }
                    }
                    strBody.Append("</table>");
                }
            }

            return(strBody.ToString());
        }
Exemplo n.º 5
0
        protected static string bindRecommended(int i, string date)
        {
            System.Text.StringBuilder strBody = new System.Text.StringBuilder("");

            DataTable dtFoodListWithID = new FoodMasterManager().GetFoodListWithID();
            //Get Customer Recall Diet Details
            int custID = Convert.ToInt32(HttpContext.Current.Session["PatientID"]);
            int k      = 0;

            //Recommended Diet
            DataTable dtRecommendedDietDetail = new DataTable();

            dtRecommendedDietDetail = new RecommendedDietManager().GetRecommendedDietDetailsHistory(custID, date);
            List <RecommendedDietDetails> lstRecommendedDietDetails = new List <RecommendedDietDetails>();

            if (dtRecommendedDietDetail.Rows.Count > 0)
            {
                //strBody.Append("<hr size='1' width='100%'>");
                //strBody.Append("<table width=90%><tr><td><b>Recommended Diet</b></td></tr></table><br/>");
                strBody.Append("<table border=1 width=90% align=center><tr><td align=center><b>Meals</b></td><td align=center><b>Meal Details</b></td></tr>");

                foreach (DataRow drRecommendedDiet in dtRecommendedDietDetail.Rows)
                {
                    RecommendedDietDetails objRecommendedDietDetails = new RecommendedDietDetails();
                    objRecommendedDietDetails.CustomerID = custID;
                    objRecommendedDietDetails.VisitDate  = Convert.ToDateTime(drRecommendedDiet["VisitDate"]);
                    objRecommendedDietDetails.Notes      = Convert.ToString(drRecommendedDiet["Notes"]);

                    List <MealDetails> lstMealDetails = new List <MealDetails>();
                    for (int mealID = 1; mealID <= 12; mealID++)
                    {
                        string   mealName = "Meal" + mealID;
                        string[] mealDetailSeperatingChars         = { "@@" };
                        char[]   mealFoodItemSeperatingChars       = { '~' };
                        char[]   mealFoodItemDetailSeperatingChars = { '|' };

                        string[] strMealDetails = Convert.ToString(drRecommendedDiet[mealName]).Split(mealDetailSeperatingChars, StringSplitOptions.None);

                        MealDetails objMealDetails = new MealDetails();
                        objMealDetails.MealName = mealName;
                        objMealDetails.Time     = Convert.ToDateTime(strMealDetails[0]);
                        objMealDetails.Days     = Convert.ToString(strMealDetails[1]);

                        List <MealFoodDetails> lstMealFoodDetails = new List <MealFoodDetails>();
                        string[] strMealFoodDetails = Convert.ToString(strMealDetails[2]).Split(mealFoodItemSeperatingChars, StringSplitOptions.RemoveEmptyEntries);

                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("<tr><td align=center><b>" + "Meal " + mealID + " (" + Convert.ToDateTime(objMealDetails.Time).ToShortTimeString() + ")</b></td>");
                        }

                        k = 0;
                        foreach (String strFoodItem in strMealFoodDetails)
                        {
                            MealFoodDetails objMealFoodDetails = new MealFoodDetails();
                            string[]        strFoodItemDetail  = strFoodItem.Split(mealFoodItemDetailSeperatingChars, StringSplitOptions.None);

                            var    foodRows    = dtFoodListWithID.Select("FoodID = " + Convert.ToInt16(strFoodItemDetail[0]));
                            string strFoodName = Convert.ToString(foodRows[0]["FoodName"]);

                            if (k == 0)
                            {
                                strBody.Append("<td><ul><li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }
                            else
                            {
                                strBody.Append("<li>" + strFoodName + " " + strFoodItemDetail[1] + " " + strFoodItemDetail[2] + "</li>");
                            }

                            k++;
                        }
                        if (strMealFoodDetails.Count() > 0)
                        {
                            strBody.Append("</ul></td></tr>");
                        }
                    }
                    strBody.Append("</table>");
                }
            }

            return(strBody.ToString());
        }