He was appointed Assistant Surgeon to the Coromandel in 1818 and Assistant Surgeon to the Leander in 1819 
Cholera Epidemic 1831
John Hamett was feted for his work at Dantzig in an investigation of cholera and published The substance of the official medical reports upon the epidemic, called cholera: which prevailed among the poor at Dantzick, between the end of May and the first part of September, 1831.
His work was praised in Prostitution in London with a Comparative View of that of Paris and New York by Michael Ryan M.D., published 1839 -
If we carefully examine the state of moral depravity in our large towns and cities, we observe it displayed in infancy, childhood, adolescence, manhood, and old age. The truth and justness of this observation will appear by the reports of the Societies for the Suppression of Juvenile Prostitution and Vice, hereafter noticed. The conduct, language, and vices of the lower classes of the population, are become quite intolerable. We detect vice even in our homes, abroad, in our schools, colleges, and seminaries; we observe it on the highway; we find it punished in our law courts, and we follow it to our penal settlements. But let us peruse the melancholy report of the Rev. Dr. Ullathorne, vicar-general of Australia, New South Wales, Van Diemen's Land, and Norfolk Island—a narrative which has been substantially authenticated to me by Sir John Hamett, whose integrity, ability, and veracity, as our British Medical Commissioner for the investigation of cholera at Dantzig, in 1831, gained for him the general applause of his profession, both at home and abroad, while he contributed by his unequalled reports, to give a death-blow to the doctrine of contagion. 
Knighted in 1838
His accomplishments were such that he was knighted in 1838 - 14 February 1838 - Knighted, John Hamett, Esq., M.D. R.F.S. one of the medical commission employed in 1831 in the north of Germany during the prevalence of the cholera. 
Sir John Hamett was employed as Surgeon Superintendent on the Gilbert Henderson to Van Diemen's Land in 1840. The Gilbert Henderson departed London on 14 December 1839 and arrived in Van Diemen's Land on 24 April 1840. Twenty years later the voyage of the Gilbert Henderson was told by a young midshipman who was a passenger :-
'In the year 1841, I sailed from Woolwich on board the barque Gilbert Henderson, of Liverpool, chartered as a convict ship by Government, and bound to Hobart Town, Van Diemen's land, with a living freight of three hundred and fifty female convicts.....Besides the naval surgeon (in our case one Sir John Hammet), the passengers on board the Gilbert Henderson comprised a retired 'naval physician of the fleet', who was going out to settle in Van Diemen's Land, on a grant of land he had received from Government; his nephew, a young Irishman about twenty years of age, of no profession, who was going out to seek his fortune, under his uncle's patronage; his son, a lad of fifteen years; a retired army captain, greatly addicted to microscopic studies, who was also going out to take possession of a Government grant; and a midshipman of the Royal Navy (myself) going out to rejoin my ship, after having been on sick furlough.
Sir John Hamett was a surgeon of higher naval rank than it was or is usual to appoint to do duty on board a convict ship. He had been knighted for his services (in Prussia) on behalf of the English Government, during the period of the cholera epidemic of 1831-32. But he had accepted the appointment because it afforded him an opportunity to reach Van Diemen's land free of expense, in order to settle upon a grant of land in the interior of the island, which had been accorded to him for his medical services, in addition to the honour of knighthood.
I may, however, here state that the worthy knight who was somewhat of an eccentric, and was the most enthusiastic of the party respecting the anticipated delights of a colonial life, very soon found his way back to England.
He had provided himself with all the requisites of a settler in the 'bush', such as tents, axes, spades, garden seeds, cooking utensils, etc., and to these had added all the comforts and elegancies of civilisation that he could stow on board, such as articles of furniture, cases of books, pipes and barrels of wine and beer, etc, and, according to his own account, was going to found a Utopia in the wilderness; yet on landing at Portsmouth two years afterwards, the first person I met on the quay was Sir John Hammett!
'I heard that the B had just arrived', he said, as he shook hands with me, 'and I came down expecting to find that you had returned to England with the vessel. I thought I'd like to shake hands with my old shipmate again. We had some pleasant days on board the Gilbert Henderson.'
'Yes Sir John', I replied, 'But you of all persons are the last I should have expected to meet. I thought you were long ago comfortably settled in the bush.'
Return to England
'Wouldn't do my dear sir', replied the knight. 'Not at all the thing for a man of my years. I was sadly disappointed. Not a living soul within twenty miles of my grant. Went to look for it couldn't find it for a long time. Found it. A wretched place. Nobody to speak to but the convict servants I took with me. Should have been dead and buried in less than six months if I'd stayed. Remained a week. Came back to Hobart Town, and sailed for England on board the first vessel that was ready for sea. Sad take in. Grants of land indeed! Cost me hundreds of pounds all thrown away. Ruinous! Come and dine with me today but don't speak of Van Diemen's Land. It makes me miserable to think of it.'
I accepted the invitation to dinner and found Sir John very comfortably situated in a modest establishment near Portsmouth, with his wife and daughter, enjoying a much nearer approach to the Utopia of his sanguine imagination than ever he would have succeeded in founding in Tasmania.' 
Sir John Hammett was on the List of Surgeons of the Royal Navy who were fit for service in 1841; he was appointed to the Vindictive in 1842.
Sir John Hamett M.D., R.N., died on 14 July 1847 at Frankfort