Template:Infobox drug/formatCASnumber
{{#switch:{{{localValue|}}}
|=
|none|None={{#if:{{{ix_label|}}}|{{{ix_label|}}}: }}{{{localValue|}}}{{main other|1={{#ifeq:{{{index|0}}}|0|Category:Chemicals that do not have a CAS registry number assigned
|Category:Chemicals (indexed) that do not have a CAS registry number assigned}}}}
|#default={{#if:{{{ix_label|}}} |{{{ix_label|}}}: }}[https://commonchemistry.cas.org/detail?cas_rn={{{localValue}}} {{{localValue}}}]{{{botref|}}} {{{comment|}}}}}