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.
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.