Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
reference_data_id | bigserial | 19 | √ | nextval('reference_data_reference_data_id_seq'::regclass) |
|
|
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[]))) |