mscore 26.1.2__tar.gz → 26.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mscore-26.1.2 → mscore-26.1.6}/PKG-INFO +171 -177
- {mscore-26.1.2 → mscore-26.1.6}/README.md +145 -151
- mscore-26.1.6/mscore/__init__.py +9 -0
- mscore-26.1.6/mscore/__init__.pye +27 -0
- mscore-26.1.6/mscore/data_variables/__init__.py +0 -0
- mscore-26.1.6/mscore/data_variables/__init__.pye +12 -0
- mscore-26.1.6/mscore/data_variables/hcc_descriptors.pye +1068 -0
- mscore-26.1.6/mscore/data_variables/hierarchies.pye +441 -0
- mscore-26.1.6/mscore/data_variables/variable_dict.pye +1986 -0
- mscore-26.1.6/mscore/demography_builder.pye +867 -0
- mscore-26.1.6/mscore/demography_vars_applicator.pye +413 -0
- mscore-26.1.6/mscore/endpoints.pye +80 -0
- mscore-26.1.6/mscore/file_handler.pye +774 -0
- mscore-26.1.6/mscore/hcc_handler.pye +467 -0
- mscore-26.1.6/mscore/ram_models.pye +528 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2221CW.TXT +9697 -9697
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2222CW.TXT +9719 -9719
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2223CW.TXT +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2224CW.TXT +9905 -9905
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2225CW.TXT +9979 -9979
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2226CW.TXT +9979 -9979
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2421CW.TXT +9856 -9856
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2422CW.TXT +9875 -9875
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2423CW.TXT +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2424CW.TXT +10137 -10137
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2425CW.TXT +10211 -10211
- mscore-26.1.6/mscore/reference_data/Crosswalks/F2825CW.TXT +8183 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2826CW.TXT +8183 -8183
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V222179O1.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V24.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V242186P1.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V222279O1.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V24.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V242286P1.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2023_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2023_CMS-HCC_V24.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V24.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V28.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V24.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V28.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2026_CMS-HCC_V22.csv +2 -2
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2026_CMS-HCC_V28.csv +2 -2
- mscore-26.1.6/mscore/reference_data/Model_Coefficients/2027_CMS-HCC_V28.csv +2 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/application_tables/application_format_fact.parquet +0 -0
- mscore-26.1.6/mscore/reference_data/application_tables/application_model_dimension.parquet +0 -0
- mscore-26.1.6/mscore/scoring_handler.pye +812 -0
- mscore-26.1.6/mscore/utilities/__init__.py +1 -0
- mscore-26.1.6/mscore/utilities/__init__.pye +13 -0
- mscore-26.1.6/mscore/utilities/authentication.pye +499 -0
- mscore-26.1.6/mscore/utilities/context.pye +220 -0
- mscore-26.1.6/mscore/utilities/data_models.pye +122 -0
- mscore-26.1.6/mscore/utilities/data_validation.pye +578 -0
- mscore-26.1.6/mscore/utilities/log_handler.pye +89 -0
- mscore-26.1.6/mscore/utilities/user_models.pye +42 -0
- mscore-26.1.6/mscore/version.pye +13 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/PKG-INFO +171 -177
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/SOURCES.txt +7 -5
- {mscore-26.1.2 → mscore-26.1.6}/pyproject.toml +55 -55
- {mscore-26.1.2 → mscore-26.1.6}/setup.cfg +4 -4
- mscore-26.1.2/mscore/__init__.pye +0 -62
- mscore-26.1.2/mscore/__main__.py +0 -5
- mscore-26.1.2/mscore/activate.pye +0 -112
- mscore-26.1.2/mscore/data_variables/__init__.pye +0 -7
- mscore-26.1.2/mscore/data_variables/hcc_descriptors.pye +0 -998
- mscore-26.1.2/mscore/data_variables/hierarchies.pye +0 -410
- mscore-26.1.2/mscore/data_variables/variable_dict.pye +0 -1858
- mscore-26.1.2/mscore/demography_builder.pye +0 -802
- mscore-26.1.2/mscore/demography_vars_applicator.pye +0 -383
- mscore-26.1.2/mscore/file_handler.pye +0 -722
- mscore-26.1.2/mscore/hcc_handler.pye +0 -434
- mscore-26.1.2/mscore/ram_models.pye +0 -491
- mscore-26.1.2/mscore/reference_data/application_tables/application_model_dimension.parquet +0 -0
- mscore-26.1.2/mscore/scoring_handler.pye +0 -757
- mscore-26.1.2/mscore/utilities/__init__.pye +0 -45
- mscore-26.1.2/mscore/utilities/authentication.pye +0 -460
- mscore-26.1.2/mscore/utilities/cli.pye +0 -314
- mscore-26.1.2/mscore/utilities/context.pye +0 -202
- mscore-26.1.2/mscore/utilities/data_models.pye +0 -110
- mscore-26.1.2/mscore/utilities/data_validation.pye +0 -538
- mscore-26.1.2/mscore/utilities/file_organizer.pye +0 -95
- mscore-26.1.2/mscore/utilities/licensing.pye +0 -404
- mscore-26.1.2/mscore/utilities/log_handler.pye +0 -78
- mscore-26.1.2/mscore/utilities/user_models.pye +0 -36
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2824CW.TXT +0 -0
- /mscore-26.1.2/mscore/reference_data/Crosswalks/F2825CW.TXT → /mscore-26.1.6/mscore/reference_data/Crosswalks/F2827CW.TXT +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/application_tables/application_model_coefficient.parquet +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/dependency_links.txt +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/entry_points.txt +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/requires.txt +0 -0
- {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/top_level.txt +0 -0
|
@@ -1,177 +1,171 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mscore
|
|
3
|
-
Version: 26.1.
|
|
4
|
-
Summary: MScore: Risk Scores Made Easy
|
|
5
|
-
Home-page: https://github.com/elevendatacorp/mscore.git
|
|
6
|
-
Author: RAM Development Team
|
|
7
|
-
Author-email: RAM Development Team <dev@riskadjustmentmodel.com>
|
|
8
|
-
Project-URL: Homepage, https://riskadjustmentmodel.com/mscore-product
|
|
9
|
-
Project-URL: Bug Tracker, https://github.com/elevendatacorp/mscore/issues
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.10
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
Requires-Dist: pandas
|
|
15
|
-
Requires-Dist: pyarrow
|
|
16
|
-
Requires-Dist: numpy
|
|
17
|
-
Requires-Dist: requests
|
|
18
|
-
Requires-Dist: getmac
|
|
19
|
-
Requires-Dist: cython
|
|
20
|
-
Requires-Dist: pydantic
|
|
21
|
-
Requires-Dist: cryptography
|
|
22
|
-
Requires-Dist: sourcedefender
|
|
23
|
-
Dynamic: author
|
|
24
|
-
Dynamic: home-page
|
|
25
|
-
|
|
26
|
-
<p align="center">
|
|
27
|
-
<a href="https://www.riskadjustmentmodel.com/" target="_blank">
|
|
28
|
-
<img src="https://ram-site-assets-pub.s3.us-east-1.amazonaws.com/images/mscore_registered_logo_updated_subtitle.png">
|
|
29
|
-
</a>
|
|
30
|
-
</p>
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
|
-
M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is a python package designed to streamline the CMS-HCC model risk score calculation process for health plans and providers participating in Medicare Advantage and value-based care. It provides a SAS®-free alternative to produce HCCs and risk scores. It streamlines your data processing for enhanced accessibility and allows you to keep your data secure in-house, so you can focus on execution of your risk adjustment strategy.
|
|
35
|
-
|
|
36
|
-
## Benefits
|
|
37
|
-
- **Implement Anywhere**: M<span style="font-size:.8em;">SCORE<sup>®</sup></span> unlocks multiple integration opportunities including real-time scoring, embedding in EHR or enterprise data warehouse, incorporating into cloud applications, and traditional batch scoring.
|
|
38
|
-
- **SAS<sup><span style="font-size:.8em;">®</span></sup>-Free**: Create HCC and risk scores without SAS<sup><span style="font-size:.8em;">®</span></sup> software, reduce software license costs and the headache of recoding and maintaining the software in another programming language.
|
|
39
|
-
- **Enhanced Output**: M<span style="font-size:.8em;">SCORE<sup>®</sup></span> provides the numeric relative factor value for each HCC assigned to a person allowing for a deeper understanding of how each factor contributes to an individual's overall risk score.
|
|
40
|
-
- **Reliable**: Validated on over 1 million plus enrollees. M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is rigorously tested and updated with each HCC model release.
|
|
41
|
-
- **CMS-HCC Model Support**: Supports HCC models V22 for payment years 2021-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* <code>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Please [subscribe](https://riskadjustmentmodel.com/articles#userEmail) to our newsletter, to receive updates on new M<span style="font-size:.8em;">SCORE<sup>®</sup></span> features, model releases, tutorials, and to stay up-to-date on the latest news in risk adjustment.
|
|
174
|
-
|
|
175
|
-
## Legal
|
|
176
|
-
|
|
177
|
-
To review the M<span style="font-size:.8em;">SCORE<sup>®</sup></span> license agreement, please visit [EULA](https://riskadjustmentmodel.com/legal/eula) webpage.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mscore
|
|
3
|
+
Version: 26.1.6
|
|
4
|
+
Summary: MScore: Risk Scores Made Easy
|
|
5
|
+
Home-page: https://github.com/elevendatacorp/mscore.git
|
|
6
|
+
Author: RAM Development Team
|
|
7
|
+
Author-email: RAM Development Team <dev@riskadjustmentmodel.com>
|
|
8
|
+
Project-URL: Homepage, https://riskadjustmentmodel.com/mscore-product
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/elevendatacorp/mscore/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: pyarrow
|
|
16
|
+
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: requests
|
|
18
|
+
Requires-Dist: getmac
|
|
19
|
+
Requires-Dist: cython
|
|
20
|
+
Requires-Dist: pydantic
|
|
21
|
+
Requires-Dist: cryptography
|
|
22
|
+
Requires-Dist: sourcedefender
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://www.riskadjustmentmodel.com/" target="_blank">
|
|
28
|
+
<img src="https://ram-site-assets-pub.s3.us-east-1.amazonaws.com/images/mscore_registered_logo_updated_subtitle.png">
|
|
29
|
+
</a>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is a python package designed to streamline the CMS-HCC model risk score calculation process for health plans and providers participating in Medicare Advantage and value-based care. It provides a SAS®-free alternative to produce HCCs and risk scores. It streamlines your data processing for enhanced accessibility and allows you to keep your data secure in-house, so you can focus on execution of your risk adjustment strategy.
|
|
35
|
+
|
|
36
|
+
## Benefits
|
|
37
|
+
- **Implement Anywhere**: M<span style="font-size:.8em;">SCORE<sup>®</sup></span> unlocks multiple integration opportunities including real-time scoring, embedding in EHR or enterprise data warehouse, incorporating into cloud applications, and traditional batch scoring.
|
|
38
|
+
- **SAS<sup><span style="font-size:.8em;">®</span></sup>-Free**: Create HCC and risk scores without SAS<sup><span style="font-size:.8em;">®</span></sup> software, reduce software license costs and the headache of recoding and maintaining the software in another programming language.
|
|
39
|
+
- **Enhanced Output**: M<span style="font-size:.8em;">SCORE<sup>®</sup></span> provides the numeric relative factor value for each HCC assigned to a person allowing for a deeper understanding of how each factor contributes to an individual's overall risk score.
|
|
40
|
+
- **Reliable**: Validated on over 1 million plus enrollees. M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is rigorously tested and updated with each HCC model release.
|
|
41
|
+
- **CMS-HCC Model Support**: Supports HCC models V22 for payment years 2021-2027(Proposed), V24 for payment years 2021 - 2026, and V28 for payment years 2024 - 2027(Proposed), with upgrades for each release from CMS (Initial, Mid-Year, Final).
|
|
42
|
+
|
|
43
|
+
- **<span style="color:orange">_NOTE:_</span>** 2027 Proposed is set with an 'as of' date in year 2025
|
|
44
|
+
|
|
45
|
+
- **Easy to Set Up & Maintain**: Easily installed and upgraded using pip, Python's standard package manager.
|
|
46
|
+
- **Platform Compatibility**: Compatible with Windows, Mac, and Linux operating systems.
|
|
47
|
+
- **Optimized Performance**: Efficient processing with fast runtimes, ensuring quick and accurate risk score calculations.
|
|
48
|
+
- **Improved Data Security**: Securely process personal health information within your organization's IT infrastructure.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
pip install mscore
|
|
54
|
+
|
|
55
|
+
## Registration
|
|
56
|
+
|
|
57
|
+
Registration is required to use the <code>mscore</code> package. Please visit https://riskadjustmentmodel.com/registration to create user account and obtain a license key.
|
|
58
|
+
|
|
59
|
+
> **<span style="color:orange">_NOTE:_</span>** Your 30-day free trial begins upon account registration.
|
|
60
|
+
|
|
61
|
+
## Subscribe
|
|
62
|
+
|
|
63
|
+
To use M<span style="font-size:.8em;">SCORE<sup>®</sup></span> beyond the 30-day trial period, please see our licensing and pricing section on <a href="https://riskadjustmentmodel.com/" taget="_blank">riskadjustmentmodel.com</a>. Please <a href="https://riskadjustmentmodel.com/contact-us" taget="_blank">contact us</a> for assistance if you have questions about licensing.
|
|
64
|
+
|
|
65
|
+
## Basic Use
|
|
66
|
+
|
|
67
|
+
Before you can run your scores, you will need to generate an authorization token object.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
import sourcedefender #This package is required at the top
|
|
71
|
+
from mscore import AuthorizeLicense, MScore
|
|
72
|
+
|
|
73
|
+
auth = AuthorizeLicense(staging_key).validate()
|
|
74
|
+
```
|
|
75
|
+
> **<span style="color:orange">_NOTE:_</span>** You must import sourcedefender at the top of every package that imports MScore.
|
|
76
|
+
|
|
77
|
+
The <code>mscore</code> class requires 7 arguments in order to run with 1 optional argument.
|
|
78
|
+
|
|
79
|
+
### Required
|
|
80
|
+
* <code>authorizer</code> - The authorization token obtained when <code>AuthorizeLicense</code> is ran
|
|
81
|
+
* <code>year</code>
|
|
82
|
+
* <code>version</code>
|
|
83
|
+
* <code>model</code>
|
|
84
|
+
* <code>person_data</code> (Pandas DataFrame, csv, or parquet file)
|
|
85
|
+
* <code>diag_data</code> (Pandas DataFrame, csv, or parquet file)
|
|
86
|
+
* <code>columns</code>
|
|
87
|
+
|
|
88
|
+
**_NOTE:_** The example below assumes you already have a [Pandas](https://pandas.pydata.org/) DataFrame generated for your person and diagnosis datasets.
|
|
89
|
+
If you don't have this data yet and want to test <code>mscore</code>, download our synthetic data files here:
|
|
90
|
+
* [Person File](https://mph-static-site.s3.amazonaws.com/static/tutorial-files/person.csv)
|
|
91
|
+
* [Diagnosis File](https://mph-static-site.s3.amazonaws.com/static/tutorial-files/diag.csv)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
import sourcedefender
|
|
96
|
+
import pandas as pd
|
|
97
|
+
from mscore import AuthorizeLicense, MScore
|
|
98
|
+
|
|
99
|
+
# Generate DataFrames if using our test files
|
|
100
|
+
person_df = pd.read_csv('person.csv')
|
|
101
|
+
diag_df = pd.read_csv('diag.csv')
|
|
102
|
+
|
|
103
|
+
auth = AuthorizeLicense(staging_key).validate()
|
|
104
|
+
|
|
105
|
+
model = MScore(
|
|
106
|
+
authorizer = auth,
|
|
107
|
+
year = '2026',
|
|
108
|
+
version = 'V28',
|
|
109
|
+
model = 'CMS-HCC',
|
|
110
|
+
person_data = person_df,
|
|
111
|
+
diag_data = diag_df,
|
|
112
|
+
columns = 'all-fields',
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
scores = model.score_mscore()
|
|
116
|
+
|
|
117
|
+
risk_scores = scores.risk_scores
|
|
118
|
+
```
|
|
119
|
+
The resulting 'scores' output is a data model object of pandas.DataFrames. You can access your risk scores or relative factors data sets by calling the respective model name from the grouped data model.
|
|
120
|
+
- <span style="font-family:courier-new">scores.risk_scores</span>
|
|
121
|
+
- <span style="font-family:courier-new">scores.relative_factors</span>
|
|
122
|
+
|
|
123
|
+
From here you can proceed to use the risk score or relative factor DataFrames for further downstream processing or utilize the [Pandas](https://pandas.pydata.org/docs/user_guide/index.html) built-in methods to save to a file type of your choosing.
|
|
124
|
+
|
|
125
|
+
### Features
|
|
126
|
+
#### relative_factors (attribute)
|
|
127
|
+
MScore offers the ability to view the relative factors for each person run through M<span style="font-size:.8em;">SCORE<sup>®</sup></span>. To access this data, you simply access the <code>relative_factors</code> attribute of the <code>mscore</code> output. The relative factors are the individual contributions (from the variables in the model) to the risk score. M<span style="font-size:.8em;">SCORE's<sup>®</sup></span> <code>relative_factors</code> output contains these values with 1 row per person scored, and each relative factor in the output as the columns.
|
|
128
|
+
|
|
129
|
+
To leverage this feature, you would do the following:
|
|
130
|
+
```python
|
|
131
|
+
relative_factors = scores.relative_factors
|
|
132
|
+
```
|
|
133
|
+
#### get_disease_scores (method)
|
|
134
|
+
For users wanting to compute the disease contribution to a person's risk score, you can do this in MScore by using the <code>get_disease_score</code> method of <code>mscore</code>. After instantiating your <code>mscore</code> object, you can use <code>get_disease_score</code> and pass the <code>mscore</code> output as a parameter. This will create a new dataframe containing only the portion of the risk score that comes from disease factors. Alternatively, if you would like this data appended to your MScore risk score output, you can use <code>join_scores</code> parameter to do this. NOTE: Disease interactions with DISABLED variables are not included in the disease score.
|
|
135
|
+
|
|
136
|
+
You can use the <code>get_disease_score</code> method as here:
|
|
137
|
+
```python
|
|
138
|
+
disease_scores = model.get_disease_scores(scores)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Or using the <code>join_scores</code> parameter:
|
|
142
|
+
```python
|
|
143
|
+
disease_scores = model.get_disease_scores(scores, join_scores=True)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Supported Data
|
|
147
|
+
The <code>mscore</code> class attributes, <code>person_data</code> and <code>diag_data</code>, will accept a Pandas.DataFrame object, CSV or Parquet filepath directly without the need to load your input data to DataFrame first. The resulting outputs will be a Pandas DataFrame object.
|
|
148
|
+
|
|
149
|
+
### Supported Environments
|
|
150
|
+
|
|
151
|
+
M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is designed to be universally compatible, ensuring seamless integration across various platforms.
|
|
152
|
+
|
|
153
|
+
- Operating Systems: Windows, macOS, Linux
|
|
154
|
+
- Python Versions: 3.10 or greater (both 32-bit and 64-bit architectures)
|
|
155
|
+
|
|
156
|
+
If your required environment is not listed, please contact us as support@riskadjustmentmodel.com for an alternate solution.
|
|
157
|
+
|
|
158
|
+
## User Resources
|
|
159
|
+
For a more in-depth dive into all available model options, arguments, and reference documents, visit our [User Guides](https://riskadjustmentmodel.com/resources/user-guides).
|
|
160
|
+
|
|
161
|
+
## Support
|
|
162
|
+
|
|
163
|
+
We are experts in Risk Adjustment and we're here to help. Whether it's general questions, billing, or integration support, please [contact us](https://riskadjustmentmodel.com/contact-us)📧. We are here to make risk scoring easy.
|
|
164
|
+
|
|
165
|
+
## Stay Connected
|
|
166
|
+
|
|
167
|
+
Please [subscribe](https://riskadjustmentmodel.com/articles#userEmail) to our newsletter, to receive updates on new M<span style="font-size:.8em;">SCORE<sup>®</sup></span> features, model releases, tutorials, and to stay up-to-date on the latest news in risk adjustment.
|
|
168
|
+
|
|
169
|
+
## Legal
|
|
170
|
+
|
|
171
|
+
To review the M<span style="font-size:.8em;">SCORE<sup>®</sup></span> license agreement, please visit [EULA](https://riskadjustmentmodel.com/legal/eula) webpage.
|