If you travel to the UK for private medical treatment you do not need a visa. This is because you can stay in the UK for up to 6 months without a visa. However, you will need to carry the same documents as you would for a standard visitor’s visa, to show to officials at the UK border.
If you need to stay longer, you will need to apply for a Standard Visitor visa to stay in the UK for private medical treatment for up to 11 months.
The Honorary Consulate of San Marino endeavours to keep the information above updated but strongly recommends checking the UK government website for any eventual changes.