The combined service record is the place you need to check for information on these facts.
Note that most of the soldiers that are listed as deserters in their Confederate Service, have cards that accompany the reference that indicate that they were captured as a POW and "Took the Oath".