From 16a2f7b2584623a1b219ee15dd208b833c483e29 Mon Sep 17 00:00:00 2001 From: tamara-slosarek Date: Mon, 24 Feb 2025 14:19:42 +0100 Subject: [PATCH] feat(app): do not show gene name in list of inhibitors in FAQ --- app/lib/common/widgets/gene_modulator_list.dart | 7 ++++++- app/lib/faq/pages/content.dart | 8 +++++++- app/lib/l10n/app_en.arb | 2 +- docs/User-instructions.html | 4 +++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/lib/common/widgets/gene_modulator_list.dart b/app/lib/common/widgets/gene_modulator_list.dart index a601da10..f9fbe3cf 100644 --- a/app/lib/common/widgets/gene_modulator_list.dart +++ b/app/lib/common/widgets/gene_modulator_list.dart @@ -5,11 +5,13 @@ class GeneModulatorList { required this.geneName, this.onlyActiveDrugs = false, this.displayedDrug, + this.showGeneName = true, }); final String geneName; final bool onlyActiveDrugs; final String? displayedDrug; + final bool showGeneName; List _filterActiveModulatorDrugNames(List allModulatorDrugs) { final activeModulators = activeInhibitorsFor( @@ -47,7 +49,10 @@ class GeneModulatorList { _getModulatorDrugNames(context, modulatorDefinition, geneName); if (drugNames.isEmpty) continue; final getDescription = subdefinition.key; - content[getDescription(drugNames.length, geneName)] = drugNames; + final description = showGeneName + ? getDescription(drugNames.length, geneName) + : getDescription(drugNames.length, geneName).replaceAll(' $geneName', ''); + content[description] = drugNames; } return content; } diff --git a/app/lib/faq/pages/content.dart b/app/lib/faq/pages/content.dart index b13d909a..c89bfe72 100644 --- a/app/lib/faq/pages/content.dart +++ b/app/lib/faq/pages/content.dart @@ -113,11 +113,17 @@ List getFaqContent() => [ ], widgetsBeforeText: true, ), + // If inhibitors for other genes than CYP2D6 are implemented, this needs + // to be updated (e.g., by reverting this commit): adapt description of + // included items in user instructions and FAQ answer (context) => FaqQuestion( question: context.l10n.faq_question_phenoconversion, answer: context.l10n.faq_answer_phenoconversion, answerWidgets: inhibitableGenes.map( - (geneName) => GeneModulatorList(geneName: geneName).widget, + (geneName) => GeneModulatorList( + geneName: geneName, + showGeneName: false, + ).widget, ), ), (context) => FaqQuestion( diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 440aea19..5ba5f7bb 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -695,7 +695,7 @@ "@faq_answer_which_medications": {}, "faq_question_phenoconversion": "Can other medications affect how my body processes medications?", "@faq_question_phenoconversion": {}, - "faq_answer_phenoconversion": "Yes. Some medications can change how your body handles other medications. They can slow down or speed up how your body processes medications.\n\nMedications that slow down how your body processes medications are called _inhibitors_. Medications that speed these processes up are called _inducers_. They can have a strong, moderate, or weak effect on genes.\n\nPharMe will warn you when a current medication has an effect on how your body processes medications.\n\nIf you are taking any of the below medications, PharMe will show an asterisk (*) next to affected gene results and explain how it changes the processing of other medications. Consult your pharmacist or doctor for more information in such cases.\n\nPharMe currently only includes strong and moderate inhibitors:", + "faq_answer_phenoconversion": "Yes. Some medications can change how your body handles other medications. They can slow down or speed up how your body processes medications.\n\nMedications that slow down how your body processes medications are called _inhibitors_. Medications that speed these processes up are called _inducers_. They can have a strong, moderate, or weak effect on genes.\n\nPharMe will warn you when a current medication has an effect on how your body processes medications.\n\nIf you are taking any of the below medications, PharMe will show an asterisk (*) next to affected gene results and explain how it changes the processing of other medications. Consult your pharmacist or doctor for more information in such cases.\n\nPharMe currently only includes strong and moderate inhibitors for the gene _CYP2D6_:", "@faq_answer_phenoconversion": {}, "faq_question_family": "Are my results relevant for my family?", "@faq_question_family": {}, diff --git a/docs/User-instructions.html b/docs/User-instructions.html index f7ff9619..eaa6df29 100644 --- a/docs/User-instructions.html +++ b/docs/User-instructions.html @@ -823,7 +823,9 @@

2.7 Can other medications affect how my body processes medications?

of other medications. Consult your pharmacist or doctor for more information in such cases.

-

PharMe currently only includes strong and moderate inhibitors:

+

PharMe currently only includes strong and moderate inhibitors for the gene + CYP2D6: +

Strong inhibitors:

  • Bupropion (brand names: Aplenzin, Auvelity, Budeprion, Contrave, Forfivo, Wellbutrin, Zyban)