SolutionGuidance / psm

Welcome to the Medicare/Medicaid Provider Enrollment Screening Portal
http://projectpsm.org/
Other
26 stars 20 forks source link

Fix null pointer exception in risk levels report #921

Closed jasonaowen closed 6 years ago

jasonaowen commented 6 years ago

Not all enrollments have risk levels. This is a somewhat erroneous state that the application can get into; risk levels are supposed to be assigned shortly after an enrollment is submitted, but if an error happens and a risk level is not assigned, this report should still work.

Fix this in two steps: first, refactor the way the number of enrollments with each risk level is counted (maintaining the behavior), and then filter out enrollments without risk levels assigned.

Thank you to @frankduncan for writing tests! That made me more confident in the refactoring.

Issue #786 Add report based on CMS' provider risk level

jasonaowen commented 6 years ago

Thank you, @frankduncan !