Search in sources :

Example 1 with SearchResourcesRequest

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();
}
Also used : Search(com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.FhirStores.Fhir.Search) SearchResourcesRequest(com.google.api.services.healthcare.v1.model.SearchResourcesRequest)

Aggregations

Search (com.google.api.services.healthcare.v1.CloudHealthcare.Projects.Locations.Datasets.FhirStores.Fhir.Search)1 SearchResourcesRequest (com.google.api.services.healthcare.v1.model.SearchResourcesRequest)1