Medicamento valor a maior
Overview
Rule to check if medication prices exceed agreed upon values. This rule validates if the unit price charged for specific medications is higher than the contractually agreed price. If the price is higher, it flags the claim for denial and calculates the excess amount to be denied.
Architecture
| Field | Value |
|---|---|
| Name | Medicamento valor a maior |
| Agent ID | A001 |
| Version | 1 |
| Nature | adm |
| Layer | — |
Inheritance
AberttaMedicationRule → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Conformidade
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.aberttamedicationrule import AberttaMedicationRule
rule = AberttaMedicationRule()
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 |
- | - |
EVENT_COLUMNS.evento |
- | - |
EVENT_COLUMNS.vl_pago |
- | - |
EVENT_COLUMNS.vl_unitario_pago |
- | - |
EVENT_COLUMNS.qt_paga |
- | - |
BENEFICIARY_COLUMNS.id_matricula |
- | - |
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
A001 |
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.