Skip to content

Commit

Permalink
[US_ME] Add almost eligible feature for overdue for discharge (Recidi…
Browse files Browse the repository at this point in the history
…viz/recidiviz-data#34998)

## Description of the change

[US_ME] Add almost eligible feature for overdue for discharge. I
uploaded this into a sandbox under `_hsalas`: we went from 0 almost
eligible to 405.

## Related issues

Closes Recidiviz/recidiviz-data#34932

## Checklists

### Development

**This box MUST be checked by the submitter prior to merging**:
- [ ] **Double- and triple-checked that there is no Personally
Identifiable Information (PII) being mistakenly added in this pull
request**

These boxes should be checked by the submitter prior to merging:
- [ ] Tests have been written to cover the code changed/added as part of
this pull request

### Code review

These boxes should be checked by reviewers prior to merging:

- [ ] This pull request has a descriptive title and information useful
to a reviewer
- [ ] Potential security implications or infrastructural changes have
been considered, if relevant

GitOrigin-RevId: 5cfd28a0814b06a0dce5efdf2818ec9b36b2ccc8
  • Loading branch information
hugosr-r authored and Helper Bot committed Nov 26, 2024
1 parent 6234ebd commit d99dae6
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
for a dishcarge from supervision
"""

from recidiviz.big_query.big_query_utils import BigQueryDateInterval
from recidiviz.common.constants.states import StateCode
from recidiviz.task_eligibility.candidate_populations.general import (
probation_active_supervision_and_supervision_out_of_state_population,
Expand All @@ -27,6 +28,7 @@
from recidiviz.task_eligibility.criteria.general import (
supervision_past_full_term_completion_date,
)
from recidiviz.task_eligibility.criteria_condition import TimeDependentCriteriaCondition
from recidiviz.task_eligibility.single_task_eligiblity_spans_view_builder import (
SingleTaskEligibilitySpansBigQueryViewBuilder,
)
Expand All @@ -45,6 +47,13 @@
supervision_past_full_term_completion_date.VIEW_BUILDER,
],
completion_event_builder=full_term_discharge.VIEW_BUILDER,
almost_eligible_condition=TimeDependentCriteriaCondition(
criteria=supervision_past_full_term_completion_date.VIEW_BUILDER,
reasons_date_field="eligible_date",
interval_length=90,
interval_date_part=BigQueryDateInterval.DAY,
description="Within 90 days of full term completion date",
),
)

if __name__ == "__main__":
Expand Down

0 comments on commit d99dae6

Please sign in to comment.