Extension:Pubmed

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Pubmed

Release status:Extension status stable

ImplementationTemplate:Extension#type Tag
DescriptionTemplate:Extension#description Fetches literature data from PubMed (www.pubmed.org) by API and includes them into a pag.
Author(s)Template:Extension#username Andreas Bohne-Lang (Bohnelangtalk)
Latest versionTemplate:Extension#version 2.0 (2011-04-11)
MediaWikiTemplate:Extension#mediawiki Tested on
1.15.1 and Cite(r47190)
1.13.4 and Cite(r37577)
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GLP
Download http://www.umm.uni-heidelberg.de/bibl/system/public/wikiext/
ParametersTemplate:Extension#parameters
  • $wgPubmedCache
  • $wgPubmedLimit
  • $wgPubmedDEBUG
  • $wgPubmedOffset
  • $wgPubmedPath
  • $wgPubmedLayoutFile
  • $wgPubmedLayoutLinks
  • $wgPubmedProxyHost
  • $wgPubmedProxyPort
  • $wgPubmedProxyUser
  • $wgPubmedProxyPass
  • $wgPubmedSOAP (depreciated)
  • $wgNUSOAPencodinghack (depreciated)

Translate the Pubmed extension if it is available at translatewiki.net

Check usage and version matrix.

The Pubmed extension can fetch literature data from scientific articles stored in PubMed (www.pubmed.org), and generate a reference list or box. The extension can create, in addition to the primary data like author, article title, journal, year, pages, etc., links like back to PubMed or to WorldCat.org by ISSN or to the full text at the publisher's page (if a DOI is specified). Further links can be defined using the layout template.

Usage[edit]

<pubmed> PubMed-ID or search string </pubmed>

Example

<pubmed> 15980568 </pubmed> will result:


Andreas Bohne-Lang, Wolf-Dieter Groch, René Ranzinger
AISMIG--an interactive server-side molecule image generator.
Nucleic Acids Res.: 2005, 33(Web Server issue);W705-9
[PubMed:15980568] [WorldCat.org] [DOI] (I p)


Pubmed can be combined quite elegantly with the Cite extension to produce in-text citations and an automatically numbered list of PubMed references, like the following:

<ref><pubmed>15980568</pubmed></ref>
<ref><pubmed>18981297 10901739</pubmed></ref>
==References==
<references/>

[Tested for MediaWiki 1.13.4 and Cite (Version r37577)]

In combination with Cite, and because Cite displays references as numbered lists, an inline format for the citation (like here) might be more suitable than the two default options. To achieve this, simply edit the file layout_ext.def in the Pubmed/layouts/ folder or create your own layout file in the same folder. In the latter case, also remember to a) redefine your default layout file (see Configuration parameters below) and b) duplicate the DOI, PMID and WORLDCAT files and rename them accordingly, in order to achieve display and automatic hyperlinking of those three fields to work with your custom format.

Further examples
  • <pubmed>Cancer</pubmed>
  • <pubmed>12743656,12061127,11928483,11752350,10498779,11114093</pubmed>

Download[edit]

  1. Please download archive from http://www.umm.uni-heidelberg.de/bibl/system/public/wikiext/
  2. untar the archive, ex tar zxvf Pubmed.tar.gz.
  3. place "Pubmed" directory in $IP/extensions/.

Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation[edit]

To install this extension, add the following to LocalSettings.php:

$wgPubmedPath="extensions/Pubmed";

$wgPubmedLayoutFile="layout_ext.def";
$wgPubmedLayoutLinks="PMID,WORLDCAT,DOI";
$wgPubmedCache="/tmp/pubmedcache2";
$wgPubmedProxyHost="";
$wgPubmedProxyPort="";
$wgPubmedProxyUser="";
$wgPubmedProxyPass="";
$wgPubmedDEBUG=0;
$wgPubmedLimit=5;
$wgPubmedOffset=0;

//$wgPubmedSOAP="auto";       *Deprecated*
//$wgNUSOAPencodinghack=true; *Deprecated*

require_once("$wgPubmedPath/Pubmed.php");
The PHP parameter allow_url_fopen = On needs to be set in your servers "php.ini" file for this extension to work. Usually this setting is deactivated because of security considerations.

Configuration[edit]

$wgPubmedCache="/tmp/pubmedcache"; enables cacheing of the Pubmed article data in a directory

$wgPubmedLimit=0; means that you get all articles a search query returns (remember the Pubmed limit of 500 articles) $wgPubmedLimit=10 sets the global limit of max retrieved articles to ten / <pubmed limit=20> can override the global setting

$wgPubmedLayoutFile="layout_ext.def"; sets the global default layout file<pubmed layoutfile="layout_ext2.def"> can override the default setting

$wgPubmedLayoutLinks="PMID,WORLDCAT,EZB,DOI"; sets default link includes


<pubmed limit=12> ... </pubmed> sets a limit of max data set that should be listed if there are more than one

<pubmed layoutfile="layout_ext2.def" layoutlinks="PMID,WORLDCAT,EZB_HD"> ... </pubmed> sets an alternative layout template file

Tips & Tricks[edit]

  • Fetch the latest 15 really published (not EPub ahead of print) publications from your department
<pubmed limit=15> "Medical Faculty Mannheim"[AD] AND "2011"[DP] AND pubstatusppublish </pubmed>
  • Latest publication about "real" science ;-)
<pubmed> 21133407, 6418270, 7819986 </pubmed>

Changelog[edit]

Version 1 - SOAP interface

  • 01.12.2008: small bugfix in SOAP class
  • 07.07.2009: Add ProxyUser and ProxyPassword to code area that handles a SOAP proxy connection
  • 28.04.2010: Try to code a work around for the mismatch encoding information in the SOAP-data coming from Pubmed. Adding 2 new variables: $wgPubmedSOAP="nusoap"; that can be "auto or nusoap" and $wgNUSOAPencodinghack=true; At the moment only $wgPubmedSOAP="nusoap" is working correctly.
  • 28.12.2010: Fix Pubmed changing in Title: Unfixed 'Array' occurs in titel. This is fixed in layout.inc.php now.
  • 08.02.2011: Fix Pubmed changing in ["MedlineCitation"]["PMID"]["_"]: Cache function was worry about...
  • 11.02.2011: Version is outdated and not longer supported. Please update to version 2.

Version 2 - fcgi interface

  • 11 Feb 2011: Doing a complete redesign of the API. The SOAP-interface (used in Version 1) of Pubmed causes more problems than clouds in the sky. The redesigned extension uses the fcgi-interface and xml.
  • 11 Feb 2011B: Minor bugfix in proxy authentification (if user uses a proxy with login)
  • 07 Mar 2011: Minor bugfix: if Limit was set to 0 now it takes the max 500 (before it took 0) records.
  • 11 Apr 2011: Add CollectiveName to authorlist. E.g. see PubMed:18391952 and "Diabetes Genetics Initiative" and "Wellcome Trust Case Control Consortium" in authorlist.
  • 25.01.2012: Modification by Spencer Bliven in Date fild extraction.

Usage examples[edit]

Most wikis are only used in Intranet but some are available from Internet:

See also[edit]

Extensions
Other

Publication[edit]

Bohne-Lang, Andreas and Lang, Elke
A landmark in biomedical information: many ways are leading to PubMed
Information und Wissen: global, sozial und frei? - Proceedings des 12. Internationalen Symposiums für Informationswissenschaft (ISI 2011); Hildesheim, 9.—11. March 2011 / hrsg. von Joachim Griesbaum, Thomas Mandl, Christa Womser-Hacker
Boizenburg : vwh, 2011, S. 496-7, (Schriften zur Informationswissenschaft; Bd. 58), ISBN: 978-3-940317-91-9
Conference poster (in english)

Contact[edit]

Andreas Bohne-Lang
Medical Faculty Mannheim of the University Heidelberg
Computational Center/Library
Ludolf-Krehl-Str. 13-17
68167 Mannheim
Germany
E-mail: andreas.bohne-lang@medma.uni-heidelberg.de