Download & Extend

Manipulating and displaying PubMed and PMC Ids

Project:Bibliography Module
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:PMCID PMID

Issue Summary

As described in http://drupal.org/node/1717950#comment-6418110, pubmed ids and pmcids cannot get manipulated after import from pubmed.
A first step would be to make PubMed and PMC IDs accessible in views.
Afterwards, it would be helpful, if these IDs could get edited when editing the node - publication.

Comments

#1

Status:active» patch (to be ported)

PubMed IDs and PMC Ids are stored in the biblio_pubmed table. This patch fixes the biblio_pm_views_data for PubMed IDs, and adds PMCIDs, so that these two IDs can be added as fields in views.

AttachmentSize
biblio-pubmed_ids_in_views-1766180-1.patch 1.95 KB

#2

Category:bug report» feature request
Status:patch (to be ported)» needs work

Hi,

I implemented the functionality that I need, and it works for me (mostly, notes about it below). It would be great to get feedback, and it would also be great, if this could get included in the module, once hick-ups are fixed.

Please let me know when you see any issues with this! I'd also appreciate some pointers for the two problems at the end.

Below is a summary of the changes I made, all in the pubmed sub-module.

Two things I know that are missing are:
The "update" section in biblio_pm.install is not complete (function biblio_pm_update_7003). The additional rows need to get added here as well. Since it is basically the same code, I'd like to do that once the bug (see below, Problem 1) is fixed.

Once this is all done, I will write a test as well. Is it ok if I create a Drupal 7 branch of the documentation, and start updating things there?

Ursula

1. change database table:
I changed the biblio_pmcid field to char(20), because the ids look like "PMC123455" when
retrieving from PubMed.

2. Import:
I added the field to the Entrez script (EntrezPubmedArticle.php).

3. Edits in biblio_pm.module:

I added two fields to the "Identifiers" section (vtab 4).

To set the default value properly both when importing through PMID and when
editing the node later, I couldn't figure out just one value for PMID and
PMCID, so I enter whatever is defined:

$form_state['values']['biblio_pubmed_id'] or $form_state['node']->biblio_pubmed_id

This is not very elegant, any suggestion to improve it?

The PMID and PMCIDs are now imported, and the PMCID can get edited using the edit form.

For viewing the entry:

Edited the biblio_pm.install script:

1. added db_change_field for biblio_pmcid to adjust the type to char(20).

2. Now several rows have to get added to the main biblio tables, for which
have introduced these two functions:
_biblio_pm_types_customize_fields()
_biblio_pm_remove_customized_fields()

The required table rows to make the biblio_pubmed_id and biblio_pmcid fields
visible are thus inserted. It mostly works, with the expection of two
problems:

1. Problem: when making the ids visible in admin/config/content/biblio/fields,
I an getting an error message (violated integrity constraint)
when saving first, the second time works as expected.
What am I missing?

2. Problem: When executing admin/config/content/biblio/fields/reset,
the new fields get deleted. I'd have to disable and re-enable the
biblio_pm module to fix this.

From the previous comment: Added entries in biblio_pm_views_data
Here: adjusted the handler for PMCID to string.

AttachmentSize
biblio_pm-add_pubmed_functions-1766180-2.patch 13.09 KB

#3

Couldn't the PMCID be updated automatically when it is generated on PubMed? Why do you need to updated it manually on the Drupal side?

#4

Hi Jerome,

The PMCID is generated after the PubMed ID by PubMed Central. There are two ways to initiate this:

  1. Many journals submit the manuscript to PubMed Central directly, and a PMCID is generated within 6 month of publication, some earlier, some later.
  2. A number of journals (especially the non-US ones) don't submit to PubMed Central. In this case, the authors have to submit the manuscript, and first get an NIHMS Id at submission, which then later gets updated to the final PMCID (once PubMed Central re-formats the submission and puts it up).

We need either the NIHMS or the PMCID for grant reports to NIH. So we typically first enter "PMCID TBD by Journal" or the NIHMS Id for each new publication, and then update the id manually to the final PMCID (this on our hand-coded publication page, which I want to replace by a drupal page).

Do you have a better suggestion how to handle this?

Ursula

#5

That's what I was getting at in #3, your drupal/biblio installation can be setup to periodically query PubMed with the list of the PMID's currently on your Durpal site and update them with the data returned (or do nothing if it hasn't changed). So assuming you don't need (or have) the PMCID before it gets generated by PubMed Central, then you could just let the CRON process update the PMCID for you rather than manually editing it. Does that make sense?

#6

Yes, I am expecting that the PMCID will get updated through CRON.
Before that happens, either the temporary NIHMS id will have to get displayed, or the information that the PMCID will be provided by the journal. And if neither is true, then the pub admin will have to make sure that somebody deposits the article.

So currently, I just create a view and display all entries in the biblio_pubmed table that are not regular PMCIDs (I check the length of the ID and whether it starts with NIHMS instead). Using an additional custom field for the content type makes it much more complicated.

Additionally, I need to show both PMID and PMCID on the regular content page for the individual content entry. This could also get achieved by changing the pubmed link on the bottom to display the actual ID, and by adding the PMCID to that section. I thought it looked cleaner to have it integrated in the regular table. And the ability to edit the field allows me to add the temporary content (as described above).

Could you please suggest how you would prefer handling this?

Thanks, Ursula

#7

I am in the same boat as Ursula. I need PMID and PMCID #'s to keep track and report to various agencies. I do not want to use custom fields, but would rather have some nice integration and a way to easily update the specific node to get the PMCID.

I would be happy to assist with the programming, but don't know where to start. Fortunately I don't have a production site up so I can test, test, and test.

#8

This feature is now in the -dev version. I added a hook (hook_biblio_node_table_rows_alter) in the theme_biblio_tabular to allow other modules to add rows to the table output. This seemed easier that modifying the biblio_fields table.

http://drupalcode.org/project/biblio.git/commit/e44931a

nobody click here