Elements of coding quality in medical records include reliability, completeness, validity, and timeliness. This analytical study, employing a quantitative approach, evaluated medical record files of patients with injuries and external cause cases at Ibnu Sina Hospital, Gresik, from October to December 2022. Using the Slovin formula, 161 samples were randomly selected from a population of 271 records. The study variables were reliability (diagnosis readability), completeness (diagnostic code completeness), and validity (5th digit use, diagnosis code accuracy, and external cause code accuracy). Data were analyzed using SPSS and the Chi-Square test. The study found significant relationships between the validity of diagnosis codes and the quality of medical records (p = 0.0001). Reliability showed no significant impact (p = 0.470), while completeness (p = 0.0001) and the use of the 5th digit (p = 0.0001) were significantly related to diagnosis code accuracy. These findings highlight the critical role of accurate coding in improving medical record quality and suggest targeted improvements in coding practices. Highlight: Significant Link: Diagnosis code accuracy is crucial for medical record quality. Critical Factors: Completeness and 5th digit use are key for accurate coding. Targeted Improvements: Focused coding practice enhancements can boost record quality. Keyword: coding quality, reliability, completeness, validity, medical records