Skip to main content
Haemorrhoid surgery

Haemorrhoid surgery

Statutory Guidance


This procedure involves surgery for haemorrhoids (piles).


Often haemorrhoids (especially early stage haemorrhoids) can be treated by simple measures such as eating more fibre or drinking more water. If these treatments are unsuccessful many patients will respond to outpatient treatment in the form of banding or perhaps injection.

Surgical treatment should only be considered for those that do not respond to these non-operative measures or if the haemorrhoids are more severe, specifically:

  • Recurrent grade 3 or grade 4 combined internal/external haemorrhoids with persistent pain or bleeding; or
  • Irreducible and large external haemorrhoids.

In cases where there is significant rectal bleeding the patient should be examined internally by a specialist.

Rationale for recommendation

Surgery should be performed, according to patient choice and only in cases of persistent grade 1 (rare) or 2 haemorrhoids that have not improved with dietary changes, banding or perhaps in certain cases injection, and recurrent grade 3 and 4 haemorrhoids and those with a symptomatic external component.

Haemorrhoid surgery can lead to complications. Pain and bleeding are common and pain may persist for several weeks. Urinary retention can occasionally occur and may require catheter insertion. Infection, iatrogenic fissuring (tear or cut in the anus), stenosis and incontinence (lack of control over bowel motions) occur more infrequently.

Patient information

Information for Patients

Surgery to treat haemorrhoids, commonly known as piles, should only be carried out when specific criteria are met. There are many alternative and non-invasive treatments for treating haemorrhoids that should be considered before surgery.

About the condition

Haemorrhoids are swellings containing enlarged blood vessels found inside or around your bottom. In some cases, haemorrhoids are little more than a nuisance and you may not be too bothered by them. You might experience soreness, redness and swelling around the anus or bleeding when straining on the toilet or have blood in your poo or have a lump hanging down outside your anus which may need to be pushed back in after going to the toilet.

You should talk to your doctor if you have these symptoms to ensure the underlying cause is haemorrhoids and not something more serious. If confirmed, you should make a shared decision about what’s best for you. If your haemorrhoids are becoming a problem, you should both consider the benefits, the risks and the alternatives to surgery and what will happen if you do nothing.

What are the BENEFITS of the intervention?

Surgery is effective for haemorrhoids that hang down and have to be pushed back or which remain permanently outside the anal canal. It can also be considered if you have tried alternatives first and they have not worked.

What are the RISKS?

When considering surgery it is important to consider the significance of your symptoms, the benefits of surgery and the complications. The risks of haemorrhoid surgery may include infection, pain, bleeding, urinary retention, fissuring (a tear or cut in the anus), stenosis (narrowing of your anus) and in rare instances faecal incontinence (lack of control over bowel motions).

What are the ALTERNATIVES?

Often less severe haemorrhoids can be treated by simple measures including eating more fibre, drinking more water and avoiding straining on the toilet. Laxatives can be helpful to soften your stool. There are also other treatments that will help alleviate the symptoms of haemorrhoids, such as creams, ointments and suppositories. Some types of haemorrhoids can be treated without the need for surgery by specialist doctor in an outpatient clinics.

What if you do NOTHING?

Once a diagnosis of haemorrhoids has been made, doing nothing, isn’t likely to be harmful. Haemorrhoids often cause little more than discomfort and treatment should be tailored to your symptoms and based on a clinical assessment of the severity of condition.


Code script

WHEN LEFT(der.Spell_Dominant_Procedure,4) in ('H511','H512','H513','H518','H519')
AND (apcs.der_diagnosis_all like '%K64[01234589]%’ 
OR apcs.der_diagnosis_all like '%O224%’ 
OR apcs.der_diagnosis_all like '%O872%')
AND not (apcs.der_diagnosis_all like '%C[0-8][0-9]%’ 
OR apcs.der_diagnosis_all like '%C9[0-7]%’) 
AND APCS.Admission_Method not like ('2%')
THEN 'I_haemmor'

Code Definitions

Procedure codes (OPCS)

H511 Haemorrhoidectomy
H512 Partial internal sphincterotomy for haemorrhoid
H513 Stapled haemorrhoidectomy
H518 Other specified excision of haemorrhoid
H519 Unspecified excision of haemorrhoid
H521 Cryotherapy to haemorrhoid
H522 Infrared photocoagulation of haemorrhoid
H523 Injection of sclerosing substance into haemorrhoid
H524 Rubber band ligation of haemorrhoid
H528 Other specified destruction of haemorrhoid
H529 Unspecified destruction of haemorrhoid
H531 Evacuation of perianal haematoma
H532 Forced manual dilation of anus for haemorrhoid
H533 Manual reduction of prolapsed haemorrhoid
H538 Other specified other operations on haemorrhoid
H539 Unspecified other operations on haemorrhoid
L703 Ligation of artery NEC (coding for the HALO procedure)
Y524 Peranal transrectal approach to organ (secondary to L703)
Y532 Approach to organ under ultrasonic control (secondary to Y524)
Z378 Specified lateral branch of abdominal aorta NEC (secondary to Y532)

Diagnosis codes (ICD)

K640 First degree haemorrhoids
K641 Second degree haemorrhoids
K642 Third degree haemorrhoids
K643 Fourth degree haemorrhoids
K644 Residual haemorrhoidal skin tags
K645 Perianal venous thrombosis
K648 Other specified haemorrhoids
K649 Haemorrhoids, unspecified
O224 Haemorrhoids in pregnancy
O872 Haemorrhoids in the puerperium
C00-C97 Malignant neoplasms

apcs.der_diagnosis_all not like '%C[0-9][0-9]%' and 
apcs.der_diagnosis_all not like '%D0%' and 
apcs.der_diagnosis_all not like '%D3[789]%' and
apcs.der_diagnosis_all not like '%D4[012345678]%’

This code captures code in the ranges C00-C99, D00-D09 and D37-D48.
Age range: the codes use the following age ranges 0-18 for children and 19-120
for adults.
— Private Appointment Exclusion
AND apcs.Administrative_Category<>’02’


  1. Watson AJM, Bruhn H, MacLeod K, et al. A pragmatic, multicentre, randomised controlled trial comparing stapled haemorrhoidopexy to traditional excisional surgery for haemorrhoidal disease (eTHoS): study protocol for a randomised controlled trial. Trials. 2014;15:439. doi:10.1186/1745-6215-15-439.
  2. Watson AJM, Hudson J, Wood J, et al. Comparison of stapled haemorrhoidopexy with traditional excisional surgery for haemorrhoidal disease (eTHoS): a pragmatic, multicentre, randomised controlled trial. Lancet (London, England). 2016;388(10058):2375-2385. doi:10.1016/S0140-6736(16)31803-7.
  3. Brown SR. Haemorrhoids: an update on management. Therapeutic Advances in Chronic Disease. 2017;8(10):141-147. doi:10.1177/2040622317713957.
  4. NHS website: Conditions – piles haemorrhoids
  5. Royal College of Surgeons and The Association of Coloproctology of Great Britain and Ireland (2017) Commissioning guide: Rectal Bleeding.
  6. Health Technol Assess. 2016 Nov;20(88):1-150. The HubBLe Trial: haemorrhoidal artery ligation (HAL) versus rubber band ligation (RBL) for symptomatic second- and third-degree haemorrhoids: a multicentre randomised controlled trial and health-economic Brown S et al.

How up to date is this information?

Last revised December 2023


December 2023 - Coding update. August 2022 - Coding updated