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
as a result of a silent correction or resupply of the same version
could check PubMed's index to see if the record already exists prior to generating the PubMed deposit, and adding a replaces flag appropriately
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 areplaces
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 includereplaces
flag appropriately