From cd28e641704cb7bafb7c091c37303e8001829f94 Mon Sep 17 00:00:00 2001 From: fzhao99 Date: Mon, 18 Dec 2023 12:27:50 -0500 Subject: [PATCH] update RSV copy (#7088) * fix result header * Add RSV notes guidance * Check for multiple results * Update tests and snapshot * Update e2e * Translate RSV to VRS --------- Co-authored-by: Mike Brown --- .../e2e/05-get_result_from_patient_link.cy.js | 1 - .../MultiplexResultsGuidance.tsx | 40 +++++++++++++ .../TestResultPrintModal.test.tsx | 15 ++--- .../actionMenuModals/TestResultPrintModal.tsx | 13 +++-- .../TestResultPrintModal.test.tsx.snap | 56 ++++++++++++++++--- frontend/src/app/utils/testResults.ts | 14 +++++ frontend/src/lang/en.ts | 13 ++++- frontend/src/lang/es.ts | 16 ++++-- .../patientApp/timeOfTest/TestResult.test.tsx | 32 +++-------- .../src/patientApp/timeOfTest/TestResult.tsx | 9 ++- 10 files changed, 150 insertions(+), 59 deletions(-) diff --git a/cypress/e2e/05-get_result_from_patient_link.cy.js b/cypress/e2e/05-get_result_from_patient_link.cy.js index 1343e50979..f4b16036f5 100644 --- a/cypress/e2e/05-get_result_from_patient_link.cy.js +++ b/cypress/e2e/05-get_result_from_patient_link.cy.js @@ -56,7 +56,6 @@ describe("Getting a test result from a patient link", () => { cy.get("#dob-submit-button").click(); }); it("shows the test result", () => { - cy.contains("Test result: COVID-19"); cy.contains("Test result"); cy.contains("Test date"); cy.contains("Test device"); diff --git a/frontend/src/app/commonComponents/MultiplexResultsGuidance.tsx b/frontend/src/app/commonComponents/MultiplexResultsGuidance.tsx index 70e1b42394..71374cbe04 100644 --- a/frontend/src/app/commonComponents/MultiplexResultsGuidance.tsx +++ b/frontend/src/app/commonComponents/MultiplexResultsGuidance.tsx @@ -6,6 +6,7 @@ import { hasPositiveFluResults, getResultByDiseaseName, hasCovidResults, + hasPositiveRsvResults, } from "../utils/testResults"; type PositiveFluResultInfoProps = { @@ -56,6 +57,41 @@ const PositiveFluResultInfo = ({ ); }; +type PositiveRsvResultInfoProps = { + needsHeading: boolean; + t: translateFn; +}; +const PositiveRsvResultInfo = ({ + needsHeading, + t, +}: PositiveRsvResultInfoProps) => { + return ( + <> + {needsHeading && ( +

+ {t("testResult.rsvNotes.h1")} +

+ )} +

{t("testResult.rsvNotes.positive.p0")}

+

{t("testResult.rsvNotes.positive.p1")}

+ + rsv symptoms link + , + ]} + /> + + ); +}; + interface MultiplexResultsGuidanceProps { results: MultiplexResult[]; isPatientApp: boolean; @@ -67,6 +103,7 @@ const MultiplexResultsGuidance: React.FC = ({ const { t } = useTranslation(); const needsCovidHeading = hasCovidResults(results); const needsFluGuidance = hasPositiveFluResults(results); + const needsRsvGuidance = hasPositiveRsvResults(results); const covidResult = getResultByDiseaseName(results, "COVID-19") as TestResult; return ( @@ -85,6 +122,9 @@ const MultiplexResultsGuidance: React.FC = ({ {needsFluGuidance && ( )} + {needsRsvGuidance && ( + + )} ); }; diff --git a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.test.tsx b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.test.tsx index cc07692214..48a512c9e3 100644 --- a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.test.tsx +++ b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.test.tsx @@ -92,7 +92,7 @@ describe("TestResultPrintModal with only COVID results", () => { it("should render only COVID information", () => { renderWithUser(); - expect(screen.getByText("Test result: COVID-19")).toBeInTheDocument(); + expect(screen.getByText("For COVID-19:")).toBeInTheDocument(); }); it("matches screenshot", () => { @@ -136,9 +136,7 @@ describe("TestResultPrintModal with multiplex results in SimpleReport App", () = }); it("should render flu information", () => { - expect( - screen.getByText("Test results: COVID-19 and flu") - ).toBeInTheDocument(); + expect(screen.getByText("Test results")).toBeInTheDocument(); expect(screen.getByText("For flu A and B:")).toBeInTheDocument(); }); @@ -185,9 +183,7 @@ describe("TestResultPrintModal with multiplex results in Pxp App", () => { }); it("should render information", () => { - expect( - screen.getByText("Test results: COVID-19 and flu") - ).toBeInTheDocument(); + expect(screen.getByText("Test results")).toBeInTheDocument(); expect(screen.getByText("fake npi for pxp")).toBeInTheDocument(); expect(screen.getAllByText("Negative").length).toBe(3); }); @@ -231,11 +227,8 @@ describe("TestResultPrintModal with RSV and flu results", () => { ); }); - // this should be changed when we correct our copy to the right header text (#7000) it("should render flu information", () => { - expect( - screen.getByText("Test results: COVID-19 and flu") - ).toBeInTheDocument(); + expect(screen.getByText("Test results")).toBeInTheDocument(); expect(screen.getByText("For flu A and B:")).toBeInTheDocument(); }); diff --git a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.tsx b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.tsx index f692190a16..b2737cedf9 100644 --- a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.tsx +++ b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultPrintModal.tsx @@ -15,8 +15,9 @@ import { displayFullName } from "../../../utils"; import { formatDateWithTimeOption } from "../../../utils/date"; import { hasCovidResults, - hasMultiplexResults, + hasMultipleResults, hasPositiveFluResults, + hasPositiveRsvResults, } from "../../../utils/testResults"; import { setLanguage } from "../../../utils/languages"; @@ -86,9 +87,9 @@ export const StaticTestResultModal = ({ >

- {hasMultiplexResults(results) - ? t("testResult.multiplexResultHeader") - : t("testResult.covidResultHeader")} + {hasMultipleResults(results) + ? t("testResult.multipleResultHeader") + : t("testResult.singleResultHeader")}

SimpleReport logo - {(hasCovidResults(results) || hasPositiveFluResults(results)) && ( + {(hasCovidResults(results) || + hasPositiveFluResults(results) || + hasPositiveRsvResults(results)) && (

{t("testResult.moreInformation")}

- Test results: COVID-19 and flu + Test results

SimpleReport logo (cdc.gov/flu/treatment/takingcare.htm).

+

+ For RSV: +

+

+ RSV usually causes mild, cold-like symptoms. Most people can recover at home, but RSV can cause serious illness and hospitalization for infants and older adults. You can help prevent the spread of RSV by staying at home when sick, avoiding close contact with others, and washing your hands frequently. +

+

+ You can take steps to relieve symptoms, including managing fever and pain with over-the-counter fever reducers, and drinking enough fluids. If your child has RSV, talk to their healthcare provider before giving them non-prescription cold medicine. +

+

+ Contact your healthcare professional if your symptoms worsen, you are having trouble breathing, or are dehydrated. + + Learn more about RSV symptoms and care on the CDC website. + +