ArvoAgentHub

Glosa conector valvulado por Safeflow (Petro)

Overview

Deny valved connectors on Petro ambulatorial invoices containing Safeflow. The Polifix Safeflow is an extension set with an integrated valve. Billing a standalone valved connector (Bionector, Microclave, etc.) on the same ambulatorial invoice constitutes material duplication — the connector's function is already provided by the Safeflow device. The agent loads a curated artifact that classifies items into two categories: - CONECTOR VALVULADO: target items (to be denied) - SAFEFLOW: conditioning items (their presence triggers the rule) Agent ID: AI017

Architecture

Field Value
Name Glosa conector valvulado por Safeflow (Petro)
Agent ID AI017
Version 0.0.0
Nature tech
Layer

Inheritance

ConectorValvuladoSafeflowPetroRule → PertinenceRule → BaseAgent

Core Functionality

  1. load_artifacts
  2. prepare_data
  3. rule_assessment

Business Rules

Pertinência da cobrança

Constantes:

  • ARTIFACT_CATEGORY_CONECTOR = "CONECTOR VALVULADO"
  • ARTIFACT_CATEGORY_SAFEFLOW = "SAFEFLOW"
  • MOTIVO_GLOSA_ANS = "2002 — Material sem cobertura para atendimento ambulatorial"
  • MOTIVO_GLOSA_ARVO_TEMPLATE = (

Usage

from agents.conectorvalvuladosafeflowpetrorule import ConectorValvuladoSafeflowPetroRule

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

Configuration

rule = ConectorValvuladoSafeflowPetroRule(
    evaluated=True,
    evaluated=evaluated,
    artifact_loader=ArtifactLoader(self.logger),
    _conector_valvulado_keys=set(),
    _safeflow_keys=set(),
    status== 'Ativado'`` are retained. Items are then split,
    artifact_raw=self.artifact_loader.load_artifact(,
    artifact_name=ARTIFACTS.conector_valvulado_safeflow_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 - -
ARVO_COLUMNS.id_evento_predicted - -
ARVO_COLUMNS.code_type_predicted - -
ARVO_COLUMNS.partner_id - -

Output Format

Glosa DataFrame Columns

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