@@ -31,21 +31,6 @@ credentials for applications.
31
31
.. _Authentication Getting Started Guide :
32
32
https://cloud.google.com/docs/authentication/getting-started
33
33
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
-
49
34
Install Dependencies
50
35
++++++++++++++++++++
51
36
@@ -95,26 +80,44 @@ To run this sample:
95
80
$ python fhir_stores.py
96
81
97
82
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]
100
85
[--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}
103
89
...
104
90
105
91
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 }
107
93
create-fhir-store Creates a new FHIR store within the parent dataset.
108
94
delete-fhir-store Deletes the specified FHIR store.
109
95
get-fhir-store Gets the specified FHIR store.
110
96
list-fhir-stores Lists the FHIR stores in the given dataset.
111
97
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 IAM
114
+ role, such as ' roles/viewer' , ' roles/owner' , or
115
+ ' roles/editor'
112
116
113
117
optional arguments:
114
118
-h, --help show this help message and exit
115
119
--service_account_json SERVICE_ACCOUNT_JSON
116
120
Path to service account JSON file.
117
- --api_key API_KEY Your API key.
118
121
--project_id PROJECT_ID
119
122
GCP cloud project name
120
123
--cloud_region CLOUD_REGION
@@ -126,6 +129,13 @@ To run this sample:
126
129
--pubsub_topic PUBSUB_TOPIC
127
130
The Cloud Pub/Sub topic where notifications of changes
128
131
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" )
129
139
130
140
131
141
@@ -150,17 +160,36 @@ To run this sample:
150
160
[--dataset_id DATASET_ID]
151
161
[--fhir_store_id FHIR_STORE_ID]
152
162
[--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}
155
166
...
156
167
157
168
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}
159
170
create-resource Creates a new resource in a FHIR store.
160
171
delete-resource Creates a new resource in a FHIR store.
172
+ conditional-delete-resource
173
+ Deletes an existing resource specified by search
174
+ criteria.
161
175
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).
162
186
update-resource Updates an existing resource.
187
+ conditional-update-resource
188
+ Updates an existing resource specified by search
189
+ criteria.
163
190
patch-resource Updates part of an existing resource..
191
+ conditional-patch-resource
192
+ Updates part of an existing resource..
164
193
search-resources-get
165
194
Searches resources in the given FHIR store using the
166
195
searchResources GET method.
@@ -188,6 +217,12 @@ To run this sample:
188
217
The type of resource. First letter must be capitalized
189
218
--resource_id RESOURCE_ID
190
219
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
191
226
192
227
193
228
0 commit comments