In this lab, you will discover and use the de-identification functionality of Cloud Healthcare API using Digital Imaging and Communications in Medicine (DICOM) data model.
In this lab, you will:
Gain a general understanding of Cloud Healthcare API and its role in managing healthcare data.
Learn how to create Cloud Healthcare API datasets and stores.
Import and Export DICOM data using the Cloud Healthcare API.
Setup and requirements
Before you click the Start Lab button
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.
How to start your lab and sign in to the Google Cloud console
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method.
On the left is the Lab Details pane with the following:
The Open Google Cloud console button
Time remaining
The temporary credentials that you must use for this lab
Other information, if needed, to step through this lab
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
Note: If you see the Choose an account dialog, click Use Another Account.
If necessary, copy the Username below and paste it into the Sign in dialog.
{{{user_0.username | "Username"}}}
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
{{{user_0.password | "Password"}}}
You can also find the Password in the Lab Details pane.
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials.
Note: Using your own Google Cloud account for this lab may incur extra charges.
Click through the subsequent pages:
Accept the terms and conditions.
Do not add recovery options or two-factor authentication (because this is a temporary account).
Do not sign up for free trials.
After a few moments, the Google Cloud console opens in this tab.
Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field.
Activate Cloud Shell
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
Continue through the Cloud Shell information window.
Authorize Cloud Shell to use your credentials to make Google Cloud API calls.
When you are connected, you are already authenticated, and the project is set to your Project_ID, . The output contains a line that declares the Project_ID for this session:
Your Cloud Platform project in this session is set to {{{project_0.project_id | "PROJECT_ID"}}}
gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
(Optional) You can list the active account name with this command:
gcloud auth list
Click Authorize.
Output:
ACTIVE: *
ACCOUNT: {{{user_0.username | "ACCOUNT"}}}
To set the active account, run:
$ gcloud config set account `ACCOUNT`
(Optional) You can list the project ID with this command:
gcloud config list project
Output:
[core]
project = {{{project_0.project_id | "PROJECT_ID"}}}
Note: For full documentation of gcloud, in Google Cloud, refer to the gcloud CLI overview guide.
Task 1. Create Healthcare dataset
In this exercise you will use the UI to create a Cloud Healthcare API dataset.
On the Google Cloud console title bar, type Healthcare browser in the Search field and press Enter, then click Browser in the search results.
On the Product Details page that opens, click Enable to enable the Cloud Healthcare API.
Once the API is enabled, in the Healthcare browser, select Create Dataset.
Name the dataset dataset1 within the region and click Create.
Click Check my progress to verify the objective.
Create Healthcare Dataset
Task 2. Set up IAM permissions
From the Navigation menu (), go to IAM & Admin > IAM.
On the IAM page, select the Include Google-provided role grants checkbox.
Edit the permissions for your Healthcare Service Agent by locating the service agent under the IAM list and selecting the pencil icon. The service account will have the Domain @gcp-sa-healthcare.iam.gserviceaccount.com.
Click Add another role to add additional roles to the Healthcare Service Agent account.
Click inside the Select a role box and choose the following roles:
Data in Cloud Healthcare API datasets and stores can be accessed and managed using a REST API that identifies each store using its project, location, dataset, store type and store name. This API implements modality-specific standards for access that are consistent with industry standards for that modality. For example, the Cloud Healthcare DICOM API natively provides operations for reading DICOM studies and series that are consistent with the DICOMweb standard, and supports the DICOM DIMSE C-STORE protocol via an open-source adapter.
The server returns a path to the newly created store.
Users can also use the curl utility to issue Cloud Healthcare API calls. curl is pre-installed in your Cloud Shell machine. By default, curl does not show HTTP status codes or session-related information; if you would like to see this information please add the -v option to all commands in this tutorial.
Try creating a secondary FHIR store by using the below command:
Operations that access a modality-specific store use a request path that is comprised of two pieces: a base path, and a modality-specific request path.
Administrative operations—which generally operate only on locations, datasets and stores—may only use the base path. Data modality-specific retrieval operations use both the base path (for identifying the store to be accessed) and request path (for identifying the actual data to be retrieved).
Click Check my progress to verify the objective.
Create data stores
Note:
If this check fails, wait a minute and try again. It often takes a minute or two for the import operation to be logged.
Task 6. Import to DICOM datasets
In this section you will be importing data from the NIH Chest x-ray data set to a DICOM store. For more information on the public dataset, visit the NIH Chest X-ray dataset documentation.
Click Check my progress to verify the objective.
Import to DICOM Datasets
Task 7. Configure OHIF Viewer
The Open Health Imaging Foundation (OHIF) Viewer is an open source, web-based, medical imaging viewer. You will use OHIF Viewer in this lab to view your DICOM dataset.
The following steps will walk through setting up OHIF Viewer to view your dataset:
First, select APIs & Services>OAuth Consent Screen from the Navigation menu to create an OAuth Consent screen.
On the Google Auth Platform page, select Branding.
App name: QL-de-identify
User support email: YOUR STUDENT EMAIL (this is provided by the lab)
Developer contact information: YOUR STUDENT EMAIL (same value as user support email)
For Audience user type is set to Internal by default.
Go to Data Access page, click on ADD OR REMOVE SCOPES.
Scroll to the bottom of the pop-up window to the Manually add scopes section..
Scroll to the bottom of the Data Access page and click SAVE.
Next, you'll need an OAuth Client ID to connect OHIF Viewer to your Cloud Healthcare resources.
Select Credentials from the APIS & Services menu.
On the Credentials page, click + Create Credentials > OAuth Client ID:
For your Application Type, choose Web application.
You will need to return to your client ID and fill out the domains once your OHIF Viewer application has been launched.
So, for now, leave everything as default and click Create.
You'll now the see your Client ID and Client Secret in the next window.
Click OK to close the window.
Now, deploy the OHIF Viewer container to Cloud Run and connect it with your OAuth Client ID.
To simplify the setup, the OHIF Viewer docker image already exists in container registry in a project you have access to, so you can directly deploy the container to Cloud Run.
In Cloud Shell, deploy the OHIF Viewer container to Cloud Run with this command substituting PASTE-CLIENT-ID-HERE with the Client ID of the OAuth Client you just created:
gcloud run deploy ohif-viewer --image=gcr.io/qwiklabs-resources/ohif-viewer:latest --platform=managed --region={{{ project_0.default_region | "REGION" }}} --allow-unauthenticated --set-env-vars=CLIENT_ID=[PASTE-CLIENT-ID-HERE] --max-instances=3
Note:
You can view and copy your Client ID in the Credentials tab:
If asked to enable the Cloud Run API, enter y and continue.
Once your Cloud Run deployment completes, you will be given a unique service URL that looks similar to this:
Service URL: https://ohif-viewer-ratpkirjdq-uc.a.run.app
You can now return to your OAuth Client ID and update the domains with this Service URL.
If you're not still on the Credentials page, select APIs & Services > Credentials from the Navigation menu in the Cloud console.
Edit your Client ID by clicking the pencil icon.
Add your unique service URI to Authorized Javascript Origins.
Add your unique service URI + /callback to Authorized Redirect URIs.
Click Save.
Task 8. Using De-identification
De-identification (redacting or transformation) of sensitive data elements is often an important step in pre-processing healthcare data so that it can be made available for analysis, machine learning models, and other use cases. Cloud Healthcare API has the capability to de-identify data stored in the service, facilitating analysis by researchers or machine learning analysis for advanced anomaly scans.
First, navigate to the service URL of your ohif-viewer Cloud Run app and sign in using your lab credentials. If you've lost track of your service URL, you can find it again with this command:
gcloud run services list --platform managed
Once on the OHIF-Viewer page, select your Project ID for the Project.
Select for the location.
Select dataset1 for your dataset.
Select dicomstore1 in the DICOM Store window.
You'll see one entry, R_004 with info for its ID number, Study Date, and Description:
Click on the entry to inspect it further and view the associated images.
This dataset contains pre-surgery images of a chest. You can scroll through them to view them all.
When you're done looking at it, press the Back button on your browser to return to the OHIF-Viewer main menu.
Next, you will de-identify this dataset.
Navigate back to Cloud Shell and issue the following request to de-identify the dataset:
With our small dataset, this operation will be done quickly, but on a larger dataset this operation can take a few minutes.
You can issue a rest request to check the status of a long running operation, replacing <operation-ID> with the operations ID issued in the previous output:
In the Cloud console, from the Navigation menu, navigate to Cloud Storage and click on your bucket.
Select a folder, click on an image, then click on the Link URL. This will download the image.
You can check the file extension to verify your file is correct or click the image to view.
Click Check my progress to verify the objective.
Converting DICOM Images
Lab review
Cloud Healthcare API provides a comprehensive facility for ingesting, storing, managing, and securely exposing healthcare data in FHIR, DICOM, and HL7 v2 formats. Using Cloud Healthcare API, you can ingest and store data from electronic health records systems (EHRs), radiological information systems (RISs), and custom healthcare applications. You can then immediately make that data available to applications for analysis, machine learning prediction and inference, and consumer access.
Cloud Healthcare API enables application access to healthcare data via widely-accepted, standards-based interfaces such as FHIR STU3 and DICOMweb. These APIs allow data ingestion into modality-specific data stores, which support data retrieval, update, search and other functions using familiar standards-based interfaces.
Further, the API integrates with other capabilities in Google Cloud through two primary mechanisms:
Pub/Sub, which provides near-real-time updates when data is ingested into a Cloud Healthcare API data store, and
Import/export APIs, which allow you to integrate Cloud Healthcare API into both Cloud Storage and BigQuery.
Using Pub/Sub with Cloud Run functions enables you to invoke machine learning models on healthcare data, storing the resulting predictions back in Cloud Healthcare API data store. A similar integration with Cloud Dataflow supports transformation and cleansing of healthcare data prior to use by applications.
To support healthcare research, Cloud Healthcare API offers de-identification capabilities for FHIR and DICOM. This feature allows customers to share data with researchers working on new cutting-edge diagnostics and medicines.
Congratulations!
In this lab you:
Gained a general understanding of Cloud Healthcare API and its role in managing healthcare data.
Learned how to create datasets and stores for FHIR and DICOM data.
Imported FHIR and DICOM data.
Finish your course
This self-paced lab is part of the Cloud Healthcare API course. A course is a series of related labs that form a learning path. Completing this course earns you a badge to recognize your achievement. You can make your badge or badges public and link to them in your online resume or social media account. Enroll in any course that contains this lab and get immediate completion credit. Refer to the Google Cloud Skills Boost catalog for more details.
Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
Lab membuat project dan resource Google Cloud untuk jangka waktu tertentu
Lab memiliki batas waktu dan tidak memiliki fitur jeda. Jika lab diakhiri, Anda harus memulainya lagi dari awal.
Di kiri atas layar, klik Start lab untuk memulai
Gunakan penjelajahan rahasia
Salin Nama Pengguna dan Sandi yang diberikan untuk lab tersebut
Klik Open console dalam mode pribadi
Login ke Konsol
Login menggunakan kredensial lab Anda. Menggunakan kredensial lain mungkin menyebabkan error atau dikenai biaya.
Setujui persyaratan, dan lewati halaman resource pemulihan
Jangan klik End lab kecuali jika Anda sudah menyelesaikan lab atau ingin mengulanginya, karena tindakan ini akan menghapus pekerjaan Anda dan menghapus project
Konten ini tidak tersedia untuk saat ini
Kami akan memberi tahu Anda melalui email saat konten tersedia
Bagus!
Kami akan menghubungi Anda melalui email saat konten tersedia
Satu lab dalam satu waktu
Konfirmasi untuk mengakhiri semua lab yang ada dan memulai lab ini
Gunakan penjelajahan rahasia untuk menjalankan lab
Gunakan jendela Samaran atau browser pribadi untuk menjalankan lab ini. Langkah ini akan mencegah konflik antara akun pribadi Anda dan akun Siswa yang dapat menyebabkan tagihan ekstra pada akun pribadi Anda.
This lab focuses on how to use the de-identification functionality of Cloud Healthcare API with the Digital Imaging and Communications in Medicine (DICOM) data model.