A Natural Language Processing (NLP) system inspired by the one available within the i2b2 project, has been implemented in order to exploit the information available in diagnosis documents of headache disorder. The system, after a lexical and syntactical analysis of textual files, is able to extract different types of clinical concepts, like principal diagnosis, comorbidities, therapies, etc. These data are then stored in a multidimensional database designed for further inspection and analysis through appropriate exploration tools (figure 1). The NLP system has been evaluated on 452 documents related to hospitalizations along the period 2008-2009. From these documents observations (diagnoses, medications, disability scores, comorbidities) have been extracted and stored into a data warehouse useful for an effective phenotypes inspection and analysis.