def set_tag(tag, options={})
      raise ArgumentError, "Expected String, got #{tag.class}." unless tag.is_a?(String)
      raise ArgumentError, "Expected a valid tag of format 'GGGG,EEEE', got #{tag}." unless tag.tag?
      pos = @tags.index(tag)
      if pos
        # Update existing values:
        @values[pos] = options[:value] if options[:value]
        @enumerations[pos] = options[:enum] if options[:enum] != nil
      else
        # Add new elements:
        @tags << tag
        @values << (options[:value] ? options[:value] : default_value(tag))
        @enumerations << (options[:enum] ? options[:enum] : false)
      end
    end
def set_tag(tag, options={})
      raise ArgumentError, "Expected String, got #{tag.class}." unless tag.is_a?(String)
      raise ArgumentError, "Expected a valid tag of format 'GGGG,EEEE', got #{tag}." unless tag.tag?
      pos = @tags.index(tag)
      if pos
        # Update existing values:
        @values[pos] = options[:value] if options[:value]
        @enumerations[pos] = options[:enum] if options[:enum] != nil
      else
        # Add new elements:
        @tags << tag
        @values << (options[:value] ? options[:value] : default_value(tag))
        @enumerations << (options[:enum] ? options[:enum] : false)
      end
    end
Sets the anonymization settings for the specified tag. If the tag is already present in the list
 of tags to be anonymized, its settings are updated, and if not, a new tag entry is created.

 @param [String] tag a data element tag
 @param [Hash] options the anonymization settings for the specified tag
 @option options [String, Integer, Float] :value the replacement value to be used when anonymizing this data element. Defaults to the pre-existing value and '' for new tags.
 @option options [String, Integer, Float] :enum specifies if enumeration is to be used for this tag. Defaults to the pre-existing value and false for new tags.
 @example Set the anonymization settings of the Patient's Name tag
   a.set_tag('0010,0010', :value => 'MrAnonymous', :enum => true)