\setupoutput[pdftex]

\setuppapersize[S6][S6]

\mainlanguage[de]
\useencoding[win]

\setupcolors[state=start, rgb=yes]

\definecolor[labor]  [r=0.9, b=0.8, g=0.8]
\definecolor[klinik] [r=0.8, b=0.8, g=0.9]
\definecolor[scanner][r=0.85, b=0.8, g=0.85]
\definecolor[archiv] [r=0.85, b=0.85, g=0.8]
\definecolor[messung][r=0.8, b=0.9, g=0.8]
\definecolor[geninfo][r=0.8, b=0.85, g=0.85]

\definecolor[fremd][r=0.75, b=0.25, g=0.25]

\usemodule[chart]
\setupFLOWcharts[nx=6, ny=5, 
                 dx=1.5\bodyfontsize, dy=1.5\bodyfontsize,
                 width=5\bodyfontsize, height=3\bodyfontsize,
                 maxwidth=\textwidth]
                 %,option=test]

\setupinteraction[state=start]

\setuphead[subject][page=yes]

\starttext
\startFLOWchart[alle]
  %%--------------------------------------------------------%%
  %%------------------ klinischer Bereich ------------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=klinik]
  %%----------------
  %%  Verlauf
  %%----------------
  \startFLOWcell
    \name{Verlauf}
    \location{5,5}
    \shape{action}
    \connection[lr]{Person}
    \text{Verlauf}
    \destination{tab:Verlauf}
  \stopFLOWcell
  %%----------------
  %%  Befundparameter
  %%----------------
  \startFLOWcell
    \name{Befund}
    \location{6,4}
    \shape{action}
    \text{Befundparameter}
    \destination{tab:Befund}
    \connection[lr]{Verlauf}
  \stopFLOWcell
  %%----------------
  %%  Verlaufsparameter
  %%----------------
  \startFLOWcell
    \name{Labor}
    \location{6,5}
    \shape{action}
    \connection[lr]{Verlauf}
    \text{Verlaufsparameter}
    \destination{tab:Labor}
  \stopFLOWcell
  %%----------------
  %%  Person
  %%----------------
  \startFLOWcell
    \name{Person}
    \location{4,5}
    \shape{action}
    \setupFLOWlines[arrow=no]
      \connection[lr]{Exemplar}
    \setupFLOWlines[arrow=yes]
    \text{Person}
    \destination{tab:Person}
  \stopFLOWcell
  %%----------------
  %%  Lebewesen
  %%----------------
  \startFLOWcell
    \name{Lebewesen}
    \location{4,4}
    \shape{action}
    \setupFLOWlines[arrow=no]
      \connection[lr]{Exemplar}
    \setupFLOWlines[arrow=yes]
    \text{Lebewesen}
    \destination{tab:Lebewesen}
  \stopFLOWcell
  %%----------------
  %%  Exemplar
  %%----------------
  \startFLOWcell
    \name{Exemplar}
    \location{3,5}
    \shape{action}
    \text{Exemplar}
    \destination{tab:Exemplar}
  \stopFLOWcell
  %%--------------------------------------------------------%%
  %%--------------------- Laborbereich ---------------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=labor]
  %%----------------
  %%  Sample
  %%----------------
  \startFLOWcell
    \name{Sample}
    \location{1,5}
    \shape{action}
    \connection[rl]{Exemplar}
    \text{Sample}
    \destination{tab:Sample}
  \stopFLOWcell
  %%----------------
  %%  Extrakt
  %%----------------
  \startFLOWcell
    \name{Extrakt}
    \location{1,4}
    \shape{action}
    \text{Extrakt}
    \destination{tab:Extrakt}
    \connection[bt]{Sample}
  \stopFLOWcell
  %%--------------------
  %%  markierter Extrakt
  %%--------------------
  \startFLOWcell
    \name{markExtrakt}
    \location{2,4}
    \shape{action}
    \text{markierter Extrakt}
    \destination{tab:markExtrakt}
    \connection[lr]{Extrakt}
  \stopFLOWcell
  %%--------------------------------------------------------%%
  %%---------------- Scannen, Hybridisieren ----------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=scanner]
  %%--------------------
  %%  Hybridisierung
  %%--------------------
  \startFLOWcell
    \name{Hybridisierung}
    \location{2,3}
    \shape{action}
    \text{Hybridisierung}
    \destination{tab:Hybridisierung}
    \setupFLOWlines[dash=yes, arrow=no]
      \connection[bt]{markExtrakt}
    \setupFLOWlines[dash=no, arrow=yes]
    \connection[lr]{Chip\-exemplar}
  \stopFLOWcell
  %%--------------------
  %%  Chipexemplar
  %%--------------------
  \startFLOWcell
    \name{Chipexemplar}
    \location{1,3}
    \shape{action}
    \text{Chipexemplar}
    \destination{tab:ChipExemplar}
    \connection[tb]{Chiptyp}
  \stopFLOWcell
  %%--------------------
  %%  Chiptyp
  %%--------------------
  \startFLOWcell
    \name{Chiptyp}
    \location{1,2}
    \shape{action}
    \text{Chiptyp}
    \destination{tab:ChipTyp}
  \stopFLOWcell
  %%--------------------
  %%  Image
  %%--------------------
  \startFLOWcell
    \name{Image}
    \location{3,3}
    \shape{action}
    \connection[lr]{Hybridisierung}
    \connection[lr]{CD-Archiv}
    \connection[bt]{Scannen}
    \text{Image}
    \destination{tab:Image}
  \stopFLOWcell
  %%--------------------
  %%  Scannen
  %%--------------------
  \startFLOWcell
    \name{Scannen}
    \location{3,4}
    \shape{action}
    \text{Scanverfahren}
    \destination{tab:Scannen}
  \stopFLOWcell
  %%--------------------------------------------------------%%
  %%---------------------- Archivieren ---------------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=archiv]
  %%--------------------
  %%  CD
  %%--------------------
  \startFLOWcell
    \name{CD}
    \location{2,1}
    \shape{action}
    \text{Datentr\"ager}
    \destination{tab:CD}
  \stopFLOWcell
  %%--------------------
  %%  CD-Archiv
  %%--------------------
  \startFLOWcell
    \name{CD-Archiv}
    \location{2,2}
    \shape{action}
    \text{CD-Archivdatei}
    \destination{tab:CD-Archiv}
    \connection[lr]{Chiptyp}
    \connection[tb]{CD}
  \stopFLOWcell
  %%--------------------
  %%  Projekt
  %%--------------------
  \startFLOWcell
    \name{Projekt}
    \location{3,1}
    \shape{action}
    \text{Projekt}
    \destination{tab:Projekt}
    \setupFLOWlines[dash=yes, arrow=no]
      \connection[bt]{Image}
    \setupFLOWlines[dash=no, arrow=yes]
  \stopFLOWcell
  %%--------------------------------------------------------%%
  %%------------------ Expressionsmessung ------------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=messung]
  %%--------------------
  %%  Messung
  %%--------------------
  \startFLOWcell
    \name{Messung}
    \location{4,2}
    \shape{action}
    \connection[lr]{Image}
    \connection[rl]{ProbeSet}
    \connection[tb]{Normal}
    \text{Messung}
    \destination{tab:Messung}
  \stopFLOWcell
  %%--------------------
  %%  Normalisierung
  %%--------------------
  \startFLOWcell
    \name{Normal}
    \location{4,1}
    \shape{action}
    \text{Normalisierung}
    \destination{tab:Normal}
  \stopFLOWcell
  %%--------------------------------------------------------%%
  %%------------------- Genspezifisches --------------------%%
  %%--------------------------------------------------------%%
  \setupFLOWcharts[backgroundcolor=geninfo]
  %%--------------------
  %%  Probe Set
  %%--------------------
  \startFLOWcell
    \name{ProbeSet}
    \location{5,2}
    \shape{action}
    \connection[tb]{Gen}
    \text{Sondensatz}
    \destination{tab:ProbeSet}
  \stopFLOWcell
  %%--------------------
  %%  Probe
  %%--------------------
  \startFLOWcell
    \name{Probe}
    \location{5,3}
    \shape{action}
    \connection[tb]{ProbeSet}
    \text{Sonde (Oligo)}
    \destination{tab:Probe}
  \stopFLOWcell
  %%--------------------
  %%  Feature
  %%--------------------
  \startFLOWcell
    \name{Feature}
    \location{6,3}
    \shape{action}
    \connection[lr]{Probe}
    \text{Feature}
    \destination{tab:Feature}
  \stopFLOWcell
  %%--------------------
  %%  Gen
  %%--------------------
  \startFLOWcell
    \name{Gen}
    \location{5,1}
    \shape{action}
    \text{Gen}
    \destination{tab:Gen}
  \stopFLOWcell
\stopFLOWchart

\subject[diagramm]{Datenbank-Layout}
\FLOWchart[alle]

\subject[dia-scan]{Expressionsmessung}
\setupFLOWcharts[x=1, y=2, nx=3, ny=3]
\FLOWchart[alle]

\subject[dia-labor]{Labor}
\setupFLOWcharts[x=1, y=4, nx=2, ny=2]
\FLOWchart[alle]

\subject[dia-klinik]{biologisch-medizinischer Hintergrund}
\setupFLOWcharts[x=3, y=4, nx=4, ny=2]
\FLOWchart[alle]

\subject[dia-archiv]{Archivierung}
\setupFLOWcharts[x=1, y=1, nx=3, ny=3]
\FLOWchart[alle]

\subject[dia-normal]{Expressionen}
\setupFLOWcharts[x=1, y=1, nx=2, ny=2]
\FLOWchart[alle]

\subject[dia-geninfo]{Gen-bezogene Information}
\setupFLOWcharts[x=4, y=1, nx=3, ny=3]
\FLOWchart[alle]

\stoptext

