Doctors failed to protect wife from HIV husband, court told