Conformidade taxas Intercâmbio
Overview
Implements the rule for validating the compliance of interchange room fee payments in UNIMED interchange. Agent id: I003 This agent evaluates interchange claims to ensure compliance with the UNIMED rules for room fee payments in the context of interchange (intercâmbio) medical billing, using a reference artifact containing the list of covered procedures and their validity periods. It flags and annotates items that are not in accordance with the interchange rules. The artifact is loaded from the parameters informed in the artifacts parameter by the user. There are three types of rules for the artifact: - REGIONAL: when the provider is inside the zone of abrangency of the partner. - FEDERATIVO: when the provider is from the same state of the partner but outside its zone of abrangency. - NACIONAL: when the provider is from a different state of the partner. For each rule type, a specific artifact is expected. For now, only NACIONAL rules are supported. See details below. In UNIMED interchange, the correct room fee is determined by the indicator_anestesico (from A to Z), that needs to be converted to the porte_anestesico following the mapping available in the MAME artifact (ARTIFACTS.mame_map_anesthetic_size_to_indicator). The mapping is resolved by joining the indicator artifact with the MAME artifact on indicador_anestesico, considering overlapping validity dates.
Architecture
| Field | Value |
|---|---|
| Name | Conformidade taxas Intercâmbio |
| Agent ID | I003 |
| Version | 1 |
| Nature | tech |
| Layer | — |
Inheritance
InterchangeFeeRoomPaymentRule → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_artifacts
- prepare_data
- rule_assessment
Business Rules
Adequação da cobrança
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.interchangefeeroompaymentrule import InterchangeFeeRoomPaymentRule
rule = InterchangeFeeRoomPaymentRule()
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 |
- | - |
EVENT_COLUMNS.id_fatura |
- | - |
EVENT_COLUMNS.dt_atendimento |
- | - |
EVENT_COLUMNS.evento |
- | - |
EVENT_COLUMNS.codigo_tuss |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
EVENT_COLUMNS.pacote |
- | - |
EVENT_COLUMNS.guia |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.qt_info |
- | - |
EVENT_COLUMNS.vl_unitario_pago |
- | - |
EVENT_COLUMNS.categoria |
- | - |
EVENT_COLUMNS.subcategoria |
- | - |
EVENT_COLUMNS.regime_atendimento |
- | - |
EVENT_COLUMNS.tipo_atendimento |
- | - |
EVENT_COLUMNS.id_operadora |
- | - |
ARVO_COLUMNS.partner_id |
- | - |
PROVIDER_COLUMNS.cbo |
- | - |
PROVIDER_COLUMNS.id_prestador |
- | - |
AUTHORIZATION_COLUMNS.qt_autorizada |
- | - |
EVENT_COLUMNS.tipo_intercambio |
- | - |
EVENT_COLUMNS.regra_intercambio |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
I003 |
version |
1 |
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.