Ejemplo n.º 1
0
 /// <summary>Initializes a new instance of the <see cref="ResourcesController" /> class.</summary>
 public ResourcesController()
 {
     this.employeeIt2Manager     = new EmployeeIt2Manager();
     this.officeIt2Manager       = new OfficeIt2Manager();
     this.patientIt2Manager      = new PatientIt2Manager();
     this.logiIntegrationManager = new LogiIntegrationManager();
 }
Ejemplo n.º 2
0
        public EmployeeVm GetEmployee(string officeNumber, int employeeId)
        {
            var result            = new EmployeeVm();
            var mngr              = new EmployeeIt2Manager();
            var employeeIt2       = mngr.GetEmployeeFromIt2(employeeId);
            var ehrSystem         = mngr.GetEmrSystemFromOfficeEmployee(officeNumber, employeeId);
            var allCompanyOffices = this.employeeIt2Manager.GetCompanyOffices(employeeIt2.CompanyId);

            result.Active                 = employeeIt2.Active;
            result.CompanyId              = employeeIt2.CompanyId;
            result.DeaNumber              = employeeIt2.DeaNumber;
            result.EinNumber              = employeeIt2.EinNumber;
            result.EmcSubmitterId         = employeeIt2.EmcSubmitterId;
            result.EmployeeId             = employeeId;
            result.EmployeeNum            = employeeIt2.EmployeeNum;
            result.EmployeeType           = (EmployeeType)Enum.ToObject(typeof(EmployeeType), employeeIt2.EmployeeType);
            result.EmrId                  = employeeIt2.EmrId;
            result.Fax                    = employeeIt2.Fax;
            result.FirstName              = employeeIt2.FirstName;
            result.HipaaDate              = FormatDate(employeeIt2.HipaaDate);
            result.Hl7ProviderId          = employeeIt2.Hl7ProviderId;
            result.LastName               = employeeIt2.LastName;
            result.LicenceNumber          = employeeIt2.LicenceNumber;
            result.NationalProviderId     = employeeIt2.NationalProviderId;
            result.Phone                  = employeeIt2.Phone;
            result.ProfessionalCredential = employeeIt2.ProfessionalCredential;
            result.ProfessionalSignature  = employeeIt2.ProfessionalSignature;
            result.SsnNumber              = employeeIt2.SsnNumber;
            result.TpaNumber              = employeeIt2.TpaNumber;
            result.UserId                 = employeeIt2.UserId;
            result.UserName               = employeeIt2.User.Name.ToLower().Replace(GetUserNamePlaceHolderValue(employeeIt2.CompanyId), string.Empty);
            result.DefaultExamMinutes     = Convert.ToString(employeeIt2.DefaultExamMinutes) + " Min.";
            result.AllowOverbooks         = Convert.ToString(employeeIt2.AllowOverbooks);
            result.EyefinityEhr           = ehrSystem == 1;
            result.IsWebSchedulable       = employeeIt2.IsWebSchedulable;
            result.HomeOffice             = employeeIt2.HomeOffice;
            result.IsElectronicNotifiable = employeeIt2.IsElectronicNotifiable;
            result.Offices                = allCompanyOffices.Select(o => new EmployeeOfficeVm
            {
                EmployeeId            = employeeId,
                OfficeNum             = o.ID,
                OfficeName            = o.Name,
                IsAuthorizedForAccess = employeeIt2.Offices.Any(a => a.OfficeNum == o.ID)
            }).ToList();

            return(result);
        }
Ejemplo n.º 3
0
        /// <summary>The check for existing ProviderID.</summary>
        /// <param name="providerId">The UserID.</param>
        /// <param name="companyId">The company Id.</param>
        /// <returns>The <see cref="bool"/>.</returns>
        private static bool CheckForExistingProviderId(string providerId, string companyId)
        {
            var em = new EmployeeIt2Manager();

            return(em.DoesEmployeeNumExists(providerId, companyId));
        }
Ejemplo n.º 4
0
        /// <summary>The check for existing UserID.</summary>
        /// <param name="loginName">The UserID.</param>
        /// <param name="companyId">The company Id.</param>
        /// <returns>The <see cref="bool"/>.</returns>
        private static bool CheckForExistingLoginName(string loginName, string companyId)
        {
            var em = new EmployeeIt2Manager();

            return(em.DoesLoginNameExists(loginName));
        }