# Orthanc reject when receiving dicom from Modality

**URL:** https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223
**Category:** Google Groups archive
**Created:** [January 12, 2023, 9:29am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223 "2023-01-12T09:29:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [January 12, 2023, 9:29am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223/1 "2023-01-12T09:29:04Z")

</div>

Hi Author,  
I am connecting Orthanc to the DX Modality. However when Modality transfered dicom to Orthanc, Orthanc rejected with the following error

I0112 16:20:09.778032 main.cpp:317] Incoming connection from AET RADMAX on IP 172.16.24.37, calling AET HELLO  
I0112 16:20:09.778051 CommandDispatcher.cpp:664] (dicom) Association Acknowledged (Max Send PDV: 16372) to AET RADMAX on IP 172.16.24.37  
I0112 16:20:09.790648 CommandDispatcher.cpp:929] (dicom) Finishing association with AET RADMAX on IP 172.16.24.37: DIMSE: Command Parse Failed: Element: (0000,1000) AffectedSOPInstanceUID

The dicom file exported directly from Modality does not have tag (0000,1000). I suspected that Modality sent additional tag (0000,1000) during handshake session.  
Could you please help to investigate why Orthanc cannot parse tag (0000,1000) ?

Thanks,

[orthanc log.txt](https://discourse.orthanc-server.org/uploads/short-url/aHJcF2WA41fQply9o5xNrZcx5Y.txt) (2.99 KB)

---

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [January 12, 2023, 9:32am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223/2 "2023-01-12T09:32:35Z")

</div>

Dicom file can be downloaded from : [https://drive.google.com/file/d/1uN2Nq6UU-OqgUFLJH8veO3xcUE3RCOfI/view?usp=share\_link](https://drive.google.com/file/d/1uN2Nq6UU-OqgUFLJH8veO3xcUE3RCOfI/view?usp=share_link)

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [January 12, 2023, 9:49am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223/3 "2023-01-12T09:49:29Z")

</div>

Hi,

This tag is actually not part of the file itself but part of the DIMSE C-Store RQ message. [Reference](https://dicom.nema.org/dicom/2013/output/chtml/part07/sect_9.3.html).

I would suggest you to get in touch with the commercial support of your modality.

You may also capture the network traffic with [Wireshark](https://www.wireshark.org/) to check the value of this tag in the message but, in any case, I’m afraid there’s nothing we can do about it in Orthanc.

Best regards,

Alain.

---

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [January 12, 2023, 9:54am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223/4 "2023-01-12T09:54:04Z")

</div>

Thanks Alain,  
Browsing Orthanc code, that’s error message is comming from Modality. Thanks again

---

<div class="post-metadata">

### Author: ![Christopher](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@Christopher](https://discourse.orthanc-server.org/u/Christopher)
#### Post date: [January 13, 2023, 4:04am UTC](https://discourse.orthanc-server.org/t/orthanc-reject-when-receiving-dicom-from-modality/3223/5 "2023-01-13T04:04:44Z")

</div>

Thanks to @Stephen D. Scotti, the issue comes from the VR of SOPInstanceUID is too long. According to the Dicom Standard, maximum length of UI (VR of SOPInstanceUID) is 64 bytes, whilst modality generated 68 bytes. It’s due my bug in Worklist Program. I’ve fixed that and it does work.
