Background: Irritable bowel syndrome (IBS) is a diagnosis based on symptom criteria. In order to perform epidemiologic studies based on national health-care registers there is a need to assess the accuracy of the diagnostic code in clinical practice at different time points. Aim: To evaluate the positive predictive value of the ICD-10 (International Classification of Diseases, version 10) code for in Sweden in hospital based outpatient care during 2005 (using the Rome II criteria) and 2010 (Rome III criteria). Methods: We identified all Swedish adults that had received the ICD-10 code for as the main diagnosis during hospitalbased outpatient care in 2005 and 2010 by use of the Swedish National Patient Register. We excluded individuals from the cohort if they had been diagnosed with predefined diagnoses, incompatible with IBS, during a time span of 6 months before or after the diagnosis. The National Board of Health and Welfare generated a random sample of 300 identities. Each medical record was retrieved and read by two of the authors (N.J. and H.T.) who noted if symptoms compatible with according to Rome II criteria (2005 cohort) or Rome III criteria (2010 cohort) could be identified. Results: We received a total of 248 medical records (2005, n=127; 2010, n=121). In 173 patients (70%), the diagnosis fulfilled diagnostic criteria with a high certainty and in 75 patients (30%) it did not. The proportions of valid diagnoses were similar in 2005 (Rome II criteria, 68%) and 2010 (Rome III criteria, 72%) (p=.41). Out of the 75 cases that did not fulfill diagnostic criteria, 24 were labeled probable IBS because of insufficient medical data. There was no difference when comparing tertiary (72% correct) and secondary care (69% correct) (p=.62), but a significant difference in accuracy was noted comparing departments of internal medicine (155/210, 74%) and non internal medicine departments (18/38, 47%) (p=.001). The most common reasons for a diagnosis being judged as not valid were: insufficient patient data available in 33 patients (13%), symptoms only including abdominal pain/discomfort or abnormal bowel habit in 19 patients (8%), an obvious misuse of the diagnosis in 12 patients (5%) and too short duration of symptoms in 11 cases (4%). Conclusion: The use of the ICD-10 diagnostic code for in Swedish secondary and tertiary care has a high validity in departments of internal medicine but less so in other departments. This finding needs to be addressed when planning and interpreting epidemiologic studies of IBS.