Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Abstract is not downloading the information on method and Results #10

Closed
muralidhar972 opened this issue Jan 17, 2019 · 10 comments
Closed

Comments

@muralidhar972
Copy link

muralidhar972 commented Jan 17, 2019

Hi,

Thank you for creating the library, it is very helpful.
Have checked with downloaded data, it gives only the Back Ground or objective or whichever come first in Abstract. Is any possibility to get the entire Abstract(Back Ground, Objective, Methods, Results, Conclusion, Conclusion) as displayed when we search in the website.

happy to help you, if I can do something.

@gijswobben
Copy link
Owner

Hi,
Thanks for using PyMed! Actually, the library doesn't do any filtering on the abstract field. It extracts everything that is marked "abstract" from the PubMed API. Do you have a more specific example?

@muralidhar972
Copy link
Author

Hi,

Thank you for responding, below is the example which you have asked for.

PubMed article id: 30508283

Date 2018-12-07 00:00:00 |
Title: opioid analgesic use and patient-reported pain outcomes after rhinologic surgery. |
Keywords: analgesic", "chronic rhinosinusitis", "endoscopic sinus surgery", "opioid", "pain", "septoplasty
Abstract: opioid-based analgesics are routinely prescribed after elective rhinologic surgery. balancing appropriate pain management while avoiding overprescription necessitates an evidence-based approach.

In the above example, we are able to extract only the Background.
when I checked for above id in PubMed, it showed me all background, Methods, Results, and Conclusion
below is the image for your reference.
pubmed

Please feel free to connect with me @muralidhar972 .
If required we can have a call.

Thank you,
Muralidhar

@gijswobben
Copy link
Owner

Hi Muralidhar,
I think I've found the issue and I've just merge the new code. Could you try again?
Gijs

@muralidhar972
Copy link
Author

muralidhar972 commented Feb 4, 2019

Hi Gijs,

Thank you for updating the package.
Have checked for above example no change in results.
Below is the process flowed and Please correct me, if there is any mistake in the process.
initially, have uninstalled and reinstalled the package.
Thereafter, have run the query.

Below is the results for your reference.

Article id:30508283 |
Dare 2018-12-07 |
Title: Opioid analgesic use and patient-reported pain outcomes after rhinologic surgery.
Keywords: analgesic", "chronic rhinosinusitis", "endoscopic sinus surgery", "opioid", "pain", "septoplasty
Abstract:
Opioid-based analgesics are routinely prescribed after elective rhinologic surgery. Balancing appropriate pain management while avoiding overprescription necessitates an evidence-based approach.

Please feel free to contact me muralidhar972@gmail.com.

Thank you,
Muralidhar.

@gijswobben
Copy link
Owner

Hi Muralidhar,

I just ran the following code on a clean install, and it seems to work just fine...:

from pymed import PubMed


# Create a PubMed object that GraphQL can use to query
# Note that the parameters are not required but kindly requested by PubMed Central
# https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
pubmed = PubMed(tool="MyTool", email="my@email.address")

# Retrieve specific article IDs
articles = pubmed._getArticles(article_ids=[30508283])

# Show the article
for article in articles:
    print(f"Article ID: {article.article_id}")
    print(f"Title: {article.title}")
    print(f"Keywords: {', '.join(article.keywords)}")
    print(f"Abstract: {article.abstract}")

Output:

Article ID: 30508283
Title: Opioid analgesic use and patient-reported pain outcomes after rhinologic surgery.
Keywords: analgesic, chronic rhinosinusitis, endoscopic sinus surgery, opioid, pain, septoplasty
Abstract: Opioid-based analgesics are routinely prescribed after elective rhinologic surgery. Balancing appropriate pain management while avoiding overprescription necessitates an evidence-based approach.
Patients undergoing elective rhinologic surgery, including endoscopic sinus surgery (ESS), septoplasty, or ESS with septoplasty, were prospectively enrolled. Patients completed demographic and psychometric questionnaires assessing attitudes toward pain, baseline anxiety, and depression before surgery. Postoperatively, patients documented peak pain levels (0-100 visual analog scale) and daily prescription and nonprescription medication requirements over a 2-week period.
Of the 42 patients enrolled, 15 underwent ESS, 14 septoplasty, and 13 ESS with septoplasty. Five patients (11.9%) reported a history of chronic pain before surgery. Patients were given a median of 30 opioid pain pills after surgery: acetaminophen with codeine 325/30 mg (10 patients) or oxycodone with acetaminophen 5/325 mg (32 patients). Patients had a median of 27 pills left over at the end of the study period. Median peak pain levels for all procedures were 22 (range, 0-94) on day 0, 26.5 (range, 0-86) on day 1, 8.5 (range, 0-85) on day 3, and 3 (range, 0-52) on day 7. Median opioid requirements measured in morphine milligram equivalents (MME) over those same days were 6.0, 4.1, 0, and 0, respectively.
Postoperative pain after elective rhinologic surgery appears to peak over the first 3 days and decreases rapidly afterward. Most patients require a few doses of opioid analgesics. Opioid requirements and pain levels did not vary based on surgeon, type and extent of surgery, and demographic factors. Judicious prescribing of opioid medication after rhinologic surgery represents a practical opportunity for rhinologists and otolaryngologists to reduce opioid overprescription and abuse.
[Finished in 1.4s]

Could you try reinstalling the library? (Please refer to https://stackoverflow.com/questions/19548957/can-i-force-pip-to-reinstall-the-current-version for reinstalling with pip).

@muralidhar972
Copy link
Author

muralidhar972 commented Feb 5, 2019

Hi Gijs,

Thank you for sharing the link to update, have tried with that but results are not as shown above.
Have uploaded my screenshot for your understanding. Hope this helps.
update

In the above image, right side below we can see the output.

Thank you for creating the package.
Muralidhar.

@gijswobben
Copy link
Owner

gijswobben commented Feb 6, 2019

Hi,
Could you try again? I didn't publish the changes to PyPi yet, only to this repository. Newest version is 0.8.3.

@muralidhar972
Copy link
Author

Hi Gijs,

It's working. Thank you for your support and patience.

Regards,
Muralidhar

@gijswobben
Copy link
Owner

You're welcome!

@muralidhar972
Copy link
Author

muralidhar972 commented Feb 8, 2019

Hi Gijs,

Have few ideas to enhance the package.
If you're interested, please write to muralidhar972@gmail.com.

Thanks,
Muralidhar

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants