Genetic test developed to fight AMR