Pertinência de Insumos Hospitalares
Overview
Documentação base para a regra "Pertinência de Insumos Hospitalares".
Architecture
| Field |
Value |
| Name |
Pertinência de Insumos Hospitalares |
| Agent ID |
C026 |
| Version |
3 |
| Nature |
tech |
| Layer |
— |
Inheritance
ImproperSupply → BaseAgent → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.impropersupply import ImproperSupply
rule = ImproperSupply()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = ImproperSupply(
artifact_table=None,
evaluated=False,
evaluated=evaluated,
artifact_table=artifact_table,
artifact_loader=ArtifactLoader(self.logger),
)
| Column |
Type |
Description |
EVENT_COLUMNS.id |
- |
- |
EVENT_COLUMNS.id_fatura |
- |
- |
EVENT_COLUMNS.id_evento |
- |
- |
ARVO_COLUMNS.id_evento_predicted |
- |
- |
ARVO_COLUMNS.code_type |
- |
- |
ARVO_COLUMNS.code_type_predicted |
- |
- |
EVENT_COLUMNS.regime_atendimento |
- |
- |
EVENT_COLUMNS.categoria |
- |
- |
EVENT_COLUMNS.vl_pago |
- |
- |
EVENT_COLUMNS.qt_paga |
- |
- |
Glosa DataFrame Columns
| Column |
Description |
agent_id |
C026 |
version |
3 |
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.