What are talking about? Clubs agree terms with players before medicals all the time. If you find the heart condition, the agreed terms are void as they were subject to success in the medical.
Terms might well be agreed but the contract isn't actually signed until after the medical.