<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<disco format="disco.linkout.sql" format-version="1.0">
<site-info site-name=""/>
 <technical-contact email="" name=""/>
 <linkout-sql>
 <![CDATA[

SELECT 'PubMed' AS db,
	ref_pmid AS oid,
	'Data: Computational model' AS linkcategory,
	'The ' || CASE WHEN ion_type IS NULL THEN '' ELSE ion_type || ' ' END || 'ion channel model entitled "' || NAME || '" '||case when animal_model is null and brain_area is null then '' else 'of the ' || CASE WHEN age IS NULL THEN '' when age like 'unspecified' then '' when age like 'generic' then '' when age like 'not specified' then '' when age like 'unknown' then '' ELSE age || ' ' END || CASE WHEN animal_model IS NULL THEN '' ELSE animal_model || ' ' END || CASE WHEN brain_area IS NULL THEN '' ELSE brain_area || ' ' END END || 'is available from Ion Channel Genealogy.' AS linkname,
	'http://icg.neurotheory.ox.ac.uk/channels/' || channel_type || '/' || id AS linkurl
FROM (
	SELECT *,
		'1973' AS channel_type
	FROM l2_scr_014194_ca_detail
	
	UNION ALL
	
	SELECT *,
		'1974' AS channel_type
	FROM l2_scr_014194_ih_detail
	
	UNION ALL
	
	SELECT *,
		'1971' AS channel_type
	FROM l2_scr_014194_k_detail
	
	UNION ALL
	
	SELECT *,
		'1975' AS channel_type
	FROM l2_scr_014194_kca_detail
	
	UNION ALL
	
	SELECT *,
		'1972' AS channel_type
	FROM l2_scr_014194_na_detail
	) a
WHERE ref_pmid != '-1'
	AND ref_pmid != '0'
	AND ref_pmid != 'null'

 ]]>
</linkout-sql>
</disco>
