Origin of Dicom ?

Hi there,

I have a simple question for which I didn’t found a answer yet.

Is there somewhere in Orthanc RestApis where the origin of the DICOM can be found ?

I will try to make an autorouting app in Java using Orthanc APIs and one of the requested features is to make autorouting depending on the origin of the DICOM (in the DICOM comes from AET X send to AET Y).

The /change API do not deliver the origin of the event and I don’t find this information in the orther study / series API.

The Origin AET of DICOM is it stored somewhere ?

Best regards,

Salim

One option is on OnStoredInstance, take the origin and put it into a tag. (Thats what I do myself)

I’m sorry I’m on my way home but I’d like to leave my U$0,02 on the table.

If you’re interacting with Orthanc through C/C++ plugins you can obtain an instance’s origin through the OrthancPluginGetInstanceOrigin function.

ref: https://github.com/jodogne/OrthancMirror/blob/master/Plugins/Samples/AutomatedJpeg2kCompression/Plugin.cpp

This is so as of 1.3.2, which is the code base I’ve been messing with.

Strictly through Rest API without plugins or Lua Scripts I don’t know how.

Screenshot_20180703-205757.png

Hi,

Information about the origin of the instances is stored as Metadata, which can be accessed using the REST API:

$ curl http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata
[
“IndexInSeries”,
“ReceptionDate”,
“RemoteAET”,
“Origin”,
“TransferSyntax”,
“SopClassUid”,
“RemoteIP”,
“CalledAET”
]

The relevant metadata about the origin of an instance is:

  • “Origin”: Whether the instance was received from the REST API, the DICOM protocol, some plugin or some Lua script.
  • “RemoteAET”: The remote AET (for DICOM).
  • “RemoteIP” (new in Orthanc 1.4.0): The IP address of the remote server (for REST API and DICOM).
  • “CalledAET” (new in Orthanc 1.4.0): The called AET (for DICOM).
  • “HttpUsername” (new in Orthanc 1.4.0): The username that created the instance (for REST API).

HTH,

Sébastien-

Thank you so much Sébastien !

This worked gracefully for me.

Additionally, to see the values of these properties, you must add the querystring _**?expand**_ at the end of the URL:

_**http://localhost:8042/instances/19816330-cb02e1cf-df3a8fe8-bf510623-ccefe9f5/metadata?expand**_

Thanks Sebastien!

how can this be done?

http://book.orthanc-server.com/faq/features.html#metadata-attachments