hccinfhir 0.0.8__py3-none-any.whl → 0.0.9__py3-none-any.whl

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.
hccinfhir/datamodels.py CHANGED
@@ -90,6 +90,8 @@ class Demographics(BaseModel):
90
90
  class RAFResult(TypedDict):
91
91
  """Type definition for RAF calculation results"""
92
92
  risk_score: float
93
+ risk_score_demographics: float
94
+ risk_score_hcc: float
93
95
  hcc_list: List[str]
94
96
  cc_to_dx: Dict[str, Set[str]]
95
97
  coefficients: Dict[str, float]
@@ -76,11 +76,17 @@ def calculate_raf(diagnosis_codes: List[str],
76
76
  hcc_set = apply_hierarchies(hcc_set, model_name)
77
77
  interactions = apply_interactions(demographics, hcc_set, model_name)
78
78
  coefficients = apply_coefficients(demographics, hcc_set, interactions, model_name)
79
+
80
+ coefficients_demographics = apply_coefficients(demographics, set(), {}, model_name)
79
81
 
80
82
  risk_score = sum(coefficients.values())
83
+ risk_score_demographics = sum(coefficients_demographics.values())
84
+ risk_score_hcc = risk_score - risk_score_demographics
81
85
 
82
86
  return {
83
87
  'risk_score': risk_score,
88
+ 'risk_score_demographics': risk_score_demographics,
89
+ 'risk_score_hcc': risk_score_hcc,
84
90
  'hcc_list': list(hcc_set),
85
91
  'cc_to_dx': cc_to_dx,
86
92
  'coefficients': coefficients,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: hccinfhir
3
- Version: 0.0.8
3
+ Version: 0.0.9
4
4
  Summary: HCC Algorithm for FHIR Resources
5
5
  Project-URL: Homepage, https://github.com/mimilabs/hccinfhir
6
6
  Project-URL: Issues, https://github.com/mimilabs/hccinfhir/issues
@@ -1,11 +1,11 @@
1
1
  hccinfhir/__init__.py,sha256=OCyYCv4jTOlYHZbTw2DTks3e6_YT1N2JXAOuyR03KNE,43
2
- hccinfhir/datamodels.py,sha256=inagzG6NH1a6DBSThe0heAi-z3ocfrY39v7_kYi5Lk4,4876
2
+ hccinfhir/datamodels.py,sha256=_eJ2HVRECVJdA_lX11iRDCkyoWUICbTYAZ711Ra9-Wg,4937
3
3
  hccinfhir/extractor.py,sha256=-jHVCIJqFAqvrI9GxkkXZVDQjKDa-7vF7v3PGMGAMnA,1801
4
4
  hccinfhir/extractor_837.py,sha256=vkTBCd0WBaJoTrUd-Z-zCIaoLk7KV2n4AGqIORhONIk,7147
5
5
  hccinfhir/extractor_fhir.py,sha256=Rg_L0Vg5tz_L2VJ_jvZwWz6RMlPAkHwj4LiK-OWQvrQ,8458
6
6
  hccinfhir/filter.py,sha256=8uYThN0-AqwVAKyti29WGiFwQKDiremMhYd_m6QcXhM,2193
7
7
  hccinfhir/hccinfhir.py,sha256=DxTkqbgVXsOsvX1M_UXemb68UMfC8oVCGus2CYIAiTM,6837
8
- hccinfhir/model_calculate.py,sha256=6cjWMtayC9fBxhTCnbqSJSlctblYz4Mn9vQYDXx-Iu8,3725
8
+ hccinfhir/model_calculate.py,sha256=aCm6_jjyftGoit-P7tCQ5FYotDPlMxVNHwFhO5if3KE,4044
9
9
  hccinfhir/model_coefficients.py,sha256=UrDAEWBoqooSC8hy9YSUsLMmmfgIO0YGtVkui6ruOkE,5528
10
10
  hccinfhir/model_demographics.py,sha256=CMnD2-Au9Q6HNZrJUZqVVJRDEmSuK8ZpF39I22JkX8M,6564
11
11
  hccinfhir/model_dx_to_cc.py,sha256=jCFlnAOBkfI9FrCX6tZIh-Sp_DW0HwpY7QrPXGtwInI,1765
@@ -36,7 +36,7 @@ hccinfhir/samples/sample_eob_1.json,sha256=_NGSVR2ysFpx-DcTvyga6dFCzhQ8Vi9fNzQEM
36
36
  hccinfhir/samples/sample_eob_2.json,sha256=FcnJcx0ApOczxjJ_uxVLzCep9THfNf4xs9Yf7hxk8e4,1769
37
37
  hccinfhir/samples/sample_eob_200.ndjson,sha256=CxpjeQ1DCMUzZILaM68UEhfxO0p45YGhDDoCZeq8PxU,1917986
38
38
  hccinfhir/samples/sample_eob_3.json,sha256=4BW4wOMBEEU9RDfJR15rBEvk0KNHyuMEh3e055y87Hc,2306
39
- hccinfhir-0.0.8.dist-info/METADATA,sha256=DIj819iB_TXJHKZxlDqZyMVrruGDwbmdSm4cn2qSkbY,11567
40
- hccinfhir-0.0.8.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
41
- hccinfhir-0.0.8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
42
- hccinfhir-0.0.8.dist-info/RECORD,,
39
+ hccinfhir-0.0.9.dist-info/METADATA,sha256=DafI1RTHC6NfyAW7DcV26um2dXkxCmyrZDDjHaH4Pdw,11567
40
+ hccinfhir-0.0.9.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
41
+ hccinfhir-0.0.9.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
42
+ hccinfhir-0.0.9.dist-info/RECORD,,