Apparently Rafa has Hoffa Disease, which I've never heard of. Taken from another board:
Hoffa's Disease is, for him, probably a chronic fat pad inflammation of the knee which causes impingement when he extends or straightens the knee. He is likely feeling sharp pain upon extension in the patella or kneecap area because of inflammation and an overabundance of fat in the pad that lodges itself between two areas of the knee (the names aren't important for us pigeons here on tennis.com).
It can be diagnosed by clinical examination together with X-rays. There is inflammation, but to really take care of it surgery may be required to decrease the amount of fat in the pad and to excise the tissue impinging into those areas. He could be out for a while. They may be treating him with medications, injections, physical therapy and rest to see where that gets him. It is known to hit athletes and is akin to a repetitive trauma kind of injury.