@@ -17,6 +17,16 @@ This directory contains samples for Cloud Healthcare API. `Cloud Healthcare API`
1717
1818.. _Cloud Healthcare API : https://cloud.google.com/healthcare/docs
1919
20+ To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/healthcare.googleapis.com
21+
22+
23+ To run the sample, you need to have the following roles:
24+ * `Healthcare Dataset Administrator `
25+ * `Healthcare FHIR Store Administrator `
26+ * `Healthcare FHIR Resource Editor `
27+
28+
29+
2030Setup
2131-------------------------------------------------------------------------------
2232
@@ -85,17 +95,18 @@ To run this sample:
8595 [--fhir_store_id FHIR_STORE_ID]
8696 [--pubsub_topic PUBSUB_TOPIC] [--gcs_uri GCS_URI]
8797 [--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}
98+ {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store,import-fhir-resources ,export-fhir-store-gcs,get_iam_policy,set_iam_policy}
8999 ...
90100
91101 positional arguments:
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}
102+ {create-fhir-store,delete-fhir-store,get-fhir-store,list-fhir-stores,patch-fhir-store,import-fhir-resources ,export-fhir-store-gcs,get_iam_policy,set_iam_policy}
93103 create-fhir-store Creates a new FHIR store within the parent dataset.
94104 delete-fhir-store Deletes the specified FHIR store.
95105 get-fhir-store Gets the specified FHIR store.
96106 list-fhir-stores Lists the FHIR stores in the given dataset.
97107 patch-fhir-store Updates the FHIR store.
98- import-fhir-store Import resources into the FHIR store by copying them
108+ import-fhir-resources
109+ Import resources into the FHIR store by copying them
99110 from the specified source.
100111 export-fhir-store-gcs
101112 Export resources to a Google Cloud Storage bucket by
@@ -160,36 +171,46 @@ To run this sample:
160171 [--dataset_id DATASET_ID]
161172 [--fhir_store_id FHIR_STORE_ID]
162173 [--resource_type RESOURCE_TYPE]
163- [--resource_id RESOURCE_ID] [--bundle BUNDLE]
174+ [--resource_id RESOURCE_ID] [--patient_id PATIENT_ID]
175+ [--encounter_id ENCOUNTER_ID] [--bundle BUNDLE]
164176 [--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}
177+ {create-patient,create-encounter,create-observation, delete-resource,conditional-delete-resource,get-resource,list-resource-history,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}
166178 ...
167179
168180 positional arguments:
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}
170- create-resource Creates a new resource in a FHIR store.
171- delete-resource Creates a new resource in a FHIR store.
181+ {create-patient,create-encounter,create-observation,delete-resource,conditional-delete-resource,get-resource,list-resource-history,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}
182+ create-patient Creates a new Patient resource in a FHIR store.
183+ create-encounter Creates a new Encounter resource in a FHIR store based
184+ on a Patient.
185+ create-observation Creates a new Observation resource in a FHIR store
186+ based on an Encounter.
187+ delete-resource Deletes a FHIR resource. Regardless of whether the
188+ operation succeeds or fails, the server returns a 200
189+ OK HTTP status code. To check that the resource was
190+ successfully deleted, search for or get the resource
191+ and see if it exists.
172192 conditional-delete-resource
173- Deletes an existing resource specified by search
174- criteria.
193+ Deletes FHIR resources that match a search query.
175194 get-resource Gets a FHIR resource.
176195 list-resource-history
177196 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.
197+ execute-bundle Executes the operations in the given bundle.
181198 get-resource-history
182199 Gets a version resource.
183200 delete-resource-purge
184201 Deletes versions of a resource (excluding current
185202 version).
186203 update-resource Updates an existing resource.
187204 conditional-update-resource
188- Updates an existing resource specified by search
189- criteria.
205+ If a resource is found based on the search criteria
206+ specified in the query parameters, updates the entire
207+ contents of that resource.
190208 patch-resource Updates part of an existing resource..
191209 conditional-patch-resource
192- Updates part of an existing resource..
210+ If a resource is found based on the search criteria
211+ specified in the query parameters, updates part of
212+ that resource by applying the operations specified in
213+ a JSON Patch document.
193214 search-resources-get
194215 Searches resources in the given FHIR store using the
195216 searchResources GET method.
@@ -216,7 +237,13 @@ To run this sample:
216237 --resource_type RESOURCE_TYPE
217238 The type of resource. First letter must be capitalized
218239 --resource_id RESOURCE_ID
219- Name of a FHIR resource
240+ Identifier for a FHIR resource
241+ --patient_id PATIENT_ID
242+ Identifier for a Patient resource. Can be used as a
243+ reference for an Encounter/Observation
244+ --encounter_id ENCOUNTER_ID
245+ Identifier for an Encounter resource. Can be used as a
246+ reference for an Observation
220247 --bundle BUNDLE Name of file containing bundle of operations to
221248 execute
222249 --uri_prefix URI_PREFIX
0 commit comments