/// <summary> /// Gets a list of updated patients based on a DateTime interval. /// </summary> /// <param name="filter">The filter containing the search criteria.</param> /// <returns>A list of <see cref="Patient"/>s. There is an upper limit on the number of patients that can be returned.</returns> public List <Patient> GetUpdatedPatients(UpdatedPatientsSearchFilter filter) { try { List <Patient> patients = WebApi.GetUpdatedPatients(ResourceServerBaseAddress, filter, Token, RemoteHostId, ClientId, DeviceId, ModuleId, Timeout); return(patients); } catch (Exception e) { Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.AccessLayer::GetUpdatedPatients: {0}", e); throw; } }
public static List <Patient> GetUpdatedPatients(Uri resourceServerBaseAddress, UpdatedPatientsSearchFilter filter, Token token, string remoteHostId, string clientId, string deviceId, int moduleId, TimeSpan timeout) { try { Log.DebugFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetUpdatedPatients called."); string path = String.Format("api/patients/updates"); var patients = Helpers.Execute <UpdatedPatientsSearchFilter, PatientSearch>(Helpers.HttpVerb.Post, resourceServerBaseAddress, path, token, remoteHostId, clientId, deviceId, moduleId, filter, timeout); Log.DebugFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetUpdatedPatients: {0} found.", patients == null ? 0 : patients.Patients.Count); if (patients == null) { return(null); } return(patients.Patients); } catch (Exception e) { Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetUpdatedPatients: {0}", e); throw; } }