Hospital-based medical records are abstracted to create International Classification of Disease (ICD) coded discharge health data in many countries. The 'main condition' is not defined in a consistent manner internationally. Some countries employ a 'reason for admission' rule as the basis for the main condition, while other countries employ a 'resource use' rule. A few countries have recently transitioned from one of these approaches to the other. The definition of 'main condition' in such ICD data matters when it is used to define a disease cohort to assign diagnosis-related groups and to perform risk adjustment. We propose a method of harmonizing the international definition to enable researchers and international organizations using ICD-coded health data to aggregate or compare hospital care and outcomes across countries in a consistent manner. Inter-observer reliability of alternative harmonization approaches should be evaluated before finalizing the definition and adopting it worldwide.