The army record shows that William as having completed c21 years of service in total (first 12 year period between North America, Gibralter, West Indies and East Indies). The last period being from c1860-69. At discharge, aged 41.5yrs, he was ranked a Private and against 'Trade' it stated none.
Unfortunately, given his age, rank and no listed trade, it would, to my mind at least, seem quite a 'jump' thereafter, to reach status of 'assistant director of the RCSI', unless it was perhaps a more administrative based post than a medical one, and his varied experience was considered suitable.