elifesciences / elife-pubmed-feed

code to support uploading feeds to pubmed for POA articles and VOR articles
1 stars 4 forks source link

Improve the Replaces tag logic for flexibility and accuracy #57

Closed gnott closed 7 years ago

gnott commented 7 years ago

The older (currently running) PubMed code logic surrounding <Replaces> tag logic is basic and relies on some assumptions about the history of the document (whether the article was ever a PoA article) and/or its version number. Also, the version number of the article is not always set or is not available).

One example illustrated in comment https://github.com/elifesciences/elife-pubmed-feed/issues/38#issuecomment-334701565, is when an article is "silently" corrected and the article is a version 1 v1, then in the PubMed deposit a <Replaces> tag is not added. But, it the article will already exist in PubMed's system and it requires a <Replaces> tag in the deposit in order to update the existing record.

Though the logic around all version 2 and greater articles will get a <Replaces> tag (except we've had other problems where the v1 deposit is not indexed by PubMed yet, and a <Replaces> tag in the v2 deposit causes it to be rejected), it will be good to introduce some flexibility so a replaces flag can be added as part of a publishing workflow, resulting in a <Replaces> tag in the PubMed deposit.

Possible reasons to add a replaces flag for an article could include

Melissa37 commented 7 years ago

Sounds good thank you!

Melissa37 commented 7 years ago

linked to #58