.
The Open Protein Structure Annotation Network
PDB Keyword
.

ESummary

    Table of contents
    No headers
    /***
    	Copyright 2009 - MindTouch
    
    	USAGE:
    
    	PubMedESummary(pmid : str)
    	Retrieve summaries for publications and articles using PubMed eSummary service.
    
    	PARAMETERS:
    
    	pmid : str
    	PubMed IDs for publications/articles to retrieve, separated by commas.
    
    	format : str
    	(optional, one of "reference", "brief", "user"; default: "reference") display format for result
    	
    	style: str
    	(optional, "single" or "list", default: "list")
    
    
    ***/
    
    // read parameter
    var pmid = $0 ?? $pmid;
    var format = $1 ?? $format;
    var style = $2 ?? $style;
    
    // retrieve results from PubMed
    var esummary = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&retmode=xml&tool=topsan';
    var result = web.xml(esummary & { id: pmid });
    
    // print all found summaries
    var docs = result['DocSum'];
    
    // take display if specified
    let style = style ?? "list";
    if (format == "user") {
    	// special case for user pages
    	let style = "single";
    }
    
    if (#docs > 0) {
    	switch(style) {
    	case "single": 
    
    	    // only one summary found
    	    template('PubMed/Reference', [docs, format]);
    	default: 
    
    	    // iterate over all found summaries and alternate the background color
    	    <ol>
    		foreach(var doc in docs) {
    		    <li class=('row-' .. (__count % 2) .. ' pubmeditem')> template('PubMed/Reference', [doc, format]) </li>
    		}
    	    </ol>
    	}
    } else {
    
        // no summary found 
        <em> '(No Results)'; </em>;
    }
    

     

    Reviews

    References

     

    No references found.

    Tag page
    • No tags

    Files (0)

     
    You must login to post a comment.
    All content on this site is licensed under a Creative Commons Attribution 3.0 License
    Powered by MindTouch