Skip to content

Records

cms_icd.models.Release dataclass

Release(fiscal_year: int, release_date: date)

A CMS ICD release selector.

Parameters:

Name Type Description Default
fiscal_year int

CMS fiscal year.

required
release_date date

Date on which this revision became effective.

required

cms_icd.models.Node dataclass

Node(id: str, name: str, description: str = '', parent_id: str = '', children_ids: tuple[str, ...] = (), assignable: bool = False, min: str = '', max: str = '', notes: tuple[str, ...] = (), includes: tuple[str, ...] = (), inclusion_term: tuple[str, ...] = (), excludes1: tuple[str, ...] = (), excludes2: tuple[str, ...] = (), use_additional_code: tuple[str, ...] = (), code_first: tuple[str, ...] = (), code_also: tuple[str, ...] = ())

A node in an ICD tabular hierarchy.

cms_icd.models.Code dataclass

Code(id: str, name: str, description: str = '', parent_id: str = '', children_ids: tuple[str, ...] = (), assignable: bool = True, min: str = '', max: str = '', notes: tuple[str, ...] = (), includes: tuple[str, ...] = (), inclusion_term: tuple[str, ...] = (), excludes1: tuple[str, ...] = (), excludes2: tuple[str, ...] = (), use_additional_code: tuple[str, ...] = (), code_first: tuple[str, ...] = (), code_also: tuple[str, ...] = (), etiology: bool = False, manifestation: bool = False)

An ICD code or non-assignable code-category node.

cms_icd.models.Term dataclass

Term(id: str, title: str, parent_id: str = '', children_ids: tuple[str, ...] = (), path: str = '', code: str | None = None, manifestation_code: str | None = None, assignable: bool = False, see: str | None = None, see_also: str | None = None, source: str = '', optional_modifiers: tuple[str, ...] = ())

A term in an ICD alphabetic index.

main_term_id property

main_term_id: str

Return the identifier of this term's top-level main term.

cms_icd.models.Guideline dataclass

Guideline(id: str, number: str, title: str, content: str)

A coding-guideline section.

cms_icd.models.InstructionalNote dataclass

InstructionalNote(name: str, assignable: bool, notes: tuple[str, ...] = (), includes: tuple[str, ...] = (), inclusion_term: tuple[str, ...] = (), excludes1: tuple[str, ...] = (), excludes2: tuple[str, ...] = (), use_additional_code: tuple[str, ...] = (), code_first: tuple[str, ...] = (), code_also: tuple[str, ...] = ())

Instructional notes associated with a tabular node.

is_empty

is_empty() -> bool

Return whether the record contains no instructional content.

Examples:

>>> note = InstructionalNote("I10", True, includes=("high blood pressure",))
>>> note.to_dict()["includes"]
['high blood pressure']
Source code in src/cms_icd/models.py
def is_empty(self) -> bool:
    """Return whether the record contains no instructional content.

    Examples:
        >>> note = InstructionalNote("I10", True, includes=("high blood pressure",))
        >>> note.to_dict()["includes"]
        ['high blood pressure']
    """
    return not any(
        getattr(self, field.name)
        for field in fields(self)
        if field.name not in {"name", "assignable"}
    )

cms_icd.models.ICDMappingStatus

Whether a best-effort ICD-9 mapping produced a usable ICD-10 result.

cms_icd.models.ICDMappingReason

Deterministic reason for a best-effort ICD-9 mapping resolution.

cms_icd.models.ICDCMMappingResolution dataclass

ICDCMMappingResolution(source_code: str, target_codes: tuple[str, ...], status: ICDMappingStatus, reason: ICDMappingReason, approximate: bool, gem_provenance: GEMProvenance | None = None)

Best-effort ICD-9-CM diagnosis resolution for one source code.

cms_icd.models.ICDPCSMappingResolution dataclass

ICDPCSMappingResolution(source_code: str, target_patterns: tuple[str, ...], status: ICDMappingStatus, reason: ICDMappingReason, approximate: bool, gem_provenance: GEMProvenance | None = None)

Best-effort ICD-9-CM procedure resolution for one source code.

A ? in a target pattern marks an ICD-10-PCS axis on which the official alternatives disagree.