# C-MOVE list matching

**URL:** https://discourse.orthanc-server.org/t/c-move-list-matching/1676
**Category:** Google Groups archive
**Created:** [October 15, 2019, 6:31am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676 "2019-10-15T06:31:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Miklos\_Espak1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Miklos\_Espak1](https://discourse.orthanc-server.org/u/Miklos_Espak1)
#### Post date: [October 15, 2019, 6:31am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/1 "2019-10-15T06:31:42Z")

</div>

Hi,

the DICOM standard allows matching against a list of UIDs in Q/R requests.

[http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect\_C.2.2.2.2.html](http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.2.2.2.2.html)

E.g. to retrieve two specific studies, one could perform a study root query and put something like “\” in the data set that is passed to C-MOVE.

This works with dcmqrscp for both C-GET and C-MOVE, but does not seem to work with Orthanc with C-MOVE.

Is there an issue open for this?

Cheers,  
Miklos

---

<div class="post-metadata">

### Author: ![Alain\_Mazy3](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@Alain\_Mazy3](https://discourse.orthanc-server.org/u/Alain_Mazy3)
#### Post date: [October 15, 2019, 10:29am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/2 "2019-10-15T10:29:53Z")

</div>

Hi Miklos,

There’s no issue yet for that topic.

If you file the issue please provide all steps to reproduce it including i.e: 2 anonymized DCM files from 2 studies and the exact movescu command to trigger the problem; that would help us a lot !

Best regards,

Alain.

---

<div class="post-metadata">

### Author: ![Miklos\_Espak1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Miklos\_Espak1](https://discourse.orthanc-server.org/u/Miklos_Espak1)
#### Post date: [October 15, 2019, 10:38am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/3 "2019-10-15T10:38:42Z")

</div>

Hi Alvin,

thanks for your response. I am answering to the list, I hope that’s fine.

That’s interesting. Does this send only one C-MOVE request or two?

I was using pynetdicom to send the C-MOVE request with the StudyInstanceUID-s concatenated with a backslash separator.

```auto
identifier = Dataset()
identifier.QueryRetrieveLevel = 'STUDY'
identifier.StudyInstanceUID = self.first_patient_first_study_uid + '\\' + self.first_patient_second_study_uid

results = self.c_get(identifier, 'S')

```

And the `self.c_get()` function sends the C-GET with this identifier data set. It is then turned to a C-MOVE with the same parameters.

I check movescu in the way you used it but I suspect, it sends two requests. I will let you know.

Cheers,  
Miklos

---

<div class="post-metadata">

### Author: ![Miklos\_Espak1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Miklos\_Espak1](https://discourse.orthanc-server.org/u/Miklos_Espak1)
#### Post date: [October 15, 2019, 10:49am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/4 "2019-10-15T10:49:08Z")

</div>

Hi Alain,

sure, happy to do that.

I already attempted to do this on this page:

[https://bitbucket.org/sjodogne/orthanc/issues](https://bitbucket.org/sjodogne/orthanc/issues)

but I don’t seem to have the right to do that. Shall I make the report to this list?

Cheers,  
Miklos

---

<div class="post-metadata">

### Author: ![Alain\_Mazy3](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/eb9ed0/32.png) [@Alain\_Mazy3](https://discourse.orthanc-server.org/u/Alain_Mazy3)
#### Post date: [October 15, 2019, 10:53am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/5 "2019-10-15T10:53:06Z")

</div>

You probably need to create a bitbucket account. But, you can include the report here in the list and I’ll file the issue.

movescu suggested by Alvin might indeed issue two commands. However, you might probably also use the “A\B” syntax with movescu.

---

<div class="post-metadata">

### Author: ![Miklos\_Espak1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Miklos\_Espak1](https://discourse.orthanc-server.org/u/Miklos_Espak1)
#### Post date: [October 15, 2019, 11:03am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/6 "2019-10-15T11:03:51Z")

</div>

My bad, I was looking for a login button everywhere but the bottom left corner. I make the report there.  
Thanks

---

<div class="post-metadata">

### Author: ![Alvin](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@Alvin](https://discourse.orthanc-server.org/u/Alvin)
#### Post date: [October 15, 2019, 12:08pm UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/7 "2019-10-15T12:08:59Z")

</div>

Hi Miklos,

As per the [movescu help document from dcmtk](https://support.dcmtk.org/docs/movescu.html), if more than one query parameters are provided, movescu will send multiple C-MOVE request to the SCP.  
Here is a sample movescu used for testing (for the group):

movescu -v -d localOrthanchost 4242 -k StudyInstanceUID=“1.3.6.1.4.1.24837.1.31.20170927125925096.533220” -k StudyInstanceUID=“1.3.6.1.4.1.24837.105.2.20190120092602804.3480118” -aet OSIRIX +P 10 -k QueryRetrieveLevel=“STUDY”

Cheers,  
Alvin

---

<div class="post-metadata">

### Author: ![Miklos\_Espak1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/6de8d8/32.png) [@Miklos\_Espak1](https://discourse.orthanc-server.org/u/Miklos_Espak1)
#### Post date: [October 15, 2019, 1:52pm UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/8 "2019-10-15T13:52:11Z")

</div>

Thank you!

With “list of UID matching” this should also work:

movescu -v -d localOrthanchost 4242 -k StudyInstanceUID=“1.3.6.1.4.1.24837.1.31.20170927125925096.533220\1.3.6.1.4.1.24837.105.2.20190120092602804.3480118” -aet OSIRIX +P 10 -k QueryRetrieveLevel=“STUDY”

At least an equivalent code worked with a pynetdicom client and dcmqrscp.

I will raise an issue on bitbucket and provide a test.

Cheers,  
Miklos

---

<div class="post-metadata">

### Author: ![Miklos\_Espak](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@Miklos\_Espak](https://discourse.orthanc-server.org/u/Miklos_Espak)
#### Post date: [October 18, 2019, 8:20am UTC](https://discourse.orthanc-server.org/t/c-move-list-matching/1676/9 "2019-10-18T08:20:12Z")

</div>

Issue #154 raised.  
[https://bitbucket.org/sjodogne/orthanc/issues/154/matching-against-list-of-uid-s-by-c-move](https://bitbucket.org/sjodogne/orthanc/issues/154/matching-against-list-of-uid-s-by-c-move)

Thanks,  
Miklos
