Conformidade taxas
Overview
Documentação base para a regra "Conformidade taxas".
Este agente é usado com os seguintes IDs:
- C002: Conformidade taxas de sala
- C034: Quantidade excessiva de taxas
- C041: Pertinência de taxas
Architecture
| Field | Value |
|---|---|
| Name | Conformidade taxas |
| Agent ID | C002, C034, C041 |
| Version | 8 |
| Nature | tech |
| Layer | — |
Inheritance
FeePaymentRuleN → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- artifacts_tolerance
- prepare_filter
- prepare_artifacts
- prepare_agg
- prepare_data
- rule_assessment
- improper
- abusive
- excessive
Business Rules
Adequação da cobrança
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.feepaymentrulen import FeePaymentRuleN
rule = FeePaymentRuleN()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = FeePaymentRuleN(
tolerance=1,
logger=logger,
pack_base=None,
)
Input Requirements
| Column | Type | Description |
|---|---|---|
EVENT_COLUMNS.id |
- | - |
EVENT_COLUMNS.id_evento |
- | - |
EVENT_COLUMNS.id_fatura |
- | - |
EVENT_COLUMNS.dt_atendimento |
- | - |
EVENT_COLUMNS.evento |
- | - |
EVENT_COLUMNS.codigo_tuss |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
EVENT_COLUMNS.pacote |
- | - |
EVENT_COLUMNS.guia |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.qt_info |
- | - |
EVENT_COLUMNS.vl_unitario_pago |
- | - |
EVENT_COLUMNS.subcategoria |
- | - |
EVENT_COLUMNS.regime_atendimento |
- | - |
EVENT_COLUMNS.tipo_atendimento |
- | - |
EVENT_COLUMNS.id_operadora |
- | - |
PROVIDER_COLUMNS.cbo |
- | - |
PROVIDER_COLUMNS.id_prestador |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
C002, C034, C041 |
version |
8 |
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.