Diabetes militus is classified into two types, namely type 1 and type 2, the disease ranks top as a non-communicable disease with a high number of sufferers. The determination of diagnoses and diagnosis codes must be precise so that the codes given by PMIK can be declared specific and appropriate, therefore it is necessary to review the provision of diagnosis codes on patients to determine the factors that cause non-specific and inappropriate codes based on age and gender and present the distribution of diabetes militus in Magelang City. The method used was descriptive qualitative by observing 144 medical record documents of patients with the main diagnosis of diabetes mellitus. The results showed that the specification of the main diagnosis of diabetes mellitus in Magelang City Hospital was 100%. The suitability of the main diagnosis code of diabetes mellitus based on the category can be concluded that the specific and appropriate code was found as much as 61%. While specific and inappropriate codes were found at 39%. The age of patients with diabetes is 23-90 years old, with the average age of patients being 59 years old. Patients with 56 years of age occupied the highest number of sufferers. Patients with female gender are more dominant in experiencing diabetes militus, when presented it reaches 63% while male patients are only 37%. The highest distribution of patients with diabetes mellitus in Magelang Hospital came from outside the city, namely Magelang District or 68%. Patients in Magelang city only reached 32%. Suggestions for further research would be better to consider taking the file period to avoid recording medical records during the media transfer period