rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
464 stars 493 forks source link

Include period supplies in kits in NDBN report values that are based on period supplies #4283

Closed cielf closed 3 weeks ago

cielf commented 7 months ago

Summary

Period supply values in the Annual Survey should include period supplies in kits

Why?

Better reporting of actual distribution

Details

Similar to issue #3939... You may need to use SQL to extract the information Look at services/reports/period_supply_report_service Assume 1 kit per individual

The following values in the report will need attention: Period Supplies distributed Period Supplies per adult per month [Note: this should be per individual per month -- confirmed with NDBN liason] % period supplies donated -- note that most banks make their own kits, but we do have some who have kits donated -- so this is a slightly different twist from #3939 % period supplies bought -- afaik, we don't have any cases of kits being bought, but we don't prevent it.

Criteria for completion

cielf commented 7 months ago

This is going to be assigned to @jadekstewart3. This comments just here so I can do that. Apparently I actually need Jade to comment on this issue to do that!

jadekstewart3 commented 7 months ago

I can take this! Thank you :)

cielf commented 7 months ago

Thank you!

jadekstewart3 commented 6 months ago

Just an update: Still working on this. I was OOO the last week an a half, so I am hoping to get some more done this week and next :)

cielf commented 5 months ago

Hi @jadekstewart3 -- just a heads up that I'm doing some rework of the whole what-goes-in-what-bucket due to conversations with NDBN, and things I've found that were just not right! keep an eye on PR # 4361.
There is going to be a rework of what is in period_supplies -- making it depend on the category rather than the partner keys --- it turns out the initialization of the seed and what is in prod had different categories, which explains why someone coded it with the partner keys! The latest on that should (I hope) be up later today, though not merged.

cielf commented 5 months ago

Noting that that is up and merged -- if you check the scope for period supplies on item in main, you'll see that it is much simpler now!

cielf commented 4 months ago

Hey @jadekstewart3 Checking in on this -- any roadblocks you need cleared?

jadekstewart3 commented 4 months ago

Hi @cielf! Thank you for checking in! I'm actually having some trouble with pulling the purchased items I should be showing at least one purchased kit based off of this test set up:

Screenshot 2024-06-26 at 11 38 23 AM

This is my method:

Screenshot 2024-06-26 at 11 39 00 AM

The current method is returning zero, and I should be expecting 1. I've been messing with multiple versions of this method, and I cant quite put my finger on why my method isn't returning the integer 1, as expected with the single purchased kit in my test set up.

cielf commented 4 months ago

@jadekstewart3 I don't have time to dig into it today, but may I ask -- is purchased_kits supposed to be getting the number of kits purchased? Because my first read of that is that it might get the number of line items with kits purchased -- that being said, I'll have to sit down with it and figure out each step. Probably tomorrow.

cielf commented 4 months ago

@jadekstewart3 Oh! The base category name for period supplies is not period supplies, but Menstrual Supplies/Items -- the important part being that we look for menstrual . Still think the method might not be giving what you expect it to. though.

jadekstewart3 commented 4 months ago

@cielf thank you! That is so helpful!

github-actions[bot] commented 3 months ago

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

cielf commented 3 months ago

@jadekstewart3 Just checking in - do you need anything on this?

jadekstewart3 commented 3 months ago

@cielf I'm almost done with this, i do have a question though. When you are asking for % of period supplies bought, you want me to pull the number of supplies contained in purchased kits, right?

cielf commented 3 months ago

I'm not sure anyone ever purchases kits, but/and it's still correct to take them into account. You did for the disposables, right? We should be consistent across the 3 broad categories.

cielf commented 3 months ago

I checked -- there are a few purchases of kits in the production db. Very few, but that does mean the answer is yes.

github-actions[bot] commented 2 months ago

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] commented 2 months ago

Automatically unassigned after 7 days of inactivity.

github-actions[bot] commented 1 month ago

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] commented 1 month ago

Automatically unassigned after 7 days of inactivity.