The force to which he was attached suffered great hardships, but remained healthy until the fall of Fort Matilda completed the surrender of Guadeloupe, when yellow fever broke out in the 35th and 70th regiments, then stationed at Saint-Pierre, Martinique.
He became deputy inspector-general of army hospitals on 20 December 1810, and in the following year the Earl of Liverpool (the Prime Minister) sent him back to Malta as President of the Board of Health, a position he filled with conspicuous success.
In Observations upon Bulam, Vómito-negro, or Yellow Fever (1848), which is practically a second edition of the previous work, Pym contends that the question is no longer one of contagion or non-contagion, as it was in 1815, but whether there are two different and distinct diseases — viz.
the remittent and non-contagious, which prevails at all times on the coast of Africa; and the other, the bulam or vómito-negro fever, which only occasionally makes its appearance, and is highly contagious.
Pym was a chairman of the Central Board of Health during the cholera epidemic which attacked the United Kingdom in 1832, and for his services received a letter of thanks from the lords of the council.