use of com.google.api.services.healthcare.v1.model.SearchResourcesRequest in project beam by apache.
the class HttpHealthcareApiClient method searchFhirResource.
@Override
public HttpBody searchFhirResource(String fhirStore, String resourceType, @Nullable Map<String, Object> parameters, String pageToken) throws IOException {
SearchResourcesRequest request = new SearchResourcesRequest().setResourceType(resourceType);
Search search = client.projects().locations().datasets().fhirStores().fhir().search(fhirStore, request);
if (parameters != null && !parameters.isEmpty()) {
parameters.forEach(search::set);
}
if (pageToken != null && !pageToken.isEmpty()) {
search.set("_page_token", URLDecoder.decode(pageToken, "UTF-8"));
}
return search.execute();
}
Aggregations