Skip to content

Commit

Permalink
OPM Memo / Executive Order to remove gender identity form fields (#8457)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DanielSass authored Jan 31, 2025
1 parent 844dfc7 commit 367d5c0
Show file tree
Hide file tree
Showing 24 changed files with 124 additions and 827 deletions.
1 change: 1 addition & 0 deletions backend/src/main/resources/application-azure-dev2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ twilio:
enabled: true
features:
oktaMigrationEnabled: true
syphilisEnabled: true
1 change: 0 additions & 1 deletion cypress/e2e/02b-add_patient.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 2 additions & 10 deletions frontend/src/app/constants/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down
21 changes: 0 additions & 21 deletions frontend/src/app/constants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
];
};

Expand Down Expand Up @@ -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);
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/patients/AddPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const EMPTY_PERSON: Nullable<PersonFormData> = {
race: null,
ethnicity: null,
gender: null,
genderIdentity: null,
residentCongregateSetting: undefined,
employedInHealthcare: undefined,
tribalAffiliation: undefined,
Expand Down
11 changes: 3 additions & 8 deletions frontend/src/app/patients/AddPatientAddressVerification.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
14 changes: 2 additions & 12 deletions frontend/src/app/patients/AddPatientStartsTest.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion frontend/src/app/patients/AddPatientTestUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const addPatientRequestParams = {
race: "other",
ethnicity: "refused",
gender: "female",
genderIdentity: "female",
facilityId: mockFacilityID,
preferredLanguage: null,
testResultDelivery: "SMS",
Expand Down
11 changes: 0 additions & 11 deletions frontend/src/app/patients/Components/PersonForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -601,18 +600,8 @@ const PersonForm = (props: Props) => {
validationStatus={validationStatus("ethnicity")}
errorMessage={errors.ethnicity}
/>
<RadioGroup
legend={t("patient.form.demographics.genderIdentity")}
name="genderIdentity"
validationStatus={validationStatus("genderIdentity")}
buttons={GENDER_IDENTITY_VALUES}
selectedRadio={patient.genderIdentity}
onChange={onPersonChange("genderIdentity")}
errorMessage={errors.genderIdentity}
/>
<RadioGroup
legend={t("patient.form.demographics.gender")}
hintText={t("patient.form.demographics.genderHelpText")}
name="gender"
required={view !== PersonFormView.PXP}
validationStatus={validationStatus("gender")}
Expand Down
14 changes: 2 additions & 12 deletions frontend/src/app/patients/EditPatient.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ describe("EditPatient", () => {
race: "white",
ethnicity: "hispanic",
gender: "male",
genderIdentity: "male",
residentCongregateSetting: true,
employedInHealthcare: true,
facility: null,
Expand Down Expand Up @@ -120,7 +119,6 @@ describe("EditPatient", () => {
race: "white",
ethnicity: "hispanic",
gender: "male",
genderIdentity: "male",
residentCongregateSetting: true,
employedInHealthcare: true,
facility: null,
Expand Down Expand Up @@ -295,7 +293,6 @@ describe("EditPatient", () => {
race: null,
ethnicity: null,
gender: null,
genderIdentity: null,
residentCongregateSetting: true,
employedInHealthcare: true,
facility: null,
Expand Down Expand Up @@ -403,7 +400,6 @@ describe("EditPatient", () => {
race: null,
ethnicity: null,
gender: null,
genderIdentity: null,
residentCongregateSetting: true,
employedInHealthcare: true,
facility: null,
Expand Down Expand Up @@ -497,8 +493,7 @@ describe("EditPatient", () => {
country: null,
race: "refused",
ethnicity: "refused",
gender: "refused",
genderIdentity: "refused",
gender: "female",
residentCongregateSetting: null,
employedInHealthcare: null,
facility: null,
Expand Down Expand Up @@ -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}`);
Expand Down
Loading

0 comments on commit 367d5c0

Please sign in to comment.