\documentclass{article}
% Example to draw CONSORT diagrams
% dieter.menne at menne-biomed.de
% Dieter Menne, Dr. Menne Biomed Consulting, T�bingen
% http://www.consort-statement.org/Downloads/download.htm

% Here is the batch file I use to compile this under Windows
% You must remove the leading % and put the lines into a 
% file with extension .cmd, e.g. pstree.cmd
% Provide the tex-file on the command line without extension, e.g.
% pstree tree101

% del %1.dvi,%1.aux,*.log,%1-pics.ps,%1-pics.pdf,%1.pdf
% pdflatex %1.tex
% latex %1.tex
% dvips -o %1-pics.ps %1.dvi
% ps2pdf %1-pics.ps
% 1-pics.pdf

\usepackage{pst-tree,pst-pdf}
% paralist makes for nice indented, but is not really needed
\usepackage[alwaysadjust]{paralist}

\newcommand\tA{
  \centering
  Accessed for eligibility \\
  $n=2800$  
}

% The content of the tree. This part could be created 
% by a program with database lookup, e.g. with Sweave and R
% I strongly recommend to separate content from structure as 
% done here, otherwise you can easily get lost in the 
% curly brackets forest when constructing the tree.
\newcommand\tB{
  \begin{compactitem}[ ]
    \item 1483 Excluded 
    \begin{compactitem}[-]
      \item 391 Not meeting inclusion criteria
      \item 886 Refused to participate
      \begin{compactitem}[-]
        \item 147 Age $> 60 < 18$ years
        \item ~94 Language 
      \end{compactitem}
    \end{compactitem}
  \end{compactitem}
}

\newcommand\tC{
  \begin{compactitem}[ ]
    \item 55 Allocated to intervention
    \item 45 Received allocated intervention
    \item 23 No allocated intervention
    \begin{compactitem}[-]
      \item 12 Refused muggle magic
      \item 22 Broke vials
    \end{compactitem}
  \end{compactitem}
}

\newcommand\tD{
  \begin{compactitem}[ ]
    \item 13 Lost to follow-up
    \begin{compactitem}[-]
      \item 7 Moved to New Zealand
      \item 2 Unknown
    \end{compactitem}
    \item 45 Discontinued intervention
    \begin{compactitem}[-]
      \item 12 Overly hair growth 
      \item 22 Severe agnostics
    \end{compactitem}
  \end{compactitem}
}

\newcommand\tE{
  \begin{compactitem}[ ]
    \item 13 Analysed
    \item 45 Excluded from Analysis
    \begin{compactitem}[-]
      \item 11 CRF lost in tram 
      \item 19 Dog ate pages
    \end{compactitem}
  \end{compactitem}
}

% The normal box
\newcommand\CBox[1]{\Tr{\psshadowbox{\parbox{6cm}{#1}}}}

% The right stub box as used for excluded patients
\newcommand\CRStub[2]{%
  \pstree[treemode=R]{\Tr{\framebox{\textbf{#1}}}}{%
  \renewcommand{\psedge}[2]{%   
  \ncangle[angleA=0,angleB=180]{##1}{##2}} \CBox{#2}}}

% Standard connecting line is top to bottom rectangular
% When you uncomment this, flowchart has diagonals which
% look more like the original version, but separation
% between levels should be increased
\renewcommand{\psedge}[2]{%
  \ncangle[angleA=-90,angleB=90]{#1}{#2}}


\newcommand\RComment[1]{%
  \Tr[edge={\ncline[linestyle=none,arrows=-]}]{\framebox{\textbf{#1}}}
}

\pagestyle{empty}

\begin{document}
% We are using the * version of levelsep, so you should run
% the program twice to geht
\psset{levelsep=*0.7cm,arrows=->}

\pstree {\CBox{\tA}}{
  \pstree{\CRStub{Enrollment}{\tB}}{
    \pstree{\CBox{\tC}}{
      \pstree{\CBox{\tD}}{
        \CBox{\tE}
      }
    }
    \pstree{\RComment{Treatment}}{
      \pstree{\RComment{Follow-up}}{
        \RComment{Analysis}
      }
    }
    \pstree{\CBox{\tC}}{
      \pstree{\CBox{\tD}}{
        \CBox{\tE}
      }
    }
  }
}

\end{document}
