Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | uuid | 2147483647 | null |
|
|
referral unique identifier |
||||||||||||||||||||||
created_at | timestamptz | 35,6 | √ | null |
|
|
when the referral was started |
|||||||||||||||||||||
accessibility_needs | text | 2147483647 | √ | null |
|
|
accessibility needs of the service user |
|||||||||||||||||||||
additional_needs_information | text | 2147483647 | √ | null |
|
|
further information about the service user’s needs |
|||||||||||||||||||||
needs_interpreter | bool | 1 | √ | null |
|
|
whether the service user needs an interpreter |
|||||||||||||||||||||
interpreter_language | text | 2147483647 | √ | null |
|
|
what language the interpreter should speak |
|||||||||||||||||||||
has_additional_responsibilities | bool | 1 | √ | null |
|
|
if the service user has attitional responsibilities in their life |
|||||||||||||||||||||
text | 2147483647 | √ | null |
|
|
when the service user is unavailable due to existing commitments |
||||||||||||||||||||||
draft_supplementary_risk | text | 2147483647 | √ | null |
|
|
draft supplementary risk information about the service user; this is deleted and stored in ‘assess risk and needs’ service when the referral is sent |
|||||||||||||||||||||
service_usercrn | text | 2147483647 | 'unknown'::text |
|
|
the referred person’s probation Case Reference Number |
||||||||||||||||||||||
sent_at | timestamptz | 35,6 | √ | null |
|
|
when the referral was sent |
|||||||||||||||||||||
sent_by_id | text | 2147483647 | √ | null |
|
|
ID of the person who sent the referral |
|||||||||||||||||||||
reference_number | text | 2147483647 | √ | null |
|
|
referral number |
|||||||||||||||||||||
created_by_id | text | 2147483647 | null |
|
|
ID of the person who started the referral |
||||||||||||||||||||||
intervention_id | uuid | 2147483647 | '00000000-0000-0000-0000-000000000000'::uuid |
|
|
intervention unique identifier |
||||||||||||||||||||||
end_requested_at | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||
end_requested_by_id | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||
relevant_sentence_id | int8 | 19 | √ | null |
|
|
||||||||||||||||||||||
end_requested_reason_code | varchar | 3 | √ | null |
|
|
||||||||||||||||||||||
end_requested_comments | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||
concluded_at | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||
supplementary_risk_id | uuid | 2147483647 | √ | null |
|
|
ID of the supplementary risk information stored in ‘assess risks and needs’ service for this referral |
|||||||||||||||||||||
draft_supplementary_risk_updated_at | timestamptz | 35,6 | √ | null |
|
|
a timestamp indicating the last time the draft supplementary risk was updated |
|||||||||||||||||||||
withdrawal_reason_code | varchar | 3 | √ | null |
|
|
withdrawal reasons code for the referral |
|||||||||||||||||||||
withdrawal_comments | varchar | 2500 | √ | null |
|
|
withdrawal reason comments |
|||||||||||||||||||||
relevant_sentence_end_date | date | 13 | √ | null |
|
|
Date that the sentence selected for this referral ends |
|||||||||||||||||||||
status | status | 2147483647 | √ | null |
|
|
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
referral_pkey | Primary key | Asc | id |
idx_referral_status | Performance | Asc | status |
ix_referral_created_by_id | Performance | Asc | created_by_id |
ix_referral_intervention | Performance | Asc | intervention_id |
ix_referral_sent_by_id | Performance | Asc | sent_by_id |
ix_referral_service_usercrn | Performance | Asc | service_usercrn |
referral_reference_number_idx | Performance | Asc | reference_number |