How to get dicom file by patientId use REST Orthanc?

How to get dicom file by patientId use REST Orthanc?

Hi,

curl -X POST http://localhost:8042/tools/lookup -d ‘FPMETp’

where “FPMETp” is a sample Patient ID.

Please send 1-2 example.

I need url for getting by get method

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.

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

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.

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?

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:
http://localhost:8042/

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”
},
<…>
]

$ curl http://localhost:8042/instances/55ca4f69-49878954-2df1f09b-0d97051c-b85651b7/file > image.dcm

$ imagej image.dcm