I think the key question here is if this is a recent problem, or has it been ongoing since the surgery? either way, a professional needs to be notified.
There is a problem called 'pump head' that occurs fairly often in patients who have had heart surgery. It is thought to be related to the use of the heart-lung machine that keeps you alive when your heart is stilled for the surgery.
Anyhow, it's associated with memory loss and problems with writing and typing, even getting letters in the wrong order. Most people seem to notice that their abilities come back with time.
You should definitely mention this to your partner's doctor, though.