Anthony-Nolan / Atlas

A free & open-source Donor Search Algorithm Service
GNU General Public License v3.0
9 stars 5 forks source link

Hla Validation in donor import #740

Closed benbelow closed 7 months ago

benbelow commented 2 years ago

Covers ensuring all HLA typings are valid.

p groups, g groups, single alleles, and multiple allele strings can be verified against the nomenclature directly.

first field XX codes for an invalid locus should be rejected.

Invalid NMDP codes should be rejected

e.g. not following the pattern - 01:NMDP:somethingelse

e.g. invalid first field for a locus for a generic code

e.g. invalid first field for a specific code.

The logic for determining the correct first field for a specific NMDP code is as follows:

The most frequent first field in the expanded alleles is considered valid.

All other first fields are invalid, whether represented in the expanded alleles or not

If there is a tie for most frequent first field, the lowest value should be used

NMDP codes that cause invalid alleles when expanded should be rejected:

For specific codes, this can happen if any expanded allele is not valid at the given locus

For generic codes, this can happen if any expanded allele is not valid at the given locus

For generic codes, this can also happen if and expanded second field is not compatible with the given first field at this locus

zabeen commented 7 months ago

Now we have better reporting of donors that have failed import at matching algorithm stage - and it doesn't seem to happen very often, thankfully - I don't think it's worth slowing down donor import by including HLA lookups at this stage.