# Controlling sending of studies between modalities

**URL:** https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630
**Category:** Google Groups archive
**Created:** [March 1, 2017, 11:44am UTC](https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630 "2017-03-01T11:44:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Marcelo\_Ribeiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/bbce88/32.png) [@Marcelo\_Ribeiro](https://discourse.orthanc-server.org/u/Marcelo_Ribeiro)
#### Post date: [March 1, 2017, 11:44am UTC](https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630/1 "2017-03-01T11:44:57Z")

</div>

Hello,

Please help!

I have an Orthanc at point “A” with many stored studies, now I need to send all the studies from point “A” to point “B” (also Orthanc), we know that we can call:

GET: http: // localhost: 8042 / patients

I retrieve the list of IDs to make the second call:

POST: http: // localhost: 8042 / modalities / OrthancPointA / store

With that it will send to point “B”, correct?

But let’s imagine a fall of the internet link or any other reason, then it will stop sending. The question is how can I know the breakpoint to continue sending from that point forward?

Thank you in advance for your support.

Thanks!

---

<div class="post-metadata">

### Author: ![Merck\_Derek](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/2bfe46/32.png) [@Merck\_Derek](https://discourse.orthanc-server.org/u/Merck_Derek)
#### Post date: [March 2, 2017, 2:14pm UTC](https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630/2 "2017-03-02T14:14:11Z")

</div>

If I understand correctly and you want to copy an entire image collection between two instances of Orthanc, the easiest thing to do is to use the "replicate.py" script that is in the examples.

If you are concerned about doing a resumable copy, you could use my "CopyDICOM.py" script at [https://github.com/derekmerck/CopyDICOM](https://github.com/derekmerck/CopyDICOM). This script does a bunch of stuff, but smart copying of only missing instances from one Orthanc to another is among them.

Derek-

---

<div class="post-metadata">

### Author: ![Thibault\_Nelis](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@Thibault\_Nelis](https://discourse.orthanc-server.org/u/Thibault_Nelis)
#### Post date: [March 6, 2017, 3:23pm UTC](https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630/3 "2017-03-06T15:23:39Z")

</div>

In the simplest case the operation is idempotent, so when in doubt  
transferring the data again is safe (though obviously costly in time).

You may use the /changes resource[1] to discover the latest successful  
transfer, or use another external store for this purpose.

[1] [http://book.orthanc-server.com/users/rest.html#tracking-changes](http://book.orthanc-server.com/users/rest.html#tracking-changes)

---

<div class="post-metadata">

### Author: ![Marcelo\_Ribeiro](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/bbce88/32.png) [@Marcelo\_Ribeiro](https://discourse.orthanc-server.org/u/Marcelo_Ribeiro)
#### Post date: [March 8, 2017, 8:14pm UTC](https://discourse.orthanc-server.org/t/controlling-sending-of-studies-between-modalities/630/4 "2017-03-08T20:14:34Z")

</div>

Thibault

This is really cool! Helped me a lot…

Thank you very much!
