Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
4513 incontinence supplies #4794
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
4513 incontinence supplies #4794
Changes from 14 commits
1d93dcd
7ec4f2d
607bec6
ffa5b51
fb68000
28aa472
062d5a6
203730e
a8816a0
ac49fe5
fca526d
a3b1155
ac542f8
8a61604
a0270f9
c2f90ad
1fac9db
b55672e
e2c41a6
15c7c84
91b7f16
2b17110
5c5b761
1c935f6
4081200
e13d206
cb23a9e
d49e8e5
2ebbf3c
eefa3ec
a116dd7
343100d
3699ba1
b9476c5
51d0254
ab38c56
518bd9e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the issue, "
The number of adults assisted with kit items is the number of kits that contain adult incontinence supplies distributed divided by the "quantity per individual" on the kit item. if there is no quantity per individual provided, assume that quantity is 1."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question, also I apologize for missing that bit! Is it a safe assumption that the distribution_quantity is equal to the "quantity per individual"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Sorry for the terminology ambiguity -- they are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is giving you kits that are identified as adult_incontinence, rather than kits that have adult incontinence items in them? Though you used the same pattern as for the disposables... Huh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are counting the adult incontinence items within a single instance of each kit that was distributed that year ?
That's not what we need to do.
I think you have a confusion between the "kit item" -- i.e.the item that represents the kit, and the items in the kit. (Almost everyone mixes these up)
I played around a bit and came up with this approach for the total_assisted_adults:
total_assisted_adults = kits.sum do |kit|
adult_items = kit.items.adult_incontinence
next 0 if adult_items.empty?