Pertinência de Procedimentos
Overview
Validation agent for exam pertinence based on patient age range. This agent verifies if requested exams are pertinent for the patient's age range according to current guidelines. It identifies cases where the beneficiary's age is incompatible with the requested procedure, generating glosas when the patient's actual age is outside the allowed limits for the exam.
Architecture
| Field | Value |
|---|---|
| Name | Pertinência de Procedimentos |
| Agent ID | C067 |
| Version | 0.0.0 |
| Nature | tech |
| Layer | — |
Inheritance
PertinentProcAgeRule → BaseAgent → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Pertinência da cobrança
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.pertinentprocagerule import PertinentProcAgeRule
rule = PertinentProcAgeRule()
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_fatura |
- | - |
EVENT_COLUMNS.id_evento |
- | - |
EVENT_COLUMNS.evento |
- | - |
ARVO_COLUMNS.id_evento_predicted |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
BENEFICIARY_COLUMNS.idade |
- | - |
EVENT_COLUMNS.dt_atendimento |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
C067 |
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.