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.
Files changed (94) hide show
  1. {mscore-26.1.2 → mscore-26.1.6}/PKG-INFO +171 -177
  2. {mscore-26.1.2 → mscore-26.1.6}/README.md +145 -151
  3. mscore-26.1.6/mscore/__init__.py +9 -0
  4. mscore-26.1.6/mscore/__init__.pye +27 -0
  5. mscore-26.1.6/mscore/data_variables/__init__.py +0 -0
  6. mscore-26.1.6/mscore/data_variables/__init__.pye +12 -0
  7. mscore-26.1.6/mscore/data_variables/hcc_descriptors.pye +1068 -0
  8. mscore-26.1.6/mscore/data_variables/hierarchies.pye +441 -0
  9. mscore-26.1.6/mscore/data_variables/variable_dict.pye +1986 -0
  10. mscore-26.1.6/mscore/demography_builder.pye +867 -0
  11. mscore-26.1.6/mscore/demography_vars_applicator.pye +413 -0
  12. mscore-26.1.6/mscore/endpoints.pye +80 -0
  13. mscore-26.1.6/mscore/file_handler.pye +774 -0
  14. mscore-26.1.6/mscore/hcc_handler.pye +467 -0
  15. mscore-26.1.6/mscore/ram_models.pye +528 -0
  16. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2221CW.TXT +9697 -9697
  17. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2222CW.TXT +9719 -9719
  18. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2223CW.TXT +0 -0
  19. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2224CW.TXT +9905 -9905
  20. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2225CW.TXT +9979 -9979
  21. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2226CW.TXT +9979 -9979
  22. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2421CW.TXT +9856 -9856
  23. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2422CW.TXT +9875 -9875
  24. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2423CW.TXT +0 -0
  25. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2424CW.TXT +10137 -10137
  26. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2425CW.TXT +10211 -10211
  27. mscore-26.1.6/mscore/reference_data/Crosswalks/F2825CW.TXT +8183 -0
  28. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2826CW.TXT +8183 -8183
  29. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V22.csv +2 -2
  30. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V222179O1.csv +2 -2
  31. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V24.csv +2 -2
  32. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2021_CMS-HCC_V242186P1.csv +2 -2
  33. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V22.csv +2 -2
  34. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V222279O1.csv +2 -2
  35. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V24.csv +2 -2
  36. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2022_CMS-HCC_V242286P1.csv +2 -2
  37. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2023_CMS-HCC_V22.csv +2 -2
  38. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2023_CMS-HCC_V24.csv +2 -2
  39. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V22.csv +2 -2
  40. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V24.csv +2 -2
  41. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2024_CMS-HCC_V28.csv +2 -2
  42. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V22.csv +2 -2
  43. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V24.csv +2 -2
  44. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2025_CMS-HCC_V28.csv +2 -2
  45. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2026_CMS-HCC_V22.csv +2 -2
  46. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Model_Coefficients/2026_CMS-HCC_V28.csv +2 -2
  47. mscore-26.1.6/mscore/reference_data/Model_Coefficients/2027_CMS-HCC_V28.csv +2 -0
  48. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/application_tables/application_format_fact.parquet +0 -0
  49. mscore-26.1.6/mscore/reference_data/application_tables/application_model_dimension.parquet +0 -0
  50. mscore-26.1.6/mscore/scoring_handler.pye +812 -0
  51. mscore-26.1.6/mscore/utilities/__init__.py +1 -0
  52. mscore-26.1.6/mscore/utilities/__init__.pye +13 -0
  53. mscore-26.1.6/mscore/utilities/authentication.pye +499 -0
  54. mscore-26.1.6/mscore/utilities/context.pye +220 -0
  55. mscore-26.1.6/mscore/utilities/data_models.pye +122 -0
  56. mscore-26.1.6/mscore/utilities/data_validation.pye +578 -0
  57. mscore-26.1.6/mscore/utilities/log_handler.pye +89 -0
  58. mscore-26.1.6/mscore/utilities/user_models.pye +42 -0
  59. mscore-26.1.6/mscore/version.pye +13 -0
  60. {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/PKG-INFO +171 -177
  61. {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/SOURCES.txt +7 -5
  62. {mscore-26.1.2 → mscore-26.1.6}/pyproject.toml +55 -55
  63. {mscore-26.1.2 → mscore-26.1.6}/setup.cfg +4 -4
  64. mscore-26.1.2/mscore/__init__.pye +0 -62
  65. mscore-26.1.2/mscore/__main__.py +0 -5
  66. mscore-26.1.2/mscore/activate.pye +0 -112
  67. mscore-26.1.2/mscore/data_variables/__init__.pye +0 -7
  68. mscore-26.1.2/mscore/data_variables/hcc_descriptors.pye +0 -998
  69. mscore-26.1.2/mscore/data_variables/hierarchies.pye +0 -410
  70. mscore-26.1.2/mscore/data_variables/variable_dict.pye +0 -1858
  71. mscore-26.1.2/mscore/demography_builder.pye +0 -802
  72. mscore-26.1.2/mscore/demography_vars_applicator.pye +0 -383
  73. mscore-26.1.2/mscore/file_handler.pye +0 -722
  74. mscore-26.1.2/mscore/hcc_handler.pye +0 -434
  75. mscore-26.1.2/mscore/ram_models.pye +0 -491
  76. mscore-26.1.2/mscore/reference_data/application_tables/application_model_dimension.parquet +0 -0
  77. mscore-26.1.2/mscore/scoring_handler.pye +0 -757
  78. mscore-26.1.2/mscore/utilities/__init__.pye +0 -45
  79. mscore-26.1.2/mscore/utilities/authentication.pye +0 -460
  80. mscore-26.1.2/mscore/utilities/cli.pye +0 -314
  81. mscore-26.1.2/mscore/utilities/context.pye +0 -202
  82. mscore-26.1.2/mscore/utilities/data_models.pye +0 -110
  83. mscore-26.1.2/mscore/utilities/data_validation.pye +0 -538
  84. mscore-26.1.2/mscore/utilities/file_organizer.pye +0 -95
  85. mscore-26.1.2/mscore/utilities/licensing.pye +0 -404
  86. mscore-26.1.2/mscore/utilities/log_handler.pye +0 -78
  87. mscore-26.1.2/mscore/utilities/user_models.pye +0 -36
  88. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/Crosswalks/F2824CW.TXT +0 -0
  89. /mscore-26.1.2/mscore/reference_data/Crosswalks/F2825CW.TXT → /mscore-26.1.6/mscore/reference_data/Crosswalks/F2827CW.TXT +0 -0
  90. {mscore-26.1.2 → mscore-26.1.6}/mscore/reference_data/application_tables/application_model_coefficient.parquet +0 -0
  91. {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/dependency_links.txt +0 -0
  92. {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/entry_points.txt +0 -0
  93. {mscore-26.1.2 → mscore-26.1.6}/mscore.egg-info/requires.txt +0 -0
  94. {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.2
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;">&reg;</span></sup>-Free**: Create HCC and risk scores without SAS<sup><span style="font-size:.8em;">&reg;</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-2026, V24 for payment years 2021 - 2025, and V28 for payment years 2024 - 2026, with upgrades for each release from CMS (Initial, Mid-Year, Final).
42
- - **Easy to Set Up & Maintain**: Easily installed and upgraded using pip, Python's standard package manager.
43
- - **Platform Compatibility**: Compatible with Windows, Mac, and Linux operating systems.
44
- - **Optimized Performance**: Efficient processing with fast runtimes, ensuring quick and accurate risk score calculations.
45
- - **Improved Data Security**: Securely process personal health information within your organization's IT infrastructure.
46
-
47
-
48
- ## Installation
49
-
50
- pip install mscore
51
-
52
- ## Registration
53
-
54
- 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.
55
-
56
- ## Trial License
57
-
58
- After you've installed <code>mscore</code>, run the following command to activate your free 30-day trial. An internet connection is required to activate & run the package.
59
-
60
- mscore -a <license key>
61
-
62
- ## Subscribe
63
-
64
- To use M<span style="font-size:.8em;">SCORE<sup>®</sup></span> for internal business operations beyond the 30-day trial period, a pay-as-you-go subscription and payment method is needed. Please set up your payment method in our [customer portal](https://riskadjustmentmodel.com/account/login/) on the billing tab. To license M<span style="font-size:.8em;">SCORE<sup>®</sup></span> for commercial purposes other than internal business operations, please [contact us](https://riskadjustmentmodel.com/contact-us) directly for alternative licensing.
65
-
66
- For more information on pricing, please see our product page. If you do not see a price you like, then please email us so we can discuss your requirements.
67
-
68
- Academic users are eligible for a free license of our software. Please [contact us](https://riskadjustmentmodel.com/contact-us) to obtain your complimentary academic license.
69
-
70
-
71
- ## Basic Use
72
-
73
- Before you can run your scores, you will need to generate an authorization token object.
74
-
75
- ```python
76
- import sourcedefender #This package is required at the top
77
- from mscore import AuthorizeLicense, MScore
78
-
79
- auth = AuthorizeLicense(staging_key).validate()
80
- ```
81
- > **<span style="color:orange">_NOTE:_</span>** You must import sourcedefender at the top of every package that imports MScore.
82
-
83
- The <code>mscore</code> class requires 7 arguments in order to run with 1 optional argument.
84
-
85
- ### Required
86
- * <code>authorizer</code> - The authorization token obtained when <code>AuthorizeLicense</code> is ran
87
- * <code>year</code>
88
- * <code>version</code>
89
- * <code>model</code>
90
- * <code>person_data</code> (Pandas DataFrame, csv, or parquet file)
91
- * <code>diag_data</code> (Pandas DataFrame, csv, or parquet file)
92
- * <code>columns</code>
93
-
94
- **_NOTE:_** The example below assumes you already have a [Pandas](https://pandas.pydata.org/) DataFrame generated for your person and diagnosis datasets.
95
- If you don't have this data yet and want to test <code>mscore</code>, download our synthetic data files here:
96
- * [Person File](https://mph-static-site.s3.amazonaws.com/static/tutorial-files/person.csv)
97
- * [Diagnosis File](https://mph-static-site.s3.amazonaws.com/static/tutorial-files/diag.csv)
98
-
99
-
100
- ```python
101
- import sourcedefender
102
- import pandas as pd
103
- from mscore import AuthorizeLicense, MScore
104
-
105
- # Generate DataFrames if using our test files
106
- person_df = pd.read_csv('person.csv')
107
- diag_df = pd.read_csv('diag.csv')
108
-
109
- auth = AuthorizeLicense(staging_key).validate()
110
-
111
- model = MScore(
112
- authorizer = auth,
113
- year = '2026',
114
- version = 'V28',
115
- model = 'CMS-HCC',
116
- person_data = person_df,
117
- diag_data = diag_df,
118
- columns = 'all-fields',
119
- )
120
-
121
- scores = model.score_mscore()
122
-
123
- risk_scores = scores.risk_scores
124
- ```
125
- 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.
126
- - <span style="font-family:courier-new">scores.risk_scores</span>
127
- - <span style="font-family:courier-new">scores.relative_factors</span>
128
-
129
- 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.
130
-
131
- ### Features
132
- #### relative_factors (attribute)
133
- 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.
134
-
135
- To leverage this feature, you would do the following:
136
- ```python
137
- relative_factors = scores.relative_factors
138
- ```
139
- #### get_disease_scores (method)
140
- 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.
141
-
142
- You can use the <code>get_disease_score</code> method as here:
143
- ```python
144
- disease_scores = model.get_disease_scores(scores)
145
- ```
146
-
147
- Or using the <code>join_scores</code> parameter:
148
- ```python
149
- disease_scores = model.get_disease_scores(scores, join_scores=True)
150
- ```
151
-
152
- ### Supported Data
153
- 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.
154
-
155
- ### Supported Environments
156
-
157
- M<span style="font-size:.8em;">SCORE<sup>®</sup></span> is designed to be universally compatible, ensuring seamless integration across various platforms.
158
-
159
- - Operating Systems: Windows, macOS, Linux
160
- - Python Versions: 3.10 or greater (both 32-bit and 64-bit architectures)
161
-
162
- If your required environment is not listed, please contact us as support@riskadjustmentmodel.com for an alternate solution.
163
-
164
- ## User Resources
165
- 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).
166
-
167
- ## Support
168
-
169
- 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.
170
-
171
- ## Stay Connected
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;">&reg;</span></sup>-Free**: Create HCC and risk scores without SAS<sup><span style="font-size:.8em;">&reg;</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.