-
Notifications
You must be signed in to change notification settings - Fork 0
Search Pubmed Database
Shashank Khanna edited this page Aug 31, 2016
·
1 revision
#Search Pubmed Database while writing the article Using the search bar loads the list of all matching articles from pubmed’s database. This is displayed right next to the editor. Clicking on the particular article would load the summary of the article.
##Technical Implementation ###Editor.ejs:
- Inside the div, main content, there is a div content panel that controls the panel that handles the pubmed database
- Upon submitting the form (element which controls the search), the simpleAndSearch function is run in pubmed.js (as explained in the comments above the function.)
- The search results are then returned to the html page through the javascript which will then append it to the div ‘pubmed_results’ inside the class ‘results_container’.
###Pubmed.js:
- simpleAndSearch, is passed a true parameter, and that takes the value in the div named ‘search_bar’ and passes that to the function searchPubmed
- searchPubmed in turn causes an ajax call to nih’s api, upon returning from that call, we get some ids, and then another function fetchResults is run in order to get the summary from those ids (that function also performs and ajax call and is passed the ids of the previous call that was returned. searchPubMed essentially receives a term that is used to query nih in the form: esearch.fcgi?db=&term= url example: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science[journal]+AND+breast+cancer+AND+2008[pdat]
- Fetchresults essentially receives an object containing functions, response.esearchresults, tells us what search results were passed to fetch results, in order to get the summary an ajax call needs to be performed to the following url; For example: https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&id=6678417,9507199,28558982,28558984,28558988,28558990 a call like this is done in the fetchResults function
- Upon receiving a summary response, the parse results function uses the docSum property to get all the nodes corresponding to the individual ids.
- Display results function is then called which properly formats the way the nodes are displayed
- Home
- [Getting Started] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Getting-Started)
- [How to Contribute] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Contributing--(for-Developers))
- Feature Documentation
- [Edit in WYSIWYG] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Edit-in-WYSIWYG)
- [Search Pubmed] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Search-Pubmed-Database)
- Save Documents
- [Import from Wikipedia] (https://github.com/UCLA-BD2K/GeneWiki/wiki/Import-From-Wikipedia)
- Convert to Wiki Markdown