Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAPT-1797] Ops reports spike #3284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

alkesh
Copy link
Contributor

@alkesh alkesh commented Oct 8, 2024

  • new nav bar entry on the admin site: Reports
  • reports page shows previously ran reports
  • reports stored in database
  • ReportsJob set to run on second Tuesday of each month
  • Report classes based on the existing Claim::DataReportRequest class

Copy link
Contributor

@rjlynch rjlynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - would check with @slorek and see if this fits with his design for the app

].freeze

def initialize
@claims = Claim.approved.select { |claim| Claim::MatchingAttributeFinder.new(claim).matching_claims.any? }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@claims = Claim.approved.select { |claim| Claim::MatchingAttributeFinder.new(claim).matching_claims.any? }
@claims = Claim.approved.includes(:eligibility).select { |claim| Claim::MatchingAttributeFinder.new(claim).matching_claims.any? }

Not sure if we want to include decisions too or if it's less work to filter first and make the additional trips to the db

].freeze

def initialize
@claims = Claim.includes(:tasks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@claims = Claim.includes(:tasks)
@claims = Claim.includes(:tasks, :eligibility)

].freeze

def initialize
@claims = Claim.includes(:tasks).where(tasks: {name: "qualifications", passed: false}).approved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@claims = Claim.includes(:tasks).where(tasks: {name: "qualifications", passed: false}).approved
@claims = Claim.includes(:tasks, :eligibility).where(tasks: {name: "qualifications", passed: false}).approved

def change
create_table :reports, id: :uuid do |t|
t.string :name
t.text :csv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice approach 👍, very simple and gets the job done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants