Segway has never released any serious maintenance information to the general public. Dealers have never been willing to talk, probably because their contract with Segway will not let them. Some error code definitions have been gleaned only from years of individual experiences. Many error codes are still "undefined" to the general public, and the vast majority of error codes require factory analysis and repair.
Apart from a relatively long ride while monitoring battery status, I do not know of any way to determine battery health before you buy, especially for a non-local purchase. After you buy, you could send the batteries to MTO Battery for evaluation/repair. (search for Jason at MTOBATTERY on this forum) A dealer might be able to assess battery status, but I don't recall anyone mentioning that on this forum. Neither of the above ideas help much before you buy.
Here is a link that will give you year and week of build
http://pt-repair.com/how-old-is-that-segway/
Note that year/week of purchase doesn't tell you much about battery health. Even a brand-new Seg, left uncharged for 2-3 months will drain the rear battery, which powers the always-on radio receiver. (Note that some of those batteries might be recoverable) On the other hand, Segs which have been moderately used and kept properly charged might have relatively good batteries, even after 10+ years.
Good luck!