From e0da44d99b84d61b9ede0c5f130c478d3ccdabfa Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Tue, 9 Jul 2024 12:08:54 +0300 Subject: [PATCH 1/2] pkp/pkp-lib#10174 Included ORCID ID (cherry picked from commit 3289b7f81db0a70b4ee147476160961915aed584) --- .../importexport/pubmed/filter/ArticlePubMedXmlFilter.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php index 12f7eca2add..2c7ce2d78c8 100644 --- a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php +++ b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php @@ -216,6 +216,12 @@ 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())); + $orcidId = $author->getData('orcid'); + if ($orcidId) { + $orcidNode = $authorElement->appendChild($doc->createElement('Identifier')); + $orcidNode->setAttribute('Source', 'ORCID'); + $orcidNode->appendChild($doc->createTextNode($orcidId)); + } return $authorElement; } From d163378c06db82915298dffd56727f1612ef8886 Mon Sep 17 00:00:00 2001 From: Jonas Raoni Soares da Silva Date: Tue, 9 Jul 2024 16:27:43 +0300 Subject: [PATCH 2/2] pkp/pkp-lib#10174 Drop URL prefix from ORCID (cherry picked from commit bdde13a22d8ba18338bf346c221884a851fb24a8) --- plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php index 2c7ce2d78c8..ecea2032dab 100644 --- a/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php +++ b/plugins/importexport/pubmed/filter/ArticlePubMedXmlFilter.php @@ -216,7 +216,9 @@ 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())); - $orcidId = $author->getData('orcid'); + // 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');