**Full name**: projects.locations.datasets.fhirStores.deidentify

De-identifies data from the source store and writes it to the destination store. The `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.metadata` field type is `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/OperationMetadata`. If the request is successful, the `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.response` field type is `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/DeidentifyFhirStoreSummary`. If errors occur, `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.error` is set. Error details are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)).

### HTTP request

`POST https://healthcare.googleapis.com/v1/{sourceStore=projects/*/locations/*/datasets/*/fhirStores/*}:deidentify`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `sourceStore` | `string` Required. Source FHIR store resource name. For example, `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}`. R5 stores are not supported. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "destinationStore": string, "config": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores#DeidentifyConfig`) }, "gcsConfigUri": string, "resourceFilter": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores/deidentify#FhirFilter`) }, "skipModifiedResources": boolean } ``` |

| Fields ||
|---|---|
| `destinationStore` | `string` Required. The name of the FHIR store to write the redacted data to. For example, `projects/{projectId}/locations/{locationId}/datasets/{datasetId}/fhirStores/{fhirStoreId}`. - The destination dataset and FHIR store must exist. - The source dataset and destination dataset must both reside in the same location. De-identifying data across multiple locations is not supported. - The caller must have the healthcare.fhirResources.update permission to write to the destination FHIR store. |
| `config` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores#DeidentifyConfig`)`` Deidentify configuration. Only one of `config` and `gcsConfigUri` can be specified. |
| `gcsConfigUri` | `string` Cloud Storage location to read the JSON `cloud.healthcare.deidentify.DeidentifyConfig` from, overriding the default config. Must be of the form `gs://{bucket_id}/path/to/object`. The Cloud Storage location must grant the Cloud IAM role `roles/storage.objectViewer` to the project's Cloud Healthcare Service Agent service account. Only one of `config` and `gcsConfigUri` can be specified. |
| `resourceFilter` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores/deidentify#FhirFilter`)`` A filter specifying the resources to include in the output. If not specified, all resources are included in the output. |
| `skipModifiedResources` | `boolean` If true, skips resources that are created or modified after the de-identify operation is created. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/healthcare-api/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-healthcare`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

## FhirFilter

Filter configuration.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "resources": { object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores/deidentify#Resources`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `resources` | ``object(`https://docs.cloud.google.com/healthcare-api/docs/reference/rest/v1/projects.locations.datasets.fhirStores/deidentify#Resources`)`` List of resources to include in the output. If this list is empty or not specified, all resources are included in the output. |
| End of mutually exclusive fields. ||

## Resources

A list of FHIR resources.

| JSON representation |
|---|
| ``` { "resources": [ string ] } ``` |

| Fields ||
|---|---|
| `resources[]` | `string` List of resources IDs. For example, "Patient/1234". |