ArvoAgentHub

Pertinência de materiais

Overview

Consolidated rule for evaluating material pertinence in ambulatory settings. This rule analyzes healthcare claims to determine if materials used in ambulatory procedures are clinically appropriate and justified. It identifies cases where expensive materials are used in outpatient settings where they may not be necessary or covered by insurance. Key Features: - Consolidated filtering (ambulatory regime + positive values) - Integrated patient history and classification processing - Unified pertinence rule application with inline evaluation logic - Classifies patients by medical condition (renal, oncology, neonatal) - Maintains full compatibility with original rule functionality Architecture Benefits: - Consolidated methods for better performance - Reduced code complexity and abstractions - Improved maintainability through inline logic - High testability with focused responsibilities Agent ID: C057 (Material Pertinence)

Architecture

Field Value
Name Pertinência de materiais
Agent ID C057
Version 2.0
Nature tech
Layer

Inheritance

PertinentAmbulatoryRule → BaseRule → BaseAgent

Core Functionality

  1. load_artifacts
  2. prepare_data
  3. rule_assessment

Business Rules

Pertinência da cobrança

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

Usage

from agents.pertinentambulatoryrule import PertinentAmbulatoryRule

rule = PertinentAmbulatoryRule()
violations_df = rule.rule_assessment(claims_df)

Configuration

Sem parâmetros configuráveis identificados.

Input Requirements

Column Type Description
ARVO_COLUMNS.code_type_predicted - -
ARVO_COLUMNS.id_evento_predicted - -
EVENT_COLUMNS.regime_atendimento - -
EVENT_COLUMNS.id_evento - -
EVENT_COLUMNS.evento - -
EVENT_COLUMNS.vl_pago - -
EVENT_COLUMNS.id_fatura - -
EVENT_COLUMNS.id - -
EVENT_COLUMNS.qt_paga - -
EVENT_COLUMNS.categoria - -
ARVO_COLUMNS.code_type - -
EVENT_COLUMNS.subcategoria - -
BENEFICIARY_COLUMNS.idade - -
ARVO_COLUMNS.proced_cir_inv_agg - -
ARVO_COLUMNS.tempo_internacao_uti - -
BENEFICIARY_COLUMNS.id_matricula - -

Output Format

Glosa DataFrame Columns

Column Description
agent_id C057
version 2.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.