From f3eb851c7b3ffc9c35ce2d58d2326d2a52b65f38 Mon Sep 17 00:00:00 2001 From: tamslo Date: Tue, 10 Dec 2024 11:53:02 +0100 Subject: [PATCH] feat(app): adapt FAQ content --- app/lib/faq/pages/content.dart | 27 ++++++++++++++++++++++++--- app/lib/faq/pages/faq.dart | 10 +++++++++- app/lib/l10n/app_en.arb | 28 ++++++++++++++++++++-------- 3 files changed, 53 insertions(+), 12 deletions(-) diff --git a/app/lib/faq/pages/content.dart b/app/lib/faq/pages/content.dart index d8cad59e..10eee699 100644 --- a/app/lib/faq/pages/content.dart +++ b/app/lib/faq/pages/content.dart @@ -33,7 +33,7 @@ class FaqWidgetAnswerQuestion extends FaqQuestion { }); } -final faqContent = [ +List getFaqContent() => [ FaqSection( title: (context) => context.l10n.faq_section_title_pgx, questions: [ @@ -45,6 +45,14 @@ final faqContent = [ question: context.l10n.faq_question_pgx_why, answer: context.l10n.faq_answer_pgx_why, ), + (context) => FaqTextAnswerQuestion( + question: context.l10n.faq_question_adr_factors, + answer: context.l10n.faq_answer_adr_factors, + ), + (context) => FaqTextAnswerQuestion( + question: context.l10n.faq_question_guidelines_are_developing, + answer: context.l10n.faq_answer_guidelines_are_developing, + ), (context) => FaqWidgetAnswerQuestion( question: context.l10n.faq_question_genetics_info, answer: Column( @@ -56,12 +64,24 @@ final faqContent = [ text: geneticInformationUrl.toString(), onTap: openFurtherGeneticInformation, ), + SizedBox(height: PharMeTheme.smallSpace * 0.5), + Text('\n${context.l10n.consult_text}'), ], ), ), - (context) => FaqTextAnswerQuestion( + (context) => FaqWidgetAnswerQuestion( question: context.l10n.faq_question_which_medications, - answer: context.l10n.faq_answer_which_medications, + answer: Column( + children: [ + Text(context.l10n.faq_answer_which_medications), + SizedBox(height: PharMeTheme.smallSpace * 0.5), + UnorderedList( + context.l10n.faq_answer_which_medications_examples + .split('; ') + .map((example) => example.capitalize()).toList(), + ), + ], + ), ), (context) => FaqWidgetAnswerQuestion( question: context.l10n.faq_question_phenoconversion, @@ -69,6 +89,7 @@ final faqContent = [ crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(context.l10n.faq_answer_phenoconversion), + SizedBox(height: PharMeTheme.smallSpace), ...inhibitableGenes.map( (geneName) => GeneModulatorList(geneName: geneName).widget, ), diff --git a/app/lib/faq/pages/faq.dart b/app/lib/faq/pages/faq.dart index b1e2c711..9802a028 100644 --- a/app/lib/faq/pages/faq.dart +++ b/app/lib/faq/pages/faq.dart @@ -7,6 +7,7 @@ class FaqPage extends HookWidget { @override Widget build(BuildContext context) { + final faqContent = getFaqContent(); final expandedCards = useState>({}); final expandQuestion = useState(null); if (expandQuestion.value != null) { @@ -38,7 +39,13 @@ class FaqPage extends HookWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ ...faqContent.flatMap((faqSection) => - _buildTopic(context, faqSection, expandedCards, expandQuestion)), + _buildTopic( + context, + faqSection, + expandedCards, + expandQuestion, + faqContent, + )), ..._buildTopicHeader( context.l10n.more_page_contact_us, addSpace: true, @@ -74,6 +81,7 @@ class FaqPage extends HookWidget { FaqSection faqSection, ValueNotifier> expandedCards, ValueNotifier expandQuestion, + List faqContent, ) { final isFirst = faqContent.indexOf(faqSection) == 0; return [ diff --git a/app/lib/l10n/app_en.arb b/app/lib/l10n/app_en.arb index 6ae73e3b..8096ffaf 100644 --- a/app/lib/l10n/app_en.arb +++ b/app/lib/l10n/app_en.arb @@ -589,23 +589,35 @@ "@faq_section_title_pgx": {}, "faq_question_pgx_what": "What is pharmacogenomics?", "@faq_question_pgx_what": {}, - "faq_answer_pgx_what": "Pharmacogenomics (PGx) is the study of how your genes (DNA) affect your response to medications.", + "faq_answer_pgx_what": "Pharmacogenomics (PGx) is the study of how your genes (DNA) affect your response to medications.\n\nYour DNA is the blueprint that tells your body how to make different enzymes. These enzymes play an important role in how your body processes and responds to medications.\n\nSome enzymes help transport medications through your body, while others make medications more or less strong. Depending on the versions of the genes you have, you may make more or less of certain enzymes or they function more or less well.", "@faq_answer_pgx_what": {}, "faq_question_pgx_why": "Why is pharmacogenomics important?", "@faq_question_pgx_why": {}, - "faq_answer_pgx_why": "Pharmacogenomics is important because it helps to predict those who will respond well to medications and those who may have side effects. With this information we can better select the right medication and dose to avoid side effects.", + "faq_answer_pgx_why": "Pharmacogenomics is important because it helps to predict those who will respond well to medications and those who may have side effects. With this information we can better select the right medication and dose to avoid side effects.\n\nHowever, this information ONLY is like one puzzle piece in the big picture of how well a medicine works for you.", "@faq_answer_pgx_why": {}, - "faq_question_genetics_info": "Where can I find out more about genetics in general?", + "faq_question_adr_factors": "Which factors can lead to adverse drug reactions?", + "@faq_question_adr_factors": {}, + "faq_answer_adr_factors": "An adverse drug reaction is a harmful response to a medication.\n\nWhen your immune system mistakes a medication for a threat, it can trigger an allergic reaction, causing symptoms from stomach upset over hives to severe anaphylaxis.\n\nYour genes also play an important role in how your body processes and responds to medications.\n\nWhile some reactions are predictable, others are rare and unexpected. These rare reactions, called idiosyncratic reactions, are individual reactions with not (yet) understood mechanisms that usually do not occur in most patients.\n\nYou can also have multiple types of adverse reactions at the same time, for example a genetic difference that affects how your body processes a drug AND an allergic reaction.\n\nConsult your pharmacist or doctor for more information.", + "@faq_answer_adr_factors": {}, + "faq_question_guidelines_are_developing": "Do my pharmacogenomic results cover all known pharmacogenomic causes of adverse reactions?", + "@faq_question_guidelines_are_developing": {}, + "faq_answer_guidelines_are_developing": "No. Scientists are still discovering new genetic differences that affect medications.\n\nFurther, different labs might interpret genetic test results differently because this science is still developing.\n\nPharMe relies on well-established CPIC® and FDA guidelines to deliver standardized and up-to-date pharmacogenomic information to you.\n\nPlease also note that pharmacogenomics is only one factor that can cause adverse reactions, like like one puzzle piece in the big picture of how well a medicine works for you.", + "@faq_answer_guidelines_are_developing": {}, + "faq_question_genetics_info": "I need help with understanding what my gene results mean.", "@faq_question_genetics_info": {}, - "faq_answer_genetics_info": "To learn more about genetics, we recommend MedlinePlus, a service of the National Library of Medicine:", + "faq_answer_genetics_info": "Your gene results consist of two types of information:\n\nThe genotype tells you about your DNA and which version of a gene you have. You carry two copies for one gene, called “alleles”, each inherited from one of your parents.\n\nThe phenotype explains how your DNA affects your body. In pharmacogenomics, it usually shows if a gene version might cause a bad reaction to a medicine or how fast your body processes a drug. Processing here means your body either breaks down the medicine into weaker forms or changes it into a stronger form.\n\nTo learn more about genetics, we recommend MedlinePlus, a service of the National Library of Medicine:", "@faq_answer_genetics_info": {}, - "faq_question_which_medications": "Which medications have known gene interactions?", + "faq_question_which_medications": "Which medications are included in PharMe?", "@faq_question_which_medications": {}, - "faq_answer_which_medications": "Examples of medication classes with known gene interactions include anti-clotting medications (like clopidogrel and warfarin), antidepressants (like sertraline, citalopram, and paroxetine), anti-cholesterol medications (like simvastatin and atorvastatin), acid reducers (like pantoprazole and omeprazole), pain killers (like codeine, tramadol, and ibuprofen), antifungals (like voriconazole), medications that suppress the immune system (like tacrolimus), and anti-cancer medications (like fluorouracil and irinotecan).\n\nSearch a medication in the Medications tab to find out whether it has known gene interactions according to CPIC® and FDA guidelines.", + "faq_answer_which_medications": "PharMe includes medications that are known to have meaningful interactions with genes. This knowledge is science-based, according to CPIC® and FDA guidelines.\n\nExamples of medication classes with known gene interactions include:", + "faq_answer_which_medications_examples": "anti-clotting medications (like clopidogrel and warfarin); antidepressants (like sertraline, citalopram, and paroxetine); anti-cholesterol medications (like simvastatin and atorvastatin), acid reducers (like pantoprazole and omeprazole); pain killers (like codeine, tramadol, and ibuprofen); antifungals (like voriconazole); medications that suppress the immune system (like tacrolimus); anti-cancer medications (like fluorouracil and irinotecan)", + "@faq_answer_which_medications_examples": { + "description": "A list separated by semicolon and space; this can be used to split the text in the code to format a list" + }, "@faq_answer_which_medications": {}, "faq_question_phenoconversion": "Why can my results change when I take certain medications?", "@faq_question_phenoconversion": {}, - "faq_answer_phenoconversion": "Certain medications can change your phenotype that describes how your body responds to medications. Typically, medications either inhibit or induce the activity of a gene. In PharMe, the following interactions are included:", + "faq_answer_phenoconversion": "Certain medications known as modulators can change how your body responds to medications. Typically, modulators function in two ways: they either slow down the activity of a gene (known as inhibitors) or speed up the activity of a gene (known as inducers).\n\nPharMe currently only supports changing your gene result if you are taking strong modulators. For moderate modulators, a warning is shown that the gene result may need to be adapted.\n\nThe following modulators are included:", "@faq_answer_phenoconversion": {}, "faq_question_family": "Will my results affect my family members?", "@faq_question_family": {}, @@ -613,7 +625,7 @@ "@faq_answer_family": {}, "faq_question_share": "Who can I share my results with?", "@faq_question_share": {}, - "faq_answer_share": "We recommend that you share your results with your pharmacists, doctors, and close family members such as parents, siblings, and children.", + "faq_answer_share": "We recommend that you share your results with your pharmacists, doctors, and close family members such as parents, siblings, and children.\n\nTo create a PDF that you can share with a healthcare professional, go to a medication page and use the share button in the upper right corner.", "@faq_answer_share": {}, "faq_section_title_pharme": "PharMe App",