Skip to main content
Version: 2.2

Komodo Remits

Takeaways:

  1. Remits data contains billed_amount. But it is ALWAYS NULL
  2. Allowed amounts are available but the number of encounters with total allowed amounts > than $50k is very small (1156). This includes ALL lines of businesses, even where payer_id is NULL.

Data Dictionary​

warning

billed_amount, cob_amount, and other_amount are ALWAYS null

ColumnType
patient_idvarchar
encounter_keyvarchar
remit_idvarchar
payee_npivarchar
payer_idvarchar
payer_namevarchar
claim_from_datedate
claim_to_datedate
claim_typevarchar
bill_type_codevarchar
drg_codevarchar
line_numberinteger
service_from_datedate
service_to_datedate
procedure_codevarchar
revenue_codevarchar
unitsinteger
billed_amountinteger
bill_datedate
contract_adjustment_amountinteger
denial_amountinteger
cob_amountinteger
other_amountinteger
patient_responsibility_amountinteger
contract_adjustment_codesvarchar
denial_codesvarchar
other_codesvarchar
allowed_amountinteger
paid_amountinteger

Billed Amount is Always NULL​

n
billed_amount_not_null0
allowed_amount_not_null252453685
paid_amount_not_null50429242
cob_amount_not_null0
other_amount_not_null0
n18336627986
df = pd.read_sql(f"""
SELECT
COUNT_IF(billed_amount IS NOT NULL) AS billed_amount_not_null,
COUNT_IF(allowed_amount IS NOT NULL) AS allowed_amount_not_null,
COUNT_IF(paid_amount IS NOT NULL) AS paid_amount_not_null,
COUNT_IF(cob_amount IS NOT NULL) AS cob_amount_not_null,
COUNT_IF(other_amount IS NOT NULL) AS other_amount_not_null,
count(*) as n
FROM tq_intermediate.external_komodo.remits
""", con=trino_conn)
print(df.T.to_markdown(floatfmt=".0f"))

Allowed Amount Distribution​

Allowed Amount
p10_allowed_amount59.00
p25_allowed_amount110.00
p50_allowed_amount128.00
p75_allowed_amount228.00
p90_allowed_amount439.00
p95_allowed_amount648.00
p99_allowed_amount1550.00
p999_allowed_amount4670.00
p9999_allowed_amount13016.00
df = pd.read_sql(f"""
WITH
df AS (
SELECT
encounter_key,
sum(allowed_amount) AS total_allowed_amount
FROM tq_intermediate.external_komodo.remits
GROUP BY 1
)
SELECT
APPROX_PERCENTILE(total_allowed_amount, 0.1) AS p10_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.25) AS p25_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.5) AS p50_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.75) AS p75_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.9) AS p90_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.95) AS p95_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.99) AS p99_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.999) AS p999_allowed_amount,
APPROX_PERCENTILE(total_allowed_amount, 0.9999) AS p9999_allowed_amount
FROM df
""", con=trino_conn)
print(df.set_axis(['Allowed Amount']).T.to_markdown(floatfmt=".2f"))

Encounters with Allowed Amounts > $50k​

There are only 1156 encounters with total allowed amounts greater than $50,000. Note that this includes all lines of business, even where payer_id contains NULL.

WITH
df AS (
SELECT
encounter_key,
sum(allowed_amount) AS total_allowed_amount
FROM tq_intermediate.external_komodo.remits
GROUP BY 1
)
SELECT
COUNT_IF(total_allowed_amount > 50000) AS encounters_above_50k
FROM df