Updated Bottom Up Methodology

This commit is contained in:
Katon Minhas
2024-06-07 14:17:31 -07:00
committed by Michael McGuinness
parent a9397aec7e
commit e02fe50fab
2 changed files with 23 additions and 6 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ def BOTTOM_UP_METHODOLOGY(d):
Your job is to identify what the concise methodology is based on the full methodology.
Choose the closest option from the following:
Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour
Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, IME/DME Amount, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour
For 'Allowed Amount' and 'Fee Schedule', use the more specific answer (Medicare/Medicaid) if applicable.
For the 'Per ___' values, note that this list is not necessarily exhaustive. It could be anything like 'Per ___'.
+22 -5
View File
@@ -37,6 +37,23 @@ Note that only one of REIMBURSEMENT_FLAT_FEE or REIMBURSEMENT_RATE should be pop
Only return the list, with no other commentary or explanation. Ensure you abide by proper JSON formatting.
"""
def BOTTOM_UP_METHODOLOGY(d):
return f"""Analyze the full methodology text listed below:
{d['FULL_METHODOLOGY']}
Your job is to identify what the concise methodology is based on the full methodology.
Choose the closest option from the following:
Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, IME/DME Amount, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour
For 'Allowed Amount' and 'Fee Schedule', use the more specific answer (Medicare/Medicaid) if applicable.
For the 'Per ___' values, note that this list is not necessarily exhaustive. It could be anything like 'Per ___'.
Return only the answer, without using complete sentences. If there is nothing even close to the above options in the full methodology text, simply return 'N/A'
"""
input_dict = utils.read_input()
filename = list(input_dict.keys())[0]
@@ -44,12 +61,12 @@ contract_text = input_dict[filename]
print(filename)
contract_text = preprocess.clean_newlines(contract_text)
text_dict = preprocess.split_text(contract_text)
text_dict = table_funcs.align_and_format_tables({'2' : text_dict['2']})
text_dict = preprocess.highlight_rates(text_dict)
# contract_text = preprocess.clean_newlines(contract_text)
# text_dict = preprocess.split_text(contract_text)
# text_dict = table_funcs.align_and_format_tables({'7' : text_dict['5']})
# text_dict = preprocess.highlight_rates(text_dict)
prompt = BOTTOM_UP_PRIMARY(text_dict['2'], '')
prompt = BOTTOM_UP_METHODOLOGY({'FULL_METHODOLOGY' : 'In addition, Plan will reimburse the Provider 100% of the IME/DME amount.'})
answer = claude_funcs.invoke_claude_3(prompt, max_tokens=4000)
print(answer)