示例#1
0
        /// <summary>
        /// Gets the patients.
        /// </summary>
        /// <param name="searchText">The search text.</param>
        /// <param name="page">The requested page number (starting from 1).</param>
        /// <param name="pageSize">The page size.</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> GetPatients(string searchText, int?page, int?pageSize)
        {
            try
            {
                PatientSearch patientSearch = WebApi.GetPatients(ResourceServerBaseAddress, searchText, page, pageSize,
                                                                 Token, RemoteHostId, ClientId, DeviceId, ModuleId, Timeout);

                return(patientSearch.Patients);
            }
            catch (Exception e)
            {
                Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.AccessLayer::GetPatients: {0}", e);
                throw;
            }
        }
示例#2
0
 /// <summary>
 /// Registers the application.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="version">The version.</param>
 /// <returns>Returns an <see cref="AppRegInfo"/>.</returns>
 public AppRegInfo RegisterApp(string name, string version, string appType)
 {
     try
     {
         var appRegInfo = new AppRegInfo {
             ModuleId = ModuleId, Name = name, Version = version, MobileAppType = appType
         };
         return(WebApi.RegisterApp(ResourceServerBaseAddress, appRegInfo, Token, RemoteHostId, ClientId, DeviceId, ModuleId, Timeout));
     }
     catch (Exception e)
     {
         Log.ErrorFormat("Himsa.Noah.MobileAccessLayer.AccessLayer::RegisterApp: {0}", e);
         throw;
     }
 }