Closed cecilia-donnelly closed 8 years ago
I think the general steps for this one are as follows:
calculate_dosage()
function either for reference or to do part of the calculations. That existing function finds the attended hours per youth. It might make sense to add a conditional to that function that says "if participant_id
is provided, return hours per that youth. If not, return total attended hours for that session." The calculate_dosage()
function has no provision for start/end dates, though. This task might involve refactoring it into several different functions so that I can use most of the existing code (e.g. to find the hours per day) but add or subtract conditions from the query as needed. See dosage_percentage.php
.@kevinrak9, does that final bullet point look like the right information to show in the report?
@kevinrak9 adds:
As I've thought more about it, I do think making the attendance viewing selected by session rather than program would make sense. It would be great if there was also a "select all" feature, so we can see everything at a glance.
Sounds like a plan!
@kevinrak9 this is mostly working, though it needs some work on the UI. Here's a couple screenshots showing my local copy. The first shows the selection menu:
And this one has the results:
It needs these edits:
@cecilia-donnelly Sorry for not responding earlier. This is looking good! One more thing that would be really helpful is totaling up enrollment. The existing program enrollment page does that for total enrollments and unduplicated participants. Would that be feasible to do here? Thanks!
PS: I realize I'm commenting on Friday afternoon, no rush to respond :)
@kevinrak9 should be totally feasible to include total enrollment, yup! Thanks for taking a look at this.
Add a toggle switch that says "exclude dropped youth" or similar, which would remove their enrollment and dosage hours from the totals. This involves conditional changes to the queries in dosage_percentage.php
and the unique enrollment query. See ee4ed60 for some guidance on this. I think the toggle wouldn't need to be too complex, since I'd just exclude all attendance and all absences for students who dropped out of each session (when calculating total dosage hours).
I define "a dropped youth" as "a youth whose dropped date is before the end date of the search."
@kevinrak9 will send us a mockup, but essentially this will be a new report that will look similar to the current enrollment report. The goal is to report on the number of youth-hours from a start date to an end date, sorted by one or many programs (checkbox interface). Some funders need to know the number of service hours performed over a period of time.
Notes to self: this involves attendance and probably start/end times for sessions. I think I have a helper function for calculating attendance hours already, though.