Merged in bugfix/methodology-breakout-issues (pull request #599)

Bugfix/methodology breakout issues

* restored old prompt

* updated claim type cd prompt

* claim_type exhibit level added

* Merge branch 'bugfix/claim_type_1_to_1' of https://bitbucket.org/aarete/doczy.ai into bugfix/claim_type_1_to_1

* field type updated

* Merge remote-tracking branch 'origin/main' into bugfix/claim_type_1_to_1

* fixed location of updating field_type to full_context

* updated ancillary examples

* removed print statements

* Merge branch 'bugfix/claim_type_1_to_1' of https://bitbucket.org/aarete/doczy.ai into bugfix/claim_type_1_to_1

* prompt updated to avoid N/A

* Merge remote-tracking branch 'origin/main' into bugfix/claim_type_1_to_1

* prompt changed to handle multiple matches

* prompt updated

* Merge remote-tracking branch 'origin/main' into bugfix/claim_type_1_to_1

* print statements added for testing

* test notebook added

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

* multiple fee schedule in one term fixed

* print statements removed

* print statements removed

* print statements removed


Approved-by: Alex Galarce
This commit is contained in:
Mayank Aamseek
2025-07-07 13:14:20 +00:00
committed by Alex Galarce
parent 0230d07dda
commit 28c6cd588e
3 changed files with 4 additions and 5 deletions
@@ -294,7 +294,7 @@ def methodology_breakout_single_row(
llm_utils.invoke_claude(
fee_schedule_prompt_template(
contract_reimbursement_method,
methodology_breakout_dict.get("REIMB_PCT_RATE"),
methodology_breakout_dict.get("FEE_SCHEDULE"),
fs_breakout_questions,
),
config.MODEL_ID_CLAUDE35_SONNET,
@@ -84,7 +84,7 @@
{
"field_name": "FEE_SCHEDULE",
"relationship": "one_to_n",
"field_type": "fee_schedule_breakout",
"field_type": "methodology_breakout",
"prompt": "Write the full name of the Fee Schedule here. Include the secondary part of the fee schedule such as clinical lab, outpatient imaging, DMEPOS, encounter, surgeon, clinical diagnostic lab, parenteral and enteral nutrition (PEN), ASC, Part B Drug, Behavioral health, obstetrical, dental, transportation, etc. CHIP and STAR are not fee schedules. Only use exact text from the methodology."
},
{
@@ -611,14 +611,13 @@ Methodology: {methodology.replace('"', "'")}
Please explain your reasoning as you work through the document. After your explanation, include the heading "FINAL REIMBURSEMENT METHODOLOGY:" followed by a properly formatted JSON list with your final output.
"""
def FEE_SCHEDULE_BREAKOUT(methodology, pct_rate, questions):
def FEE_SCHEDULE_BREAKOUT(methodology, fee_schedule, questions):
return f"""Analyze a given reimbursement methodology from a Payer-Provider contract:
Here is the text to analyze and respond to:
Rate of Interest: '{pct_rate} of Fee Schedule'
Methodology: {methodology.replace('"', "'")}
Use the text in the methodology to populate a JSON dictionary with the following fields, specifically for the rate of interest:
Use the text in the methodology to populate a JSON dictionary with the following fields, specifically for {fee_schedule} Fee Schedule:
{questions}