Skip to content

Testing for negative values for input layer claims tables #1057

@krishyfishy

Description

@krishyfishy

Is your feature request related to a problem? Please describe.
The expectation is that ADR is handled upstream of the input layer. Ideally this means that negative financials (and other columns included in ADR like service_unit_quantity) would not contain negative values.

Describe the solution you'd like
Right now we don't have testing on columns typically included in ADR, and adding some input layer testing (sev 2 or 3) could be helpful

These columns could include (but are not limited to):

  • deductible_amount (medical_claim, pharmacy_claim`)
  • coinsurance_amount (medical_claim, pharmacy_claim`)
  • copayment_amount (medical_claim, pharmacy_claim`)
  • paid_amount (medical_claim, pharmacy_claim`)
  • allowed_amount (medical_claim, pharmacy_claim`)
  • service_unit_quantity (medical_claim)
  • quantity (pharmacy_claim)
  • days_supply (pharmacy_claim)

potential implementation for this testing could use dbt_expectations.expect_column_values_to_be_between (more here)

Describe alternatives you've considered
Could leave as-is

Additional context
Failing tests during the mapping process for these columns could highlight that ADR logic is not yet sound, or reveal claims that are not suitable to include downstream of the input layer because their financials etc. are still negative post-ADR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    🚧 Needs Scope

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions