Elegibilidade de Beneficiário
Overview
T005 — Elegibilidade de Beneficiário. Sub-rules (first match wins): A cpf_invalido → ANS 1206 B benef_nao_encontrado → ANS 5163 C desligamento → ANS 1006 D suspenso → ANS 1016 E inadimplencia → ANS 1009
Architecture
| Field | Value |
|---|---|
| Name | Elegibilidade de Beneficiário |
| Agent ID | T005 |
| Version | 0.0.0 |
| Nature | adm |
| Layer | — |
Inheritance
BeneficiaryEligibilityRule → EligibilityRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Conformidade contrato
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.beneficiaryeligibilityrule import BeneficiaryEligibilityRule
rule = BeneficiaryEligibilityRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
Sem parâmetros configuráveis identificados.
Input Requirements
| Column | Type | Description |
|---|---|---|
EVENT_COLUMNS.id |
- | - |
EVENT_COLUMNS.id_fatura |
- | - |
EVENT_COLUMNS.id_evento |
- | - |
ARVO_COLUMNS.id_evento_predicted |
- | - |
EVENT_COLUMNS.dt_atendimento |
- | - |
BENEFICIARY_COLUMNS.id_matricula |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.regime_atendimento |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
T005 |
version |
0.0.0 |
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.