Пример #1
0
        public Precription ViewPricripion(int QueueId, string CPno)
        {
            try
            {
                SqlParameter[] sqlparam;
                sqlparam    = new SqlParameter[3];
                sqlparam[0] = new SqlParameter("@flag", "7");
                sqlparam[1] = new SqlParameter("@QueueId", QueueId);
                sqlparam[2] = new SqlParameter("@CPno", CPno);
                DataSet     ds = CommonFunction.GetDataSet("USP_Get_Precription", sqlparam, "");
                Precription p  = new Precription();
                if (ds != null && ds.Tables[7].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[7];
                    foreach (DataRow dr in dt.Rows)
                    {
                        CommonFunction.ReflectSingleData(p, dr);
                    }
                }

                List <Observation> olst = new List <Observation>();
                if (ds != null && ds.Tables[3].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[3];
                    foreach (DataRow dr in dt.Rows)
                    {
                        Observation Model = new Observation();
                        CommonFunction.ReflectSingleData(Model, dr);

                        olst.Add(Model);
                    }
                }
                List <Medication> mlst = new List <Medication>();
                if (ds != null && ds.Tables[4].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[4];
                    foreach (DataRow dr in dt.Rows)
                    {
                        Medication Model = new Medication();
                        CommonFunction.ReflectSingleData(Model, dr);

                        mlst.Add(Model);
                    }
                }
                List <Common> clst = new List <Common>();

                if (ds != null && ds.Tables[5].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[5];
                    foreach (DataRow dr in dt.Rows)
                    {
                        Common Model = new Common();
                        CommonFunction.ReflectSingleData(Model, dr);

                        clst.Add(Model);
                    }
                }
                List <Common> NextList = new List <Common>();
                if (ds != null && ds.Tables[6].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[6];
                    foreach (DataRow dr in dt.Rows)
                    {
                        Common Model1 = new Common();
                        CommonFunction.ReflectSingleData(Model1, dr);

                        NextList.Add(Model1);
                    }
                }
                List <NestVisitlst> NextListlst = new List <NestVisitlst>();
                if (ds != null && ds.Tables[6].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[6];
                    foreach (DataRow dr in dt.Rows)
                    {
                        NestVisitlst Model1 = new NestVisitlst();
                        CommonFunction.ReflectSingleData(Model1, dr);

                        NextListlst.Add(Model1);
                    }
                }
                //List<VitalInformation> vlst = new List<VitalInformation>();
                //if (ds != null && ds.Tables[3].Rows.Count > 0)
                //{
                //    DataTable dt = ds.Tables[3];
                //    foreach (DataRow dr in dt.Rows)
                //    {
                //        VitalInformation Model = new VitalInformation();
                //        CommonFunction.ReflectSingleData(Model, dr);

                //        vlst.Add(Model);
                //    }
                //}
                List <VitalInformation> VList = new List <VitalInformation>();
                if (ds != null && ds.Tables[2].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[2];
                    foreach (DataRow dr in dt.Rows)
                    {
                        VitalInformation Model1 = new VitalInformation();
                        CommonFunction.ReflectSingleData(Model1, dr);

                        VList.Add(Model1);
                    }
                }

                p.vlist       = VList;
                p.olist       = olst;
                p.mlist       = mlst;
                p.clist       = clst;
                p.NextList    = NextList;
                p.NextListlst = NextListlst;


                return(p);
            }
            catch (Exception Ex)
            {
                throw Ex;
            }
        }
        public ActionResult ManageVitalInformation(VitalInformation VI)
        {
            AdminDetails      admObj         = (AdminDetails)Session["UserDetails"];
            PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"];

            ModelState.Clear();
            VI.HospitalId  = patientDETAILS.HospitalId.ToString();
            VI.CreatedBy   = admObj.UserId;
            VI.PatientId   = patientDETAILS.Id;
            VI.CasePaperNo = patientDETAILS.CasePapaerNo;

            //Ob.CasePaperNo =
            int Flag = BM.ManageVitalInformation(VI);

            //if (Flag > 0)
            //{
            //    List<VitalInformation> vi = new List<VitalInformation>();
            //    VitalInformation v = new VitalInformation();

            //    vi = BM.GetVitalInformation(patientDETAILS.CasePapaerNo);
            //    var viralInfo = vi.FirstOrDefault(x => x.CasePaperNo == patientDETAILS.CasePapaerNo);
            //    if (viralInfo != null)
            //    {
            //        v.BloodPressure = viralInfo.BloodPressure;
            //        v.Temperature = viralInfo.Temperature;
            //        v.BloodGlucosePostPrandial = viralInfo.BloodGlucosePostPrandial;
            //        v.Weight = viralInfo.Weight;
            //        v.Height = viralInfo.Height;
            //        v.BloodGlucoseFasting = viralInfo.BloodGlucoseFasting;
            //        v.BloodlucoseRandom = viralInfo.BloodlucoseRandom;
            //        v.BloodUrea = viralInfo.BloodUrea;
            //        v.Creatinine = viralInfo.Creatinine;
            //        v.UricAcidM = viralInfo.UricAcidM;
            //        v.HB = viralInfo.HB;
            //        v.PCV = viralInfo.PCV;
            //        v.WBCCount = viralInfo.WBCCount;
            //        v.PlateletCount = viralInfo.PlateletCount;
            //        v.ESR = viralInfo.ESR;
            //        v.RBCCount = viralInfo.RBCCount;
            //        v.MCH = viralInfo.MCH;
            //        v.MCHC = viralInfo.MCHC;
            //        v.Lymphocyte = viralInfo.Lymphocyte;
            //        v.Eosinophil = viralInfo.Eosinophil;
            //        v.SerumBilirubin = viralInfo.SerumBilirubin;
            //        v.SGPTALT = viralInfo.SGPTALT;
            //        v.GGPT = viralInfo.GGPT;
            //        v.TotalProtein = viralInfo.TotalProtein;
            //        v.SerumAlbumin = viralInfo.SerumAlbumin;
            //        v.Globulin = viralInfo.Globulin;
            //        v.AlkalinePhosphatase = viralInfo.AlkalinePhosphatase;
            //        v.SGOT = viralInfo.SGOT;
            //        v.TotalCholesterol = viralInfo.TotalCholesterol;
            //        v.HDLCholestero = viralInfo.HDLCholestero;
            //        v.LDLCholesterol = viralInfo.LDLCholesterol;
            //        v.Triglycerides = viralInfo.Triglycerides;
            //        v.NonHDL = viralInfo.NonHDL;
            //        v.HbA1c = viralInfo.HbA1c;
            //        v.TSH = viralInfo.TSH;
            //        v.SPO2 = viralInfo.SPO2;
            //        v.RR = viralInfo.RR;
            //        v.HeadCircumference = viralInfo.HeadCircumference;
            //       // return View("VitalInformation",v);
            //        //return RedirectToAction("OpdPrescription", "MyOPD");
            //    }
            //    return View("VitalInformation", viralInfo);


            //}
            //return View("VitalInformation");
            return(RedirectToAction("PatientVitalInformation", "MyOPD"));
        }
Пример #3
0
 public int ManageVitalInformation(VitalInformation VI)
 {
     return DM.ManageVitalInformation(VI);
 }