Skip to content

Conversation

@ndg63276
Copy link
Collaborator

@ndg63276 ndg63276 commented Dec 10, 2025

JIRA ticket: LIMS-1987

Summary:

Adds the ability to download the Data Collection Summary page as a CSV file.

Changes:

  • Move the setDispositionAttachment and setDispositionInline functions to the Utils.php file
  • Add a button to the summary page, linking to the same API page but with /csv/1 to get a CSV file
  • Get the current query parameters and attach it to the button so that the CSV matches what is on screen, apart from putting it all on one page
  • Allow the sign handling to work with existing URL parameters
  • Slightly change the order of columns in the DB query, so they match up better with the GUI display
  • Generate a CSV file with automatic headings

To test:

  • Go to any visit with data and click the "Summary" button to go to eg /dc/summary/visit/cm40607-5
  • Check a button appears on the right with "Download CSV", and that when clicked it downloads a CSV of all the data processing runs shown (1 per data collection)
  • Check all pages are in the CSV, not just the current page
  • Edit some of the parameters at the top of the page, re-download the CSV, check it matches the parameters chosen
  • Check if you go to /visits, you can still download a CSV of the visit (should be unchanged)

@ndg63276 ndg63276 marked this pull request as draft December 10, 2025 16:24
@ndg63276 ndg63276 marked this pull request as ready for review December 10, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants