This code system https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategoryScotland defines the following codes:

CodeDisplay
1AScottish
1BOther British
1CIrish
1KGypsy/ Traveller
1LPolish
1ZOther white ethnic group
2AAny mixed or multiple ethnic groups
3FPakistani, Pakistani Scottish or Pakistani British
3GIndian, Indian Scottish or Indian British
3HBangladeshi, Bangladeshi Scottish or Bangladeshi British
3JChinese, Chinese Scottish or Chinese British
3ZOther Asian, Asian Scottish or Asian British
4DAfrican, African Scottish or African British
4YOther African
5CCaribbean, Caribbean Scottish or Caribbean British
5DBlack, Black Scottish or Black British
5YOther Caribbean or Black
6AArab, Arab Scottish or Arab British
6ZOther ethnic group
98Refused/Not provided by patient
99Not Known