Not sure of what industry you work in, but it seems not very pastoral for a manager to mention your absence record while you're actually signed off by the doctor? Because if that happened to me, I'd be quite upset to be given an additional worry while trying to cope with an illness.
Obviously your contract of employment is key in this situation, but I would expect an employer, once you'd returned to work to arrange to discuss this with you in a non-confrontational way and to offer support, perhaps from Occupational Health to see if there is anything which might assist you in the workplace in terms of coping with your diabetes, particularly with the vision difficulties and even offer a staged return to work, or alter your work patterns if that would help. I would have thought that HR would be aware of your absences, and if they have an issue, would have contacted either you or your manager, rather than him taking the initiative?
Definitely, communication is the key between you and your manager and HR, and if there is someone who can support you in these conversations, that is even better. Most trade unions will provide advocacy support if needed, or you might have a trusted person in the workplace who can do the same for you.