reference_data

112 rows


Description

Reference data used to populate properties that have fixed lists of valid options e.g. categories, decisions and statuses

Columns

Column Type Size Nulls Auto Default Children Parents Comments
reference_data_id bigserial 19 nextval('reference_data_reference_data_id_seq'::regclass)
contributory_factor.contributory_factor_type_id contributory_factor_contributory_factor_type_id_fkey R
csip_record.status_id csip_record_status_id_fkey R
decision_and_actions.outcome_id decision_and_actions_outcome_id_fkey R
decision_and_actions.signed_off_by_role_id decision_and_actions_signed_off_by_role_id_fkey R
interview.interviewee_role_id interview_interviewee_role_id_fkey R
referral.incident_involvement_id referral_incident_involvement_id_fkey R
referral.incident_location_id referral_incident_location_id_fkey R
referral.incident_type_id referral_incident_type_id_fkey R
referral.referer_area_of_work_id referral_referer_area_of_work_id_fkey R
safer_custody_screening_outcome.outcome_id safer_custody_screening_outcome_outcome_id_fkey R

Internal primary key. Not returned by API

domain varchar 30 null

The reference data domain. CSIP to NOMIS mappings: AREA_OF_WORK -> CSIP_FUNC, CONTRIBUTORY_FACTOR_TYPE -> CSIP_FAC, DECISION_OUTCOME_TYPE -> CSIP_OUT, DECISION_SIGNER_ROLE -> CSIP_ROLE, INCIDENT_INVOLVEMENT -> CSIP_INV, INCIDENT_LOCATION -> CSIP_LOC, INCIDENT_TYPE -> CSIP_TYP, INTERVIEWEE_ROLE -> CSIP_INTVROL, SCREENING_OUTCOME_TYPE -> CSIP_OUT, STATUS -> CSIP only domain

code varchar 32 null

The short code for the reference data item. Combination of domain and code is unique but individual codes are not guaranteed to be unique across domains. Matches the NOMIS reference data code for the associated domain

description varchar 40 null

The description of the reference data item

list_sequence int4 10 null

Used to order reference data to guarantee the ordering for the UI

created_at timestamp 29,6 null

The date and time the reference data item was created

created_by varchar 32 null

The username of the user who created the reference data item

last_modified_at timestamp 29,6 null

The date and time the reference data item was last modified

last_modified_by varchar 32 null

The username of the user who last modified the reference data item

deactivated_at timestamp 29,6 null

The date and time the reference data item was deactivated

deactivated_by varchar 32 null

The username of the user who deactivated the reference data item

Indexes

Constraint Name Type Sort Column(s)
reference_data_pkey Primary key Asc reference_data_id
reference_data_domain_code_key Must be unique Asc/Asc domain + code
unq_reference_data_domain_list_sequence Must be unique Asc/Asc/Asc domain + list_sequence + code

Check Constraints

Constraint Name Constraint
reference_data_domain_enum_check (((domain)::text = ANY ((ARRAY['AREA_OF_WORK'::character varying, 'CONTRIBUTORY_FACTOR_TYPE'::character varying, 'DECISION_OUTCOME_TYPE'::character varying, 'DECISION_SIGNER_ROLE'::character varying, 'INCIDENT_INVOLVEMENT'::character varying, 'INCIDENT_LOCATION'::character varying, 'INCIDENT_TYPE'::character varying, 'INTERVIEWEE_ROLE'::character varying, 'SCREENING_OUTCOME_TYPE'::character varying, 'STATUS'::character varying])::text[])))

Relationships