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
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