Merged in hotfix/methodology_breakout_issue_fixes (pull request #562)
Hotfix/methodology breakout issue fixes * additional values in unit of measure removed * Merge branch 'main' into hotfix/methodology_breakout_issue_fixes * added valid list of unit of measure * Merge branch 'main' into hotfix/methodology_breakout_issue_fixes Approved-by: Katon Minhas
This commit is contained in:
committed by
Katon Minhas
parent
f7c41326d3
commit
0d3a110e26
@@ -97,6 +97,21 @@ INVALID_REIMB_TERM = [
|
||||
|
||||
VALID_REIMB_TERM_FULL = VALID_REIMB_TERM + INVALID_REIMB_TERM
|
||||
|
||||
VALID_UNIT_OF_MEASURE = [
|
||||
"Per Unit",
|
||||
"Per ASA Unit",
|
||||
"Per Day",
|
||||
"Per 15 Minutes",
|
||||
"Per 30 Minutes",
|
||||
"Per Hour",
|
||||
"Per Month",
|
||||
"Per Year",
|
||||
"Per Session",
|
||||
"Per Training Session",
|
||||
"Per Visit",
|
||||
"Per Case",
|
||||
]
|
||||
|
||||
VALID_CARVEOUTS = {
|
||||
"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.",
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
"field_name": "UNIT_OF_MEASURE",
|
||||
"relationship": "one_to_n",
|
||||
"field_type": "methodology_breakout",
|
||||
"prompt": "If the reimbursement rate is flat rate, what is its unit of measure. some examples are Per Minute, Per Hour, Per Unit, Per mg, ml, PMPM etc. If AARETE_DERIVED_REIMB_METHOD is 'Flat rate', then do not populate PMPM as unit of measure."
|
||||
"prompt": "If the reimbursement rate is a flat rate, what is its unit of measure? Common values are: {valid_values}. If the unit of measure is not explicitly mentioned or is not included in the list of provided valid values, return 'N/A'. If the reimbursement rate is not a flat rate, return 'N/A'.",
|
||||
"valid_values": "VALID_UNIT_OF_MEASURE"
|
||||
},
|
||||
{
|
||||
"field_name": "REIMB_FEE_RATE",
|
||||
|
||||
@@ -12,7 +12,7 @@ from src.constants.investment_values import (
|
||||
VALID_AARETE_DERIVED_FEE_SCHEDULE_VERSION, VALID_BILL_TYPE,
|
||||
VALID_CARVEOUTS, VALID_CLAIM_TYPE, VALID_LOBS, VALID_NETWORKS,
|
||||
VALID_PLACE_OF_SERVICE, VALID_PROGRAMS, VALID_PRODUCTS, VALID_PROV_SPECIALTY,
|
||||
VALID_PROV_TYPE, VALID_REIMB_TERM, VALID_SPECIAL)
|
||||
VALID_PROV_TYPE, VALID_REIMB_TERM, VALID_SPECIAL, VALID_UNIT_OF_MEASURE)
|
||||
from src.enums.delimiters import Delimiter
|
||||
from src.utils.string_utils import extract_text_from_delimiters
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"(3178, 158)\n",
|
||||
"(2, 158)\n"
|
||||
"(3180, 146)\n",
|
||||
"(1, 146)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -83,10 +83,10 @@
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>129</th>\n",
|
||||
" <td>06-1798267-ANTHONY W. LE, A PROFESSIONAL CORP-...</td>\n",
|
||||
" <td>ANESTHESIA SERVICES WHEN PROVIDED BY AN ANESTH...</td>\n",
|
||||
" <td>THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75%...</td>\n",
|
||||
" <th>2107</th>\n",
|
||||
" <td>AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt</td>\n",
|
||||
" <td>Special Care Broward Health North, Broward Hea...</td>\n",
|
||||
" <td>$ 1,875 Per Diem</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
@@ -94,13 +94,10 @@
|
||||
],
|
||||
"text/plain": [
|
||||
" FILE_NAME \\\n",
|
||||
"129 06-1798267-ANTHONY W. LE, A PROFESSIONAL CORP-... \n",
|
||||
"2107 AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt \n",
|
||||
"\n",
|
||||
" SERVICE_TERM \\\n",
|
||||
"129 ANESTHESIA SERVICES WHEN PROVIDED BY AN ANESTH... \n",
|
||||
"\n",
|
||||
" REIMB_TERM \n",
|
||||
"129 THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75%... "
|
||||
" SERVICE_TERM REIMB_TERM \n",
|
||||
"2107 Special Care Broward Health North, Broward Hea... $ 1,875 Per Diem "
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
@@ -109,7 +106,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"labels_df = pd.read_csv('src/testbed/v6_DoczyAI_all_test_bed_LIVE_5.6.25_POSTPROCESSED.csv',encoding='utf-8')\n",
|
||||
"labels_df = pd.read_csv('src/testbed/v9_DoczyAI_all_test_bed_LIVE_5.23.csv',encoding='utf-8')\n",
|
||||
"print(labels_df.shape)\n",
|
||||
"# labels_df = labels_df[labels_df[\n",
|
||||
"# 'FILE_NAME'].isin([\n",
|
||||
@@ -125,8 +122,9 @@
|
||||
" 'REIMB_TERM'].isin([\n",
|
||||
" # \"THE LESSER OF BILLED OR ALLOWABLE. WILL BE PAID WITH A CONVERSION FACTOR OF $30.72.\",\n",
|
||||
" # \"THE LESSER OF BILLED OR ALLOWABLE. THE PROFESSIONAL SERVICES FEE SCHEDULE FOR THE MEDICAID LINE OF BUSINESS IS BASED PRIMARILY ON THE CMS TRANSITIONAL FACILITY/NON-FACILITY RELATIVE VALUE UNIT SCALE (\\\"RVU\\\") AND METHODOLOGY AS DEFINED AND INSTRUCTED BY THE FEDERAL REGISTER IN PRINT AS OF DECEMBER 31, 2013. COVERED SERVICES WILL BE CALCULATED USING THE CONVERSION FACTORS BELOW. ANCILLARY PROVIDER SERVICES $26.00 CONVERSION FACTOR*. ANESTHESIA $21.20 CONVERSION FACTOR**.\",\n",
|
||||
" # \"CONTRACTAMOUNT : $26.00 RBRVS\",\n",
|
||||
" \"THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75% OF PROVIDER'S ALLOWABLE CHARGES.\",\n",
|
||||
" \"$ 1,875 Per Diem\",\n",
|
||||
" # \"Physician Group shall be compensated for anesthesiology services which are Covered Services at the lesser of (a) $39.00 per unit value in accordance with the American Society of Anesthesiology (ASA) unit scale, or (b) 75% of the Physician Group's usual billed charges.\",\n",
|
||||
" # \"80% of the AHCCCS Physician Fee For Service rates prevailing as of the date of service Contrast material/isotopes for PET scans $200 per PET scan\",\n",
|
||||
" # \"PHYSICIAN GROUP SHALL BE COMPENSATED FOR ANESTHESIOLOGY SERVICES WHICH ARE COVERED SERVICES AT THE LESSER OF (A) $39.00 PER UNIT VALUE IN ACCORDANCE WITH THE AMERICAN SOCIETY OF ANESTHESIOLOGY (ASA) UNIT SCALE, OR (B) 75% OF THE PHYSICIAN GROUP'S USUAL BILLED CHARGES.\",\n",
|
||||
" # , \"Health Net will offer $1,000,000 incremental reimbursement for the Medi-Cal line of business each year of the two year renewal effective 5/1/18 and 5/1/19, resulting in an additional $1M reimbursement from 5/1/18 through 4/30/19 and an additional $2M reimbursement from 5/1/19 through 4/30/20.\"\n",
|
||||
" ])]\n",
|
||||
@@ -152,62 +150,8 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Let's analyze this methodology step by step:\n",
|
||||
"\n",
|
||||
"1. LESSER_OF_IND: The methodology explicitly states \"THE LESSER OF\", so this will be 'Y'.\n",
|
||||
"\n",
|
||||
"2. GREATER_OF_IND: There's no mention of \"greater of\", so this will be 'N'.\n",
|
||||
"\n",
|
||||
"3. AARETE_DERIVED_REIMB_METHOD: \n",
|
||||
" - For (I): \"$39 / ASA UNIT\" refers to a specific dollar amount per ASA unit. ASA (American Society of Anesthesiology) units are a type of relative value unit used in anesthesia billing. This is essentially a fee schedule.\n",
|
||||
" - For (II): \"75% OF PROVIDER'S ALLOWABLE CHARGES\" is a percentage of billed charges.\n",
|
||||
" So we have two methods: 'Fee Schedule' and 'Billed Charges'.\n",
|
||||
"\n",
|
||||
"4. UNIT_OF_MEASURE: \n",
|
||||
" - For (I): The unit is \"Per ASA Unit\"\n",
|
||||
" - For (II): Not applicable, so \"N/A\"\n",
|
||||
"\n",
|
||||
"5. REIMB_FEE_RATE: \n",
|
||||
" - For (I): $39 is mentioned as a specific dollar amount\n",
|
||||
" - For (II): No specific dollar amount, so \"N/A\"\n",
|
||||
"\n",
|
||||
"6. REIMB_PCT_RATE:\n",
|
||||
" - For (I): No percentage mentioned, so 100 (default)\n",
|
||||
" - For (II): 75% is explicitly mentioned\n",
|
||||
"\n",
|
||||
"7. REIMB_CONVERSION_FACTOR: \n",
|
||||
" - For (I): $39 is the conversion factor\n",
|
||||
" - For (II): No conversion factor mentioned, so \"N/A\"\n",
|
||||
"\n",
|
||||
"8. NOT_TO_EXCEED_IND: There's no explicit \"not to exceed\" language, so this will be 'N' for both.\n",
|
||||
"\n",
|
||||
"Given that we have a \"lesser of\" scenario with two distinct methodologies, we'll create two JSON dictionaries in our list.\n",
|
||||
"\n",
|
||||
"FINAL REIMBURSEMENT METHODOLOGY:\n",
|
||||
"[\n",
|
||||
" {\n",
|
||||
" \"LESSER_OF_IND\": \"Y\",\n",
|
||||
" \"GREATER_OF_IND\": \"N\",\n",
|
||||
" \"AARETE_DERIVED_REIMB_METHOD\": \"Fee Schedule\",\n",
|
||||
" \"UNIT_OF_MEASURE\": \"Per ASA Unit\",\n",
|
||||
" \"REIMB_FEE_RATE\": \"N/A\",\n",
|
||||
" \"REIMB_PCT_RATE\": 100,\n",
|
||||
" \"REIMB_CONVERSION_FACTOR\": 39,\n",
|
||||
" \"NOT_TO_EXCEED_IND\": \"N\"\n",
|
||||
" },\n",
|
||||
" {\n",
|
||||
" \"LESSER_OF_IND\": \"Y\",\n",
|
||||
" \"GREATER_OF_IND\": \"N\",\n",
|
||||
" \"AARETE_DERIVED_REIMB_METHOD\": \"Billed Charges\",\n",
|
||||
" \"UNIT_OF_MEASURE\": \"N/A\",\n",
|
||||
" \"REIMB_FEE_RATE\": \"N/A\",\n",
|
||||
" \"REIMB_PCT_RATE\": 75,\n",
|
||||
" \"REIMB_CONVERSION_FACTOR\": \"N/A\",\n",
|
||||
" \"NOT_TO_EXCEED_IND\": \"N\"\n",
|
||||
" }\n",
|
||||
"]\n",
|
||||
"{'FILE_NAME': '06-1798267-ANTHONY W. LE, A PROFESSIONAL CORP-ICMPROVIDERAGREEMENT_316844.TXT', 'SERVICE_TERM': 'ANESTHESIA SERVICES WHEN PROVIDED BY AN ANESTHESIOLOGIST OR CERTIFIED REGISTERED NURSE ANESTHETIST (AMERICAN SOCIETY OF ANESTHESIOLOGY (ASA) UNIT SCALE)', 'REIMB_TERM': \"THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75% OF PROVIDER'S ALLOWABLE CHARGES.\", 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N'}\n",
|
||||
"[{'FILE_NAME': '06-1798267-ANTHONY W. LE, A PROFESSIONAL CORP-ICMPROVIDERAGREEMENT_316844.TXT', 'SERVICE_TERM': 'ANESTHESIA SERVICES WHEN PROVIDED BY AN ANESTHESIOLOGIST OR CERTIFIED REGISTERED NURSE ANESTHETIST (AMERICAN SOCIETY OF ANESTHESIOLOGY (ASA) UNIT SCALE)', 'REIMB_TERM': \"THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75% OF PROVIDER'S ALLOWABLE CHARGES.\", 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'GREATER_OF_IND': 'N', 'AARETE_DERIVED_REIMB_METHOD': 'Fee Schedule', 'UNIT_OF_MEASURE': 'Per ASA Unit', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 100, 'REIMB_CONVERSION_FACTOR': 39, 'NOT_TO_EXCEED_IND': 'N', 'FEE_SCHEDULE': 'ASA UNIT', 'AARETE_DERIVED_FEE_SCHEDULE': 'CMS', 'FEE_SCHEDULE_VERSION': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'current'}, {'FILE_NAME': '06-1798267-ANTHONY W. LE, A PROFESSIONAL CORP-ICMPROVIDERAGREEMENT_316844.TXT', 'SERVICE_TERM': 'ANESTHESIA SERVICES WHEN PROVIDED BY AN ANESTHESIOLOGIST OR CERTIFIED REGISTERED NURSE ANESTHETIST (AMERICAN SOCIETY OF ANESTHESIOLOGY (ASA) UNIT SCALE)', 'REIMB_TERM': \"THE LESSER OF: (I) $39 / ASA UNIT, OR (II) 75% OF PROVIDER'S ALLOWABLE CHARGES.\", 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'Y', 'GREATER_OF_IND': 'N', 'AARETE_DERIVED_REIMB_METHOD': 'Billed Charges', 'UNIT_OF_MEASURE': 'N/A', 'REIMB_FEE_RATE': 'N/A', 'REIMB_PCT_RATE': 75, 'REIMB_CONVERSION_FACTOR': 'N/A', 'NOT_TO_EXCEED_IND': 'N', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}]\n"
|
||||
"{'FILE_NAME': 'AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt', 'SERVICE_TERM': 'Special Care Broward Health North, Broward Health Medical Center | 169', 'REIMB_TERM': '$ 1,875 Per Diem', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N'}\n",
|
||||
"[{'FILE_NAME': 'AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt', 'SERVICE_TERM': 'Special Care Broward Health North, Broward Health Medical Center | 169', 'REIMB_TERM': '$ 1,875 Per Diem', 'CARVEOUT_CD': 'PAYMENT_CARVEOUT', 'CARVEOUT_IND': 'Y', 'DEFAULT_IND': 'N', 'LESSER_OF_IND': 'N', 'GREATER_OF_IND': 'N', 'AARETE_DERIVED_REIMB_METHOD': 'Flat Rate', 'UNIT_OF_MEASURE': 'Per Day', 'REIMB_FEE_RATE': 1875, 'REIMB_PCT_RATE': 'N/A', 'REIMB_CONVERSION_FACTOR': 'N/A', 'NOT_TO_EXCEED_IND': 'N', 'FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE': 'N/A', 'AARETE_DERIVED_FEE_SCHEDULE_VERSION': 'N/A'}]\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -245,7 +189,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -257,16 +201,16 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(2, 18)"
|
||||
"(1, 17)"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -279,22 +223,101 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>FILE_NAME</th>\n",
|
||||
" <th>SERVICE_TERM</th>\n",
|
||||
" <th>REIMB_TERM</th>\n",
|
||||
" <th>CARVEOUT_CD</th>\n",
|
||||
" <th>CARVEOUT_IND</th>\n",
|
||||
" <th>DEFAULT_IND</th>\n",
|
||||
" <th>LESSER_OF_IND</th>\n",
|
||||
" <th>GREATER_OF_IND</th>\n",
|
||||
" <th>AARETE_DERIVED_REIMB_METHOD</th>\n",
|
||||
" <th>UNIT_OF_MEASURE</th>\n",
|
||||
" <th>REIMB_FEE_RATE</th>\n",
|
||||
" <th>REIMB_PCT_RATE</th>\n",
|
||||
" <th>REIMB_CONVERSION_FACTOR</th>\n",
|
||||
" <th>NOT_TO_EXCEED_IND</th>\n",
|
||||
" <th>FEE_SCHEDULE</th>\n",
|
||||
" <th>AARETE_DERIVED_FEE_SCHEDULE</th>\n",
|
||||
" <th>AARETE_DERIVED_FEE_SCHEDULE_VERSION</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt</td>\n",
|
||||
" <td>Special Care Broward Health North, Broward Hea...</td>\n",
|
||||
" <td>$ 1,875 Per Diem</td>\n",
|
||||
" <td>PAYMENT_CARVEOUT</td>\n",
|
||||
" <td>Y</td>\n",
|
||||
" <td>N</td>\n",
|
||||
" <td>N</td>\n",
|
||||
" <td>N</td>\n",
|
||||
" <td>Flat Rate</td>\n",
|
||||
" <td>Per Day</td>\n",
|
||||
" <td>1875</td>\n",
|
||||
" <td>N/A</td>\n",
|
||||
" <td>N/A</td>\n",
|
||||
" <td>N</td>\n",
|
||||
" <td>N/A</td>\n",
|
||||
" <td>N/A</td>\n",
|
||||
" <td>N/A</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
"(2, 18)"
|
||||
" FILE_NAME \\\n",
|
||||
"0 AMD - IV - HSA eff 2017 (amd 4) - Broward MU.txt \n",
|
||||
"\n",
|
||||
" SERVICE_TERM REIMB_TERM \\\n",
|
||||
"0 Special Care Broward Health North, Broward Hea... $ 1,875 Per Diem \n",
|
||||
"\n",
|
||||
" CARVEOUT_CD CARVEOUT_IND DEFAULT_IND LESSER_OF_IND GREATER_OF_IND \\\n",
|
||||
"0 PAYMENT_CARVEOUT Y N N N \n",
|
||||
"\n",
|
||||
" AARETE_DERIVED_REIMB_METHOD UNIT_OF_MEASURE REIMB_FEE_RATE REIMB_PCT_RATE \\\n",
|
||||
"0 Flat Rate Per Day 1875 N/A \n",
|
||||
"\n",
|
||||
" REIMB_CONVERSION_FACTOR NOT_TO_EXCEED_IND FEE_SCHEDULE \\\n",
|
||||
"0 N/A N N/A \n",
|
||||
"\n",
|
||||
" AARETE_DERIVED_FEE_SCHEDULE AARETE_DERIVED_FEE_SCHEDULE_VERSION \n",
|
||||
"0 N/A N/A "
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"predictions_df.shape"
|
||||
"predictions_df"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user