> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/appertafoundation/openeyes/llms.txt
> Use this file to discover all available pages before exploring further.

# Surgical Modules

> Operation booking and surgical documentation in OpenEyes

# Surgical Modules - Operations

OpenEyes provides comprehensive surgical workflow management through two primary modules that work in tandem: **OphTrOperationbooking** for scheduling surgeries and **OphTrOperationnote** for documenting procedures.

## Overview

The surgical modules handle the complete perioperative workflow:

1. **Decision to Operate**: Made during clinical examination
2. **Operation Booking**: Scheduling and pre-assessment
3. **Pre-Operative Preparation**: Consent, biometry, medications
4. **Surgical Documentation**: Intra-operative record
5. **Post-Operative Care**: Follow-up and complication tracking

<Note>
  These modules integrate with OphTrConsent, OphInBiometry, OphTrOperationchecklists, and OphCiExamination to provide comprehensive surgical care documentation.
</Note>

## OphTrOperationbooking - Operation Booking

The operation booking module manages surgical scheduling from initial listing through to admission.

### Core Elements

#### Operation Element

```php theme={null}
Element_OphTrOperationbooking_Operation
```

Captures the surgical requirements:

* **Procedures**: One or more procedures to be performed
* **Eye**: Right, left, or bilateral
* **Anaesthetic Type**: Local, general, sedation, or LA with sedation
* **Priority**: Routine or urgent
* **Consultant**: Operating surgeon or supervising consultant
* **Total Duration**: Calculated from procedure durations
* **Comments**: Special requirements or considerations

<Accordion title="Procedure Selection">
  **Multi-Procedure Support:**
  Patients can be listed for multiple procedures in a single operation:

  * Combined cataract and glaucoma surgery
  * Bilateral simultaneous procedures
  * Staged procedures with planned interval

  **Procedure Database:**

  * OPCS-4 coded procedures
  * Standard durations
  * Subspecialty grouping
  * Default anaesthetic types
  * Equipment requirements
</Accordion>

#### Schedule Operation Element

```php theme={null}
Element_OphTrOperationbooking_ScheduleOperation
```

Manages the actual scheduling:

* **Session Selection**: Theatre list and date
* **Scheduled Time**: Planned start time
* **Session Comments**: Notes for theatre team
* **Booking Status**: Scheduled, rescheduled, cancelled

<Accordion title="Theatre Management">
  **Session Configuration:**

  * Theatre location and room
  * Session start and end times
  * Available time slots
  * Surgeon/anaesthetist assignments
  * Session type (routine, emergency, day case)

  **Capacity Management:**

  * Real-time session availability
  * Automatic duration calculations
  * Overrun warnings
  * Session utilization reporting
</Accordion>

#### Diagnosis Element

```php theme={null}
Element_OphTrOperationbooking_Diagnosis
```

Links surgical indication to diagnosis:

* Principal diagnosis for operation
* Laterality
* ICD-10 coding for data reporting

#### Pre-Assessment Element

```php theme={null}
Element_OphTrOperationbooking_PreAssessment
```

Tracks pre-operative assessment:

* Assessment date and outcome
* Fitness for anaesthesia
* Special requirements identified
* Risk stratification

#### Contact Details Element

```php theme={null}
Element_OphTrOperationbooking_ContactDetails
```

Ensures up-to-date patient contact information for admission letters and communication.

### Booking Workflow

<Steps>
  <Step title="Create Booking Event">
    From patient record or worklist, create new operation booking
  </Step>

  <Step title="Enter Operation Details">
    Select procedures, eye, anaesthetic type, consultant, and priority
  </Step>

  <Step title="Record Diagnosis">
    Link to diagnosis justifying surgical intervention
  </Step>

  <Step title="Update Contact Details">
    Verify patient address and phone number
  </Step>

  <Step title="Schedule Operation">
    Select available theatre session and time slot
  </Step>

  <Step title="Pre-Assessment">
    Arrange and record pre-operative assessment
  </Step>

  <Step title="Generate Letters">
    Send admission letter and GP notification
  </Step>
</Steps>

### Booking Status Management

<CardGroup cols={2}>
  <Card title="Scheduled" icon="calendar-check">
    Operation has confirmed date and theatre slot
  </Card>

  <Card title="Rescheduled" icon="calendar-xmark">
    Patient or hospital initiated date change with reason documented
  </Card>

  <Card title="Cancelled" icon="ban">
    Operation cancelled with reason code (patient, medical, capacity)
  </Card>

  <Card title="On Hold" icon="pause">
    Temporarily suspended pending additional requirements
  </Card>
</CardGroup>

#### Cancellation Reasons

```php theme={null}
OphTrOperationbooking_Operation_Cancellation_Reason
```

Standardized cancellation reasons for audit:

* Patient declined/DNA
* Medical reasons (unfit, infection, etc.)
* Hospital capacity issues
* List overrun
* Emergency case prioritization
* Administrative error

### Waiting List Management

The module supports comprehensive waiting list management:

<Accordion title="Waiting List Features">
  **Patient Prioritization:**

  * Routine vs urgent classification
  * Waiting time tracking
  * Target breach alerts
  * Escalation protocols

  **Worklists:**

  * Patients awaiting scheduling
  * Patients awaiting pre-assessment
  * Patients awaiting consent
  * Patients awaiting biometry
  * Operations scheduled by date

  **Reporting:**

  * Waiting time statistics
  * Breach reporting
  * Cancellation analysis
  * Utilization metrics
</Accordion>

### Letters and Communication

#### Admission Letters

Automatically generated letters include:

* Date and time of admission
* Pre-operative instructions (fasting, medications)
* What to bring
* Contact information
* Customizable warnings based on rules

```php theme={null}
OphTrOperationbooking_Admission_Letter_Warning_Rule
```

Conditional warnings can be added based on:

* Patient age
* Procedure type
* Anaesthetic type
* Comorbidities
* Medications

#### GP and Patient Letters

Notifications sent to:

* General Practitioner (surgery scheduled)
* Patient (admission details)
* Optometrist (if applicable)
* Other care providers

### Theatre Whiteboard

```php theme={null}
OphTrOperationbooking_Whiteboard_ProcAssignment
```

Digital theatre board for day-of-surgery management:

* Patient list for current session
* Procedure details
* Arrival status
* Consent status
* Biometry status
* Pupil dilation status
* Current location (ward, anaesthetic room, theatre, recovery)
* Delays and issues

### Integration Points

<CardGroup cols={2}>
  <Card title="Examination" icon="eye">
    Surgical decision triggers booking creation from management plan
  </Card>

  <Card title="Consent" icon="file-signature">
    Links to electronic consent documentation
  </Card>

  <Card title="Biometry" icon="ruler">
    Tracks completion of pre-operative biometry
  </Card>

  <Card title="Operation Note" icon="notes-medical">
    Booking details auto-populate operation note
  </Card>
</CardGroup>

## OphTrOperationnote - Operation Note

The operation note module provides comprehensive surgical documentation with procedure-specific templates.

### Core Elements

#### Procedure List

```php theme={null}
Element_OphTrOperationnote_ProcedureList
```

**Properties:**

* `eye_id`: Which eye operated (right/left/bilateral)
* `procedures[]`: Array of performed procedures
* `booking_event_id`: Link to original booking

**Validation:**

* Eye selection required
* At least one procedure required
* Links to operation booking if available

#### Site and Theatre

```php theme={null}
Element_OphTrOperationnote_SiteTheatre
```

Records:

* Hospital site
* Theatre/operating room
* Date of surgery

#### Surgeon

```php theme={null}
Element_OphTrOperationnote_Surgeon
```

Surgical team documentation:

* Primary surgeon
* Assistant surgeon(s)
* Supervising consultant (for training cases)
* Role of each team member

#### Anaesthetic

```php theme={null}
Element_OphTrOperationnote_Anaesthetic
```

Anaesthetic details:

* Type: Topical, subtenons, peribulbar, retrobulbar, general
* Specific agents used
* Complications
* Anaesthetist name

### Procedure-Specific Elements

The module includes specialized elements for different surgical procedures:

<AccordionGroup>
  <Accordion title="Cataract Surgery">
    ```php theme={null}
    Element_OphTrOperationnote_Cataract
    ```

    **Phacoemulsification Details:**

    * Incision type, size, and location
    * Phaco technique (divide and conquer, chop, etc.)
    * Difficulty score
    * Capsulorhexis quality
    * IOL type, power, and position
    * Wound closure method
    * Intraoperative complications:
      * Posterior capsule rupture
      * Vitreous loss
      * Zonular dialysis
      * Descemet's membrane detachment
      * Other complications

    **Biometry Integration:**

    ```php theme={null}
    Element_OphTrOperationnote_Biometry
    ```

    Links to pre-operative biometry for IOL selection verification
  </Accordion>

  <Accordion title="Vitreoretinal Surgery">
    ```php theme={null}
    Element_OphTrOperationnote_Vitrectomy
    ```

    **Vitrectomy Details:**

    * Gauge (20G, 23G, 25G, 27G)
    * Sclerotomy sites
    * Lens status (phakic/pseudophakic)
    * Core vitrectomy completed
    * Peripheral vitrectomy
    * PVD induction method

    **Additional Procedures:**

    **Membrane Peel:**

    ```php theme={null}
    Element_OphTrOperationnote_MembranePeel
    ```

    * ILM peel
    * ERM peel
    * Staining used (ICG, BBG, Triamcinolone)

    **Tamponade:**

    ```php theme={null}
    Element_OphTrOperationnote_Tamponade
    ```

    * Gas type and concentration (SF6, C2F6, C3F8)
    * Silicone oil (1000cs, 5000cs)
    * Air or BSS
    * Fill percentage

    **Buckle:**

    ```php theme={null}
    Element_OphTrOperationnote_Buckle
    ```

    * Encircling or segmental
    * Buckle type and size
    * Drain performed
    * Retinopexy method
  </Accordion>

  <Accordion title="Glaucoma Surgery">
    **Trabeculectomy:**

    ```php theme={null}
    Element_OphTrOperationnote_Trabeculectomy
    ```

    * Conjunctival incision (fornix-based, limbal-based)
    * Scleral flap size and thickness
    * Sclerectomy/trabeculectomy details
    * Peripheral iridectomy
    * Releasable sutures
    * Bleb appearance
    * Post-op IOP

    **Tube/Shunt Procedures:**

    ```php theme={null}
    Element_OphTrOperationnote_GlaucomaTube
    Element_OphTrOperationnote_RevisionAqueousShunt
    ```

    * Implant type (Baerveldt, Ahmed, Molteno)
    * Plate size
    * Tube placement (anterior chamber, pars plana)
    * Tube position and length
    * Patch graft material

    **MIGS Procedures:**

    ```php theme={null}
    Element_OphTrOperationnote_Trabectome
    ```

    * Trabectome, iStent, XEN, etc.
    * Angle approach
    * Degree of treatment
    * Hyphema control

    **Adjunctive MMC:**

    ```php theme={null}
    Element_OphTrOperationnote_Mmc
    ```

    * MMC concentration
    * Duration of application
    * Area of application
    * Washout technique
  </Accordion>

  <Accordion title="Corneal/Refractive Surgery">
    **Corneal Cross-Linking:**

    ```php theme={null}
    Element_OphTrOperationnote_CXL
    ```

    * Protocol (Dresden, accelerated)
    * Epithelium on/off
    * Riboflavin application
    * UV dosage and duration
    * Intraoperative pachymetry
  </Accordion>

  <Accordion title="Generic Procedures">
    ```php theme={null}
    Element_OphTrOperationnote_GenericProcedure
    ```

    For procedures without specific templates:

    * Free-text description
    * Laterality
    * Complications
    * Technique details
  </Accordion>
</AccordionGroup>

### Supporting Elements

#### Post-Operative Drugs

```php theme={null}
Element_OphTrOperationnote_PostOpDrugs
```

Medications given at end of surgery or prescribed post-operatively:

* Subconjunctival injections (antibiotic, steroid)
* Intracameral antibiotics
* Topical drops to commence
* Systemic medications

Integrates with OphDrPrescription for post-op medication orders.

#### Comments

```php theme={null}
Element_OphTrOperationnote_Comments
```

Free-text notes for:

* Additional operative details
* Unusual findings
* Intraoperative decisions
* Post-operative instructions
* Follow-up recommendations

#### VTE Assessment

```php theme={null}
Element_OphTrOperationnote_VteAssessment
```

Venous thromboembolism risk assessment for general anaesthetic cases.

### Surgical Documentation Workflow

<Steps>
  <Step title="Pre-Population">
    If linked to booking, procedure details auto-populate
  </Step>

  <Step title="Confirm Procedures">
    Verify and adjust procedures actually performed
  </Step>

  <Step title="Record Details">
    Complete procedure-specific elements with surgical findings and techniques
  </Step>

  <Step title="Document Complications">
    Record any intraoperative complications with severity and management
  </Step>

  <Step title="Post-Op Medications">
    Specify post-operative drug regimen
  </Step>

  <Step title="Sign Off">
    Surgeon signs and finalizes operation note
  </Step>
</Steps>

### Complication Documentation

Detailed complication recording with:

* **Type**: Categorized by complication
* **Severity**: Minor, moderate, major, sight-threatening
* **Management**: How complication was handled
* **Outcome**: Resolution status

<Note>
  Complication data feeds into surgical audit and quality improvement programs.
</Note>

## Supporting Modules

### OphTrConsent - Consent Forms

Electronic consent documentation:

* Procedure-specific consent templates
* Risks, benefits, and alternatives
* Complications and their probabilities
* Patient information leaflets
* Electronic signature capture
* Capacity assessment

### OphTrOperationchecklists - WHO Checklists

Digital WHO surgical safety checklist:

* **Sign In**: Before anaesthesia
* **Time Out**: Before skin incision
* **Sign Out**: Before patient leaves theatre

Tracks:

* Patient identity confirmation
* Site and laterality verification
* Consent confirmation
* Equipment checks
* Team briefing
* Specimen handling
* Instrument/swab counts

## Surgical Audit & Reporting

<CardGroup cols={2}>
  <Card title="Case Volume" icon="chart-column">
    Track surgical activity by procedure, surgeon, and time period
  </Card>

  <Card title="Complications" icon="triangle-exclamation">
    Analyze complication rates and trends
  </Card>

  <Card title="Outcomes" icon="chart-line">
    Monitor surgical outcomes and visual results
  </Card>

  <Card title="Waiting Times" icon="clock">
    Report on time from listing to surgery
  </Card>
</CardGroup>

### National Audit Integration

Data can be extracted for:

* National Ophthalmology Database (NOD)
* Royal College audits
* Local clinical governance
* Research databases

## Best Practices

<CardGroup cols={2}>
  <Card title="Timely Documentation" icon="clock">
    Complete operation note immediately after surgery while details are fresh
  </Card>

  <Card title="Accurate Complications" icon="exclamation-circle">
    Document all complications honestly for learning and quality improvement
  </Card>

  <Card title="Link to Booking" icon="link">
    Always link operation note to original booking for complete audit trail
  </Card>

  <Card title="Verify Details" icon="check-double">
    Confirm patient, eye, and procedure match WHO checklist and consent
  </Card>

  <Card title="Post-Op Instructions" icon="clipboard-list">
    Clearly document post-operative care plan and follow-up arrangements
  </Card>

  <Card title="Teaching Cases" icon="graduation-cap">
    Properly document supervision level for training cases
  </Card>
</CardGroup>

## Troubleshooting

<Accordion title="Can't Schedule Operation">
  **Possible Causes:**

  * No theatre sessions configured for selected date range
  * Selected procedure duration exceeds available session time
  * Theatre not available for selected subspecialty
  * User lacks permission to schedule for selected surgeon

  **Solutions:**

  * Contact theatre coordinator to add sessions
  * Split procedures across multiple sessions
  * Verify theatre configuration
  * Check user permissions
</Accordion>

<Accordion title="Booking Details Not Populating Operation Note">
  **Check:**

  * Operation note is correctly linked to booking event
  * Booking has scheduled procedures recorded
  * No data migration issues
  * Create new operation note from booking event directly
</Accordion>

## Related Documentation

<CardGroup cols={3}>
  <Card title="Biometry" icon="ruler" href="/modules/biometry">
    Pre-operative measurements for cataract surgery
  </Card>

  <Card title="Examination" icon="eye" href="/modules/examination">
    Post-operative examination findings
  </Card>

  <Card title="User Guide" icon="book" href="/user-guide">
    Step-by-step surgical workflows
  </Card>
</CardGroup>
