ArvoAgentHub

Quantidade SADT

Overview

SADTAbuseRule agent_id = C014 (inpatient invoices) and C015 (ambulatory invoices). A rule-based class for detecting anomalies in medical billing related to SADT (Serviço Auxiliar de Diagnóstico e Terapia) procedures. This class processes artifacts, evaluates data, and identifies discrepancies in the quantity and value of billed procedures.

Este agente é usado com os seguintes IDs:

  • C014: Quantidade excessiva SADT internação
  • C015: Quantidade excessiva SADT ambulatorial

Architecture

Field Value
Name Quantidade SADT
Agent ID C014, C015
Version 13
Nature tech
Layer

Inheritance

SADTAbuseRule → BaseRule → BaseAgent

Core Functionality

  1. load_artifacts
  2. artifacts_tolerance
  3. prepare_data
  4. rule_assessment
  5. motivo_glosa_arvo
  6. consitency_checks

Business Rules

Pertinência da cobrança

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

Usage

from agents.sadtabuserule import SADTAbuseRule

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

Configuration

Sem parâmetros configuráveis identificados.

Input Requirements

Column Type Description
EVENT_COLUMNS.id_evento - -
ARVO_COLUMNS.id_evento_predicted - -
EVENT_COLUMNS.codigo_tuss - -
EVENT_COLUMNS.id - -
EVENT_COLUMNS.id_fatura - -
EVENT_COLUMNS.qt_info - -
EVENT_COLUMNS.qt_paga - -
EVENT_COLUMNS.vl_pago - -
EVENT_COLUMNS.pacote - -
EVENT_COLUMNS.guia - -
EVENT_COLUMNS.evento - -
EVENT_COLUMNS.regime_atendimento - -
EVENT_COLUMNS.dt_atendimento - -
EVENT_COLUMNS.categoria - -
EVENT_COLUMNS.subcategoria - -
EVENT_COLUMNS.vl_unitario_pago - -
ARVO_COLUMNS.tempo_internacao - -
ARVO_COLUMNS.tempo_internacao_uti - -

Output Format

Glosa DataFrame Columns

Column Description
agent_id C014, C015
version 13
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.