Skip to main content

OphCoCorrespondence - Letters

The OphCoCorrespondence module provides robust letter generation and clinical correspondence capabilities, enabling efficient communication with GPs, patients, and other healthcare providers.

Overview

OphCoCorrespondence handles all clinical correspondence needs:
  • GP clinic letters
  • Patient letters
  • Internal referral letters
  • Discharge summaries
  • Investigation result notifications
  • Specialist-to-specialist correspondence
The module supports both printed and electronic letter distribution, with template-based content generation and digital signature capabilities.

Core Element - ElementLetter

The primary model for correspondence:
ElementLetter

Key Properties

Header Information:
  • use_nickname: Whether to use patient’s preferred name
  • date: Letter date
  • site_id: Sending hospital site
  • direct_line: Contact phone number
  • fax: Fax number (where applicable)
  • clinic_date: Date of clinic visit referenced
Recipient Details:
  • address: Recipient address (GP, consultant, patient)
  • to_subspecialty_id: Destination subspecialty for internal referrals
  • to_firm_id: Destination team/firm for internal referrals
  • to_location_id: Destination location
Content Fields:
  • introduction: Opening paragraph
  • re: Subject line (patient details)
  • body: Main letter content
  • footer: Closing paragraph and sign-off
  • cc: Carbon copy recipients
Status & Workflow:
  • draft: Draft status (not finalized)
  • print: Marked for printing
  • print_all: Print all attachments with letter
  • locked: Letter finalized and locked from editing
  • is_signed_off: Electronic signature applied
  • letter_type_id: Type of letter (GP, patient, etc.)
Urgency & Clinical Flags:
  • is_urgent: Urgent correspondence flag
  • is_same_condition: Referral for same condition
Supersession:
  • supersession_id: Links to letter this replaces (for corrections/addenda)

Letter Types

Configurable letter types for different correspondence needs:

GP Letter

Standard clinic letter to general practitioner documenting examination and management

Patient Letter

Letter to patient explaining diagnosis, treatment plan, or test results

Internal Referral

Referral to another subspecialty within the same organization

External Referral

Referral to another hospital or specialist service

Discharge Summary

Summary letter on discharge from service

Results Letter

Notification of investigation results

Letter Templates

The correspondence module uses powerful templating to auto-populate letter content from clinical data.

Template Structure

Letters consist of modular sections:
Purpose: Opening paragraph establishing contextCommon Content:
  • Thank you for referring this patient
  • I reviewed this patient in clinic on [date]
  • This patient attended for [appointment type]
  • Re-referral regarding [condition]
Macros Available:
  • [clinic_date] - Date of appointment
  • [appointment_type] - Type of visit
  • [referring_doctor] - Name of referring clinician
Purpose: Main clinical contentTypical Structure:
  1. Presenting complaint/reason for visit
  2. Relevant history
  3. Examination findings
  4. Investigation results
  5. Diagnosis
  6. Management plan
  7. Follow-up arrangements
Auto-Population: Content can be automatically inserted from:
  • OphCiExamination elements
  • Operation notes
  • Investigation results
  • Medication changes
  • Diagnostic codes

Macro System

Powerful macro/snippet system for dynamic content:
  • [patient_name] - Full name
  • [patient_firstname] - First name
  • [patient_lastname] - Surname
  • [patient_title] - Title (Mr, Mrs, etc.)
  • [patient_dob] - Date of birth
  • [patient_age] - Current age
  • [patient_NHS_number] - NHS number
  • [patient_hospital_number] - Hospital MRN
  • [patient_address] - Full address
  • [diagnosis_left] - Left eye diagnosis
  • [diagnosis_right] - Right eye diagnosis
  • [visual_acuity_left] - Left VA
  • [visual_acuity_right] - Right VA
  • [iop_left] - Left eye pressure
  • [iop_right] - Right eye pressure
  • [current_medications] - Medication list
  • [allergies] - Patient allergies
  • [management_plan] - Treatment plan
  • [clinic_date] - Date of appointment
  • [clinic_time] - Appointment time
  • [clinic_location] - Clinic location
  • [consultant] - Seeing consultant
  • [next_appointment] - Follow-up date
  • [follow_up_period] - Interval to next visit
  • [gp_name] - GP name
  • [gp_address] - GP address
  • [letter_date] - Date of letter
  • [site_name] - Hospital name
  • [site_address] - Hospital address
  • [direct_line] - Contact phone number

Custom Snippets

Users can create reusable text snippets for:
  • Common clinical findings
  • Standard management plans
  • Procedure explanations
  • Patient advice paragraphs
  • Discharge instructions
Example Snippets:
Snippet: "diabetic_retinopathy_background"
Text: "Retinal examination revealed background diabetic retinopathy 
with scattered microaneurysms and dot hemorrhages. The macula 
appears healthy with no evidence of macular edema."

Snippet: "cataract_post_op"
Text: "The patient has made an excellent recovery from cataract surgery. 
The eye is quiet with the IOL well positioned. I have advised to 
continue the drops for a further 2 weeks and then stop."

Letter Generation Workflow

1

Create Correspondence Event

From patient record, create new correspondence event
2

Select Letter Type

Choose appropriate letter type (GP, patient, referral, etc.)
3

Select Recipient

Choose or enter recipient details (auto-populated for GP letters)
4

Select Template

Choose from available templates for letter type
5

Review Auto-Population

Template fills with data from recent examination/event
6

Edit Content

Customize letter content, add snippets, modify auto-populated text
7

Add CC Recipients

Specify carbon copy recipients (patient, consultants, etc.)
8

Review

Check letter content, formatting, and recipient details
9

Save or Finalize

Save as draft or finalize and lock letter
10

Sign and Distribute

Apply signature and send via print or electronic channels

Letter Workflow States

Draft Mode

Letters start in draft mode:
  • Can be edited and revised
  • Not visible to recipients
  • Not printed
  • Can be deleted
Draft Indicators:
$draft = true
$locked = false

Locked/Finalized

Once finalized:
  • Content locked from editing
  • Available for printing
  • Visible in patient record
  • Cannot be deleted (only superseded)
Finalized Indicators:
$draft = false
$locked = true

Signed

Electronic signature applied:
  • Digital signature captured or credential-based signing
  • Timestamp recorded
  • Signing clinician identified
  • Letter authenticated for legal purposes
Signature Properties:
$is_signed_off = true

Superseded

Corrections or addenda:
  • Original letter remains in record
  • New letter created with supersession_id linking to original
  • Both versions available for audit trail
  • Clear indication that newer version supersedes
Supersession Link:
$supersession_id = [original_letter_id]

Distribution Methods

Printing

Electronic Distribution

GP System Integration

Direct messaging to GP clinical system via NHS mail or spine integration

Patient Portal

Secure patient access to letters via online portal

Email

Secure email with encryption for appropriate recipients

Fax

Legacy fax transmission where required

Internal Referrals

Special handling for internal referrals between subspecialties:

Referral Properties

$to_subspecialty_id  // Destination subspecialty
$to_firm_id          // Destination team
$to_location_id      // Destination clinic location
$is_same_condition   // Whether same condition as current care
$is_urgent           // Urgency flag

Referral Workflow

  1. Create Internal Referral Letter: Select internal referral letter type
  2. Choose Destination: Select subspecialty and firm
  3. Indicate Urgency: Flag urgent referrals
  4. Provide Clinical Details: Complete referral with reason and relevant information
  5. Submit: Referral appears in destination subspecialty worklist
  6. Tracking: Monitor referral status and acceptance

Letter Contact Rules

OphTrOperationbooking_Letter_Contact_Rule
Automatic determination of letter recipients based on rules:
  • Patient type (new, follow-up, post-op)
  • Clinic type
  • Diagnosis
  • Procedure performed
  • Referral source
Example Rules:
  • Post-operative letters always CC to patient
  • Diabetic retinopathy letters CC to diabetes team
  • External referrals CC to referring consultant
  • New patient letters include full clinical details
  • Follow-up letters may be summary format

Configuration

Module Setup

'modules' => [
    'OphCoCorrespondence' => [
        'class' => 'application.modules.OphCoCorrespondence.OphCoCorrespondenceModule',
    ],
],

Template Management

Administrators can:
  • Create letter templates
  • Define macros and auto-population rules
  • Set default templates per letter type
  • Configure template availability by subspecialty
  • Manage snippet library

Site Configuration

Per-site settings:
  • Hospital letterhead details
  • Contact information
  • Digital signature configuration
  • Print settings
  • Electronic distribution endpoints

Integration with Clinical Modules

OphCiExamination Integration

Letters auto-populate from examination data:
  • Visual acuity measurements
  • IOP readings
  • Examination findings (anterior segment, fundus)
  • Diagnoses
  • Management plan
  • Follow-up arrangements
  • Clinic outcome

OphTrOperationnote Integration

Post-operative letters include:
  • Procedures performed
  • Surgical findings
  • Complications (if any)
  • IOL details (for cataract surgery)
  • Post-operative instructions
  • Follow-up plan

OphDrPrescription Integration

Medication information:
  • Current medications
  • Medication changes made
  • Stopped medications
  • Reasons for changes

Best Practices

Timely Correspondence

Send letters within institutional targets (typically 7-10 days of clinic)

Clear Language

Use clear, jargon-free language especially for patient letters

Accurate Recipients

Verify GP and patient details before finalizing

Complete Information

Include all relevant clinical information for continuity of care

Action Points

Clearly state any actions required by GP or patient

Appropriate CC

Carbon copy relevant parties (patient, other specialists)

Advanced Features

Bulk Letter Generation

Generate letters for multiple patients:
  • Post-clinic batch processing
  • Similar content for cohort (e.g., DNA letters)
  • Automated result notification

Letter Analytics

Turnaround Time

Track time from clinic to letter dispatch

Volume Reporting

Monitor correspondence volume by clinician/clinic

Template Usage

Analyze which templates are most used

Compliance

Report on letter completion targets

Version Control

Complete audit trail:
  • All letter versions retained
  • Modification history
  • User attribution
  • Timestamp tracking
  • Supersession chain

Troubleshooting

Possible Causes:
  • Data not present in source examination/event
  • Incorrect macro name
  • Examination not recent enough
  • Configuration issue with macro definition
Solutions:
  • Verify source data exists
  • Check macro spelling
  • Select specific event to pull data from
  • Review macro configuration
Check:
  • Required fields completed (recipient, date, etc.)
  • User has permission to finalize
  • No validation errors in content
  • Event is saved
Solutions:
  • Update patient GP details in demographics
  • Manually enter address
  • Check GP database integration
  • Contact PAS/registration team

Examination

Clinical data source for letter content

Operations

Surgical documentation for post-op letters

User Guide

Letter generation workflows

Further Information

Template Design

Creating and managing letter templates

Electronic Distribution

Configuring electronic correspondence channels

Build docs developers (and LLMs) love