diff --git a/app/integration_test/drugs_test.dart b/app/integration_test/drugs_test.dart index f3fc245c..b0e73914 100644 --- a/app/integration_test/drugs_test.dart +++ b/app/integration_test/drugs_test.dart @@ -52,14 +52,14 @@ void main() { 'CYP2C9': CpicLookup( gene: 'CYP2C9', phenotype: 'Normal Metabolizer', - genotype: '*1/*1', + variant: '*1/*1', lookupkey: '2') }; UserData.instance.diplotypes = { 'CYP2C9': GeneResult( gene: 'CYP2C9', phenotype: 'Normal Metabolizer', - genotype: '*1/*1', + variant: '*1/*1', allelesTested: '1') }; final testDrugWithoutGuidelines = Drug( diff --git a/app/lib/common/models/userdata/cpic_lookup.dart b/app/lib/common/models/userdata/cpic_lookup.dart index c5b9a25e..2be142ec 100644 --- a/app/lib/common/models/userdata/cpic_lookup.dart +++ b/app/lib/common/models/userdata/cpic_lookup.dart @@ -11,7 +11,7 @@ class CpicLookup implements Genotype { CpicLookup({ required this.gene, required this.phenotype, - required this.genotype, + required this.variant, required this.lookupkey, }); @@ -29,7 +29,7 @@ class CpicLookup implements Genotype { @override @HiveField(1) @JsonKey(name: 'diplotype') - String genotype; + String variant; @HiveField(2) @JsonKey(name: 'generesult') diff --git a/app/lib/common/models/userdata/gene_result.dart b/app/lib/common/models/userdata/gene_result.dart index be017389..c910b82a 100644 --- a/app/lib/common/models/userdata/gene_result.dart +++ b/app/lib/common/models/userdata/gene_result.dart @@ -12,7 +12,7 @@ part 'gene_result.g.dart'; class GeneResult implements Genotype { GeneResult({ required this.gene, - required this.genotype, + required this.variant, required this.phenotype, required this.allelesTested, }); @@ -26,7 +26,7 @@ class GeneResult implements Genotype { @override @HiveField(1) - String genotype; + String variant; @HiveField(2) String phenotype; diff --git a/app/lib/common/models/userdata/genotype.dart b/app/lib/common/models/userdata/genotype.dart index 2586a54d..da4226d7 100644 --- a/app/lib/common/models/userdata/genotype.dart +++ b/app/lib/common/models/userdata/genotype.dart @@ -1,9 +1,9 @@ abstract class Genotype{ Genotype({ required this.gene, - required this.genotype, + required this.variant, }); String gene; - String genotype; + String variant; } \ No newline at end of file diff --git a/app/lib/common/models/userdata/userdata.dart b/app/lib/common/models/userdata/userdata.dart index ac9bf372..733eac6c 100644 --- a/app/lib/common/models/userdata/userdata.dart +++ b/app/lib/common/models/userdata/userdata.dart @@ -111,8 +111,8 @@ class UserData { ); } - static String? genotypeFor(String gene) => - UserData.instance.diplotypes?[gene]?.genotype; + static String? variantFor(String gene) => + UserData.instance.diplotypes?[gene]?.variant; static String? allelesTestedFor(String gene) => UserData.instance.diplotypes?[gene]?.allelesTested; diff --git a/app/lib/common/utilities/genome_data.dart b/app/lib/common/utilities/genome_data.dart index 3542093a..a29cb4ef 100644 --- a/app/lib/common/utilities/genome_data.dart +++ b/app/lib/common/utilities/genome_data.dart @@ -64,7 +64,7 @@ Future fetchAndSaveLookups() async { // extract the matching lookups for (final diplotype in usersDiplotypes.values) { // the gene and the genotype build the key for the hashmap - final key = '${diplotype.gene}__${diplotype.genotype}'; + final key = '${diplotype.gene}__${diplotype.variant}'; final lookup = lookupsHashMap[key]; if (lookup == null) continue; // uncomment to print literal mismatches between lab/CPIC phenotypes diff --git a/app/lib/common/utilities/pdf_utils.dart b/app/lib/common/utilities/pdf_utils.dart index 501b32e8..38e7c3a2 100644 --- a/app/lib/common/utilities/pdf_utils.dart +++ b/app/lib/common/utilities/pdf_utils.dart @@ -183,7 +183,7 @@ List _buildUserPart( ) { final patientGenotype = _userInfoPerGene( drug, - (gene, drug, context) => UserData.genotypeFor(gene), + (gene, drug, context) => UserData.variantFor(gene), buildContext, ); final patientPhenotype = _userInfoPerGene( diff --git a/app/lib/report/pages/gene.dart b/app/lib/report/pages/gene.dart index b45f5d08..dce53273 100644 --- a/app/lib/report/pages/gene.dart +++ b/app/lib/report/pages/gene.dart @@ -49,7 +49,7 @@ class GenePage extends HookWidget { children: [ _buildRow( context.l10n.gene_page_genotype, - lookup.genotype, + lookup.variant, tooltip: context.l10n.gene_page_genotype_tooltip ), _buildPhenotypeRow(context), diff --git a/app/lib/report/pages/report.dart b/app/lib/report/pages/report.dart index d38e7251..f641460a 100644 --- a/app/lib/report/pages/report.dart +++ b/app/lib/report/pages/report.dart @@ -23,7 +23,7 @@ class ReportPage extends StatelessWidget { // phenotype will be overwritten with phenotype from lab or inhibited // phenotype using PhenotypeInformation in GeneCard and GenePage phenotype: notTestedString, - genotype: UserData.instance.diplotypes?[gene]?.genotype ?? + variant: UserData.instance.diplotypes?[gene]?.variant ?? notTestedString, lookupkey: notTestedString )