How to get dicom file by patientId use REST Orthanc?

948 views
Skip to first unread message

devel...@bk.ru

unread,
Mar 30, 2015, 3:49:31 AM3/30/15
to orthan...@googlegroups.com

How to get dicom file by patientId use REST Orthanc?

Sébastien Jodogne

unread,
Mar 30, 2015, 4:06:01 AM3/30/15
to orthan...@googlegroups.com, devel...@bk.ru
Hi,

# curl -X POST http://localhost:8042/tools/lookup -d 'FPMETp'

where "FPMETp" is a sample Patient ID.

devel...@bk.ru

unread,
Mar 30, 2015, 4:26:04 AM3/30/15
to orthan...@googlegroups.com, devel...@bk.ru
понедельник, 30 марта 2015 г., 13:49:31 UTC+6 пользователь devel...@bk.ru написал:
> How to get dicom file by patientId use REST Orthanc?

Please send 1-2 example.

I need url for getting by get method

Sébastien Jodogne

unread,
Mar 30, 2015, 4:31:02 AM3/30/15
to orthan...@googlegroups.com, devel...@bk.ru
As written in the example, a POST is needed (not a GET).

A sample is given is my previous answer. Just change the sample "FPMETp" with your Patient ID, your Study Instance UID, your Series Instance UID, or your SOP Instance UID.

devel...@bk.ru

unread,
Mar 30, 2015, 4:39:19 AM3/30/15
to orthan...@googlegroups.com, devel...@bk.ru
понедельник, 30 марта 2015 г., 13:49:31 UTC+6 пользователь devel...@bk.ru написал:
> How to get dicom file by patientId use REST Orthanc?

As "http://localhost:8042/tools/lookup?patientid=patient1231434" ?
Or "http://localhost:8042/tools/lookup/patientid=patient1231434" ?

Sébastien Jodogne

unread,
Mar 30, 2015, 4:41:29 AM3/30/15
to orthan...@googlegroups.com, devel...@bk.ru
Neither of these, as written above:

# curl -X POST http://localhost:8042/tools/lookup -d 'FPMETp'

The URI is "http://localhost:8042/tools/lookup", the HTTP method is POST, and you have to provide a POST body containing the identifier.

devel...@bk.ru

unread,
Mar 31, 2015, 5:03:29 AM3/31/15
to orthan...@googlegroups.com, devel...@bk.ru
понедельник, 30 марта 2015 г., 13:49:31 UTC+6 пользователь devel...@bk.ru написал:
> How to get dicom file by patientId use REST Orthanc?

Hi, I want to get DICOM file, I use the curl -X POST http://localhost:8042/tools/lookup -d '123565', but the answer comes empty [].
Where '123565' is a tag PatientID(0010,0020). What is my mistake?

Sébastien Jodogne

unread,
Mar 31, 2015, 6:23:10 AM3/31/15
to orthan...@googlegroups.com, devel...@bk.ru
Your command is OK.

Please make sure that you use the proper PatientID. 

To retrieve the available PatientIDs in your instance of Orthanc, open the list of patients with Orthanc Explorer:

Sébastien Jodogne

unread,
Mar 31, 2015, 6:29:15 AM3/31/15
to orthan...@googlegroups.com, devel...@bk.ru
As an illustration, here is a fully working sample command-line session (in this case, the PatientID is "1067-005"):

$ curl -X POST http://localhost:8042/tools/lookup -d '1067-005'
[
   {
      "ID" : "1ab19372-79ed2273-b52d2f5a-a5cd98bd-148011cf",
      "Path" : "/patients/1ab19372-79ed2273-b52d2f5a-a5cd98bd-148011cf",
      "Type" : "Patient"
   }
]

$ curl http://localhost:8042/patients/1ab19372-79ed2273-b52d2f5a-a5cd98bd-148011cf/instances
[
   {
      "FileSize" : 133752,
      "FileUuid" : "2bb91829-da46-42bf-a8db-a0bbf690ce9e",
      "ID" : "55ca4f69-49878954-2df1f09b-0d97051c-b85651b7",
      "IndexInSeries" : 1,
      "MainDicomTags" : {
         "AcquisitionNumber" : "1",
         "InstanceCreationDate" : "20140917",
         "InstanceCreationTime" : "121458.349000",
         "InstanceNumber" : "1",
         "SOPInstanceUID" : "1.2.276.0.7230010.3.1.4.2831204194.2150.1418918234.311564"
      },
      "ParentSeries" : "3b7628e4-b246e631-670ad2b1-6d2cd1bc-81f4c7e8",
      "Type" : "Instance"
   },
   <...>
]

$ imagej image.dcm
Reply all
Reply to author
Forward
0 new messages