Data da solicitação expirada ou inconsistente
Overview
Rule to identify claims with expired or inconsistent notice dates. This class checks if the time between service date and notice date is within acceptable limits and flags claims where the notice date is either too far in the future or before the service date.
Architecture
| Field | Value |
|---|---|
| Name | Data da solicitação expirada ou inconsistente |
| Agent ID | R001 |
| Version | 1 |
| Nature | audit |
| Layer | — |
Inheritance
NoticeDateReimbursement → 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.noticedatereimbursement import NoticeDateReimbursement
rule = NoticeDateReimbursement()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = NoticeDateReimbursement(
max_days_since_event=365,
Logger=logger) -> None:,
)
Input Requirements
Consultar expected_input_columns no código-fonte.
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
R001 |
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.