コード例 #1
0
 def get_fields(ph, event):
     """
     :type ph: PersonalHistory
     :type event: Event
     """
     return [
         ("1a", FormUtil.attorney_or_party_without_attorney(ph, event)),
         ("1b", str(ph.address)),
         ("1c", ph.phone_number),
         ("1d", ph.email),
         ("1e", "Self-Represented"),
         ("2a", SanMateoCountyCourt.county_name()),
         ("2b", SanMateoCountyCourt.mailing_address().address),
         ("2d", SanMateoCountyCourt.mailing_address().city + " " + SanMateoCountyCourt.mailing_address().zip_code),
         ("3a", "THE PEOPLE OF THE STATE OF CALIFORNIA"),
         ("3b", str(FormUtil.event_to_name_as_charged(ph, event))),
         ("4a", True),
         ("5", event.associated_cases[0].case_id),
         ("6", ph.address.to_str_one_line()),
         ("7a", FormUtil.case_date(event)),
         ("7b", "CR180, CR181" + (", DECLARATION" if event.needs_declaration() else "")),
         ("8a", SanMateoCountyCourt.chief_probation_officer_name_and_title_str()),
         ("8b", True),
         ("8c", SanMateoCountyCourt.mailing_address_oneline_str()),
         ("9", True),
         ("10", FormUtil.short_case_name(ph, event)),
         ("11", event.associated_cases[0].case_id),
         ("12", FormUtil.today_date_str()),
         ("13", str(ph.name)),
     ]
コード例 #2
0
 def get_fields(ph, event):
     """
     :type ph: PersonalHistory
     :type event: Event
     """
     return [
         ("1a", FormUtil.attorney_or_party_without_attorney(ph, event)),
         ("1b", str(ph.address)),
         ("1c", ph.phone_number),
         ("1d", ph.email),
         ("1e", "Self-Represented"),
         ("2a", SanMateoCountyCourt.county_name()),
         ("2b", SanMateoCountyCourt.mailing_address().address),
         ("2d", SanMateoCountyCourt.mailing_address().city + " " +
          SanMateoCountyCourt.mailing_address().zip_code),
         ("3a", "THE PEOPLE OF THE STATE OF CALIFORNIA"),
         ("3b", str(FormUtil.event_to_name_as_charged(ph, event))),
         ("4a", True),
         ("5", event.associated_cases[0].case_id),
         ("6", ph.address.to_str_one_line()),
         ("7a", FormUtil.case_date(event)),
         ("7b", "CR180, CR181" +
          (", DECLARATION" if event.needs_declaration() else "")),
         ("8a",
          SanMateoCountyCourt.chief_probation_officer_name_and_title_str()),
         ("8b", True),
         ("8c", SanMateoCountyCourt.mailing_address_oneline_str()),
         ("9", True),
         ("10", FormUtil.short_case_name(ph, event)),
         ("11", event.associated_cases[0].case_id),
         ("12", FormUtil.today_date_str()),
         ("13", str(ph.name)),
     ]
コード例 #3
0
    def _annotate_ineligibility(self):
        for event in self.personal_history.rap_sheet.events:
            for case_info in event.associated_cases:
                for count in case_info.counts:
                    if count.disposition.disposition_decision == DispositionDecision.CONVICTED:
                        self._annotate_count_eligibility(case_info, count)

                event_ineligibility_reasons = []
                if not SanMateoCountyCourt.contains_city(event.arrest_info.city):
                    event_ineligibility_reasons.append(IneligibilityReason.NOT_IN_SAN_MATEO_COUNTY)
                if not case_info.sentence.probation_duration:
                    event_ineligibility_reasons.append(IneligibilityReason.PROBATION_NOT_PART_OF_SENTENCE)
                incarceration = case_info.sentence.incarceration
                if incarceration and incarceration == IncarcerationType.PRISON:
                    event_ineligibility_reasons.append(IneligibilityReason.PRISON_TIME_GRANTED)

                for count in case_info.counts:
                    count.ineligible_for_expungement_reasons.extend(event_ineligibility_reasons)
コード例 #4
0
 def get_fields(ph, event):
     """
     :type ph: PersonalHistory
     :type event: Event
     """
     return [
         ("1a", str(ph.name)),
         ("1b", ph.address.address),
         ("1c", ph.address.city),
         ("1d", ph.address.state),
         ("1e", ph.address.zip_code),
         ("2", "N/A"),  # Lawyer, if person has one
         ("3", SanMateoCountyCourt.mailing_address_multiline_str()),
         ("4", event.associated_cases[0].case_id),
         ("5", FormUtil.short_case_name(ph, event)),
         ("6", str(ph.name)),
         ("7", event.associated_cases[0].case_id),
     ]
コード例 #5
0
    def _annotate_ineligibility(self):
        for event in self.personal_history.rap_sheet.events:
            for case_info in event.associated_cases:
                for count in case_info.counts:
                    if count.disposition.disposition_decision == DispositionDecision.CONVICTED:
                        self._annotate_count_eligibility(case_info, count)

                event_ineligibility_reasons = []
                if not SanMateoCountyCourt.contains_city(
                        event.arrest_info.city):
                    event_ineligibility_reasons.append(
                        IneligibilityReason.NOT_IN_SAN_MATEO_COUNTY)
                if not case_info.sentence.probation_duration:
                    event_ineligibility_reasons.append(
                        IneligibilityReason.PROBATION_NOT_PART_OF_SENTENCE)
                incarceration = case_info.sentence.incarceration
                if incarceration and incarceration == IncarcerationType.PRISON:
                    event_ineligibility_reasons.append(
                        IneligibilityReason.PRISON_TIME_GRANTED)

                for count in case_info.counts:
                    count.ineligible_for_expungement_reasons.extend(
                        event_ineligibility_reasons)
コード例 #6
0
 def get_fields(ph, event):
     """
     :type ph: PersonalHistory
     :type event: Event
     """
     fi = ph.financial_information
     fields = [
         ("1a", str(ph.name)),
         ("1b", ph.address.address),
         ("1c", ph.address.city),
         ("1d", ph.address.state),
         ("1e", ph.address.zip_code),
         ("1f", ph.phone_number),
         ("2a", fi.job.job_title),
         ("2b", fi.job.employer_name),
         ("2c", fi.job.employer_address.to_str_one_line()),
         ("3a", "N/A"),  # Lawyer, if person has one
         ("4a", True),  # Check 4a but not 4b
     ]
     fields.extend(FW001Model._waiver_needed_reasons(fi))
     fields.extend(
         [("6a", True)]
         if fi.event_index_to_whether_fees_have_been_waived_recently[ph.rap_sheet.events.index(event)] else []
     )
     fields.extend(
         [("7", True)] if fi.income_changes_significantly_month_to_month else []
     )
     fields.extend(FW001Model._monthly_and_household_income(fi))
     fields.extend(FW001Model._money_and_property(fi))
     fields.extend(FW001Model._monthly_deductions_and_expenses(fi))
     fields.extend([
         ("12", SanMateoCountyCourt.mailing_address_multiline_str()),
         ("13", event.associated_cases[0].case_id),
         ("14", FormUtil.short_case_name(ph, event)),
     ])
     return fields
コード例 #7
0
 def get_fields(ph, event):
     """
     :type ph: PersonalHistory
     :type event: Event
     """
     fi = ph.financial_information
     fields = [
         ("1a", str(ph.name)),
         ("1b", ph.address.address),
         ("1c", ph.address.city),
         ("1d", ph.address.state),
         ("1e", ph.address.zip_code),
         ("1f", ph.phone_number),
         ("2a", fi.job.job_title),
         ("2b", fi.job.employer_name),
         ("2c", fi.job.employer_address.to_str_one_line()),
         ("3a", "N/A"),  # Lawyer, if person has one
         ("4a", True),  # Check 4a but not 4b
     ]
     fields.extend(FW001Model._waiver_needed_reasons(fi))
     fields.extend([(
         "6a",
         True)] if fi.event_index_to_whether_fees_have_been_waived_recently[
             ph.rap_sheet.events.index(event)] else [])
     fields.extend([(
         "7",
         True)] if fi.income_changes_significantly_month_to_month else [])
     fields.extend(FW001Model._monthly_and_household_income(fi))
     fields.extend(FW001Model._money_and_property(fi))
     fields.extend(FW001Model._monthly_deductions_and_expenses(fi))
     fields.extend([
         ("12", SanMateoCountyCourt.mailing_address_multiline_str()),
         ("13", event.associated_cases[0].case_id),
         ("14", FormUtil.short_case_name(ph, event)),
     ])
     return fields