-
Notifications
You must be signed in to change notification settings - Fork 0
[ADE-66] fixes and improvements for processing a file #109
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
Conversation
…nd update report model to use errorMessage instead of debugMessage. Enhance report processing logic to ensure accurate status updates and error handling.
…gic to include isMedicalReport flag. Update ProcessingPage and ProcessingError components for improved error handling and user feedback. Introduce new ProcessingMedicalReport component for non-medical report scenarios. Ensure all user-facing text is internationalized.
…nsure all user-facing text was previously internationalized.
…management using setError function. Ensure all user-facing text is internationalized.
…m thrown Error. Simplify error state management by using a default failed message in setError. Ensure all user-facing text is internationalized.
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.
Pull Request Overview
This pull request improves the file processing flow by enhancing error handling, updating the report model, and introducing support for distinguishing non-medical reports. Key changes include replacement of the debugMessage with an errorMessage, addition of the isMedicalReport flag in the backend and frontend models, and UI updates in the ProcessingPage component along with a new ProcessingMedicalReport component.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/pages/Processing/components/ProcessingError.tsx | Added a dynamic errorHeading prop to provide contextual error messages. |
| frontend/src/pages/Processing/ProcessingPage.tsx | Updated state management and error handling to distinguish errors for medical vs non-medical reports. |
| frontend/src/common/models/medicalReport.ts | Updated the model to include errorMessage and isMedicalReport while deprecating debugMessage. |
| backend/src/reports/models/report.model.ts | Replaced debugMessage with errorMessage and added the isMedicalReport flag. |
Change
This pull request introduces enhancements to the report processing system, focusing on improved error handling, better differentiation of medical reports, and frontend updates to display more detailed error states. The changes span both the backend and frontend codebases.
Backend Changes:
isMedicalReportproperty to theReportmodel to indicate whether a report is a medical report.debugMessageproperty witherrorMessagein theReportmodel to better reflect its purpose.Frontend Changes:
Model Updates:
MedicalReportinterface to include the newisMedicalReportanderrorMessageproperties, while removing the deprecateddebugMessageproperty.Error Handling Improvements:
setErrorfunction in theProcessingPagecomponent to manage error states, including anerrorHeadingfor more descriptive error messages.checkReportStatusfunction to handle specific error cases, such as non-medical reports and failed processing, with tailored error messages.UI Enhancements:
ProcessingErrorcomponent to display both anerrorHeadinganderrorMessage, providing clearer context for errors. [1] [2]ProcessingPagecomponent to conditionally render theProcessingErrorcomponent only when botherrorHeadingandprocessingErrorare present.Does this PR introduce a breaking change?
{...}
What needs to be documented once your changes are merged?
{...}
Additional Comments
{...}