%------------------------------------------------------------------
% Author: Karsten Hilbert
% License: GPL v2 or later
%------------------------------------------------------------------

\listfiles

%\documentclass[english]{article}
\documentclass{article}

\usepackage[cjkjis,graphics]{ucs}			% lots of UTF8 symbols, breaks with xelatex
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{longtable}
\usepackage{tabu}
%\usepackage{ragged2e}
\usepackage{tabularx}
\usepackage{afterpage}
\usepackage{fancyhdr}
\usepackage[a4paper]{geometry}
\usepackage{lastpage}
\usepackage[ngerman]{babel}					% Deutsch und Trennung
\usepackage{hyperref}


\geometry{verbose,lmargin=2.54cm}
\pagestyle{fancy}

\setlength{\headheight}{13.6pt}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}


\lhead[]{}
\rhead[]{}
\lfoot[\thepage\ / \pageref{LastPage}]{{\tiny \href{http://www.gnumed.org}{GNUmed} $<client_version::::>$: $<form_name_long::::60>$ v$<form_version::::20>$}}
\cfoot[]{}
\rfoot[{\tiny \href{http://www.gnumed.org}{GNUmed} $<client_version::::>$: $<form_name_long::::60>$ v$<form_version::::20>$}]{\thepage\ / \pageref{LastPage}}

\begin{document}

\afterpage{\lhead[Medikamentenliste von $<lastname::::>$, $<firstname::::>$ ($<date_of_birth::%Y %B %d::>$)]{Medikamentenliste von $<lastname::::>$, $<firstname::::>$ ($<date_of_birth::%Y %B %d::>$}}
\afterpage{\rhead[$<today::%Y %B %d::>$]{$<today::%Y %B %d::>$}}


\noindent \begin{center}
{\LARGE	Aktuelle Medikamente} \\
{\large
	Gedruckt: $<today::%Y %B %d::>$ \\
	Arzt: $<current_provider::::>$
}
\end{center}

\noindent
Patient: $<lastname::::>$, $<firstname::::>$ \\
Geburtsdatum: $<date_of_birth::%Y %B %d::>$ \\
{\footnotesize
	$<adr_street::home::>$ $<adr_number::home::>$ \\
	$<adr_postcode::home::>$ $<adr_location::home::>$
}

%\vspace*{\medskipamount}

%------------------------------------------------------------------
$<current_meds_table::latex::>$

$<current_meds_notes::latex::>$

%------------------------------------------------------------------
$<free_text::Hinweise an den Patienten::9999>$
%------------------------------------------------------------------

% uncomment, if and as needed, the next lines to append text below the table
%{\footnotesize			% start smaller font
% <any line(s) of info you wish to always be printed immediately below the table>
%}						% end smaller font
%------------------------------------------------------------------

\vfill{}

%------------------------------------------------------------------
\noindent Bislang bekannte Allergien:

\noindent $<allergy_state::::>$

\noindent \begin{tabularx}{\textwidth}{|l|l|X|}
\hline
Auslöser & Typ & Reaktion\tabularnewline
\hline
$<allergies::%(descriptor)s & %(l10n_type)s & {\footnotesize %(reaction)s} \tabularnewline \hline::>$
\end{tabularx}
%------------------------------------------------------------------

\medskip{}


\noindent \begin{flushright}
\texttt{\textsl{\footnotesize Stempel / Unterschrift}}
\par\end{flushright}
\end{document}

%------------------------------------------------------------------
