Discharge letters are an important means of communication between physicians and nurses from intensive care units and their colleagues from normal wards. The patient data management system (PDMS) used at our local intensive care units provides an export tool to create discharge letters by inserting data items from electronic medical records into predefined templates. Local intensivists criticized the limitations of this tool regarding the identification and the further processing of clinically relevant data items for a flexible creation of discharge letters. As our PDMS supports Arden Syntax, and the demanded functionalities are well within the scope of this standard, we set out to investigate the suitability of Arden Syntax for the generation of discharge letters. To provide an easy-to-understand facility for integrating data items into document templates, we created an Arden Syntax interface function which replaces the names of previously defined variables with their content in a way that permits arbitrary custom formatting by clinical users. Our approach facilitates the creation of flexible text sections by conditional statements, as well as the integration of arbitrary HTML code and dynamically generated graphs. The resulting prototype enables clinical users to apply the full set of Arden Syntax language constructs to identify and process relevant data items in a way that far exceeds the capabilities of the PDMS export tool. The generation of discharge letters is an uncommon area of application for Arden Syntax, considerably differing from its original purpose. However, we found our prototype well suited for this task and plan to evaluate it in clinical production after the next major release change of our PDMS.