/// <summary> /// Get notes. /// </summary> /// <param name="searchRequest">The search parameters</param> /// <param name="token">The authorization token</param> /// <returns>The list of notes</returns> public async Task <PagedResult <BaseNoteResponseDto> > GetNotes(SearchNotesDto searchRequest, string token) { string endpointUrl = string.Format("api/{0}/notes/{1}", searchRequest.CustomerId, searchRequest.PatientId); var queryStringBuilder = new StringBuilder(); queryStringBuilder.AppendFormat("?skip={0}", searchRequest.Skip); queryStringBuilder.AppendFormat("&take={0}", searchRequest.Take); queryStringBuilder.AppendFormat("&isbrief={0}", searchRequest.IsBrief); if (!string.IsNullOrEmpty(searchRequest.Q)) { queryStringBuilder.AppendFormat("&q={0}", searchRequest.Q); } if (searchRequest.Notables != null && searchRequest.Notables.Any()) { var notablesquesryStringBuilder = new StringBuilder(); searchRequest.Notables.ToList() .ForEach(n => notablesquesryStringBuilder.AppendFormat("¬ables={0}", n)); queryStringBuilder.AppendFormat("{0}", notablesquesryStringBuilder); } endpointUrl += queryStringBuilder.ToString(); var response = await apiClient.SendRequestAsync <PagedResult <BaseNoteResponseDto> >(endpointUrl, null, Method.GET, null, token); return(response); }
/// <summary> /// Get notes. /// </summary> /// <param name="searchRequest">The search parameters</param> /// <param name="token">The authorization token</param> /// <returns>The list of notes</returns> public async Task <PagedResult <BaseNoteResponseDto> > GetNotes(SearchNotesDto searchRequest, string token) { return(await notesDataProvider.GetNotes(searchRequest, token)); }