Vectorised function to calculate HLA mismatch level as used in UK national deceased donor kidney matching scheme.

hla_mm_level(a, b, dr)

Arguments

a

numeric vector of HLA A locus mismatches (0-2)

b

numeric vector of HLA B locus mismatches (0-2)

dr

numeric vector of HLA DR locus mismatches (0-2)

Value

numeric vector of HLA mismatch levels (1-4)

Details

Mismatches should be provided as numeric vectors of integers with values from 0 to 2 The HLA mismatch level is derived from UK kidney matching policies which can be found on the NHS Blood & Transplant ODT website at www.odt.nhs.uk

Examples

hla_mm_level(a = 0, b = 1, dr = 1)
#> [1] 3