Skip to content

Commit

Permalink
ingest more information than the basics when available (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent authored Jan 22, 2024
1 parent 7a35a2c commit fda44fe
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,20 @@ const MoveToExtractionDialog: React.FC<IDialog> = (props) => {
const includedStubs = curationIncludedStudies.stubStudies;

// the BE ingestion only checks for these three properties
const stubsToBaseStudies: Array<Pick<BaseStudy, 'name' | 'doi' | 'pmid'>> =
includedStubs.map((stub) => ({
name: stub.title,
doi: stub.doi,
pmid: stub.pmid,
}));
const stubsToBaseStudies: Array<
Pick<
BaseStudy,
'name' | 'doi' | 'pmid' | 'year' | 'description' | 'publication' | 'authors'
>
> = includedStubs.map((stub) => ({
name: stub.title,
doi: stub.doi,
pmid: stub.pmid,
year: Number(stub.articleYear),
description: stub.abstractText,
publication: stub.journal,
authors: stub.authors,
}));

try {
const res = await asyncIngest(stubsToBaseStudies);
Expand Down

0 comments on commit fda44fe

Please sign in to comment.