hccinfhir 0.0.7__tar.gz → 0.0.8__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 (43) hide show
  1. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/PKG-INFO +1 -1
  2. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/datamodels.py +3 -3
  3. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_demographics.py +3 -3
  4. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/pyproject.toml +1 -1
  5. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/.gitignore +0 -0
  6. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/LICENSE +0 -0
  7. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/README.md +0 -0
  8. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/__init__.py +0 -0
  9. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/__init__.py +0 -0
  10. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_coefficients_2025.csv +0 -0
  11. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_dx_to_cc_2025.csv +0 -0
  12. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_eligible_cpt_hcpcs_2023.csv +0 -0
  13. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_eligible_cpt_hcpcs_2024.csv +0 -0
  14. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_eligible_cpt_hcpcs_2025.csv +0 -0
  15. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/data/ra_hierarchies_2025.csv +0 -0
  16. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/extractor.py +0 -0
  17. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/extractor_837.py +0 -0
  18. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/extractor_fhir.py +0 -0
  19. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/filter.py +0 -0
  20. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/hccinfhir.py +0 -0
  21. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_calculate.py +0 -0
  22. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_coefficients.py +0 -0
  23. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_dx_to_cc.py +0 -0
  24. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_hierarchies.py +0 -0
  25. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/model_interactions.py +0 -0
  26. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/__init__.py +0 -0
  27. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_0.txt +0 -0
  28. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_1.txt +0 -0
  29. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_10.txt +0 -0
  30. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_11.txt +0 -0
  31. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_2.txt +0 -0
  32. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_3.txt +0 -0
  33. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_4.txt +0 -0
  34. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_5.txt +0 -0
  35. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_6.txt +0 -0
  36. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_7.txt +0 -0
  37. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_8.txt +0 -0
  38. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_837_9.txt +0 -0
  39. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_eob_1.json +0 -0
  40. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_eob_2.json +0 -0
  41. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_eob_200.ndjson +0 -0
  42. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/samples/sample_eob_3.json +0 -0
  43. {hccinfhir-0.0.7 → hccinfhir-0.0.8}/hccinfhir/utils.py +0 -0
@@ -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
@@ -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'
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "hccinfhir"
7
- version = "0.0.7"
7
+ version = "0.0.8"
8
8
  authors = [
9
9
  { name="Yubin Park", email="yubin.park@mimilabs.ai" },
10
10
  ]
File without changes
File without changes
File without changes
File without changes
File without changes