Skip to content

Commit

Permalink
Merge pull request #169 from health-connector/date_filter_nfp_recon_1…
Browse files Browse the repository at this point in the history
…88376997

limiting nfp recon data pull to only 3 years
  • Loading branch information
erubinst authored Nov 4, 2024
2 parents 6675990 + b693f6f commit 5e14e38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion script/queries/nfp_audit_report_non_congress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

emp_ids = Employer.where(:fein => {"$nin" => congress_feins }).map(&:id)

start_year = Date.today.year - 3
pols = Policy.where({
:enrollees => {"$elemMatch" => {
:rel_code => "self"
:rel_code => "self",
:coverage_start => {"$gt" => Date.new(start_year, 12, 31)},
}}, :employer_id => { "$in" => emp_ids } })

Caches::MongoidCache.allocate(Plan)
Expand Down

0 comments on commit 5e14e38

Please sign in to comment.