Method: projects.locations.collections.dataStores.replacePatientFilter
Stay organized with collections
Save and categorize content based on your preferences.
Replaces the patient filter for the data store. This method is essentially a combination of dataStores.deletePatientFilter and dataStores.addPatientFilter. Patient filters are empty by default when a data store is created, and are stored in a separate table. The data store must first be created, and must be a healthcare data store. This method will fail if the data store does not have a patient filter. The filter group must be a FHIR resource name of type Group, and the new filter will be constructed from the direct members of the group which are Patient resources.
HTTP request
POST https://discoveryengine.googleapis.com/v1alpha/{dataStore=projects/*/locations/*/collections/*/dataStores/*}:replacePatientFilter
Required. Full resource name of DataStore, such as projects/{project}/locations/{location}/collections/{collectionId}/dataStores/{dataStoreId}.
If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
If the requested DataStore does not exist, a NOT_FOUND error is returned. If the requested DataStore already has a patient filter, an ALREADY_EXISTS error will be returned.
Request body
The request body contains data with the following structure:
JSON representation
{"filterGroups": [string]}
Fields
filterGroups[]
string
Required. Names of the Group resources to use as a basis for the list of patients for the new patient filter, in format projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhir_store_id}/fhir/Group/{groupId}. if the caller does not have permission to access the FHIR store, regardless of whether it exists, PERMISSION_DENIED error is returned. If the discovery engine service account does not have permission to access the FHIR store, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the group is not found at the location, a RESOURCE_NOT_FOUND error will be returned. The filter group must be a FHIR resource name of type Group, and the new filter will be constructed from the direct members of the group which are Patient resources.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-01-14 UTC."],[],[]]