Ejemplo n.º 1
0
        internal IEnumerable <PatientInfoR> GetPatientInfoList(string OCODE)
        {
            using (var _context = new ERPSSL_HMSEntities())
            {
                var ParamempID = new SqlParameter("@OCODE", OCODE);

                string SP_SQL = "HMS_GetPatientInfoList @OCODE";

                return((_context.ExecuteStoreQuery <PatientInfoR>(SP_SQL, ParamempID)).ToList());
            }
        }
Ejemplo n.º 2
0
        internal IEnumerable <PatientInfoR> GetPatientInfoForReport(int P_Id, string OCODE)
        {
            using (var _context = new ERPSSL_HMSEntities())
            {
                var ParamCode = new SqlParameter("@OCODE", OCODE);
                var ParamP_Id = new SqlParameter("@PId", P_Id);

                string SP_SQL = "HMS_Rpt_PatientInfoMoneyReceipt @PId,@OCODE";

                return((_context.ExecuteStoreQuery <PatientInfoR>(SP_SQL, ParamP_Id, ParamCode)).ToList());
            }
        }
Ejemplo n.º 3
0
        internal IEnumerable <PatientBillInfoR> GetPatientBillInfoList(int pat_Id, string OCODE)
        {
            using (var _context = new ERPSSL_HMSEntities())
            {
                var paramPatientId = new SqlParameter("@Patient_Id", pat_Id);

                var ParamoCode = new SqlParameter("@OCODE", OCODE);

                string SP_SQL = "HMS_GetPatient_BillInfoList @Patient_Id, @OCODE";

                return((_context.ExecuteStoreQuery <PatientBillInfoR>(SP_SQL, paramPatientId, ParamoCode)).ToList());
            }
        }
Ejemplo n.º 4
0
        internal List <int> GetNumberOfAdmittedPatient()
        {
            try
            {
                using (_context = new ERPSSL_HMSEntities())
                {
                    var query = (from p in _context.HMS_PatientInfo
                                 select p.PatientID);

                    return(query.ToList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 5
0
        internal List <int> GetLastMonthAdmittedPatient(int lastMonth, int lastYear)
        {
            try
            {
                using (_context = new ERPSSL_HMSEntities())
                {
                    var query = (from t in _context.HMS_PatientInfo
                                 where t.VisitDate.Value.Month == lastMonth && t.VisitDate.Value.Year == lastYear
                                 select t.PatientID);

                    return(query.ToList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 6
0
 internal IEnumerable <PatientBillInfoR> GetAllPatientBillDetailsForReport(string fromDate, string toDate, string OCODE)
 {
     try
     {
         using (var _context = new ERPSSL_HMSEntities())
         {
             var    ParamempID  = new SqlParameter("@FromDate", fromDate);
             var    ParamempID1 = new SqlParameter("@ToDate", toDate);
             var    oCode       = new SqlParameter("@OCODE", OCODE);
             string SP_SQL      = "HMS_GetPatientBillDetailsForReport @FromDate, @ToDate, @OCODE";
             return((_context.ExecuteStoreQuery <PatientBillInfoR>(SP_SQL, ParamempID, ParamempID1, oCode)).ToList());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 7
0
        public static List <string> SearchPatientByName(string prefixText, int count)
        {
            using (var _context = new ERPSSL_HMSEntities())
            {
                var patient = from pat in _context.HMS_PatientInfo
                              where (pat.PatientName.StartsWith(prefixText))
                              select pat;

                List <String> patientList = new List <String>();

                foreach (var p in patient)
                {
                    patientList.Add(p.PatientName);
                }


                return(patientList);
            }
        }
Ejemplo n.º 8
0
        private bool IsExist(string catName)
        {
            try
            {
                ERPSSL_HMSEntities _context = new ERPSSL_HMSEntities();

                bool status = false;
                int  count  = (from ctg in _context.HMS_BillCategory
                               where ctg.CategoryName == catName
                               select ctg.HMS_CategoryId).Count();
                if (count == 0)
                {
                    status = true;
                }

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 9
0
        private bool IsExist(string headName, int catId)
        {
            try
            {
                ERPSSL_HMSEntities _context = new ERPSSL_HMSEntities();

                bool status = false;
                int  count  = (from head in _context.HMS_BillHead
                               where head.Bill_Head_Name == headName && head.HMS_CategoryId == catId
                               select head.HMS_Bill_Head_Id).Count();
                if (count == 0)
                {
                    status = true;
                }

                return(status);
            }
            catch (Exception)
            {
                throw;
            }
        }