Merged in hotfix/fix-constants (pull request #654)
Hotfix/fix constants * Update TRIGGER_CAP methodology prompt and adjust special case configuration * Refactor synonym, valid carveouts, and valid special mappings to include metadata structure * remove TRIGGER_CAP_BREAKOUT function * special_case_configs.py edited online with Bitbucket Approved-by: Katon Minhas
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
{
|
||||
"DME" : "DURABLE MEDICAL EQUIPMENT",
|
||||
"SNF" : "SKILLED NURSING FACILITY",
|
||||
"ASC" : "AMBULATORY SURGERY CENTER",
|
||||
"LABORATORY" : "LABORATORY AND PATHOLOGY",
|
||||
"LAB" : "LABORATORY AND PATHOLOGY",
|
||||
"STOP LOSS" : "STOP-LOSS",
|
||||
"OB": "OBSTETRIC"
|
||||
"metadata": {
|
||||
"description": "Mapping of common healthcare/contracting synonyms to standardized terms for field extraction."
|
||||
},
|
||||
"mapping": {
|
||||
"DME": "DURABLE MEDICAL EQUIPMENT",
|
||||
"SNF": "SKILLED NURSING FACILITY",
|
||||
"ASC": "AMBULATORY SURGERY CENTER",
|
||||
"LABORATORY": "LABORATORY AND PATHOLOGY",
|
||||
"LAB": "LABORATORY AND PATHOLOGY",
|
||||
"STOP LOSS": "STOP-LOSS",
|
||||
"OB": "OBSTETRIC"
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,20 @@
|
||||
{
|
||||
"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)",
|
||||
"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.",
|
||||
"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.",
|
||||
"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 mentioned anywhere in the contract apply. The default/fallback/'end-of-the-line' payment rate may be a lower rate, often based on billed charges. Do not classify as default if:\n- The methodology is the primary/base reimbursement approach, even if defined by exclusion\n- The methodology applies to specific listed services/procedures \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.'"
|
||||
{
|
||||
"metadata": {
|
||||
"description": "Valid carveout types and descriptions"
|
||||
},
|
||||
"mapping": {
|
||||
"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)",
|
||||
"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.",
|
||||
"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.",
|
||||
"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 mentioned anywhere in the contract apply. The default/fallback/'end-of-the-line' payment rate may be a lower rate, often based on billed charges. Do not classify as default if:\n- The methodology is the primary/base reimbursement approach, even if defined by exclusion\n- The methodology applies to specific listed services/procedures \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.'"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,15 @@
|
||||
{
|
||||
"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'.",
|
||||
"PREMIUM" : "Describes a premium to the payment. Look for the term 'Premium'.",
|
||||
"ADDITION" : "Describes a payment where an additional amount is added to the base reimbursement rate for individual claims. This can be a fixed dollar amount, a percentage of the base reimbursement, or a variable amount derived from the base rate that may change over time based on specified conditions, schedules, or specific services or procedures. Exclude cases where: \n- No specific amount or percentage tied to the base reimbursement of an individual claim is stated, \n- It is unclear whether the payment applies to individual claims, or \n- The payment is dependent on total compensation to Participating IPA Providers.",
|
||||
"TRIGGER_CAP": "Describes the payments that trigger a complete shift to a new payment methodology after a defined quantitative threshold is reached. Unlike supplemental payments, this fundamentally changes how reimbursement is calculated beyond the threshold. Valid thresholds can be based on dollar amounts, number of days, visits, units, or other measurable metrics. However, the following scenarios are NOT considered trigger caps: (1) Payment variations based solely on the timing of an event, such as discharge or admission dates (e.g., different payment if discharge occurs before or after a certain day of the month); (2) Thresholds based on the number of births (e.g., 'If the number of deliveries exceeds 17 per 1,000 members, an additional payment of $2,193 per birth will apply'); (3) Administrative pricing mechanisms such as Charge Description Master (CDM) increases or decreases; (4) Reimbursement limits tied to Acquisition Cost validations (e.g., payments capped at cost plus a percentage); (5) Provisions labeled as 'Stop-Loss' in either the service description or reimbursement text — even if a threshold and rate change are present — as these are considered risk protection mechanisms rather than true shifts in payment methodology; 6) Conditional changes in payment based on service context (e.g., ER vs. admission, Observation vs. surgery) without a numeric threshold do not qualify or Conditional reimbursement rules based on service combinations. Look for language indicating a clear change in the payment methodology when a defined quantitative threshold is exceeded, such as 'when charges exceed X, pay Y', 'above X, reimburse at Y%', or 'over X threshold, payment becomes Y','when charges exceed $50,000, pay 80%' or 'after 3 days, payment changes to $1,200 per diem'.",
|
||||
"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. Exception: Does not include predetermined fixed payment amounts scheduled at specific dates (e.g., $860 in 2008, $925 in 2009, $994 in 2010)."
|
||||
"metadata": {
|
||||
"description": "Valid special case types and descriptions"
|
||||
},
|
||||
"mapping": {
|
||||
"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'.",
|
||||
"PREMIUM": "Describes a premium to the payment. Look for the term 'Premium'.",
|
||||
"ADDITION": "Describes a payment where an additional amount is added to the base reimbursement rate for individual claims. This can be a fixed dollar amount, a percentage of the base reimbursement, or a variable amount derived from the base rate that may change over time based on specified conditions, schedules, or specific services or procedures. Exclude cases where: \n- No specific amount or percentage tied to the base reimbursement of an individual claim is stated, \n- It is unclear whether the payment applies to individual claims, or \n- The payment is dependent on total compensation to Participating IPA Providers.",
|
||||
"TRIGGER_CAP": "Describes the payments that trigger a complete shift to a new payment methodology after a defined quantitative threshold is reached. Unlike supplemental payments, this fundamentally changes how reimbursement is calculated beyond the threshold. Valid thresholds can be based on dollar amounts, number of days, visits, units, or other measurable metrics. However, the following scenarios are NOT considered trigger caps: (1) Payment variations based solely on the timing of an event, such as discharge or admission dates (e.g., different payment if discharge occurs before or after a certain day of the month); (2) Thresholds based on the number of births (e.g., 'If the number of deliveries exceeds 17 per 1,000 members, an additional payment of $2,193 per birth will apply'); (3) Administrative pricing mechanisms such as Charge Description Master (CDM) increases or decreases; (4) Reimbursement limits tied to Acquisition Cost validations (e.g., payments capped at cost plus a percentage); (5) Provisions labeled as 'Stop-Loss' in either the service description or reimbursement text — even if a threshold and rate change are present — as these are considered risk protection mechanisms rather than true shifts in payment methodology; 6) Conditional changes in payment based on service context (e.g., ER vs. admission, Observation vs. surgery) without a numeric threshold do not qualify or Conditional reimbursement rules based on service combinations. Look for language indicating a clear change in the payment methodology when a defined quantitative threshold is exceeded, such as 'when charges exceed X, pay Y', 'above X, reimburse at Y%', or 'over X threshold, payment becomes Y','when charges exceed $50,000, pay 80%' or 'after 3 days, payment changes to $1,200 per diem'.",
|
||||
"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. Exception: Does not include predetermined fixed payment amounts scheduled at specific dates (e.g., $860 in 2008, $925 in 2009, $994 in 2010)."
|
||||
}
|
||||
}
|
||||
@@ -914,6 +914,7 @@ def DERIVED_TERM_DATE_PROMPT(
|
||||
"""
|
||||
return f"The following are excerpts from a legal contract related to effective and termination dates. Determine the initial termination date of the contract, excluding any renewals or extensions.\nIf termination information comes in as a duration, derive the termination date exclusive of the final day. For example, if effective date is 2023/02/01 and termination information is 'two years', termination date would be 2025/01/31 and not 2025/02/01. If effective date is 2023/02/01 and termination information is 'year-to-year', termination date would be 2024/01/31.\nIf the termination information comes in as a date, return that date. For example, if effective date is 2023/02/01 and termination information is 2024/07/01, return 2024/07/01.\nEffective Date: {effective_date}\nTermination Information: {termination_information}\nOnly provide the first termination date, ignoring any automatic or optional renewals. Provide the date in YYYY/MM/DD format only. \n{PIPE_FORMAT_INSTRUCTIONS}"
|
||||
|
||||
|
||||
@cache
|
||||
def invoke_derived_term_date(
|
||||
effective_date: str = None, termination_information: str = None
|
||||
@@ -1184,14 +1185,15 @@ Final answers must be provided in JSON format:
|
||||
}}
|
||||
"""
|
||||
|
||||
|
||||
def SPLIT_REIMB_DATES(date_range: str) -> str:
|
||||
"""
|
||||
Splits a date range into start and end dates, returning them in YYYY/MM/DD format.
|
||||
Handles both explicit dates and text-based duration language.
|
||||
|
||||
|
||||
Args:
|
||||
date_range (str): The date range to split, e.g., "2023/01/01 - 2023/12/31" or "Initial Term - Renewal Term"
|
||||
|
||||
|
||||
Returns:
|
||||
str: A JSON string with "start_date" and "end_date" keys
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user