Difference between revisions of "Template:Chembox parametercheck"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
(multiple PubChem CIDs: Minor changes in tracking categories (See talk).)
imported>DePiep
(Changes in Chembox. (See talk, March 2017) add PubChem CID tracking)
Line 1: Line 1:
<!--
+
{{#ifexpr:{{{_hasCASnone|0}}} = 1 |[[Category:Chemicals that do not have a CAS registry number assigned]] }}<!--
without a CAS registry number (no CASNo''n'' input)
 
-->{{#ifexpr:{{{_countCASNo|-1}}} + {{{_CASnone|-1}}} = 0 |[[Category:Chemical articles without CAS registry number]] }}<!--
 
  
  CAS registry number = none
+
-->{{#ifexpr:{{{_hasPubChemCIDnone|0}}} = 1 |[[Category:Chemicals that do not have a PubChem CID assigned]] }}<!--
-->{{#ifexpr:{{{_CASnone|-1}}} = 1 |[[Category:Chemicals that do not have a CAS registry number assigned]]}}<!--
 
  
  Counts >=2:
+
  Counts:
 
-->{{#switch:{{{_countCASNo|-1}}}
 
-->{{#switch:{{{_countCASNo|-1}}}
 +
|0=[[Category:Chemical articles without CAS registry number]]
 +
|1=
 
|2=[[Category:Chemical articles with multiple CAS registry numbers|B]]
 
|2=[[Category:Chemical articles with multiple CAS registry numbers|B]]
 
|3=[[Category:Chemical articles with multiple CAS registry numbers|C]]
 
|3=[[Category:Chemical articles with multiple CAS registry numbers|C]]
Line 13: Line 12:
 
|5=[[Category:Chemical articles with multiple CAS registry numbers|E]]
 
|5=[[Category:Chemical articles with multiple CAS registry numbers|E]]
 
|6=[[Category:Chemical articles with multiple CAS registry numbers|F]]
 
|6=[[Category:Chemical articles with multiple CAS registry numbers|F]]
|#default=<!-- |-1|0|1|other/err = no tracking -->
+
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
-->{{#switch:{{{_countPubChem|-1}}}
+
-->{{#switch:{{{_countPubChemCID|-1}}}
 +
|0=[[Category:Chemicals without a PubChem CID]]<!-- NEW; drugbox to follow -->
 +
|1=
 
|2=[[Category:Chemical articles with multiple PubChem CIDs|B]]
 
|2=[[Category:Chemical articles with multiple PubChem CIDs|B]]
 
|3=[[Category:Chemical articles with multiple PubChem CIDs|C]]
 
|3=[[Category:Chemical articles with multiple PubChem CIDs|C]]
Line 22: Line 23:
 
|5=[[Category:Chemical articles with multiple PubChem CIDs|E]]
 
|5=[[Category:Chemical articles with multiple PubChem CIDs|E]]
 
|6=[[Category:Chemical articles with multiple PubChem CIDs|F]]
 
|6=[[Category:Chemical articles with multiple PubChem CIDs|F]]
|#default=<!-- |-1|0|1|other/err = no tracking -->
+
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
 
-->{{#switch:{{{_countChEBI|-1}}}
 
-->{{#switch:{{{_countChEBI|-1}}}
 +
|0|1=
 
|2=[[Category:Chemical articles with multiple ChEBIs|B]]
 
|2=[[Category:Chemical articles with multiple ChEBIs|B]]
 
|3=[[Category:Chemical articles with multiple ChEBIs|C]]
 
|3=[[Category:Chemical articles with multiple ChEBIs|C]]
Line 31: Line 33:
 
|5=[[Category:Chemical articles with multiple ChEBIs|E]]
 
|5=[[Category:Chemical articles with multiple ChEBIs|E]]
 
|6=[[Category:Chemical articles with multiple ChEBIs|F]]
 
|6=[[Category:Chemical articles with multiple ChEBIs|F]]
|#default=<!-- |-1|0|1|other/err = no tracking -->
+
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
--><noinclude>{{documentation}}</noinclude><!--
+
positives:
 +
-->{{#if:{{{_hasJmol|}}} |[[Category:Chemical articles having Jmol set]]}}<!--
 +
-->{{#if:{{{_hasChemSpiderIDnone|}}} |[[Category:Chemicals that do not have a ChemSpider ID assigned]]}}<!--
  
  TEST
+
  negatives:
CAS:{{trim|1={{{_countCASNo|blank}}} }}
+
-->{{#if:{{{_hasChEBIChEMBL|unk}}} ||[[Category:Articles without EBI source]]}}<!--
PubChem:{{{_countPubChem|blank}}}
+
-->{{#if:{{{_hasChemSpiderID|unk}}} ||[[Category:Chemical pages without ChemSpiderID]]}}<!--
ChEBI:{{{_countChEBI|blank}}}
+
-->{{#if:{{{_hasKEGG|unk}}} ||[[Category:Articles without KEGG source]]}}<!--
max:{{#invoke:math|max|{{{_countCASNo|-1}}} |{{{_countPubChem|-1}}} |{{{_countChEBI|-1}}} }}<br/>-->
+
-->{{#if:{{{_hasInChI|unk}}} ||[[Category:Articles without InChI source]]}}<!--
 +
-->{{#if:{{{_hasUNII|unk}}} ||[[Category:Articles without UNII source]]}}<!--
 +
 
 +
indexes:
 +
-->{{#if:{{{_hasQID|}}}|[[Category:Chemicals having QID set]]}}<!--
 +
-->{{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[Category:Chemicals (indexed) having QID set]]}}<!--
 +
-->{{#ifexpr:{{{_countIndexlabel|0}}}>0 |[[Category:Chemicals using indexlabels]]}}<!--
 +
 
 +
--><noinclude>{{documentation}}</noinclude>

Revision as of 16:34, 3 March 2017