Skip to main content

consent_artifacts

Creates, updates, deletes, gets or lists a consent_artifacts resource.

Overview

Nameconsent_artifacts
TypeResource
Idgoogle.healthcare.consent_artifacts

Fields

NameDatatypeDescription
namestringIdentifier. Resource name of the Consent artifact, of the form projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consentArtifacts/{consent_artifact_id}. Cannot be changed after creation.
consentContentScreenshotsarrayOptional. Screenshots, PDFs, or other binary information documenting the user's consent.
consentContentVersionstringOptional. An string indicating the version of the consent information shown to the user.
guardianSignatureobjectUser signature.
metadataobjectOptional. Metadata associated with the Consent artifact. For example, the consent locale or user agent version.
userIdstringRequired. User's UUID provided by the client.
userSignatureobjectUser signature.
witnessSignatureobjectUser signature.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconsentArtifactsId, consentStoresId, datasetsId, locationsId, projectsIdGets the specified Consent artifact.
listSELECTconsentStoresId, datasetsId, locationsId, projectsIdLists the Consent artifacts in the specified consent store.
createINSERTconsentStoresId, datasetsId, locationsId, projectsIdCreates a new Consent artifact in the parent consent store.
deleteDELETEconsentArtifactsId, consentStoresId, datasetsId, locationsId, projectsIdDeletes the specified Consent artifact. Fails if the artifact is referenced by the latest revision of any Consent.

SELECT examples

Lists the Consent artifacts in the specified consent store.

SELECT
name,
consentContentScreenshots,
consentContentVersion,
guardianSignature,
metadata,
userId,
userSignature,
witnessSignature
FROM google.healthcare.consent_artifacts
WHERE consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new consent_artifacts resource.

/*+ create */
INSERT INTO google.healthcare.consent_artifacts (
consentStoresId,
datasetsId,
locationsId,
projectsId,
name,
userId,
userSignature,
guardianSignature,
witnessSignature,
consentContentScreenshots,
consentContentVersion,
metadata
)
SELECT
'{{ consentStoresId }}',
'{{ datasetsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ userId }}',
'{{ userSignature }}',
'{{ guardianSignature }}',
'{{ witnessSignature }}',
'{{ consentContentScreenshots }}',
'{{ consentContentVersion }}',
'{{ metadata }}'
;

DELETE example

Deletes the specified consent_artifacts resource.

/*+ delete */
DELETE FROM google.healthcare.consent_artifacts
WHERE consentArtifactsId = '{{ consentArtifactsId }}'
AND consentStoresId = '{{ consentStoresId }}'
AND datasetsId = '{{ datasetsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';