From 367d5c0b5c902d304269594fbd3c194efda56797 Mon Sep 17 00:00:00 2001 From: Daniel Sass Date: Fri, 31 Jan 2025 16:00:29 -0500 Subject: [PATCH] OPM Memo / Executive Order to remove gender identity form fields (#8457) * removing gender identity fields from the app in response to OPM memo/ CDC instructions * removing gender identity fields from the app in response to OPM memo/ CDC instructions * removing gender identity fields from the app in response to OPM memo/ CDC instructions * removing gender identity fields from the app in response to OPM memo/ CDC instructions --- .../resources/application-azure-dev2.yaml | 1 + cypress/e2e/02b-add_patient.cy.js | 1 - frontend/src/app/constants/constants.d.ts | 12 +- frontend/src/app/constants/index.tsx | 21 - frontend/src/app/patients/AddPatient.tsx | 1 - .../AddPatientAddressVerification.test.tsx | 11 +- .../patients/AddPatientStartsTest.test.tsx | 14 +- .../src/app/patients/AddPatientTestUtils.tsx | 1 - .../app/patients/Components/PersonForm.tsx | 11 - .../src/app/patients/EditPatient.test.tsx | 14 +- .../__snapshots__/EditPatient.test.tsx.snap | 345 ++++----------- frontend/src/app/patients/personSchema.ts | 9 - .../app/testQueue/TestCard/TestCard.test.tsx | 10 +- .../__snapshots__/TestCardForm.test.tsx.snap | 414 +----------------- .../diseaseSpecificComponents/HIVAoEForm.tsx | 6 +- .../SyphilisAoEForm.tsx | 6 +- .../GenderOfSexualPartnersAoe.tsx | 6 +- .../TestResultDetailsModal.test.tsx | 12 +- .../TestResultDetailsModal.test.tsx.snap | 8 +- frontend/src/app/utils/gender.test.ts | 10 +- frontend/src/app/utils/gender.ts | 5 - frontend/src/lang/en.ts | 16 +- frontend/src/lang/es.ts | 14 - .../SelfRegistration.test.tsx | 3 - 24 files changed, 124 insertions(+), 827 deletions(-) diff --git a/backend/src/main/resources/application-azure-dev2.yaml b/backend/src/main/resources/application-azure-dev2.yaml index caf4b23e24..e9b6811d63 100644 --- a/backend/src/main/resources/application-azure-dev2.yaml +++ b/backend/src/main/resources/application-azure-dev2.yaml @@ -17,3 +17,4 @@ twilio: enabled: true features: oktaMigrationEnabled: true + syphilisEnabled: true diff --git a/cypress/e2e/02b-add_patient.cy.js b/cypress/e2e/02b-add_patient.cy.js index 21dcdf9e62..412112a3e9 100644 --- a/cypress/e2e/02b-add_patient.cy.js +++ b/cypress/e2e/02b-add_patient.cy.js @@ -52,7 +52,6 @@ describe("Adding a single patient", () => { cy.get('[data-cy="personForm-dob-input"]').type(patient.dobForInput); cy.get('[data-cy="phone-input-0"]').type(patient.phone); cy.get('[data-cy="radio-group-option-phoneType-0-MOBILE"]').click(); - cy.get('[data-cy="radio-group-option-genderIdentity-female"]').click(); cy.get('[data-cy="radio-group-option-gender-female"]').click(); cy.get('[data-cy="street-input"]').type(patient.address); cy.get('[data-cy="state-input"]').select(patient.state); diff --git a/frontend/src/app/constants/constants.d.ts b/frontend/src/app/constants/constants.d.ts index 99c9f2c862..c17fc231ae 100644 --- a/frontend/src/app/constants/constants.d.ts +++ b/frontend/src/app/constants/constants.d.ts @@ -7,15 +7,8 @@ type Race = | "other" | "refused"; type Ethnicity = "hispanic" | "not_hispanic" | "refused"; -type Gender = "male" | "female" | "other" | "refused"; -type GenderIdentity = - | "female" - | "male" - | "transwoman" - | "transman" - | "nonbinary" - | "other" - | "refused"; +type Gender = "male" | "female"; +type GenderIdentity = "female" | "male"; type YesNo = "YES" | "NO"; type Role = "STAFF" | "RESIDENT" | "STUDENT" | "VISITOR" | ""; type PhoneType = "MOBILE" | "LANDLINE" | "UNKNOWN"; @@ -595,7 +588,6 @@ interface PersonUpdate extends Address { race: Race; ethnicity: Ethnicity; gender: Gender; - genderIdentity: GenderIdentity; residentCongregateSetting: boolean | null | undefined; employedInHealthcare: boolean | null | undefined; tribalAffiliation: TribalAffiliation | undefined; diff --git a/frontend/src/app/constants/index.tsx b/frontend/src/app/constants/index.tsx index 516c7c24e9..54fa06f18b 100644 --- a/frontend/src/app/constants/index.tsx +++ b/frontend/src/app/constants/index.tsx @@ -66,25 +66,6 @@ const genderValues = (_t: TFunction): { value: Gender; label: string }[] => { return [ { label: i18n.t("constants.gender.female"), value: "female" }, { label: i18n.t("constants.gender.male"), value: "male" }, - { label: i18n.t("constants.gender.other"), value: "other" }, - { label: i18n.t("constants.gender.refused"), value: "refused" }, - ]; -}; - -const genderIdentityValues = ( - _t: TFunction -): { value: GenderIdentity; label: string }[] => { - return [ - { label: i18n.t("constants.genderIdentity.female"), value: "female" }, - { label: i18n.t("constants.genderIdentity.male"), value: "male" }, - { - label: i18n.t("constants.genderIdentity.transwoman"), - value: "transwoman", - }, - { label: i18n.t("constants.genderIdentity.transman"), value: "transman" }, - { label: i18n.t("constants.genderIdentity.nonbinary"), value: "nonbinary" }, - { label: i18n.t("constants.genderIdentity.other"), value: "other" }, - { label: i18n.t("constants.genderIdentity.refused"), value: "refused" }, ]; }; @@ -769,7 +750,6 @@ export const RACE_VALUES = raceValues(i18n.t); export const ROLE_VALUES = roleValues(i18n.t); export const ETHNICITY_VALUES = ethnicityValues(i18n.t); export const GENDER_VALUES = genderValues(i18n.t); -export const GENDER_IDENTITY_VALUES = genderIdentityValues(i18n.t); export const YES_NO_VALUES = yesNoValues(i18n.t); export const PHONE_TYPE_VALUES = phoneTypeValues(i18n.t); export const YES_NO_UNKNOWN_VALUES = yesNoUnkownValues(i18n.t); @@ -783,7 +763,6 @@ export const useTranslatedConstants = () => { ROLE_VALUES: roleValues(t), ETHNICITY_VALUES: ethnicityValues(t), GENDER_VALUES: genderValues(t), - GENDER_IDENTITY_VALUES: genderIdentityValues(t), TEST_RESULT_DELIVERY_PREFERENCE_VALUES_SMS: testResultDeliveryPreferenceValuesSms(t), TEST_RESULT_DELIVERY_PREFERENCE_VALUES_EMAIL: diff --git a/frontend/src/app/patients/AddPatient.tsx b/frontend/src/app/patients/AddPatient.tsx index f90d24cfd9..3d790bdfa2 100644 --- a/frontend/src/app/patients/AddPatient.tsx +++ b/frontend/src/app/patients/AddPatient.tsx @@ -31,7 +31,6 @@ export const EMPTY_PERSON: Nullable = { race: null, ethnicity: null, gender: null, - genderIdentity: null, residentCongregateSetting: undefined, employedInHealthcare: undefined, tribalAffiliation: undefined, diff --git a/frontend/src/app/patients/AddPatientAddressVerification.test.tsx b/frontend/src/app/patients/AddPatientAddressVerification.test.tsx index 94b9be77e0..e0a771a12a 100644 --- a/frontend/src/app/patients/AddPatientAddressVerification.test.tsx +++ b/frontend/src/app/patients/AddPatientAddressVerification.test.tsx @@ -56,12 +56,7 @@ describe("Add Patient: All required fields entered and submitting address verifi value: "refused", exact: true, }, - "Sex assigned at birth": { - label: "Female", - value: "female", - exact: true, - }, - "What's your gender identity?": { + Sex: { label: "Female", value: "female", exact: true, @@ -128,7 +123,7 @@ describe("Add Patient: All required fields entered and submitting address verifi value: "refused", exact: true, }, - "Sex assigned at birth": { + Sex: { label: "Female", value: "female", exact: true, @@ -169,7 +164,7 @@ describe("Add Patient: All required fields entered and submitting address verifi value: "SMS", exact: false, }, - "Sex assigned at birth": { + Sex: { label: "Female", value: "female", exact: true, diff --git a/frontend/src/app/patients/AddPatientStartsTest.test.tsx b/frontend/src/app/patients/AddPatientStartsTest.test.tsx index 3606cac65e..bf792f248e 100644 --- a/frontend/src/app/patients/AddPatientStartsTest.test.tsx +++ b/frontend/src/app/patients/AddPatientStartsTest.test.tsx @@ -60,12 +60,7 @@ describe("Add Patient: saving changes and starting a test", () => { value: "refused", exact: true, }, - "Sex assigned at birth": { - label: "Female", - value: "female", - exact: true, - }, - "What's your gender identity?": { + Sex: { label: "Female", value: "female", exact: true, @@ -133,12 +128,7 @@ describe("Add Patient: saving changes and starting a test", () => { value: "refused", exact: true, }, - "Sex assigned at birth": { - label: "Female", - value: "female", - exact: true, - }, - "What's your gender identity?": { + Sex: { label: "Female", value: "female", exact: true, diff --git a/frontend/src/app/patients/AddPatientTestUtils.tsx b/frontend/src/app/patients/AddPatientTestUtils.tsx index 64fe103994..4482715278 100644 --- a/frontend/src/app/patients/AddPatientTestUtils.tsx +++ b/frontend/src/app/patients/AddPatientTestUtils.tsx @@ -111,7 +111,6 @@ const addPatientRequestParams = { race: "other", ethnicity: "refused", gender: "female", - genderIdentity: "female", facilityId: mockFacilityID, preferredLanguage: null, testResultDelivery: "SMS", diff --git a/frontend/src/app/patients/Components/PersonForm.tsx b/frontend/src/app/patients/Components/PersonForm.tsx index 5aa1c55717..70c7f4caaa 100644 --- a/frontend/src/app/patients/Components/PersonForm.tsx +++ b/frontend/src/app/patients/Components/PersonForm.tsx @@ -379,7 +379,6 @@ const PersonForm = (props: Props) => { RACE_VALUES, ETHNICITY_VALUES, GENDER_VALUES, - GENDER_IDENTITY_VALUES, ROLE_VALUES, TEST_RESULT_DELIVERY_PREFERENCE_VALUES_EMAIL, } = useTranslatedConstants(); @@ -601,18 +600,8 @@ const PersonForm = (props: Props) => { validationStatus={validationStatus("ethnicity")} errorMessage={errors.ethnicity} /> - { race: "white", ethnicity: "hispanic", gender: "male", - genderIdentity: "male", residentCongregateSetting: true, employedInHealthcare: true, facility: null, @@ -120,7 +119,6 @@ describe("EditPatient", () => { race: "white", ethnicity: "hispanic", gender: "male", - genderIdentity: "male", residentCongregateSetting: true, employedInHealthcare: true, facility: null, @@ -295,7 +293,6 @@ describe("EditPatient", () => { race: null, ethnicity: null, gender: null, - genderIdentity: null, residentCongregateSetting: true, employedInHealthcare: true, facility: null, @@ -403,7 +400,6 @@ describe("EditPatient", () => { race: null, ethnicity: null, gender: null, - genderIdentity: null, residentCongregateSetting: true, employedInHealthcare: true, facility: null, @@ -497,8 +493,7 @@ describe("EditPatient", () => { country: null, race: "refused", ethnicity: "refused", - gender: "refused", - genderIdentity: "refused", + gender: "female", residentCongregateSetting: null, employedInHealthcare: null, facility: null, @@ -527,12 +522,7 @@ describe("EditPatient", () => { expect( (await screen.findAllByText("Franecki, Eugenia", { exact: false }))[0] ).toBeInTheDocument(); - [ - "Race", - "Are you Hispanic or Latino?", - "Sex assigned at birth", - "What's your gender identity?", - ].forEach((legend) => { + ["Race", "Are you Hispanic or Latino?"].forEach((legend) => { const fieldset = screen.getByText(legend).closest("fieldset"); if (fieldset === null) { throw Error(`Unable to corresponding fieldset for ${legend}`); diff --git a/frontend/src/app/patients/__snapshots__/EditPatient.test.tsx.snap b/frontend/src/app/patients/__snapshots__/EditPatient.test.tsx.snap index 3e2dafef41..6be347a620 100644 --- a/frontend/src/app/patients/__snapshots__/EditPatient.test.tsx.snap +++ b/frontend/src/app/patients/__snapshots__/EditPatient.test.tsx.snap @@ -102,7 +102,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` > @@ -4171,7 +4171,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` White @@ -4190,7 +4190,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Other @@ -4209,7 +4209,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Prefer not to answer @@ -4539,7 +4539,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Yes @@ -4558,7 +4558,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` No @@ -4577,7 +4577,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` - Prefer not to answer - - - - - -
-
- - What's your gender identity? - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - @@ -4756,7 +4604,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` - Sex assigned at birth + Sex - - This is usually the gender that is written on your original birth certificate. -
@@ -4779,7 +4622,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Female @@ -4798,7 +4641,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Male
-
- - -
-
- - -
@@ -4893,7 +4698,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` checked="" class="usa-radio__input" data-required="false" - id="123-val-YES" + id="118-val-YES" name="residentCongregateSetting" type="radio" value="YES" @@ -4901,7 +4706,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` @@ -4912,7 +4717,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` No @@ -4931,7 +4736,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Not sure @@ -4970,7 +4775,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` checked="" class="usa-radio__input" data-required="false" - id="124-val-YES" + id="119-val-YES" name="employedInHealthcare" type="radio" value="YES" @@ -4978,7 +4783,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` @@ -4989,7 +4794,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` No @@ -5008,7 +4813,7 @@ exports[`EditPatient facility select input matches screenshot 1`] = ` Not sure diff --git a/frontend/src/app/patients/personSchema.ts b/frontend/src/app/patients/personSchema.ts index a3a5ced9b6..2c28cbc2a6 100644 --- a/frontend/src/app/patients/personSchema.ts +++ b/frontend/src/app/patients/personSchema.ts @@ -12,7 +12,6 @@ import { GENDER_VALUES, TRIBAL_AFFILIATION_VALUES, PHONE_TYPE_VALUES, - GENDER_IDENTITY_VALUES, } from "../constants"; import { Option } from "../commonComponents/Dropdown"; import { languages } from "../../config/constants"; @@ -284,14 +283,6 @@ const updateFieldSchemata: ( .mixed() .oneOf(getValues(GENDER_VALUES), t("patient.form.errors.gender") || "") .required(), - genderIdentity: yup - .mixed() - .nullable() - .oneOf( - [...getValues(GENDER_IDENTITY_VALUES), "", null], - t("patient.form.errors.genderIdentity") || "" - ) - .notRequired(), residentCongregateSetting: yup.boolean().nullable(), employedInHealthcare: yup.boolean().nullable(), tribalAffiliation: yup diff --git a/frontend/src/app/testQueue/TestCard/TestCard.test.tsx b/frontend/src/app/testQueue/TestCard/TestCard.test.tsx index 3b403cde2a..5542001908 100644 --- a/frontend/src/app/testQueue/TestCard/TestCard.test.tsx +++ b/frontend/src/app/testQueue/TestCard/TestCard.test.tsx @@ -362,7 +362,7 @@ describe("TestCard", () => { ) ).toBeInTheDocument(); expect( - screen.getByText("What is the gender of their sexual partners?") + screen.getByText("What is the sex of their sexual partners?") ).toBeInTheDocument(); const symptomFieldSet = screen.getByTestId( @@ -385,7 +385,7 @@ describe("TestCard", () => { ) ).not.toBeInTheDocument(); expect( - screen.queryByText("What is the gender of their sexual partners?") + screen.queryByText("What is the sex of their sexual partners?") ).not.toBeInTheDocument(); }; @@ -1244,7 +1244,7 @@ describe("TestCard", () => { ); expect(screen.getByText("Is the patient pregnant?")).toBeInTheDocument(); expect( - screen.getByText("What is the gender of their sexual partners?") + screen.getByText("What is the sex of their sexual partners?") ).toBeInTheDocument(); expect( screen.queryByText( @@ -1276,7 +1276,7 @@ describe("TestCard", () => { screen.queryByText("Is the patient pregnant?") ).not.toBeInTheDocument(); expect( - screen.queryByText("What is the gender of their sexual partners?") + screen.queryByText("What is the sex of their sexual partners?") ).not.toBeInTheDocument(); }); @@ -1333,7 +1333,7 @@ describe("TestCard", () => { ) ).toBeInTheDocument(); expect( - screen.getByText("What is the gender of their sexual partners?") + screen.getByText("What is the sex of their sexual partners?") ).toBeInTheDocument(); expect( screen.getByText("Has the patient been told they have syphilis before?") diff --git a/frontend/src/app/testQueue/TestCardForm/__snapshots__/TestCardForm.test.tsx.snap b/frontend/src/app/testQueue/TestCardForm/__snapshots__/TestCardForm.test.tsx.snap index 6610d80af4..540f4fa5a7 100644 --- a/frontend/src/app/testQueue/TestCardForm/__snapshots__/TestCardForm.test.tsx.snap +++ b/frontend/src/app/testQueue/TestCardForm/__snapshots__/TestCardForm.test.tsx.snap @@ -245,7 +245,7 @@ Object { for="36" id="label-for-36" > - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners? + What is the sex of their sexual partners? - Gender identity not listed here - -
  • Male
  • -
  • - Nonbinary or gender non-conforming -
  • -
  • - Prefer not to answer -
  • -
  • - Transman -
  • -
  • - Transwoman -
  • - What is the gender of their sexual partners?{" "} + What is the sex of their sexual partners?{" "} (Select all that apply.) diff --git a/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/SyphilisAoEForm.tsx b/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/SyphilisAoEForm.tsx index 75485c2f9d..484fd75c24 100644 --- a/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/SyphilisAoEForm.tsx +++ b/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/SyphilisAoEForm.tsx @@ -69,7 +69,7 @@ export const SyphilisAoEForm = ({ ); const CHECKBOX_COLS_TO_DISPLAY = 3; - const { GENDER_IDENTITY_VALUES } = useTranslatedConstants(); + const { GENDER_VALUES } = useTranslatedConstants(); return (
    - What is the gender of their sexual partners?{" "} + What is the sex of their sexual partners?{" "} (Select all that apply.) diff --git a/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/aoeQuestionComponents/GenderOfSexualPartnersAoe.tsx b/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/aoeQuestionComponents/GenderOfSexualPartnersAoe.tsx index b74305b4dc..a5e08858d4 100644 --- a/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/aoeQuestionComponents/GenderOfSexualPartnersAoe.tsx +++ b/frontend/src/app/testQueue/TestCardForm/diseaseSpecificComponents/aoeQuestionComponents/GenderOfSexualPartnersAoe.tsx @@ -1,7 +1,7 @@ import React from "react"; import MultiSelect from "../../../../commonComponents/MultiSelect/MultiSelect"; -import { GENDER_IDENTITY_VALUES } from "../../../../constants"; +import { GENDER_VALUES } from "../../../../constants"; import { AoeQuestionProps } from "../aoeUtils"; export const GenderOfSexualPartnersAoe = ({ @@ -33,12 +33,12 @@ export const GenderOfSexualPartnersAoe = ({ return ( - What is the gender of their sexual partners?{" "} + What is the sex of their sexual partners?{" "} (Select all that apply.) } diff --git a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.test.tsx b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.test.tsx index b343137316..a80a46df2c 100644 --- a/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.test.tsx +++ b/frontend/src/app/testResults/viewResults/actionMenuModals/TestResultDetailsModal.test.tsx @@ -75,7 +75,7 @@ hivTestResult.results = [ __typename: "MultiplexResult", }, ]; -hivTestResult.surveyData.genderOfSexualPartners = ["female", "male", "other"]; +hivTestResult.surveyData.genderOfSexualPartners = ["female", "male"]; hivTestResult.surveyData.pregnancy = "77386006"; const syphilisTestResult = JSON.parse(JSON.stringify(nonMultiplexTestResult)); @@ -92,11 +92,7 @@ syphilisTestResult.surveyData.symptoms = '{"724386005":"false","195469007":"false","26284000":"false","266128007":"true","56940005":"true","91554004":"false","15188001":"false","246636008":"true","56317004":"false"}'; syphilisTestResult.surveyData.symptomOnset = "2024-09-24"; syphilisTestResult.surveyData.noSymptoms = false; -syphilisTestResult.surveyData.genderOfSexualPartners = [ - "female", - "male", - "other", -]; +syphilisTestResult.surveyData.genderOfSexualPartners = ["female", "male"]; const renderComponent = (testResult: TestResult) => render( @@ -171,7 +167,7 @@ describe("HIV TestResultDetailsModal", () => { expect(screen.queryByText("Symptoms")).not.toBeInTheDocument(); expect(screen.queryByText("Symptom onset")).not.toBeInTheDocument(); expect(screen.getByText("Gender of sexual partners")).toBeInTheDocument(); - expect(screen.getByText("Female, Male, Other")).toBeInTheDocument(); + expect(screen.getByText("Female, Male")).toBeInTheDocument(); expect(screen.getByText("Pregnant?")).toBeInTheDocument(); }); @@ -199,7 +195,7 @@ describe("Syphilis TestResultDetailsModal", () => { ) ).toBeInTheDocument(); expect(screen.getByText("Gender of sexual partners")).toBeInTheDocument(); - expect(screen.getByText("Female, Male, Other")).toBeInTheDocument(); + expect(screen.getByText("Female, Male")).toBeInTheDocument(); expect(screen.getByText("Pregnant?")).toBeInTheDocument(); expect( screen.getByText("Previously told they have syphilis?") diff --git a/frontend/src/app/testResults/viewResults/actionMenuModals/__snapshots__/TestResultDetailsModal.test.tsx.snap b/frontend/src/app/testResults/viewResults/actionMenuModals/__snapshots__/TestResultDetailsModal.test.tsx.snap index 36d9fd1749..6e32ea62a7 100644 --- a/frontend/src/app/testResults/viewResults/actionMenuModals/__snapshots__/TestResultDetailsModal.test.tsx.snap +++ b/frontend/src/app/testResults/viewResults/actionMenuModals/__snapshots__/TestResultDetailsModal.test.tsx.snap @@ -133,7 +133,7 @@ Object { - Female, Male, Other + Female, Male @@ -281,7 +281,7 @@ Object { - Female, Male, Other + Female, Male @@ -510,7 +510,7 @@ Object { - Female, Male, Other + Female, Male @@ -694,7 +694,7 @@ Object { - Female, Male, Other + Female, Male diff --git a/frontend/src/app/utils/gender.test.ts b/frontend/src/app/utils/gender.test.ts index db591b123c..009df2ff47 100644 --- a/frontend/src/app/utils/gender.test.ts +++ b/frontend/src/app/utils/gender.test.ts @@ -6,15 +6,13 @@ describe("formatGenderOfSexualPartnersForDisplay", () => { expect(formatGenderOfSexualPartnersForDisplay(genders)).toBe(UNKNOWN); }); it("displays a single gender", () => { - const genders: string[] = ["nonbinary"]; - expect(formatGenderOfSexualPartnersForDisplay(genders)).toBe( - "Nonbinary or gender non-conforming" - ); + const genders: string[] = ["female"]; + expect(formatGenderOfSexualPartnersForDisplay(genders)).toBe("Female"); }); it("displays genders as a comma-separated list", () => { - const genders: string[] = ["female", "male", "transman", "transwoman"]; + const genders: string[] = ["female", "male"]; expect(formatGenderOfSexualPartnersForDisplay(genders)).toBe( - "Female, Male, Transman, Transwoman" + "Female, Male" ); }); it("displays unknown if gender values are not supported", () => { diff --git a/frontend/src/app/utils/gender.ts b/frontend/src/app/utils/gender.ts index 91e448c175..79f1a367bf 100644 --- a/frontend/src/app/utils/gender.ts +++ b/frontend/src/app/utils/gender.ts @@ -2,11 +2,6 @@ export const UNKNOWN = "Unknown"; export const GenderIdentityDisplay: { [_K in GenderIdentity]: string } = { female: "Female", male: "Male", - transwoman: "Transwoman", - transman: "Transman", - nonbinary: "Nonbinary or gender non-conforming", - other: "Other", - refused: "Prefer not to answer", } as const; export const formatGenderOfSexualPartnersForDisplay = ( diff --git a/frontend/src/lang/en.ts b/frontend/src/lang/en.ts index 92db120fc3..5c65ed69b9 100644 --- a/frontend/src/lang/en.ts +++ b/frontend/src/lang/en.ts @@ -71,20 +71,9 @@ export const en = { other: OTHER, refused: REFUSED, }, - genderIdentity: { - female: FEMALE, - male: MALE, - transwoman: GenderIdentityDisplay.transwoman, - transman: GenderIdentityDisplay.transman, - nonbinary: GenderIdentityDisplay.nonbinary, - other: "Gender identity not listed here", - refused: REFUSED, - }, gender: { female: FEMALE, male: MALE, - other: OTHER, - refused: REFUSED, }, ethnicity: { hispanic: YES, @@ -202,10 +191,7 @@ export const en = { race: "Race", tribalAffiliation: "Tribal affiliation", ethnicity: "Are you Hispanic or Latino?", - gender: "Sex assigned at birth", - genderIdentity: "What's your gender identity?", - genderHelpText: - "This is usually the gender that is written on your original birth certificate.", + gender: "Sex", }, housingAndWork: { heading: "Housing and work", diff --git a/frontend/src/lang/es.ts b/frontend/src/lang/es.ts index 74e8883aeb..447af69045 100644 --- a/frontend/src/lang/es.ts +++ b/frontend/src/lang/es.ts @@ -74,20 +74,9 @@ export const es: LanguageConfig = { other: OTHER, refused: REFUSED, }, - genderIdentity: { - female: "Femenino", - male: "Masculino", - transwoman: "Transfemenino o mujer transgénero", - transman: "Transmasculino u hombre transgénero", - nonbinary: "No binario o género no conforme", - other: "Identidad de género no está en la lista", - refused: REFUSED, - }, gender: { female: "Femenino", male: "Masculino", - other: "Persona no binaria", - refused: REFUSED, }, ethnicity: { hispanic: YES, @@ -211,9 +200,6 @@ export const es: LanguageConfig = { tribalAffiliation: "Afiliación tribal", ethnicity: "¿Es usted hispano o latino?", gender: "Sexo asignado al nacer", - genderIdentity: "¿Cuál es su identidad de género?", - genderHelpText: - "Por lo general, este es el género que está escrito en su certificado de nacimiento original.", }, housingAndWork: { heading: "Vivienda y trabajo", diff --git a/frontend/src/patientApp/selfRegistration/SelfRegistration.test.tsx b/frontend/src/patientApp/selfRegistration/SelfRegistration.test.tsx index 911950fe7f..566c68828a 100644 --- a/frontend/src/patientApp/selfRegistration/SelfRegistration.test.tsx +++ b/frontend/src/patientApp/selfRegistration/SelfRegistration.test.tsx @@ -96,9 +96,6 @@ describe("SelfRegistration", () => { fireEvent.click( within(screen.getByTestId("gender")).getByLabelText("Female") ); - fireEvent.click( - within(screen.getByTestId("genderIdentity")).getByLabelText("Female") - ); fireEvent.click(screen.getByText("Native Hawaiian/other Pacific Islander")); fireEvent.click(screen.getByText("Submit")); await screen.findByText("Address validation");