\\documentclass{letter}
\\address{ @"%(title)s %(first)s %(last)s" % user.get_names ()@ \\\\ 
@"%(number)s %(street)s" % user['addresses']['work']@ \\\\
@"%(city)s %(postcode)s" % user['addresses']['work']@ \\\\}
\\signature{ @"%(title)s %(first)s %(last)s" % user.get_names ()@}
\\begin{document}
\\begin{letter}{@"%(title)s %(first)s %(last)s" % addressee.get_names ()@ \\\\ 
@"%(number)s %(street)s" % address@ \\\\
@"%(urb)s %(postcode)s" % address@ \\\\} }

\\opening{Dear @"%(title)s %(first)s %(last)s" % addressee.get_names ()@ }

\\textbf{Re:} @"%(first)s %(last)s" % patient.get_names ()@, 
@"%(number)s %(street)s, %(city)s %(postcode)s" % patient['addresses']['home']@, 
DOB: @patient.getDOB ().Format ('%x')@

@text@

\\ifnum@incl_meds@>0
\\textbf{Medications List}

\\begin{tabular}{lll}
@[[med['name'], med['form'], med['direction']] for med in clinical.getMedicationsList ()]@
\\end{tabular}
\\fi

\\ifnum@flags['incl_phx']@>0
\\textbf{Disease List}

\\begin{tabular}{ll}
@[[phx['diagnosis'], phx['started']] for phx in clinical.getPastHistory ()]@
\\end{tabular}
\\fi

\\closing{Yours sincerely,}

\\end{letter}
\\end{document}