Beispiel #1
0
        public JsonResult FillAllergies()
        {
            BL_PatientPrescriptionNew     BL_obj     = new BL_PatientPrescriptionNew();
            List <PatientPrescriptionNew> searchlist = new List <PatientPrescriptionNew>();

            HospitlLocationID();

            try
            {
                DataSet dsDetails = BL_obj.GetAllAllergies(HospitalID, LocationID);

                if (dsDetails.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dsDetails.Tables[0].Rows)
                    {
                        searchlist.Add(new PatientPrescriptionNew
                        {
                            AllergiesID = Convert.ToInt32(dr["AllergiesID"].ToString()),
                            Allergies   = dr["AllergiesName"].ToString(),
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #2
0
        public JsonResult FillICDCodes(int prefix)
        {
            BL_PatientPrescriptionNew     BL_obj = new BL_PatientPrescriptionNew();
            List <PatientPrescriptionNew> lists  = new List <PatientPrescriptionNew>();

            HospitlLocationID();
            try
            {
                DataSet dsDetails = BL_obj.FillICDCodes(HospitalID, LocationID, Convert.ToInt32(prefix));

                if (dsDetails.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dsDetails.Tables[0].Rows)
                    {
                        lists.Add(new PatientPrescriptionNew
                        {
                            Message   = "",
                            ICDCodeID = dr["ICDCodeID"].ToString(),
                            ICDCode   = dr["ICDCode"].ToString(),
                            ICDName   = dr["ICDName"].ToString()
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(new JsonResult {
                Data = lists, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #3
0
        public JsonResult FillMedicinesOnPackages(int prefix)
        {
            BL_PatientPrescriptionNew     BL_obj = new BL_PatientPrescriptionNew();
            List <PatientPrescriptionNew> lists  = new List <PatientPrescriptionNew>();

            HospitlLocationID();
            try
            {
                DataSet dsDetails = BL_obj.GetPackagesForPrescription(HospitalID, LocationID, Convert.ToInt32(prefix));

                if (dsDetails.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dsDetails.Tables[0].Rows)
                    {
                        lists.Add(new PatientPrescriptionNew {
                            Message           = "",
                            MedicineLibraryID = dr["MedicineLibraryID"].ToString(),
                            Medicines         = dr["Medicines"].ToString(),
                            Strength          = dr["Strength"].ToString(),
                            Days        = dr["Days"].ToString(),
                            Instruction = dr["Instruction"].ToString(),
                            Frequency   = dr["Frequency"].ToString(),
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(new JsonResult {
                Data = lists, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #4
0
        public JsonResult FillData(string prefix)
        {
            BL_PatientPrescriptionNew     BL_obj = new BL_PatientPrescriptionNew();
            List <PatientPrescriptionNew> lists  = new List <PatientPrescriptionNew>();

            HospitlLocationID();
            try
            {
                DataSet dsDetails = BL_obj.GetPatientData(HospitalID, LocationID, Convert.ToInt32(prefix));

                if (dsDetails.Tables[0].Rows.Count > 0)
                {
                    PatientPrescriptionNew obj = new PatientPrescriptionNew();
                    obj.Message      = "";
                    obj.PatientRegNO = Convert.ToInt32(dsDetails.Tables[0].Rows[0]["PatientRegNO"].ToString());
                    obj.PatientName  = dsDetails.Tables[0].Rows[0]["PatientName"].ToString();
                    obj.OPDIPDID     = Convert.ToInt32(dsDetails.Tables[0].Rows[0]["OPDIPDID"].ToString());
                    obj.GuardianName = dsDetails.Tables[0].Rows[0]["GuardianName"].ToString();
                    obj.Age          = dsDetails.Tables[0].Rows[0]["Age"].ToString();
                    obj.AgeType      = dsDetails.Tables[0].Rows[0]["AgeType"].ToString();
                    obj.Gender       = dsDetails.Tables[0].Rows[0]["Gender"].ToString();
                    lists.Add(obj);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Json(lists, JsonRequestBehavior.AllowGet));
        }
Beispiel #5
0
        public JsonResult GetPrintNo_ToRegNo(string PrintRegNo)
        {
            BL_PatientPrescriptionNew BL_Reg = new BL_PatientPrescriptionNew();
            string RegNo = BL_Reg.GetPrintNo_ToRegNo(PrintRegNo);

            return(new JsonResult {
                Data = RegNo, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #6
0
        public JsonResult GetICDCodes(string prefix, string icd)
        {
            BL_PatientPrescriptionNew BL_obj = new BL_PatientPrescriptionNew();
            DataSet ds = BL_obj.GetICDCodes(prefix, icd);
            List <PatientPrescriptionNew> searchlist = new List <PatientPrescriptionNew>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new PatientPrescriptionNew
                {
                    ICDCodeID   = dr["ICDCodeID"].ToString(),
                    icdcodename = dr["icdcodename"].ToString(),
                });
            }
            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet, MaxJsonLength = 86753090
            });
        }
Beispiel #7
0
        public JsonResult GetMedicine(string prefix)
        {
            BL_PatientPrescriptionNew BL_obj = new BL_PatientPrescriptionNew();
            DataSet ds = BL_obj.GetMedicine(prefix);
            List <PatientPrescriptionNew> searchlist = new List <PatientPrescriptionNew>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new PatientPrescriptionNew
                {
                    MedicineLibraryID = dr["MedicineLibraryID"].ToString(),
                    Medicines         = dr["Medicines"].ToString()
                });
            }
            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #8
0
        public JsonResult FillDataForModal()
        {
            BL_PatientPrescriptionNew     BL_obj     = new BL_PatientPrescriptionNew();
            List <PatientPrescriptionNew> searchlist = new List <PatientPrescriptionNew>();

            HospitlLocationID();
            string guardianname = "";

            try
            {
                DataSet dsDetails = BL_obj.GetPatient(HospitalID, LocationID);

                if (dsDetails.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in dsDetails.Tables[0].Rows)
                    {
                        if (dr["OPDIPDID"].ToString() == "")
                        {
                            dr["OPDIPDID"] = "0";
                        }
                        searchlist.Add(new PatientPrescriptionNew
                        {
                            PatientRegNO = Convert.ToInt32(dr["PatientRegNO"].ToString()),
                            PatientName  = dr["PatientName"].ToString(),
                            OPDIPDID     = Convert.ToInt32(dr["OPDIPDID"].ToString()),
                            PrintRegNO   = Convert.ToInt32(dr["PrintRegNO"].ToString()),
                            GuardianName = dr["GuardianName"].ToString(),

                            Age     = dr["Age"].ToString(),
                            AgeType = dr["AgeType"].ToString(),
                            Gender  = dr["Gender"].ToString()
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #9
0
        public JsonResult GetPackages(string prefix)
        {
            BL_PatientPrescriptionNew BL_obj = new BL_PatientPrescriptionNew();
            DataSet ds = BL_obj.GetPackages(prefix);

            List <PatientPrescriptionNew> searchlist = new List <PatientPrescriptionNew>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                searchlist.Add(new PatientPrescriptionNew
                {
                    PackagesID   = dr["PackagesID"].ToString(),
                    PackagesName = dr["PackagesName"].ToString()
                });
            }
            return(new JsonResult {
                Data = searchlist, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #10
0
        public JsonResult BindName(string prefix)
        {
            HospitlLocationID();

            BL_PatientPrescriptionNew BL_obj = new BL_PatientPrescriptionNew();

            DataSet ds = BL_obj.SearchPatientOPDByNameID(HospitalID, LocationID, prefix);

            List <PatientPrescriptionNew> lists = new List <PatientPrescriptionNew>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                PatientPrescriptionNew obj = new PatientPrescriptionNew();

                obj.PatientRegNO = Convert.ToInt32(dr["PatientRegNO"].ToString());
                obj.PatientName  = dr["Name"].ToString();

                lists.Add(obj);
            }

            return(Json(lists, JsonRequestBehavior.AllowGet));
        }
Beispiel #11
0
        public ActionResult FillRegDetails(int PatientRegNO)
        {
            BL_PatientPrescriptionNew BL_obj = new BL_PatientPrescriptionNew();
            DataSet ds = new DataSet();
            List <PatientPrescriptionNew> searclist = new List <Models.Patient.PatientPrescriptionNew>();

            ds = BL_obj.GetConsentMaster(PatientRegNO);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                PatientPrescriptionNew obj = new PatientPrescriptionNew();
                obj.PatientRegNO = Convert.ToInt32(ds.Tables[0].Rows[0]["PatientRegNO"]);
                obj.PrintRegNO   = Convert.ToInt32(ds.Tables[0].Rows[0]["PrintRegNO"]);
                obj.PatientName  = ds.Tables[0].Rows[0]["PatientName"].ToString();
                obj.GuardianName = ds.Tables[0].Rows[0]["GuardianName"].ToString();
                obj.OPDIPDID     = Convert.ToInt32(ds.Tables[0].Rows[0]["OPDIPDID"]);
                obj.Age          = ds.Tables[0].Rows[0]["Age"].ToString();
                obj.AgeType      = ds.Tables[0].Rows[0]["AgeType"].ToString();
                obj.Gender       = ds.Tables[0].Rows[0]["Gender"].ToString();
                searclist.Add(obj);
            }
            return(Json(searclist, JsonRequestBehavior.AllowGet));
        }