Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…e-review into mcr-3609-state-indicate-not-rates-in-rate-cert
  • Loading branch information
pearl-truss committed May 15, 2024
2 parents 7101bb3 + 54123bf commit e6a3a4e
Show file tree
Hide file tree
Showing 46 changed files with 340 additions and 140 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sechub-jira-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
stage-name: prod

- name: Sync Security Hub and Jira
uses: Enterprise-CMCS/mac-fc-security-hub-visibility@v2.0.1
uses: Enterprise-CMCS/mac-fc-security-hub-visibility@v2.0.2
with:
jira-token: ${{ secrets.JIRA_TOKEN }}
jira-username: ${{ secrets.JIRA_USERNAME }}
Expand Down
2 changes: 1 addition & 1 deletion docs/technical-design/howto-update-state-programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ The source of truth for that file comes from a CSV maintained by product and des
2. Run the script following the command listed in the `import-programs.ts`. This will overwrite existing state programs JSON with the new output. Your usage of the script will likely look something like this: `cd scripts && yarn tsc && node import-programs.js path/to/data.csv > ../services/app-web/src/common-code/data/statePrograms.json`
3. Double check the diff. It's important not to delete any programs that have already been used for a submission because although programs are not in the database, we still store references to the program ID in postgres as if they are stable. Also, we want to be sure we are only changing programs expected to change.
4. For any newly created programs, manually populate the `id` field using a UUID generator
5. Make a PR to update the statePrograms file in the codebase
5. Make a PR to update the statePrograms file in the codebase
3 changes: 2 additions & 1 deletion scripts/import-programs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ https://github.com/Enterprise-CMCS/managed-care-review/blob/main/docs/technical-

import csv from 'csv-parser'
import fs from 'fs'
import { v4 as uuidv4 } from 'uuid'

const stateNames = {
AL: 'Alabama',
Expand Down Expand Up @@ -135,7 +136,7 @@ fs.createReadStream(file)
}

states[code]!.programs.push({
id: data.id,
id: !data.id ? uuidv4() : data.id,
fullName: data.Program,
name: data.Nickname,
isRateProgram: data.IsRateProgram === 'TRUE'
Expand Down
1 change: 1 addition & 0 deletions services/app-api/src/domain-models/ProgramType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export type ProgramType = {
id: string
name: string
fullName: string
isRateProgram: boolean
}
2 changes: 2 additions & 0 deletions services/app-api/src/emailer/templateHelpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ describe('findContractPrograms', () => {
id: 'abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce',
name: 'CHIP',
fullName: 'MN CHIP',
isRateProgram: false,
},
]

Expand All @@ -243,6 +244,7 @@ describe('findContractPrograms', () => {
id: 'unmatched-id',
name: 'CHIP',
fullName: 'MN CHIP',
isRateProgram: false,
},
]

Expand Down
6 changes: 6 additions & 0 deletions services/app-api/src/testHelpers/emailerHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,25 @@ export function mockMNState(): State {
id: 'abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce',
fullName: 'Special Needs Basic Care',
name: 'SNBC',
isRateProgram: false,
},
{
id: 'd95394e5-44d1-45df-8151-1cc1ee66f100',
fullName: 'Prepaid Medical Assistance Program',
name: 'PMAP',
isRateProgram: false,
},
{
id: 'ea16a6c0-5fc6-4df8-adac-c627e76660ab',
fullName: 'Minnesota Senior Care Plus ',
name: 'MSC+',
isRateProgram: false,
},
{
id: '3fd36500-bf2c-47bc-80e8-e7aa417184c5',
fullName: 'Minnesota Senior Health Options',
name: 'MSHO',
isRateProgram: false,
},
],
code: 'MN',
Expand All @@ -115,11 +119,13 @@ export function mockMSState(): State {
id: 'e0819153-5894-4153-937e-aad00ab01a8f',
fullName: 'Mississippi Coordinated Access Network',
name: 'MSCAN',
isRateProgram: false,
},
{
id: '36c54daf-7611-4a15-8c3b-cdeb3fd7e25a',
fullName: 'CHIP',
name: 'CHIP',
isRateProgram: false,
},
],
code: 'MS',
Expand Down
2 changes: 2 additions & 0 deletions services/app-api/src/testHelpers/gqlHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function defaultFloridaProgram(): ProgramType {
id: '5c10fe9f-bec9-416f-a20c-718b152ad633',
name: 'MMA',
fullName: 'Managed Medical Assistance Program ',
isRateProgram: false,
}
}

Expand All @@ -61,6 +62,7 @@ function defaultFloridaRateProgram(): ProgramType {
id: '3b8d8fa1-1fa6-4504-9c5b-ef522877fe1e',
fullName: 'Long-term Care Program',
name: 'LTC',
isRateProgram: false,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mutation createHealthPlanPackage($input: CreateHealthPlanPackageInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ mutation createQuestionResponse($input: CreateQuestionResponseInput!) {
id
name
fullName
isRateProgram
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/mutations/submitContract.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fragment contractFields on Contract {
id
name
fullName
isRateProgram
}
}

Expand All @@ -61,6 +62,7 @@ fragment rateFields on Rate {
id
name
fullName
isRateProgram
}
}
status
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/submitRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mutation submitRate($input: SubmitRateInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mutation unlockHealthPlanPackage($input: UnlockHealthPlanPackageInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/unlockRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ mutation unlockRate($input: UnlockRateInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/updateCMSUser.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mutation updateCMSUser($input: UpdateCMSUserInput!) {
id
name
fullName
isRateProgram
}
}
divisionAssignment
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/mutations/updateContract.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mutation updateContract($input: UpdateContractInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ mutation updateHealthPlanFormData($input: UpdateHealthPlanFormDataInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/queries/fetchContract.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fragment contractFieldsFetchContract on Contract {
id
name
fullName
isRateProgram
}
}

Expand All @@ -61,6 +62,7 @@ fragment rateFields on Rate {
id
name
fullName
isRateProgram
}
}
status
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/queries/fetchCurrentUser.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ query fetchCurrentUser {
id
name
fullName
isRateProgram
}
}
divisionAssignment
Expand All @@ -30,6 +31,7 @@ query fetchCurrentUser {
id
name
fullName
isRateProgram
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ query fetchHealthPlanPackage($input: FetchHealthPlanPackageInput!) {
id
name
fullName
isRateProgram
}
}
status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fragment questionEdgeFragment on QuestionEdge {
id
name
fullName
isRateProgram
}
}
}
Expand All @@ -42,6 +43,7 @@ fragment questionEdgeFragment on QuestionEdge {
id
name
fullName
isRateProgram
}
}
}
Expand All @@ -68,6 +70,7 @@ query fetchHealthPlanPackageWithQuestions($input: FetchHealthPlanPackageInput!)
id
name
fullName
isRateProgram
}
}
revisions {
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/queries/fetchRate.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ fragment rateFields on Rate {
id
name
fullName
isRateProgram
}
}
status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ query indexHealthPlanPackages {
id
name
fullName
isRateProgram
}
}
status
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/queries/indexQuestions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fragment questionEdgeFragment on QuestionEdge {
id
name
fullName
isRateProgram
}
}
}
Expand All @@ -42,6 +43,7 @@ fragment questionEdgeFragment on QuestionEdge {
id
name
fullName
isRateProgram
}
}
}
Expand Down
1 change: 1 addition & 0 deletions services/app-graphql/src/queries/indexRates.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ query indexRates {
id
name
fullName
isRateProgram
}
}
status
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/queries/indexUsers.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ query indexUsers {
id
name
fullName
isRateProgram
}
}
divisionAssignment
Expand All @@ -33,6 +34,7 @@ query indexUsers {
id
name
fullName
isRateProgram
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions services/app-graphql/src/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ type Program {
name: String!
"The full name for the program"
fullName: String!
"Specifies if a program relates to a rate rather than a contract"
isRateProgram: Boolean!
}

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,25 @@ export function mockMNState(): State {
id: 'abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce',
fullName: 'Special Needs Basic Care',
name: 'SNBC',
isRateProgram: false,
},
{
id: 'd95394e5-44d1-45df-8151-1cc1ee66f100',
fullName: 'Prepaid Medical Assistance Program',
name: 'PMAP',
isRateProgram: false,
},
{
id: 'ea16a6c0-5fc6-4df8-adac-c627e76660ab',
fullName: 'Minnesota Senior Care Plus ',
name: 'MSC+',
isRateProgram: false,
},
{
id: '3fd36500-bf2c-47bc-80e8-e7aa417184c5',
fullName: 'Minnesota Senior Health Options',
name: 'MSHO',
isRateProgram: false
},
],
code: 'MN',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface ProgramArgType {
id: string
name: string // short name. This is used most often in the application including in submission name
fullName: string // full name is used in submission summary page
isRateProgram: boolean // specifies if program relates to rates rather than contract
}

export type { StateType, ProgramArgType }
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const submissionData: HealthPlanPackage = {
id: 'd95394e5-44d1-45df-8151-1cc1ee66f100',
fullName: 'Prepaid Medical Assistance Program',
name: 'PMAP',
isRateProgram: false,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ describe('Page Heading Row', () => {
id: 'abbdf9b0-c49e-4c4c-bb6f-040cb7b51cce',
fullName: 'Special Needs Basic Care',
name: 'SNBC',
isRateProgram: false,
},
{
id: 'd95394e5-44d1-45df-8151-1cc1ee66f100',
fullName: 'Prepaid Medical Assistance Program',
name: 'PMAP',
isRateProgram: false,
},
{
id: 'ea16a6c0-5fc6-4df8-adac-c627e76660ab',
fullName: 'Minnesota Senior Care Plus ',
name: 'MSC+',
isRateProgram: false,
},
{
id: '3fd36500-bf2c-47bc-80e8-e7aa417184c5',
fullName: 'Minnesota Senior Health Options',
name: 'MSHO',
isRateProgram: false,
},
],
},
Expand Down

0 comments on commit e6a3a4e

Please sign in to comment.