public static List <CaseAuthorizationGeneralHours> CaseAuthorizationGeneralHours(List <Models.CaseAuthCodeGeneralHour> entities)
        {
            if (entities == null)
            {
                return(null);
            }
            var generalHours = new List <CaseAuthorizationGeneralHours>();

            foreach (var entity in entities)
            {
                generalHours.Add(AuthorizationMappings.CaseAuthorizationGeneralHour(entity));
            }
            return(generalHours);
        }
        /*********************
        * CASE AUTH HOURS
        *********************/


        public static List <CaseAuthorizationHours> CaseAuthorizationHours(List <CaseAuthHour> entities)
        {
            if (entities == null)
            {
                return(null);
            }

            var serviceLocations = new Services.ServicesService().GetActiveServiceLocations();

            var hours = new List <CaseAuthorizationHours>();

            foreach (var entity in entities)
            {
                hours.Add(AuthorizationMappings.CaseAuthorizationHour(entity, serviceLocations));
            }
            return(hours);
        }
        /*********************
        * CASE AUTHS
        *********************/

        public static CaseAuthorization CaseAuthorization(Models.CaseAuthCode entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var auth     = new CaseAuthorization();
            var baseAuth = AuthorizationMappings.Authorization(entity.AuthCode);

            auth.AuthClass = AuthorizationMappings.AuthorizationClass(entity.CaseAuthClass);
            auth.CaseAuthorizationDateCreated = entity.DateCreated;
            auth.CaseAuthorizationID          = entity.ID;
            auth.Code               = baseAuth.Code;
            auth.DateCreated        = baseAuth.DateCreated;
            auth.Description        = baseAuth.Description;
            auth.EndDate            = entity.AuthEndDate;
            auth.ID                 = entity.ID;
            auth.StartDate          = entity.AuthStartDate;
            auth.TotalHoursApproved = (double)entity.AuthTotalHoursApproved;

            return(auth);
        }