Adequação ao Rol de Procedimentos Médicos UNIMED
Overview
Implements the rule for UNIMED Interchange claims. Agent id: I001 This agent evaluates interchange claims to ensure compliance with the UNIMED Interchange Rol, 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.
Architecture
| Field | Value |
|---|---|
| Name | Adequação ao Rol de Procedimentos Médicos UNIMED |
| Agent ID | I001 |
| Version | 1 |
| Nature | adm |
| Layer | — |
Inheritance
InterchangeRolUNIMEDProceduresRule → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Conformidade da cobrança
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.interchangerolunimedproceduresrule import InterchangeRolUNIMEDProceduresRule
rule = InterchangeRolUNIMEDProceduresRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
Sem parâmetros configuráveis identificados.
Input Requirements
| Column | Type | Description |
|---|---|---|
EVENT_COLUMNS.id_evento |
- | - |
EVENT_COLUMNS.evento |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.tipo_atendimento |
- | - |
EVENT_COLUMNS.id_fatura |
- | - |
EVENT_COLUMNS.id |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
EVENT_COLUMNS.dt_atendimento |
- | - |
BENEFICIARY_COLUMNS.id_matricula |
- | - |
EVENT_COLUMNS.tipo_intercambio |
- | - |
EVENT_COLUMNS.autorizacao_principal |
- | - |
EVENT_COLUMNS.autorizacao |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
I001 |
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.