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 in the dataset, run the
gcloud healthcare dicom-stores create
command.
- The DICOM store ID must be unique in the dataset. It can be any Unicode string from 1 through 256 characters consisting of numbers, letters, underscores, dashes, and periods.
- To notify a Pub/Sub topic of DICOM store changes, specify an
existing Pub/Sub topic name using the
--pubsub-topic
argument. 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
The following sample shows how to create a DICOM store.
gcloud healthcare dicom-stores create DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION \ [--pubsub-topic=projects/PROJECT_ID/topics/PUBSUB_TOPIC]
If the request is successful, the command prompt displays the following message:
Created dicomStore [DICOM_STORE_ID].
API
To create a DICOM store, use the
projects.locations.datasets.dicomStores.create
method.
curl
To create a DICOM store, make a POST
request and specify the following
information:
- The name and location of the parent dataset
- A name for the DICOM store. The DICOM store ID must be unique in its parent dataset. It can be any Unicode string from 1 through 256 characters consisting of numbers, letters, underscores, dashes, and periods.
- An access token
- Optionally, an existing Pub/Sub topic to which the Cloud Healthcare API sends notifications of DICOM store changes. See Editing a DICOM store for information on how to configure the Pub/Sub topic.
- Optionally, whether or not to send Pub/Sub notifications during bulk import. The
sendForBulkImport
field is only available in the v1beta1 version.
The following sample shows a POST
request using curl
:
curl -X POST \ --data "" \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores?dicomStoreId=DICOM_STORE_ID"
If the request is successful, the server returns the following response in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }
PowerShell
To create a DICOM store, make a POST
request and specify the following
information:
- The name and location of the parent dataset
- A name for the DICOM store. The DICOM store ID must be unique in its parent dataset. It can be any Unicode string from 1 through 256 characters consisting of numbers, letters, underscores, dashes, and periods.
- An access token
- Optionally, an existing Pub/Sub topic to which the Cloud Healthcare API sends notifications of DICOM store changes. See Editing a DICOM store for information on how to configure the Pub/Sub topic.
- Optionally, whether or not to send Pub/Sub notifications during bulk import. The
sendForBulkImport
field is only available in the v1beta1 version.
The following sample shows a POST
request using Windows PowerShell:
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Post ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Uri "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores?dicomStoreId=DICOM_STORE_ID" | Select-Object -Expand Content
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }
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 the edit icon next to Labels, click Add label, and enter the key/value label. For more information on resource labels, see Using resource labels.
- If you have added a label, click Save.
gcloud
To update the DICOM store, run the
gcloud healthcare dicom-stores update
command.
The following sample shows how to update the Pub/Sub topic for the DICOM store. gcloud CLI does not support editing labels.
Optionally, you can specify whether or not to send Pub/Sub notifications during bulk import. The sendForBulkImport
field is only available in the v1beta1 version.
gcloud healthcare dicom-stores update DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION \ --pubsub-topic=projects/PROJECT_ID/topics/PUBSUB_TOPIC
If the request is successful, the command prompt displays the DICOM store details including the new topic name:
Updated dicomStore [DICOM_STORE_ID]. name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicom-stores/DICOM_STORE_ID notificationConfig: pubsubTopic: projects/PROJECT_ID/topics/PUBSUB_TOPIC sendForBulkImport: VALUE
API
To edit a DICOM store, use the
projects.locations.datasets.dicomStores.patch
method.
curl
To edit a DICOM store, make a PATCH
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store
- The metadata to update. In this example, the qualified URI to the Pub/Sub topic and the labels to update as a comma-delimited list of key-value pairs.
- An update mask
- An access token
- Optionally, whether or not to send Pub/Sub notifications during bulk import. The
sendForBulkImport
field is only available in the v1beta1 version.
The following sample shows a PATCH
request using curl
:
curl -X PATCH \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ --data "{ 'notificationConfig': { 'pubsubTopic':'projects/PROJECT_ID/topics/PUBSUB_TOPIC' }, 'labels': { 'KEY1':'VALUE1','KEY2':'VALUE2' } }" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID?updateMask=notificationConfig,labels"
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID", "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, 'labels': { 'KEY1':'VALUE1','KEY2':'VALUE2' } }
PowerShell
To edit a DICOM store, make a PATCH
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store
- The metadata to update. In this example, the qualified URI to the Pub/Sub topic and the labels to update as a comma-delimited list of key-value pairs.
- An update mask
- An access token
- Optionally, whether or not to send Pub/Sub notifications during bulk import. The
sendForBulkImport
field is only available in the v1beta1 version.
The following sample shows a PATCH
request using Windows PowerShell:
$cred = gcloud auth application-default print-access-token $headers = @{ Authorization = "Bearer $cred" } Invoke-WebRequest ` -Method Patch ` -Headers $headers ` -ContentType: "application/json; charset=utf-8" ` -Body "{ 'notificationConfig': { 'pubsubTopic': 'projects/PROJECT_ID/topics/PUBSUB_TOPIC' }, 'labels': { 'KEY1':'VALUE1','KEY2':'VALUE2' } }" ` -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
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID", "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, 'labels': { 'KEY1':'VALUE1','KEY2':'VALUE2' } }
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.
gcloud
To view details about a DICOM store, run the
gcloud healthcare dicom-stores describe
command.
The following sample shows how to get details about a DICOM store:
gcloud healthcare dicom-stores describe DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION
If the request is successful, the command prompt displays the DICOM store details:
name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicom-stores/DICOM_STORE_ID
API
To get details about a DICOM store, use the
projects.locations.datasets.dicomStores.get
method.
curl
To get details about a DICOM store, make a GET
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store
- An access token
The following sample shows a GET
request using curl
:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID"
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }
If you configured any fields in the
DicomStore
resource, they also appear in the response.
PowerShell
To get details about a DICOM store, make a GET
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store
- An access token
The following sample shows a GET
request using Windows PowerShell:
$cred = gcloud auth application-default 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
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }
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.
- Click the ID of the dataset whose data stores you want to view.
gcloud
To list the DICOM stores in a dataset, run the
gcloud healthcare dicom-stores list
command.
gcloud healthcare dicom-stores list --dataset=DATASET_ID
If the request is successful, the command prompt lists the DICOM stores:
ID LOCATION TOPIC DICOM_STORE_ID LOCATION projects/PROJECT_ID/topics/PUBSUB_TOPIC
API
To list the DICOM stores in a dataset, use the
projects.locations.datasets.dicomStores.list
method.
curl
To list the DICOM stores in a dataset, make a GET
request and specify the
following information:
- The name and location of the parent dataset
- An access token
The following sample shows a GET
request using curl
:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores"
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "dicomStores": [ { "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }, { ... } ] }
If you configured any fields in the
DicomStore
resource, they also appear in the response.
PowerShell
To list the DICOM stores in a dataset, make a GET
request and specify the
following information:
- The name of the parent dataset
- An access token
The following sample shows a GET
request using Windows PowerShell:
$cred = gcloud auth application-default 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
If the request is successful, the server returns a response similar to the following sample in JSON format:
{ "dicomStores": [ { "name": "projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID" }, { ... } ] }
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:
- Run the
delete
command.
gcloud healthcare dicom-stores delete DICOM_STORE_ID \ --dataset=DATASET_ID \ --location=LOCATION
- To confirm, type Y.
If the request is successful, the command prompt displays the following response:
Deleted dicomStore [DICOM_STORE_ID].
API
To delete a DICOM store, use the
projects.locations.datasets.dicomStores.delete
method.
curl
To delete a DICOM store, make a DELETE
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store to delete
- An access token
The following sample shows a DELETE
request using curl
:
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ "https://healthcare.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID"
If the request is successful, the server returns the empty response body in JSON format:
{}
PowerShell
To delete a DICOM store, make a DELETE
request and specify the following
information:
- The name and location of the parent dataset
- The name of the DICOM store to delete
- An access token
The following sample shows a DELETE
request using Windows PowerShell:
$cred = gcloud auth application-default 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
If the request is successful, the server returns the empty response body in JSON format:
{}