/// <summary> /// Gets all actions for a patient. /// </summary> /// <param name="patientId">The patient identifier.</param> /// <param name="actionFilter">Filtering requests.</param> /// <returns>A list of <see cref="Action"/>s.</returns> public List <Action> GetActions(int patientId, ActionFilter actionFilter) { try { return(WebApi.GetActions(ResourceServerBaseAddress, patientId, actionFilter, Token, RemoteHostId, ClientId, DeviceId, ModuleId, Timeout)); } catch (Exception e) { Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.AccessLayer::GetActions (filtered): {0}", e); throw; } }
public static List <Action> GetActions(Uri resourceServerBaseAddress, int patientId, ActionFilter actionfilter, Token token, string remoteHostId, string clientId, string deviceId, int moduleId, TimeSpan timeout) { try { Log.DebugFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetActions (filtered) called."); string path = String.Format("api/patients/{0}/actions/filter", patientId); var actions = Helpers.Execute <ActionFilter, IEnumerable <Action> >(Helpers.HttpVerb.Post, resourceServerBaseAddress, path, token, remoteHostId, clientId, deviceId, moduleId, actionfilter, timeout); Log.DebugFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetActions (filtered): {0} found.", actions == null ? 0 : actions.Count()); return(actions != null?actions.ToList() : null); } catch (Exception e) { Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.WebApi::GetActions (filtered): {0}", e); throw; } }