3f3e1b1c7a
Bugfix/unit of measure * updated trigger_cap definition * updated trigger_cap definition_new * updated triggerbase threshold prompt * updated Trigger Cap Def * Merge branch 'main' into bugfix/special_case_fixes * Merge branch 'main' into bugfix/special_case_fixes * prompt changes * Merge branch 'main' into bugfix/unit_of_measure * post processing and prompts updated * print statements removed * print statements removed * prompt updated Approved-by: Katon Minhas
189 lines
11 KiB
Python
189 lines
11 KiB
Python
|
|
from crosswalk.crosswalk_utils import CrosswalkBuilder
|
|
|
|
EXHIBIT_HEADER_MARKERS = [
|
|
"EXHIBIT",
|
|
"ATTACHMENT",
|
|
"ARTICLE",
|
|
"AMENDMENT",
|
|
"SCHEDULE",
|
|
"ADDENDUM",
|
|
"APPENDIX",
|
|
]
|
|
|
|
# Dynamic Primary
|
|
VALID_LOBS = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_lob.json").mapping.keys())
|
|
VALID_PROGRAMS = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_program.json").mapping.keys())
|
|
VALID_NETWORKS = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_network.json").mapping.keys())
|
|
VALID_PRODUCTS = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_product_lob.json").mapping.keys())
|
|
|
|
# Dynamic Codes
|
|
VALID_PROV_SPECIALTY = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_provider_specialty.json").mapping.keys())
|
|
VALID_BILL_TYPE = list(set(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_bill_type.json").mapping.values()))
|
|
VALID_PLACE_OF_SERVICE = list(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_place_of_service.json").mapping.keys())
|
|
VALID_CLAIM_TYPE = list(set(CrosswalkBuilder().from_json(path="crosswalk/mappings/crosswalk_claim_type.json").mapping.keys()))
|
|
|
|
# Provider Type
|
|
VALID_PROV_TYPE = [
|
|
# Professional
|
|
"Physician",
|
|
"Primary Care Provider (PCP)",
|
|
"Dual Capacity Physician",
|
|
"Mid-Level Practicioner",
|
|
"Primary Care Mid-Level Practicioner",
|
|
"Pediatrician",
|
|
"Specialist",
|
|
"OB/GYN",
|
|
"Behavioral Health",
|
|
"Therapist",
|
|
"Surgery",
|
|
"Ambulance Services",
|
|
"Home Health",
|
|
"Durable Medical Equipment (DME)",
|
|
"Radiology",
|
|
"Lab",
|
|
"Hospice",
|
|
"Dialysis",
|
|
"Physical Therapy, Occupational Therapy, Speech Therapy (PT/OT/ST)",
|
|
"Urgent Care",
|
|
"Home Infusion",
|
|
# Facility
|
|
"Ambulatory Surgery Center (ASC)",
|
|
"Skilled Nursing Facility (SNF)",
|
|
"Hospital",
|
|
"Clinic",
|
|
"Rural Health Clinic (RHC)",
|
|
"Federally Qualified Health Center (FQHC)",
|
|
"Long Term Care",
|
|
"Community Mental Health Center",
|
|
]
|
|
|
|
|
|
VALID_AARETE_DERIVED_FEE_SCHEDULE = [
|
|
"CMS",
|
|
"State",
|
|
"Proprietary",
|
|
"AWP",
|
|
"WAC",
|
|
"ASP"
|
|
]
|
|
|
|
VALID_AARETE_DERIVED_FEE_SCHEDULE_VERSION = [
|
|
"current",
|
|
"year prior"
|
|
]
|
|
|
|
# AARETE_DERIVED_REIMB_METHOD
|
|
VALID_REIMB_TERM = [
|
|
"Billed Charges",
|
|
"Fee Schedule",
|
|
"Flat Rate", # Per line
|
|
"Per Visit", # multiple lines
|
|
"Per Diem", # claim level
|
|
"Case Rate", # multiple claim level
|
|
# "MedRx",
|
|
"Cost",
|
|
# "Pass Through",
|
|
"Grouper",
|
|
# "Outlier",
|
|
# "Stop-Loss",
|
|
# "Reductions"
|
|
# "DOFR", # moved to prompt as this value is rare
|
|
]
|
|
|
|
# these reimbursement methods will be removed in postprocessing.
|
|
INVALID_REIMB_TERM = [
|
|
"Incentive Payment",
|
|
"Funding",
|
|
"incremental/ additional reimbursement"
|
|
# "Medicare Member Cost Share" # This is a special case where the member is responsible for the cost share and these records will be removed in postprocessing. moved to prompt as this value is rare.
|
|
]
|
|
|
|
VALID_REIMB_TERM_FULL = VALID_REIMB_TERM + INVALID_REIMB_TERM
|
|
|
|
VALID_UNIT_OF_MEASURE = [
|
|
"Per Unit",
|
|
"Per ASA Unit",
|
|
"Per Day",
|
|
"Per 15 Minutes",
|
|
"Per 30 Minutes",
|
|
"Per Hour",
|
|
"Per Month",
|
|
"Per Member Per Month (PMPM)", # this is invalid and will be removed in postprocessing
|
|
"Per Year",
|
|
"Per Session",
|
|
"Per Training Session",
|
|
"Per Visit",
|
|
"Per Case",
|
|
"Per Procedure",
|
|
]
|
|
|
|
VALID_CARVEOUTS = {
|
|
"BASE_COVERED_SERVICES" : "Describes generic payments for standard covered services. This refers to the payment made for a service that is not subject to any adjustments. Example of base methodology:\n- 'covered services'\n- 'Covered Services not included in the Service Categories in Table 1 shall be reimbursed at 100% of the Medicare fee schedule.'",
|
|
"PAYMENT_CARVEOUT" : "Describes payments for services or codes that are separately mentioned or carved out from the standard payment for all covered services. Examples include 'Radiology covered services', 'Anesthesia covered services', 'Pharmaceuticals' and 'HEMATOCRIT (CPT CODE: 85014)'. Any service or code that is specifically or separately mentioned falls under the 'payment_carveout' category.",
|
|
"UNLISTED_CODE" : "Describes payments for codes that are not listed on a fee schedule. This is similar to DEFAULT_TERM. Only populate with Y if the Service or Methodology specifically mentions Codes.",
|
|
"NEVER_EVENT" : "Indicates that Never Events (e.g. sepsis acquired while inpatient) will not be covered. This may be phrased as 'no liability' or 'no payment'.",
|
|
"EXPERIMENTAL_INVESTIGATIONAL" : "Describes payments for experimental and investigational procedures.",
|
|
"NOT_MEDICALLY_NECESSARY" : "Describes payments for procedures deemed not medically necessary (or medically unnecessary)",
|
|
"GLOBAL_SERVICES" : None,
|
|
"BUNDLED_CODES" : "Indicates that payment for bundles of codes shall be at a reduced rate.",
|
|
"MULTIPLE_PROCEDURE_REDUCTIONS" : "Describe cases where payment terms apply to multiple or subsequent procedures or surgeries. It contains language indicating reduced payment for second and subsequent procedures, such as: 'multiple procedure reductions', 'second and subsequent deliveries' or similar terms that imply payment adjustments for multiple procedures performed during the same encounter.",
|
|
#"BILATERAL" : "",
|
|
"MIDLEVELS" : None,
|
|
"TECHNICAL_COMPONENT" : "If Modifier TC (technical component) is present.",
|
|
"PROFESSIONAL_COMPONENT" : "If Modifier 26 (professional component) is present.",
|
|
"DIAGNOSTIC_PROCEDURES" : "Describes payments for diagnostic procedures.",
|
|
"PREADMISSION" : None,
|
|
"POST_DISCHARGE" : None,
|
|
"READMISSIONS" : "Describes payment for subsequent admission with the same diagnostic category of codes as the initial admission.",
|
|
"DEFAULT_TERM" : "Indicates whether this service/methodology serves as a default/fallback payment rate when no other payment methods apply. The default/fallback payment rate is typically a low rate and based on billed charges. This is an 'end-of-the-line' reimbursement when no other methodologies apply.\n\nThe service/methodology should meet BOTH these criteria:\n1. Contains language indicating it applies to services not covered elsewhere, such as:\n - 'services not listed in the fee schedule'\n - 'services for which no other payment method is specified'\n - 'all other services'\n - 'services not otherwise specified'\n2. Is clearly a secondary/fallback option, NOT the primary/base reimbursement method, as indicated by:\n - Position in the contract (appears after primary methodology is defined)\n - Lower reimbursement rate than the base methodology (typically 50-60% of charges)\n - Explicit 'default' or 'fallback' terminology\n - Applies to a minor subset of services (not the majority of contract services)\n\nIt should not indicate ANY of these:\n- The methodology is the primary/base reimbursement approach, even if defined by exclusion\n- The methodology applies to specific listed services/procedures\n- The methodology offers standard rates comparable to other contract methodologies\n- No default/fallback language is present\n\nExample: 'For any services not specifically listed in Exhibits A-D, reimbursement shall be 50% of billed charges.'",
|
|
# + Any Reimbursement Carveouts (Codes, Services, etc)
|
|
}
|
|
|
|
VALID_SPECIAL = {
|
|
"OUTLIER" : "Describes additional payments built into standard reimbursement methodologies that are triggered when specific claims exceed predetermined cost thresholds. Often labeled as 'Outlier' in contracts, though the threshold may be called a 'Stop-Loss threshold'. Look for automatic payment adjustments based on claim cost.",
|
|
"STOP_LOSS" : "Describes financial safety net provisions primarily designed to protect providers against extreme losses. May apply at individual claim or aggregate levels and typically has higher thresholds than standard outlier provisions. Look for provisions specifically labeled as 'Stop Loss' that function separately from the standard payment methodology.",
|
|
"SEQUESTRATION" : "Describes a government-mandated reduction in federal spending for a period of time. Look for the term 'Sequestration'.",
|
|
"DISCOUNT" : "Describes a discount to the payment. Look for the term 'Discount'.", # placeholder prompt
|
|
"PREMIUM" : "Describes a premium to the payment. Look for the term 'Premium'.", # placeholder prompt
|
|
"ADDITION" : "Describes a payment where a additional amount added to or above the base reimbursement rate. This can be a fixed dollar amount, percentage, or variable amount that may change over time based on specified conditions, schedules or specific services or procedures. Exclude cases where a specific amount or percentage is not stated, or where it is unclear whether the payment applies to individual claims.",
|
|
"TRIGGER_CAP": "Describes the payments that trigger a complete shift to a new payment methodology after a threshold is reached. Unlike supplemental payments, this fundamentally changes how reimbursement is calculated after a threshold is reached. Thresholds can be based on dollar amounts, number of days, visits, units, or similar measurable metrics, but not based on calendar dates (e.g., before or after a specific day of the month), not based on the number of births, and not related to administrative pricing mechanisms such as Charge Description Master (CDM) increases or decreases. Look for language indicating payment methodology changes when thresholds are exceeded, such as 'when charges exceed X, pay Y', 'above X, reimburse at Y%', or 'over X threshold, payment becomes Y'.",
|
|
"RATE_ESCALATOR" : "Describes a payment arrangement where the reimbursement rate automatically increases by a specified percentage annually after an payment rate defined for the initial term"
|
|
#"CHARGEMASTER_INCREASE" : ""
|
|
}
|
|
|
|
proc_levels = ["cpt", "hcpcs", "cpt_level3", "cpt_level2", "hcpcs_level2", "cpt_level1", "hcpcs_level1"]
|
|
diag_levels = ["diag"]
|
|
|
|
### Reimbursement splitting keywords
|
|
# Patterns that indicate compound reimbursements
|
|
compound_indicators = [
|
|
# Exception/fallback patterns
|
|
"for services where there is no",
|
|
"where no rate exists",
|
|
"if no rate is available",
|
|
"for which there is no",
|
|
"when no payment rate",
|
|
"where there is no payment rate",
|
|
|
|
# Alternative methodology patterns
|
|
"otherwise shall be",
|
|
"shall otherwise be",
|
|
"alternatively",
|
|
"in the alternative",
|
|
"or alternatively",
|
|
|
|
# Conditional patterns
|
|
"for certain services",
|
|
"for specific services",
|
|
"for other services",
|
|
"for all other",
|
|
"for any services",
|
|
|
|
# Exception clauses
|
|
"except for",
|
|
"with the exception of",
|
|
"excluding",
|
|
"however, for",
|
|
"notwithstanding"
|
|
] |