<commit_before>module Parsers::Xml::Cv
  class ApplicationGroup
    include HappyMapper

    register_namespace "cv", "http://openhbx.org/api/terms/1.0"

    tag 'application_group'

    namespace 'cv'

    element :primary_applicant_id, String, xpath: "cv:primary_applicant_id/cv:id"

    element :submitted_date, String, :tag=> "submitted_date"

    element :e_case_id, String, xpath: "cv:id/cv:id"

    has_many :applicants, Parsers::Xml::Cv::ApplicantParser, xpath: "cv:applicants"

    has_many :tax_households, Parsers::Xml::Cv::TaxHouseholdParser, xpath:'cv:tax_households'

    has_many :irs_groups, Parsers::Xml::Cv::IrsGroupParser, tag: 'irs_groups'

    has_many :eligibility_determinations, Parsers::Xml::Cv::EligibilityDeterminationParser, tag: 'eligibility_determinations'

    has_many :hbx_enrollments, Parsers::Xml::Cv::HbxEnrollmentParser, tag: 'hbx_enrollments'

    def individual_requests(member_id_generator, p_tracker)
      applicants.map do |applicant|
        applicant.to_individual_request(member_id_generator, p_tracker)
      end
    end

    def primary_applicant
      applicants.detect{|applicant| applicant.id == primary_applicant_id }
    end

    def policies_enrolled
      ['772']
    end

    def to_hash
      response = {
          e_case_id:e_case_id,
          submitted_date:submitted_date,
          irs_groups: irs_groups.map do |irs_group|
            irs_group.to_hash
          end,
          tax_households: tax_households.map do |tax_household|
            tax_household.to_hash
          end,
          applicants: applicants.map do |applicant|
            applicant.to_hash
          end
      }
    end
  end
end<commit_msg>1) eligibility_determination added to to_hash()<commit_after>module Parsers::Xml::Cv
  class ApplicationGroup
    include HappyMapper

    register_namespace "cv", "http://openhbx.org/api/terms/1.0"

    tag 'application_group'

    namespace 'cv'

    element :primary_applicant_id, String, xpath: "cv:primary_applicant_id/cv:id"

    element :submitted_date, String, :tag=> "submitted_date"

    element :e_case_id, String, xpath: "cv:id/cv:id"

    has_many :applicants, Parsers::Xml::Cv::ApplicantParser, xpath: "cv:applicants"

    has_many :tax_households, Parsers::Xml::Cv::TaxHouseholdParser, xpath:'cv:tax_households'

    has_many :irs_groups, Parsers::Xml::Cv::IrsGroupParser, tag: 'irs_groups'

    has_many :eligibility_determinations, Parsers::Xml::Cv::EligibilityDeterminationParser, tag: 'eligibility_determinations'

    has_many :hbx_enrollments, Parsers::Xml::Cv::HbxEnrollmentParser, tag: 'hbx_enrollments'

    def individual_requests(member_id_generator, p_tracker)
      applicants.map do |applicant|
        applicant.to_individual_request(member_id_generator, p_tracker)
      end
    end

    def primary_applicant
      applicants.detect{|applicant| applicant.id == primary_applicant_id }
    end

    def policies_enrolled
      ['772']
    end

    def to_hash
      response = {
          e_case_id:e_case_id,
          submitted_date:submitted_date,
          irs_groups: irs_groups.map do |irs_group|
            irs_group.to_hash
          end,
          tax_households: tax_households.map do |tax_household|
            tax_household.to_hash
          end,
          applicants: applicants.map do |applicant|
            applicant.to_hash
          end,
          eligibility_determinations: eligibility_determinations.map do |eligibility_determination|
            eligibility_determination.to_hash
          end
      }
    end
  end
end
{'fraction_non_alphanumeric': 0.09152351450295691, 'fraction_numerical': 0.0030977189524077726, 'mean_word_length': 3.4124223602484474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5620227', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1139, 'n_words': 205}