Skip to content

Commit

Permalink
Messages about modifiers are warnings until 2025
Browse files Browse the repository at this point in the history
When validating a CSV, the error that results if a modifier is missing
necessary additional information is marked as a warning if the system
date is before 2025.
  • Loading branch information
mint-thompson committed Nov 5, 2024
1 parent 39e25a3 commit 09f2b67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/versions/2.0/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,14 +502,15 @@ function validateModifierRow(
" for wide format when a modifier is encoded without an item or service"
).length > 0
) {
errors.push(
csvErr(
errors.push({
...csvErr(
index,
columns.indexOf(modifierRequiredFields[0]),
modifierRequiredFields[0],
ERRORS.MODIFIER_EXTRA_INFO()
)
)
),
warning: !enforce2025,
})
}
} else {
const modifierRequiredFields = [
Expand All @@ -527,14 +528,15 @@ function validateModifierRow(
" for tall format when a modifier is encoded without an item or service"
).length > 0
) {
errors.push(
csvErr(
errors.push({
...csvErr(
index,
columns.indexOf(modifierRequiredFields[0]),
modifierRequiredFields[0],
ERRORS.MODIFIER_EXTRA_INFO()
)
)
),
warning: !enforce2025,
})
}
}

Expand Down
2 changes: 2 additions & 0 deletions test/2.0/csv.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ test("validateRow tall conditionals", (t) => {
invalidModifierErrors[0].message,
"If a modifier is encoded without an item or service, then a description and one of the following is the minimum information required: additional_payer_notes, standard_charge | negotiated_dollar, standard_charge | negotiated_percentage, or standard_charge | negotiated_algorithm."
)
t.is(invalidModifierErrors[0].warning, !enforceConditionals)
const modifierWithNotesRow = {
...basicRow,
"code | 1": "",
Expand Down Expand Up @@ -1642,6 +1643,7 @@ test("validateRow wide conditionals", (t) => {
invalidModifierErrors[0].message,
"If a modifier is encoded without an item or service, then a description and one of the following is the minimum information required: additional_payer_notes, standard_charge | negotiated_dollar, standard_charge | negotiated_percentage, or standard_charge | negotiated_algorithm."
)
t.is(invalidModifierErrors[0].warning, !enforceConditionals)
const modifierWithGenericNotesRow = {
...basicRow,
"code | 1": "",
Expand Down

0 comments on commit 09f2b67

Please sign in to comment.