The IPD
campus
The In-Patient Department (IPD) module manages everything that happens when a patient is admitted to the hospital—from finding a bed and assigning a ward to daily care rounds, transfers, and final discharge. Think of it as the hospital's “bed manager” and “census counter” in one.
What is IPD Management?
IPD Management is the system that handles patient admissions—when a doctor decides a patient needs to stay in the hospital overnight (or longer). It tracks which bed they're in, which ward they're assigned to, who their primary doctor is, what treatments they're receiving, and when they're ready to go home.
It also handles transfers between wards (e.g., from ICU to a general ward when the patient improves), discharges, and readmissions. Every bed in the hospital is tracked in real-time so staff always know which beds are free, occupied, or being cleaned.
Why Does It Exist?
Without a proper IPD system, hospital wards can become chaotic:
- →Nurses might not know which beds are free, causing delays in admitting emergency patients
- →Doctors might not know which patients are in which ward, leading to missed rounds
- →The emergency room might send a critical patient to a ward that is already full
- →Discharge paperwork can get lost, delaying bed availability for the next patient
IPD Management solves all of this with a real-time, centralized bed and patient census.
Who Uses This Module?
Admission Desk Staff
Admit patients, assign beds and wards, collect admission paperwork, print wristbands
Nurses & Ward Staff
View their ward's patient list, update bed status, prepare for incoming/outgoing patients, trigger housekeeping
Doctors
See which of their patients are admitted, check ward locations, authorize discharges, request transfers
How Admissions Work
A typical patient journey from admission decision to discharge.
Doctor Decides to Admit
After examining the patient in OPD or Emergency, the doctor decides they need to be hospitalized. They create an admission request, specifying the reason for admission (e.g., "Pneumonia - needs IV antibiotics"), the ward type (General, ICU, Pediatric), and the primary doctor.
Bed Assignment
The admission desk sees available beds in real-time and assigns one to the patient. They can see the ward layout, bed numbers, and which beds are free vs. occupied vs. under maintenance. ICU beds are flagged with priority status.
Daily Care & Rounds
During the patient's stay, nurses log vitals, administer medications, and record nursing notes. Doctors do their rounds and update the treatment plan. All of this is visible on the patient's clinical timeline and the ward dashboard.
Discharge
When the patient is well enough to go home, the doctor authorizes discharge. The system checks that all bills are settled, medications for take-home are prescribed, and discharge summary is completed. Once finalized, the bed is marked as "occupied" → "cleaning" → "available".
Every Feature Explained
Real-Time Bed Census
See every bed in the hospital with its current status.
Staff always know which beds are free for new admissions without calling around.
Each bed has a status: available, occupied, maintenance, or cleaning. The dashboard updates instantly when a bed changes status.
Ward Management
Organize beds into wards (e.g., ICU, General Ward, Maternity, Pediatric).
Different wards have different specialties, staffing, and pricing. Patients need to be in the right ward for their condition.
Wards are configured with names, room types, bed counts, and specialty. Pricing rules can be set per ward or per room.
Transfers
Move a patient from one ward or bed to another with a mandatory reason.
A patient might improve and move from ICU to a general ward, or worsen and need a higher-care bed. Finance needs an audit of transfer-day billing.
Staff confirm transfer in a reason popup. The system writes bed_transfer_history (from/to bed, reason, transferred_at, billing_mode_applied), frees the old bed, assigns the new bed, and applies Settings transfer-billing mode.
Bed transfer history
Timeline of every bed move on an admission.
Nursing and billing need to see when and why a patient moved, and which billing mode applied.
Admission detail shows BedTransferHistoryTimeline. Report Builder and SQL tools can query bed_transfer_history joined to inpatient_records and beds.
Discharge Workflow
A multi-step process to safely discharge a patient.
Discharge involves clinical, financial, and logistical steps. Skipping any can cause problems.
Doctor authorizes → billing clears outstanding payments → pharmacy prepares take-home meds → discharge summary is generated → bed is released for cleaning. Audit trail captures every step.
Discharge cockpit
Pass/fail readiness panel: finance, pending results, meds, and other clinical blockers before bed free.
Buried finance checks caused unpaid-at-discharge disputes; one cockpit turns compliance into bedside UX.
Shown on /dashboard/admissions detail and patient chart Admissions tab for active stays. GET /admissions/:id/discharge-cockpit (admissions:view|manage). Mutate stays on POST discharge. Finance override (admissions:discharge-finance-override or manage grants) needs a reason and cannot skip clinical gates. See docs/info/DISCHARGE-COCKPIT.md and Differentiation-Feature-Ideas #3.
Primary Doctor Assignment
Each admitted patient is assigned a primary doctor.
Patients need a responsible physician coordinating their care during the stay.
The primary doctor is recorded at admission. They receive notifications about their patient's status changes and can see all their admitted patients on a single dashboard.
IPD Doctor Visits
Record physician round visits for inpatients with ward-based charges and billing status.
Daily doctor rounds are billable clinical events that must be captured during the stay, not only at discharge.
Visits are created in assigned status from the admission detail panel or /dashboard/ipd-visits. Optional start moves to in_progress; complete resolves the charge tier and creates the invoice line. Charge order: doctor+ward override → doctor global → ward override → hospital IPD default → manual override (billing:ipd-visits:configure).
Granular visit permissions
Separate RBAC keys for view, assign, start, complete, edit notes, and delete on IPD visits.
Ward clerks may assign visits while only clinicians complete them; billing staff may view without mutating.
admissions:visits:view | assign | start | complete | edit-notes | delete. Legacy admissions:visits:record is sync-only (role templates expand to granular grants) and is not accepted at runtime. admissions:view alone is not enough for visit mutations.
Round visits & auto-billing
IPD doctor visits track physician rounds for admitted patients. Each visit links to the active admission, attending doctor, ward, and visit date. Charges are resolved when the visit is completed (not at assignment) using institutional IPD visit rate configuration and flow to patient billing as an invoice line.
Workflow: assigned → optional in_progress (start) → completed (complete action). Staff can record visits from the admission detail panel or use the dedicated IPD visits workspace at /dashboard/ipd-visits for upcoming and previous visits across the census.
Billing status & charge tiers
- assigned
Visit scheduled or recorded; no charge or invoice line yet.
- in_progress
Round started; charge preview available but not billed.
- completed
Charge resolved and invoice line created if not already billed.
- Charge tier 1, doctor + ward
Per-doctor ward IPD visit override when configured.
- Charge tier 2, doctor global
Doctor profile ipdVisitCharge when no ward-specific override.
- Charge tier 3, ward
Active ward_visit_charges override for the admission ward.
- Charge tier 4, hospital default
billing.ipd.defaultVisitCharge app setting.
- ipd-visits:view-mine
Doctors see visits tied to their profile only.
- ipd-visits:view-all
Hospital-wide list with doctor filter for census managers.
“Mr. Kapoor's Admission”
Mr. Kapoor arrives at the Emergency department with chest pain. The ER doctor determines he needs to be admitted to the Cardiac ICU for monitoring.
The admission desk checks the bed census, sees one bed free in Cardiac ICU, and assigns it to Mr. Kapoor within 2 minutes. His primary cardiologist is assigned automatically. The nursing station in Cardiac ICU gets a notification: “New admission incoming.”
After 3 days, Mr. Kapoor improves. The cardiologist orders a transfer to the General Cardiology ward. The system frees the ICU bed and assigns a general ward bed. Two days later, discharge is authorized, bills are settled, and the bed is released for the next patient.
Why This Matters
- Speed
Bed assignment in seconds, not minutes. No phone calls between departments.
- Visibility
The hospital director can see real-time occupancy rates across all wards on one screen.
- Revenue
Billing hooks ensure every day of stay is captured for invoicing. No lost charges.
- Patient Safety
Patients are always in the right ward for their condition. ICU capacity is never accidentally exceeded.
Census
Governance
The admission engine maintains a real-time bed ledger, synchronizing occupancy states with pharmacy and nursing stations instantly. Every state change is audited for billing and compliance.
Technical Architecture
| Field | Type | Institutional Role |
|---|---|---|
| id | UUID | Primary admission record identifier. |
| wardId | UUID | Foreign key for the assigned ward. |
| bedId | UUID | Specified bed location within the ward. |
| status | Enum | Current state: admitted, transferred, discharged, readmitted. |
| primaryDoctorId | UUID | Lead physician responsible for this admission. |
Note: Sensitive fields use AES-256 field-level encryption where applicable.
Governance & Power
admissions:viewadmissions:manageadmissions:dischargeadmissions:discharge-finance-overrideadmissions:visits:viewadmissions:visits:assignadmissions:visits:completebilling:viewadmissions:transferBed Management Logic
Beds are categorized by status: available, occupied,maintenance, and cleaning. When a patient is discharged, the bed automatically triggers a housekeeping task. Only after cleaning confirmation does the bed return to available.
Discharge Protocol
Initiation
Physician authorizes clinical discharge with final notes.
Discharge cockpit
Review finance / results / meds / other gates on admissions detail or chart; clear blockers or document finance override.
Financial Audit
Billing verifies charges cleared, advances reconciled, or audited finance override when authorized.
Finalization
Bed is released; housekeeping is notified; discharge summary is added to patient timeline.
ICU/ER beds have a direct telemetry link to the central nursing dashboard for real-time critical care visibility.