@@ -31,21 +31,6 @@ credentials for applications.
3131.. _Authentication Getting Started Guide :
3232 https://cloud.google.com/docs/authentication/getting-started
3333
34- Authentication
35- ++++++++++++++
36-
37- Authentication for this service is done via an `API Key `_. To obtain an API
38- Key:
39-
40- 1. Open the `Cloud Platform Console `_
41- 2. Make sure that billing is enabled for your project.
42- 3. From the **Credentials ** page, create a new **API Key ** or use an existing
43- one for your project.
44-
45- .. _API Key :
46- https://developers.google.com/api-client-library/python/guide/aaa_apikeys
47- .. _Cloud Console : https://console.cloud.google.com/project?_
48-
4934Install Dependencies
5035++++++++++++++++++++
5136
@@ -95,26 +80,44 @@ To run this sample:
9580 $ python fhir_stores.py
9681
9782 usage: fhir_stores.py [-h] [--service_account_json SERVICE_ACCOUNT_JSON]
98- [--api_key API_KEY ] [--project_id PROJECT_ID ]
99- [--cloud_region CLOUD_REGION] [-- dataset_id DATASET_ID]
83+ [--project_id PROJECT_ID ] [--cloud_region CLOUD_REGION ]
84+ [--dataset_id DATASET_ID]
10085 [--fhir_store_id FHIR_STORE_ID]
101- [--pubsub_topic PUBSUB_TOPIC]
102- {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store}
86+ [--pubsub_topic PUBSUB_TOPIC] [--gcs_uri GCS_URI]
87+ [--member MEMBER] [--role ROLE]
88+ {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store,import-fhir-store,export-fhir-store-gcs,get_iam_policy,set_iam_policy}
10389 ...
10490
10591 positional arguments:
106- {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store}
92+ {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store,import-fhir-store,export-fhir-store-gcs,get_iam_policy,set_iam_policy }
10793 create-fhir-store Creates a new FHIR store within the parent dataset.
10894 delete-fhir-store Deletes the specified FHIR store.
10995 get-fhir-store Gets the specified FHIR store.
11096 list-fhir-stores Lists the FHIR stores in the given dataset.
11197 patch-fhir-store Updates the FHIR store.
98+ import-fhir-store Import resources into the FHIR store by copying them
99+ from the specified source.
100+ export-fhir-store-gcs
101+ Export resources to a Google Cloud Storage bucket by
102+ copying them from the FHIR store.
103+ get_iam_policy Gets the IAM policy for the specified FHIR store.
104+ set_iam_policy Sets the IAM policy for the specified FHIR store. A
105+ single member will be assigned a single role. A member
106+ can be any of: - allUsers, that is, anyone -
107+ allAuthenticatedUsers, anyone authenticated with a
108+ Google account - user:email, as in
109+ ' user:[email protected] ' - group:email, as in 110+ ' group:[email protected] ' - domain:domainname, as in 111+ ' domain:example.com' - serviceAccount:email, as in
112+ ' serviceAccount:my-other-
113+ [email protected] ' A role can be any IAM114+ role, such as ' roles/viewer' , ' roles/owner' , or
115+ ' roles/editor'
112116
113117 optional arguments:
114118 -h, --help show this help message and exit
115119 --service_account_json SERVICE_ACCOUNT_JSON
116120 Path to service account JSON file.
117- --api_key API_KEY Your API key.
118121 --project_id PROJECT_ID
119122 GCP cloud project name
120123 --cloud_region CLOUD_REGION
@@ -126,6 +129,13 @@ To run this sample:
126129 --pubsub_topic PUBSUB_TOPIC
127130 The Cloud Pub/Sub topic where notifications of changes
128131 are published
132+ --gcs_uri GCS_URI URI for a Google Cloud Storage directory from which
133+ filesshould be import or to which result filesshould
134+ be written (e.g., " bucket-
135+ id/path/to/destination/dir" ).
136+ --member MEMBER Member to add to IAM policy (e.g.
137+ " domain:example.com" )
138+ --role ROLE IAM Role to give to member (e.g. " roles/viewer" )
129139
130140
131141
@@ -150,17 +160,36 @@ To run this sample:
150160 [--dataset_id DATASET_ID]
151161 [--fhir_store_id FHIR_STORE_ID]
152162 [--resource_type RESOURCE_TYPE]
153- [--resource_id RESOURCE_ID]
154- {create-resource,delete-resource,get-resource,update-resource,patch-resource,search-resources-get,search-resources-post,get-patient-everything,get-metadata}
163+ [--resource_id RESOURCE_ID] [--bundle BUNDLE]
164+ [--uri_prefix URI_PREFIX] [--version_id VERSION_ID]
165+ {create-resource,delete-resource,conditional-delete-resource,get-resource,list-resource-history,export-resources,execute_bundle,get-resource-history,delete-resource-purge,update-resource,conditional-update-resource,patch-resource,conditional-patch-resource,search-resources-get,search-resources-post,get-patient-everything,get-metadata}
155166 ...
156167
157168 positional arguments:
158- {create-resource,delete-resource,get-resource,update-resource,patch-resource,search-resources-get,search-resources-post,get-patient-everything,get-metadata}
169+ {create-resource,delete-resource,conditional-delete-resource, get-resource,list-resource-history,export-resources,execute_bundle,get-resource-history,delete-resource-purge, update-resource,conditional-update-resource,patch-resource,conditional- patch-resource,search-resources-get,search-resources-post,get-patient-everything,get-metadata}
159170 create-resource Creates a new resource in a FHIR store.
160171 delete-resource Creates a new resource in a FHIR store.
172+ conditional-delete-resource
173+ Deletes an existing resource specified by search
174+ criteria.
161175 get-resource Gets a FHIR resource.
176+ list-resource-history
177+ Gets the history of a resource.
178+ export-resources Exports resources in a FHIR store.
179+ export-resources Exports resources in a FHIR store.
180+ execute_bundle Executes the operations in the given bundle.
181+ get-resource-history
182+ Gets a version resource.
183+ delete-resource-purge
184+ Deletes versions of a resource (excluding current
185+ version).
162186 update-resource Updates an existing resource.
187+ conditional-update-resource
188+ Updates an existing resource specified by search
189+ criteria.
163190 patch-resource Updates part of an existing resource..
191+ conditional-patch-resource
192+ Updates part of an existing resource..
164193 search-resources-get
165194 Searches resources in the given FHIR store using the
166195 searchResources GET method.
@@ -188,6 +217,12 @@ To run this sample:
188217 The type of resource. First letter must be capitalized
189218 --resource_id RESOURCE_ID
190219 Name of a FHIR resource
220+ --bundle BUNDLE Name of file containing bundle of operations to
221+ execute
222+ --uri_prefix URI_PREFIX
223+ Prefix of gs:// URIs for import and export
224+ --version_id VERSION_ID
225+ Version of a FHIR resource
191226
192227
193228
0 commit comments