Vectorised function to calculate HLA mismatch level as used in UK national deceased donor kidney matching scheme.
hla_mm_level(a, b, dr)
numeric vector of HLA A locus mismatches (0-2)
numeric vector of HLA B locus mismatches (0-2)
numeric vector of HLA DR locus mismatches (0-2)
numeric vector of HLA mismatch levels (1-4)
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
hla_mm_level(a = 0, b = 1, dr = 1)#>  3