. * * * User defined settings * ~~~~~~~~~~~~~~~~~~~~~ */ $ncbi_Tool = "AssEd"; /* * You will also need to edit 'lib/Variables.php' * * * Changelog * ~~~~~~~~~ * - v0.2b - 2008-11-02 * - Added languages to highlight tool * - v0.1b - 2008-10-25 * * * ********************************************************************************************************************************************/ error_reporting(E_ERROR); ini_set('display_errors', '1'); //error_reporting(E_ALL); //ini_set('display_errors', '8'); require_once("lib/Variables.php"); require_once("lib/DoiResolve.php"); include_once("lib/eSearch.php"); include_once("lib/eSummary.php"); include_once("lib/eFetch.php"); include_once("lib/BioMedCentral.php"); session_start(); $PhpEntrezTool = new AuthorProfile(); // Run the object class AuthorProfile { var $Author; var $PostData; var $Title; var $Html; var $QueryKey; var $WebEnv; var $Counts; var $IdLists; var $Weight; var $Journals; var $Dois; var $Languages; var $BmcPapers; var $OaIdList; var $FullName; var $Emails; var $Affiliations; var $CoAuthors; var $Years; var $Publications; var $Scores; var $OrderBy; function AuthorProfile() { if (isset($_GET['author'])) $this->Author = str_replace("%20", " ", $_GET['author']); else { $this->Title = "PET: Error"; $this->Html = "

Error: No author name specified.

\n"; $this->OutputHtml(); } $this->Author = str_replace("_", " ", $this->Author); if (isset($_GET['OrderBy'])) $this->OrderBy = $_GET['OrderBy']; if (isset($_SESSION['PostData'])) { $this->PostData = $_SESSION['PostData']; // Get the session saved data $this->OrderBy = "score"; } if (empty($this->OrderBy)) $this->OrderBy = "year"; $this->GetBasicCounts(); if (isset($this->PostData['Searches'])) $this->MakeIdLists(); $this->GetDocDetails(); $this->GetDetailsFromBmc(); if (!empty($this->FullName)) $this->GetFullNameCounts(); $this->PrintResults(); } function GetBasicCounts() { try { $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->Run(2); $this->Counts['PubMed (all)'] = $eSearch->Count; $this->QueryKey = $eSearch->QueryKey; $this->WebEnv = $eSearch->WebEnv; $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\" AND (free full text[sb])", null, null, 20 ); $eSearch->Run(2); $this->Counts['Open Access'] = $eSearch->Count; $this->OaIdList = $eSearch->IdList; $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 3652; $eSearch->Run(2); $this->Counts['PubMed (10yr)'] = $eSearch->Count; $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 1826; $eSearch->Run(2); $this->Counts['PubMed (5yr)'] = $eSearch->Count; $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 365; $eSearch->Run(2); $this->Counts['PubMed (1yr)'] = $eSearch->Count; $eSearch = new eSearch( 'pmc', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->Run(2); $this->Counts['PMC (all)'] = $eSearch->Count; $eSearch = new eSearch( 'pmc', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 3652; $eSearch->Run(2); $this->Counts['PMC (10yr)'] = $eSearch->Count; $eSearch = new eSearch( 'pmc', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 1826; $eSearch->Run(2); $this->Counts['PMC (5yr)'] = $eSearch->Count; $eSearch = new eSearch( 'pmc', "\"" . $this->Author . "\"", null, null, 20, 'count'); $eSearch->RelDate = 365; $eSearch->Run(2); $this->Counts['PMC (1yr)'] = $eSearch->Count; } catch (Exception $e) { $this->Html = "

Caught an exception while trying to fetch document summaries (".$e->getMessage()."). Reloading the page to try again...

\n"; $this->OutputHtml(true); } } function MakeIdLists() { foreach ($this->PostData['Searches'] as $Search) { $SearchTerm = "\"" . $this->Author . "\" (" . $Search['SearchString'] . ")"; try { $eSearch = new eSearch( "pubmed", $SearchTerm, "1900/01/01", date('Y/m/01'), $Search['AtMost'] ); $eSearch->Run(2); } catch (Exception $e) { $this->Html .= "

Warning: caught an exception when trying to retreive the XML data from PubMed. I am going to reload the page and hope that the problem goes away. The error given was: " . $e->getMessage() . "

\n"; $this->SaveReload(); exit; } if (is_array($eSearch->IdList)) $this->IdLists[$Search['SearchString']] = $eSearch->IdList; elseif (is_string($eSearch->IdList)) $this->IdLists[$Search['SearchString']][] = $eSearch->IdList; // Calculate the weight to be given to each search -- the weight diminishes logarithmically thus giving additional weight to rare terms $weight[$Search['SearchString']] = 2; if ($Search['Count'] < 1000000) $this->Weight[$Search['SearchString']] = 3; if ($Search['Count'] < 100000) $this->Weight[$Search['SearchString']] = 4; if ($Search['Count'] < 10000) $this->Weight[$Search['SearchString']] = 6; if ($Search['Count'] < 1000) $this->Weight[$Search['SearchString']] = 9; if ($Search['Count'] < 100) $this->Weight[$Search['SearchString']] = 13; $this->Counts[$Search['SearchString']] = $eSearch->Count; } } function GetDocDetails() { // Get some stats from the full publication list $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20 ); $eSearch->Run(2); for ($eFs = 0; $eFs < $eSearch->Count; $eFs += 50) { try{ $eFetch = new eFetch( 'pubmed', $eSearch->QueryKey, $eSearch->WebEnv, $eSearch->Translation, $eFs, 50 ); $eFetch->Run(1); $eSummary = new eSummary( 'pubmed', $eSearch->QueryKey, $eSearch->WebEnv, $eFs, 50 ); $eSummary->Run(1); } catch (Exception $e) { $eSearch->DeleteCache(); $eSummary->DeleteCache(); unset($eSearch); try{ $eSearch = new eSearch( 'pubmed', "\"" . $this->Author . "\"", null, null, 20 ); $eSearch->Run(2); $eFetch = new eFetch( 'pubmed', $eSearch->QueryKey, $eSearch->WebEnv, $eSearch->Translation, $eFs, 50); $eFetch->Run(1); $eSummary = new eSummary( 'pubmed', $eSearch->QueryKey, $eSearch->WebEnv, $eFs, 50 ); $eSummary->Run(1); } catch (Exception $f) { $this->Html = "

Caught an exception while trying to fetch document summaries (".$e->getMessage()."). Reloading the page to try again...

\n"; $this->OutputHtml(true); } } foreach ($eFetch->Array['PubmedArticle'] as &$Pub) { if (!empty($eSummary->Array['DocSum'][$Pub['MedlineCitation']['PMID']])) $Pub = array_merge($Pub, $eSummary->Array['DocSum'][$Pub['MedlineCitation']['PMID']]); if (empty($Pub['Source'])) { if (!empty($Pub['MedlineCitation']['Article']['Journal']['ISOAbbreviation'])) $Pub['Source'] = $Pub['MedlineCitation']['Article']['Journal']['ISOAbbreviation']; else $Pub['Source'] = $Pub['MedlineCitation']['Article']['Journal']['Title']; } if (empty($Pub['Id'])) $Pub['Id'] = $Pub['MedlineCitation']['PMID']; // Count the journals if (isset($this->Journals[$Pub['Source']])) $this->Journals[$Pub['Source']] += 1; else $this->Journals[$Pub['Source']] = 1; $Pub['Classes'][] = str_replace(" ", "_", $Pub['Source']); // Count the publishers if (isset($Pub['PubmedData']['ArticleIdList']['doi'])) { $Doi = explode("/", $Pub['PubmedData']['ArticleIdList']['doi']); if (isset($this->Dois[$Doi[0]])) $this->Dois[$Doi[0]] += 1; else $this->Dois[$Doi[0]] = 1; if ($Doi[0] == '10.1186') $this->BmcPapers[] = $Doi[1]; $Pub['Classes'][] = str_replace(".","", $Doi[0]); } // Languages if (isset($Pub['LangList']['Lang'])) { if (isset($this->Languages[$Pub['LangList']['Lang']])) $this->Languages[$Pub['LangList']['Lang']] += 1; else $this->Languages[$Pub['LangList']['Lang']] = 1; $Pub['Classes'][] = 'lang-' . $Pub['LangList']['Lang']; } // Authorship if (count($Pub['MedlineCitation']['Article']['AuthorList']) == 1) { $Pub['FirstAu'] = true; $Pub['LastAu'] = true; } else { $i = 1; foreach ($Pub['MedlineCitation']['Article']['AuthorList'] as $k => $v) { if (isset($l)) unset($l); if (($i == 1) and ($k == $this->Author)) $Pub['FirstAu'] = true; if (isset($v['Initials'])) $l = $v['LastName'] . ' ' . substr($v['Initials'], 0, 1); if (($k == $this->Author) OR (isset($l) and ($l == $this->Author))) { if (isset($v['MiddleName'])) $FullName = array($v['ForeName'], $v['MiddleName'], $v['LastName']); //elseif (isset($v['Initials']) and strlen($v['Initials']) > 1) $FullName = array($v['ForeName'], $v['LastName']); else $FullName = array((isset($v['ForeName']) ? $v['ForeName'] : $v['Initials']), $v['LastName']); $FullName = implode(" ", $FullName); if (isset($this->FullName[$FullName])) $this->FullName[$FullName] += 1; else $this->FullName[$FullName] = 1; if (isset($Pub['MedlineCitation']['Article']['Affiliation']) and (empty($this->Affiliations[$FullName]) OR !in_array($Pub['MedlineCitation']['Article']['Affiliation'], $this->Affiliations[$FullName]))) $this->Affiliations[$FullName][] = $Pub['MedlineCitation']['Article']['Affiliation']; } else { if (!empty($this->CoAuthors[$k])) $this->CoAuthors[$k] += 1; else $this->CoAuthors[$k] = 1; } $i++; } if ($k == $this->Author) $Pub['LastAu'] = true; } if (!empty($Pub['FirstAu'])) { if (!empty($this->Counts['First Author'])) $this->Counts['First Author'] += 1; else $this->Counts['First Author'] = 1; $Pub['Classes'][] = "FirstAu"; } if (!empty($Pub['LastAu'])) { if (!empty($this->Counts['Last Author'])) $this->Counts['Last Author'] += 1; else $this->Counts['Last Author'] = 1; $Pub['Classes'][] = "LastAu"; } if (isset($Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']['Year'])) { if (!empty($this->Years[$Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']['Year']])) $this->Years[$Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']['Year']] += 1; else $this->Years[$Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']['Year']] = 1; } // Email if (!empty($Pub['FirstAu']) and !empty($Pub['MedlineCitation']['Article']['Affiliation'])) { if (strpos($Pub['MedlineCitation']['Article']['Affiliation'], '@', 0)) { $email = substr($Pub['MedlineCitation']['Article']['Affiliation'], strrpos($Pub['MedlineCitation']['Article']['Affiliation'], ' ')); if (empty($this->Emails[$FullName]) OR !in_array($email, $this->Emails[$FullName])) $this->Emails[$FullName][] = $email; } } /*********** SCORES ***********/ if (!empty($Pub['FirstAu']) and !empty($this->PostData['ScoreFirstAu'])) $this->Scores[$Pub['MedlineCitation']['PMID']] = $this->PostData['ScoreFirstAu']; elseif (!empty($Pub['LastAu']) and !empty($this->PostData['ScoreLastAu'])) $this->Scores[$Pub['MedlineCitation']['PMID']] = $this->PostData['ScoreLastAu']; else $this->Scores[$Pub['MedlineCitation']['PMID']] = 1; if (!empty($this->PostData['WeightJournal']) and (in_array($Pub['MedlineCitation']['Article']['Journal']['ISOAbbreviation'], $this->PostData['ScoreJournal']) OR in_array($Pub['MedlineCitation']['Article']['Journal']['ISSN'], $this->PostData['ScoreJournal']) OR in_array($Pub['MedlineCitation']['Article']['Journal']['ISOAbbreviation'], $this->PostData['FullJournalName']))) $this->Scores[$Pub['MedlineCitation']['PMID']] = $this->Scores[$Pub['MedlineCitation']['PMID']] * $this->PostData['WeightJournal']; if (!empty($this->PostData['ScoreDoi']) and isset($Doi) and in_array($Doi[0], $this->PostData['ScoreDoi'])) $this->Scores[$$Pub['MedlineCitation']['PMID']] = $this->Scores[$Pub['MedlineCitation']['PMID']] * $this->PostData['WeightDoi']; // Weight the score by age if (isset($this->PostData['ScoreAge']) and $this->PostData['ScoreAge']) { $Timestamp = strtotime(implode("/", $Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate'])); $Age = time() - $Timestamp; $Age = $Age / 31570560; if ($Age < 1) $Weight = 2; // If the publication is less than a year old, double the score else $Weight = 0.5 + (1 / $Age); // Otherwise, weight it by 0.5 + (1 / Age) $this->Scores[$Pub['MedlineCitation']['PMID']] = $this->Scores[$Pub['MedlineCitation']['PMID']] * $Weight; } // Weight the score by search matches if (!empty($this->IdLists)) { foreach ($this->IdLists as $String => $IdList) { if (in_array($Pub['MedlineCitation']['PMID'], $IdList)) { $this->Scores[$Pub['MedlineCitation']['PMID']] = $this->Scores[$Pub['MedlineCitation']['PMID']] * $this->Weight[$String]; $Pub['Classes'][] = str_replace(" ", "_", $String); } } } $this->Publications[$Pub['MedlineCitation']['PMID']] = $Pub; } } } function GetDetailsFromBmc() { // Try to find author details by looking on BioMed Central if (!empty($this->Dois['10.1186'])) { foreach ($this->BmcPapers as $Doi) { $Bmc = new BioMedCentral( "10.1186/" . $Doi ); $Bmc->GetXmlFile(); if (isset($Bmc->Error)) continue; $Bmc->XmlToArray(); if (isset($Bmc->Array['fm']['bibl']['aug'][$this->Author])) { if (!empty($Bmc->Array['fm']['bibl']['aug'][$this->Author]['mi'])) $FullName = array($Bmc->Array['fm']['bibl']['aug'][$this->Author]['fnm'], $Bmc->Array['fm']['bibl']['aug'][$this->Author]['mi'], $Bmc->Array['fm']['bibl']['aug'][$this->Author]['snm']); else $FullName = array($Bmc->Array['fm']['bibl']['aug'][$this->Author]['fnm'], $Bmc->Array['fm']['bibl']['aug'][$this->Author]['snm']); $FullName = implode(" ", $FullName); if (isset($this->FullName[$FullName])) $this->FullName[$FullName] += 1; else $this->FullName[$FullName] = 1; if (!empty($Bmc->Array['fm']['bibl']['aug'][$this->Author]['email']) and (empty($this->Emails[$FullName]) OR !in_array($Bmc->Array['fm']['bibl']['aug'][$this->Author]['email'], $this->Emails[$FullName]))) $this->Emails[$FullName][] = $Bmc->Array['fm']['bibl']['aug'][$this->Author]['email']; if (!empty($Bmc->Array['fm']['bibl']['aug'][$this->Author]['insr'])) { if (isset($Bmc->Array['fm']['bibl']['aug'][$this->Author]['insr']['iid'])) { if (is_array($Bmc->Array['fm']['bibl']['aug'][$this->Author]['insr']['iid'])) { foreach ($Bmc->Array['fm']['bibl']['aug'][$this->Author]['insr']['iid'] as $v) { $AffiliationId = $v; if (!empty($Bmc->Array['fm']['bibl']['insg']['ins'][$AffiliationId])) $Affiliation = $Bmc->Array['fm']['bibl']['insg']['ins'][$AffiliationId]; if (empty($this->Affiliations[$FullName]) OR !in_array($Affiliation, $this->Affiliations[$FullName])) $this->Affiliations[$FullName][] = $Affiliation; } } else { $AffiliationId = $Bmc->Array['fm']['bibl']['aug'][$this->Author]['insr']['iid']; if (!empty($Bmc->Array['fm']['bibl']['insg']['ins'][$AffiliationId])) $Affiliation = $Bmc->Array['fm']['bibl']['insg']['ins'][$AffiliationId]; if (empty($this->Affiliations[$FullName]) OR !in_array($Affiliation, $this->Affiliations[$FullName])) $this->Affiliations[$FullName][] = $Affiliation; } } } } } } } function GetFullNameCounts() { // Full name counts foreach ($this->FullName as $FullName => $Count) { $eSearch = new eSearch( 'pubmed', "\"" . $FullName . "\"", null, null, 20 ); $eSearch->Run(2); if (!empty($eSearch->Count)) { $this->Counts[$FullName] = $eSearch->Count; foreach ($eSearch->IdList as $Id) { $this->Publications[$Id]['Classes'][] = str_replace(" ", "_", $FullName); } } } } function PrintResults() { // Make the Html $this->Html = "\n"; // -- Names and Emails $this->Html .= "
"; $this->Html .= "\n"; if (!empty($this->FullName)) { foreach ($this->FullName as $k => $v) { $this->Html .= "\n"; $this->Html .= "\n"; $this->Html .= "\n"; } $this->Html .= "
Suggested names
" . $k . "

" . (isset($this->Emails[$k]) ? implode("

", $this->Emails[$k]) : '') . "

\n"; $this->Html .= "\n"; $this->Html .= "
Affiliations[$k]) and (count($this->Affiliations[$k]) > 3)) ? "style=\"display:none;\"" : "") . ">

Hide affiliations.

" . (!empty($this->Affiliations[$k]) ? implode("

", $this->Affiliations[$k]) : "No affiliations found.") . "

\n"; } else $this->Html .= "

None found.

\n"; // -- Publication list if (isset($this->Publications)) { // -- By date $DateTable = "
\n"; foreach ($this->Publications as $Pub) { unset($AuList); if (empty($Pub['Id'])) continue; // temporary fix for a bug $Pmid = $Pub['Id']; // Highlight text $Title = $Pub['MedlineCitation']['Article']['ArticleTitle']; $HighlightTerms = array(); if (isset($this->PostData['Searches'])) { foreach ($this->PostData['Searches'] as $Search) { $NewTerms = explode(" ", $Search['SearchString']); if (!empty($NewTerms)) $HighlightTerms = array_merge($HighlightTerms, $NewTerms); } foreach ($HighlightTerms as $Term) { $Title = str_replace($Term, "" . $Term . "", $Title); } } if (isset($Pub['PubmedData']['ArticleIdList']['doi'])) $Doi = explode("/", $Pub['PubmedData']['ArticleIdList']['doi']); if (!empty($Pub['MedlineCitation']['Article']['AuthorList'])) { foreach ($Pub['MedlineCitation']['Article']['AuthorList'] as $Short => $Full) { if (empty($Full['LastName'])) $Au = "" . $Full['CollectiveName'] . ""; else { if ($Short == $this->Author) $Au = "" . (isset($Full['ForeName']) ? $Full['ForeName'] : $Full['Initials']) . " " . (isset($Full['MiddleName']) ? $Full['MiddleName'] : '') . " " . $Full['LastName'] . ""; else $Au = "" . (isset($Full['ForeName']) ? $Full['ForeName'] : (isset($Full['Initials']) ? $Full['Initials'] : 'Anon')) . " " . (isset($Full['MiddleName']) ? $Full['MiddleName'] : '') . " " . $Full['LastName'] . ""; } $AuList[] = $Au; } $AuList = implode(", ", $AuList); } else $AuList = "Error - could not extract author list."; $DateTable .= "\n"; } $DateTable .= "
Publication list (order by: date | score)

Date: " . implode("-", $Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate']) . "

" . $Title . "

" . $AuList . "

" . ((!empty($this->OaIdList) and in_array($Pmid, $this->OaIdList)) ? "\"[Open" : "") . "" . $Pub['Source'] . " " . (isset($Pub['SO']) ? $Pub['SO'] : implode("-", $Pub['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate'])) . " " . (isset($Pub['PubmedData']['ArticleIdList']['doi']) ? "[doi:" . $Pub['PubmedData']['ArticleIdList']['doi'] . "]" : "") . " [pmid:" . $Pmid . "]

\n"; // -- By score arsort($this->Scores); $ScoreTable = "
\n"; foreach ($this->Scores as $Pmid => $Score) { unset($AuList); // Highlight text $Title = $this->Publications[$Pmid]['MedlineCitation']['Article']['ArticleTitle']; $HighlightTerms = array(); if (isset($this->PostData['Searches'])) { foreach ($this->PostData['Searches'] as $Search) { $NewTerms = explode(" ", $Search['SearchString']); if (!empty($NewTerms)) $HighlightTerms = array_merge($HighlightTerms, $NewTerms); } foreach ($HighlightTerms as $Term) { $Title = str_replace($Term, "" . $Term . "", $Title); } } if (isset($this->Publications[$Pmid]['PubmedData']['ArticleIdList']['doi'])) $Doi = explode("/", $this->Publications[$Pmid]['PubmedData']['ArticleIdList']['doi']); if (!empty($this->Publications[$Pmid]['MedlineCitation']['Article']['AuthorList'])) { foreach ($this->Publications[$Pmid]['MedlineCitation']['Article']['AuthorList'] as $Short => $Full) { if (empty($Full['LastName'])) $Au = "" . $Full['CollectiveName'] . ""; else { if ($Short == $this->Author) $Au = "" . (isset($Full['ForeName']) ? $Full['ForeName'] : $Full['Initials']) . " " . (isset($Full['MiddleName']) ? $Full['MiddleName'] : '') . " " . $Full['LastName'] . ""; else $Au = "" . (isset($Full['ForeName']) ? $Full['ForeName'] : (isset($Full['Initials']) ? $Full['Initials'] : 'Anon')) . " " . (isset($Full['MiddleName']) ? $Full['MiddleName'] : '') . " " . $Full['LastName'] . ""; } $AuList[] = $Au; } $AuList = implode(", ", $AuList); } $ScoreTable .= "\n"; } $ScoreTable .= "
Publication list (order by: date | score)
Publications[$Pmid]['Classes']) . "\" style=\"border: 1px solid #ddd;\">

Score: " . round($Score, 2) . "

" . $Title . "

" . $AuList . "

" . ((!empty($this->OaIdList) and in_array($Pmid, $this->OaIdList)) ? "\"[Open" : "") . "" . $this->Publications[$Pmid]['Source'] . " " . (isset($this->Publications[$Pmid]['SO']) ? $this->Publications[$Pmid]['SO'] : implode("-", $this->Publications[$Pmid]['MedlineCitation']['Article']['Journal']['JournalIssue']['PubDate'])) . " " . (isset($this->Publications[$Pmid]['PubmedData']['ArticleIdList']['doi']) ? "Publications[$Pmid]['PubmedData']['ArticleIdList']['doi'] . "\">[doi:" . $this->Publications[$Pmid]['PubmedData']['ArticleIdList']['doi'] . "]" : "") . " [pmid:" . $Pmid . "]

\n"; } if ($this->OrderBy == "score") { $this->Html .= "
" . $ScoreTable . "
\n"; $this->Html .= "
" . $DateTable . "
\n"; } else { $this->Html .= "
" . $ScoreTable . "
\n"; $this->Html .= "
" . $DateTable . "
\n"; } // -- Counts $this->Html .= "\n"; $SearchLinks = array( "PubMed (all)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22" . $this->Author . "%22", "Open Access" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22" . $this->Author . "%22 AND (free full text[sb])", "PubMed (10yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 10 years"[PDat])", "PubMed (5yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 5 years"[PDat]", "PubMed (1yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 1 years"[PDat]", "PMC (all)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pmc&Cmd=Search&Term=%22" . $this->Author . "%22", "PMC (10yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pmc&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 10 years"[PDat]", "PMC (5yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pmc&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 5 years"[PDat]", "PMC (1yr)" => "http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pmc&Cmd=Search&Term=%22" . $this->Author . "%22 AND ("last 1 years"[PDat]", "First Author" => "javascript:highLight('FirstAu')", "Last Author" => "javascript:highLight('LastAu')", ); foreach ($this->Counts as $k => $v) { $this->Html .= ""; } $this->Html .= "
Search counts
" . ((strlen($k) > 26) ? substr($k, 0, 23) . '...' : $k) . "" . (isset($SearchLinks[$k]) ? "" . $v . "" : "" . $v . "") . "

"; // -- Languages $this->Html .= "\n"; arsort($this->Languages); $i = 0; foreach ($this->Languages as $k => $v) { $this->Html .= "\n"; $i += 1; if ($i > 20) break; } // -- Journals and publishers $this->Html .= "
Languages
" . $k . "" . $v . "

\n"; arsort($this->Journals); $i = 0; foreach ($this->Journals as $k => $v) { $this->Html .= "\n"; $i += 1; if ($i > 20) break; } Global $PublisherTranslation; $this->Html .= "
Favourite journals
" . $k . "Author . "%22 AND ("" . $k . ""[TA])\">" . $v . "

\n"; arsort($this->Dois); $i = 0; foreach ($this->Dois as $k => $v) { $this->Html .= "\n"; $i += 1; if ($i > 20) break; } // Co-authors $this->Html .= "
Favourite publishers
" . (isset($PublisherTranslation[$k]) ? $PublisherTranslation[$k] : $k) . "". $v . "

\n"; arsort($this->CoAuthors); $i = 0; foreach ($this->CoAuthors as $k => $v) { $this->Html .= "\n"; $i += 1; if ($i > 20) break; } // Years $this->Html .= "
Co-authors
" . $k . "". $v . "

\n"; $h = 0; for ($y = date('Y'); !empty($this->Years); $y--) { if (empty($this->Years[$y])) { $Years[$y] = 0; continue; } if ($this->Years[$y] > $h) $h = $this->Years[$y]; $Years[$y] = $this->Years[$y]; unset($this->Years[$y]); } $i = 0; foreach ($Years as $y => $c) { $width = (135 / $h) * $c; $this->Html .= "\n"; } $this->Html .= "
History
" . $y . "
" . (!empty($c) ? $c : " ") . "
\n"; $this->Title = $this->Author; $this->OutputHtml(); } /******************************************************************************************************************************************** * Function: OutputHtml( Reload ) * Formats the page as HTML */ function OutputHtml($Reload = false) { $Title = $this->Title; $Html = $this->Html; $Author = $this->Author; if ($Reload) $Reload = "\n"; else $Reload = ""; $NavBar = file_get_contents("NavBar.php"); $Time = round((microtime(true) - $_SESSION['began']), 2); // Calculate the time elapsed echo << $Title $Reload $NavBar

Author Profile: $Author

$Html

... time elapsed: $Time seconds.

Content from pubmed used under NLM terms of use (NLM disclaimer). Content from BioMed Central and the Open-Access padlock (PLoS) used under the terms of the Creative Commons Attribution license.

END; exit; } } ?>