Closed (outdated)
Project:
Bibliography Module
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2012 at 01:14 UTC
Updated:
21 Dec 2018 at 20:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rjerome commentedIn the presave nodeapi hook, I'm not sure why you are calling the insert hook?
Comment #2
stackpr commentedIt calls the insert hook when the nid is already set because the update hook lacks the necessary functionality if the PMID is added during a node edit.
The update hook is called after presave when the node is being edited, but it never inserts a row into the pubmed table:
If the pmid or pmcid is added after initial node creation, then the data needs to be inserted at some point.
The other alternative (probably cleaner) would be to pack the update method with a little more logic. After the initial write, it could check to confirm that a row has been affected and insert the data if it has not. As a side note, it also does not appear that you can remove a PMID from a node since it would not make it past the condition that does the write, although I am not sure whether that is the intended behavior (I don't mind it).
Comment #3
rjerome commentedOh yeah, I was thinking it did an "insert" on the node (which already existed), but it's doing an insert on the pmid which doesn't exist yet.
Comment #4
rjerome commentedI guess the only other thing that worries me about this one is that it might severely impact bulk imports, since it could be doing two Pubmed queries for every entry. Import files with 5 - 10 thousand entries are not uncommon, so perhaps there should be admin option to turn this feature on/off.
Ron.
Comment #5
stackpr commentedGood to know about that use case. I'll shift this logic into a configurable cron run and submit a new patch.
Comment #6
rjerome commentedGood idea.
Comment #7
ursula commentedI also need to display and to edit PMIDs and PMC IDs. The PMC IDs are particularly tricky.
My question here is: are you planning to also add the PMID and PMCID to the edit form for biblio entries as well? The reasoning for that is below. If there are no plans already, I might undertake this myself (in the D7 version).
After our publications are published, most journals deposit the manuscript at PubMed Central themselves. For these, the initial PMC ID is "PMCID TBD by Journal".
Some journals don't do that, so we deposit ourselves, and get a different type of number:
NIHMS ID
Both, the "TBD by Journal" and the NIHMS ID will have to get updated manually, once the PMCID has been generated. Additionally, the editor will have to see easily (a view) which PMCIDs are not yet final.
For this, there needs to be the possibility to edit the PMCID. I can do this by adding a field to the biblio content type. However, since a table for the PMIDs and the PMCIDs is already there, this seems to be overly redundant.
It is very important for us to be able to have up-2-date PMCIDs, because NIH requires these in the grant reports.
Comment #8
stackpr commentedI suggest starting a new issue - I've adjusted this issue title to disambiguate.
I might expose it on the form, but you need a views handler on top of the form field. Also, the data structure is currently inadequate for your use case (the PMID and PMCID are both stored as integers, and there is no NIHMS ID).
Comment #9
stackpr commentedI've attached an updated patch that moves this logic into the cron job:
My cron tests show both that updates still work and that checks for new IDs also work.
Comment #10
ursula commentedThanks for the suggestions, I started another issue.
Comment #11
stevecory commentedIs it possible to display the PMCID in the Citation in Drupal 7? I cannot find where to add it to the styling.
Comment #12
stackpr commentedThat is a complicated question because of the numerous use cases. The PMCID variable is available to the citeproc stylesheets. You can edit the stylesheet by going to Site Configuration > Biblio settings > CiteProc > CiteProc Style Manager.
Alternately, depending on where you are trying to make it appear, you can go to admin/settings/biblio/basic and enable it in the Lookup Links section. In either case, this particular question should probably move to another (documentation) issue if this does not solve it for you.
Comment #13
stevecory commentedThe PMCID should appear at the end of the Biblio: Biblio Citation field. Similar to how the PubMed link appears at the end of the Citation
http://impact.unc.edu/view/biblio/journals
with the exception that it displays the actual number (e.g. PMC3685206 that would link to
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3685206/ )
The *.csl files won't be editied for my lack of knowledge of the system variable names and required syntax (XML?).
Only DOI, PubMed and Google Scholar appear under "Lookup Links" in the "Links" section of the
Administation > Configuration > Content authoring > Biblio settings > Preferences.
The PMCID does not appear under the Lookup Links.
The PubMed ID and PMC ID fields are not accessible via the Biblio Content Type or the
Administation > Configuration > Content authoring > Biblio settings > Fields.
Comment #14
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.