I have a scenario where a person has nanorobots unknowingly injected into his bloodstream. I'd like his doctor to discover them through some kind of medical test, preferably a blood test. Of course they wouldn't be looked for specifically, but would have to show up as some kind of anomaly that would be investigated further, leading to their discovery. The type of test could either be a routine blood test that would be done on a person getting a general physical, or could be a blood test for a specific chronic condition (e.g. the person may have a medical condition requiring a specific periodic blood test).
Regarding the composition of the nanorobots, I don't have this nailed down firmly but at this point I'm thinking they would probably be carbon-based. If them containing a specific element would make the detection scenario more plausible, I may be able to work that in. For size, each nanorobot is about the size of a virus.
The time frame is the near future, so the test should either be one that currently exists, or would be likely to exist within the next decade or so.