public static async Task <Personnel> AuthenticateAsync(ApiSettings settings, string username, string password)
        {
            HospitalApi         api  = new HospitalApi(settings.HospitalApiBaseUri.ToString());
            HttpResponseMessage resp = await api.AuthenticatePersonnelAsync(username, password);

            string content = await resp.Content.ReadAsStringAsync();

            if (resp.IsSuccessStatusCode)
            {
                Personnel data = JsonConvert.DeserializeObject <Personnel>(content);
                return(data);
            }
            else
            {
                ApiException error = JsonConvert.DeserializeObject <ApiException>(content);
                error.StatusCode = resp.StatusCode;
                throw error;
            }
        }