-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patient Status CSV Report #1265
Conversation
…nt in the rejection controller and a function at the frontend to call that point
can you run |
Hello @mozzy11 |
Thanks @pascagihozo . |
PatientStatusReport (6).csv Hello @mozzy11 Please find the file generated and video capture of the Console &Network above Thank you! |
@@ -108,6 +108,23 @@ public ModelAndView showRejectionForm(HttpServletRequest request, @Validated Rej | |||
return findForward(FWD_SUCCESS, form); | |||
} | |||
|
|||
@RequestMapping(value = "/patientStatus", method = RequestMethod.GET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont need a new endpoint for handling the report.
we already have this endpoint used by every report
@@ -61,6 +62,46 @@ function PatientStatusReport(props) { | |||
}); | |||
}; | |||
|
|||
// function to handle csv report start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may not be needed . we only need to change the report type param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you just need add a link in the report menu in this component
ie
{
title: <FormattedMessage id="sidenav.title.statusreport.csv" />,
icon: IbmWatsonDiscovery,
SideNavMenuItem: [
{
link: "/RoutineReport?type=patient&report=CSVPatientStatusReport",
label: <FormattedMessage id="sidenav.label.statusreport.csv" />,
},
],
},
then add report component here
ie
{type === "patient" && report === "CSVPatientStatusReport" && (
<PatientStatusReport
report={"CSVPatientStatusReport"}
id={"openreports.patientTestStatus.csv"}
/>
)}
<br /> | ||
<br /> | ||
</Column> | ||
<Column lg={16} md={8} sm={4}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also get rid of this button. the existing button should be enough
@@ -143,6 +143,8 @@ public static IReportParameterSetter getParameterSetter(String report) { | |||
return new CovidResultsReport(); | |||
} else if (report.equals("statisticsReport")) { | |||
return new StatisticsReport(); | |||
} else if (report.equals("patientReport")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use a consistent report param here ie CSVPatientStatusReport
@@ -62,6 +62,10 @@ | |||
* @since Mar 18, 2011 | |||
*/ | |||
public abstract class CSVColumnBuilder { | |||
// | |||
// public abstract String[] getHeaders(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove unused comented code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pascagihozo for attempting to work on this report.
In general you can get rid of the new endpoint you created ie /patientStatus
and use the existing endpoint /reportPrint
. And also see other comments.
Pull Requests Requirements
Issue number if applicable.
documentation.
Summary
This PR is to introduce the CSV downloading functionality in OpenElis at Patient Status Report which was initially generating information in pdf but the users would like to have information in CSV as well to facilitate them in making statistical decisions. New class CSVPatientStatusReport and CSVPatientStatusReportColumn builder were created which copies the same mechanisms as CSVSampleRejectionReport and its column builder. The feature is patially working on my side i.e the endpoint is tested to be working( status 200) and the issue is that instead of receiving the CSV of patient data we are receiving html content in CSV file. Additionally the CSV Patient Status Report was not modified to have the sql querires that picks the data that is specific to the Patient Status Report so further help on writing SQL queries is beneficial as well. Please review the PR and help out @adityadeshlahre @mozzy11 @caseyi
Screenshots
Screencast.from.2024-09-16.22-19-47.webm
Related Issue
[Add a link to the related issue or mention it here if applicable]
Other
[Add any additional information or notes here]