An implantable medical device has an impedance processor for determining atrial impedance data reflective of the cardiogenic impedance of an atrium of a heart during diastole and/or systole of heart cycle. Ventricular impedance data reflective of the cardiogenic impedance of a ventricle during diastole and/or systole are also determined. The determined impedance data are processed by a representation processor for estimating a diastolic and/or a systolic atrial impedance representation and a diastolic and/or a systolic ventricular impedance representation. A condition processor determines the presence of any heart valve malfunction, such as valve regurgitation and/or stenosis, of at least one heart valve based on the estimated atrial and ventricular impedance representations.