package Plates;
use pt_database;


use vars qw(@ISA);
@ISA 	= qw(Database);


my $FONT2 		= '-adobe-helvetica-bold-r-normal--17-120-100-100-p-92-iso8859-1';
my $FONT 		= '-schumacher-clean-bold-r-normal--14-140-75-75-c-80-iso8859-1';
my $DICTIONARY		= {};




sub new {
my ($pkg)  = @_ ;
my $setup 	= {};

bless $setup,$pkg;

return $setup;
}



sub Species {
my  $pkg = shift;

return $pkg->Lookup("
SELECT 	S.SPECIESNAME,  S.SPECIESNAME
FROM	SPECIES S
ORDER BY S.SPECIESNAME");


}

sub ProjectStatuses {
my  $pkg = shift;

return $pkg->Lookup("
SELECT 	S.ID_DICT, S.DESCRIPTION, S.ASSIGN_ORDER
FROM	PROJECTSTATUSDICT S
WHERE	S.ASSIGN_ORDER	IS NOT NULL
ORDER BY S.ASSIGN_ORDER");

}


sub GetClones {
my ($pkg, $Species, $Status,$Chromosome) = @_;

$pkg->Retrieve("
SELECT	C.CLONENAME, PS.PROJECTNAME
FROM	CHROMOSOMEDICT CD, CLONE C, CLONE_PROJECT CP,
	PROJECT_STATUS PS
WHERE	CD.CHROMOSOME 	(+)	= ?
AND	CD.ID_DICT 	(+)	= C.CHROMOSOME
AND	C.SPECIESNAME		= ?
AND	C.CLONENAME		= CP.CLONENAME
AND	CP.PROJECTNAME		= PS.PROJECTNAME
AND	PS.STATUS		= ?
AND	PS.ISCURRENT		= 1",
[['','Zebrafish',2]]);

return $pkg->Retrieve("
SELECT	C.CLONENAME, PS.PROJECTNAME
FROM	CLONE C, CLONE_PROJECT CP,
	PROJECT_STATUS PS
WHERE	C.CHROMOSOME		IS NULL
AND	C.SPECIESNAME		= ?
AND	C.CLONENAME		= CP.CLONENAME
AND	CP.PROJECTNAME		= PS.PROJECTNAME
AND	PS.STATUS		= ?
AND	PS.ISCURRENT		= 1",
[['Zebrafish',2]]);



}



1;
