====== PubMed2020 Plugin ====== ---- plugin ---- description: Retrieves and creates publication citations from NCBI PubMed author : Eric Maeker, MD email : eric.maeker@gmail.com type : syntax, render lastupdate : 2023-01-13 compatible : Greebo, Frusterick Manners, Elenor Of Tsort, Detritus similar : pubmed tags : medical, references, citation, pubmed, science downloadurl: https://github.com/EricMaeker/dokuwiki-plugin-pubmed/zipball/master bugtracker : https://github.com/EricMaeker/dokuwiki-plugin-pubmed/issues sourcerepo : https://github.com/EricMaeker/dokuwiki-plugin-pubmed donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MDUGLAHZJGKBW ---- ===== Description ===== This plugin retrieves the MedLine description of articles and books recorded in the NCBI [[https://pubmed.ncbi.nlm.nih.gov/|PubMed]] and the [[https://www.ncbi.nlm.nih.gov/pmc/|PMC]] database and allow users to easily include article citation into their DokuWiki pages. The MedLine content is cached in the media directory of your wiki. This plugin is 100% compatible with the new citation interface of PubMed (as of 05/2020). This plugin is perfectly adapted to dokuwiki farms and works with PHP 5.6+. =====Authors and licence===== * Ikuo Obataya wrote the pubmed plugin in 2007-2016 * Eric Maeker improved this first plugins (without integrating new Ikuo code) from 2016 to 2019 * Code was rewritten in 2020 due to PubMed new API (see [[https://api.ncbi.nlm.nih.gov/lit/ctxp|updateCtx]]) * License : Public Domain * Current version : 2023-01-13 ===== Examples/Usage ===== * [[https://www.maeker.fr/covid19|See in action inside a farm animal]] (at the bottom of the page) * [[https://www.maeker.fr/fr/humaniste/publications/2020/empathie_peut_elle_s_enseigner_aux_soignants_sger|See in action]] (in combination with [[plugin:refnotes|RefNotes plugin]]) * [[https://maeker.fr/wiki/test_pubmed|Page used to test the code]] ===== Installation ===== Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. The local plugin directory must have the same name as the plugin is named, otherwise the plugin won't work properly. ===== Syntax ===== ==== Basic syntax ==== * The plugin basic syntax architecture is the following: * ''%%{{pmid>___}}%%'' for the PubMed database * ''%%{{pmcid>___}}%%'' for the PMC database (please note carrefully the ''%%c%%'' in pm**c**id) * Following the database declaration, after the ''%%>%%'', you can add * specific commands. Eg with the **long** command: ''%%{{pmid>long:012345678}}%%'' (see below) * or simply the ID of the publications. Eg ''%%{{pmcid>0123456}}%%'' ==== Including article citation into your pages ==== * **The syntax is quite easy:** * ''%%{{pmid>01234567}}%%'' / ''%%{{pmcid>01234567}}%%'' * or ''%%{{pmid>command:01234567}}%%'' / ''%%{{pmcid>command:01234567}}%%'' * **Using the default options:** * ''%%{{pmid>24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed.\\ * ''%%{{pmcid>7241351}}%%'' where 7241351 is the PCMID of the article as notified by pubmed PMC.\\ * ''%%{{pmid>user:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and the default user parameter (see configuration) will be used to create the article citation. * **Using specific format:** * ''%%{{pmid>long:24073682}}%%'' where 24073682 is the PMID of the article as notified by pubmed and //long// is the selected article citation format. * Many predefined citation format are available. You can define yours in the configuration panel and call it using the ''%%user%%'' command. * **You can require multiple citations at once (creating a nice HTML list):** * For example this list uses the citations used as examples in the Vancouver referencing paper ''%%{{pmid>vancouver:19171717,12142303,12028325,12084862,12166575,15857727}}%%'' * If you want to automatically sort ID, just start the list with the word //sort// : ''%%{{pmid>vancouver:sort,19171717,12142303,12028325,12084862,12166575,15857727}}%%'' * **Including links to pubmed search page** * You can also use this plugin to create pubmed search URL. * You can use //basic// search of terms or * Complete search with options: //size, format, filter, sort//. You just have to specify options separated with a ''|'' char. * // Basic search of terms {{pmid>search:"Inappropriate Prescribing"[Mesh]}} {{pmid>search:"Drug-Related Side Effects and Adverse Reactions"[Mesh] AND (Review[ptyp] AND "loattrfree full text"[sb])}} // Search of terms with options {{pmid>search:"Inappropriate Prescribing"[Mesh]|size=200|sort=pubdate}} // Search passing a specific title for the link (just use a # for the first param) {{pmid>search:#My Link Title|"Inappropriate Prescribing"[Mesh]|size=200|sort=pubdate}} ===== Options ===== ==== Citation format ==== * The article citation can be automatically included using pre-formatted outputs: * **vancouver** : Full Vancouver citation see [[https://en.wikipedia.org/wiki/Vancouver_system|Vancouver]] for more information. * **short** : ISO citation in a short way. * **long** : full ISO citation including all authors, article title, journal title, volume, year, month, pages. * **long_tt** : same as long but with translated title (if exists) * **long_pdf** : full ISO citation including all authors, article title, journal title, volume, year, month, pages. If you own the PDF file a link will show. * **long_tt_pdf** : same as long_pdf but with translated title (if exists) * **long_abstract** : append the full abstract to the long citation. The abstract can toggled and is hidden by default. * **long_tt_abstract** : same as long_tt_abstract but with translated title (if exists) * **long_abstract_pdf** : append the full abstract to the long citation. The abstract can toggled and is hidden by default. If you own the PDF file a link will show. * **long_tt_abstract_pdf** : same as long_tt_abstract_pdf but with translated title (if exists) * **authors** : only authors * **title** : only title * **year** * **date** month and year * **journal** : only journal title * **journaliso** : only journal iso title * **doi_link** : only DOI link * **listgroup** : Bootstrap ready list-group output (useful with bootstrap3 template) * or **user** defined : you can define you own citation format (see below). * Provides by default a link to the PubMed page and to the free full text in PMC if exists. ==== User defined citation ==== You can define in the configuration a simple string to define your own citation format. The following tokens are available. ^ Token ^ Content ^ | %pmid% | PMID with a link to pubmed citation | | %pmcid% | PMCID with a link to pubmed PMC citation | | %type% | Type of the citation ("article", "book") | | %authors% | All authors (complete lastname) | | %authorsVancouver% | All authors (initials lastname) | | %first_author% | Only first author +/- "et al" | | %corporate_author% | Author collective | | %title% | Title of the article | | %title_tt% | Translated title in the original language of the publication | | %book_title% | Title of the Book | | %collection_title% | Title of the collection | | %copyright% | Copyright | | %country% | Country | | %lang% | Language of the article | | %journal_iso% | ISO Journal title (abbrev) | | %journal_title% | Full Journal title | | %journal_id% | Journal ID | | %iso% | Self computed ISO citation | | %so% | Medline ISO citation | | %vol% | Volume | | %issue% | Issue | | %year% | Year | | %month% | Month | | %pages% | Pages | | %abstract% | Abstract (togglable) | | %doi% | DOI of the publication | | %pii% | PII of the publication | | %journal_url% | Link to Journal web site using the DOI | | %pmc_url% | If available, link to free PDF of the article. | | %abstractFr% | Show french translated abstract (see specific doc) | | %localpdf% | Add link to local PDF file (see specific doc) | ^ Hard coded format ^ Content ^ | **short** | %first_author%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% | | **long** | %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% | | **long_pdf** | %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %localpdf% %tweet% | | **long_abstract** | %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %tweet% | | **long_abstract_pdf** | %authors%. %title%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf% %tweet% | | **long_tt** | %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %tweet% | | **long_tt_pdf** | %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %localpdf% %tweet% | | **long_tt_abstract** | %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %tweet% | | **long_tt_abstract_pdf** | %authors%. %title_tt%. %iso%. %pmid%. %pmcid% %journal_url% %pmc_url% %abstract% %abstractFr% %localpdf% %tweet% | ==== Defining citation format for one document ==== * Use the following command ''%%{{pmid>doc_format:long_abstract_pdf}}%%'' ==== Styling==== * You can change the style of your citation. Please take a look at the ''%%style.css%%'' file for further information. ===== Using local PDF ===== * You get a direct link to your media PDF files of publications. You have to save the PDF files in the media directory: ''%%media/pubmed/pmid_pdf%%'' or ''%%media/pubmed/doi_pdf%%''. Just use the PMID or DOI as file name. It is recommanded to use the PMID mode. ===== Specific commands ===== * Some more commands are available: * ''%%addtt%%'' add a translated to the raw medline data * ''%%{{pmid>addtt:123456789|translated title to add is this current string}}%%'' * ''%%addhash%%'' add a hashtags to the raw medline data (used for the Tweet URLs) * ''%%{{pmid>addhash:123456789|MyHash1,MyHash2,MyHash3}}%%'' * ''%%test%%'' only for devs * ''%%raw_medline%%'' show the retrieved MedLine code. {{pmid>summaryxml:24073682}} * ''%%clear_raw_medline%%'' : clear all cached Medline files * ''%%remove_dir%%'' : remove the cache directory (by default /data/media/pubmed) * ''%%recreate_cross_refs%%'' : recreate the crossref (DOI <-> PMID) * ''%%full_pdf_list%%'' : show all available PDF (see specific doc) * To use these commands, use this syntax: * ''%%{{pmid>cmd:0123456789}}%%'' * ''%%{{pmcid>cmd:01234567}}%%'' ===== Configuration and Settings ===== * This plugin comes with some configuration parameters: * Default citation format. * Default user defined format. * Default authors limitation in Vancouver format * Default string replacement of authors over the Vancouver author limitation * Twitter user name to use in the Tweet URLs (via @UserName) * You use URL shorteners for the creation of the Twitter weblinks ===== Development ===== === Change Log === {{rss>https://github.com/EricMaeker/dokuwiki-plugin-pubmed/commits/master.atom date}} === Report Bugs and Issues === Please use the [[https://github.com/EricMaeker/dokuwiki-plugin-pubmed|github repository]] to adress any comments, issues or wishes. ===== Roadmap ===== * Get related using [[https://www.ncbi.nlm.nih.gov/books/NBK25499/|eftech]] * Show Mesh terms * Search Mesh terms extracted from a PMID ===== Discussion =====