-
Notifications
You must be signed in to change notification settings - Fork 242
Add Config to have budget bar hard pledges use appointment date instead of pledge sent at #3348
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
base: main
Are you sure you want to change the base?
Changes from all commits
be1f257
0f4978d
07049b8
79f9eba
114f09e
bd6d149
213b264
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,10 +93,14 @@ def self.pledged_status_summary(line) | |
| resolved_without_fund: [false, nil]) | ||
| .where.not(fund_pledge: [0, nil]) | ||
|
|
||
| patients = base.where(pledge_sent_at: start_of_period..) | ||
| .or(base.where(fund_pledged_at: start_of_period..)) | ||
| .order(fund_pledged_at: :asc) | ||
| .select(*plucked_attrs) | ||
| if Config.use_appointment_date_for_budget_bar_hard_pledges? | ||
| patients = base.where(appointment_date: start_of_period..) | ||
| else | ||
| patients = base.where(pledge_sent_at: start_of_period..) | ||
| end | ||
| patients = patients.or(base.where(fund_pledged_at: start_of_period..)) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line will catch patients who are pledged this period with an appointment in later periods, so we need to add change the budget bar helper to mark them as soft pledged. Actually as i'm thinking it over, how should we handle the soft pledges here? should soft pledges appear in the current period (when the pledge is created) or the one tied to the appointment date? |
||
| .order(fund_pledged_at: :asc) | ||
| .select(*plucked_attrs) | ||
|
|
||
| # Divide people up based on whether pledges have been sent or not | ||
| patients.each_with_object(sent: [], pledged: []) do |patient, summary| | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.