Esempio n. 1
0
        public List <ConditionsCatDetails> GetConditionsCatDetails(int MamberId, string filter)
        {
            try
            {
                SqlParameter[] sqlPara = new SqlParameter[2];
                sqlPara[0] = new SqlParameter("@MbrId", MamberId);
                sqlPara[1] = new SqlParameter("@filter", filter);

                string sqlQuery = "EXEC [dbo].[usp_GetConditionsCatDetail_new] @MbrId , @filter";

                var lst = objMyOwnMedContext.Query <ConditionsCatDetails>().FromSql(sqlQuery, sqlPara).ToList();
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        public List <LabGroupResults> GetLabGroupResults(int MamberId, string filter, DateTime?FromDate, DateTime?ToDate)
        {
            try
            {
                SqlParameter[] sqlPara = new SqlParameter[4];
                sqlPara[0] = new SqlParameter("@MbrId", MamberId);
                sqlPara[1] = new SqlParameter("@filter", filter);
                sqlPara[2] = new SqlParameter("@FromDate", FromDate == null ? "" : ((DateTime)FromDate).ToString("yyyy-mm-dd"));
                sqlPara[3] = new SqlParameter("@ToDate", ToDate == null ? "" : ((DateTime)ToDate).ToString("yyyy-mm-dd"));

                string sqlQuery = "EXEC [dbo].[usp_GetPatientLabGroupResults] @MbrId , @filter , @FromDate , @ToDate";

                var lst = objMyOwnMedContext.Query <LabGroupResults>().FromSql(sqlQuery, sqlPara).ToList();
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
Esempio n. 3
0
        public List <Patient> GetPatientList(int MamberId, string AgeGroupList, string GenderId)
        {
            try
            {
                SqlParameter[] sqlPara = new SqlParameter[3];
                sqlPara[0] = new SqlParameter("@MbrId", MamberId);
                sqlPara[1] = new SqlParameter("@AgeGroupIdList", AgeGroupList);
                sqlPara[2] = new SqlParameter("@GenderId", GenderId);

                string sqlQuery = "EXEC [dbo].[usp_GetPatientList] @MbrId,@AgeGroupIdList,@GenderId";

                var lst = objMyOwnMedContext.Query <Patient>().FromSql(sqlQuery, sqlPara).ToList();
                return(lst);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }