Sobreposição de taxas
Overview
Documentação base para a regra "Sobreposição de taxas".
Architecture
| Field |
Value |
| Name |
Sobreposição de taxas |
| Agent ID |
C018 |
| Version |
4 |
| Nature |
tech |
| Layer |
— |
Inheritance
FeeSuperpositionRule → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Pertinência da cobrança
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.feesuperpositionrule import FeeSuperpositionRule
rule = FeeSuperpositionRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = FeeSuperpositionRule(
min_vl=0,
logger=logger,
pack_base=None,
evaluated=False,
origin="Contas",
)
| Column |
Type |
Description |
EVENT_COLUMNS.id_fatura |
- |
- |
EVENT_COLUMNS.dt_atendimento |
- |
- |
EVENT_COLUMNS.id_evento |
- |
- |
EVENT_COLUMNS.vl_pago |
- |
- |
PROVIDER_COLUMNS.id_prestador |
- |
- |
EVENT_COLUMNS.vl_unitario_pago |
- |
- |
EVENT_COLUMNS.qt_paga |
- |
- |
EVENT_COLUMNS.id |
- |
- |
Glosa DataFrame Columns
| Column |
Description |
agent_id |
C018 |
version |
4 |
id_arvo |
Original record ID |
vl_glosa_arvo |
Glosa value |
qt_glosa_arvo |
Glosa quantity |
score_arvo |
Confidence score |
motivo_glosa_arvo |
Detailed reason in Portuguese |
motivo_glosa_ANS |
ANS standard code |
data_dict |
JSON metadata with calculation details |
Error Handling
- DataFrames vazios retornam estrutura vazia com colunas obrigatórias.
- Colunas ausentes geram warning mas não causam crash.
- Conversões numéricas usam
errors="coerce" para evitar falhas.