Commit f1864c13 authored by Siiri Tann's avatar Siiri Tann
Browse files

TEIS-2408: added new classifiers and updated existing ones for accidents;...

TEIS-2408: added new classifiers and updated existing ones for accidents; removed AccidentInvestigationStatus classifier items and classifier definition.
parent d2d624ad
--liquibase formatted sql
--changeset siiri:2021-08-25.TEIS-2408.add-and-update-accident-classifiers
INSERT INTO classifier_definition (id, default_value, name, editable, hierarchical, ordered, object_status, created_at) VALUES
('ACCIDENT_TYPE', 'UNSPECIFIED', 'Tööõnnetuse liik', false, false, true, 'CURRENT', now()),
('CRIMINAL_CASE', 'NOT_STARTED', 'Tööõnnetusega seotud kriminaalasi', false, false, true, 'CURRENT', now());
UPDATE classifier_definition SET default_value = 'IN_PROGRESS' WHERE id = 'ACCIDENT_STATUS';
UPDATE classifier_item SET seq_no = 1 WHERE id = 'ACCIDENT_STATUS__IN_PROGRESS';
UPDATE classifier_item SET seq_no = 2 WHERE id = 'ACCIDENT_STATUS__PENDING';
UPDATE classifier_item SET name = 'Esitamise ootel' WHERE id = 'ACCIDENT_STATUS__PENDING';
DELETE from classifier_item where id = 'ACCIDENT_STATUS__CONFIRMED';
INSERT INTO classifier_item (id, classifier_definition_id, code, editable, name, object_status, seq_no, upper_classifier_item_id, valid_from, valid_until, level, created_at) VALUES
('OBJECT_TYPE__ACCIDENT_CASE', 'OBJECT_TYPE', 'ACCIDENT_CASE', false, 'Tööõnnetuse juhtum', 'CURRENT', null, null, now(), null, null, now()),
('OBJECT_TYPE__ACCIDENT_CASE_FILE', 'OBJECT_TYPE', 'ACCIDENT_CASE_FILE', false, 'Tööõnnetuse juurde kuuluv fail', 'CURRENT', null, null, now(), null, null, now()),
('ACCIDENT_STATUS__CLOSED', 'ACCIDENT_STATUS', 'CLOSED', false, 'Lõpetatud', 'CURRENT', 4, null, now(), null, null, now()),
('ACCIDENT_TYPE__UNSPECIFIED', 'ACCIDENT_TYPE', 'UNSPECIFIED', false, 'Määramata', 'CURRENT', 1, null, now(), null, null, now()),
('ACCIDENT_TYPE__ACCIDENT', 'ACCIDENT_TYPE', 'ACCIDENT', false, 'Tööõnnetus', 'CURRENT', 2, null, now(), null, null, now()),
('ACCIDENT_TYPE__ACCIDENT_NO_UNWORKABLE_DAYS', 'ACCIDENT_TYPE', 'ACCIDENT_NO_UNWORKABLE_DAYS', false, 'Tööõnnetus, töövõimetuspäevi pole', 'CURRENT', 3, null, now(), null, null, now()),
('ACCIDENT_TYPE__NOT_ACCIDENT', 'ACCIDENT_TYPE', 'NOT_ACCIDENT', false, 'Ei ole tööõnnetus', 'CURRENT', 4, null, now(), null, null, now()),
('CRIMINAL_CASE__NOT_STARTED', 'CRIMINAL_CASE', 'NOT_STARTED', false, 'Ei ole alustatud', 'CURRENT', 1, null, now(), null, null, now()),
('CRIMINAL_CASE__STARTED', 'CRIMINAL_CASE', 'STARTED', false, 'Alustatud', 'CURRENT', 2, null, now(), null, null, now()),
('CRIMINAL_CASE__CLOSED', 'CRIMINAL_CASE', 'CLOSED', false, 'Lõpetatud', 'CURRENT', 3, null, now(), null, null, now());
DELETE FROM classifier_item where classifier_definition_id = 'ACCIDENT_INVESTIGATION_STATUS';
DELETE FROM classifier_definition where id = 'ACCIDENT_INVESTIGATION_STATUS';
UPDATE execution_trigger SET execute = true WHERE id = 'cache-reinitialize';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment