def apply_to_submeasures(subs, type, values, unpaired_type=nil, unpaired_keys=[])
      new_subs = []
      subs.each do |sub|
        # this unless prevents us from forcing an exclusion or excepion onto a measure that has a submeasure without
        # an exclusion or exception, but other populations with an exclusion or excepion.
        unless unpaired_keys.include? sub[unpaired_type]
          # duplicate each new value if it is set, otherwise set this key on each submeasure.
          values.each do |value|
            if (sub[type] and sub[type] != value.id)
              tmp = {}
              HQMF::PopulationCriteria::ALL_POPULATION_CODES.each do |key|
                tmp[key] = sub[key] if sub[key]
              end
              sub = tmp
              new_subs << sub
            end
            sub[type] = value.id
          end
        end
      end
      subs.concat(new_subs)
    end
def apply_to_submeasures(subs, type, values, unpaired_type=nil, unpaired_keys=[])
      new_subs = []
      subs.each do |sub|
        # this unless prevents us from forcing an exclusion or excepion onto a measure that has a submeasure without
        # an exclusion or exception, but other populations with an exclusion or excepion.
        unless unpaired_keys.include? sub[unpaired_type]
          # duplicate each new value if it is set, otherwise set this key on each submeasure.
          values.each do |value|
            if (sub[type] and sub[type] != value.id)
              tmp = {}
              HQMF::PopulationCriteria::ALL_POPULATION_CODES.each do |key|
                tmp[key] = sub[key] if sub[key]
              end
              sub = tmp
              new_subs << sub
            end
            sub[type] = value.id
          end
        end
      end
      subs.concat(new_subs)
    end
create a copy of each submeasre adding on the new values of the given type
 skip the unpaired values.  Unpaired values are denominators without exclusions or populations without exceptions