# DICOM C-STORE API

As members of the Bunkerhill Health Consortium, medical institutions can send data to Bunkerhill, where that data is stored and used to research, train, and validate AI models. Bunkerhill provides multiple ways to send this medical data from an institution:

* **Upload to Box:** data can be compressed to ZIP files and uploaded to a Box folder to which Bunkerhill has access, from which Bunkerhill will process the data.
* **C-STORE:** data can be sent via an institution’s PACS to Bunkerhill using C-STORE, where it will pass through an on-premises Edge service, from which Bunkerhill will process the data.

This document provides information on how to send data using the second method.

### Prerequisites

Before attempting to send data via C-STORE, do the following:

* Ensure that Bunkerhill’s Edge service is up and running at your institution.
* Contact a member of Bunkerhill’s support staff to communicate what data you wish to transfer. Bunkerhill staff will provide you with the following information:
  * The `Hostname` and `Port` of the Edge service to send the data to (this will be the same for all datashares within an institution).
  * A `Datashare ID`, which will be used to configure the C-STORE connection.

### Sending Data

The data should be in the form of one or more DICOM files which contain all information about your studies that you wish to share.

Establish a C-STORE association with the following parameters:

* `Hostname` and `Port` as described above (see Prerequisites).
* CALLED AE-TITLE equal to the `Datashare ID` described above.

After establishing the association, begin sending the data. Monitor for a few seconds after beginning the transfer to make sure that the files are sending properly.

Bunkerhill staff will communicate with you if any issues arise during the transfer.

### Troubleshooting

There are a few potential pitfalls to be aware of:

* Make sure that the CALLED AE-TITLE matches the `Datashare ID`. If they do not match, the association will be aborted shortly after being established.
* Some PACS systems place additional restrictions on CALLED AE-TITLE. If your PACS system does not allow for CALLED AE-TITLE to be equal to the `Datashare ID` Bunkerhill  provides, then please contact Bunkerhill staff. Bunkerhill will arrange a solution—typically either a datashare with a substitute CALLED AE-TITLE or a datashare where you will instead set CALLING AE-TITLE to be equal to `Datashare ID`.
* Bunkerhill buffers some files on disk during a datashare. If your datashare is very large, more disk may need to be allocated to the Bunkerhill Edge service in order to process it successfully.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bunkerhillhealth.com/software/apis/dicom-c-store-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
