----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table MATERIAL_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  21-May-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into persons
(id
,first_name
,last_name
,user_id
,email)
values
(nextval('PERSON_ID_SEQ')
,''
,'System User'
,'system'
,''
);

insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'VIRUS'
,'Virus'
);

insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'CELLLINE'
,'Cell Line or Cell Culture. The growing of cells under controlled conditions.'
);

insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'CELLNUCL'
,'Cell Nucleus'
);

insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'GENE'
,'Gene'
);
insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'OLIGO'
,'Oligo nucleotide'
);
insert into material_types
(id
,code
,description)
values 
(nextval('MATERIAL_TYPE_ID_SEQ')
,'CONTROL'
,'Control of a control layout'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial set MATERIALS of type CONTROL
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  12-Nov-2007   CRW          First Draft
-----------------------------------------------------------------------

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'SCRAM'
,(select id from material_types where code = 'CONTROL')
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'GFP'
,(select id from material_types where code = 'CONTROL')
,(select id from persons where user_id = 'system')
);


----------------------------------------------------------------------
--  Purpose:  Insert an initial set MATERIALS of type VIRUS
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  21-May-2007   CRW          First Draft
--  20-Jun-2007   CRW          Added the virus list received from Berend
--  26-Oct-2007   CRW          The DESCRIPTION column was removed from 
--                             the insert statements as it was moved
--                             to the MATERIAL_PROPERTIES table.
-----------------------------------------------------------------------

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'SV40'
,(select id from material_types where code = 'VIRUS')
--,'Simian Virus 40'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'VSV'
,(select id from material_types where code = 'VIRUS') 
--,'Vesicular Stomatitis Virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'SFV'
,(select id from material_types where code = 'VIRUS')
--,'Semliki Forest Virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'ROTAV'
,(select id from material_types where code = 'VIRUS')
--,'Rotavirus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'RRV'
,(select id from material_types where code = 'VIRUS')
--,'Rhesus Rotavirus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'HSV1'
,(select id from material_types where code = 'VIRUS')
--,'Herpes Simplex Virus 1'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'EV1'
,(select id from material_types where code = 'VIRUS')
--,'Echovirus 1'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'MHV'
,(select id from material_types where code = 'VIRUS')
--,'Mouse Hepatitis Virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'FLU'
,(select id from material_types where code = 'VIRUS')
--,'Influenza A virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'AD3'
,(select id from material_types where code = 'VIRUS')
--,'Adenovirus 3'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'AD5'
,(select id from material_types where code = 'VIRUS')
--,'Adenovirus 5'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'VV'
,(select id from material_types where code = 'VIRUS')
--,'Vaccinia Virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'YFV'
,(select id from material_types where code = 'VIRUS')
--,'Yellow Fever Virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'DV'
,(select id from material_types where code = 'VIRUS')
--,'Dengue Virus 1'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'HRV2'
,(select id from material_types where code = 'VIRUS')
--,'Human respiratory virus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'RV'
,(select id from material_types where code = 'VIRUS')
--,'Rhinovirus'
,(select id from persons where user_id = 'system')
);

insert into materials
(  id
  ,code
  ,maty_id
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_ID_SEQ')
,'RSV'
,(select id from material_types where code = 'VIRUS')
--,'Respiratory Syncytial Virus'
,(select id from persons where user_id = 'system')
);


----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table DATA_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  25-Oct-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into data_types
(id
,code
,description)
values 
(nextval('DATA_TYPE_ID_SEQ')
,'VARCHAR'
,'Variable length character'
);

insert into data_types
(id
,code
,description)
values 
(nextval('DATA_TYPE_ID_SEQ')
,'INTEGER'
,'Integer'
);

insert into data_types
(id
,code
,description)
values 
(nextval('DATA_TYPE_ID_SEQ')
,'REAL'
,'Real number, i.e. an inexact, variable-precision numeric type'
);


----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table PROPERTY_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  25-Oct-2007   CRW          First Draft
--  23-Nov-2007   CRW          Add a default value for PERS_ID
--
-----------------------------------------------------------------------

insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values 
(nextval('PROPERTY_TYPE_ID_SEQ')
,'DESCRIPTION'
,'A Description'
,'Description'
,(select id from data_types where code ='VARCHAR')
,(select id from persons where user_id ='system')
);

insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values 
(nextval('PROPERTY_TYPE_ID_SEQ')
,'GENE_SYMBOL'
,'Gene Symbol, e.g. BMP15'
,'Gene Symbol'
,(select id from data_types where code ='VARCHAR')
,(select id from persons where user_id ='system')
);

insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values 
(nextval('PROPERTY_TYPE_ID_SEQ')
,'NUCLEOTIDE_SEQUENCE'
,'A sequence of nucleotides'
,'Nucleotide Sequence'
,(select id from data_types where code ='VARCHAR')
,(select id from persons where user_id ='system')
);

insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values 
(nextval('PROPERTY_TYPE_ID_SEQ')
,'REFSEQ'
,'NCBI Reference Sequence code, applicable to sequences of type: DNA, RNA, protein'
,'RefSeq'
,(select id from data_types where code ='VARCHAR')
,(select id from persons where user_id ='system')
);

insert into property_types
(id
,code
,description
,label
,daty_id
,pers_id_registerer)
values 
(nextval('PROPERTY_TYPE_ID_SEQ')
,'OFFSET'
,'Offset from the start of the sequence'
,'Offset'
,(select id from data_types where code ='INTEGER')
,(select id from persons where user_id ='system')
);



----------------------------------------------------------------------
--  Purpose:  Insert the DESCRIPTION property type into the table 
--            MATERIAL_TYPE_PROPERTY_TYPES table for the MATERIALS 
--            of type VIRUS
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  12-Nov-2007   CRW          Initial version
-----------------------------------------------------------------------

insert into material_type_property_types
(   id
   ,maty_id
   ,prty_id
   ,is_mandatory
   ,pers_id_registerer
   )
values 
   (nextval('MTPT_ID_SEQ')
   ,(select id from material_types where code = 'VIRUS')
   ,(select id from property_types where code = 'DESCRIPTION')
   ,true
   ,(select id from persons where user_id ='system')
);

insert into material_type_property_types
(   id
   ,maty_id
   ,prty_id
   ,is_mandatory
   ,pers_id_registerer
   )
values 
   (nextval('MTPT_ID_SEQ')
   ,(select id from material_types where code = 'GENE')
   ,(select id from property_types where code = 'GENE_SYMBOL')
   ,true
   ,(select id from persons where user_id ='system')
);

insert into material_type_property_types
(   id
   ,maty_id
   ,prty_id
   ,is_mandatory
   ,pers_id_registerer
   )
values 
   (nextval('MTPT_ID_SEQ')
   ,(select id from material_types where code = 'OLIGO')
   ,(select id from property_types where code = 'NUCLEOTIDE_SEQUENCE')
   ,true
   ,(select id from persons where user_id ='system')
);

insert into material_type_property_types
(   id
   ,maty_id
   ,prty_id
   ,is_mandatory
   ,pers_id_registerer
   )
values 
   (nextval('MTPT_ID_SEQ')
   ,(select id from material_types where code = 'OLIGO')
   ,(select id from property_types where code = 'OFFSET')
   ,false
   ,(select id from persons where user_id ='system')
);


----------------------------------------------------------------------
--  Purpose:  Insert the DESCRIPTION into the table MATERIAL_PROPERTIES
--            for the MATERIALS of type VIRUS
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  12-Nov-2007   CRW          The DESCRIPTION column was removed from 
--                             the insert statements of the MATERIALS 
--                             table and refactored as an insert in the
--                             MATERIAL_PROPERTIES table.
-----------------------------------------------------------------------

insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'SV40')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Simian Virus 40'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
   ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'VSV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Vesicular Stomatitis Virus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
   ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'SFV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Semliki Forest Virus'
,(select id from persons where user_id ='system')
);

insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'ROTAV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Rotavirus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'RRV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Rhesus Rotavirus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'HSV1')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Herpes Simplex Virus 1'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'EV1')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Echovirus 1'
,(select id from persons where user_id ='system')
);

insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'MHV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Mouse Hepatitis Virus'
,(select id from persons where user_id ='system')
);



insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'FLU')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Influenza A virus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'AD3')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Adenovirus 3'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'AD5')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Adenovirus 5'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'VV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Vaccinia Virus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'YFV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Yellow Fever Virus'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'DV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Dengue Virus 1'
,(select id from persons where user_id ='system')
);


insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'HRV2')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Human respiratory virus'
,(select id from persons where user_id ='system')
);



insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'RV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Rhinovirus'
,(select id from persons where user_id ='system')
);




insert into material_properties
(  id
  ,mate_id
  ,mtpt_id
  ,value
  ,pers_id_registerer
  )
values 
(nextval('MATERIAL_PROPERTY_ID_SEQ')
,(select mate.id from materials mate, material_types maty where maty.code = 'VIRUS' and mate.code = 'RSV')
,(select mtpt.id from material_type_property_types mtpt, material_types mt, property_types pt 
  where   mt.id   = mtpt.maty_id 
     and  pt.id   = mtpt.prty_id
     and  mt.code = 'VIRUS'
     and  pt.code = 'DESCRIPTION')
,'Respiratory Syncytial Virus'
,(select id from persons where user_id ='system')
);






----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table EXPERIMENT_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  21-May-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into experiment_types
(id
,code
,description)
values 
(nextval('EXPERIMENT_TYPE_ID_SEQ')
,'SIRNAHCS'
,'Small Interfering RNA High Content Screening'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table PROCEDURE_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  14-Jun-2007   CRW          First Draft
--  26-Jun-2007   CRW          Add Experiment Sample Registration
--
-----------------------------------------------------------------------

insert into procedure_types
(id
,code
,description)
values 
(nextval('PROCEDURE_TYPE_ID_SEQ')
,'DATA ACQUISITION'
,'Data Acquisition'
);

insert into procedure_types
(id
,code
,description)
values 
(nextval('PROCEDURE_TYPE_ID_SEQ')
,'IMAGE ANALYSIS'
,'Image Analysis'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table OBSERVABLE_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  14-Jun-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into observable_types
(id
,code
,description)
values 
(nextval('OBSERVABLE_TYPE_ID_SEQ')
,'IMAGE'
,'Image'
);

insert into observable_types
(id
,code
,description)
values 
(nextval('OBSERVABLE_TYPE_ID_SEQ')
,'IMAGE ANALYSIS'
,'Image Analysis'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table FILE_FORMAT_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  14-Jun-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into file_format_types
(id
,code
,description)
values 
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'TIFF'
,'TIFF File'
);

insert into file_format_types
(id
,code
,description)
values 
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'3VPROPRIETARY'
,'Data Analysis 3V proprietary format'
);

insert into file_format_types
(id
,code
,description)
values 
(nextval('FILE_FORMAT_TYPE_ID_SEQ')
,'PLKPROPRIETARY'
,'Data Analysis Pelkmans group proprietary format'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table LOCATOR_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  27-Jun-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into locator_types
(id
,code
,description)
values 
(nextval('LOCATOR_TYPE_ID_SEQ')
,'RELATIVE LOCATION'
,'Relative Location'
);

----------------------------------------------------------------------
--  Purpose:  Insert an initial data set into the table SAMPLE_TYPES
--
--  Authors: Randy Ramin-Wright (CRW)
--
--  Change History:
--
--  Date          Author       Description
--  26-Jun-2007   CRW          First Draft
--
-----------------------------------------------------------------------

insert into sample_types
(id
,code
,description)
values 
(nextval('SAMPLE_TYPE_ID_SEQ')
,'MASTER PLATE'
,'Master Plate'
);

insert into sample_types
(id
,code
,description)
values 
(nextval('SAMPLE_TYPE_ID_SEQ')
,'DILUTION PLATE'
,'Dilution Plate'
);

insert into sample_types
(id
,code
,description)
values 
(nextval('SAMPLE_TYPE_ID_SEQ')
,'CELL PLATE'
,'Cell Plate'
);

insert into sample_types
(id
,code
,description)
values 
(nextval('SAMPLE_TYPE_ID_SEQ')
,'REINFECT PLATE'
,'Reinfection Plate'
);

insert into sample_types
(id
,code
,description)
values 
(nextval('SAMPLE_TYPE_ID_SEQ')
,'CONTROL LAYOUT'
,'Control layout'
);

-- add default organization and project to simplify refactoring phase

insert into organizations
(id
,code)
values
(nextval('ORGANIZATION_ID_SEQ')
,'DEFAULT'
);

insert into organizations
(id
,code)
values
(nextval('ORGANIZATION_ID_SEQ')
,'3V'
);

insert into organizations
(id
,code)
values
(nextval('ORGANIZATION_ID_SEQ')
,'IMSB'
);

insert into projects
(id
,code
,orga_id)
values
(nextval('PROJECT_ID_SEQ')
,'DEFAULT'
,1
);

