Skip to content

@univ-lehavre/atlas-researcher-profiles ​

Classes ​

ClassDescription
CsvParseError-
CsvReadError-
OpenAlexSearchError-
RedcapFetchError-
RedcapWriteError-

Interfaces ​

InterfaceDescription
MatchResult-
PdfDebugInfo-
RateLimitInfo-
RedcapConnectionConfig-
ResearcherDataAll researcher data stored as a single JSON file in REDCap (oa_data).
ResearcherRowA researcher record, sourced from REDCap. userid maps to record_id in the REDCap instrument. File fields (oa_data, oa_pdf) are fetched separately via exportFile.
ResolveAuthorsResult-
ResolveResult-

Variables ​

VariableDescription
emptyResearcherData-

Functions ​

FunctionDescription
daysUntilNextUpdateReturns the number of days until the next update, or null if > 1 month ago / never imported.
downloadPublicationsFileDownloads the publications file field for a given userid.
extractTextExtracts plain text from a file ArrayBuffer. Supports PDF, DOCX, and plain text files.
fetchResearcherDataFetches the oa_data file field for a given userid and parses it as ResearcherData. Returns empty ResearcherData if the field has no file.
fetchResearchersFetches all researchers from the openalex REDCap instrument.
fetchWorksForAuthorsFetches and deduplicates works for a list of OpenAlex authors, one request per author. Calls onProgress after each author with the current count. Calls onRateLimit with the latest quota info after each page fetched.
generateCombinedPdfGenerates a combined PDF with: 1. Annexe — Données de résolution (debug appendix, if provided) 2. PDF du champ publications (if provided, inserted after extracted text) 3. Références vérifiées — data.final_references (Chicago Notes) 4. En attente de vérification — oa_references not in final_references (Chicago Notes)
matchReferencesMatches OpenAlex works against reference text using fuzzy title matching.
parseCsvParses CSV content into ResearcherRow records. Expects columns: userid, last_name, middle_name, first_name, orcid
resolveAllResolves authors and their deduplicated works for a researcher row.
resolveAuthorsResolves unique OpenAlex author profiles for a researcher. Searches by name (with and without middle name) and by ORCID if present.
writeFinalReferencesWrites the full ResearcherData to oa_data, generates a combined PDF in oa_pdf, updates oa_imported_at, and marks openalex_complete = "2".
writeResearcherDataWrites the full ResearcherData to oa_data and updates oa_imported_at. Used after resolving authors (fullnames + affiliations + oa_references).