diff --git a/app/integration_test/drugs_test.dart b/app/integration_test/drugs_test.dart index 1b8ffad1..28bdad81 100644 --- a/app/integration_test/drugs_test.dart +++ b/app/integration_test/drugs_test.dart @@ -58,7 +58,6 @@ void main() { UserData.instance.diplotypes = { 'CYP2C9': Diplotype( gene: 'CYP2C9', - resultType: 'Diplotype', phenotype: 'Normal Metabolizer', genotype: '*1/*1', allelesTested: '1') diff --git a/app/lib/common/models/userdata/diplotype.dart b/app/lib/common/models/userdata/diplotype.dart index f5487060..b59a6adf 100644 --- a/app/lib/common/models/userdata/diplotype.dart +++ b/app/lib/common/models/userdata/diplotype.dart @@ -11,7 +11,6 @@ part 'diplotype.g.dart'; class Diplotype { Diplotype({ required this.gene, - required this.resultType, required this.genotype, required this.phenotype, required this.allelesTested, @@ -24,26 +23,15 @@ class Diplotype { String gene; @HiveField(1) - String resultType; - - @HiveField(2) String genotype; - @HiveField(3) + @HiveField(2) String phenotype; - @HiveField(4) + @HiveField(3) String allelesTested; } -extension ValidDiplotypes on List { - List filterValidDiplotypes() { - final acceptedResultTypes = ['Diplotype']; - return where((element) => acceptedResultTypes.contains(element.resultType)) - .toList(); - } -} - // assumes http reponse from lab server List diplotypesFromHTTPResponse(Response resp) { final json = jsonDecode(resp.body)['diplotypes'] as List; diff --git a/app/lib/common/utilities/genome_data.dart b/app/lib/common/utilities/genome_data.dart index bf9c4a05..a63644a6 100644 --- a/app/lib/common/utilities/genome_data.dart +++ b/app/lib/common/utilities/genome_data.dart @@ -27,7 +27,7 @@ Future _saveDiplotypeAndActiveDrugsResponse( ) async { // parse response to list of user's diplotypes final diplotypes = - diplotypesFromHTTPResponse(response).filterValidDiplotypes(); + diplotypesFromHTTPResponse(response); final activeDrugList = activeDrugsFromHTTPResponse(response); UserData.instance.diplotypes = {