1. Introduction
Welcome to EarlyDC, a comprehensive web application designed to modernize and standardize patient discharge workflows, reduce delays, and deliver actionable analytics for hospital flow optimization. EarlyDC integrates with Oracle EMR (or a mock API for testing), centralizes data entry, and exposes rich operational metrics.
Key Capabilities
- 🔄 Real-time synchronization of active patients from Oracle EMR
- 🧭 Dashboard with filters to focus daily work
- 📝 Patient disposition: discharge or transfer with clinical/physical timestamps
- ⏱️ EDC (Early/Timely Discharge Candidate) validation and draft workflows
- 🧩 Grouped delay reasons with configurable catalog
- 📈 Analytics: team performance, temporal patterns, LOS, EDC success, transfers
- 🔐 Role-based access with audit-friendly data structures
Audience: Clinical teams, bed managers, quality leads, and IT administrators.
2. Getting Started
2.1 Logging In
- Open the application URL in your browser
- Enter your username and password
- Click Sign In
2.2 Navigation
- Dashboard – Daily view and quick actions
- Discharges – Historical discharge records and filters
- Failed Attempts – EDC attempts that didn’t meet targets
- Transfers – Transfer out records and analytics
- Reports – Comprehensive analytics
- Settings – Admin-only configuration and user management
- Logout – End your session securely
3. User Roles & Permissions
👑 Super User (Administrator)
- Manage users (create/update/deactivate, reset passwords)
- Configure delay reasons and transfer locations
- View system status and initiate Oracle sync
- Full access to discharges, transfers, reports
👤 Regular User
- Work with dashboard, patient disposition, discharges, reports
- No access to admin settings
4. Dashboard & Active Patients
The dashboard presents active patients and key statistics with filters to focus work. Typical filters include date/range, team, search, flags, LOS status, time period, and time-to-DC (by page).
Common Actions
- Open a patient to complete discharge or transfer
- Review LOS and team assignments; update inline from dedicated pages
- Use filters to segment by team, time, or flag status
5. Patient Detail & Disposition
The Patient Detail page presents MRN, age, diagnosis, admission date, LOS, expected LOS, team, and doctor; and a Disposition form to Discharge or Transfer.
5.1 Discharge Flow
- Select Discharge Patient
- Enter Clinical DC by MD and Ward DC by RN
- Click Refresh Alshifa Timestamps to auto-fill times if needed
- Enter Physical Discharge Time
- Select Delay Reasons (grouped by category). If “No Delay” applies per flag/time rules, others are disabled
- Provide Other Reason text if the “Other reasons” option is chosen
- Optionally Save Draft, or Complete Discharge
5.2 Transfer Flow
- Select Transfer Patient
- Choose Transfer Date & Time, Location, and optional Other Location
- Enter Transfer Notes as needed
- Click Transfer Patient
5.3 Drafts & EDC Validation
- If a draft exists, the form auto-fills your previous entries; you may refresh timestamps manually
- If an EDC attempt is pending for today, the page requires documenting reasons for the failed attempt before discharge
- “No Delay” selection is guided by EDC flag and discharge time windows
6. Discharges
The Discharges page lists records for a selected date or date range with rich filtering.
- Columns: Patient, MRN, Team, Clinical DC MD/RN, Physical DC, Time to DC, LOS vs Expected, Had Flag, Flag Met, Delay Reasons, Actions
- Filters: date/range, team, flag status (had/no/early/timely), flag success (success/failed), LOS status (shorter/expected/longer), time period, time to DC, search
- Action: delete a discharge record (with confirmation)
7. Failed Discharge Attempts
Analyze failed EDC attempts, reasons, and timing.
- Columns: Patient, MRN, Team, Planned Date, Actual Time, Original Flag, Discharge Flag, Discharge Success, Delay Reasons, Other Reason, Unflagged By, Timing Status, Actions
- Filters: team, search, original flag, original success, discharge flag, discharge success, delay reason, timing status (on-time/delayed/not discharged), days since
8. Transfers
View and filter transfer out records by date range, team, location, and recency.
- Columns: Patient, MRN, Team, Transfer Date/Time, Location (with other-text as needed), Notes, Days Since Transfer, Transferred By, Actions
9. Reports & Analytics
Use the Reports page to access multi-dimensional analytics; optionally filter by team.
9.1 Discharge Overview
- Total, Early (before 12:00), Timely (configurable window), Delayed discharges
- Readmissions, Average LOS, MD early documentation, Unflagged early/delayed
9.2 EDC Analytics
- Successful vs failed early discharges; failed reasons (counts)
- Team EDC stats: successful attempts, failed attempts, unflagged early/delayed, readmissions, avg LOS, total discharges
- Trends by day of week (successful vs failed)
9.3 Team Performance
- Per-team: total discharges, early/delayed by flag type, readmissions, unflagged early/delayed, MD early documentation, avg LOS, unique patients
9.4 Temporal Analysis
- By day of week: totals, early, delayed, readmissions, unflagged early/delayed, MD early documentation
- By time of day: Morning/Afternoon/Evening/Night discharge counts
- Monthly trends: total discharges, early discharges, average LOS
9.5 Operational Efficiency
- Timing efficiency: before vs after 12 PM, average minutes clinical MD → physical DC
- Delay duration: avg hours clinical MD → physical DC where delays are documented
- Documentation completeness: presence of clinical DC MD/RN, physical DC, and delay documentation
9.6 Patient Demographics
- Age groups: discharges, early, delayed, unflagged early/delayed, MD early documentation, avg LOS
- Top diagnoses: discharges, early, delayed, unflagged early/delayed, MD early documentation, avg LOS, readmissions
9.7 Delay Reasons
- Flat list: count per reason across the selected range
- Grouped by category with titles, icons, colors and per-reason breakdowns
9.8 Transport Analytics
- Totals, unique locations, avg LOS before transfer, time-of-day splits
- Location breakdown, team transfer performance, critical care (HD/PICU), recent activity
10. Settings (Admin)
Only Super Users can access Settings.
10.1 User Management
- Create users with role and team assignment
- Edit user profile, role, team, activation status
- Reset passwords; deactivate users (soft-delete)
10.2 System Information
- App name, version, timezone, last sync, counts
10.3 Team Management
- View teams (code, name, status)
- Note: Patient records reference
teams.id; ensure OracleUNITIDis mapped to a valid team ID
10.4 Transfer Locations
- View configured locations, status, sort order
10.5 Delay Reasons
- Add new reasons (code + text), edit, activate/deactivate
11. Sync with Oracle EMR
From Settings, Super Users can trigger Sync Patients from Oracle EMR.
- New patients are inserted (status new), existing updated (old)
- Patients missing from Oracle today are flagged as undisposed locally
- Sync timestamps are recorded and displayed
- Team Mapping: Ensure Oracle
UNITID→teams.idmapping (e.g., 240→140, 241→141, 242→142). Unmapped becomes null
12. Security & Access
- Session-based auth with bcrypt password hashing
- Role checks on each page; admin-only settings
- Login attempts tracked; lockout enforced
- Use HTTPS in production; restrict DB access
13. Troubleshooting
13.1 Sync Errors (FK)
Fix: Map Oracle
UNITID to valid teams.id (e.g., 240→140, 241→141, 242→142) and ensure teams are seeded.
13.2 No Patients after Sync
- Verify Oracle API connectivity and credentials
- Check api_logs entries
13.3 Timestamps Not Matching
- Use Refresh Alshifa Timestamps
- Accept or reset if difference >2 hours
13.4 Missing Analytics
- Confirm records exist in the selected range
- Confirm DB schema fully applied
13.5 Performance
- Review indexes in
database/schema.sql; check server resources
14. FAQ
- Can I use this without Oracle? Yes—enable the mock API (JSON-backed) for demos/testing
- Can we change what “early” means? Yes—thresholds are defined in code for EDC logic
- How do I export to Excel/CSV? The UI provides entry points; wire to your preferred export library
- How are ages handled? Ages are normalized to months for consistency
15. Glossary
- EDC: Early/Timely Discharge Candidate
- LOS: Length of Stay
- Clinical DC: Recorded by MD/RN in EMR
- Physical DC: Time the patient physically leaves
EarlyDC User Manual
Version 1.0 | Last Updated: 2025
For technical support, contact your system administrator.