diff --git a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php index 12f7eca2add..ecea2032dab 100644 --- a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php +++ b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php @@ -216,6 +216,14 @@ public function generateAuthorNode($doc, $journal, $issue, $submission, $author) $authorElement->appendChild($doc->createElement('LastName'))->appendChild($doc->createTextNode(ucfirst($author->getLocalizedFamilyName()))); } $authorElement->appendChild($doc->createElement('Affiliation'))->appendChild($doc->createTextNode($author->getLocalizedAffiliation())); + // We're storing the ORCID with a URL (http://orcid.org/{$ID}), but the XML expects just the ID + $orcidId = explode('/', trim($author->getData('orcid') ?? '', '/')); + $orcidId = array_pop($orcidId); + if ($orcidId) { + $orcidNode = $authorElement->appendChild($doc->createElement('Identifier')); + $orcidNode->setAttribute('Source', 'ORCID'); + $orcidNode->appendChild($doc->createTextNode($orcidId)); + } return $authorElement; }