care icon indicating copy to clipboard operation
care copied to clipboard

Explore other alternatives to generate PDF reports

Open sainak opened this issue 2 years ago • 22 comments

Project Detail

CARE is a centralized capacity management and patient management system, central to the 10BedICU Project, integrating patients, doctors, hospitals, labs, specialized treatment centers, hospital administrators, and shifting control cells. Hospitals update crucial information about their assets, providing district administration with a comprehensive view of the healthcare system via smart dashboards. CARE digitizes patient records, streamlines workflows for pandemic management, and is deployed in remote areas, enabling TeleICU services for underserved citizens. It revolutionizes healthcare management, enhancing efficiency, accessibility, and patient outcomes.

Features To Be Implemented

Context

We're exploring alternatives for generating PDF reports. Our current approach involves using a browser to render HTML pages as reports via django-hardcopy. https://github.com/coronasafe/care/blob/19b63d2f47f41d7642698e128877651c51e5d2f3/care/facility/utils/reports/discharge_summary.py#L102-L121 However, we're interested in finding a native Python package capable of generating reports, ideally with the capability to directly create PDFs from HTML/templates.

Action Items

  • [ ] Identify a native Python package for generating PDF reports
  • [ ] Add new functions to generate the reports using the new packages
  • [ ] If required change the existing report template to support the format of the packages
  • [ ] Compare the resource usage of the workers for each package
  • [ ] Get user feedback on the new report PDFs
  • [ ] Select the best alternative by comparing the feedback on PDFs and resource usage of the packages
  • [ ] Update the old methods to use the new package
  • [ ] Add test cases to validate the reports generated
  • [ ] Cleanup Dockerfiles

Learning Path

Details
Complexity Medium
Required Skills Python, Django
Mentors @nihal467 , @vigneshhari , @khavinshankar , @rithviknishad , @gigincg , @Ashesh3 , @sainak
Project Size 175 hours

Link to documentation for Product Set-Up

  1. For setting up the frontend, please refer to the readme file available at: https://github.com/coronasafe/care_fe
  2. For setting up the backend, please refer to the readme file available at: https://github.com/coronasafe/care

Acceptance Criteria

  • All the CI/CD workflows should pass.
  • Code is logically structured for long-term project sustainability.
  • Proper descriptions should be included for review purposes.
  • QA and Code Review

Milestone

  • [ ] Get to know CARE as a product and understand the workflow.
  • [ ] Understand the user-level requirements and come up with an optimal solution.
  • [ ] Implement the required PDF generations (refer above action items)
  • [ ] Optimise and improve the PDF generation
  • [ ] Review and QA

sainak avatar Jun 01 '22 18:06 sainak

@sainAk How would it be better? Chrome works fine right?

gigincg avatar Jun 25 '22 11:06 gigincg

@gigincg it's a nice to have, chrome is closed sourced, vignesh tried using chromium but that didnt work either.

sainak avatar Jun 25 '22 12:06 sainak

hello @rithviknishad @sainak I would like to take this one issue

Yash12Bansal avatar Jun 06 '23 02:06 Yash12Bansal

@gigincg it's a nice to have, chrome is closed sourced, vignesh tried using chromium but that didnt work either.

FYI Chromium is now implemented.

vigneshhari avatar Jun 12 '23 12:06 vigneshhari

I have made a pr for the firefox test case please review and accept it

Yash12Bansal avatar Jun 12 '23 15:06 Yash12Bansal

@gigincg it's a nice to have, chrome is closed sourced, vignesh tried using chromium but that didnt work either.

FYI Chromium is now implemented.

Please mention the changes that were implemented for Chromium support. I cannot find them in commits @sainak @vigneshhari

Yash12Bansal avatar Jun 14 '23 05:06 Yash12Bansal

@Yash12Bansal Please link the issue to the PR you are referring to

gigincg avatar Jun 14 '23 05:06 gigincg

https://github.com/coronasafe/care/issues/812

Yash12Bansal avatar Jun 14 '23 05:06 Yash12Bansal

Ignore this one - Fix N+1 queries in /api/v1/patient/ This is done by mistake

Yash12Bansal avatar Jun 14 '23 05:06 Yash12Bansal

@Yash12Bansal Please link the issue to the PR you are referring to

also please tell me where and what changes were made for Chromium support. I cannot find them in new commits @gigincg

Yash12Bansal avatar Jun 14 '23 05:06 Yash12Bansal

@Yash12Bansal Please link the issue to the PR you are referring to

also please tell me where and what changes were made for Chromium support. I cannot find them in new commits @gigincg

https://github.com/coronasafe/care/compare/912bd36511c95a640101363d45f5c009016020f4...a50188884326ed31e891bf03ecdaf41a8311f36b

sainak avatar Jun 14 '23 05:06 sainak

here is the link - https://github.com/coronasafe/care/pull/1368

Yash12Bansal avatar Jun 14 '23 05:06 Yash12Bansal

@sainak you might want to update this issue

rithviknishad avatar Jul 26 '23 08:07 rithviknishad

about using a package instead of a browser

rithviknishad avatar Jul 26 '23 08:07 rithviknishad

Sure will do it

sainak avatar Jul 26 '23 08:07 sainak

Hello There ! A bit of my background Myself Madhav, Student of IIT Roorkee doing major in Electronics and currently in 3rd Year. I have done an internship in a startup about prior authorisation which involved Next.js and I created a package that generated approval or denial letters based on patient details. As the project aligns a bit with my previous internship, I would like to work on this project. Can you please help me how to proceed Thanks

@sainak

FireNdIce3 avatar Feb 21 '24 21:02 FireNdIce3

Hey everyone,

Thank you for showing interest in the projects. I would like to inform you that we have scheduled EOD calls on Zoom from Monday to Saturday at 7:30 PM to discuss your work and address any doubts with the core team. Alternatively, feel free to use our #care_general Slack channel.

The meeting links will be shared in our #reminder channel in our Slack workspace.

Link to join the Slack: Slack Workspace

Meanwhile, please explore the care platform and familiarize yourself with its features. Feel free to play around with it and assign any open issues as you see fit.

nihal467 avatar Feb 22 '24 05:02 nihal467

Hello community, I am Sujal Gupta, A Sophomore at IIT Hyderabad in Electrical Engineering. I came across this project idea while going through the organizations. I have previously worked with Django and Python and would love to be able to contribute and learn something new from this opportunity. Please guide me on how to get started

gupta-sujal avatar Feb 24 '24 17:02 gupta-sujal

Hello everyone,

I'm excited to be part of this discussion on exploring alternatives for generating PDF reports. With my experience in Python development, particularly within the Django framework, I'm confident in my ability to research and implement efficient solutions to meet our project's needs.

Having reviewed our current approach, which involves using a browser to render HTML pages as reports via django-hardcopy, I understand the desire to find a more native Python package for generating reports. I'm eager to contribute my skills to this endeavor and help identify the best-suited solution for our requirements.

I am well-versed in utilizing Python libraries such as WeasyPrint, ReportLab, PDFKit, PyFPDF, and xhtml2pdf, all of which offer capabilities to directly create PDFs from HTML/templates. Whether it's exploring the simplicity of PDFKit or the robust features of ReportLab, I am prepared to thoroughly evaluate and implement the most suitable option for our project.I look forward to collaborating with the team to ensure a seamless transition to our chosen solution and contribute to the success of our PDF report generation efforts.

Best regards, Pranav

PlanetDestroyyer avatar Feb 25 '24 19:02 PlanetDestroyyer

Hello everyone,

I'm excited to be part of this discussion on exploring alternatives for generating PDF reports. With my experience in Python development, particularly within the Django framework, I'm confident in my ability to research and implement efficient solutions to meet our project's needs.

Having reviewed our current approach, which involves using a browser to render HTML pages as reports via django-hardcopy, I understand the desire to find a more native Python package for generating reports. I'm eager to contribute my skills to this endeavor and help identify the best-suited solution for our requirements.

I am well-versed in utilizing Python libraries such as WeasyPrint, ReportLab, PDFKit, PyFPDF, and xhtml2pdf, all of which offer capabilities to directly create PDFs from HTML/templates. Whether it's exploring the simplicity of PDFKit or the robust features of ReportLab, I am prepared to thoroughly evaluate and implement the most suitable option for our project.I look forward to collaborating with the team to ensure a seamless transition to our chosen solution and contribute to the success of our PDF report generation efforts.

Best regards, Pranav

PlanetDestroyyer avatar Feb 25 '24 19:02 PlanetDestroyyer

hello everyone ! I, Ayush Gupta, a B.Tech student in Computer Science from India, with 3 years in mobile/web dev and 1 year in data science/ML, am keen to contribute to your GSoC 2024 project, "Explore other alternatives to generate PDF reports." I'm prepared to delve into relevant documentation and prerequisites for optimal project execution.

Regards, Ayush

AyushGupta11442 avatar Feb 28 '24 14:02 AyushGupta11442

Hello,

I'm Aditya Suthar, a third-year Computer Science student at Engineering College Bikaner. I'm eager to contribute to your project through the Google Summer of Code program. With experience in Python and Django, I'm keen to apply my skills to this issue.

adityasuthar avatar Mar 20 '24 13:03 adityasuthar