Full name: projects.locations.datasets.fhirStores.applyConsents
Apply the Consent resources for the FHIR store and reindex the underlying resources in the FHIR store according to the aggregate consent. The aggregate consent of the patient in scope in this request replaces any previous call of this method. Any Consent resource change after this operation execution (including deletion) requires you to call fhirStores.applyConsents
again to have effect.
This method returns an Operation
that can be used to track the progress of the consent resources that were processed by calling operations.get
. Upon completion, the ApplyConsentsResponse
additionally contains the number of resources that was reindexed.
Errors are logged to Cloud Logging (see Viewing error logs in Cloud Logging).
To enforce consent check for data access, consentConfig.access_enforced
must be set to true for the FhirStore
.
HTTP request
POST https://healthcare.googleapis.com/v1beta1/{name=projects/*/locations/*/datasets/*/fhirStores/*}:applyConsents
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. The name of the FHIR store to enforce, in the format Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "validateOnly": boolean, // Union field |
Fields | |
---|---|
validate |
Optional. If true, the method only validates Consent resources to make sure they are supported. When the operation completes, |
Union field
|
|
patient |
Optional. Scope down to a list of patients. |
time |
Optional. Scope down to patients whose most recent consent changes are in the time range. Can only be used with a versioning store (i.e. when |
Response body
If successful, the response body contains an instance of 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.
PatientScope
Apply consents given by a list of patients.
JSON representation |
---|
{ "patientIds": [ string ] } |
Fields | |
---|---|
patient |
Optional. The list of patient IDs whose Consent resources will be enforced. At most 10,000 patients can be specified. An empty list is equivalent to all patients (meaning the entire FHIR store). |
TimeRange
Apply consents given by patients whose most recent consent changes are in the time range. Note that after identifying these patients, the server applies all Consent resources given by those patients, not just the Consent resources within the timestamp in the range.
JSON representation |
---|
{ "start": string, "end": string } |
Fields | |
---|---|
start |
Optional. The earliest consent change time, in format YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the FHIR store creation time. |
end |
Optional. The latest consent change time, in format YYYY-MM-DDThh:mm:ss.sss+zz:zz If not specified, the system uses the time when [fhirStores.applyConsents][] was called. |