# CRM Development Tasks & Requirements

## Immediate Issues to Resolve

### 1. Doctor Schedule Configuration
- [ ] Set doctor availability hours: 10:30 AM to 5:00 PM EST, Monday to Friday
- [ ] Update CRM to show/limit bookings within these hours only
- [ ] Ensure appointment scheduling respects these time constraints

### 2. Law Firm User Account Verification
- [ ] Receive CSV file from AJ with law firm user accounts
- [ ] Test each user account for login functionality
- [ ] Document and resolve any login issues found
- [ ] Update account status and add notes for any issues

### 3. Email Bug Verification
- [ ] Confirm the invalid email bug has been fixed
- [ ] Test email validation functionality
- [ ] Ensure system properly handles and logs invalid email addresses
- [ ] Verify emails don't fail silently

## Core CRM Features Development

### 4. Orders Management System
- [ ] Create "View All Orders" interface with filtering and sorting
- [ ] Display all current/pending orders
- [ ] Add order routing functionality to pharmacies
- [ ] Implement order status tracking
- [ ] Add ability to edit existing orders
- [ ] Create interface to add new orders

### 5. Outside Provider Management
- [ ] Create Outside Provider database structure with fields:
  - Provider/Facility Name
  - Contact Person
  - Provider Type (Lab, MRI, Specialist, Pharmacy, Other)
  - Specialty Name
  - Complete address fields (Address, City, State, Zip)
  - Phone Number, Fax Number, Email
  - Insurance notes (free text for specialist insurance acceptance)
  - General notes field
- [ ] Implement provider search functionality
- [ ] Add "Create New Provider" option during request creation
- [ ] Enable provider selection/attachment to requests

### 6. Request Management to Outside Providers
- [ ] Create request types: Referral, Lab, MRI, Prescription, Other
- [ ] Implement workflow: CS creates → Doctor approves → Send/Fax
- [ ] Add client and provider attachment to requests
- [ ] Include reason/diagnosis/notes fields
- [ ] Create fax/send confirmation tracking (manual success/failure marking)
- [ ] Save copies to client records

### 7. Telemedicine Support System
- [ ] Implement basic support ticket functionality
- [ ] Add ticket assignment and status management
- [ ] Create notes system for tickets
- [ ] Enable ticket opening/closing workflow

### 8. Medical Questions & Documentation
- [ ] Add medical questions to orders/tickets/client records
- [ ] Implement file upload functionality to client records
- [ ] Create document management for client files
- [ ] Add request-based file uploads

### 9. Appointment Management
- [ ] Create appointment rescheduling interface
- [ ] Add notification system for appointment changes
- [ ] Implement appointment logging
- [ ] Create consult confirmation workflow for customer service
- [ ] Add doctor availability confirmation for consults
- [ ] Enable appointment time changes

## User Portal Enhancements

### 10. Client Shipping Address Management
- [ ] Allow clients to edit shipping addresses in portal
- [ ] Create shipping address dropdown for orders
- [ ] Support multiple addresses (current, previous, new)
- [ ] Sync address updates between CRM and portal

## User Management & Support

### 11. Password & Authentication Management
- [ ] Implement password reset functionality with logging
- [ ] Create welcome email system with send tracking
- [ ] Add login issue tracking and resolution
- [ ] Audit password reset/welcome email workflow

### 12. Provider Archive & Management
- [ ] Add ability to deactivate/archive old providers (not delete)
- [ ] Implement auto-matching for duplicate provider entries
- [ ] Create provider search and management interface

## Reporting & Analytics

### 13. Basic Reporting System
- [ ] Create outside referral reports by provider per month
- [ ] Add fax/email success tracking reports
- [ ] Implement order status reporting

## Additional Enhancements

### 14. Provider Documentation
- [ ] Add field for specialty referral requirements
- [ ] Create credentialing document upload capability
- [ ] Implement provider preference tracking

### 15. Workflow Optimization
- [ ] Create automated provider matching system
- [ ] Add bulk operations for common tasks
- [ ] Implement workflow templates for common request types

## Notes & Specifications

- **Insurance Fields**: Simple notes field for tracking which specialists accept specific insurance plans
- **Fax Notifications**: Manual success/failure marking by agents (using RingCentral)
- **Provider Types**: Lab, MRI, Specialist, Pharmacy, Other
- **Request Routing**: CS → Doctor → Fax/Send → Confirmation → Client Record
- **Doctor Hours**: 10:30 AM - 5:00 PM EST, Monday-Friday only

## Priority Order
1. Immediate Issues (Tasks 1-3)
2. Core Orders & Provider Management (Tasks 4-6)
3. Support & Appointment Systems (Tasks 7-9)
4. Portal & User Management (Tasks 10-11)
5. Additional Features (Tasks 12-15)
