/// <summary>
        /// Search vitals.
        /// </summary>
        /// <param name="searchModel">search parameters</param>
        /// <param name="bearerToken">The bearer token.</param>
        /// <returns></returns>
        public Task <PagedResult <MeasurementDto> > SearchVitals(SearchVitalsDto searchModel, string bearerToken)
        {
            string url = string.Format("/api/{0}/vitals/{1}?IsInvalidated={2}",
                                       searchModel.CustomerId,
                                       searchModel.PatientId,
                                       searchModel.IsInvalidated);

            if (searchModel.ObservedFrom.HasValue)
            {
                url += string.Format("&ObservedFrom={0}", searchModel.ObservedFrom);
            }

            if (searchModel.ObservedTo.HasValue)
            {
                url += string.Format("&ObservedTo={0}", searchModel.ObservedTo);
            }

            if (!string.IsNullOrEmpty(searchModel.Q))
            {
                url += string.Format("&Q={0}", searchModel.Q);
            }

            return(apiClient.SendRequestAsync <PagedResult <MeasurementDto> >(url, null, Method.GET, null, bearerToken));
        }
Exemple #2
0
 /// <summary>
 /// Search vitals.
 /// </summary>
 /// <param name="searchModel">search parameters</param>
 /// <param name="bearerToken">The bearer token.</param>
 /// <returns></returns>
 public Task <PagedResult <MeasurementDto> > GetVitals(SearchVitalsDto searchModel, string bearerToken)
 {
     return(vitalsDataProvider.SearchVitals(searchModel, bearerToken));
 }