Patient Upload Page - User Actions Guide
File Path:console/src/app/[tenant]/(console)/patient/(patient-upload-page)/upload/page.tsx
Route: /[tenant]/patient/upload
Overview
The Patient Upload page provides a multi-step wizard for bulk importing patient data from CSV files. Supports both collections (with balances) and contact-only uploads. Includes column mapping, data validation, and saved mapping templates.Available Actions
1. Select Upload Type
Purpose: Choose what type of data to import. Step-by-Step Instructions:-
Navigate to Patient Upload
- Patient menu → Upload
- View upload type options:
-
Select “Patient Collections”
- For importing balance/debt data
- Requires rule set selection
-
Or select “Patient Contact”
- For importing contact info only
- No rule set needed
2. Select Rule Set (Collections Only)
Purpose: Determine how charges are processed. Step-by-Step Instructions:- After selecting Collections type
- View rule set dropdown
- Click dropdown
-
Select a rule set
- Required for collections upload
-
Configure options:
- Void existing charges: Remove old charges using this rule set
- Update existing patient charges: Adjust existing vs. create new
3. Select Patient Identifiers
Purpose: Define how to match existing patients. Step-by-Step Instructions:- Locate “Patient Identifiers” section
-
Select fields for matching:
- Phone Number
- Account Number
- Date of Birth
-
Multiple selections allowed
- More fields = stricter matching
4. Upload CSV File
Purpose: Select file for import. Step-by-Step Instructions:-
Option A - Drag and drop:
- Drag CSV file to upload zone
- Zone highlights when file hovers
-
Option B - Browse:
- Click “Browse Files” button
- Select file from computer
-
File validates automatically
- Shows row count
- Shows column count
- Displays warnings if any
- Maximum file size: 10MB
5. Preview CSV Data
Purpose: Verify data before processing. Step-by-Step Instructions:- After file uploads
- Click “Show Preview” button
-
View table preview:
- Headers displayed
- First few rows shown
- Scrollable if wide
- Click “Hide Preview” to collapse
6. Remove Selected File
Purpose: Clear file and start over. Step-by-Step Instructions:- With file selected
-
Click trash icon
- Next to file name
-
File removed
- Can select new file
7. Navigate to Column Mapping
Purpose: Map CSV columns to system fields. Step-by-Step Instructions:- Complete configuration step
- Click “Next” button
-
Column mapping page loads
- Shows required fields
- Shows optional fields
8. Map CSV Columns
Purpose: Match your columns to required fields. Step-by-Step Instructions:-
View required fields
- Marked with asterisk (*)
-
For each required field:
- Click dropdown
- Select matching CSV column
-
Review auto-suggestions
- System may auto-match common names
- Map optional fields as needed
- All required + identifier fields must be mapped
9. Apply Saved Mapping
Purpose: Use previously saved column configuration. Step-by-Step Instructions:- On column mapping page
- View “Saved Mappings” section
-
Click a saved mapping
- Columns auto-populate
-
Default mapping applies automatically
- If one exists
10. Configure Balance Conversion
Purpose: Convert dollar amounts to cents. Step-by-Step Instructions:- If balance column detected
- View conversion prompt
-
Select whether values are in:
- Dollars (will convert to cents)
- Cents (no conversion)
- Preview shows converted values
11. Navigate to Preview Step
Purpose: Final review before upload. Step-by-Step Instructions:- Complete column mapping
- Click “Next” button
- Mapping applied to full file
- Preview step loads
12. Review Configuration Summary
Purpose: Verify all settings before upload. Step-by-Step Instructions:- On Preview step
-
Review summary:
- Upload type
- Rule set (if collections)
- Void existing charges setting
- Update existing charges setting
- Patient identifiers
- File name
-
View file preview
- Now shows mapped columns
13. Submit Upload
Purpose: Process the file. Step-by-Step Instructions:- Verify configuration
- Click “Next” / Submit button
-
Upload progress displays
- Progress bar shows percentage
- Wait for processing
-
On success:
- Redirected to Upload History
- Toast confirmation appears
14. View Upload History
Purpose: Check status of uploads. Step-by-Step Instructions:-
Click “View History” button
- Top right of page
- Navigate to upload history page
Multi-Step Wizard Flow
| Step | Name | Purpose |
|---|---|---|
| 1 | Configuration | Select type, rule set, file |
| 2 | Column Mapping | Map CSV to system fields |
| 3 | Preview | Final review and submit |
Required CSV Fields
For Collections upload:- Patient identifier (phone/email/account)
- Balance amount
- Name fields
- Patient identifier
- Name fields
- Contact information
File Requirements
| Requirement | Value |
|---|---|
| Format | CSV |
| Max size | 10MB |
| Encoding | UTF-8 recommended |
| Headers | Required in first row |
Upload Type Comparison
| Feature | Collections | Contact |
|---|---|---|
| Balance data | ✓ | ✗ |
| Rule set required | ✓ | ✗ |
| Creates charges | ✓ | ✗ |
| Contact info | ✓ | ✓ |
Permissions
| Action | Admin | Manager | Staff |
|---|---|---|---|
| Upload patients | ✓ | ✓ | ✓ |
| Configure rule sets | ✓ | ✓ | ✗ |
| Void existing charges | ✓ | ✓ | ✓ |
Troubleshooting
| Issue | Solution |
|---|---|
| File too large | Split into smaller files |
| Invalid file type | Use .csv extension |
| Missing fields error | Map all required columns |
| Validation errors | Check data format in CSV |
| No rule sets | Create rule sets in Settings |
| Mapping not saved | Complete all required fields |
