hccinfhir 0.0.7__py3-none-any.whl → 0.0.8__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
@@ -69,9 +69,9 @@ class Demographics(BaseModel):
69
69
  """
70
70
  age: Union[int, float] = Field(..., description="[required] Beneficiary age")
71
71
  sex: Literal['M', 'F', '1', '2'] = Field(..., description="[required] Beneficiary sex")
72
- dual_elgbl_cd: Optional[Literal[None, 'NA', '99', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10']] = Field('NA', description="Dual status code")
73
- orec: Optional[Literal[None, '0', '1', '2', '3']] = Field('0', description="Original reason for entitlement")
74
- crec: Optional[Literal[None, '0', '1', '2', '3']] = Field('0', description="Current reason for entitlement")
72
+ dual_elgbl_cd: Optional[Literal[None, '', 'NA', '99', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10']] = Field('NA', description="Dual status code")
73
+ orec: Optional[Literal[None, '', '0', '1', '2', '3']] = Field('', description="Original reason for entitlement")
74
+ crec: Optional[Literal[None, '', '0', '1', '2', '3']] = Field('', description="Current reason for entitlement")
75
75
  new_enrollee: Optional[bool] = Field(False, description="True if beneficiary is a new enrollee")
76
76
  snp: Optional[bool] = Field(False, description="True if beneficiary is in SNP")
77
77
  version: Optional[str] = Field("V2", description="Version of categorization used (V2, V4, V6)")
@@ -120,9 +120,9 @@ def categorize_demographics(age: Union[int, float],
120
120
 
121
121
  # V2/V4 Logic (Medicare Population)
122
122
  elif version in ('V2', 'V4'):
123
- if orec is None:
124
- raise ValueError("OREC is required for V2/V4 categorization")
125
-
123
+ if orec is None or orec == '':
124
+ orec = '0' # Default to 0 if OREC is None
125
+
126
126
  # New enrollee logic
127
127
  if new_enrollee:
128
128
  prefix = 'NEF' if std_sex == '2' else 'NEM'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: hccinfhir
3
- Version: 0.0.7
3
+ Version: 0.0.8
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,5 +1,5 @@
1
1
  hccinfhir/__init__.py,sha256=OCyYCv4jTOlYHZbTw2DTks3e6_YT1N2JXAOuyR03KNE,43
2
- hccinfhir/datamodels.py,sha256=FtClk2wsBREqIHLGWyw95BKuOllLG1QcRNATNnn2F0Q,4866
2
+ hccinfhir/datamodels.py,sha256=inagzG6NH1a6DBSThe0heAi-z3ocfrY39v7_kYi5Lk4,4876
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
@@ -7,7 +7,7 @@ hccinfhir/filter.py,sha256=8uYThN0-AqwVAKyti29WGiFwQKDiremMhYd_m6QcXhM,2193
7
7
  hccinfhir/hccinfhir.py,sha256=DxTkqbgVXsOsvX1M_UXemb68UMfC8oVCGus2CYIAiTM,6837
8
8
  hccinfhir/model_calculate.py,sha256=6cjWMtayC9fBxhTCnbqSJSlctblYz4Mn9vQYDXx-Iu8,3725
9
9
  hccinfhir/model_coefficients.py,sha256=UrDAEWBoqooSC8hy9YSUsLMmmfgIO0YGtVkui6ruOkE,5528
10
- hccinfhir/model_demographics.py,sha256=LZLlPQOtxPh3Md6q9xwztQ9PwrUo_gloNCYSa2bDirY,6578
10
+ hccinfhir/model_demographics.py,sha256=CMnD2-Au9Q6HNZrJUZqVVJRDEmSuK8ZpF39I22JkX8M,6564
11
11
  hccinfhir/model_dx_to_cc.py,sha256=jCFlnAOBkfI9FrCX6tZIh-Sp_DW0HwpY7QrPXGtwInI,1765
12
12
  hccinfhir/model_hierarchies.py,sha256=e8QtSayTrfPv2wh149FjK7ToiEmU1ISYMA1Pi38iVk0,2700
13
13
  hccinfhir/model_interactions.py,sha256=ZLiKJepPjPkYceKDf7dLXoYE0p44I7t9y2sTOlrxojo,20264
@@ -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.7.dist-info/METADATA,sha256=3AbiIBOeD4WiqcbXeqERiCi4D2m2DiE0qpnBrV51Io8,11567
40
- hccinfhir-0.0.7.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
41
- hccinfhir-0.0.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
42
- hccinfhir-0.0.7.dist-info/RECORD,,
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,,