# PX360 Command Center - Quick Start Guide

## Welcome to the PX Command Center!

The PX Command Center is your one-stop dashboard for viewing all Patient Experience analytics, KPIs, and metrics. This guide will help you get started quickly.

## Accessing the Command Center

Navigate to:
```
https://your-domain.com/analytics/command-center/
```

## Dashboard Overview

When you first open the Command Center, you'll see:

### 1. **Filter Panel** (Top)
A collapsible panel where you can filter data by:
- **Date Range**: Choose from preset ranges (7 days, 30 days, 90 days, etc.) or set a custom range
- **Hospital**: Filter by specific hospital (if you have access to multiple)
- **Department**: Filter by specific department
- **KPI Category**: Focus on specific areas (complaints, surveys, actions, physicians)

### 2. **KPI Cards** (Top Row)
Eight key performance indicators showing:
- Total Complaints (with trend vs. previous period)
- Open Complaints
- Overdue Complaints
- Resolved Complaints
- Total Actions
- Overdue Actions
- Average Survey Score
- Negative Surveys

### 3. **Interactive Charts** (Middle Rows)
Six visualizations powered by ApexCharts:
- **Complaints Trend**: Line chart showing complaint volume over time
- **Complaints by Category**: Donut chart showing distribution
- **Survey Satisfaction Trend**: Line chart showing satisfaction scores
- **Survey Distribution**: Donut chart showing positive/neutral/negative split
- **Department Performance**: Bar chart ranking departments
- **Physician Leaderboard**: Bar chart showing top physicians

### 4. **Data Tables** (Bottom Rows)
Detailed data views:
- **Overdue Complaints Table**: List of overdue complaints with quick links to view details
- **Physician Leaderboard Table**: Detailed ranking with ratings and sentiment breakdown

## Using Filters

### Step 1: Select Date Range
Choose from preset options:
- Last 7 Days
- Last 30 Days (default)
- Last 90 Days
- This Month
- Last Month
- This Quarter
- This Year
- Custom Range (enter specific start and end dates)

### Step 2: Select Hospital (Optional)
If you have access to multiple hospitals, select one from the dropdown.
- **Note**: Hospital managers will see only their hospital pre-selected
- **Department managers** will have both hospital and department pre-selected

### Step 3: Select Department (Optional)
Filter by specific department. This dropdown updates based on the selected hospital.

### Step 4: Select KPI Category (Optional)
Focus on specific metrics:
- Complaints
- Surveys
- Actions
- Physicians

### Step 5: Apply Filters
Click the **Apply Filters** button to update the dashboard with your selections.

### Reset Filters
Click the **Reset** button to clear all filters and return to the default view (last 30 days, all hospitals/departments).

## Interacting with Charts

### Chart Controls
Each chart has a toolbar with options:
- **Zoom In/Out**: Use the mouse wheel or toolbar buttons
- **Pan**: Click and drag to move around the chart
- **Download**: Click the download icon to save the chart as an image (PNG, JPG, SVG)
- **Reset Zoom**: Return to the original view

### Chart Types
Some charts offer type switching:
- **Complaints Trend**: Toggle between Line and Area chart
- Hover over data points to see detailed tooltips
- Click legend items to show/hide specific data series

## Viewing Data Tables

### Overdue Complaints Table
Shows up to 20 most overdue complaints:
- **ID**: Click to view complaint details
- **Title**: Complaint title (truncated if too long)
- **Patient**: Patient name
- **Severity**: Color-coded badge (Low, Medium, High, Critical)
- **Hospital**: Hospital name
- **Department**: Department name
- **Due Date**: Overdue date (highlighted in red)
- **Actions**: Click the eye icon to view full complaint

### Physician Leaderboard Table
Shows top-performing physicians:
- **Rank**: Position in leaderboard
- **Physician**: Physician name (click to view profile)
- **Specialization**: Physician's specialty
- **Department**: Department they work in
- **Rating**: Average rating (green badge)
- **Surveys**: Total number of surveys
- **Positive/Neutral/Negative**: Sentiment breakdown with color coding

## Exporting Data

### Export to Excel
1. Click the **Export** button in the top-right corner
2. Select **Export to Excel** from the dropdown
3. Wait for the file to generate (you'll see a loading overlay)
4. The Excel file will automatically download

**Excel file contains:**
- Executive Summary sheet with all KPIs
- Charts Data sheets with raw data
- Overdue Complaints list
- Physician Leaderboard

### Export to PDF
1. Click the **Export** button
2. Select **Export to PDF** from the dropdown
3. Wait for generation
4. The PDF report will download automatically

**PDF report includes:**
- Executive summary with key metrics
- All charts as high-quality images
- Data tables in formatted tables
- Report metadata (date, filters applied)

## Refreshing Data

Click the **Refresh** button in the top-right corner to reload the dashboard with the latest data. This is useful for real-time monitoring.

## Understanding KPI Trends

KPI cards show trend indicators comparing the current period to the previous period:

- **Red Up Arrow (↑)**: Metric has increased (e.g., more complaints than last period)
- **Green Down Arrow (↓)**: Metric has decreased (e.g., fewer complaints than last period)
- **Gray Dash (—)**: No change

**Note:** For complaints and negative surveys, a green down arrow is GOOD (fewer issues). For positive metrics like resolved complaints or survey scores, a red up arrow is GOOD (improvement).

## Role-Based Access

### PX Admin
- View all hospitals and departments
- Full access to all data
- Can filter by any combination

### Hospital Manager
- View only your hospital's data
- Hospital filter is pre-selected
- Can filter by departments within your hospital

### Department Manager
- View only your department's data
- Both hospital and department are pre-selected
- Limited view relevant to your department

## Common Use Cases

### 1. Daily Overview
- Set Date Range: Last 7 Days
- Leave Hospital/Department: All
- Click Apply Filters
- Review KPI cards and charts
- Check overdue complaints table

### 2. Monthly Report Preparation
- Set Date Range: Last Month
- Leave Hospital/Department: All
- Click Apply Filters
- Review trends and performance
- Export to PDF for monthly report
- Export to Excel for detailed analysis

### 3. Issue Investigation
- Set Date Range: Last 90 Days
- Filter by specific Hospital and Department if needed
- Click Apply Filters
- Focus on Complaints Trend chart
- Review Overdue Complaints table
- Click through to individual complaints for details

### 4. Performance Review
- Set Date Range: This Quarter
- Filter by Department
- Click Apply Filters
- Review Department Performance chart
- Check Physician Leaderboard
- Export data for performance meetings

### 5. Comparing Periods
- Record KPIs for current period
- Change Date Range to previous period
- Click Apply Filters
- Compare KPIs and trends manually
- Consider exporting both periods for comparison

## Tips and Best Practices

### Performance Tips
- **Use smaller date ranges** for faster loading (7-30 days)
- **Apply filters** to reduce data size when focusing on specific areas
- **Use pagination** in tables for large datasets
- **Clear filters** between different analyses

### Data Analysis Tips
- **Look for trends** over time rather than single data points
- **Compare multiple KPIs** together (e.g., complaints vs. resolved)
- **Use drill-down** by clicking on table rows for detailed views
- **Export data** for deeper analysis in Excel or other tools

### Reporting Tips
- **Export to PDF** for professional reports and presentations
- **Export to Excel** for custom analysis and charting
- **Include filter information** when sharing reports (e.g., "This report shows Q3 2024 data for Hospital A")
- **Schedule regular exports** for consistent reporting

## Keyboard Shortcuts

While the Command Center doesn't have dedicated keyboard shortcuts, you can use browser shortcuts:
- **Ctrl/Cmd + R**: Refresh the page (or use the Refresh button)
- **Ctrl/Cmd + F**: Find text on the page
- **Ctrl/Cmd + + / -**: Zoom in/out
- **Space / Enter**: Activate buttons when focused

## Mobile Access

The Command Center is responsive and works on mobile devices:
- **Charts** automatically resize and adapt
- **Tables** are horizontally scrollable
- **KPI cards** stack vertically
- **Filter panel** is collapsible to save space

**Tip:** On mobile, use landscape mode for better chart visibility.

## Getting Help

If you encounter issues:

### Dashboard Not Loading
1. Check your internet connection
2. Try refreshing the page
3. Clear your browser cache
4. Try a different browser

### Charts Not Displaying
1. Check browser console for errors (F12)
2. Ensure JavaScript is enabled
3. Update your browser to the latest version

### Export Not Working
1. Check your browser's download settings
2. Disable popup blockers
3. Try a different browser
4. Contact your administrator if issue persists

### Filters Not Working
1. Ensure you clicked "Apply Filters"
2. Check that your filter selections are valid
3. Try resetting filters and applying again

## Next Steps

Now that you're familiar with the Command Center:

1. **Explore** - Try different filter combinations to understand your data
2. **Monitor** - Check the dashboard regularly for trends and issues
3. **Export** - Generate reports for meetings and analysis
4. **Share** - Share insights with your team
5. **Customize** - Work with your administrator to add custom KPIs or charts

## Additional Resources

- **Implementation Guide**: See `COMMAND_CENTER_IMPLEMENTATION.md` for technical details
- **API Documentation**: Review the API endpoints for integration
- **Training Videos**: Check your learning management system for video tutorials
- **User Community**: Join internal forums to share tips and best practices

## Feedback

We value your feedback! If you have suggestions for improving the Command Center:
- Submit feature requests through your project manager
- Report bugs through the issue tracking system
- Share your use cases to help us understand your needs

---

**Version**: 1.0.0  
**Last Updated**: January 5, 2024  
**For**: PX360 Users and Administrators
