ArvoAgentHub

Sobreposição de Equipo PVC Free (Imunoterápicos)

Overview

Rule to deny redundant PVC-free equipo on Petrobras ambulatorial invoices. Evaluates invoices that contain all three elements: a target immunotherapy medication, a filter equipo, and a PVC-free equipo. When all three coexist, the PVC-free equipo is flagged for full glosa as a non-required secondary material. Agent ID: AI007

Architecture

Field Value
Name Sobreposição de Equipo PVC Free (Imunoterápicos)
Agent ID AI007
Version 0.0.0
Nature tech
Layer

Inheritance

EquipoPvcFreeImmunotherapyRule → BaseAgent → BaseAgent

Core Functionality

  1. load_artifacts
  2. prepare_data
  3. rule_assessment

Business Rules

Pertinência da cobrança

Constantes:

  • MOTIVO_GLOSA_ARVO_TEMPLATE = (
  • FILTRO_IN_DESCRIPTION = re.compile(r"filtro", re.IGNORECASE)

Usage

from agents.equipopvcfreeimmunotherapyrule import EquipoPvcFreeImmunotherapyRule

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

Configuration

rule = EquipoPvcFreeImmunotherapyRule(
    evaluated=True,
    evaluated=evaluated,
    artifact_loader=ArtifactLoader(self.logger),
    _med_keys=set(),
    _filtro_keys=set(),
    _pvc_keys=set(),
    status== 'Ativado'``,
    art=self.artifact_loader.load_artifact(artifact_name=ARTIFACTS.pertinent_material_pvcfree_petro),
)

Input Requirements

Column Type Description
EVENT_COLUMNS.id - -
EVENT_COLUMNS.id_fatura - -
EVENT_COLUMNS.id_evento - -
EVENT_COLUMNS.evento - -
EVENT_COLUMNS.vl_pago - -
EVENT_COLUMNS.qt_paga - -
EVENT_COLUMNS.regime_atendimento - -
EVENT_COLUMNS.categoria - -
ARVO_COLUMNS.id_evento_predicted - -
ARVO_COLUMNS.code_type_predicted - -
ARVO_COLUMNS.partner_id - -

Output Format

Glosa DataFrame Columns

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