sentence

-1 rows


Description

Description: Holds each instance of a sentence. NOMIS Equivalent Entity: offender_sentences Domain: Court results including person sentences

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 nextval('sentence_id_seq'::regclass)
period_length.sentence_id period_length_sentence_id_fkey R
recall_sentence.sentence_id fk_recall_sentence_to_sentence R
sentence.consecutive_to_id sentence_consecutive_to_id_fkey R
sentence.superseding_sentence_id sentence_superseding_sentence_id_fkey R
sentence_history.original_sentence_id sentence_history_original_sentence_id_fkey R
sentence_uuid uuid 2147483647 null

Description: The id of the sentence. The sentence may get amended so the sentence uuid can change over time. Source System: Remand & Sentencing

count_number varchar 2147483647 null
created_at timestamptz 35,6 null

Description: The timestamp of when the sentence record was created. Source System: Remand & Sentencing

created_by varchar 2147483647 null
created_prison varchar 2147483647 null

Description: The prison where the record was initially created, this is used when offenders are transferred around to different prisons. Source System: Remand & Sentencing

superseding_sentence_id int4 10 null
sentence.id sentence_superseding_sentence_id_fkey R

Description: The id related to the sentence record which is replacing a historic sentence record. This is used for auditing purposes. Source System: Remand & Sentencing

charge_id int4 10 null
charge.id sentence_charge_id_fkey R

Description: The id of the specific instance of a charge for which the offender has been sentenced. Source System: Remand & Sentencing

sentence_serve_type varchar 2147483647 null

Description: The relationship of the sentence with other sentences. Source System: Remand & Sentencing

consecutive_to_id int4 10 null
sentence.id sentence_consecutive_to_id_fkey R

Description: The sentence that follows the sentence in a consecutive sentence envelope. Source System: Remand & Sentencing

conviction_date date 13 null

Description: The date an offender was declared guilty of a charge offence.
Source System: Remand & Sentencing

sentence_type_id int4 10 null
sentence_type.id sentence_sentence_type_id_fkey R

Description: The id of the sentence type. Source System: Remand & Sentencing

legacy_data jsonb 2147483647 null

Description: Legacy JSON to hold details for sentences that are not supported within RaS. This is used for the bidirectional sync between NOMIS and DPS. Source System: Remand & Sentencing

updated_at timestamptz 35,6 null
updated_by varchar 2147483647 null
updated_prison varchar 2147483647 null
fine_amount numeric 11,2 null
status_id varchar 2147483647 null

Description: The id of the status of the sentence. Source System: Remand & Sentencing

Indexes

Constraint Name Type Sort Column(s)
sentence_pkey Primary key Asc id
idx_sentence_booking_id Performance
idx_sentence_charge_id Performance Asc charge_id
idx_sentence_consecutive_to_id Performance Asc consecutive_to_id
idx_sentence_lifetime Performance Asc sentence_uuid
idx_sentence_status_id Performance Asc status_id
idx_sentence_superseding_sentence_id Performance Asc superseding_sentence_id

Relationships