Skip to content

Commit

Permalink
update documentation for updating state programs
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Nov 7, 2023
1 parent 3f64524 commit 5c335fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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 @@ -11,6 +11,6 @@ The source of truth for that file comes from a CSV maintained by product and des

1. Download the latest version of csv from google docs when prompted by product/design.
2. Run the script following the command listed in the `import-programs.ts`.
3. 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 ~/Desktop/State\ programs,\ population,\ and\ nicknames.csv > ../services/app-web/src/common-code/data/statePrograms.json`
3. 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`
4. 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.
5. Make a PR to update the statePrograms file in the codebase
5 changes: 4 additions & 1 deletion scripts/import-programs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
This script is used to generate a list of MC-Review state programs. To read more about this script and why it's used see "How to update state programs" technical design docs.
To run:
yarn tsc && node ./import-programs.js path/to/data.csv
yarn tsc && node ./import-programs.js path/to/data.csv > ../services/app-web/src/common-code/data/statePrograms.json
The input file is expected to be a valid CSV with at least the following columns:
1 State (two-character state code, uppercase)
2 Program (full program name)
3 Nickname (acronym or abbreviation e.g. "CME")
Documentation for this script can be found here:
https://github.com/Enterprise-CMCS/managed-care-review/blob/main/docs/technical-design/howto-update-state-programs.md
Additional columns aren't used and should be ignored.
*/

Expand Down

0 comments on commit 5c335fe

Please sign in to comment.