He participated in the Catalan Enlightenment movement promoting the progress of the science and society. In the field of medicine he fought against superstition thoughts.
In order to improve medicine, he tried to implement vaccines, to promote hygiene and public health and he created the position of Professor of medicine in Barcelona, where he was the first one in 1773. Despite being well known in Catalunya and abroad he never forget his preferences as he kept on working in Homeless Hospital and social medicine. He was a member of the Acadèmia de Ciències de Barcelona and the director of the electricity section. He fame as a researcher in different fields is showed in his works: aerodynamic navigation (1784), the electric telegraph (1791), telegraphy without lines (1796), underwater navigation (1800), chemist food conservation, technical industrial improvements, social and demographic studies. He used to collaborate with press.
- Carta a un amigo sobre el éxtasis de la decantada mujer del lugar de Llerona (1779)
- Años clínicos (1812)
- Pensamientos sobre el arreglo de la enseñanza del arte de curar (1812)