ArvoAgentHub

Pedido Médico Vencido

Overview

Denies claims where the procedure date exceeds the authorization's explicit expiry. Only items with a documented dt_validade are evaluated — claims flow answers "was the authorization still valid when the service was performed?". Items without dt_validade are excluded (cannot be audited without a documented expiry). MATERIAL / MEDICAMENTO / TAXA / TAXAS / PACOTE are excluded — no own validity.

Architecture

Field Value
Name Pedido Médico Vencido
Agent ID T006
Version 0.0.0
Nature adm
Layer

Inheritance

ExpiredMedicalOrderRule → BaseAgent → BaseAgent

Core Functionality

  1. load_artifacts
  2. prepare_data
  3. rule_assessment

Business Rules

Conformidade da cobrança

Consultar código-fonte para regras de negócio detalhadas.

Usage

from agents.expiredmedicalorderrule import ExpiredMedicalOrderRule

rule = ExpiredMedicalOrderRule()
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_evento - -
ARVO_COLUMNS.id_evento_predicted - -
ARVO_COLUMNS.code_type_predicted - -
EVENT_COLUMNS.vl_pago - -
EVENT_COLUMNS.qt_paga - -
EVENT_COLUMNS.dt_atendimento - -
EVENT_COLUMNS.categoria - -
AUTHORIZATION_COLUMNS.dt_validade - -

Output Format

Glosa DataFrame Columns

Column Description
agent_id T006
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.