Exemple #1
0
        public AuthenticateResponse GetUserDetailsByCredientials(string userName, string password)
        {
            AuthenticateResponse response = new AuthenticateResponse();

            using (TeleMedicineEntities entity = new TeleMedicineEntities())
            {
                response = entity.VALIDATEUSER(userName, password).Select(s => new AuthenticateResponse()
                {
                    UserId   = s.USER_ID,
                    UserName = s.USER_NAME,
                    RoleId   = Convert.ToInt32(s.DESIGNATION_ID),
                    RoleName = s.DESIGNATION_NAME.ToUpper()
                }).FirstOrDefault();
            }
            return(response);
        }
        public IList <CallerDetails> GetCallerDetails()
        {
            IList <CallerDetails> callerDetailsList = new List <CallerDetails>();

            using (TeleMedicineEntities entity = new TeleMedicineEntities())
            {
                callerDetailsList = entity.GETCALLERDETAILS().Select(s => new CallerDetails()
                {
                    CallerType           = s.CallerTyoe,
                    CallerName           = s.callername,
                    ContactNumber        = s.contactnumber,
                    PastCallRecord       = s.pastcallrecord,
                    PatientDoctorHistory = s.patientdoctorhistory,
                    CallTime             = s.calltime
                }).ToList();
            }
            return(callerDetailsList);
        }
Exemple #3
0
        public IList <PatientDetails> GetPatientsDetails()
        {
            IList <PatientDetails> patientDetailsList;

            using (TeleMedicineEntities entity = new TeleMedicineEntities())
            {
                patientDetailsList = new List <PatientDetails>();
                patientDetailsList = entity.GETPATIENT_BASIC_DETAILS().Select(p => new PatientDetails()
                {
                    Age       = p.AGE ?? default,
                    Date      = p.CREATED_DATE.HasValue ? p.CREATED_DATE.Value.ToString("dd/MM/yyyy") : string.Empty,
                    Gender    = p.GENDER,
                    Name      = p.NAME,
                    PatientId = p.PatientId ?? default,
                    SentBy    = p.SentBy,
                    Status    = p.STATUS.HasValue ? (p.STATUS == 1 ? "EMERGENCY" : "NON-EMERGENCY") : string.Empty,
                    TokenNo   = p.TokenNo ?? default,
                    Visit     = p.Visit
                }).ToList();