WeJudicate / courtcal

2014 Hackcess for Justice Hackathon entry
MIT License
4 stars 1 forks source link

Computing House Sentences #5

Open vdavez opened 10 years ago

vdavez commented 10 years ago

Can you describe again how this is supposed to be calculated? I'll try and parse the fractions and get a better handle on dates.

colarusso commented 10 years ago

I've tweaked the UI based on user feedback. This has led to a bifurcation of the sentencing page into a section where one enters context to get a feel for potential sentences, with inputs: (1) current charge; and (2) past convictions. And a section where they enter information on an imposed sentence, with inputs: (3) start date of the sentence; (4) location of the sentence; (5) the actual sentence (a date range for state sentences, NLT-NMT, a single date for house sentences NMT); (6) the start and end dates for prior incarceration that counts towards time served (jail credits); and (7) a open field for the value of jail credits should they be the result of more than one bout of prior incarceration, to be a calculated value when 6 is filled out.

I have pushed changes with these changes to the layout and hidden the second section (inputs 3-7) under the DIV with id="imposed_sent." That is, imposed_sent has its display set to "none." The above changes resulted in the addition of several new variables, each associated with an input. Their IDs are:

Since user will enter a single sentence, the output "sentence_range_box" should change to a single date. The logic for the calculation of this parole eligibility date (sentence_range_box) is as follows:

  1. Determine sentence location (state our county)
  2. If location = state, parole eligibility = start_sent + NLT - credits_box (of course, there are all sorts of conversions that have to take place on those variables)
  3. If location = county, parole eligibility = start_sent + NMT/2 - credits_box (again, there are all sorts of conversions that have to take place on those variables)

Consequently, the current "getDate" function will need to be split in two, one to go with the first section's "Apply Guidelines" button, and one to go with the second section's "Estimate Parole Eligibility."