Module 04, OPD & Appointments

The OPD
Portal

The Out-Patient Department (OPD) module handles scheduled appointments and walk-in visits. It manages the entire flow—from booking a slot and checking in at the front desk, to the doctor consultation, prescriptions, and billing. It is the busiest part of any hospital.

What is OPD Management?

OPD Management is the system that handles outpatient visits—patients who come to the hospital for a consultation but don't need to stay overnight. This is where most patient interactions happen: routine checkups, follow-ups, initial diagnosis of new symptoms, and minor procedures.

The module manages appointments (scheduled visits with a specific doctor), walk-ins (unscheduled visits that get added to a queue),doctor schedules (which doctor is available when), andconsultation workflows (recording the doctor's notes, diagnoses, prescriptions, and orders for tests).

Why Does It Exist?

Without a proper OPD system, outpatient management is inefficient and frustrating:

  • →Long wait times — Patients wait for hours because there's no system to track who arrived first
  • →Doctor availability confusion — Staff don't know which doctors are on duty, leading to double-booking or idle doctors
  • →Lost paperwork — Prescriptions get misplaced, follow-up instructions are forgotten
  • →Revenue leakage — Services are provided but not billed, or bills don't match services rendered

OPD Management solves all of this with structured workflows and real-time visibility.

Who Uses This Module?

Front Desk / Reception

Book appointments, check patients in, manage the queue, collect OPD fees

Doctors

See their patient list, conduct consultations, write digital prescriptions, order tests, write follow-ups

Patients (via public booking)

Book appointments online, receive confirmations, see their visit history

Step by Step

How an OPD Visit Works

A typical outpatient visit from booking to departure.

1

Appointment Booking

A patient can book an appointment in two ways: online through the hospital's public booking portal, or in-person at the front desk. They choose a doctor, date, and time slot from the available schedule. The system shows only available slots based on the doctor's configured working hours and buffer times.

Behind the scenes: Doctor schedules are defined with "Hard" slots (mandatory availability) and "Soft" slots (can be overridden for emergencies). The system prevents double-booking.
2

Check-In & Queue

When the patient arrives, the receptionist finds them in the system and marks them as "Arrived." This places them in the doctor's queue. Walk-in patients (without appointments) are also added to the queue but may have lower priority depending on hospital policy.

Behind the scenes: The queue sorts patients by appointment time (for scheduled visits) or check-in time (for walk-ins). Doctors see their queued patients in real-time on their dashboard.
3

Consultation

The doctor sees the patient in the consultation room. They review the patient's history (past visits, medications, allergies) from the clinical timeline. The doctor records their findings, diagnosis, and treatment plan in the system. They can write prescriptions, order lab/radiology tests, or refer to other departments.

Behind the scenes: All consultation notes are saved as structured clinical records. Prescriptions automatically include dosage, duration, and timing instructions.
4

Billing & Follow-Up

After the consultation, the system generates billing entries for the consultation fee and any ordered services. The patient pays at the billing counter, collects prescribed medicines from the pharmacy, and the doctor may schedule a follow-up appointment. A follow-up is automatically added to the patient's upcoming appointments.

Behind the scenes: Billing hooks in the OPD module automatically create invoice line items. The pharmacy system is notified of new prescriptions so medicines can be prepared.
Deep Dive

Every Feature Explained

Doctor Scheduling

What it is

Define each doctor's working hours, break times, consultation duration, and on-call status.

Why it exists

So patients only see available slots, and appointment conflicts are impossible.

How it works

Admins set schedules per doctor with start/end times, buffer durations between patients, and exception days (vacations, conferences).

Appointment Booking

What it is

Patients book time slots with specific doctors. Supports online public booking and front-desk booking.

Why it exists

Reduces phone calls, eliminates walk-in chaos, and lets patients plan their visit.

How it works

The system shows only available slots from the doctor's schedule. Once booked, the slot is locked. Patients receive confirmation via notification.

Queue Management

What it is

A live queue for each doctor showing patients waiting to be seen.

Why it exists

So patients are seen in a fair order and doctors always know who is waiting next.

How it works

The queue is sorted by priority (appointment time for scheduled; check-in time for walk-ins). Staff can see estimated wait times. Late arrivals may be moved to the end.

Consultation Recording

What it is

Doctor records diagnosis, notes, prescriptions, and test orders during the consultation.

Why it exists

Creates a permanent digital record of the visit that can be referenced later. No more illegible handwritten notes.

How it works

Structured forms by department type (Cardiology, Pediatrics, etc.) auto-populate. Doctors type or select from dropdowns. Everything is saved to the patient's clinical timeline.

Digital Prescriptions

What it is

Electronic prescriptions with medicine name, dosage, frequency, and duration.

Why it exists

Eliminates errors from bad handwriting. Pharmacy can dispense immediately without re-entering data.

How it works

Doctor selects medicines from the pharmacy formulary, specifies dose/frequency/duration. The prescription is digitally signed and sent to the pharmacy system in real-time.

Auto-Billing Integration

What it is

OPD consultation fees and ordered services are automatically added to the patient's bill.

Why it exists

Ensures no service is provided without being billed. No revenue leakage.

How it works

When a doctor orders a lab test or procedure, a billing line item is created automatically. When the consultation is marked complete, the consultation fee is added.

Real-World Example

“Mrs. Patel's Checkup”

Mrs. Patel wants to see a general physician. She opens the hospital's public booking portal on her phone, selects “General Medicine,” sees Dr. Sharma's available slots for tomorrow, and books the 10:00 AM slot. She receives a confirmation with her appointment number.

Next day, she arrives at 9:50 AM. The receptionist checks her in. She appears in Dr. Sharma's queue at position #2. At 10:05 AM, the system calls her number and she sees the doctor. Dr. Sharma reviews her history, examines her, and prescribes a blood test and some vitamins.

Mrs. Patel pays at billing (consultation fee + lab test), gets her blood drawn at the lab, and collects her vitamins from the pharmacy. Total time: 45 minutes. No paperwork, no waiting in wrong lines.

What Makes This Efficient

  • Self-Booking

    Patients book online 24/7. No phone calls during busy hours.

  • Fair Queuing

    Appointment patients are seen at their time. Walk-ins are added to the end but never skipped.

  • Paperless

    Prescriptions and lab orders are digital. Nothing gets lost.

  • One-Stop Flow

    Consultation → Billing → Lab → Pharmacy is one continuous digital journey.

Gateway
Technical

The appointment engine uses a preemptive slotting logic that factors in physician speed, consultation complexity, and emergency buffers to minimize patient wait times.

Technical Architecture

FieldTypeInstitutional Role
idUUIDPrimary unique identifier for the appointment.
dateTimeDateTimeScheduled slot start time.
statusEnumStates: booked, checked_in, in_progress, completed, cancelled, no_show.
typeVarchar(50)Consultation category (General, Specialized, Follow-up, Emergency).
doctorIdUUIDForeign key to the assigned doctor.

Note: Sensitive fields use AES-256 field-level encryption where applicable.

Governance & Power

appointments:view
appointments:create
appointments:checkin
appointments:reschedule
appointments:cancel

Scheduling Logic

Doctor schedules combine “Hard” slots (guaranteed availability for normal appointments) with “Soft” buffer slots that can absorb emergency visits without collapsing the daily schedule.

Consultation Release

1
Arrival Verification

Staff marks patient as 'Arrived' in the portal.

2
EMR Queuing

Electronic medical record is queued for the physician with history.

3
Discharge & Prescription

Prescription is digitally signed and issued; billing is triggered.

Missed appointments are automatically flagged for follow-up by the patient coordinator to reduce no-shows.