You can use this script for all the UID elements that you want to
remap:
@hashuid(@UIDROOT,this)
To do it correctly, you should get a UID from some official source and set
the UIDROOT parameter in the script to that UID.
Note: You should replace the value of the UIDROOT parameter in the
anonymizer script file with a UID that you own. The value of the UIDROOT
parameter in the default DicomAnonymizer script is set to
"1.2.840.113654.2.70.1". I don't have any memory of how that came to be; it used
to be "9999" as a convenience for testing. In any case, you should change
it.
Note: Some UIDs – for example, TransferSyntaxUID and SOPClassUID –
should not be remapped because they refer to specific things in the DICOM
standard.
With the script above, two identical UIDs will be mapped to identical
values, whether they occur in the same data object or in different ones.
JP