Yes, dismissal on grounds of 'capability' is one of the fair reasons for terminating a contract, so is lawful PROVIDED the company followed the correct procedures.
Phoning for updates is also justified - the employer needs to know what is going on, when you are likely (if ever) to be fit for work and so in. It is proper absence management.
Don't forget the employer needs to provide cover for a sick employee's absence and may have taken on temporary staff or allocated overtime.
Your employer may have been insensitive but as long as the correct procedures were followed he has not acted unlawfully.