Skip to content

Commit

Permalink
Merge pull request #48 from CMSgov/file-naming-wizard
Browse files Browse the repository at this point in the history
Remove any dashes from the EIN and ensure the hospital name is lowercase in the file naming wizard
  • Loading branch information
eoverly authored Sep 12, 2024
2 parents ac5cb26 + bbf5c75 commit 76e5fb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/wizard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const Wizard = () => {
}, [state.name, state.ein, state.fileType, state.npi])

const getFilename = () =>
`${state.ein || "<ein>"}${
`${state.ein.replace(/-/g, "") || "<ein>"}${
state.showNpi && state.npi ? `-${state.npi}` : ``
}_${state.name.replace(/\s/g, "-") || "<hospitalname>"}_standardcharges.${
state.fileType || "<format>"
}`
}_${
state.name.replace(/\s/g, "-").toLowerCase() || "<hospitalname>"
}_standardcharges.${state.fileType || "<format>"}`

const getAlertParams = () => {
if (!(state.name.trim() && state.ein.trim() && state.fileType)) {
Expand All @@ -60,7 +60,7 @@ const Wizard = () => {
if (!state.ein.match(EIN_REGEX)) {
return {
type: "error",
message: `EIN must be 9 digits in the format XX-XXXXXXX or XXXXXXXXX`,
message: `EIN must be 9 digits in the format XXXXXXXXX`,
}
} else if (state.showNpi && state.npi && !state.npi.match(NPI_REGEX)) {
return {
Expand Down

0 comments on commit 76e5fb3

Please sign in to comment.