// GET: Tab_Precreption


        public ActionResult ViewPreription()
        {
            Bal_Precription   bp             = new Bal_Precription();
            PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"];
            Medication        MD             = new Medication();
            //Load lime always null not requird get data'
            Precription pd = new Precription();

            pd = bp.ViewPricripion(patientDETAILS.QueueId, patientDETAILS.CasePapaerNo);

            return(View("Examination", pd));
        }
Exemplo n.º 2
0
        public ActionResult OpdExamination()
        {
            Bal_Precription   bp             = new Bal_Precription();
            PatientAllDetails patientDETAILS = (PatientAllDetails)Session["patientDetails"];
            Precription       pd             = new Precription();

            pd = bp.ViewPricripion(patientDETAILS.QueueId, patientDETAILS.CasePapaerNo);
            var Advice          = "";
            var Complaints      = "";
            var Diagnosis       = "";
            var TestBeforeVisit = "";
            var NextVisit       = "";

            if (pd.clist.Count > 0)
            {
                foreach (var item in pd.clist)
                {
                    if (item.AddAdvice != "" && item.AddAdvice != null)
                    {
                        Advice = Advice + item.AddAdvice + "," + "  ";
                    }
                }
            }
            if (pd.clist.Count > 0)
            {
                foreach (var item in pd.olist)
                {
                    if (item.Complaints != "" && item.Complaints != null)
                    {
                        Complaints = Complaints + item.Complaints + "," + "  ";
                    }

                    if (item.Diagnosis != "" && item.Diagnosis != null)
                    {
                        Diagnosis = Diagnosis + item.Diagnosis + "," + "  ";
                    }
                }
            }
            if (pd.clist.Count > 0)
            {
                foreach (var item in pd.NextListlst)
                {
                    if (item.NestVisitDate != "" && item.NestVisitDate != null)
                    {
                        NextVisit = NextVisit + Convert.ToDateTime(item.NestVisitDate).Date.ToString("dd/MM/yyyy") + "," + "  ";
                    }
                }
            }
            if (pd.clist.Count > 0)
            {
                foreach (var item in pd.clist)
                {
                    if (item.InvSelectTests != "" && item.InvSelectTests != null)
                    {
                        TestBeforeVisit = TestBeforeVisit + item.InvSelectTests + "," + "  ";
                    }
                }
            }
            pd.HospClinicNumber = pd.HospClinicNumber + " ,+91 " + pd.OtherNumber;
            pd.HospClinicNumber = pd.HospClinicNumber.TrimEnd(',');
            pd.TestBeforeVisit  = TestBeforeVisit.TrimEnd(',');
            pd.NextVisit        = NextVisit.TrimEnd(',');

            pd.AdviceNote = Advice.TrimEnd(',');

            pd.Complaints = Complaints.TrimEnd(',');
            pd.Diagnosis  = Diagnosis.TrimEnd(',');
            return(View("Examination", pd));
        }
Exemplo n.º 3
0
        public ActionResult SaveDentalPage(int Id, string CreatedDate, string ToothProcedure, string Amount, string Notes)
        {
            List <DentalExamination> oblist = new List <DentalExamination>();

            try
            {
                PatientAllDetails        patientDETAILS = (PatientAllDetails)Session["patientDetails"];
                List <DentalExamination> lst            = new List <DentalExamination>();
                Bal_Precription          BL             = new Bal_Precription();
                string img = Session["Toothno"].ToString();
                if (img == null)
                {
                    //ScriptManager.RegisterClientScriptBlock(, this.GetType(), "alertMessage", "alert('Record Inserted Successfully')", true);
                    return(View("DentalExaminationPage"));
                }
                if (CreatedDate == null)
                {
                    return(View("DentalExaminationPage"));
                }
                if (ToothProcedure == null)
                {
                    return(View("DentalExaminationPage"));
                }
                if (Amount == null)
                {
                    return(View("DentalExaminationPage"));
                }
                else if (Notes == null)
                {
                    return(View("DentalExaminationPage"));
                }
                //DentalExamination
                img = img.Substring(3, img.Length - 3);
                string btnColorcode = Session["btnColorcode"].ToString();
                DE.ColorCode              = btnColorcode.ToString();
                Session["CreatedDate"]    = Convert.ToDateTime(CreatedDate);
                Session["ToothProcedure"] = ToothProcedure;
                Session["Amount"]         = Amount;
                Session["Notes"]          = Notes;
                DE.CreatedDate            = Convert.ToDateTime(CreatedDate).Date.ToString("dd/MM/yyyy");
                DE.ToothProcedure         = ToothProcedure;
                DE.Amount      = Amount;
                DE.Notes       = Notes;
                DE.QueueId     = patientDETAILS.QueueId;
                DE.HospitalId  = patientDETAILS.HospitalId;
                DE.CasePaperNo = patientDETAILS.CasePapaerNo;
                DE.PatientId   = patientDETAILS.Id;
                DE.CreatedBy   = patientDETAILS.DoctorReceptionId;
                DE.Id          = Id;



                if (Session["PageDetails"].ToString() == "A")
                {
                    AdultToothNumberSet();
                    int Flag = BL.SaveAdultDetails(DE);
                    // BAL_MyOPD BM = new BAL_MyOPD();
                    // int Flag = BM.GetDentalExamination(DE);

                    if (Flag > 0)
                    {
                        DentalExamination objDE = new DentalExamination();

                        objDE  = BM.GetDentalExamination(patientDETAILS.QueueId, patientDETAILS.CasePapaerNo, "A");
                        oblist = objDE.lst;
                        if (oblist.Count > 0)
                        {
                            foreach (var item in oblist)
                            {
                                item.CreatedDate = Convert.ToDateTime(item.CreatedDate).Date.ToString("dd/MM/yyyy");
                            }
                        }
                        return(Json(oblist, JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        return(Json("", JsonRequestBehavior.AllowGet));
                    }

                    //Bal_Precription bp = new Bal_Precription();

                    //AdultDetails pd = new AdultDetails();


                    //pd.T12 = img;
                    //pd = bp.SavePage(pd);

                    //return View();
                    // return View("DentalExamination", lstObservation);
                }

                else if (Session["PageDetails"].ToString() == "P")
                {
                    PediatricToothNumberSet();
                    int Flag = BL.SavePediatricDetails(DE);
                    // BAL_MyOPD BM = new BAL_MyOPD();
                    // int Flag = BM.GetDentalExamination(DE);

                    if (Flag > 0)
                    {
                        DentalExamination objDE = new DentalExamination();

                        objDE  = BM.GetDentalExamination(patientDETAILS.QueueId, patientDETAILS.CasePapaerNo, "P");
                        oblist = objDE.lst;
                        if (oblist.Count > 0)
                        {
                            foreach (var item in oblist)
                            {
                                item.CreatedDate = Convert.ToDateTime(item.CreatedDate).Date.ToString("dd/MM/yyyy");
                            }
                        }
                        return(Json(oblist, JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        return(Json("", JsonRequestBehavior.AllowGet));
                    }
                }
                return(Json(oblist, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }