Wikidata contiene muchos ejemplos de «Identificadores externos», como el código ATC (P267); véase Sistema de clasificación química terapéutica anatómica .
Estos códigos se utilizan con el formateador URL (P1630) como http://www.whocc.no/atc_ddd_index/?code=$1 donde el $1 debe sustituirse por el código ATC.
Esta plantilla toma un código de identificador externo como |code=
y utiliza una URL de formateador como |url=
para construir un enlace al recurso externo; un |label=
parámetro opcional establece el texto del enlace, tomando como valor predeterminado el de |code=
en caso contrario.
Al proporcionar el código como parámetro a esta plantilla se puede realizar una llamada a Wikidata para obtener el código.
Para acetoacetato de aluminio (Q26979), código ATC (P267):
{{Formatter link |url=http://www.whocc.no/atc_ddd_index/?code=$1 |code={{wdib |P267 |qid=Q26979 |fwd=ALL |osd=n |noicon=y |maxvals=1}} }}
→ A02AB05La URL del formateador que se utilizará para el código ATC (P267) se puede encontrar en:
{{wdib |P1630 |qid=P267 |fwd=ALL |osd=n}}
→ https://www.whocc.no/atc_ddd_index/?code=$1 En los cuadros de información, generalmente se codificará de forma fija porque es específico del campo del cuadro de información. De lo contrario, se puede utilizar lo siguiente si se deben rastrear los cambios de Wikidata en la URL del formateador:
{{Formatter link |url={{wdib |P1630 |qid=P267 |fwd=ALL |osd=n |noicon=y}} |code={{wdib |P267 |qid=Q26979 |fwd=ALL |osd=n |noicon=y |maxvals=1}} }}
Combina una “URL formateadora (P1630)” de Wikidata con un código de identificación para producir una URL