def retrieve_field_values_model_for_model
      field_values = {}
      @field_values.each_pair do |id, val|
        field_values[id] = val.to_model
      end
      @code_list_id ||= code_list_id

      # Model transfers as a field
      if %w(transfer_to transfer_from).include? @definition
        field_code_list_id = @code_list_id
        @code_list_id = nil
        unless field_code_list_id
          field_code_list_id = attr_val("./#{CRITERIA_GLOB}/cda:outboundRelationship/#{CRITERIA_GLOB}/cda:value/@valueSet")
        end
        field_values[@definition.upcase] = HQMF::Coded.for_code_list(field_code_list_id, title)
      end

      return field_values unless field_values.empty?
    end
def retrieve_field_values_model_for_model
      field_values = {}
      @field_values.each_pair do |id, val|
        field_values[id] = val.to_model
      end
      @code_list_id ||= code_list_id

      # Model transfers as a field
      if %w(transfer_to transfer_from).include? @definition
        field_code_list_id = @code_list_id
        @code_list_id = nil
        unless field_code_list_id
          field_code_list_id = attr_val("./#{CRITERIA_GLOB}/cda:outboundRelationship/#{CRITERIA_GLOB}/cda:value/@valueSet")
        end
        field_values[@definition.upcase] = HQMF::Coded.for_code_list(field_code_list_id, title)
      end

      return field_values unless field_values.empty?
    end
Generate the models of the field values