Skip to content

Commit

Permalink
Merge pull request #1564 from CMS-Enterprise/NOREF/preset_category_ca…
Browse files Browse the repository at this point in the history
…sing_fix

[NOREF] correct casing to sentence case for standard categories
  • Loading branch information
StevenWadeOddball authored Dec 11, 2024
2 parents c33a12b + 9da0016 commit baaa41e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion migrations/V181__Add_MTO_Category.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CREATE COLLATION case_insensitive (PROVIDER = ICU, LOCALE = 'und-u-ks-level2', DETERMINISTIC = FALSE);

COMMENT ON COLLATION case_insensitive IS 'a collation to enforce case insensitivity';

CREATE TABLE mto_category (
id UUID PRIMARY KEY,
name ZERO_STRING NOT NULL,
name ZERO_STRING NOT NULL COLLATE "case_insensitive", -- Set case-insensitive collation for the name column,
parent_id UUID REFERENCES mto_category(id),
model_plan_id UUID NOT NULL REFERENCES model_plan(id),
position INT NOT NULL,
Expand Down Expand Up @@ -49,3 +53,4 @@ COMMENT ON CONSTRAINT fk_parent_model_plan ON mto_category IS

COMMENT ON COLUMN mto_category.parent_id IS 'References the parent category. If set, the model_plan_id must match the parent category''s model_plan_id.';
COMMENT ON COLUMN mto_category.model_plan_id IS 'References the model plan associated with this category.';
COMMENT ON COLUMN mto_category.name IS 'The name of the category. We use a collation "case_insensitive" to ensure that it is case insensitive';
2 changes: 1 addition & 1 deletion pkg/graph/resolvers/mto_category.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type mtoStandardCategory struct {
}

var mtoStandardCategories []mtoStandardCategory = []mtoStandardCategory{
{name: "Participants", subcategories: []string{"Application and Selection", "Participant Support"}},
{name: "Participants", subcategories: []string{"Application and selection", "Participant support"}},
{name: "Operations", subcategories: []string{"Set up operations", "Collect data", "Send data to participants", "Participant and beneficiary tracking", "Benchmarks", "Monitoring", "Internal functions", "Fee-for-service (FFS)"}},
{name: "Payment", subcategories: []string{}},
{name: "Payers", subcategories: []string{}},
Expand Down

0 comments on commit baaa41e

Please sign in to comment.