Dia de atendimento não-útil (domingos e/ou feriados)
Overview
Return only cases where there two or more appoitment days by dt_aviso e.g. dt_atendimento = 16/05 and 17/05 and the same dt_aviso)
Architecture
| Field | Value |
|---|---|
| Name | Dia de atendimento não-útil (domingos e/ou feriados) |
| Agent ID | R026 |
| Version | 1.0 |
| Nature | tech |
| Layer | — |
Inheritance
NonWorkingDayRule → BaseRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- to_str_lst_days
- rule_assessment
Business Rules
Comportamento indevido
Consultar código-fonte para regras de negócio detalhadas.
Usage
from agents.nonworkingdayrule import NonWorkingDayRule
rule = NonWorkingDayRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = NonWorkingDayRule(
historical_base=None,
with_numero_conselho=False,
with_cbo=False,
with_cpf=False,
logger=logger,
)
Input Requirements
Consultar expected_input_columns no código-fonte.
Output Format
Glosa DataFrame Columns
| Column | Description |
|---|---|
agent_id |
R026 |
version |
1.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.