Google Cloud Healthcare
The Google Cloud Healthcare API is a powerful option for storing medical imaging data in the cloud.
An alternative to deploying your own PACS is to use a software-as-a-service provider such as Google Cloud. The Cloud Healthcare API promises to be a scalable, secure, cost effective image storage solution for those willing to store their data in the cloud. It offers an almost-entirely complete DICOMWeb API which requires tokens generated via the OAuth 2.0 Sign In flow. Images can even be transcoded on the fly if this is desired.
Setup a Google Cloud Healthcare Project​
-
Create a Google Cloud account
-
Create a project in Google Cloud
A project in Google Cloud can be created by clicking the projects drop down box.
And then clicking the
NEW PROJECT
button in the top-right corner of the dialogue that is displayed. -
Enable the Cloud Healthcare API for your project
tipAn API can be enabled through the
APIs & Services > Enabled APIs & Services
console and clicking the+ ENABLE APIS AND SERVICES
button.tipThe principal (i.e. account) that is enabling the Cloud Healthcare API will require the following roles that can be set in the
IAM & Admin > IAM
console for the desired project.- Service Usage Viewer
- Service Usage Admin
tipRoles can be added to a principal in the
IAM & Admin > IAM
console by clicking theEdit principal
(i.e. pencil) icon to the right of a principal or by clicking theGRANT ACCESS
button at the top of the list of principals. TheGRANT ACCESS
button is particularly useful if theEdit principal
icon is disabled. -
(Optional): Create a Dataset and DICOM Data Store for storing your DICOM data
tipTo both list existing datasets as well as create a new dataset for your project, the principal (i.e. account) must have the following roles enabled in the
IAM & Admin > IAM
console.- Editor
-
Enable the Cloud Resource Manager API for your project.
Note: If you are having trouble finding the APIs, use the search box at the top of the Cloud console.
-
Go to APIs & Services > OAuth Consent Screen to create an OAuth Consent screen and fill in your application details.
-
Run through the three step process of adding an OAuth Consent Screen, clicking
SAVE AND CONTINUE
at the end of each step. -
For the Scopes step, for Google APIs, click the
ADD OR REMOVE SCOPES
button. -
In the
Update selected scopes
dialogue that flies in from the right, add the following scopes to theManually add scopes
text box.https://www.googleapis.com/auth/cloudplatformprojects.readonly
https://www.googleapis.com/auth/cloud-healthcare
-
Click
ADD TO TABLE
and then clickUPDATE
-
-
Go to APIs & Services > Credentials to create a new set of credentials:
-
Click
+ CREATE CREDENTIALS
and from the drop down selectOAuth Client ID
. See OAuth 2.0 Client ID for more information. -
Choose the "Web Application" type
-
Add your domain (e.g.
http://localhost:3000
) to the Authorized JavaScript origins. -
Add your domain, plus
callback
(e.g.http://localhost:3000/callback
) to the Authorized Redirect URIs. -
Save your Client ID for later.
-
-
(Optional): Create a bucket containing DICOM files and import it into a Data Store
-
When importing a bucket into a Data Store, the following warning might be displayed indicating that the Cloud Healthcare Service Agent service account associated with the project does not have the
Storage Object Viewer
role. -
The Cloud Healthcare Service Agent service account can be displayed in the
IAM & Admin > IAM
console by checking theInclude Google-provided role grants
checkbox. TheStorage Object Viewer
role can then be granted to the Cloud Healthcare Service Agent service account. -
More information regarding the Cloud Healthcare Service Agent service account can be found at https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products
-
-
(Optional): Enable Public Datasets that are being hosted by Google: https://cloud.google.com/healthcare/docs/resources/public-datasets/
Run the viewer with your OAuth Client ID​
- Open the
config/google.js
file and changeYOURCLIENTID
to your Client ID value. - Run the OHIF Viewer using the config/google.js configuration file
cd OHIFViewer
yarn install
APP_CONFIG=config/google.js yarn run dev
Configuring Google Cloud Healthcare as a datasource in OHIF​
A Google Cloud Healthcare DICOM store can be configured as a DICOMweb datasource
in OHIF. A full or partial path is permitted in the configuration file. For
partial paths, the data source configuration UI
will assist in filling in the missing pieces. For example, a configuration with
empty wadoUriRoot
, qidoRoot
and wadoRoot
will prompt for the entire path
step-by-step starting with the project.