PubMed / MedLine

Artigos Completos



TRUE ); xml22_setup($options); $eword = rtrim($eword); $eword = urlencode($eword); $eword_simples = $eword; $epalavra = urldecode($eword); $epalavra_html = urldecode($eword); $datahoje = getdate(); $retmax=15; function mostrar_citacoes() { } function output_res($eword,$res,$abs,$elinks,$retstart,$bd) { #-------------------------------------------------------------- # die sachen aus dem ergebnis rausfischen , die mich interessieren und in einem neuen array abspeichern $contador= $retstart + 1; $xterm=$eword; $xterm_array = array(" " => "+","'" => "%27","[" => "%5B","]" => "%5D",); $xterm = strtr($xterm, $xterm_array); echo "\n"; foreach($res as $ind => $val){ #itens do elinks ################# $primeiro=false; $provedoresdeartigos = ""; $comprarartigo = false; $resumodisponivel = false; $semlinks = ""; $primeirolink = ""; ################# ################# $xTitle = $val["Title"]; $xAuthors = $val["autores"]; $xIdiomas = $val["idiomas"]; if ($val["HasAbstract"] == 1) { $resumo="Resumo Disponível"; } else { $resumo=""; } $val["Title"] = str_replace("\"","\\\"",$val["Title"]); $val["Title"] = str_replace("'","",$val["Title"]); $val["autores"] = str_replace("'","",$val["Author"]); $pid=$val["pubmedid"]; # $abstr = $abs[$pid]; # $abstr = str_replace("\"","\\\"",$abstr); # $abstr = str_replace("'","",$abstr); # $abstr = addslashes($abstr); #echo $abstr; if ($xIdiomas == "Portuguese") { $xIdiomas = "Português"; } elseif ($xIdiomas == "French") { $xIdiomas = "Francês"; } elseif ($xIdiomas == "English") { $xIdiomas = "Inglês"; } elseif ($xIdiomas == "Chinese") { $xIdiomas = "Chinês"; } elseif ($xIdiomas == "German") { $xIdiomas = "Alemão"; } elseif ($xIdiomas == "Danish") { $xIdiomas = "Dinamarquês"; } elseif ($xIdiomas == "Spanish") { $xIdiomas = "Espanhol"; } if ($contador%2==1) { $bgcolor="CCEEFF"; } else { $bgcolor="FFFFFF"; } $facebook = ""; echo "\n"; $contador++; } echo "
\n"; echo ""; echo " "; echo "\n"; ########################## if ($val["HasAbstract"] == 1) { $resumodisponivel=true; } else { $resumodisponivel=false; } /* foreach($elinks as $l_ind => $l_val) { if ($l_val[semlinks][$pid] == "true") { $semlinks = "Sem Links"; } else { $lurl = $l_val[url][$pid]; $licon = $l_val[iconurl][$pid]; $lprovedor = $l_val[NameAbbr][$pid]; if ($lprovedor) { $provedoresdeartigos .= "".$lprovedor." - "; } if (($lprovedor == "ES") OR ($lprovedor == "Ovid") OR ($lprovedor == "HighWire")) { $comprarartigo=true; } if (($lurl) AND ($licon)) { if ($primeiro!=true) { $primeirolink = ""; } $primeiro=true; } else { } } } */ ####### ####### echo ""; ####### ####### echo "
"; echo "\n"; echo "\n"; printf("\t\n",$xAuthors); printf("\t\n", $val["Source"],$val["FullJournalName"],$xIdiomas); printf("\t\n", $val["Volume"],empty($val["Issue"])?"":" Edição: ".$val["Issue"],$val["Pages"],$val["PubDate"]); printf("\t\n", $pid,$val["RecordStatus"]); echo "
$contador - $xTitle
Autores: %s
Revista: %s (%s). Idioma: %s
Volume: %s%s Páginas: %s Data: %s
PubMed ID: %s. [%s]
"; if ($resumodisponivel==true) { echo ""; } else { echo ""; } if ($semlinks) { echo ""; } else { echo ""; } if ($comprarartigo==true) { echo ""; } else { echo ""; } #echo ""; echo "
 Ler ResumoResumo não Disponível ".$primeirolink."  $provedoresdeartigos
\n"; } function navega_paginas($eword,$total,$retstart,$retmax) { if(($total > $retmax)) { print(""); if(($retstart >= $retmax)) { $ante_inicio = $retstart - $retmax; print(""); } else{ print(""); } ########MEIO DA TABELA ############### $retinicio = $retstart + 1; $retlast= $retstart + $retmax; if ($retlast > $total){ $retlast=$total; } echo "\n"; ########FIM DO MEIO DA TABELA ############### echo "
Mostrando $retinicio-$retlast de $total artigos
\n"; $totalpaginas = ceil($total / $retmax); // Retorna o total de páginas $pagina_atual = ceil($retlast / $retmax); if($totalpaginas>10) { if($pagina_atual>11) { $pinicial = $pagina_atual - 11; } else { $pinicial=0; } $paginas = $pagina_atual + 9; } else { $paginas = $totalpaginas; } #Gera links com o número de cada página for($i=$pinicial;$i<$paginas;$i++) { // Gera um loop com o link para as páginas $p = $i + 1; if ($p==$paginas AND $paginas==1){ }else{ if ($p==$pagina_atual){ $retstartlist = $i*$retmax; echo " $p  "; }else{ $retstartlist = $i*$retmax; $url = "index.php?submit=y&eword=$eword&retstart=$retstartlist"; echo "$p  "; } } } echo"
"; $prox_inicio = $retstart + $retmax; if(($prox_inicio <= $total)) { print(""); } echo"
"; } }#Fim da Funcao navega_paginas function fetch_elinks_of_id($ids,$retmax,$total,$bd) { $xbd="${bd}"; # Wenn ich die IDs nun habe, dann kann ich mir ja auch den ganzen Eintrag holen. $auflistung=array("PmId","Author","Title","Journal","Volume","Issue","Pagination","PubDate"); $res=array(); $burl="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=pubmed&cmd=llinks&retmode=xml&id="; for($i=0; $i"; print_r($doc); echo ""; */ foreach($doc as $ind0 => $val0){ if($doc[$ind0]["tag"]=="eLinkResult"){ foreach($doc[$ind0]["children"] as $ind1 => $val1){ if($doc[$val1]["tag"]=="LinkSet"){ foreach($doc[$val1]["children"] as $ind2 => $val2){ if($doc[$val2]["tag"]=="IdUrlList"){ foreach($doc[$val2]["children"] as $ind3 => $val3){ if($doc[$val3]["tag"]=="IdUrlSet"){ $i=0; foreach($doc[$val3]["children"] as $ind4 => $val4){ if($doc[$val4]["tag"]=="ObjUrl"){ foreach($doc[$val4]["children"] as $ind5 => $val5){ if($doc[$val5]["tag"]=="Url"){ $res[$i][url][$pid]=$doc[$val5]["content"]; } if($doc[$val5]["tag"]=="IconUrl"){ $res[$i][iconurl][$pid]=$doc[$val5]["content"]; } } } $i++; }}}}}}}}} } return $res; } function xml2array($url, $get_attributes = 1, $priority = 'tag') { $contents = ""; if (!function_exists('xml_parser_create')) { return array (); } $parser = xml_parser_create(''); if (!($fp = @ fopen($url, 'rb'))) { return array (); } while (!feof($fp)) { $contents .= fread($fp, 8192); } fclose($fp); xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, trim($contents), $xml_values); xml_parser_free($parser); if (!$xml_values) return; //Hmm... $xml_array = array (); $parents = array (); $opened_tags = array (); $arr = array (); $current = & $xml_array; $repeated_tag_index = array (); foreach ($xml_values as $data) { unset ($attributes, $value); extract($data); $result = array (); $attributes_data = array (); if (isset ($value)) { if ($priority == 'tag') $result = $value; else $result['value'] = $value; } if (isset ($attributes) and $get_attributes) { foreach ($attributes as $attr => $val) { if ($priority == 'tag') $attributes_data[$attr] = $val; else $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr' } } if ($type == "open") { $parent[$level -1] = & $current; if (!is_array($current) or (!in_array($tag, array_keys($current)))) { $current[$tag] = $result; if ($attributes_data) $current[$tag . '_attr'] = $attributes_data; $repeated_tag_index[$tag . '_' . $level] = 1; $current = & $current[$tag]; } else { if (isset ($current[$tag][0])) { $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result; $repeated_tag_index[$tag . '_' . $level]++; } else { $current[$tag] = array ( $current[$tag], $result ); $repeated_tag_index[$tag . '_' . $level] = 2; if (isset ($current[$tag . '_attr'])) { $current[$tag]['0_attr'] = $current[$tag . '_attr']; unset ($current[$tag . '_attr']); } } $last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1; $current = & $current[$tag][$last_item_index]; } } elseif ($type == "complete") { if (!isset ($current[$tag])) { $current[$tag] = $result; $repeated_tag_index[$tag . '_' . $level] = 1; if ($priority == 'tag' and $attributes_data) $current[$tag . '_attr'] = $attributes_data; } else { if (isset ($current[$tag][0]) and is_array($current[$tag])) { $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result; if ($priority == 'tag' and $get_attributes and $attributes_data) { $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data; } $repeated_tag_index[$tag . '_' . $level]++; } else { $current[$tag] = array ( $current[$tag], $result ); $repeated_tag_index[$tag . '_' . $level] = 1; if ($priority == 'tag' and $get_attributes) { if (isset ($current[$tag . '_attr'])) { $current[$tag]['0_attr'] = $current[$tag . '_attr']; unset ($current[$tag . '_attr']); } if ($attributes_data) { $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data; } } $repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken } } } elseif ($type == 'close') { $current = & $parent[$level -1]; } } return ($xml_array); } function simplexml2array($xml) { if (get_class($xml) == 'SimpleXMLElement') { $attributes = $xml->attributes(); foreach($attributes as $k=>$v) { if ($v) $a[$k] = (string) $v; } $x = $xml; $xml = get_object_vars($xml); } if (is_array($xml)) { if (count($xml) == 0) return (string) $x; // for CDATA foreach($xml as $key=>$value) { $r[$key] = simplexml2array($value); } if (isset($a)) $r['@'] = $a; // Attributes return $r; } return (string) $xml; } include("bloco_menu_form_pubmed.php"); if ($submit==y) { if( ($eword=="")) { include("anuncios/adsense_pubmed.php"); echo "

Nenhuma palavra foi digitada

"; } else { if ($portugues) { $eword = "portuguese[la]+".$eword; } #$eword = urlencode($eword); $query = $eword; // for example $params = array( 'db' => 'pubmed', 'retmode' => 'xml', 'rettype' => 'count', 'term' => "$query", ); $xml = simplexml_load_file('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?' . http_build_query($params)); $array_xml = simplexml2array($xml); $total = $array_xml[Count]; if ($total == 0) { echo "

Nenhum artigo contendo - \"$epalavra\" - foi encontrado!!! $eword


"; include("anuncios/adsense_pubmed.php"); } else { ?> 'pubmed', 'retmode' => 'xml', 'retmax' => '15', 'retstart' => $retstart, 'usehistory' => 'n', 'term' => "$query", ); #http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&retmode=xml&retmax=15&retstart=0&term=portuguese[la] $xml = simplexml_load_file('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?' . http_build_query($params)); $array_xml = simplexml2array($xml); if (is_array($array_xml[IdList][Id])) { foreach($array_xml[IdList][Id] AS $key => $ids) { if($idsjuntos=="") { $idsjuntos = $ids; } else { $idsjuntos = $idsjuntos.",".$ids; } } } else { $idsjuntos = $array_xml[IdList][Id]; } $params = array( 'db' => 'pubmed', 'retmode' => 'xml', 'id' => $idsjuntos, 'retstart' => $retstart, 'retmax' => '15', ); $url = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?' . http_build_query($params); $efile=implode("",file2($url)); $doc=xml22_parse($efile, FALSE ); echo "
";
#print_r($doc);
echo "
"; $i=0; $res=array(); $auflistung=array("Id","AuthorList","LangList","HasAbstract","FullJournalName","Title","Source","Volume","Issue","Pages","PubDate","RecordStatus"); foreach($doc as $ind0 => $val0){ if($doc[$ind0]["tag"]=="eSummaryResult"){ foreach($doc[$ind0]["children"] as $ind1 => $val1){ if($doc[$val1]["tag"]=="DocSum"){ foreach($doc[$val1]["children"] as $ind2 => $val2){ if($doc[$val2]["tag"]=="Id"){ $res[$i]["pubmedid"]=$doc[$val2]["content"]; } if($doc[$val2]["tag"]=="Item"){ foreach($auflistung as $aufind => $aufval){ if($doc[$val2]["attributes"]["Name"]==$aufval) { if($aufval=="AuthorList"){ foreach($doc[$val2]["children"] as $ind3 => $val3) { if($doc[$val3]["attributes"]["Name"]=="Author") { if (!$res[$i][autores]) { $res[$i][autores]=$doc[$val3]["content"]; } else { $res[$i][autores]=$res[$i][autores].",".$doc[$val3]["content"]; } } } } elseif($aufval=="LangList"){ foreach($doc[$val2]["children"] as $ind3 => $val3) { if($doc[$val3]["attributes"]["Name"]=="Lang") { if (!$res[$i][idiomas]) { $res[$i][idiomas]=$doc[$val3]["content"]; } else { $res[$i][idiomas]=$res[$i][idiomas].",".$doc[$val3]["content"]; } } } } else { $res[$i][$aufval]=$doc[$val2]["content"]; } }}}} $i++; }}}} echo "

Pesquisa de Publicações e Artigos Médicos


"; navega_paginas($eword,$total,$retstart,$retmax); include("anuncios/adsense_pubmed.php"); output_res($eword,$res,$abs,$elinks,$retstart,$bd); include("anuncios/adsense_pubmed.php"); navega_paginas($eword,$total,$retstart,$retmax); ?>
Pesquisa de Publicações e Artigos Médicos
"; echo "

O PubMed é um serviço da Biblioteca Nacional de Medicina Americana (NLM) e provê acesso a quase 20 milhões de citações bibliográficas (MedLine) catalogadas desde meados de 1960. O conteúdo dessas citações são artigos médicos publicados nas mais variadas revistas de diversas especialidades.

"; include("anuncios/adsense_pubmed.php"); #include("../blocos/bloco-revistas_semborda.php"); } ?>