Allow toggling brand names of drugs #70968
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Interface "Allow toggling on drug brand names"
Purpose of change
Fixes #51689
In #45308, the names of various pharmaceutical items were changed from brand names to generic names describing their active ingredients.
In #46814, the names of various guns were changed from specific brand names to generic versions, and many guns were collapsed into the generic versions. However, variants were added, allowing a toggle to bring back all those names.
We can follow that same approach for drugs, using variants to allow toggling between the generic names and brand names.
Describe the solution
To do this, simply add a new variant type, a new option, and then change whether that type is shown based on the value of that option. Then, add the variants for brand names.
Testing
Additional context
I didn't add back the non-generic names for the antibiotics because