Merged in bugfix/highmark-methodology-breakout (pull request #815)

Bugfix/highmark methodology breakout

* fix reimb_term rows for dates

* reimb_primary prompt update

* prompt changes

* Merge remote-tracking branch 'origin/main' into bugfix/highmark-methodology-breakout

* prompt changes

* prompt updates

* Merge branch 'main' into bugfix/highmark-methodology-breakout

* prompt updates

* Prompt updates


Approved-by: Katon Minhas
This commit is contained in:
Mayank Aamseek
2025-12-22 18:58:34 +00:00
committed by Katon Minhas
parent e8cb48643c
commit 7ffd62fd8e
2 changed files with 5 additions and 6 deletions
@@ -21,7 +21,7 @@
"field_name": "AARETE_DERIVED_REIMB_METHOD",
"relationship": "one_to_n",
"field_type": "methodology_breakout",
"prompt": "What is the method of reimbursement? Choose only from the following valid values: {valid_values}.\nFollow these mapping rules:\n- If any of Medicare, Medicaid, Average Sales Price (ASP), AWP (Average Wholesale Price), WAC (Wholesale Acquisition Cost), RBRVS (Resource-Based Relative Value Scale), RVU (Relative Value Unit) or ASA (American Society of Anesthesiology) or any type of Fee Schedule is mentioned, return 'Fee Schedule'.\n- In case of DRG, MS-DRG, AP-DRG, SDA (Standard Dollar Amount), APR-DRG, APG, EAPG, APC (Ambulatory Payment Classification)/OPPS (Outpatient Prospective Payment System) or Ambulatory Surgical Center (ASC), Inpatient/IRF Prospective Payment System, return 'Grouper'.\n- In case of Percent of Charge or Percentage of Billed, return 'Billed Charges'.\n- When reimbursement is defined on a per-day basis, the applicable method is Per Diem.\n- For mixed methodologies (e.g., 'cost plus 5% based on AWP'), prioritize the base method (AWP).\n\nImportant exceptions and additional rules:\n- Reimbursements with specific dollar values cannot be 'Fee Schedule'.\n- Provider interest rates are not considered 'Flat Rate'.\n- Charge master increase caps or limitations on provider pricing behavior are NOT reimbursement methodologies and should be ignored.\n- **Precedence rule (final):** If any grouper-related codes or references (e.g., DRG, MS-DRG, APR-DRG, APG, EAPG, APC/OPPS/IPPS, SDA, ASC grouping, etc.) are present in the SERVICE or METHODOLOGY fields, return 'Grouper' — This **overrides all other mapping rules**, including explicit dollar amounts (normally 'Flat Rate'), Fee Schedule indicators, case rates, per diem references, or cost-based methodologies..\n- **Exception:** If the methodology explicitly maps to 'Billed Charges' (e.g., Percent of Charge, Percentage of Billed), then return 'Billed Charges' even if grouper codes are present.\n\nIf no specific rule is matched, map to the most appropriate value from the given valid values.",
"prompt": "What is the method of reimbursement? Choose only from the following valid values: {valid_values}.\nFollow these mapping rules:\n- If any of Medicare, Medicaid, Average Sales Price (ASP), AWP (Average Wholesale Price), WAC (Wholesale Acquisition Cost), RBRVS (Resource-Based Relative Value Scale), RVU (Relative Value Unit) or ASA (American Society of Anesthesiology) or any type of Fee Schedule is mentioned, method of reimbursement is generally 'Fee Schedule'.\n- In case of DRG, MS-DRG, AP-DRG, SDA (Standard Dollar Amount), APR-DRG, APG, EAPG, APC (Ambulatory Payment Classification)/OPPS (Outpatient Prospective Payment System) or Ambulatory Surgical Center (ASC), Inpatient/IRF Prospective Payment System, method is generally 'Grouper'.\n- In case of Percent of Charge or Percentage of Billed, return 'Billed Charges'.\n- When reimbursement is Per Case, Per Unit, or similar, return 'Flat Rate'.\n- When reimbursement is defined on a per-day basis, the applicable method is Per Diem.\n- For mixed methodologies (e.g., 'cost plus 5% based on AWP'), prioritize the base method (AWP).\n\nImportant exceptions and additional rules:\n- Reimbursements with specific dollar values cannot be 'Fee Schedule'.\n- Provider interest rates are not considered 'Flat Rate'.\n- Charge master increase caps or limitations on provider pricing behavior are NOT reimbursement methodologies and should be ignored.\n\nChoose the most appropriate value from the valid values list. Never return 'N/A'.",
"valid_values": "VALID_REIMB_METHODOLOGY"
},
{
@@ -46,7 +46,7 @@
"field_name": "UNIT_OF_MEASURE",
"relationship": "one_to_n",
"field_type": "methodology_breakout",
"prompt": "Extract the unit of measure for flat rate or fee schedule reimbursements. Look for specific units like 'per day', 'per visit', 'per procedure', 'per ASA unit', etc. If a specific unit of measure is found and matches the valid values list, return that exact match. If a unit is mentioned but not in the valid values list, return 'Per Unit'. For flat rate methodologies where no specific unit is mentioned, default to 'Per Unit' regardless of whether procedure codes are present. For non-flat rate methodologies (percentages, bundled payments, etc.) where no unit is explicitly stated, return 'N/A'. Valid values are: {valid_values}. Don't assume units based on context; only extract explicitly stated units, except for the flat rate default rule.",
"prompt": "Extract the unit of measure for flat rate or fee schedule reimbursements. Look for specific units like 'per day', 'per visit', 'per procedure', 'per ASA unit', 'case rate', etc. If a specific unit of measure is found and matches the valid values list, return that match. If a unit is mentioned but not in the valid values list, return 'Per Unit'. For flat rate methodologies where no specific unit is mentioned, default to 'Per Unit' regardless of whether procedure codes are present. For non-flat rate methodologies (percentages, bundled payments, etc.) where no unit is explicitly stated, return 'N/A'. Valid values are: {valid_values}. Don't assume units based on context; only extract explicitly stated units, except for the flat rate default rule.",
"valid_values": "VALID_UNIT_OF_MEASURE"
},
{
@@ -377,6 +377,7 @@ REIMB_TERM: Describes the method by which the price of the Service is calculated
- Do not leave out any relevant information from either the SERVICE_TERM or REIMB_TERM even if it is not present in the vicinity. e.g. answer "$100 per visit" rather than just "$100". If table headers provide ANY relevant information (like code type, provider type, hospital name, etc), include that in the SERVICE_TERM or REIMB_TERM as appropriate.
- Include all SERVICE_TERM and REIMB_TERM pairs mentioned, even if they are redundant or overlapping. There should be at least one entry for each SERVICE_TERM and REIMB_TERM pair mentioned.
- ALWAYS include all relevant percentages and dollar values. If there's even a slight chance that the number is relevant, include it.
- For each REIMB_TERM, include any additional information mentioned that will be useful in determining reimbursement for the service, e.g., "payment amount will be determined by multiplying it by the DRG weight". It should be appended to relevant REIMB_TERM and not added as a separate entry.
- If different reimbursement percentages or dollar values are mentioned for different effective dates, create separate entries for each effective date.
[EXCLUSIONS]
@@ -515,7 +516,7 @@ Analyze a given term from a Payer-Provider contract and extract key fields.
- If the methodology includes two reimbursement methodologies that are comparative or equal, such as "70% of Billed Charges equal to Provider's Acquisition Cost plus five percent (5%)", each should be represented as a separate dictionary in the output list.
- For each dictionary, only one of the following fields should be present: REIMB_FEE_RATE, REIMB_PCT_RATE, or REIMB_CONVERSION_FACTOR. The others should be "N/A".
- Do not repeat the same reimbursement information in different output entries. For example, if 'cost of vaccines plus a $5 administration fee' is present and $5 is already captured as an addition, do not create a separate dictionary with $5 as a flat fee. Include it only once as an addition.
- Similarly, for provisions like stop-loss, outlier, trigger cap, discount, premium, rate escalator, different threshold values, and facility adjustments (e.g., DSH, IME, NTAP, UC, GME adjustments), separate rows should not be created as these are not considered reimbursement methodologies and are captured separately.
- For direct calculations like a flat fee of "$150.00 + $8.00", calculate the total ($158.00) and include only this flat fee rate in one dictionary.
In the case of 'RBRVS', 'RVU', or American Society of Anesthesiology ('ASA'), any dollar amount mentioned refers to a conversion factor, and not to a flat fee rate.
If AARETE_DERIVED_REIMB_METHOD is Grouper, the dollar amount refers to REIMB_CONVERSION_FACTOR. If AARETE_DERIVED_REIMB_METHOD is Flat Rate or similar, the dollar amount refers to a REIMB_FEE_RATE.
@@ -1232,8 +1233,6 @@ Examine the Reimbursement Term and identify which case it falls under.
Here are the cases, with their definitions:
Carveout cases: {"\n\n".join([name + " : " + description for name, description in carveout_definitions.items()])}
Special cases: {"\n\n".join([name + " : " + description for name, description in special_case_definitions.items()])}
Carveout cases generally apply only to specific mentioned services, while special cases generally apply more broadly to all services in the exhibit.
[REIMBURSEMENT TERM]
Here is the Reimbursement Term to analyze:
@@ -1248,7 +1247,7 @@ Reimbursement Term: {reimb_term.replace('"', "'")}
- Always return one value from the combined list of cases above; do not return 'N/A' or 'UNKNOWN'.
[OUTPUT FORMAT]
Briefly explain your answer, then enclose your final answer in |pipes|.
Briefly explain your answer (including why it was one of carveout cases or special cases), then enclose your final answer in |pipes|.
"""