This page explains how to create, edit, view, list, and delete Digital Imaging and Communications in Medicine (DICOM) stores.
DICOM stores hold DICOM instances. You can add and manage DICOM instances in a DICOM store using the DICOMweb implementation in the Cloud Healthcare API, or you can import and export DICOM instances using Google Cloud services.
For more information on how the Cloud Healthcare API conforms to the DICOM standard, see the DICOM conformance statement.
Creating a DICOM store
Before you can create a DICOM store, you need to create a dataset.
The following samples show how to create a DICOM store:
Console
To create a DICOM store:
- In the Google Cloud console, go to the Datasets page.
- Select the dataset where you want to create a DICOM store.
- Click Create Data Store.
- Select DICOM as the data store type.
- Enter a name of your choice that's unique in your dataset. If the name is not unique, the data store creation fails.
- Click Next.
-
If you want to configure a Pub/Sub topic for the data store, click Receive
Cloud Pub/Sub notifications and select the topic name.
When specifying a Pub/Sub topic, enter the qualified URI to the topic, as shown in the
following sample:
projects/PROJECT_ID/topics/PUBSUB_TOPIC
- Click Next.
- To add one or more labels to the store, click Add Labels to organize your data stores and enter the key/value label. For more information on resource labels, see Using resource labels.
- Click Create.
The new data store appears in the list.
gcloud
To create a DICOM store, run the gcloud healthcare dicom-stores create
command.
Before using any of the command data below, make the following replacements:
LOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: an identifier for the DICOM store. The DICOM store ID must have the following:- A unique ID in its dataset
- A Unicode string of 1-256 characters consisting of the following:
- Numbers
- Letters
- Underscores
- Dashes
- Periods
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud healthcare dicom-stores create DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION
Windows (PowerShell)
gcloud healthcare dicom-stores create DICOM_STORE_ID ` --dataset=DATASET_ID ` --location=LOCATION
Windows (cmd.exe)
gcloud healthcare dicom-stores create DICOM_STORE_ID ^ --dataset=DATASET_ID ^ --location=LOCATION
You should receive a response similar to the following:
Response
Created dicomStore [DICOM_STORE_ID].
REST
To create a DICOM store, use the projects.locations.datasets.dicomStores.create
method.
Before using any of the request data, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: an identifier for the DICOM store. The DICOM store ID must have the following:- A unique ID in its dataset
- A Unicode string of 1-256 characters consisting of the following:
- Numbers
- Letters
- Underscores
- Dashes
- Periods
To send your request, choose one of these options:
curl
Execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d "" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores?dicomStoreId=DICOM_STORE_ID"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores?dicomStoreId=DICOM_STORE_ID" | Select-Object -Expand Content
APIs Explorer
Open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and click Execute.
You should receive a JSON response similar to the following:
Go
Java
Node.js
Python
Editing a DICOM store
The following samples show how to make the following changes to a DICOM store:
- Edit the Pub/Sub topic to which the Cloud Healthcare API sends notifications of DICOM store changes.
- Edit the labels. Labels are key-value pairs that help you organize your Google Cloud resources.
projects/PROJECT_ID/topics/PUBSUB_TOPICFor notifications to work, you must grant additional permissions to the Cloud Healthcare Service Agent service account. For more information, see DICOM, FHIR, and HL7v2 store Pub/Sub permissions.
Console
To edit a DICOM store, complete the following steps:
- In the Google Cloud console, go to the Datasets page.
- Select the dataset containing the DICOM store you want to edit.
- In the Data stores list, click the data store you want to edit.
- If you want to configure a Pub/Sub topic for the data store, select the topic name from Select a Cloud Pub/Sub Topic.
- To add one or more labels to the store, click Using resource labels. Labels, click Add label, and enter the key/value label. For more information on resource labels, see
- Click Save.
gcloud
To edit a DICOM store, run the gcloud healthcare dicom-stores update
command.
The gcloud CLI does not support editing labels.
Before using any of the command data below, make the following replacements:
LOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store IDPUBSUB_TOPIC
: a Pub/Sub topic to which messages are published when an event occurs in a data store
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud healthcare dicom-stores update DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION \ --pubsub-topic=projects/PROJECT_ID/topics/PUBSUB_TOPIC
Windows (PowerShell)
gcloud healthcare dicom-stores update DICOM_STORE_ID ` --dataset=DATASET_ID ` --location=LOCATION ` --pubsub-topic=projects/PROJECT_ID/topics/PUBSUB_TOPIC
Windows (cmd.exe)
gcloud healthcare dicom-stores update DICOM_STORE_ID ^ --dataset=DATASET_ID ^ --location=LOCATION ^ --pubsub-topic=projects/PROJECT_ID/topics/PUBSUB_TOPIC
You should receive a response similar to the following:
Response
Updated dicomStore [DICOM_STORE_ID]. ... name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID notificationConfig: pubsubTopic: projects/PROJECT_ID/topics/PUBSUB_TOPIC
REST
To edit a DICOM store, use the projects.locations.datasets.dicomStores.patch
method.
Before using any of the request data, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store IDPUBSUB_TOPIC
: a Pub/Sub topic to which messages are published when an event occurs in a data storeKEY_1
: the first label keyVALUE_1
: the first label valueKEY_2
: the second label keyVALUE_2
: the second label value
Request JSON body:
{ "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } }
To send your request, choose one of these options:
curl
Save the request body in a file named request.json
.
Run the following command in the terminal to create or overwrite
this file in the current directory:
cat > request.json << 'EOF' { "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } } EOF
Then execute the following command to send your REST request:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID?updateMask=notificationConfig,labels"
PowerShell
Save the request body in a file named request.json
.
Run the following command in the terminal to create or overwrite
this file in the current directory:
@' { "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } } '@ | Out-File -FilePath request.json -Encoding utf8
Then execute the following command to send your REST request:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID?updateMask=notificationConfig,labels" | Select-Object -Expand Content
APIs Explorer
Copy the request body and open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Paste the request body in this tool, complete any other required fields, and click Execute.
You should receive a response similar to the following.
If you configured any fields in the DicomStore
resource, they also appear in the response.
Go
Java
Node.js
Python
Getting DICOM store details
The following samples show how to get details about a DICOM store.
Console
To view a DICOM store's details:
- In the Google Cloud console, go to the Datasets page.
- Select the dataset containing the DICOM store you want to view.
- Click the name of the DICOM store.
The Overview tab shows the details of the selected DICOM store. The Metrics tab shows the DICOM store, DICOM study, and DICOM series metrics. For more information, see View DICOM store, DICOM study, and DICOM series metrics.
gcloud
To get details about a DICOM store, run the gcloud healthcare dicom-stores describe
command.
Before using any of the command data below, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store ID
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud healthcare dicom-stores describe DICOM_STORE_ID \ --project=PROJECT_ID \ --dataset=DATASET_ID \ --location=LOCATION
Windows (PowerShell)
gcloud healthcare dicom-stores describe DICOM_STORE_ID ` --project=PROJECT_ID ` --dataset=DATASET_ID ` --location=LOCATION
Windows (cmd.exe)
gcloud healthcare dicom-stores describe DICOM_STORE_ID ^ --project=PROJECT_ID ^ --dataset=DATASET_ID ^ --location=LOCATION
You should receive a response similar to the following.
If you configured any fields in the DicomStore
resource, they also appear in the response.
Response
name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID
REST
To get details about a DICOM store, use the projects.locations.datasets.dicomStores.get
method.
Before using any of the request data, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" | Select-Object -Expand Content
APIs Explorer
Open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and click Execute.
You should receive a response similar to the following.
If you configured any fields in the DicomStore
resource, they also appear in the response.
Go
Java
Node.js
Python
Listing the DICOM stores in a dataset
The following samples show how to list the DICOM stores in a dataset:
Console
To view the data stores in a dataset:
- In the Google Cloud console, go to the Datasets page.
- Select the dataset containing the data store you want to view.
gcloud
To list the DICOM stores in a dataset, run the gcloud healthcare dicom-stores list
command.
Before using any of the command data below, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent dataset
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud healthcare dicom-stores list \ --project=PROJECT_ID \ --dataset=DATASET_ID \ --location=LOCATION
Windows (PowerShell)
gcloud healthcare dicom-stores list ` --project=PROJECT_ID ` --dataset=DATASET_ID ` --location=LOCATION
Windows (cmd.exe)
gcloud healthcare dicom-stores list ^ --project=PROJECT_ID ^ --dataset=DATASET_ID ^ --location=LOCATION
You should receive a response similar to the following.
If you configured any fields in the DicomStore
resource, they also appear in the response.
ID LOCATION TOPIC DICOM_STORE_ID LOCATION PUBSUB_TOPIC ...
REST
To list the DICOM stores in a dataset, use the projects.locations.datasets.dicomStores.list
method.
Before using any of the request data, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent dataset
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores" | Select-Object -Expand Content
APIs Explorer
Open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and click Execute.
You should receive a response similar to the following.
If you configured any fields in the DicomStore
resource, they also appear in the response.
Go
Java
Node.js
Python
Deleting a DICOM store
The following samples show how to delete a DICOM store:
Console
To delete a data store:
- In the Google Cloud console, go to the Datasets page.
- Select the dataset containing the data store you want to delete.
- Choose Delete from the Actions drop-down list for the data store that you want to delete.
- To confirm, type the data store name and then click Delete.
gcloud
To delete a DICOM store, run the gcloud healthcare dicom-stores delete
command.
Before using any of the command data below, make the following replacements:
LOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store ID
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud healthcare dicom-stores delete DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION
Windows (PowerShell)
gcloud healthcare dicom-stores delete DICOM_STORE_ID ` --dataset=DATASET_ID ` --location=LOCATION
Windows (cmd.exe)
gcloud healthcare dicom-stores delete DICOM_STORE_ID ^ --dataset=DATASET_ID ^ --location=LOCATION
Deleted dicomStore [DICOM_STORE_ID].
REST
To delete a DICOM store, use the projects.locations.datasets.dicomStores.delete
method.
Before using any of the request data, make the following replacements:
PROJECT_ID
: the ID of your Google Cloud projectLOCATION
: the dataset locationDATASET_ID
: the DICOM store's parent datasetDICOM_STORE_ID
: the DICOM store ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID"
PowerShell
Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" | Select-Object -Expand Content
APIs Explorer
Open the method reference page. The APIs Explorer panel opens on the right side of the page. You can interact with this tool to send requests. Complete any required fields and click Execute.
You should receive a JSON response similar to the following: