 	pf.description,
 	'TherapeuticFunction',
 	l.linkage_pk_id,
-	ce14.composing_element_pk_id,
 	'DATA_MIGRATION',
 	SYSDATE()
 FROM cananolab.particle_function pf,
 	cananolab.linkage l,
-	canano.composition c14,
-	canano.nanoparticle_entity ne14,
-	canano.composing_element ce14
+	cananolab.agent a,
+	canano.composition c14
 Where pf.particle_function_pk_id = l.function_pk_id
 and pf.type = 'Therapeutic'
 AND pf.nanoparticle_pk_id = c14.particle_sample_pk_id
-AND ne14.composition_pk_id = c14.composition_pk_id
-AND ne14.nanoparticle_entity_pk_id = ce14.nanoparticle_entity_pk_id
+AND a.agent_pk_id = l.linkage_pk_id
+AND a.discriminator != 'ImageContrastAgent'
 ;
 
 ALTER TABLE canano.nano_function

	created_date,
	discriminator
)
SELECT nc.nanoparticle_entity_pk_id,
	c.p_composition_pk_id,
	ca.created_by,
	ca.created_date,
	'Polymer'
FROM cananolab.polymer_composition c,
	cananolab.characterization ca,	
	cananolab.nanoparticle_char nc
WHERE c.p_composition_pk_id = ca.characterization_pk_id
and nc.characterization_pk_id = ca.characterization_pk_id
;

insert into canano.composition

	created_date,
	discriminator
)
SELECT c.f_composition_pk_id,
	c.f_composition_pk_id,
	ca.created_by,
	ca.created_date,
	'Fullerene'
FROM cananolab.fullerene_composition c,
	cananolab.characterization ca
WHERE c.f_composition_pk_id = ca.characterization_pk_id
;

insert into canano.composition
