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

Updated natalsupplement-pregna... #87

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from

Conversation

tekarrawilkinson
Copy link
Contributor

@tekarrawilkinson
Copy link
Contributor Author

@sbuhovac @rachel0728 both the infant and pregnancy rule are in this pull request for Natal.

@sbuhovac
Copy link

sbuhovac commented Nov 29, 2024

Rachel (@rachel0728) and I did Validation Testing for both Natal Supplement rules (Pregnancy and Infant). Here's our feedback:

Natal Supplement - both rules

  • "Family Unit in Pay for month" input is not present in both rules but it is present in most other rules
  • There should be an output for Cancellation Date (i.e. the month in which the child turns 1 year old). It is noted in the map as "System will calculate the expected end of benefits date for 12 months after the date of delivery". Related to this is that Cancellation Date should me maxed out at 22 months from today's date.
  • Input Benefit Month allows any date in the past or in the future. It should be limited to the rolling 3 months (Current, Past, Future)

Natal Supplement Pregnacy

  • Date of Birth input should not allow a past date
  • Reason "Date of expected delivery has already passed" sounds like it is referring to today's date but it is referring to Benefit Month input.

Natal Supplement Infant

  • Date of Birth input should not allow a future date
  • if Natal Supplement is already approved as part of the Pregnacy rule, how will the Infant rule catch that?

@tekarrawilkinson @prchristenson @Iliana777

@tekarrawilkinson
Copy link
Contributor Author

@sbuhovac @rachel0728)

Natal Supplement - both rules

  • "Family Unit in Pay for month" input is not present in both rules but it is present in most other rules

Updated both rules to include this, was thinking maybe this would exist in the parent rule, but we can visit that later.

  • There should be an output for Cancellation Date (i.e. the month in which the child turns 1 year old). It is noted in the map as "System will calculate the expected end of benefits date for 12 months after the date of delivery". Related to this is that Cancellation Date should me maxed out at 22 months from today's date.

We haven't built cancellation or end-dates into any of the rules yet, so I'm no sure what the approach will be yet, we'll have to discuss it.

  • Input Benefit Month allows any date in the past or in the future. It should be limited to the rolling 3 months (Current, Past, Future)

This will need to be a klamm data validation, and won't be implemented right away but I will note this.

Natal Supplement Pregnacy

  • Date of Birth input should not allow a past date

This will be a klamm data validation, Tim is already working on this for us.

  • Reason "Date of expected delivery has already passed" sounds like it is referring to today's date but it is referring to Benefit Month input.

I can change this to "The expected delivery date is prior to the benefit month."

Natal Supplement Infant

  • Date of Birth input should not allow a future date

This can be a klamm data validation.

  • if Natal Supplement is already approved as part of the Pregnacy rule, how will the Infant rule catch that?

Not sure how to build the parent rule at the moment, I'll need to discuss with the devs on how this can function.

@tekarrawilkinson
Copy link
Contributor Author

tekarrawilkinson commented Dec 3, 2024

Clarification:
Natal Supplement - Pregnancy: estimatedDeliveryDate cannot be before the benefit month being assessed.

Natal Supplement - Infant: Birth Date cannot be in the future (this is being completed by dev in klamm for data validation)

@tekarrawilkinson
Copy link
Contributor Author

Clarification: Natal Supplement - Pregnancy: estimatedDeliveryDate cannot be before the benefit month being assessed.

rule is built to function this way

Natal Supplement - Infant: Birth Date cannot be in the future (this is being completed by dev in klamm for data validation)

klamm validation has been updated and a future date cannot be assessed.

@sbuhovac @rachel0728 this one now has the updated klamm validation and everything else isnt applicable in the rule in the current state

@sbuhovac
Copy link

Rachel (@rachel0728) and I did another round of validation testing, so here is our further feedback:

  • Natal Supplement - Infant rule allows 14 months instead of 13 months. For example, if DOB is any date in Nov 2024 then the last allowed benefit month should be Nov 2025 (13 months duration starts with the month of birth as the first month). Currently, the rule allows Dec 2025 as the last eligible month, and that is the 14th month.
  • Natal Supplement - Pregnancy rule contains input Estimated Delivery Date and it only allows past dates. It should be reverse, it should only allow future dates.

For @tekarrawilkinson to review.

@tekarrawilkinson
Copy link
Contributor Author

Rachel (@rachel0728) and I did another round of validation testing, so here is our further feedback:

  • Natal Supplement - Infant rule allows 14 months instead of 13 months. For example, if DOB is any date in Nov 2024 then the last allowed benefit month should be Nov 2025 (13 months duration starts with the month of birth as the first month). Currently, the rule allows Dec 2025 as the last eligible month, and that is the 14th month.
  • Natal Supplement - Pregnancy rule contains input Estimated Delivery Date and it only allows past dates. It should be reverse, it should only allow future dates.

For @tekarrawilkinson to review.

@rachel0728
I've altered the rule to be a bit more precise with the 13 month calculation, it may need to be adjusted again because its calculating it in hours.

I've updated the Estimated Delivery Date to include future dates, that's just my error.

@sbuhovac
Copy link

Rachel (@rachel0728) and I did another round of validation testing, so here is our further feedback:

  • Natal Supplement - Infant rule allows 14 months instead of 13 months. For example, if DOB is any date in Nov 2024 then the last allowed benefit month should be Nov 2025 (13 months duration starts with the month of birth as the first month). Currently, the rule allows Dec 2025 as the last eligible month, and that is the 14th month.
  • Natal Supplement - Pregnancy rule contains input Estimated Delivery Date and it only allows past dates. It should be reverse, it should only allow future dates.

For @tekarrawilkinson to review.

@rachel0728 I've altered the rule to be a bit more precise with the 13 month calculation, it may need to be adjusted again because its calculating it in hours.

I've updated the Estimated Delivery Date to include future dates, that's just my error.

Thank you for fixing both @tekarrawilkinson. Upon retesting, I just realized there is no input for "Multiple Births" for the Natal Supplement - Infant rule. It should function like "Multiple Pregnancy" input in the Pregancy rule and approve $160 amount.

@prchristenson
Copy link

@sbuhovac @tekarrawilkinson @rachel0728 @Iliana777

Quick question: If we are designing & building the natal supp rules to be contact based (per infant) rather than case based (family unit), I don't believe we would have to account for multiple births. I haven't run any validation tests yet but thought I would ask the question now just in case it helps this discussion.

@tekarrawilkinson
Copy link
Contributor Author

@sbuhovac @tekarrawilkinson @rachel0728 @Iliana777

Quick question: If we are designing & building the natal supp rules to be contact based (per infant) rather than case based (family unit), I don't believe we would have to account for multiple births. I haven't run any validation tests yet but thought I would ask the question now just in case it helps this discussion.

I was thinking we could capture this in the parent rule for Natal, but wanted to confirm the amount if there were multiple infants.

@sbuhovac
Copy link

@sbuhovac @tekarrawilkinson @rachel0728 @Iliana777
Quick question: If we are designing & building the natal supp rules to be contact based (per infant) rather than case based (family unit), I don't believe we would have to account for multiple births. I haven't run any validation tests yet but thought I would ask the question now just in case it helps this discussion.

I was thinking we could capture this in the parent rule for Natal, but wanted to confirm the amount if there were multiple infants.

Now I recall that discussion around Natal Supplement for infants being contact/child based (in the future). In that case, we don't need "Multiple Births" input. However, the regs limit the supplement to $160 so we'll need to have some sort of limit on triplets (or more), unless policy changes and allows $80 per child regardless of number.

@tekarrawilkinson
Copy link
Contributor Author

@prchristenson @sbuhovac @rachel0728 @Iliana777

After some discussion with devs and policy and reviewing these comments, I've added a Natal Supplement Parent Rule page on the hive https://thehive.apps.silver.devops.gov.bc.ca/business_rules_engine/rules_repository/natal_supplement_parent_rule

The parent rule will need to provide a limit to the supplement of $160 for multiples as well as ensuring that the infant and pregnancy rule are not issued concurrently.

Besides these items, I think we can move forward with this rule knowing the parent rule will handle these exceptions.

@sbuhovac
Copy link

@prchristenson @sbuhovac @rachel0728 @Iliana777

After some discussion with devs and policy and reviewing these comments, I've added a Natal Supplement Parent Rule page on the hive https://thehive.apps.silver.devops.gov.bc.ca/business_rules_engine/rules_repository/natal_supplement_parent_rule

The parent rule will need to provide a limit to the supplement of $160 for multiples as well as ensuring that the infant and pregnancy rule are not issued concurrently.

Besides these items, I think we can move forward with this rule knowing the parent rule will handle these exceptions.

Okay, in that case, validation testing is passed on our end. @prchristenson and @Iliana777 can proceed with their Validation Testing.

@Iliana777
Copy link

@tekarrawilkinson @prchristenson
I haven't started validation testing but re: the infant and the pregnancy rules not issued concurrently, we should be able to issue in situations where there is a pregnancy and an infant under 12 months on the case.

@tekarrawilkinson
Copy link
Contributor Author

@tekarrawilkinson @prchristenson I haven't started validation testing but re: the infant and the pregnancy rules not issued concurrently, we should be able to issue in situations where there is a pregnancy and an infant under 12 months on the case.

I've updated the hive page to include these parameters as well. Thanks!

@Iliana777
Copy link

Iliana777 commented Dec 17, 2024

@tekarrawilkinson @prchristenson @sbuhovac @rachel0728

Ran two tests:

  1. Delivery date over 9 months - it failed correctly but reason provided was 'expected delivery date is prior to the benefit month'
  2. Benefit month prior to previous benefit month - if we are working with the current 3 rolling months, it should fail when a benefit month prior to the previous benefit month is entered

I know we have discussed that this will be mitigated in KLAMM but noting it here for the record.

Other concern that I have is the input 'Family unit in pay for month' in the context of these Natal (Pregnancy and Infant) rules as there are multiple dates (benefit month, estimated delivery date, date of birth). I know that the input is the standard input we have used for other rules but the other rules don't have so many dates. Just want to make sure that it is clear to the user which month the family unit is in pay for.

@tekarrawilkinson
Copy link
Contributor Author

tekarrawilkinson commented Dec 18, 2024

@tekarrawilkinson @prchristenson @sbuhovac @rachel0728

Ran two tests:

  1. Delivery date over 9 months - it failed correctly but reason provided was 'expected delivery date is prior to the benefit month'

This will now approve the supplement, and will need to be a klamm validation (added under user story 5572), the rule is now built to allow any delivery date in the future, this is ok for now.

  1. Benefit month prior to previous benefit month - if we are working with the current 3 rolling months, it should fail when a benefit month prior to the previous benefit month is entered

This will need to be discussed as its own rule when it comes to the rolling 3 benefit months as we haven't incorporated this into other rules and I've added a user story under future enhancements (User story 5573).

I know we have discussed that this will be mitigated in KLAMM but noting it here for the record.

Other concern that I have is the input 'Family unit in pay for month' in the context of these Natal (Pregnancy and Infant) rules as there are multiple dates (benefit month, estimated delivery date, date of birth). I know that the input is the standard input we have used for other rules but the other rules don't have so many dates. Just want to make sure that it is clear to the user which month the family unit is in pay for.

This is a really good point that I'm should be incorporated into the above 3 benefit month rolling eligibility concept, I've added your comment to the user story I've created.

@Iliana777
Copy link

@tekarrawilkinson @prchristenson @sbuhovac @rachel0728
Further feedback:
I like the reason 'Has not provided written confirmation of pregnancy'. Could we use something similar (pregnancy confirmed?) as the entry label rather than 'is pregnant?'

Copy link

@Iliana777 Iliana777 left a comment

Choose a reason for hiding this comment

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

@tekarrawilkinson @prchristenson @sbuhovac @rachel0728
Validation tests completed for both pregnancy and infant natal supplement rules. Approving both.

Copy link

@prchristenson prchristenson left a comment

Choose a reason for hiding this comment

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

@tekarrawilkinson @Iliana777 Validation testing completed for natal supplement - pregnancy and natal supplement - infant. Rules Approved. @sbuhovac - Both of these are ready for isolation testing.

@sbuhovac
Copy link

@cevenden and I did isolation testing on both Natal Supplements and here's our feedback.

Natal Supplement Pregnancy failed when the date within BenefitMonth input is after the date within the EstimatedDeliveryDate input but both dates are the same month. For example, if BenefitMonth date is 2025-07-28 and EstimatedDeliveryDate is 2025-07-17, the test should pass because it's the same month. Attached is our Isolation Tester file.
health-supplements_natalsupplement-pregnancy_testing_familyUnitInPayForMo_truenatalsupplement-pregna..._2024-12-20T18-03-05Z.csv

Isolation Tester doesn't work for Natal Supplement Infant as it gives out an error message.

@tekarrawilkinson @brysonjbest

@brysonjbest
Copy link
Collaborator

@sbuhovac @cevenden @tekarrawilkinson I have updated the application and the isolation tester should now be working for Natal Supplement Infant. Handling of the 'today' restriction in validation hadn't yet been updated for scenario generation, but this should now be fixed in the application.

Additionally, I added the specific scenario you gave as an example for the Natal Supplement Pregnancy and it appears to be passing.
image

@sbuhovac
Copy link

sbuhovac commented Dec 21, 2024

Isolation testing has passed for Natal Supplement Pregnancy.
health-supplements_natalsupplement-pregnancy_testing_health-supplements_natalsupplement-pregnancy_Isolation_testing_2024-12-21T00-20-09Z.csv

Isolation testing for Natal Supplement Infant fails when Benefit Month is the 14th month after DateOfBirth (example: BenefitMonth is March 2025 and DOB is February 2024). Output should be 'not eligible' but currently it shows eligible.
health-supplements_natalsupplementinfant_testing_natalsupplementinfant_isolation_testingV2_2024-12-21T00-18-00Z.csv

@brysonjbest @tekarrawilkinson @cevenden

@tekarrawilkinson
Copy link
Contributor Author

Isolation testing has passed for Natal Supplement Pregnancy. health-supplements_natalsupplement-pregnancy_testing_health-supplements_natalsupplement-pregnancy_Isolation_testing_2024-12-21T00-20-09Z.csv

Isolation testing for Natal Supplement Infant fails when Benefit Month is the 14th month after DateOfBirth (example: BenefitMonth is March 2025 and DOB is February 2024). Output should be 'not eligible' but currently it shows eligible. health-supplements_natalsupplementinfant_testing_natalsupplementinfant_isolation_testingV2_2024-12-21T00-18-00Z.csv

@sbuhovac ok! the issue was that when the benefit month and thirteen monthdob addition are exactly the same, it evaluates as eligible under the prior implementation, good catch! this should be corrected now.

@sbuhovac
Copy link

sbuhovac commented Jan 3, 2025

@sbuhovac ok! the issue was that when the benefit month and thirteen monthdob addition are exactly the same, it evaluates as eligible under the prior implementation, good catch! this should be corrected now.

@tekarrawilkinson Review state of the rule doesn't seem to be updated.

@brysonjbest
Copy link
Collaborator

@sbuhovac Review state should be updated now.

Copy link

@sbuhovac sbuhovac left a comment

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

5 participants