Difference between revisions of "Template:Chembox parametercheck/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
(synch from live source. see also TEmplate:Chembox parametercheck/test)
imported>DePiep
(from /test)
Line 1: Line 1:
{{#ifexpr:{{{_hasCASnone|0}}} = 1 |[[Category:Chemicals that do not have a CAS registry number assigned]] }}<!--
 
  
-->{{#ifexpr:{{{_hasPubChemCIDnone|0}}} = 1 |[[Category:Chemicals that do not have a PubChem CID assigned]] }}<!--
+
{{collapsible list
 +
| title      = Test: categories (identifiers)
 +
| bullets    = yes
 +
| framestyle = background:#baeefa; font-weight:normal; text-align:left; border:none; font-size:90%;<!--
  
  Counts:
+
  Supercountings (over 7 ID countings)
-->{{#switch:{{{_countCASNo|-1}}}
+
-->|2={{#switch:{{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}
|0=[[Category:Chemical articles without CAS registry number]]
+
|0=<!-- ~no identifiers... -->
 +
|1=[[:Category:Chemical articles with multiple compound IDs|Amulti-one]]<!-- TEST -->
 +
|2=[[:Category:Chemical articles with multiple compound IDs|Bmulti]]
 +
|3=[[:Category:Chemical articles with multiple compound IDs|Cmulti]]
 +
|4=[[:Category:Chemical articles with multiple compound IDs|Dmulti]]
 +
|5=[[:Category:Chemical articles with multiple compound IDs|Emulti]]
 +
|6=[[:Category:Chemical articles with multiple compound IDs|Fmulti]]
 +
|#default=TEST max id count: {{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}<!-- other/err = no tracking -->
 +
}}<!--
 +
 
 +
INDEX_LABEL needed?
 +
-->|3={{#ifexpr:({{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}>1)
 +
|<!-- multiple IDs. Check: has indexes? (index_comments are ignored): -->{{#ifexpr:{{{_countIndex_label|-1}}}<=0
 +
|[[:Category:Multiple chemicals in an infobox that need indexing|needs label_indexes]]
 +
|[[:Category:Chemicals using indexlabels]]<!-- need to cat? -->}}}}<!--
 +
 
 +
NONE: Options 'none'
 +
<!-- now: option 'none' only checked for main params (not the indexed 1-5 ones), for now
 +
-->|5={{#if:{{{_hasCASnone|}}} |[[:Category:Chemicals that do not have a CAS registry number assigned]] }}<!--
 +
-->|6={{#if:{{{_hasPubChemCIDnone|}}} |[[:Category:Chemicals that do not have a PubChem CID assigned]] }}<!--
 +
-->|7={{#if:{{{_hasChemSpiderIDnone|}}} |[[:Category:Chemicals that do not have a ChemSpider ID assigned]] }}<!--
 +
 
 +
CAS NUMBER
 +
-->|10={{#switch:{{{_countCASNo|-1}}}
 +
|0=[[:Category:Chemical articles without CAS registry number]]
 
|1=
 
|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]]
|4=[[Category:Chemical articles with multiple CAS registry numbers|D]]
+
|4=[[:Category:Chemical articles with multiple CAS registry numbers|D]]
|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=<!-- other/err = no tracking -->
 
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
-->{{#switch:{{{_countPubChemCID|-1}}}
+
PUBCHEM
|0=[[Category:Chemicals without a PubChem CID]]<!-- NEW; drugbox to follow -->
+
-->|11={{#switch:{{{_countPubChemCID|-1}}}
 +
|0=[[:Category:Chemicals without a PubChem CID]]<!-- new. drugbox to follow. Mar 2017 -->
 
|1=
 
|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]]
|4=[[Category:Chemical articles with multiple PubChem CIDs|D]]
+
|4=[[:Category:Chemical articles with multiple PubChem CIDs|D]]
|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=<!-- other/err = no tracking -->
 
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
-->{{#switch:{{{_countChEBI|-1}}}
+
CHEBI
 +
-->|12={{#switch:{{{_countChEBI|-1}}}
 
|0|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]]
|4=[[Category:Chemical articles with multiple ChEBIs|D]]
+
|4=[[:Category:Chemical articles with multiple ChEBIs|D]]
|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=<!-- other/err = no tracking -->
 
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
  
  positives:
+
  INCHI (skipped: StdInChI)
-->{{#if:{{{_hasJmol|}}} |[[Category:Chemical articles having Jmol set]]}}<!--
+
cat:multiple INCHI's does not exist.
-->{{#if:{{{_hasChemSpiderIDnone|}}} |[[Category:Chemicals that do not have a ChemSpider ID assigned]]}}<!--
+
-->|13={{#switch:{{{_countInChI|-1}}}
 +
|0=[[:Category:Articles without InChI source]]
 +
|#default=
 +
}}<!--
 +
 
 +
 
 +
CHEMSPIDER
 +
cat: Multiple SPIDER IDs does not exist.
 +
-->|14={{#switch:{{{_countChemSpiderID|-1}}}
 +
|0=[[:Category:Chemical pages without ChemSpiderID]]
 +
|#default=
 +
}}<!--
 +
 
 +
SMILES
 +
Not categorised, cats do not exist.
 +
 
 +
JMOL
 +
-->|20={{#if:{{{_hasJmol|}}} |[[:Category:Chemical articles having Jmol set]]}}<!--
 +
<!--
  
  negatives:
+
  OTHER IDs
-->{{#if:{{{_hasChEBIChEMBL|unk}}} ||[[Category:Articles without EBI source]]}}<!--
+
-->|21={{#if:{{{_hasChEBIChEMBL|unk}}} ||[[:Category:Articles without EBI source]]}}<!--
-->{{#if:{{{_hasChemSpiderID|unk}}} ||[[Category:Chemical pages without ChemSpiderID]]}}<!--
+
-->|23={{#if:{{{_hasKEGG|unk}}}     ||[[:Category:Articles without KEGG source]]}}<!--
-->{{#if:{{{_hasKEGG|unk}}} ||[[Category:Articles without KEGG source]]}}<!--
+
-->|24={{#if:{{{_hasUNII|unk}}}     ||[[:Category:Articles without UNII source]]}}<!--
-->{{#if:{{{_hasInChI|unk}}} ||[[Category:Articles without InChI source]]}}<!--
+
-->|25={{#if:{{{_hasStdInChI|unk}}}{{#ifexpr:{{{_countInChI|0}}}>=1|yes|}} ||[[:Category:Articles without InChI source]]}}<!--
-->{{#if:{{{_hasUNII|unk}}} ||[[Category:Articles without UNII source]]}}<!--
+
 
 +
EMPTY ID HEADER? Check if any data to be shown (else: idle Identifiers header)
 +
-->|28={{#if:{{{_hasOtherInput|unk}}} |<!--ok1 -->|{{#ifexpr:({{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}>1)|<!--ok2 -->|{{#if:{{{_hasChEBIChEMBL|}}}{{{_hasKEGG|}}}{{{_hasUNII|}}}{{{_hasStdInChIorKey|}}} |<!--ok3 -->|<!-- idle header, to track -->[[:Category:Chemical infoboxes with tracked parameters|I]]}}}}}}<!--
 +
 
 +
QIDs:
 +
-->|30={{#if:{{{_hasQID|}}}|[[:Category:Chemicals having QID set]]}}<!--
 +
-->|31={{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[:Category:Chemicals (indexed) having QID set]]}}<!--
 +
 
 +
Categories not existing (counted IDs, not used for this):
 +
[[:Category:Chemical articles with multiple InChIs]]
 +
[[:Category:Chemical articles with multiple ChemSpiderIDs]]
 +
{{#switch:{{{_countSMILES|-1}}}
 +
|0=[[:Category:Chemical articles without SMILES]]
 +
|1=
 +
|2=[[:Category:Chemical articles with multiple SMILESs]]
 +
|#default=}}
  
indexes:
+
-->}}<!-- eo collapsible list
-->{{#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>
 
--><noinclude>{{documentation}}</noinclude>

Revision as of 18:24, 18 March 2017