CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
73 stars 40 forks source link

Restructure the fileUrl on the backend with query params #8281

Open etanb opened 1 year ago

etanb commented 1 year ago

Is your feature request related to a problem? Please describe. Currently when we get file data from Senders, the data about the data (metadata!) is surfaced via the url. For example:

http://azurite:10000/devstoreaccount1/reports/batch%2Fignore.HL7_NULL%2Ftx-covid-19-4b3c73df-83b1-48f9-a5a2-ce0c38662f7c-20230203182255.internal.csv

That long file name includes the file name, file type, file location and more. All split on %2 in the URL. This not good web URL structuring for a front-end to parse.

Describe the solution you'd like The backend API should be reformatting this data and being using query parameters to clearly demarcate the data, ie:

http://azurite:10000/devstoreaccount1/reports?fileLocation=batch&type=HL7_NULL&name=tx-covid-19-4b3c73df-83b1-48f9-a5a2-ce0c38662f7c-20230203182255.internal.csv

Or something similar. The backend should also handle null cases, not the front end.

etanb commented 1 year ago

Potentially we could add this data to the Message Receivers object response from the backend. For reference: https://github.com/CDCgov/prime-reportstream/blob/master/prime-router/src/main/kotlin/azure/MessagesFunctions.kt#L253-L262

etanb commented 1 year ago

Potentially we could add this data to the Message Receivers object response from the backend. For reference: https://github.com/CDCgov/prime-reportstream/blob/master/prime-router/src/main/kotlin/azure/MessagesFunctions.kt#L253-L262