ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
204 stars 376 forks source link

File Upload enhancement- multi-file support #7417

Open aparnacoronasafe opened 6 months ago

aparnacoronasafe commented 6 months ago

Is your feature request related to a problem? Please describe. Today file upload is used to upload relevant documents for the patient encounter, such as lab tests, scan reports, consent forms etc. Many of such documents would consist of more than 1 page.

Currently, nurses are uploading each page as a separate file upload. like Blood test of 15/03/24 (page 1), Blood test of 15/03/24 (page 2) and so on.

This is not ideal for maintaining records, since continuity of the pages may be lost.

The users are not tech savvy enough or don't usually have the time to merge these different images into one PDF and upload (although that would have been the ideal thing to do)

Describe the solution you'd like Allow multiple files to be added within 1 file upload.

@gigincg

saloni0419 commented 6 months ago

@aparnacoronasafe can you please assign this issue to me

itxsoumya commented 6 months ago

@aparnacoronasafe I would like to take this issue.

First of all we have to create an option to upload multiple files in single click. For this we have to take all selected files and have to merge them together to a single PDF file and then upload that file to the server.

I already have worked with file upload functionality in care_fe and I think this would also be a great issue to solve. 🙌

hrit2773 commented 6 months ago

@aparnacoronasafe plz assign me this issue and tell me the credentials and under which section the issue is ?

Thanush19 commented 6 months ago

hey @aparnacoronasafe , i wish to work on this....

gigincg commented 6 months ago

Implementation Details:

What is required is a Scan and Upload Document Feature. We need to allow users to Scan multiple Images of a Document; Build a PDF out of it & Upload it as a single file.

Any packages that are required to enable this feature should be lazy loaded only when the Scan Document Feature is used.

Ref:

Recommended Package: https://www.npmjs.com/package/jspdf

For using Rendering the Images in the PDF: https://stackoverflow.com/questions/19065562/add-image-in-pdf-using-jspdf

NB: Feel free to suggest alternative implementations in this discussion thread if you have a better approach

gigincg commented 6 months ago

@itxsoumya Your suggested solution seems inline with the required Implementation detail. Assigned the Issue to you. Please acknowledge here.

cc: @nihal467

itxsoumya commented 6 months ago

@gigincg you have mentioned 'scan the documents and then merge them together '.

Does the scan refer to scanning the document using the camera or selecting the documents from the file manager?

rithviknishad commented 6 months ago

How about having both options?

cc: @gigincg

gigincg commented 6 months ago

Selecting Images or Taking snapshots

@itxsoumya @rithviknishad

itxsoumya commented 6 months ago

@gigincg selecting images would be a little easier than taking snapshots and then processing

github-actions[bot] commented 5 months ago

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity.

UdaySagar-Git commented 5 months ago

@itxsoumya Are you still working on this issue? If not, I would like to take it up.

itxsoumya commented 5 months ago

@UdaySagar-Git Yup I am working

itxsoumya commented 5 months ago

@gigincg @rithviknishad need feedback Screencast from 08-04-24 05:04:22 AM IST.webm

rithviknishad commented 5 months ago

LGTM!