Importing DICOM files from GCS. Return study ID, or publish pubsub message?

165 views
Skip to first unread message

doml...@gmail.com

unread,
Sep 13, 2021, 8:36:36 AM9/13/21
to GCP Healthcare Discuss
Hi all.

We have a web app that allows users to upload DICOM files via the browser. Currently this is implemented using a simple multipart POST, and we forward the file to GCP Healthcare API. Has been working perfectly for ages.

However, we recently migrated to Cloud Run, which has a maximum single request size of 32mb. My customers routinely have DICOM files > 32mb. One immediate ideas was to allow the user to upload to Google storage directly, and figure out how to get it into Google Healthcare after that. 

So I went ahead and implemented it, but I found out far too late, that the DICOM import operation doesn't publish to Pubsub on creation of a study.

Furthermore, the DICOM operations describe call, does not return any useful information about the actual DICOM study. I.e. if I imported from GCS, I could poll the operation until it's completed, and get the study ID, then publish to Pubsub myself.

So currently, I am not sure what I should do. Does anyone have any suggestions or ideas? One very non optimal approach is that I write my own Cloud function that watches a GCS bucket, and performs an import myself, where I would download the file, upload the file, and publish to Pubsub. Not ideal is it :(

Dom

Paul Church

unread,
Sep 13, 2021, 3:03:14 PM9/13/21
to doml...@gmail.com, GCP Healthcare Discuss
You can configure a DICOM store to send pubsub notifications on import using the sendForBulkImport flag available through the v1beta1 API: https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/NotificationConfig

In the store configuration, this option is under notificationConfig, e.g.
notificationConfig: {
  pubsubTopic: "...",
  sendForBulkImport: true
}

--
You received this message because you are subscribed to the Google Groups "GCP Healthcare Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gcp-healthcare-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gcp-healthcare-discuss/545d3c7e-c6e8-4041-a31e-71b71ad1b552n%40googlegroups.com.

Dominic Bou-Samra

unread,
Sep 14, 2021, 9:39:29 AM9/14/21
to Paul Church, GCP Healthcare Discuss
Perfect!

Just tested it, and it works great, thank you.


Dominic Bou-Samra

unread,
Sep 23, 2021, 8:48:22 AM9/23/21
to Paul Church, GCP Healthcare Discuss
Hi Paul and team.

Is it possible for a few changes to be considered:

- Sending pubsub messages ALWAYS regardless of whether the instance already exists. Let API consumers handle duplicates in their app layer.
- Storing some DICOM id's (study id, instance id etc) in the Import operations error messages.

Dom

Daniel Beaudreau

unread,
Oct 6, 2021, 3:42:24 PM10/6/21
to GCP Healthcare Discuss
Hi Dom,

Thanks for the feedback.
I've noted the feature request to support pubsub for duplicate instances.

For the second point about DICOM IDs, currently we only support listing the GCS file path of the failed file in our stackdriver error logging.

The typical case of a failed insert is due to the API not being able to parse the input file. 
In that case, we would not be able to extract the UIDs from the file.

Thanks,
Daniel
Reply all
Reply to author
Forward
0 new messages