Objective: To estimate how reliably and validly can medical students encode reasons for encounter and diagnoses using the International Classification of Primary Care, revised 2nd edition (ICPC-2-R). Methods: For every encounter they supervised during an entire semester, three family and community physician teachers entered the reasons for encounter and diagnoses in free text into a form. Two of four medical students and one teacher encoded each reason for encounter or diagnosis using the ICPC-2-R. In the beginning of the study, two three-hour workshops were held, until the teachers were confident the students were ready for the encoding. After all the reasons for encounter and the diagnoses had been independently encoded, the seven encoders resolved the definitive codes by consensus. We defined reliability as agreement between students and validity as their agreement with the definitive codes, and used Gwet’s AC1 to estimate this agreement. Results: After exclusion of encounters encoded before the last workshop, the sample consisted of 149 consecutive encounters, comprising 262 reasons for encounter and 226 diagnoses. The encoding had moderate to substantial reliability (AC1, 0.805; 95% CI, 0.767–0.843) and substantial validity (AC1, 0.864; 95% CI, 0.833–0.891). Conclusion: Medical students can encode reasons for encounter and diagnoses with the ICPC-2-R if they are adequately trained.