csip_record

-1 rows


Description

Root CSIP entity associating a person with a CSIP and all the child entities. Conceptually a CSIP folder. All 1:1 child entities use the record_id value for their primary key

Columns

Column Type Size Nulls Auto Default Children Parents Comments
record_id uuid 2147483647 null
plan.plan_id plan_plan_id_fkey R
referral.referral_id referral_referral_id_fkey R

Public primary key for the CSIP and the shared primary key for 1:1 child entities

prison_number varchar 10 null
person_summary.prison_number fk_csip_prison_number R

The prison number of the person the CSIP record is for

prison_code_when_recorded varchar 6 null

The prison code where the person was resident at the time the CSIP record was created. Maps to OFFENDER_CSIP_REPORTS.AGY_LOC_ID

log_code varchar 10 null

User entered identifier for the CSIP record. Usually starts with the prison code. Maps to OFFENDER_CSIP_REPORTS.CSIP_SEQ

version int4 10 null

Supports optimistic locking preventing unnecessary select queries for new entities

legacy_id int8 19 null
audit_revision.id Implied Constraint R

The NOMIS OFFENDER_CSIP_REPORTS.CSIP_ID primary key value. Stored to guarantee uniqueness via sync. Not returned by API

status_id int8 19 null
reference_data.reference_data_id csip_record_status_id_fkey R

Foreign key to reference data using the ‘STATUS’ domain for the overall CSIP status. Status is calculated in NOMIS and not stored in the database

Indexes

Constraint Name Type Sort Column(s)
csip_record_pkey Primary key Asc record_id
csip_record_legacy_id_key Must be unique Asc legacy_id
idx_csip_record_prison_number Performance Asc prison_number
idx_csip_record_prison_number_lower Performance
idx_csip_record_status_id Performance Asc status_id

Relationships