Cobrança em guia incompatível
Overview
Agent to deny payment of material and medicament charges in incompatible claim form (SP/SADT). Agent designed for Saúde Petrobras. To work properly, it is necessary to have information of tipo_despesa. This agent works on SP/SADT claim form, where it is not allowed to charge material and medicament charges directly. For this type of items, the charges should be declared in other costs. For a SP/SADT claim form, items with empty tipo_despesa are supposed to be SADT procedures. If mat/med charges are found in this type of claim form with empty tipo_despesa, they should be denied. Mat/med charges with filled tipo_despesa ('2 - Medicamento', '3 - Material' or '8 - OPME') are correct. It is associated one agent ID: - C061 for material and medicament charges in incorrect claim form
Architecture
| Field | Value |
|---|---|
| Name | Cobrança em guia incompatível |
| Agent ID | C061 |
| Version | 0.0.0 |
| Nature | amd |
| Layer | — |
Inheritance
IncorrectClaimFormRule → BaseAgent → BaseAgent
Core Functionality
- load_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.incorrectclaimformrule import IncorrectClaimFormRule
rule = IncorrectClaimFormRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
Sem parâmetros configuráveis identificados.
Input Requirements
| Column | Type | Description |
|---|---|---|
ARVO_COLUMNS.id_evento_predicted |
- | - |
EVENT_COLUMNS.id_evento |
- | - |
EVENT_COLUMNS.evento |
- | - |
EVENT_COLUMNS.categoria |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.id_fatura |
- | - |
EVENT_COLUMNS.id |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
EVENT_COLUMNS.tipo_despesa |
- | - |
EVENT_COLUMNS.tipo_guia |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
C061 |
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.