ohcnetwork / care

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

Add CSV Export Support for FacilityDischargedPatientsList API #2587

Open AnveshNalimela opened 2 hours ago

AnveshNalimela commented 2 hours ago

The FacilityDischargedPatientsList API currently provides patient discharge data in Object, but it lacks support for CSV output. CSV export functionality is needed to allow users to easily download and manage patient discharge data in a widely-used spreadsheet format.

Add an option to the FacilityDischargedPatientsList API to allow data to be exported in CSV format.

Proposed Solution:

Implement a CSV export option for the FacilityDischargedPatientsList API. Add a query parameter (e.g., ?format=csv) to specify CSV output. Modify the API route handler to check for the format=csv parameter. If format=csv is specified, generate and return a CSV response containing the list of discharged patients, including relevant headers and fields. Ensure compatibility with the current API response structure for easy integration.

AnveshNalimela commented 2 hours ago

@rithviknishad @gigincg Assign these issue to me. I will would like on these issue