Thanks. I took a test study image and did:
scotti-imac:W_KNEE_LAT_Right_4 sscotti$ dcmodify -nb -i "(0008,0096)[0].(0040,1101)[0].(0008,0100)=0001" "/Users/sscotti/Downloads/W_KNEE_LAT_Right_4/IM-0002-0001.dcm"
scotti-imac:W_KNEE_LAT_Right_4 sscotti$ dcmodify -nb -i "(0008,0096)[0].(0040,1101)[0].(0008,0102)=L" "/Users/sscotti/Downloads/W_KNEE_LAT_Right_4/IM-0002-0001.dcm"
scotti-imac:W_KNEE_LAT_Right_4 sscotti$ dcmdump /Users/sscotti/Downloads/W_KNEE_LAT_Right_4/IM-0002-0001.dcm
and then a dcmdump, although I also set the root level 0008,0100 to 0001 and root level 0008,0102 to L by accident before that.
(0008,0096) SQ (Sequence with explicit length #=1) # 50, 1 ReferringPhysicianIdentificationSequence
(fffe,e000) na (Item with explicit length #=1) # 42, 1 Item
(0040,1101) SQ (Sequence with explicit length #=1) # 30, 1 PersonIdentificationCodeSequence
(fffe,e000) na (Item with explicit length #=2) # 22, 1 Item
(0008,0100) SH [0001] # 4, 1 CodeValue
(0008,0102) SH [L] # 2, 1 CodingSchemeDesignator
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0008,0100) SH [0001] # 4, 1 CodeValue
(0008,0102) SH [L] # 2, 1 CodingSchemeDesignator
It looks like you can actually use /tool/find to search for studies with {"0008,0100":"0001"} as part of the query when the root level tag is set.
I then deleted the root level tags for CodeValue and CodingSchemeDesignator and tools/find does not work for searching down the tag hierarchy.
This might be a little out of scope, but it seems like the place to set a code value for a ReferringPhysician is in the ReferringPhysicianIdentificationSequence, in which case I would want to do that in the MWL file (similar to dcmodify) and then also use tools/find to search/filter on the code value in ReferringPhysicianIdentificationSequence.
It all actually does seem to work if I just set the root level tag values like shown above, but it looks like that always belongs in a tag sequence and not at the root level.
Just curious if /tools/find allows you to search a hierarchy and if the MWL file can write to a hierachy and not just the root level.
Thanks.