cadrumo.domain.contribuyente.seguro_enfermedad_insured module

Count the people covered by the illness-insurance deduction.

The registry owns the dated statutory population, age boundary, disability threshold, and coverage-limb applicability. This module contains only the typed result and the eventual mechanical reconstruction boundary.

class SeguroEnfermedadInsuredCounts(**data)[source]

Bases: BaseModel

How many insured persons fall under each statutory limit.

Variables:
  • general – Persons carrying the ordinary limit.

  • discapacidad – Persons carrying the disability limit.

Parameters:

data (Any)

general: int
discapacidad: int
property total: int

Return how many insured persons were counted in all.

Returns:

The sum of both limbs.

count_seguro_enfermedad_insured(descendientes=(), *, filing_year, taxpayer_discapacidad_grado=None, spouse_discapacidad_grado=None, has_spouse=False, authority=None)[source]

Count the Art. 30.2.5.a insured persons, split by the limit each carries.

Parameters:
  • descendientes (Sequence[DescendantInfo]) – The typed descendant records supplied to the resolver.

  • filing_year (int) – The filing-period coordinate supplied to the resolver.

  • taxpayer_discapacidad_grado (int | None) – The contribuyente’s declared grado, if any.

  • spouse_discapacidad_grado (int | None) – The conyuge’s declared grado, if any.

  • has_spouse (bool) – The relationship-presence fact supplied to the resolver.

  • authority (GovernedFactSource | None) – Generation-pinned facts authority, or the enclosing scope.

Return type:

SeguroEnfermedadInsuredCounts

Returns:

The per-limb counts.

seguro_enfermedad_insured_counts_from_facts(fact_index, *, filing_year, authority=None)[source]

Count the Art. 30.2.5.a insured persons straight from stored profile facts.

Lives in the domain rather than in either application package because both of them need it and neither may import the other. It reads the descendants through descendant_list_from_facts(), the same reconstruction every other consumer of these facts uses, so there is one interpretation of the stored shape.

The registry-owned applicability map determines which stored relationship facts contribute to each coverage limb.

Parameters:
  • fact_index (Mapping[str, object]) – The stored profile facts.

  • filing_year (int) – Ejercicio whose year-end settles each child’s age.

  • authority (GovernedFactSource | None) – Generation-pinned facts authority, or the enclosing scope.

Return type:

SeguroEnfermedadInsuredCounts

Returns:

The per-limb counts.