referral

0 rows


Description

referral details

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 null
action_plan.referral_id fk_referral_idR
appointment.referral_id fk__appointment__referralR
case_note.referral_id fk_case_note_referral_idR
changelog.referral_id changelog_referral_id_fkeyR
delivery_session.referral_id fk_delivery_session_referralR
end_of_service_report.referral_id fk_referral_idR
probation_practitioner_details.referral_id fk_probation_practitioner_details_referral_idR
referral_assignments.referral_id fk_referral_idR
referral_location.referral_id fk_referral_location_referral_idR
supplier_assessment.referral_id fk_supplier_assessment_referralR

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

when_unavailable 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
auth_user.id fk_sent_by_idR

ID of the person who sent the referral

reference_number text 2147483647 null

referral number

created_by_id text 2147483647 null
auth_user.id fk_created_by_idR

ID of the person who started the referral

intervention_id uuid 2147483647 '00000000-0000-0000-0000-000000000000'::uuid
intervention.id fk_intervention_idR

intervention unique identifier

end_requested_at timestamptz 35,6 null
end_requested_by_id text 2147483647 null
auth_user.id fk_ended_by_idR
relevant_sentence_id int8 19 null
relevant_sentence_end_dataload.relevant_sentence_id Implied ConstraintR
end_requested_reason_code varchar 3 null
cancellation_reason.code fk_cancellation_reason_codeR
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_reason.code fk_withdrawal_reason_codeR

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

Relationships