George,
You are correct. This would have been a field hospital. A quick search came up with this site which has a couple of photographs of a Union corps hospital at Gettysburg. I'm sure that the Confederate Second Corps hospital at Chancellorsville had a similar look. As I understand it, field hospitals, whether in tents or buildings commandeered for the purpose near the battlefield, displayed a yellow flag. At some point the Union hospitals added a green "H" to the center of the flag. By the way, the word corps (pronounced core) does not need a period after it as it is not an abbreviation.
http://www.gettysburgdaily.com/?p=11905