Wikipedia
A veterinarius was a soldier in the Roman army who served as a veterinary surgeon.
Their job was to care for the multitude of animals attached to an individual military unit: cavalry horses, beasts of burden, animals used for sacrifice or animals used for food.
Because they had a specialist task to perform that would have required training and above-average intelligence, the soldiers who were veterinarii were given the status class of immunis, soldiers who held immunitas from ordinary duties as they had special tasks of their own to fulfil. As such they are listed within the group of soldiers classified as immunes in Publius Tarruntenus Paternus’ De Re Militari. The title of pecuarius (or sometimes pequarius) is also associated with the veterinary service, though the exact distinction between the duties of a veterinarius and a pecuarius are uncertain. Paternus does not mention the title in his list of immunes which, unless he is grouping all animal workers together under the term veterinarii, they were of lower importance.
It can be speculated that the veterinarius was concerned with the medical care of the animals while the pecuarius served in more hand-on roles as assistants. The fact that the pequarii are included within the association of soldiers connected with the hospital (valetudinarium) of Legio III Augusta at Lambaesis would suggest that they had medical responsibilities for the animals and were not just grooms or feeders.