OnStoredInstance change private tags

Hi,

How can i change/insert/delete private tags in OnStoredInstance function?

I tried:
replace[‘0x0031, 0x1020’] = ‘test’
replace[‘0031, 1020’] = ‘test’

Any hints :slight_smile:

Regards,
Robert

Hello,

Did you have a look at the following code sample in the source distribution of Orthanc?
https://code.google.com/p/orthanc/source/browse/Resources/Samples/Lua/AutoroutingModification.lua?name=Orthanc-0.8.5

HTH,
Sébastien-

Hi,

Yes i know the example.
But this example is for “known” tags (you can call them by name) But i want to insert a private tag.
I do not know how to make that happen.

Regards,
Robert

Hi,

There was indeed a problem in the handling of private tags. I have just fixed the mainline:
https://code.google.com/p/orthanc/source/detail?r=f796207e3df1eccbf7917d16e5b15b56f876e962

Thanks for reporting this issue! The fix will be shipped with Orthanc 0.8.6, to be released in the next few hours.

Sébastien-

Thank you for fixing this!! :slight_smile:

Maybe im asking for too much but i’m trying to insert dicom tags in a sequence but i cant seem to find a way to do that.
I’m a right that at the moment this is not possible?

for example i’m trying to insert patient ID and Issuer of patient ID in sequence tag:
Other Patient IDs Sequence (0010,1002)

Regards,
Robert

Hello,

Indeed, the insertion into sequences is not possible right at the moment.

I have just added a task in our roadmap, but do not expect it to be ready before several weeks:
https://trello.com/c/lkxfBr4x

Sébastien-

The fixes are part of Orthanc 0.8.6 that has just been released.

Sébastien-

Hello,

It is now possible to replace/insert sequences using the “…/modify” URI [1]. The feature will be part of upcoming Orthanc 0.9.5 release.

A sample Lua script can be found in the source distribution:
https://bitbucket.org/sjodogne/orthanc/src/default/Resources/Samples/Lua/ModifyInstanceWithSequence.lua

An integration test in Python is also available (test_modify_sequence):
https://bitbucket.org/sjodogne/orthanc-tests/src/264a20a0276d5c165d30b5aeb18d8a3a4cb1736d/Tests/Tests.py?at=default&fileviewer=file-view-default#Tests.py-2349

Regards,
Sébastien-

[1] https://bitbucket.org/sjodogne/orthanc/commits/8ca0e89798b2a41dfb53fb1b27a38fe2529a2d8e