diff --git a/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.test.tsx b/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.test.tsx new file mode 100644 index 0000000000..4331c8d5fd --- /dev/null +++ b/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.test.tsx @@ -0,0 +1,13 @@ +import { render, screen } from "@testing-library/react"; + +import "../../../i18n"; + +import GonorrheaResultGuidance from "./GonorrheaResultGuidance"; + +describe("GonorrheaResultGuidance", () => { + it("displays guidance for a Gonorrhea result", () => { + const { container } = render(); + expect(screen.getByText("For Gonorrhea:")).toBeInTheDocument(); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.tsx b/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.tsx new file mode 100644 index 0000000000..4117789041 --- /dev/null +++ b/frontend/src/app/commonComponents/TestResultGuidance/GonorrheaResultGuidance.tsx @@ -0,0 +1,31 @@ +import React from "react"; +import { Trans, useTranslation } from "react-i18next"; + +const GonorrheaResultGuidance = () => { + const { t } = useTranslation(); + + return ( + <> +

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

+

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

+ + gonorrhea treatment link + , + ]} + /> + + ); +}; + +export default GonorrheaResultGuidance; diff --git a/frontend/src/app/commonComponents/TestResultGuidance/__snapshots__/GonorrheaResultGuidance.test.tsx.snap b/frontend/src/app/commonComponents/TestResultGuidance/__snapshots__/GonorrheaResultGuidance.test.tsx.snap new file mode 100644 index 0000000000..ac75e03826 --- /dev/null +++ b/frontend/src/app/commonComponents/TestResultGuidance/__snapshots__/GonorrheaResultGuidance.test.tsx.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`GonorrheaResultGuidance displays guidance for a Gonorrhea result 1`] = ` +
+

+ For Gonorrhea: +

+

+ If you have a positive result, you will need a follow-up test to confirm your results. The organization that provided your test should be able to answer questions and provide referrals for follow-up testing. +

+

+ + Visit the CDC website to learn more about a positive Gonorrhea result. + + (cdc.gov/gonorrhea/about). +

+
+`; diff --git a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.tsx b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.tsx index 1ed4ce6435..4c3c4fc2ca 100644 --- a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.tsx +++ b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.tsx @@ -61,8 +61,12 @@ export const DetachedTestResultDetailsModal = ({ data?.testResult.results, MULTIPLEX_DISEASES.HEPATITIS_C ); + const isGonorrheaResult = !!getResultForDisease( + data?.testResult.results, + MULTIPLEX_DISEASES.GONORRHEA + ); const showGenderOfSexualPartners = - isHIVResult || isSyphilisResult || isHepatitisCResult; + isHIVResult || isSyphilisResult || isHepatitisCResult || isGonorrheaResult; const dateTested = data?.testResult.dateTested; diff --git a/frontend/src/app/utils/testResults.tsx b/frontend/src/app/utils/testResults.tsx index 6851a728f9..2a0def21a4 100644 --- a/frontend/src/app/utils/testResults.tsx +++ b/frontend/src/app/utils/testResults.tsx @@ -6,6 +6,7 @@ import HivResultGuidance from "../commonComponents/TestResultGuidance/HivResultG import RsvResultGuidance from "../commonComponents/TestResultGuidance/RsvResultGuidance"; import SyphilisResultGuidance from "../commonComponents/TestResultGuidance/SyphilisResultGuidance"; import HepatitisCResultGuidance from "../commonComponents/TestResultGuidance/HepatitisCResultGuidance"; +import GonorrheaResultGuidance from "../commonComponents/TestResultGuidance/GonorrheaResultGuidance"; export function getResultByDiseaseName( results: MultiplexResults, @@ -106,5 +107,10 @@ export const getGuidanceForResults = ( guidance.push(); } + match = getResultForDisease(results, MULTIPLEX_DISEASES.GONORRHEA); + if (match) { + guidance.push(); + } + return guidance; }; diff --git a/frontend/src/lang/en.ts b/frontend/src/lang/en.ts index f60c11b561..670184fa6a 100644 --- a/frontend/src/lang/en.ts +++ b/frontend/src/lang/en.ts @@ -41,6 +41,7 @@ export const en = { HIV: "HIV", SYPHILIS: "Syphilis", HEPATITIS_C: "Hepatitis C", + GONORRHEA: "Gonorrhea", }, diseaseResultTitle: { COVID19: "COVID-19 result", @@ -51,6 +52,7 @@ export const en = { HIV: "HIV result", SYPHILIS: "Syphilis result", HEPATITIS_C: "Hepatitis C result", + GONORRHEA: "Gonorrhea result", }, role: { STAFF: "Staff", @@ -431,6 +433,14 @@ export const en = { "https://www.cdc.gov/hepatitis-c/testing/index.html#cdc_testing_results-testing-results", }, }, + gonorrheaNotes: { + h1: "For Gonorrhea:", + positive: { + p0: "If you have a positive result, you will need a follow-up test to confirm your results. The organization that provided your test should be able to answer questions and provide referrals for follow-up testing.", + p1: "<0>Visit the CDC website to learn more about a positive Gonorrhea result. (cdc.gov/gonorrhea/about).", + treatmentLink: "https://www.cdc.gov/gonorrhea/about/index.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 75328f2c60..c0025619fe 100644 --- a/frontend/src/lang/es.ts +++ b/frontend/src/lang/es.ts @@ -44,6 +44,7 @@ export const es: LanguageConfig = { HIV: "VIH", SYPHILIS: "Sífilis", HEPATITIS_C: "Hepatitis C", + GONORRHEA: "Gonorrea", }, diseaseResultTitle: { COVID19: "COVID-19 resultado", @@ -54,6 +55,7 @@ export const es: LanguageConfig = { HIV: "Resultado de la prueba del VIH", SYPHILIS: "Sífilis resultado", HEPATITIS_C: "Hepatitis C resultado", + GONORRHEA: "Gonorrea resultado", }, role: { STAFF: "Personal", @@ -454,6 +456,15 @@ export const es: LanguageConfig = { "https://www.cdc.gov/hepatitis-c/testing/index.html#cdc_testing_results-testing-results", }, }, + gonorrheaNotes: { + h1: "Para Gonorrea:", + positive: { + p0: "Si obtiene un resultado positivo, deberá hacerse una prueba de seguimiento para confirmarlo. La organización que realizó su prueba debería poder contestar las preguntas que tenga y proporcionarle remisiones para una prueba de seguimiento.", + p1: "<0>Visite el sitio web de los CDC para obtener más información sobre un resultado positivo de gonorrea. (cdc.gov/gonorrhea/es/about/acerca-de-la-gonorrea.html).", + treatmentLink: + "https://www.cdc.gov/gonorrhea/es/about/acerca-de-la-gonorrea.html", + }, + }, tos: { header: "Condiciones del servicio", title: "Condiciones del servicio",