bemade-addons/bemade_sports_clinic/TODO.md
Denis Durepos fae0d98637 Fix treatment professional portal access and group assignment
- Add patient address management in portal UI for therapists/coaches
- Fix treatment professional selection dropdown in injury detail forms
- Implement automatic group assignment when portal access is granted
- Add create() and write() overrides in res.users to detect portal access
- Expand treatment professional roles to include doctors
- Add comprehensive debugging for portal access workflow
- Update portal UI buttons to use Odoo company colors
- Add ACLs for snailmail.letter and res.users access for portal groups

Resolves issues with treatment professionals not appearing in portal
dropdowns after being granted portal access. Now works for all roles:
doctors, therapists, and head therapists.
2025-07-27 20:20:23 -04:00

5.8 KiB

Sports Clinic Module - TODO List

High Priority

Player Management

  • Review permission checks in patient.remove_from_team()
    • Ensure proper access controls are in place for player removal
    • Consider adding more granular permissions for different user roles
    • Refactored to use cron jobs for permission-sensitive operations
    • Fixed test cases for player removal workflow

Injury Tracking

  • Add parental consent field to injuries

    • Verified existing field: parental_consent = fields.Selection([('yes', 'Yes'), ('no', 'No'), ('na', 'Not Applicable')])
    • Confirmed French Canadian (fr_CA) translations are in place for all UI elements
    • Verified field is properly displayed in injury forms and lists
    • Added field to the therapist portal UI for injury creation
    • Updated portal controller to handle the parental consent field
  • Fix configuration issues

    • Fix injury update chatter links pointing to example.com before going live

Medium Priority

Team Staff Management

  • Review and refactor _update_treatment_professional_group
    • Refactored into smaller, more maintainable methods
    • Improved code documentation and clarity
    • Verified functionality with existing tests
    • Removed unnecessary web_responsive dependency

Testing Strategy

Email Configuration

  • Fix email configuration in tests
    • test_treatment_prof_can_remove_player_from_team is currently disabled due to email configuration issues
    • Need to properly configure test environment to handle email sending
    • Consider using mail.trap or similar for test emails
    • Re-enable test after configuration is fixed

Unit Tests

  • Player Management

    • Test player removal workflow
      • Coach-initiated removal requests
      • Treatment professional approval flow
      • Permission enforcement
      • Pending removal flag behavior
      • Archiving of players with no teams
    • Parental consent field functionality
    • Match and practice availability tracking
  • Injury Tracking

    • Enhanced notification system
    • Progress tracking and resolution monitoring
    • Internal vs external notes functionality
    • Treatment professional assignments
  • Data Protection

    • GDPR and Quebec Law 25 compliance features
    • Data anonymization functionality
    • Configurable retention periods
    • Audit logging verification
    • Manual anonymization wizard

Integration Tests

  • Portal Features

    • Field therapist portal access
    • Coach portal functionality
    • Injury reporting through portal
    • Player status updates
  • Security

    • Field-level security validations
    • Permission escalation prevention
    • Audit trail verification

End-to-End Tests

  • Complete injury workflow (report → treatment → resolution)
  • Player removal workflow
  • Data export/anonymization process

Performance Tests

  • Large dataset handling
  • Concurrent user access
  • Report generation with extensive data

Portal Requirements

Therapist Portal

Player Management

  • Player CRUD Operations
    • Add new players to the system
    • Remove players from teams
    • Update player information (name, contact details, etc.)
    • Manage player team assignments

Injury Management

  • Injury Tracking
    • Add new injuries
    • Modify existing injury details
    • Update injury status and progress
    • Add treatment notes and updates
    • Upload and manage injury-related documents

Patient Information

  • Patient Profile Management
    • Edit visible patient information
    • Update emergency contacts
    • Manage patient medical history
    • Track and update insurance information

Task Management

  • Mail Activities (To-Dos)
    • Create new activities for patients/injuries
    • Assign activities to internal users
    • Assign activities to portal users with appropriate access
    • Track activity status and completion
    • Set due dates and priorities
    • Add activity notes and updates

Data Privacy & Compliance

Data Retention & Anonymization

  • Implement scheduled data anonymization
    • Create a scheduled action to automatically anonymize personal data after a configurable retention period
    • Add configuration settings for retention periods (default: 7 years for medical records, 2 years for non-medical data)
    • Ensure compliance with GDPR and Quebec's Law 25 (Loi 25)
    • Add logging of all anonymization actions for audit purposes
    • Create a manual anonymization wizard for one-off requests
    • Add data export functionality for records before anonymization

Future Enhancements

Player Management

  • Add bulk operations for player management
  • Add more detailed player status tracking

Reporting

  • Add reports for player injuries and team health status
  • Create dashboard for treatment professionals

Back Burner (Postponed)

Injury Tracking

  • Improve injury notification system
    • Review and enhance how injury tracking notifications are sent
    • Consider adding more detailed tracking information

Notes

  • Keep this file updated as new TODOs are identified
  • Reference relevant issue numbers when available
  • Delete or check off items as they are completed

MC's notes

  • Change action button colors to Fit Crew color scheme (instead of the weird turquoise)
  • Confirm followers added correctly when therapist adds player to team
  • Remove Team from injury detail (including from model - was not there before)
  • Fix treatment professional selection in injury detail
  • Add patient address add/edit to coach/therapist portal