Dear Sebastien, Dear All,
This question of sequence is terribly complex.
In the dicom standard part 15 we have :
"The Attributes listed in Table E.1-1 for each profile are contained in Standard IODs, or may be contained in Standard Extended IODs. An implementation claiming conformance to an Application Level Confidentiality Profile as a de-identifier shall protect or retain all instances of the Attributes listed in Table E.1-1, whether contained in the main dataset or embedded in an Item of a Sequence of Items. "
Which would mean that the same deidentification transformation should be applied to all PHI tags wathever in the main or in sequences.
This if we apply this rule, John's problem should diseapear as the in sequence private tag will follow the same de identification rule (removed or not as choosing in Orthanc payload api).
Is there a way to apply this rule with current Orthanc version ?
Then we have a warning
"Some profiles do not allow selective protection of parts of a Sequence of Items. If an Attribute to be protected is contained in a Sequence of Items, the complete Sequence of Items may need to be protected."
So if I understood correctly if a sequence contains something that shouldn't be de identified we should not edit the whole sequence. This would mean that the we would need to escape the sequence from edition if one of the nested tag are in the Keep array. Do we have something like this (I think no). However I think the Keep property can fit for this, as if you know that a specific sequence should be protected you can specify it in the Keep options.
All of this nested tags are a nightmare and can be prone to dangerous side effects. The consequences of all these choices are pretty hard to calculate.
Sebastien, do you think it would be dangerous to apply the deidentification rule to all tags in the PHI list for first level or nested in sequence ?
Maybe the best is to keep the anon like this, and add an option for private nested tags, at least for these ones the consequences should be minor.
Best regards,
Salim