IDs ... how they're created?

I’ve noticed that IDs used within Orthanc aren’t GUIDs. In some cases, this does make sense - ie, if a study comes into Orthanc that’s identical to one that’s already present, the StudyID is the same.

How is the ID generated? Is it based solely on the StudyInstanceUID?

Secondarily, JobIDs seem to be based on (I’m guessing) the Study being sent and possibly the AET that it’s being sent to. If I send the same study to the same AET, this week and one tomorrow, the JobID remains the same. This is where I have a slight issue as these types of IDs should be based on the time they’re generated and (IMHO) the JobIDs should be different.

Is there any way of overriding this? Making Job IDs truly unique?

BNOEAFK

Hi,

In regard to Orthanc Identifiers - this page https://book.orthanc-server.com/faq/orthanc-ids.html explains how they are created. I can’t help regarding the Job IDs sorry.

Janes

Hi Dave,

To my knowledge, job IDs are random UUIDs.

Best regards,

Alain.

Janes - many thanks for the ID link - I hadn’t come across that page before.

Alain - I’ve been working diligently over the past few weeks with capturing JobIDs and storing them as I’m using them in order to further some automated workflows - and from what I’m seeing, they’re not at all unique. For example, when I use postman to send a study to a specific peer, I get back a specific ID. I can then request to send the same study, to the same peer any time afterwards, and I get the same ID back, which I don’t believe should happen. I understand the hashing run on the StudyInstanceUID, that does make sense - but the JobIDs should be truly unique, IMHO.

Thoughts?

Dave

Hi Dave,

This is really weird. Hereunder is the code that generates the job id.
image.png

And here’s what I get if I create the same job consecutively:
curl http://localhost:8044/peers/win-service/store -d ‘{“Resources” :[“499da310-208c9552-187e66df-fbc2d150-153ca6ed”], “Synchronous”: false}’
{
“ID” : “e732b3c4-7601-4a88-be1c-56f0d951cc61”,
“Path” : “/jobs/e732b3c4-7601-4a88-be1c-56f0d951cc61”
}

curl http://localhost:8044/peers/win-service/store -d ‘{“Resources” :[“499da310-208c9552-187e66df-fbc2d150-153ca6ed”], “Synchronous”: false}’
{
“ID” : “69e745a5-7a30-46b0-b36e-d64241a7e443”,
“Path” : “/jobs/69e745a5-7a30-46b0-b36e-d64241a7e443”
}

HTH,

Alain

Interesting - and yes it totally helps. I’m going to spend more time looking into this, as it appeared that the duplicates IDs were being generated from a (router) Orthanc system sitting between a (source) system and a remote peer. From the source system sending to an AET that routes to the peer, I was definitely getting the same JobID from the router system…

More info when I have it sir.

Dave