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")}
- {(hasCovidResults(results) || hasPositiveFluResults(results)) && (
+ {(hasCovidResults(results) ||
+ hasPositiveFluResults(results) ||
+ hasPositiveRsvResults(results)) && (
{t("testResult.moreInformation")}
- Test results: COVID-19 and flu
+ Test results
(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.
+
+
@@ -383,7 +404,7 @@ Object {
class="display-flex flex-align-end flex-justify margin-bottom-1"
>
- Test results: COVID-19 and flu
+ Test results
(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.
+
+
@@ -766,7 +808,7 @@ Object {
class="display-flex flex-align-end flex-justify margin-bottom-1"
>
- Test results: COVID-19 and flu
+ Test results
- Test results: COVID-19 and flu
+ Test results
- Test results: COVID-19 and flu
+ Test results
- Test results: COVID-19 and flu
+ Test results
- Test result: COVID-19
+ Test result
1;
+}
+
export function hasMultiplexResults(results: MultiplexResults): boolean {
return results?.length > 1
? results.some(
@@ -59,3 +63,13 @@ export function hasCovidResults(results: MultiplexResults): boolean {
).length > 0
);
}
+
+export function hasPositiveRsvResults(results: MultiplexResults): boolean {
+ return (
+ results.filter(
+ (multiplexResult: MultiplexResult) =>
+ multiplexResult.disease.name.includes("RSV") &&
+ getTestResult(multiplexResult) === "POSITIVE"
+ ).length > 0
+ );
+}
diff --git a/frontend/src/lang/en.ts b/frontend/src/lang/en.ts
index b40f33a3ac..26e38ac69a 100644
--- a/frontend/src/lang/en.ts
+++ b/frontend/src/lang/en.ts
@@ -272,8 +272,8 @@ export const en = {
title: "Test result",
resultLiteral: "result",
result: "SARS-CoV-2 result",
- covidResultHeader: "Test result: COVID-19",
- multiplexResultHeader: "Test results: COVID-19 and flu",
+ singleResultHeader: "Test result",
+ multipleResultHeader: "Test results",
downloadResult: "Download result",
patient: "Patient",
patientDetails: "Patient details",
@@ -380,6 +380,15 @@ export const en = {
treatmentLink: "https://www.cdc.gov/flu/treatment/takingcare.htm",
},
},
+ rsvNotes: {
+ h1: "For RSV:",
+ positive: {
+ p0: "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.",
+ p1: "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.",
+ p2: "Contact your healthcare professional if your symptoms worsen, you are having trouble breathing, or are dehydrated. <0>Learn more about RSV symptoms and care on the CDC website.0>",
+ rsvSymptomsLink: "https://www.cdc.gov/rsv/about/symptoms.html",
+ },
+ },
tos: {
header: "Terms of service",
title: "Terms of service",
diff --git a/frontend/src/lang/es.ts b/frontend/src/lang/es.ts
index ec00d29525..460863652a 100644
--- a/frontend/src/lang/es.ts
+++ b/frontend/src/lang/es.ts
@@ -39,7 +39,7 @@ export const es: LanguageConfig = {
COVID19: "COVID-19",
FLUA: "Flu A",
FLUB: "Flu B",
- RSV: "RSV",
+ RSV: "VRS",
},
role: {
STAFF: "Personal",
@@ -283,9 +283,8 @@ export const es: LanguageConfig = {
title: "Resultado de la prueba",
resultLiteral: "resultado",
result: "Resultado de SARS-CoV-2",
- covidResultHeader: "Resultado de la prueba: COVID-19",
- multiplexResultHeader:
- "Resultados de las pruebas: COVID-19 y la influenza",
+ singleResultHeader: "Resultado de la prueba",
+ multipleResultHeader: "Resultados de las pruebas",
downloadResult: "Descargar resultado",
patient: "Paciente",
patientDetails: "Detalles del paciente",
@@ -407,6 +406,15 @@ export const es: LanguageConfig = {
treatmentLink: "https://espanol.cdc.gov/flu/treatment/takingcare.htm",
},
},
+ rsvNotes: {
+ h1: "Para VRS:",
+ positive: {
+ p0: "Por lo general, el virus respiratorio sincitial (VRS o RSV, por sus siglas en inglés) causa síntomas leves similares a los de un resfriado. La mayoría de las personas pueden recuperarse en casa, pero el VRS puede causar enfermedad grave y hospitalización en bebés y personas mayores. Usted puede ayudar a prevenir la propagación del VRS si se queda en casa cuando esté enfermo, evita el contacto cercano con otras personas y se lava las manos con frecuencia.",
+ p1: "Puede tomar medidas para aliviar los síntomas, como beber suficientes líquidos y tomar medicamentos de venta sin receta para controlar el dolor y la fiebre. Si su hijo/a tiene el VRS, hable con su proveedor de atención médica antes de darle medicamentos para el resfriado sin receta.",
+ p2: "Comuníquese con un profesional de atención médica si sus síntomas empeoran, tiene problemas para respirar o está deshidratado. <0>Obtenga más información sobre los síntomas y cuidados de la infección por el VRS en el sitio web de los CDC0>",
+ rsvSymptomsLink: "https://espanol.cdc.gov/rsv/about/symptoms.html",
+ },
+ },
tos: {
header: "Condiciones del servicio",
title: "Condiciones del servicio",
diff --git a/frontend/src/patientApp/timeOfTest/TestResult.test.tsx b/frontend/src/patientApp/timeOfTest/TestResult.test.tsx
index de87dcd246..9efbd980da 100644
--- a/frontend/src/patientApp/timeOfTest/TestResult.test.tsx
+++ b/frontend/src/patientApp/timeOfTest/TestResult.test.tsx
@@ -59,9 +59,7 @@ describe("TestResult - single disease", () => {
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test result: COVID-19")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test result")).toBeInTheDocument();
expect(
within(patientApp).getByText("Abbott BinaxNOW (Antigen)")
).toBeInTheDocument();
@@ -82,9 +80,7 @@ describe("TestResult - single disease", () => {
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test result: COVID-19")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test result")).toBeInTheDocument();
expect(within(patientApp).getByText("Positive")).toBeInTheDocument();
});
it("should show a negative result", () => {
@@ -100,9 +96,7 @@ describe("TestResult - single disease", () => {
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test result: COVID-19")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test result")).toBeInTheDocument();
expect(within(patientApp).getByText("Negative")).toBeInTheDocument();
});
it("should show an inconclusive result", () => {
@@ -118,9 +112,7 @@ describe("TestResult - single disease", () => {
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test result: COVID-19")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test result")).toBeInTheDocument();
expect(within(patientApp).getByText("Inconclusive")).toBeInTheDocument();
});
});
@@ -140,9 +132,7 @@ describe("TestResult - multiple diseases", () => {
);
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test results: COVID-19 and flu")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test results")).toBeInTheDocument();
expect(within(patientApp).getByText("COVID-19 result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu A result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu B result")).toBeInTheDocument();
@@ -164,9 +154,7 @@ describe("TestResult - multiple diseases", () => {
);
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test results: COVID-19 and flu")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test results")).toBeInTheDocument();
expect(within(patientApp).getByText("COVID-19 result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu A result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu B result")).toBeInTheDocument();
@@ -192,9 +180,7 @@ describe("TestResult - multiple diseases", () => {
);
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test results: COVID-19 and flu")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test results")).toBeInTheDocument();
expect(within(patientApp).getByText("COVID-19 result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu A result")).toBeInTheDocument();
expect(within(patientApp).getByText("Flu B result")).toBeInTheDocument();
@@ -214,9 +200,7 @@ describe("TestResult - multiple diseases", () => {
);
const patientApp = screen.getByTestId("patient-app");
- expect(
- within(patientApp).getByText("Test results: COVID-19 and flu")
- ).toBeInTheDocument();
+ expect(within(patientApp).getByText("Test results")).toBeInTheDocument();
expect(within(patientApp).getByText("COVID-19 result")).toBeInTheDocument();
expect(within(patientApp).getByText("RSV result")).toBeInTheDocument();
expect(within(patientApp).getAllByText("Positive")).toHaveLength(1);
diff --git a/frontend/src/patientApp/timeOfTest/TestResult.tsx b/frontend/src/patientApp/timeOfTest/TestResult.tsx
index ddcd415a20..87b9c54583 100644
--- a/frontend/src/patientApp/timeOfTest/TestResult.tsx
+++ b/frontend/src/patientApp/timeOfTest/TestResult.tsx
@@ -10,7 +10,7 @@ import Button from "../../app/commonComponents/Button/Button";
import MultiplexResultsGuidance from "../../app/commonComponents/MultiplexResultsGuidance";
import TestResultsList from "../../app/commonComponents/TestResultsList";
import { formatDateWithTimeOption } from "../../app/utils/date";
-import { hasMultiplexResults } from "../../app/utils/testResults";
+import { hasMultipleResults } from "../../app/utils/testResults";
import "./TestResult.scss";
import { useDocumentTitle } from "../../app/utils/hooks";
@@ -22,7 +22,6 @@ const TestResult = () => {
const testResult = useSelector(
(state) => state.testResult
);
- const isMultiplex = hasMultiplexResults(testResult.results);
const fullName = formatFullName(testResult?.patient as any);
const dateTested = formatDateWithTimeOption(testResult?.dateTested, true);
const deviceType = testResult?.deviceType.name;
@@ -45,9 +44,9 @@ const TestResult = () => {
- {isMultiplex
- ? t("testResult.multiplexResultHeader")
- : t("testResult.covidResultHeader")}
+ {hasMultipleResults(testResult.results)
+ ? t("testResult.multipleResultHeader")
+ : t("testResult.singleResultHeader")}