It's ironic to call it surgical mastery in "magical" medicine when it literally had a procedure with pretty straightforward treatment (remove infected outer layer, apply medicine). The irony of him responding to the Grand Maester of how he did it with "well I just followed the instructions" is even better.
No my main point was this was already a character that has been established to have done BIG THINGS in the story, and followed that up by basically studying anything and everything that could be important (WW's, Val steel, Targs, Long night, dragons, etc). If you had to pick a character who would succeed at that, I can't imagine it would be anyone other than Sam.