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

From blackwiki
Jump to navigation Jump to search
imported>DePiep
(rm list)
imported>DePiep
Line 2: Line 2:
  
 
  Supercountings (over 7 ID countings)
 
  Supercountings (over 7 ID countings)
  -->|2={{#switch:{{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}
+
  -->{{#switch:{{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}
 
|0=<!-- ~no identifiers... -->
 
|0=<!-- ~no identifiers... -->
 
|1=
 
|1=
Line 14: Line 14:
  
 
  INDEX_LABEL needed?
 
  INDEX_LABEL needed?
-->|3={{#ifexpr:({{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}} |{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}>1)
+
-->{{#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
 
|<!-- 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:Multiple chemicals in an infobox that need indexing|needs label_indexes]]
Line 21: Line 21:
 
  NONE: Options 'none'
 
  NONE: Options 'none'
 
<!-- now: option 'none' only checked for main params (not the indexed 1-5 ones), for now
 
<!-- 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]] }}<!--
+
-->{{#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]] }}<!--
+
-->{{#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]] }}<!--
+
-->{{#if:{{{_hasChemSpiderIDnone|}}} |[[:Category:Chemicals that do not have a ChemSpider ID assigned]] }}<!--
  
 
  CAS NUMBER  
 
  CAS NUMBER  
-->|10={{#switch:{{{_countCASNo|-1}}}
+
-->{{#switch:{{{_countCASNo|-1}}}
 
|0=[[:Category:Chemical articles without CAS registry number]]
 
|0=[[:Category:Chemical articles without CAS registry number]]
 
|1=
 
|1=
Line 38: Line 38:
  
 
  PUBCHEM
 
  PUBCHEM
-->|11={{#switch:{{{_countPubChemCID|-1}}}
+
-->{{#switch:{{{_countPubChemCID|-1}}}
 
|0=[[:Category:Chemicals without a PubChem CID]]<!-- new. drugbox to follow. Mar 2017 -->
 
|0=[[:Category:Chemicals without a PubChem CID]]<!-- new. drugbox to follow. Mar 2017 -->
 
|1=
 
|1=
Line 50: Line 50:
  
 
  CHEBI
 
  CHEBI
-->|12={{#switch:{{{_countChEBI|-1}}}
+
-->{{#switch:{{{_countChEBI|-1}}}
 
|0|1=
 
|0|1=
 
|2=[[:Category:Chemical articles with multiple ChEBIs|B]]
 
|2=[[:Category:Chemical articles with multiple ChEBIs|B]]
Line 62: Line 62:
 
  INCHI (skipped: StdInChI)
 
  INCHI (skipped: StdInChI)
 
  cat:multiple INCHI's does not exist.
 
  cat:multiple INCHI's does not exist.
-->|13={{#switch:{{{_countInChI|-1}}}
+
-->{{#switch:{{{_countInChI|-1}}}
 
|0=[[:Category:Articles without InChI source]]
 
|0=[[:Category:Articles without InChI source]]
 
|#default=
 
|#default=
Line 70: Line 70:
 
  CHEMSPIDER
 
  CHEMSPIDER
 
  cat: Multiple SPIDER IDs does not exist.
 
  cat: Multiple SPIDER IDs does not exist.
-->|14={{#switch:{{{_countChemSpiderID|-1}}}
+
-->{{#switch:{{{_countChemSpiderID|-1}}}
 
|0=[[:Category:Chemical pages without ChemSpiderID]]
 
|0=[[:Category:Chemical pages without ChemSpiderID]]
 
|#default=
 
|#default=
Line 79: Line 79:
  
 
  JMOL
 
  JMOL
-->|20={{#if:{{{_hasJmol|}}} |[[:Category:Chemical articles having Jmol set]]}}<!--
+
-->{{#if:{{{_hasJmol|}}} |[[:Category:Chemical articles having Jmol set]]}}<!--
 
<!--
 
<!--
  
 
  OTHER IDs
 
  OTHER IDs
-->|21={{#if:{{{_hasChEBIChEMBL|unk}}}  ||[[:Category:Articles without EBI source]]}}<!--
+
-->{{#if:{{{_hasChEBIChEMBL|unk}}}  ||[[:Category:Articles without EBI source]]}}<!--
-->|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:{{{_hasUNII|unk}}}      ||[[:Category:Articles without UNII source]]}}<!--
-->|25={{#if:{{{_hasStdInChI|unk}}}{{#ifexpr:{{{_countInChI|0}}}>=1|yes|}} ||[[:Category:Articles without InChI source]]}}<!--
+
-->{{#if:{{{_hasStdInChI|unk}}}{{#ifexpr:{{{_countInChI|0}}}>=1|yes|}} ||[[:Category:Articles without InChI source]]}}<!--
  
 
  EMPTY ID HEADER? Check if any data to be shown (else: idle Identifiers header)
 
  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]]}}}}}}<!--
+
-->{{#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:
 
  QIDs:
-->|30={{#if:{{{_hasQID|}}}|[[:Category:Chemicals having QID set]]}}<!--
+
-->{{#if:{{{_hasQID|}}}|[[:Category:Chemicals having QID set]]}}<!--
-->|31={{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[:Category:Chemicals (indexed) having QID set]]}}<!--
+
-->{{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[:Category:Chemicals (indexed) having QID set]]}}<!--
  
 
  Categories not existing (counted IDs, not used for this):
 
  Categories not existing (counted IDs, not used for this):

Revision as of 18:31, 18 March 2017