Files
doczyai-pipelines/fieldExtraction/src/valid.py
T
Chris Bull 54a62944aa Merged in QCQA_Integration (pull request #311)
QCQA Integration

* Merged in bugfix/npi_hotfix (pull request #305)

double filter for duplicates

* double filter for duplicates


Approved-by: Katon Minhas

* Merged in chore/npi (pull request #309)

npi hotfix into main

* npi hotfix into main

* npi hotfix into main


Approved-by: Alex Galarce

* Merged in chore/irs (pull request #310)

irs hotfix into main

* irs hotfix into main

* pass top sheet to irs hotfix func

* docstring updates


Approved-by: Alex Galarce

* slight fix to methodology short fix

* Merged in bugfix/all_cnc_hotfixes (pull request #302)

DRAFT: Bugfix/all cnc hotfixes

* Pipeline fix - health plan state

* Update for prompt vs non-prompt fixes

* Revert utils.find_regex_matches()

* Remove prints

* Non-prompt run

* Health Plan State, IRS, NPI, LOB, Lesser, Prov 2, Default, Rate Standard, Contract Effective Date, Term Group

* Merged in bugfix/agreement_name (pull request #294)

contract title fixed

* contract title fixed

* Merged bugfix/all_cnc_hotfixes into bugfix/agreement_name

Approved-by: Katon Minhas

* All hotfixes added

* Fixed utils

* fix for clean_contract_effective_date
* Merged in default-fix (pull request #296)

moved default funcs to the top, dropped intermediate columns

* moved default funcs to the top, dropped intermediate columns

Approved-by: Katon Minhas

* quick fix to dropping extra columns

* Merged in bugfix/effective_date_meridian (pull request #297)

fixed effective date for meridian contracts

* fixed effective date for meridian contracts

Approved-by: Kat…
* Merged in hotfix/irs_tweak (pull request #303)

returning None instead on str(N/A)

* returning None instead on str(N/A)


Approved-by: Katon Minhas

* Merged in bugfix/npi_hotfix (pull request #305)

double filter for duplicates

* double filter for duplicates


Approved-by: Katon Minhas

* Merged in bugfix/all_cnc_hotfixes (pull request #302)

DRAFT: Bugfix/all cnc hotfixes

* Pipeline fix - health plan state

* Update for prompt vs non-prompt fixes

* Revert utils.find_regex_matches()

* Remove prints

* Non-prompt run

* Health Plan State, IRS, NPI, LOB, Lesser, Prov 2, Default, Rate Standard, Contract Effective Date, Term Group

* Merged in bugfix/agreement_name (pull request #294)

contract title fixed

* contract title fixed

* Merged bugfix/all_cnc_hotfixes into bugfix/agreement_name

Approved-by: Katon Minhas

* All hotfixes added

* Fixed utils

* fix for clean_contract_effective_date
* Merged in default-fix (pull request #296)

moved default funcs to the top, dropped intermediate columns

* moved default funcs to the top, dropped intermediate columns

Approved-by: Katon Minhas

* quick fix to dropping extra columns

* Merged in bugfix/effective_date_meridian (pull request #297)

fixed effective date for meridian contracts

* fixed effective date for meridian contracts

Approved-by: Kat…
* Merged in hotfix/irs_tweak (pull request #303)

returning None instead on str(N/A)

* returning None instead on str(N/A)


Approved-by: Katon Minhas

* Merged in bugfix/npi_hotfix (pull request #305)

double filter for duplicates

* double filter for duplicates


Approved-by: Katon Minhas

* Merged in chore/npi (pull request #309)

npi hotfix into main

* npi hotfix into main

* npi hotfix into main

Approved-by: Alex Galarce

* Merged in chore/irs (pull request #310)

irs hotfix into main

* irs hotfix into main

* pass top sheet to irs hotfix func

* docstring updates


Approved-by: Alex Galarce

* Merged in bugfix/clean_short_methodology (pull request #312)

changed regex pattern in get_short_methodology

* changed regex pattern in


Approved-by: Katon Minhas

* Merged in hotfix/filename_fix (pull request #314)

filename corrected

* filename corrected

* Merged main into hotfix/filename_fix


Approved-by: Katon Minhas

* Merge remote-tracking branch 'remotes/origin/main' into HEAD

* rearranged qcqa scripts/funcs and prep for merge w main, moved lots of stuff to postprocess

* slight change to icm_number_fix

* transitioned some qcqa funcs to postprocessing, added fields to qcqa report

* Merged main into QCQA_Integration

* reorganization of qa qc helpers, consolidate_output, qa_qc from Katon's feedback

* adhoc and at scale qcqa ran successfully

* fix to consolidate_output

* Merge remote-tracking branch 'remotes/origin/main' into QCQA_Integration

* Merged main into QCQA_Integration

* small changes to npi_check, changed name of config.CONTRACT_FILE_NAME to config.FILE_NAME_COLUMN


Approved-by: Katon Minhas
2024-12-06 17:27:42 +00:00

822 lines
30 KiB
Python

import config
import pandas as pd
VALID_LOBS = [
"MEDICARE",
"MEDICARE ADVANTAGE",
"MEDICAID",
"NON-MEDICAID",
"MARKETPLACE",
"COMMERCIAL",
"COMMERCIAL-EXCHANGE",
"MEDICAID-MEDICARE",
]
## PROGRAMS ##
state_list = config.STATE.split("-")
VALID_PROGRAMS = []
for state in state_list:
if state == "TX":
VALID_PROGRAMS += [
"CHIP",
"CHIP-P",
"CHIP-PERINATE",
"STAR",
"STAR+PLUS",
"DUAL SPECIAL NEEDS PLAN",
"DSNP",
"D-SNP",
"FOSTER CARE",
"MA Plan",
"MA-PD",
"MMP",
"HMO",
"PPO",
"EPO",
]
elif state == "IL":
VALID_PROGRAMS += [
"Meridian Medicaid Plan",
"YouthCare HealthChoice Illinois",
"Wellcare",
"Ambetter",
"Meridican Medicare-Medicaid Plan",
"Meridian Managed Long Term Services and Support Plan",
]
elif state == "FL":
VALID_PROGRAMS += [
"Sunshine Health",
"Wellcare",
"Ambetter by Sunshine Health",
"Childrens Medical Services Health Plan",
]
elif state == "KY":
VALID_PROGRAMS += [
"Wellcare",
"Wellcare of Kentucky",
"Ambetter for Wellcare of Kentucky",
]
elif state == "OH":
VALID_PROGRAMS += [
"Buckeye Health Plan",
"MyCare Ohio",
"Wellcare",
"Ambetter from Buckeye Health Plan",
]
elif state == "MI":
VALID_PROGRAMS += [
"Meridian",
"Meridian Complete",
"Wellcare",
"Ambetter from Meridian",
]
elif state == "LA":
VALID_PROGRAMS += [
"Louisiana Healthcare Connections",
"Wellcare",
"Ambetter from Louisiana Healthcare Connections",
]
elif state == "OK":
VALID_PROGRAMS += [
"Oklahoma Complete Health",
"Wellcare",
"Ambetter of Oklahoma",
]
elif state == "NY":
VALID_PROGRAMS += ["Fidelis Care", "Wellcare", "Ambetter from Fidelis Care"]
VALID_PROGRAMS = list(set(VALID_PROGRAMS))
if VALID_PROGRAMS:
VALID_PROGRAMS = f"One or more programs may be valid. ONLY from the following values: {VALID_PROGRAMS}. If there language such as 'MA PLAN/MA-PD PLAN/DSNP PLAN' and also 'Medicare -HMO' present, then ensure you extract HMO as well with the other plans"
else:
VALID_PROGRAMS = f"A program is defined as a plan or product offering from an insurance company. Look for the brand name of a health plan."
VALID_PROV_TYPES = ["Facility", "Professional", "Ancillary"]
# VALID_NETWORKS = ['HMO', 'PPO', 'EPO']
VALID_MSR = [
"Multiple Procedures",
"Multiple Outpatient",
"Multiple Surgical",
"Multiple Surgeries",
]
VALID_DEFAULT = [
"codes not found in",
"all other services",
"services not listed",
"except for those listed below",
"codes not covered",
"services not defined",
"no established payment",
"no established fee amount",
"procedures not listed",
"default",
]
INVALID_DEFAULT = ["Except as otherwise provided"]
NULL_ANSWER_TERMS = [
"do not have",
"do not see",
"does not specify",
"does not explicitly",
"don't know",
"Not specified",
"don't see",
"don't have",
"Nothing found",
"does not contain",
"unable to find",
]
EXCLUSION_TERMS = [
"Exclusions",
"Excluded",
"Exclude",
"Not including",
"Not to include",
]
VALID_MEDICALLY_NECESSARY = ["Medically Necessary", "Medical Necessity"]
INVALID_MEDICALLY_NECESSARY = [
"nan",
"N/A",
"Defined",
"Records",
"Payments",
"Definition",
"mean",
"Those medical services which:",
"twenty-four",
"seven",
"24",
"7",
]
INVALID_HCBS = [
"nan",
"N/A",
"Defined",
"Definition",
"mean",
] # TODO add postprocessing for HCBS
# Provider Type Level 2
VALID_PROF = [
"Physician",
"Primary Care Provider",
"Dual Capacity Physician",
"Mid-Level Practicioner",
"Specialist",
"OB/GYN",
"Behavioral Health",
"Therapist",
"Surgery",
"Independent RHC",
"Ambulance Services",
"Home Health",
]
VALID_ANC = [
"DME",
"Durable Medical Equipment",
"Radiology",
"Lab",
"Home Health",
"Hospice",
"Dialysis",
"PT/OT/ST",
"Urgent Care",
"Home Infusion",
"Ambulatory Surgery Center",
"ASC",
"Ambulance Services",
"Home Health",
]
VALID_FAC = [
"Skilled Nursing Facility",
"Ambulatory Surgery Center",
"ASC",
"Hospital",
"Clinic",
"Rural Health Clinic",
"FQHC",
"Long Term Care",
"Community Mental Health Center",
]
def select_valid_prov_2(provider_type):
if isinstance(provider_type, pd.Series):
# If it's a Series, use str.contains() method
if provider_type.str.contains("PROFESSIONAL", case=False, na=False).any():
valid_list = VALID_PROF
elif provider_type.str.contains("ANCILLARY", case=False, na=False).any():
valid_list = VALID_ANC
elif provider_type.str.contains("FACILITY", case=False, na=False).any():
valid_list = VALID_FAC
else:
valid_list = VALID_PROF + VALID_ANC + VALID_FAC
else:
# If it's a single string, use the original logic
if "PROFESSIONAL" in provider_type.upper():
valid_list = VALID_PROF
elif "ANCILLARY" in provider_type.upper():
valid_list = VALID_ANC
elif "FACILITY" in provider_type.upper():
valid_list = VALID_FAC
else:
valid_list = VALID_PROF + VALID_ANC + VALID_FAC
return valid_list
RATE_REPLACEMENTS = {
"Medicare": "MCR",
"Medicaid": "MCD",
"Allowable Charges": "AC",
"Allowed Amount": "AA",
"Billed Charges": "BC",
"Average Sales Price": "ASP",
"Average Wholesale Price": "AWP",
"Amount Payable by Medicare": "MCR",
"Amount Payable by Medicaid": "MCD",
}
# List of fields that will have derived indicators
DERIVED_INDICATOR_FIELDS = [
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE",
"INVOICE_PRICING_LANGUAGE",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE",
"CLAIMS_EDITING_LANGUAGE",
"DISPARAGEMENT_PROHIBITION_LANGUAGE",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE",
"RELATIONSHIP_OF_PARTIES_LANGUAGE",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE",
"NETWORK_ACCESS_FEES_LANGUAGE",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE",
"INDEPENDENT_REVIEW_LANGUAGE",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE",
"LATE_PAID_CLAIMS_LANGUAGE",
"COST_SETTLEMENT_LANGUAGE",
"DELEGATED_TERMS",
"SEQUESTRATION_LANGUAGE",
]
B_MAPPING = {
"Filename": "Contract Name",
"Parent Agreement Code": "Parent Agreement Code",
"Pages": "Pages",
"page_num": "Page_Num",
"EXHIBIT": "Attachment/Exhibit",
"CONTRACT_LOB": "Line of Business",
"PROV_TYPE": "Provider Type",
"PROV_TYPE_LEVEL_2": "Provider Type - Level 2",
"IP_OP": "IP/OP",
"FULL_SERVICE": "Service Type",
"CONTRACT_PROGRAM": "Plan Type",
"LESSER": "Lesser of Logic language, included (Y/N)",
"LESSER_RATE": "Lesser of Rate",
"FULL_METHODOLOGY": "Reimb. Methodology",
"SHORT_METHODOLOGY": "Reimb. Methodology_Short",
"RATE_STANDARD": "If rate is % of Payor or MCR [STANDARD]",
"RATE_SHORT": "If rate is % of Payor or MCR [STANDARD]_Short",
"FLAT_FEE_STANDARD": "FLAT FEE",
"DEFAULT_TERM": "Default Term",
"DEFAULT_RATE": "Default Rate",
"MEDICAL_NECESSITY_LANGUAGE": "Medical Necessity Language (Language)",
"MEDICAL_NECESSITY_LANGUAGE_IND": "Medical Necessity Language (Y/N)",
'Inclusion of essential RBRVS "Fee Source" Language (Y/N)': 'Inclusion of essential RBRVS "Fee Source" Language (Y/N)',
"CDM_IND": "CDM Neutralization Language, included (Y/N)",
"CHARGEMASTER": "CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE",
"ADD_ON_REIMBURSEMENT_LANGUAGE": "Add On Reimbursement (Language)",
"ADD_ON_REIMBURSEMENT_IND": "Add On Reimbursement (Y/N)",
"SINGLE_CODE_MULTIPLE_RATES_LANGUAGE": "Single Code Multiple Rates (Language)",
"SINGLE_CODE_MULTIPLE_RATES_IND": "Single Code Multiple Rates (Y/N)",
"IP - DSH/IME/UC, included (Y/N)": "IP - DSH/IME/UC, included (Y/N)",
"IP - Stoploss Catastrophic Threshold": "IP - Stoploss Catastrophic Threshold",
"EXCLUSIONS": "Exclusions",
"NOT_TO_EXCEED": "Not to Exceed",
"RATE_ESCALATOR_IND": "Escalator or COLA (Y/N)",
"RATE_ESCALATOR_DT": "Escalator I, Eff. Date",
}
AC_MAPPING = {
"Filename": "Contract Name",
"Pages": "Pages",
"Parent Agreement Code": "Parent Agreement Code",
"CONTRACT_TITLE": "Agreement_Name (Contract Title)",
"PAYER_NAME": "PAYER NAME",
"AFFILIATION_CLAUSE_IND": "Affiliate (Y/N)",
"TERM_CLAUSE": "Term Clause",
"CONTRACT_AUTO_RENEWAL_IND": "Contract Auto-Renewal Indicator",
"CONTRACT_TERMINATION_DT": "Termination Date",
"TERMINATION_UPON_NOTICE": "Termination Upon Notice - Days",
"TERMINATION_UPON_CAUSE": "Termination With Cause - Days",
"AMEND_CONTRACT_NOTICE_IND": "Amend Contract Upon notice Flag (Y/N)",
"TIME_TO_OBJECT": "Timeframe to Object - Days",
"ASSIGNMENTS_CLAUSE_IND": "Assignments Clause (Y/N)",
"CONTRACT_EFFECTIVE_DT": "Contract Effective Date",
"PROV_GROUP_TIN": "IRS #",
"PROV_GROUP_NAME": "IRS_Name",
"PROV_GROUP_NPI": "NPI (10-digits)",
"PROV_GROUP_TIN_SIGNATORY": "PROV_GROUP_TIN_SIGNATORY",
"PROV_TIN_OTHER": "PROV_TIN_OTHER",
"PROV_NPI_OTHER": "PROV_NPI_OTHER",
"NOTICE_PROVIDER_NAME": "Notice to Provider Name",
"NOTICE_PROVIDER_ADDRESS": "Notice to Provider Address",
"HEALTH_PLAN_STATE": "Health Plan State",
"CREDENTIALING_APP_IND": "Credentialing Application Indicator",
"SEQUESTRATION_LANGUAGE": "Sequestration Language",
"SEQUESTRATION_LANGUAGE_IND": "Sequestration Reductions (Y/N)",
"NPI_NAME": "NPI Name",
"DELEGATED_TERMS_IND": "Delegated Function Indicator",
"DELEGATED_TERMS": "Delegated Terms",
"ECM": "ECM",
"NATIONAL_AGREEMENT_IND": "National Agreement Indicator",
"COST_SETTLEMENT_LANGUAGE_IND": "Cost Settlement (Y/N)",
"COST_SETTLEMENT_LANGUAGE": "Cost Settlement (Language)",
"LATE_PAID_CLAIMS_LANGUAGE_IND": "Late Paid Claims (Y/N)",
"LATE_PAID_CLAIMS_LANGUAGE": "Late Paid Claims (Language)",
"DEEMER_AMENDMENT": "Deemer Amendment",
"REGULATORY_REQUIREMENTS": "Regulatory Requirements",
"RECOVERY_RIGHTS": "Recovery Rights",
"ARBITRATION_AND_DISPUTES": "Arbitration and Disputes",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE_IND": "Exclusivity Requirement (Y/N)",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE": "Exclusivity Requirement (Language)",
"PAYOR": "Payor",
"PARTICIPATION_IN_PRODUCTS": "Participation in Products",
"CLEAN_CLAIM": "Clean Claim",
"INDEPENDENT_REVIEW_LANGUAGE_IND": "Independent Review (Y/N)",
"INDEPENDENT_REVIEW_LANGUAGE": "Independent Review (Language)",
"INDEMNIFICATION": "Indemnification",
"ACCESS_TO_MEDICAL_RECORDS": "Access to Medical Records",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE_IND": "Member Confinement Days Language (Y/N)",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE": "Member Confinement Days Language (Language)",
"NETWORK_ACCESS_FEES_LANGUAGE_IND": "Network Access Fees (Y/N)",
"NETWORK_ACCESS_FEES_LANGUAGE": "Network Access Fees (Language)",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE_IND": "Payment in Advance of Claims Submission Language (Y/N)",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE": "Payment in Advance of Claims Submission Language",
"ELIGIBILITY_VERIFICATION": "Eligibility Verification",
"PREAUTHORIZATION": "Preauthorization",
"POLICIES_AND_PROCEDURES": "Policies and Procedures",
"INSURANCE_REQUIREMENT": "Insurance Requirement",
"CARVEOUT_VENDORS": "Carve-Out Vendors",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE_IND": "Conflicts Between Certain Documents (Y/N)",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE": "Conflicts Between Certain Documents (Language)",
"RELATIONSHIP_OF_PARTIES_LANGUAGE_IND": "Relationship of Parties (Y/N)",
"RELATIONSHIP_OF_PARTIES_LANGUAGE": "Relationship of Parties (Language)",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE_IND": "Nonstandard Appeals Process (Y/N)",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE": "Nonstandard Appeals Process (Language)",
"PRODUCT_REMOVAL": "Product Removal",
"DISPARAGEMENT_PROHIBITION_LANGUAGE_IND": "Disparagement Prohibition (Y/N)",
"DISPARAGEMENT_PROHIBITION_LANGUAGE": "Disparagement Prohibition (Language)",
"CLAIMS_EDITING_LANGUAGE_IND": "Claims Editing Language (Y/N)",
"CLAIMS_EDITING_LANGUAGE": "Claims Editing Language (Language)",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE_IND": "Guarantee of Provider Yield (Y/N)",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE": "Guarantee of Provider Yield (Language)",
"HCBS_SERVICES": "HCBS Services",
"ADD_ON_REIMBURSEMENT_IND": "Add On Reimbursement (Y/N)",
"ADD_ON_REIMBURSEMENT_LANGUAGE": "Add On Reimbursement (Language)",
"PMPM": "PMPM",
"SINGLE_CODE_MULTIPLE_RATES_IND": "Single Code Multiple Rates (Y/N)",
"SINGLE_CODE_MULTIPLE_RATES_LANGUAGE": "Single Code Multiple Rates (Language)",
"INVOICE_PRICING_LANGUAGE_IND": "Invoice Pricing (Y/N)",
"INVOICE_PRICING_LANGUAGE": "Invoice Pricing (Language)",
"TEMPLATE": "Template",
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE_IND": "Provider-based Billing Exclusion (Y/N)",
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE": "Provider-based Billing Exclusion (Language)",
"NON_RENEWAL_LANGUAGE": "Non-Renewal Language",
"NON_RENEWAL_DAYS": "Non-Renewal - Days",
"TIMELY_FILING": "Timely Filing",
}
ABC_COLUMNS = [
"Contract Name",
"Agreement_Name (Contract Title)",
"PAYER NAME",
"Health Plan State",
"Affiliate (Y/N)",
"Credentialing Application Indicator",
"Term Clause",
"Contract Auto-Renewal Indicator",
"Termination Date",
"Termination Upon Notice - Days",
"Termination With Cause - Days",
"Non-Renewal Language",
"Non-Renewal - Days",
"Amend Contract Upon notice Flag (Y/N)",
"Timeframe to Object - Days",
"Assignments Clause (Y/N)",
"Contract Effective Date",
"IRS #",
"IRS_Name",
"NPI (10-digits)",
"NPI Name",
"PROV_GROUP_TIN_SIGNATORY",
"PROV_TIN_OTHER",
"PROV_NPI_OTHER",
"Notice to Provider Name",
"Notice to Provider Address",
"Sequestration Language",
"Sequestration Reductions (Y/N)",
"Parent Agreement Code",
"Pages",
"Page_Num",
"Attachment/Exhibit",
"Line of Business",
"Provider Type",
"Provider Type - Level 2",
"IP/OP",
"Service Type",
"Plan Type",
"Lesser of Logic language, included (Y/N)",
"Lesser of Rate",
"Reimb. Methodology",
"Reimb. Methodology_Short",
"If rate is % of Payor or MCR [STANDARD]",
"If rate is % of Payor or MCR [STANDARD]_Short",
"FLAT FEE",
"Default Term",
"Default Rate",
'Inclusion of essential RBRVS "Fee Source" Language (Y/N)',
"CDM Neutralization Language, included (Y/N)",
"CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE",
"IP - DSH/IME/UC, included (Y/N)",
"IP - Stoploss Catastrophic Threshold",
"Exclusions",
"Not to Exceed",
"Escalator or COLA (Y/N)",
"Escalator I, Eff. Date",
"Delegated Function Indicator",
"Delegated Terms",
"ECM",
"National Agreement Indicator",
"Cost Settlement (Y/N)",
"Cost Settlement (Language)",
"Late Paid Claims (Y/N)",
"Late Paid Claims (Language)",
"Deemer Amendment",
"Regulatory Requirements",
"Recovery Rights",
"Arbitration and Disputes",
"Exclusivity Requirement (Y/N)",
"Exclusivity Requirement (Language)",
"Payor",
"Participation in Products",
"Clean Claim",
"Independent Review (Y/N)",
"Independent Review (Language)",
"Indemnification",
"Access to Medical Records",
"Member Confinement Days Language (Y/N)",
"Member Confinement Days Language (Language)",
"Network Access Fees (Y/N)",
"Network Access Fees (Language)",
"Payment in Advance of Claims Submission Language (Y/N)",
"Payment in Advance of Claims Submission Language",
"Eligibility Verification",
"Preauthorization",
"Policies and Procedures",
"Insurance Requirement",
"Carve-Out Vendors",
"Conflicts Between Certain Documents (Y/N)",
"Conflicts Between Certain Documents (Language)",
"Relationship of Parties (Y/N)",
"Relationship of Parties (Language)",
"Nonstandard Appeals Process (Y/N)",
"Nonstandard Appeals Process (Language)",
"Product Removal",
"Disparagement Prohibition (Y/N)",
"Disparagement Prohibition (Language)",
"Claims Editing Language (Y/N)",
"Claims Editing Language (Language)",
"Guarantee of Provider Yield (Y/N)",
"Guarantee of Provider Yield (Language)",
"HCBS Services",
"Add On Reimbursement (Y/N)",
"Add On Reimbursement (Language)",
"PMPM",
"Single Code Multiple Rates (Y/N)",
"Single Code Multiple Rates (Language)",
"Invoice Pricing (Y/N)",
"Invoice Pricing (Language)",
"Medical Necessity Language (Y/N)",
"Medical Necessity Language (Language)",
"Template",
"Provider-based Billing Exclusion (Y/N)",
"Provider-based Billing Exclusion (Language)",
]
BASE_COLUMNS = [
"Lesser of Logic Language, included (Y/N)",
"Lesser of Rate",
"Reimb. methodology",
"Reimb. methodology_short",
"If rate is % of Payer or MCR [STANDARD]",
"If rate is % of Payer or MCR [STANDARD]_Short",
"If rate is Flat Fee [STANDARD]",
"Default Term",
"Default Rate",
"Exclusions",
"Not to Exceed",
"Escalator or COLA (Y/N)",
"Escalator I, Eff. Date",
]
SERVICE_FILTER = [
"LIABILITY",
"RISK",
"LOBBYING",
"DAMAGES",
"CONFIDENTIALITY",
"ARBITRATION",
"FALSE CLAIMS ACT",
"UNSPECIFIED",
"AUDIT",
"INTEREST",
"N/A",
"BUSINESS",
"COMPLIANCE",
"Medical Assistance Program",
"MATERIAL SUBCONTRACT",
"GIFTS",
"GRATUITIES",
"Insurance",
"Clean Claim",
"Employment verification",
"Suspension",
"thing of value",
"laws",
"safe drinking water act",
"immigration reform",
"social security",
"Lease",
"related entity",
"Negative balance",
"medicaid payments",
"federal water pollution control act",
"microbacteriology",
"epsdt",
"appeal",
"prompt pay",
"capitation",
"harmless",
"30 days",
"fee source",
"Rent-to-Purchase",
"chargemaster",
"stop-loss",
"mobile crisis",
"quality incentive program",
]
METHODOLOGY_FILTER = [
"interest",
"clean claim",
"timely",
"adjudicate",
"appeal",
"30 days",
"https",
"prior authorization",
"compliance",
"provider-based billing",
"not less than the level and amount of payment",
"Fee Change Effective Date",
"management fees",
"PMPM",
"quality incentive program",
"if there is no established payment",
]
STATE_MAP = {
"AL": "Alabama",
"AK": "Alaska",
"AZ": "Arizona",
"AR": "Arkansas",
"AS": "American Samoa",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"DC": "District of Columbia",
"FL": "Florida",
"GA": "Georgia",
"GU": "Guam",
"HI": "Hawaii",
"ID": "Idaho",
"IL": "Illinois",
"IN": "Indiana",
"IA": "Iowa",
"KS": "Kansas",
"KY": "Kentucky",
"LA": "Louisiana",
"ME": "Maine",
"MD": "Maryland",
"MA": "Massachusetts",
"MI": "Michigan",
"MN": "Minnesota",
"MS": "Mississippi",
"MO": "Missouri",
"MT": "Montana",
"NE": "Nebraska",
"NV": "Nevada",
"NH": "New Hampshire",
"NJ": "New Jersey",
"NM": "New Mexico",
"NY": "New York",
"NC": "North Carolina",
"ND": "North Dakota",
"MP": "Northern Mariana Islands",
"OH": "Ohio",
"OK": "Oklahoma",
"OR": "Oregon",
"PA": "Pennsylvania",
"PR": "Puerto Rico",
"RI": "Rhode Island",
"SC": "South Carolina",
"SD": "South Dakota",
"TN": "Tennessee",
"TX": "Texas",
"TT": "Trust Territories",
"UT": "Utah",
"VT": "Vermont",
"VA": "Virginia",
"VI": "Virgin Islands",
"WA": "Washington",
"WV": "West Virginia",
"WI": "Wisconsin",
"WY": "Wyoming",
}
HOTFIX_MAPPING = {
"Filename": "Contract Name",
"Parent Agreement Code": "Parent Agreement Code",
"Pages": "Pages",
"page_num": "Page_Num",
"Page Num" : "Page_Num",
"EXHIBIT": "Attachment/Exhibit",
"CONTRACT_LOB": "Line of Business",
"PROV_TYPE": "Provider Type",
"PROV_TYPE_LEVEL_2": "Provider Type - Level 2",
"IP_OP": "IP/OP",
"FULL_SERVICE": "Service Type",
"CONTRACT_PROGRAM": "Plan Type",
'Lesser of Logic Language, Included (Y/N)' : "Lesser of Logic language, included (Y/N)",
"LESSER": "Lesser of Logic language, included (Y/N)",
"LESSER_RATE": "Lesser of Rate",
"FULL_METHODOLOGY": "Reimb. Methodology",
"SHORT_METHODOLOGY": "Reimb. Methodology_Short",
'Reimb. Methodology Short' : 'Reimb. Methodology_Short',
'If rate is % of Payor or MCR [Standard]' : 'If rate is % of Payor or MCR [STANDARD]',
'If Rate is % of Payor or MCR [Standard]' : "If rate is % of Payor or MCR [STANDARD]",
'If rate is % of Payor or MCR [STANDARD]' : "If rate is % of Payor or MCR [STANDARD]",
"RATE_STANDARD": "If rate is % of Payor or MCR [STANDARD]",
'If rate is % of Payor or MCR [Standard] Short' : 'If rate is % of Payor or MCR [STANDARD]_Short',
"RATE_SHORT": "If rate is % of Payor or MCR [STANDARD]_Short",
"FLAT_FEE_STANDARD": "FLAT FEE",
'Flat Fee' : 'FLAT FEE',
"DEFAULT_TERM": "Default Term",
"DEFAULT_RATE": "Default Rate",
"MEDICAL_NECESSITY_LANGUAGE": "Medical Necessity Language (Language)",
"MEDICAL_NECESSITY_LANGUAGE_IND": "Medical Necessity Language (Y/N)",
'Inclusion of essential RBRVS "Fee Source" Language (Y/N)': 'Inclusion of essential RBRVS "Fee Source" Language (Y/N)',
"CDM_IND": "CDM Neutralization Language, included (Y/N)",
"CHARGEMASTER": "CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE",
'Contract Chargemaster Protection Language' : "CONTRACT_CHARGEMASTER_PROTECTION_LANGUAGE",
"ADD_ON_REIMBURSEMENT_LANGUAGE": "Add On Reimbursement (Language)",
"ADD_ON_REIMBURSEMENT_IND": "Add On Reimbursement (Y/N)",
"SINGLE_CODE_MULTIPLE_RATES_LANGUAGE": "Single Code Multiple Rates (Language)",
"SINGLE_CODE_MULTIPLE_RATES_IND": "Single Code Multiple Rates (Y/N)",
"IP - DSH/IME/UC, included (Y/N)": "IP - DSH/IME/UC, included (Y/N)",
"IP - Stoploss Catastrophic Threshold": "IP - Stoploss Catastrophic Threshold",
"EXCLUSIONS": "Exclusions",
"NOT_TO_EXCEED": "Not to Exceed",
"RATE_ESCALATOR_IND": "Escalator or COLA (Y/N)",
"RATE_ESCALATOR_DT": "Escalator I, Eff. Date",
"CONTRACT_TITLE": "Agreement_Name (Contract Title)",
'Agreement Name (Contract Title)': "Agreement_Name (Contract Title)",
"PAYER_NAME": "PAYER NAME",
"Payer Name" : "PAYER NAME",
"AFFILIATION_CLAUSE_IND": "Affiliate (Y/N)",
"TERM_CLAUSE": "Term Clause",
"CONTRACT_AUTO_RENEWAL_IND": "Contract Auto-Renewal Indicator",
"CONTRACT_TERMINATION_DT": "Termination Date",
"TERMINATION_UPON_NOTICE": "Termination Upon Notice - Days",
"TERMINATION_UPON_CAUSE": "Termination With Cause - Days",
"AMEND_CONTRACT_NOTICE_IND": "Amend Contract Upon notice Flag (Y/N)",
"TIME_TO_OBJECT": "Timeframe to Object - Days",
"ASSIGNMENTS_CLAUSE_IND": "Assignments Clause (Y/N)",
"CONTRACT_EFFECTIVE_DT": "Contract Effective Date",
"PROV_GROUP_TIN": "IRS #",
"PROV_GROUP_NAME": "IRS_Name",
"PROV_GROUP_NPI": "NPI (10-digits)",
"PROV_GROUP_TIN_SIGNATORY": "PROV_GROUP_TIN_SIGNATORY",
'Prov Group TIN Signatory' : "PROV_GROUP_TIN_SIGNATORY",
"PROV_TIN_OTHER": "PROV_TIN_OTHER",
"Prov TIN Other" : "PROV_TIN_OTHER",
"PROV_NPI_OTHER": "PROV_NPI_OTHER",
'Prov NPI Other' : "PROV_NPI_OTHER",
"NOTICE_PROVIDER_NAME": "Notice to Provider Name",
"NOTICE_PROVIDER_ADDRESS": "Notice to Provider Address",
"HEALTH_PLAN_STATE": "Health Plan State",
"CREDENTIALING_APP_IND": "Credentialing Application Indicator",
"SEQUESTRATION_LANGUAGE": "Sequestration Language",
"SEQUESTRATION_LANGUAGE_IND": "Sequestration Reductions (Y/N)",
"NPI_NAME": "NPI Name",
"DELEGATED_TERMS_IND": "Delegated Function Indicator",
"DELEGATED_TERMS": "Delegated Terms",
"ECM": "ECM",
"NATIONAL_AGREEMENT_IND": "National Agreement Indicator",
"COST_SETTLEMENT_LANGUAGE_IND": "Cost Settlement (Y/N)",
"COST_SETTLEMENT_LANGUAGE": "Cost Settlement (Language)",
"LATE_PAID_CLAIMS_LANGUAGE_IND": "Late Paid Claims (Y/N)",
"LATE_PAID_CLAIMS_LANGUAGE": "Late Paid Claims (Language)",
"DEEMER_AMENDMENT": "Deemer Amendment",
"REGULATORY_REQUIREMENTS": "Regulatory Requirements",
"RECOVERY_RIGHTS": "Recovery Rights",
"ARBITRATION_AND_DISPUTES": "Arbitration and Disputes",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE_IND": "Exclusivity Requirement (Y/N)",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE": "Exclusivity Requirement (Language)",
"PAYOR": "Payor",
"PARTICIPATION_IN_PRODUCTS": "Participation in Products",
"CLEAN_CLAIM": "Clean Claim",
"INDEPENDENT_REVIEW_LANGUAGE_IND": "Independent Review (Y/N)",
"INDEPENDENT_REVIEW_LANGUAGE": "Independent Review (Language)",
"INDEMNIFICATION": "Indemnification",
"ACCESS_TO_MEDICAL_RECORDS": "Access to Medical Records",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE_IND": "Member Confinement Days Language (Y/N)",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE": "Member Confinement Days Language (Language)",
"NETWORK_ACCESS_FEES_LANGUAGE_IND": "Network Access Fees (Y/N)",
"NETWORK_ACCESS_FEES_LANGUAGE": "Network Access Fees (Language)",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE_IND": "Payment in Advance of Claims Submission Language (Y/N)",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE": "Payment in Advance of Claims Submission Language",
"ELIGIBILITY_VERIFICATION": "Eligibility Verification",
"PREAUTHORIZATION": "Preauthorization",
"POLICIES_AND_PROCEDURES": "Policies and Procedures",
"INSURANCE_REQUIREMENT": "Insurance Requirement",
"CARVEOUT_VENDORS": "Carve-Out Vendors",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE_IND": "Conflicts Between Certain Documents (Y/N)",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE": "Conflicts Between Certain Documents (Language)",
"RELATIONSHIP_OF_PARTIES_LANGUAGE_IND": "Relationship of Parties (Y/N)",
"RELATIONSHIP_OF_PARTIES_LANGUAGE": "Relationship of Parties (Language)",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE_IND": "Nonstandard Appeals Process (Y/N)",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE": "Nonstandard Appeals Process (Language)",
"PRODUCT_REMOVAL": "Product Removal",
"DISPARAGEMENT_PROHIBITION_LANGUAGE_IND": "Disparagement Prohibition (Y/N)",
"DISPARAGEMENT_PROHIBITION_LANGUAGE": "Disparagement Prohibition (Language)",
"CLAIMS_EDITING_LANGUAGE_IND": "Claims Editing Language (Y/N)",
"CLAIMS_EDITING_LANGUAGE": "Claims Editing Language (Language)",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE_IND": "Guarantee of Provider Yield (Y/N)",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE": "Guarantee of Provider Yield (Language)",
"HCBS_SERVICES": "HCBS Services",
"ADD_ON_REIMBURSEMENT_IND": "Add On Reimbursement (Y/N)",
"ADD_ON_REIMBURSEMENT_LANGUAGE": "Add On Reimbursement (Language)",
"PMPM": "PMPM",
"SINGLE_CODE_MULTIPLE_RATES_IND": "Single Code Multiple Rates (Y/N)",
"SINGLE_CODE_MULTIPLE_RATES_LANGUAGE": "Single Code Multiple Rates (Language)",
"INVOICE_PRICING_LANGUAGE_IND": "Invoice Pricing (Y/N)",
"INVOICE_PRICING_LANGUAGE": "Invoice Pricing (Language)",
"TEMPLATE": "Template",
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE_IND": "Provider-based Billing Exclusion (Y/N)",
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE": "Provider-based Billing Exclusion (Language)",
"NON_RENEWAL_LANGUAGE": "Non-Renewal Language",
"NON_RENEWAL_DAYS": "Non-Renewal - Days",
"TIMELY_FILING": "Timely Filing",
}
B_IND_LANG_COLS = {
"LESSER" : "LESSER_RATE",
"MEDICAL_NECESSITY_LANGUAGE" : "MEDICAL_NECESSITY_LANGUAGE_IND",
"ADD_ON_REIMBURSEMENT_LANGUAGE" : "ADD_ON_REIMBURSEMENT_IND",
"SINGLE_CODE_MULTIPLE_RATES_IND" : "SINGLE_CODE_MULTIPLE_RATES_LANGUAGE",
"RATE_ESCALATOR_IND" : "RATE_ESCALATOR_DT"
}
AC_IND_LANG_COLS = {
"SEQUESTRATION_LANGUAGE_IND" : "SEQUESTRATION_LANGUAGE",
"COST_SETTLEMENT_LANGUAGE_IND" : "COST_SETTLEMENT_LANGUAGE",
"LATE_PAID_CLAIMS_LANGUAGE_IND" : "LATE_PAID_CLAIMS_LANGUAGE",
"EXCLUSIVITY_REQUIREMENT_LANGUAGE_IND": "EXCLUSIVITY_REQUIREMENT_LANGUAGE",
"INDEPENDENT_REVIEW_LANGUAGE_IND" : "INDEPENDENT_REVIEW_LANGUAGE",
"MEMBER_CONFINEMENT_DAYS_LANGUAGE_IND" : "MEMBER_CONFINEMENT_DAYS_LANGUAGE",
"NETWORK_ACCESS_FEES_LANGUAGE_IND" : "NETWORK_ACCESS_FEES_LANGUAGE",
"PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE_IND" : "PAYMENT_IN_ADVANCE_OF_CLAIMS_SUBMISSION_LANGUAGE",
"CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE_IND" : "CONFLICTS_BETWEEN_CERTAIN_DOCUMENTS_LANGUAGE",
"RELATIONSHIP_OF_PARTIES_LANGUAGE_IND" : "RELATIONSHIP_OF_PARTIES_LANGUAGE",
"NONSTANDARD_APPEALS_PROCESS_LANGUAGE_IND" : "NONSTANDARD_APPEALS_PROCESS_LANGUAGE",
"DISPARAGEMENT_PROHIBITION_LANGUAGE_IND" : "DISPARAGEMENT_PROHIBITION_LANGUAGE",
"CLAIMS_EDITING_LANGUAGE_IND" : "CLAIMS_EDITING_LANGUAGE",
"GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE_IND" : "GUARANTEE_OF_PROVIDER_YIELD_LANGUAGE",
"ADD_ON_REIMBURSEMENT_IND" : "ADD_ON_REIMBURSEMENT_LANGUAGE",
"SINGLE_CODE_MULTIPLE_RATES_IND" : "SINGLE_CODE_MULTIPLE_RATES_LANGUAGE",
"INVOICE_PRICING_LANGUAGE_IND" : "INVOICE_PRICING_LANGUAGE",
"PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE_IND" : "PROVIDER_BASED_BILLING_EXCLUSION_LANGUAGE"
}