Roadmap
This components has a lot of technical debt and suffers from maintenability issues since every form logic is built in two classes:
- https://github.com/pairteam/arc-api/blob/main/app/models/form.rb
- https://github.com/pairteam/arc-api/blob/main/app/models/generated_form_result.rb
Rework to explore
Forms::FormReporter
Base class to all form reporters e.g SimpleFormReporter, PHQ9FormReporter, etc
GeneratedFormResults
1st Cleanup
- remove unused fields
2nd Cleanup
- form STI for templates and results generation
3rd Cleanup
- remove GeneratedFormResult and add S3File FK to form table. Extract reporting logic to FormReporters