Background. Information on prescribing quality is increasingly used by policy makers, insurance companies and health care providers. For reliable assessment of prescribing quality it is important to correctly identify the patients eligible for recommended treatment. Often either diagnostic codes or clinical measurements are used to identify such patients. We compared these two approaches regarding the outcome of the prescribing quality assessment and their ability to identify treated and undertreated patients. Methods. The approaches were compared using electronic health records for 3214 diabetes patients from 70 general practitioners. We selected three existing prescribing quality indicators (PQI) assessing different aspects of treatment in patients with hypertension or who were overweight. We compared population level prescribing quality scores and proportions of identified patients using definitions of hypertension or being overweight based on diagnostic codes, clinical measurements or both. Results. The prescribing quality score for prescribing any antihypertensive treatment was 93% (95% confidence interval 90-95%) using the diagnostic code-based approach, and 81% (78-83%) using the measurement-based approach. Patients receiving antihypertensive treatment had a better registration of their diagnosis compared to hypertensive patients in whom such treatment was not initiated. Scores on the other two PQI were similar for the different approaches, ranging from 64 to 66%. For all PQI, the clinical measurement -based approach identified higher proportions of both well treated and undertreated patients compared to the diagnostic code -based approach. Conclusions. The use of clinical measurements is recommended when PQI are used to identify undertreated patients. Using diagnostic codes or clinical measurement values has little impact on the outcomes of proportion-based PQI when both numerator and denominator are equally affected. In situations when a diagnosis is better registered for treated than untreated patients, as we observed for hypertension, the diagnostic code-based approach results in overestimation of provided treatment. © 2010 Martirosyan et al.