Permalink
Browse files

test

  • Loading branch information...
2 parents baa7c25 + 250abde commit 40f0c352dd78ead878824901cc9b136bbbf109b9 @parnaudo committed Mar 28, 2012
Showing with 15 additions and 4 deletions.
  1. +2 −0 lib/config.php
  2. +10 −1 ms/get-article-count.php
  3. +3 −3 pubmed-biblio-retrieval.php
View
@@ -2,7 +2,9 @@
$CFG->dbname = "zephyr";
$CFG->dbuser = "root";
+
$CFG->dbpass = 'rubberbabybuggybumpers';
+
$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
mysql_connect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass) or die(mysql_error());
View
@@ -16,13 +16,18 @@
//query to get doctor set, can really be from anywhere, I'm pulling from a temporary doctor table that has first, last and middle
+
$queryDoctors = "SELECT * FROM `neurologist`";
+
$result = mysql_query($queryDoctors) or die(mysql_error());
while($row=mysql_fetch_array($result)){
$query='';
$count=0;
- $query = "(".$row['firstName']." ".$row['lastName']. "[Full Author Name])"; //your query term, searches for both middle name and middle initial
+ $middle=substr($row['middleName'],0,1);
+
+ $query = "(".$row['firstName']." ".$row['middleName']." ".$row['lastName']. "[Full Author Name] OR ".$row['firstName']." ".$middle." ".$row['lastName']."[FULL AUTHOR NAME])"; //your query term, searches for both middle name and middle initial
+
print "<br>Searching for: $query\n";
$params = array(
@@ -43,7 +48,11 @@
//Retrieve the pubmed UIDs to then retrieve summaries for
$xml = simplexml_load_file($url);
$count= (int) $xml->Count;
+
+=======
+ // echo $row['firstName']." ".$row['lastName']. " papers written: ". $count."<BR>";
+>>>>>>> 250abde176ac6f44b71969ba987c8ec5e20b00eb
// echo $xml ->Count;
$updateQuery="UPDATE neurologist SET paperCount=".$count." WHERE id=".$row['id'];
mysql_query($updateQuery);
@@ -16,7 +16,7 @@
//query to get doctor set, can really be from anywhere, I'm pulling from a temporary doctor table that has first, last and middle
-$queryDoctors = "SELECT atomId, firstName,middleName, lastName from tempdoc where lastName!='' AND (specialty like '%CD%' OR specialty LIKE '%cardio%')";
+$queryDoctors = "SELECT atomId, firstName,middleName, lastName from tempdoc where atomId=365390";
$result = mysql_query($queryDoctors) or die(mysql_error());
while($row=mysql_fetch_array($result)){
@@ -40,7 +40,7 @@
$url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?' . http_build_query($params);
-
+
//Retrieve the pubmed UIDs to then retrieve summaries for
$xml = simplexml_load_file($url);
@@ -59,7 +59,7 @@
'id' => $uid,
);
$bibliourl= "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?". http_build_query($sumParams,'','&');
-
+ echo $bibliourl;
$bibliourl=str_replace('%5B0%5D','',$bibliourl);
$biblioxml = simplexml_load_file($bibliourl);
foreach( $biblioxml->children() as $docsum){

0 comments on commit 40f0c35

Please sign in to comment.