PubMed / MedLine

Artigos Completos



TRUE ); xml22_setup($options); $bd = (isset($_GET[bd]) ? $_GET[bd] : $_POST[bd]); $submit = (isset($_GET[submit]) ? $_GET[submit] : $_POST[submit]); $eword = (isset($_GET[eword]) ? $_GET[eword] : $_POST[eword]); $spellcheck = (isset($_GET[spellcheck]) ? $_GET[spellcheck] : $_POST[spellcheck]); $retstart = (isset($_GET[retstart]) ? $_GET[retstart] : (isset($_POST[retstart]) ? $_POST[retstart] : 0) ); $portugues = (isset($_GET[portugues]) ? $_GET[portugues] : $_POST[portugues]); $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,$retstart) { #-------------------------------------------------------------- # die sachen aus dem ergebnis rausfischen , die mich interessieren und in einem neuen array abspeichern echo <<<_EOF_ _EOF_; $contador= $retstart + 1; echo "\n"; echo "\n"; foreach($res as $ind => $val){ $pmcid=$val["pmcid"]; $pid=$val["PmId"]; $xTitle = "".$val["Title"].""; $xauthor = $val["Author"]; $val["Title"] = str_replace("\"","\\\"",$val["Title"]); $val["Title"] = str_replace("'","",$val["Title"]); $val["Author"] = str_replace("'","",$val["Author"]); ###### $pmclinks = $val["Links"]; $pmclinks_array = explode("|", $pmclinks); $pmc_i=0; $pmc_i2=1; $pmc_href=""; while($pmclinks_array[$pmc_i]) { $pmc_href=$pmc_href." $pmclinks_array[$pmc_i]  "; $pmc_i = $pmc_i + 2; $pmc_i2 = $pmc_i2 + 2; } if(is_integer($contador/2)) { $parimpar = "rowA"; } else { $parimpar = "rowB"; } ?>
Autores: $xauthor
"; printf("\tRevista: %s. %s; %s%s: %s\n", $val["Journal"],$val["PubDate"],$val["Volume"],empty($val["Issue"])?"":"(".$val["Issue"].")",$val["Pagination"]); printf("\tId: %s. PubMed Id: %s.\n", $pmcid, $pid); echo "
"; ?>
\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 = "pmc.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_pmc.php"); if ($submit==y) { if( ($eword=="")) { 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 { ?> 'pmc', 'retmode' => 'xml', 'retmax' => '15', 'retstart' => $retstart, 'usehistory' => 'y', 'term' => $query, ); $xml = simplexml_load_file('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?' . http_build_query($params)); $array_xml = simplexml2array($xml); foreach($array_xml[IdList][Id] AS $key => $ids) { if($idsjuntos=="") { $idsjuntos = $ids; } else { $idsjuntos = $idsjuntos.",".$ids; } } $params = array( 'db' => 'pmc', '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("PmId","Author","Title","Journal","Volume","Issue","Pagination","PubDate","Links"); 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]["pmcid"]=$doc[$val2]["content"]; } if($doc[$val2]["tag"]=="Item"){ foreach($auflistung as $aufind => $aufval){ if($doc[$val2]["attributes"]["Name"]==$aufval){ $res[$i][$aufval]=$doc[$val2]["content"]; }}}} $i++; }}}} echo "

Pesquisa de Publicações e Artigos Médicos Completos


"; navega_paginas($eword,$total,$retstart,$retmax); #include("anuncios/adsense_pubmed.php"); output_res($eword,$res,$abs,$retstart); #include("anuncios/adsense_pubmed.php"); navega_paginas($eword,$total,$retstart,$retmax); ?>
Pesquisa de Publicações e Artigos Médicos Completos
"; 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"); } ?>