En esta página, se explica cómo crear, editar, ver, enumerar y borrar Imágenes y comunicaciones digitales en medicina (DICOM) en las tiendas físicas.
Los almacenes de DICOM contienen instancias de DICOM. Puedes agregar y administrar instancias de DICOM en un almacén de DICOM mediante la implementación de DICOMweb en la API de Cloud Healthcare o puedes importar y exportar instancias de DICOM mediante servicios de Google Cloud.
Para obtener más información sobre cómo la API de Cloud Healthcare se ajusta al estándar DICOM, consulta la Declaración de conformidad de DICOM.
Crea un almacén de DICOM
Antes de crear un almacén de DICOM, debes crear un conjunto de datos.
En los siguientes ejemplos, se muestra cómo crear un almacén DICOM.
Console
Para crear una tienda de DICOM, haz lo siguiente:
- En la consola de Google Cloud, ve a la página Conjunto de datos.
- Abre el conjunto de datos en el que deseas crear una tienda de DICOM.
- Haz clic en Crear almacén de datos.
- Selecciona DICOM como el tipo de almacén de datos.
- Ingresa un nombre de tu elección que sea único en tu conjunto de datos. Si el nombre no es único, la creación del almacén de datos fallará.
- Haga clic en Next.
-
Si deseas configurar un tema de Pub/Sub para el almacén de datos, haz clic en Recibir notificaciones de Cloud Pub/Sub y selecciona el nombre del tema.
Cuando especifiques un tema de Pub/Sub, ingresa el URI calificado del tema, como se muestra en
siguiente ejemplo:
projects/PROJECT_ID/topics/PUBSUB_TOPIC
- Haz clic en Siguiente.
- Para agregar una o más etiquetas al almacén, haz clic en Agregar etiquetas a fin de organizar tus almacenes de datos y, luego, ingresa la etiqueta de clave-valor. Para obtener más información sobre las etiquetas de recursos, consulta Usa etiquetas de recursos.
- Haga clic en Crear.
El nuevo almacén de datos aparece en la lista.
gcloud
Para crear un almacén de DICOM, ejecuta el comando gcloud healthcare dicom-stores create
.
Antes de usar cualquiera de los datos de comando a continuación, realiza los siguientes reemplazos:
LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
un identificador para el almacén de DICOM. El ID del almacén de DICOM debe tener lo siguiente:- Un ID único en su conjunto de datos
- Una string de Unicode de 1 a 256 caracteres que consiste en lo siguiente:
- Números
- Letras
- Guiones bajos
- Guiones:
- Puntos
Ejecuta el siguiente comando:
Linux, macOS o 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
Deberías recibir una respuesta similar a la que figura a continuación:
Respuesta
Created dicomStore [DICOM_STORE_ID].
REST
Para crear un almacén de DICOM, usa el método projects.locations.datasets.dicomStores.create
.
Antes de usar cualquiera de los datos de solicitud a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
un identificador para el almacén de DICOM. El ID del almacén de DICOM debe tener lo siguiente:- Un ID único en su conjunto de datos
- Una string de Unicode de 1 a 256 caracteres que consiste en lo siguiente:
- Números
- Letras
- Guiones bajos
- Guiones:
- Puntos:
Para enviar tu solicitud, elige una de estas opciones:
curl
Ejecuta el siguiente comando:
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
Ejecuta el siguiente comando:
$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
Explorador de API
Abre el página de referencia del método. El panel del Explorador de API se abre en la parte derecha de la página. Puedes interactuar con esta herramienta para enviar solicitudes. Completa los campos obligatorios y haz clic en Ejecutar.
Deberías recibir una respuesta JSON similar a la que se muestra a continuación:
Go
Java
Node.js
Python
Editar una tienda de DICOM
En los siguientes ejemplos, se muestra cómo realizar los siguientes cambios en un almacén de DICOM:
- Edita el tema de Pub/Sub al que la API de Cloud Healthcare envía las notificaciones de los cambios del almacén de DICOM.
- Edita las etiquetas. Las etiquetas son pares clave-valor que te ayudan a organizar tus recursos de Google Cloud.
projects/PROJECT_ID/topics/PUBSUB_TOPICPara que las notificaciones funcionen, debes otorgar acceso permisos para la cuenta de servicio del agente de servicio de Cloud Healthcare. Para obtener más información, consulta DICOM, FHIR y HL7v2 almacenan permisos de Pub/Sub.
Console
Para editar un almacén de DICOM, realiza los siguientes pasos:
- En la consola de Google Cloud, ve a la página Conjuntos de datos.
- Selecciona el conjunto de datos que contenga el almacén de DICOM que deseas editar.
- En la lista Almacenes de datos, haz clic en el almacén de datos que deseas editar.
- Si deseas configurar un tema de Pub/Sub para el almacén de datos, selecciona el nombre del tema desde Selecciona un tema de Cloud Pub/Sub.
- Para agregar una o más etiquetas al almacén, haz clic en Usa etiquetas de recursos. Etiquetas, luego, en Agregar etiqueta e ingresa la etiqueta de par clave-valor. Para obtener más información sobre las etiquetas de recursos, consulta
- Haz clic en Guardar.
gcloud
Para editar un almacén de DICOM, ejecuta el comando gcloud healthcare dicom-stores update
:
La CLI de gcloud no admite la edición de etiquetas.
Antes de usar cualquiera de los datos de comando a continuación, realiza los siguientes reemplazos:
LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOMPUBSUB_TOPIC
: Es un tema de Pub/Sub en el que se publican mensajes cuando se produce un evento en un almacén de datos.
Ejecuta el siguiente comando:
Linux, macOS o 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
Deberías recibir una respuesta similar a la que figura a continuación:
Respuesta
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
Para editar un almacén de DICOM, usa el método projects.locations.datasets.dicomStores.patch
.
Antes de usar cualquiera de los datos de solicitud a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOMPUBSUB_TOPIC
: Es un tema de Pub/Sub en el que se publican mensajes cuando se produce un evento en un almacén de datos.KEY_1
: La primera clave de etiquetaVALUE_1
: El primer valor de etiquetaKEY_2
: La segunda clave de etiquetaVALUE_2
: El segundo valor de etiqueta
Cuerpo JSON de la solicitud:
{ "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } }
Para enviar tu solicitud, elige una de estas opciones:
curl
Guarda el cuerpo de la solicitud en un archivo llamado request.json
.
Ejecuta el comando siguiente en la terminal para crear o reemplazar este archivo en el directorio actual:
cat > request.json << 'EOF' { "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } } EOF
Luego, ejecuta el siguiente comando para enviar tu solicitud de REST:
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
Guarda el cuerpo de la solicitud en un archivo llamado request.json
.
Ejecuta el comando siguiente en la terminal para crear o reemplazar este archivo en el directorio actual:
@' { "notificationConfig": { "pubsubTopic": "projects/PROJECT_ID/topics/PUBSUB_TOPIC" }, "labels": { "KEY_1": "VALUE_1", "KEY_2": "VALUE_2" } } '@ | Out-File -FilePath request.json -Encoding utf8
Luego, ejecuta el siguiente comando para enviar tu solicitud de REST:
$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
Explorador de API
Copia el cuerpo de la solicitud y abre la página de referencia del método. El panel del Explorador de API se abre en la parte derecha de la página. Puedes interactuar con esta herramienta para enviar solicitudes. Pega el cuerpo de la solicitud en esta herramienta, completa cualquier otro campo obligatorio y haz clic en Ejecutar.
Deberías recibir una respuesta similar a la que figura a continuación.
Si configuraste algún campo en el recurso DicomStore
, también aparecerá en la respuesta.
Go
Java
Node.js
Python
Obtén detalles de una tienda de DICOM
En los siguientes ejemplos, se muestra cómo obtener los detalles sobre un almacén de DICOM.
Console
Para ver los detalles de un almacén de DICOM, debes hacer lo siguiente:
- En la consola de Google Cloud, ve a la página Conjuntos de datos.
- Selecciona el conjunto de datos que contenga el almacén de DICOM que deseas ver.
- Haga clic en el nombre del almacén de DICOM.
En la pestaña Descripción general, se muestran los detalles del almacén de DICOM seleccionado. En la pestaña Métricas, se muestran las métricas del almacén de DICOM, el estudio de DICOM y las métricas de la serie DICOM. Para más información, consulta Ver el almacén de DICOM, el estudio de DICOM y DICOM las métricas de la serie.
gcloud
Para obtener más detalles sobre un almacén de DICOM, ejecuta el comando gcloud healthcare dicom-stores describe
.
Antes de usar cualquiera de los datos de comando a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOM
Ejecuta el siguiente comando:
Linux, macOS o 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
Deberías recibir una respuesta similar a la que figura a continuación.
Si configuraste algún campo en el recurso DicomStore
, también aparecerá en la respuesta.
Respuesta
name: projects/PROJECT_ID/locations/LOCATION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID
REST
Para obtener más detalles sobre un almacén de DICOM, usa el método projects.locations.datasets.dicomStores.get
.
Antes de usar cualquiera de los datos de solicitud a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOM
Para enviar tu solicitud, elige una de estas opciones:
curl
Ejecuta el siguiente comando:
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
Ejecuta el siguiente comando:
$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
Explorador de API
Abre el página de referencia del método. El panel del Explorador de API se abre en la parte derecha de la página. Puedes interactuar con esta herramienta para enviar solicitudes. Completa los campos obligatorios y haz clic en Ejecutar.
Deberías recibir una respuesta similar a la que figura a continuación.
Si configuraste algún campo en el recurso DicomStore
, también aparecerá en la respuesta.
Go
Java
Node.js
Python
Enumera las tiendas de DICOM en un conjunto de datos
En los siguientes ejemplos, se muestra cómo enumerar los almacenes DICOM en un conjunto de datos.
Console
Para ver los almacenes de datos en un conjunto de datos, haz lo siguiente:
- En la consola de Google Cloud, ve a la página Conjuntos de datos.
- Selecciona el conjunto de datos que contiene el almacén de datos que deseas ver.
gcloud
Para mostrar una lista de los almacenes de DICOM en un conjunto de datos, ejecuta el comando gcloud healthcare dicom-stores list
.
Antes de usar cualquiera de los datos de comando a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOM
Ejecuta el siguiente comando:
Linux, macOS o 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
Deberías recibir una respuesta similar a la que figura a continuación.
Si configuraste algún campo en el recurso DicomStore
, también aparecerá en la respuesta.
ID LOCATION TOPIC DICOM_STORE_ID LOCATION PUBSUB_TOPIC ...
REST
Para mostrar una lista de los almacenes DICOM en un conjunto de datos, usa el método projects.locations.datasets.dicomStores.list
.
Antes de usar cualquiera de los datos de solicitud a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOM
Para enviar tu solicitud, elige una de estas opciones:
curl
Ejecuta el siguiente comando:
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
Ejecuta el siguiente comando:
$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
Explorador de API
Abre el página de referencia del método. El panel del Explorador de API se abre en la parte derecha de la página. Puedes interactuar con esta herramienta para enviar solicitudes. Completa los campos obligatorios y haz clic en Ejecutar.
Deberías recibir una respuesta similar a la que figura a continuación.
Si configuraste algún campo en el recurso DicomStore
, también aparecerá en la respuesta.
Go
Java
Node.js
Python
Borra una tienda de DICOM
En los siguientes ejemplos, se muestra cómo borrar un almacén de DICOM.
Console
Para borrar un almacén de datos, realiza las siguientes acciones:
- En la consola de Google Cloud, ve a la página Conjuntos de datos.
- Selecciona el conjunto de datos que contiene el almacén de datos que deseas borrar.
- Elige Borrar en la lista desplegable Acciones para el almacén de datos que deseas borrar.
- Para confirmar, escribe el nombre del almacén de datos y, luego, haz clic en Borrar.
gcloud
Para borrar un almacén de DICOM, ejecuta el comando gcloud healthcare dicom-stores delete
:
Antes de usar cualquiera de los datos de comando a continuación, realiza los siguientes reemplazos:
LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOM
Ejecuta el siguiente comando:
Linux, macOS o 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
Para borrar un almacén de DICOM, usa el método projects.locations.datasets.dicomStores.delete
.
Antes de usar cualquiera de los datos de solicitud a continuación, realiza los siguientes reemplazos:
PROJECT_ID
El ID de tu proyecto de Google Cloud.LOCATION
: La ubicación del conjunto de datosDATASET_ID
: El conjunto de datos superior del almacén de DICOMDICOM_STORE_ID
: El ID del almacén de DICOM
Para enviar tu solicitud, elige una de estas opciones:
curl
Ejecuta el siguiente comando:
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
Ejecuta el siguiente comando:
$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
Explorador de API
Abre el página de referencia del método. El panel del Explorador de API se abre en la parte derecha de la página. Puedes interactuar con esta herramienta para enviar solicitudes. Completa los campos obligatorios y haz clic en Ejecutar.
Deberías recibir una respuesta JSON similar a la que se muestra a continuación: