<commit_before>class CentralContact < StudyRelationship

  def self.create_all_from(opts)
    central_contacts = contacts(opts) + backup_contacts(opts)
    import(central_contacts)
  end

  def self.contacts(opts)
    opts[:xml].xpath('//overall_contact').collect{|xml|
      new.create_from({:xml=>xml, :nct_id=>opts[:nct_id], :contact_type=>'primary'})}
  end

  def self.backup_contacts(opts)
    opts[:xml].xpath('//overall_contact_backup').collect{|xml|
      new.create_from({:xml=>xml,:nct_id=>opts[:nct_id], :contact_type=>'backup'})}
  end

  def attribs
    {
      :contact_type => get_opt('contact_type'),
      :name => get('last_name'),
      :phone => get('phone') + get('phone_ext'),
      :email => get('email'),
    }
  end
end
<commit_msg>AACT-163: add  ' ext ' between phone and phone ext<commit_after>class CentralContact < StudyRelationship

  def self.create_all_from(opts)
    central_contacts = contacts(opts) + backup_contacts(opts)
    import(central_contacts)
  end

  def self.contacts(opts)
    opts[:xml].xpath('//overall_contact').collect{|xml|
      new.create_from({:xml=>xml, :nct_id=>opts[:nct_id], :contact_type=>'primary'})}
  end

  def self.backup_contacts(opts)
    opts[:xml].xpath('//overall_contact_backup').collect{|xml|
      new.create_from({:xml=>xml,:nct_id=>opts[:nct_id], :contact_type=>'backup'})}
  end

  def attribs
    {
      :contact_type => get_opt('contact_type'),
      :name => get('last_name'),
      :phone => get_phone,
      :email => get('email'),
    }
  end
end

{'fraction_non_alphanumeric': 0.16917047681254083, 'fraction_numerical': 0.001959503592423253, 'mean_word_length': 4.319444444444445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4305949', 'n_tokens_mistral': 556, 'n_tokens_neox': 539, 'n_words': 78}