INSERT INTO `hilis4`.`lab_tests` (`test_name`, `field_label`, `lab_section_id`, `test_type`, `has_results`) VALUES 
	('pml_rara_bcl1', 'PML-RARA bcr1', 4, 'test', 'yes'),
	('pml_rara_bcl3', 'PML-RARA bcr3', 4, 'test', 'yes'),
	('bcr_abl_multiplex', 'BCR-ABL multiplex', 4, 'test', 'yes'),
	('stat3', 'STAT3', 4, 'test', 'yes'),
	('csf3r', 'CSF3R', 4, 'test', 'yes'),
	('t1418_multiplex', 't(14;18) multiplex', 4, 'test', 'yes');
	
UPDATE `hilis4`.`lab_tests` SET `field_label` = 'BCR-ABL p190 RQ' WHERE `test_name` = 'bcr_abl_p190';
UPDATE `hilis4`.`lab_tests` SET `field_label` = 'BCR-ABL p210 RQ' WHERE `test_name` = 'bcr_abl_p210';

UPDATE `hilis4`.`lab_tests` SET `is_active`= 'yes', has_results = 'no' WHERE `test_name` = 'rna_extraction';
UPDATE `hilis4`.`lab_tests` SET `is_active`= 'yes', has_results = 'no' WHERE `test_name` = 'dna_extraction';

UPDATE `hilis4`.`lab_tests` SET `test_type` = 'test' WHERE `test_name` = 'rq_cml';
UPDATE `hilis4`.`lab_tests` SET `is_active` = 'no' WHERE `test_name` = 'chimerism';
UPDATE `hilis4`.`lab_tests` SET `is_active` = 'no' WHERE `test_name` = 'pml_rara';

INSERT INTO lab_test_data_type ( lab_test_id, data_type_id, is_active ) VALUES
	( 312, 7, 'yes' ),
	( 313, 7, 'yes' ),
	( 314, 7, 'yes' ),
	( 315, 7, 'yes' ),
	( 316, 7, 'yes' ),
	( 317, 7, 'yes' );

DROP TABLE `linked_lab_test`;
CREATE TABLE `linked_lab_test` (
	`parent_test_id` SMALLINT(6) NOT NULL DEFAULT '0',
	`linked_test_id` SMALLINT(6) NOT NULL DEFAULT '0',
	PRIMARY KEY (`parent_test_id`, `linked_test_id`),
	INDEX `linked_lab_test_ibfk_2` (`linked_test_id`),
	CONSTRAINT `linked_lab_test_ibfk_1` FOREIGN KEY (`parent_test_id`)
        REFERENCES `lab_tests` (`id`),
	CONSTRAINT `linked_lab_test_ibfk_2` FOREIGN KEY (`linked_test_id`)
        REFERENCES `lab_tests` (`id`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;

INSERT INTO linked_lab_test (parent_test_id, linked_test_id) VALUES
	(  36, 262 ),
	( 249, 262 ),
	( 290, 262 ),
	( 291, 262 ),
	( 272, 262 ),
	( 269, 262 ),
	( 270, 262 ),
	( 271, 262 ),
	( 248, 262 ),
	( 274, 262 ),
	( 273, 262 ),
	( 241, 262 ),
	( 242, 262 ),
	( 307, 262 ),
	( 268, 262 ),
	( 250, 262 ),
	( 251, 262 ),
	( 287, 262 ),
	( 288, 262 ),
	( 289, 262 ),
    ( 295, 262 ),
	( 315, 262 ),
	( 316, 262 ),
    ( 317, 262 ),

	(  44, 263 ),
	( 240, 263 ),
	( 257, 263 ),
	( 292, 263 ),
	( 277, 263 ),
	( 303, 263 ),
	( 304, 263 ),
	( 305, 263 ),
	( 247, 263 ),
	( 246, 263 ),
	( 275, 263 ),
	( 243, 263 ),
	( 244, 263 ),
	( 245, 263 ),
	( 312, 263 ),
	( 313, 263 ),
	( 314, 263 ),
	( 279, 263 ),
	( 276, 263 ),
    ( 296, 263 ),
	( 306, 263 ),
    
	( 243, 295 ),
	( 244, 295 ),
	( 245, 295 )
