kamalasv / orthanc

Automatically exported from code.google.com/p/orthanc
GNU General Public License v3.0
0 stars 0 forks source link

400 bad request when searching for a patient #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
I'm trying to setup an orthanc server only to query another DICOM server which 
holds some images I want to get.

What steps will reproduce the problem?
1. I install orthanc, works just fine

2. Edited configuration file with : "NAME" : [ "AETNAME", "IP", PORT, 
"ClearCanvas" ] in DicomModalities to add the DicomServer I want to query.

3. Running curl http://localhost:8042/modalities gets NAME.

4. Trying to do a : 
curl http://localhost:8042/modalities/sample/find-patient -X POST -d 
'{"PatientName":"DOE*","PatientSex":"M"}' -v

--> Gets a 400 bad request

What version of the product are you using? On what operating system?
Last with Windows 8.1

Thank you in advance for your help

Original issue reported on code.google.com by Nontenda on 10 Dec 2013 at 3:34

GoogleCodeExporter commented 9 years ago
--trace and --verbose does not help, I just see : POST POST 
/modalities/sample/find-patient

Original comment by Nontenda on 10 Dec 2013 at 3:35

GoogleCodeExporter commented 9 years ago
Hello,

What is the other DICOM server your are trying to connect to? Is it another 
instance of Orthanc?

If the other server is Orthanc, could you have a look at its logs?

Original comment by s.jodo...@gmail.com on 10 Dec 2013 at 3:43

GoogleCodeExporter commented 9 years ago
Hello,

thank you for your answer.
I don't really know what DICOM server it is.
I don't own that server and I can't know what it is before a way too long time 
(time for the people in the branch of the hospital to query their own sysadmin, 
etc...).

Is there any way to know what's going on with only my instance ?

Original comment by Nontenda on 10 Dec 2013 at 3:48

GoogleCodeExporter commented 9 years ago
I would suggest you to first try and deploy a second instance of Orthanc on 
your own computer, then to try to make the "find-patient" query from your first 
instance of Orthanc against this second instance. This way, you could figure 
out whether the problem is on the Orthanc side. I have just made this test on 
my computer with Orthanc 0.7.2, and everything works properly.

The most probable explanation is that the remote DICOM server does not allow 
Orthanc to make a C-FIND request. Are you sure that the remote DICOM server is 
aware of the AET/IP/Port of your local instance of Orthanc? Are you sure that 
you are able to make a Telnet request from your local computer to the remote 
DICOM server on its DICOM port?

Original comment by s.jodo...@gmail.com on 10 Dec 2013 at 3:56

GoogleCodeExporter commented 9 years ago
Strange (or I miss something), I try to add a modality in two orthanc, one as 
the other and vice-versa.

Always got a 400 bad request.

FIRST :
"DicomAet" : "ICPR2",
"DicomPort" : 5678,
...
"test" : [ "ORTHANC", "127.0.0.1", 4242, "Generic" ]

SECOND :
"DicomAet" : "ORTHANC",
"DicomPort" : 4242,
...
"test" : [ "ICPR2", "127.0.0.1", 5678, "Generic" ]

Original comment by Nontenda on 10 Dec 2013 at 4:26

GoogleCodeExporter commented 9 years ago
Hello,

I have tried to reproduce your configuration (cf. the 2 attached configuration 
files). Everything works properly on my computer (that runs Linux), if using 
the following command lines:

# curl http://localhost:8042/modalities/test/find-patient -X POST -d 
'{"PatientName":"DOE*","PatientSex":"M"}' -v
# curl http://localhost:8043/modalities/test/find-patient -X POST -d 
'{"PatientName":"DOE*","PatientSex":"M"}' -v

Original comment by s.jodo...@gmail.com on 11 Dec 2013 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
I close the bug, as no more input was provided. Do not hesitate to reactivate 
it, if the problem is still present.

Original comment by s.jodo...@gmail.com on 4 Aug 2014 at 12:08