Skip to content

Commit

Permalink
feat(app): do not show gene name in list of inhibitors in FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
tamara-slosarek authored and tamslo committed Feb 24, 2025
1 parent 97e5054 commit 16a2f7b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion app/lib/common/widgets/gene_modulator_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> _filterActiveModulatorDrugNames(List<String> allModulatorDrugs) {
final activeModulators = activeInhibitorsFor(
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 7 additions & 1 deletion app/lib/faq/pages/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,17 @@ List<FaqSection> getFaqContent() => <FaqSection>[
],
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(
Expand Down
2 changes: 1 addition & 1 deletion app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down
4 changes: 3 additions & 1 deletion docs/User-instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,9 @@ <h4>2.7 Can other medications affect how my body processes medications?</h4>
of other medications.
Consult your pharmacist or doctor for more information in such cases.
</p>
<p>PharMe currently only includes strong and moderate inhibitors:</p>
<p>PharMe currently only includes strong and moderate inhibitors for the gene
<em>CYP2D6</em>:
</p>
<p style="font-style: italic;">Strong inhibitors:</p>
<ul>
<li>Bupropion (brand names: Aplenzin, Auvelity, Budeprion, Contrave, Forfivo, Wellbutrin, Zyban)</li>
Expand Down

0 comments on commit 16a2f7b

Please sign in to comment.