Skip to content

Commit 054facf

Browse files
Merge pull request #37 from CMSgov/v3.13
v3.13 code updates
2 parents 14e71b1 + add6817 commit 054facf

23 files changed

+15
-14
lines changed

dqm/DQMeasures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ def __init__(self, report_month: str, rpt_state='', separate_entity='0', run_id:
9393
self.now = datetime.now()
9494
self.initialize_logger(self.now)
9595

96-
self.version = '3.12.1'
96+
self.version = '3.13.0'
9797
self.progpath = '/dqm'
9898

99-
self.specvrsn = 'V3.12.1'
99+
self.specvrsn = 'V3.13.0'
100100
self.turboDB = 'dqm_conv'
101101
self.isTurbo = turbo
102102

dqm/batch/run_801.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
df_missingVars['claim_cat'] = df_missingVars['Claims_cat_type'].str.upper()
1818
df_missingVars['sub_cap_exclusion'] = df_missingVars['Sub-Capitated Encounters Exclusion']
1919

20+
2021
# --------------------------------------------------------------------
2122
#
2223
#
@@ -34,7 +35,7 @@
3435
#
3536
# --------------------------------------------------------------------
3637
df_missingVars = df_missingVars.set_index("measure_id", drop = False)
37-
# print(df_missingVars)
38+
print(df_missingVars)
3839
df_missingVars.to_pickle('./run_801_missvar.pkl')
3940

4041
# --------------------------------------------------------------------
@@ -44,7 +45,7 @@
4445
df_Miss_Non_claims = df_missingVars[df_missingVars['File Type - Summary'] == 'Non-claims']
4546
df_Miss_Non_claims['series'] = '803'
4647
df_Miss_Non_claims['cb'] = 'non_claims_pct'
47-
# print(df_Miss_Non_claims)
48+
#print(df_Miss_Non_claims)
4849
df_Miss_Non_claims.to_pickle('./run_801_miss_non_claims.pkl')
4950

5051
# --------------------------------------------------------------------
@@ -72,7 +73,7 @@ def data_element_update(Data_element_var):
7273
df_Miss_Claims['Data_element_var_updt'] = df_Miss_Claims.apply(lambda x: data_element_update(x['Data_element_var']), axis=1)
7374
df_Miss_Claims['series'] = '802'
7475
df_Miss_Claims['cb'] = 'claims_pct'
75-
# print(df_Miss_Claims)
76+
print(df_Miss_Claims)
7677
df_Miss_Claims.to_pickle('./run_801_miss_claims.pkl')
7778

7879

@@ -114,7 +115,7 @@ def data_element_update(Data_element_var):
114115
df_803_miss_non_claims_pct['file_type'] = df_Miss_Non_claims['File_Type2']
115116

116117
df_803_miss_non_claims_pct = df_803_miss_non_claims_pct.set_index("measure_id", drop = False)
117-
print(df_803_miss_non_claims_pct)
118+
#print(df_803_miss_non_claims_pct)
118119
df_803_miss_non_claims_pct.to_pickle('./run_803.pkl')
119120

120121

dqm/cfg/abd.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/apdxc.pkl

1 Byte
Binary file not shown.

dqm/cfg/countystate_lookup.pkl

-62 Bytes
Binary file not shown.

dqm/cfg/fmg.pkl

85 Bytes
Binary file not shown.

dqm/cfg/prgncy.pkl

-64 Bytes
Binary file not shown.

dqm/cfg/sauths.pkl

-250 Bytes
Binary file not shown.

dqm/cfg/schip.pkl

-75 Bytes
Binary file not shown.

dqm/cfg/splans.pkl

-1.47 KB
Binary file not shown.

dqm/cfg/st2_name.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/st_fips.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/st_name.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/st_usps.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/stabr.pkl

-71 Bytes
Binary file not shown.

dqm/cfg/stc_cd.pkl

-122 Bytes
Binary file not shown.

dqm/cfg/thresholds.csv

+4-4
Original file line numberDiff line numberDiff line change
@@ -2085,14 +2085,14 @@ LT,2,MCR59R.14,MCR-59R-002-14,"% of Plan IDs over the threshold for MCR-59P-002-
20852085
OT,3,MCR59R.15,MCR-59R-003-15,"% of Plan IDs over the threshold for MCR-59P-003-15 (% of claim headers with PAYMENT-LEVEL-IND = 2 where the sum of Medicaid Paid Amount from the lines does not equal Total Medicaid Paid Amount from the header, by Plan ID)",Claims Percentage,"Medicaid and S-CHIP Encounter: Original, Paid Claims",Y,2,Default,MCR59R_15,MCR,59R,15,003,,003,2
20862086
RX,4,MCR59R.16,MCR-59R-004-16,"% of Plan IDs over the threshold for MCR-59P-004-16 (% of claim headers with PAYMENT-LEVEL-IND = 2 where the sum of Medicaid Paid Amount from the lines does not equal Total Medicaid Paid Amount from the header, by Plan ID)",Claims Percentage,"Medicaid and S-CHIP Encounter: Original, Paid Claims",Y,2,Default,MCR59R_16,MCR,59R,16,004,,004,2
20872087
PRV,10,MIS11.58,MIS-11-010_10-58,% distinct SUBMITTING-STATE-PROV-IDs where FACILITY-GROUP-INDIVIDUAL-CODE <> 03 with only missing values in any active segment: PROV-ORGANIZATION-NAME (PRV00002),Non-Claims Percentage,N/A,Y,3,Default,MIS11_58,MIS,11,58,010,,010,3
2088-
OT,156,MCR12.156,MCR-12-156-156,# of claim headers where the claim type indicates a sub-capitation payment (TYPE-OF-CLAIM = 6),Count,"Medicaid Sub-Capitated Encounter: Original, Paid Claims",Y,2,Default,MCR12_156,MCR,12,156,156,,156,2
2089-
OT,157,MCR12.157,MCR-12-157-157,# of claim headers where the claim type indicates a sub-capitation payment (TYPE-OF-CLAIM = F),Count,"S-CHIP Sub-Capitated Encounter: Original, Paid Claims",Y,2,Default,MCR12_157,MCR,12,157,157,,157,2
2088+
OT,156,MCR12.156,MCR-12-156-156,# of claim headers where the claim type indicates a sub-capitation payment (TYPE-OF-CLAIM = 6),Count,"Medicaid Sub-Capitated Payment: Original, Paid Claims",Y,2,Default,MCR12_156,MCR,12,156,156,,156,2
2089+
OT,157,MCR12.157,MCR-12-157-157,# of claim headers where the claim type indicates a sub-capitation payment (TYPE-OF-CLAIM = F),Count,"S-CHIP Sub-Capitated Payment: Original, Paid Claims",Y,2,Default,MCR12_157,MCR,12,157,157,,157,2
20902090
OT,158,MCR12.158,MCR-12-158-158,# of claim headers indicating sub-capitated encounter records from sub-capitated entities that are not sub-capitated network providers (SOURCE-LOCATION = 22),Count,"Medicaid Encounter: Original, Paid Claims",Y,2,Default,MCR12_158,MCR,12,158,158,,158,2
20912091
OT,159,MCR12.159,MCR-12-159-159,# of claim headers indicating sub-capitated encounter records from sub-capitated entities that are not sub-capitated network providers (SOURCE-LOCATION = 22),Count,"S-CHIP Encounter: Original, Paid Claims",Y,2,Default,MCR12_159,MCR,12,159,159,,159,2
20922092
OT,160,MCR12.160,MCR-12-160-160,# of claim headers indicating sub-capitated encounter records from sub-capitated network providers (SOURCE-LOCATION = 23),Count,"Medicaid Encounter: Original, Paid Claims",Y,2,Default,MCR12_160,MCR,12,160,160,,160,2
20932093
OT,161,MCR12.161,MCR-12-161-161,# of claim headers indicating sub-capitated encounter records from sub-capitated network providers (SOURCE-LOCATION = 23),Count,"S-CHIP Encounter: Original, Paid Claims",Y,2,Default,MCR12_161,MCR,12,161,161,,161,2
2094-
OT,162,MCR12.162,MCR-12-162-162,# of claim headers where the source location indicates a sub-capitation payment (SOURCE-LOCATION = 20),Count,"Medicaid Sub-Capitated Encounter: Original, Paid Claims",Y,2,Default,MCR12_162,MCR,12,162,162,,162,2
2095-
OT,163,MCR12.163,MCR-12-163-163,# of claim headers where the source location indicates a sub-capitation payment (SOURCE-LOCATION = 20),Count,"S-CHIP Sub-Capitated Encounter: Original, Paid Claims",Y,2,Default,MCR12_163,MCR,12,163,163,,163,2
2094+
OT,162,MCR12.162,MCR-12-162-162,# of claim headers where the source location indicates a sub-capitation payment (SOURCE-LOCATION = 20),Count,"Medicaid Sub-Capitated Payment: Original, Paid Claims",Y,2,Default,MCR12_162,MCR,12,162,162,,162,2
2095+
OT,163,MCR12.163,MCR-12-163-163,# of claim headers where the source location indicates a sub-capitation payment (SOURCE-LOCATION = 20),Count,"S-CHIP Sub-Capitated Payment: Original, Paid Claims",Y,2,Default,MCR12_163,MCR,12,163,163,,163,2
20962096
IP,1,ALL37.1,ALL-37-001-1,Source Location,Frequency,All Paid Claims,Y,0,Frequency,ALL37_1,ALL,37,1,001,,001,0
20972097
LT,1,ALL38.1,ALL-38-001-1,Source Location,Frequency,All Paid Claims,Y,0,Frequency,ALL38_1,ALL,38,1,001,,001,0
20982098
OT,1,ALL39.1,ALL-39-001-1,Source Location,Frequency,All Paid Claims,Y,0,Frequency,ALL39_1,ALL,39,1,001,,001,0

dqm/cfg/thresholds.pkl

-4 Bytes
Binary file not shown.

dqm/cfg/zcc.pkl

-154 Bytes
Binary file not shown.

dqm/cfg/zipstate_lookup.pkl

-74 Bytes
Binary file not shown.

dqm/submodules/Runner_205.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def exp25_1(spark, dqm: DQMeasures, measure_id, x) :
179179
,coalesce(denom, 0) AS denom
180180
,CASE
181181
WHEN coalesce(denom, 0) <> 0
182-
THEN numer
182+
THEN numer/denom
183183
ELSE NULL
184184
END AS mvalue
185185
FROM (

dqm/submodules/Runner_802.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def claims_pct(spark, dqm: DQMeasures, measure_id, x) :
4242
else:
4343
sum = DQClosure.parse(f'%miss_misslogic({x["numer"]})')
4444

45-
if x['sub_cap_exclusion'] == "1":
45+
if x['sub_cap_exclusion'] == "1" or x['sub_cap_exclusion'] == 1 or x['sub_cap_exclusion'] == 1.0:
4646
subcap_filter = "and src_lctn_cd not in ('22','23')"
4747
else:
4848
subcap_filter = ""
@@ -75,7 +75,7 @@ def claims_pct(spark, dqm: DQMeasures, measure_id, x) :
7575
{header_filter})
7676
"""
7777
dqm.logger.debug(z)
78-
78+
#print(z)
7979
return spark.sql(z)
8080

8181
# --------------------------------------------------------------------

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="dqm",
8-
version="3.12.0",
8+
version="3.13.0",
99
author="Shinu Verghese",
1010
author_email="[email protected]",
1111
description="A package to calculate data quality measures on T-MSIS data using Databricks",

0 commit comments

Comments
 (0)