Pertinência de equipo Safeflow em Pronto-Socorro (Petro)
Overview
Deny valved infusion sets (Safeflow/Safeset) on Petro emergency department claims. Identifies Safeflow, Safeset, and Polifix valvulado materials via taxonomy regex matching and flags them for full glosa when billed under regime_atendimento = PRONTO_SOCORRO for partner petro. Agent ID: AI010
Architecture
| Field |
Value |
| Name |
Pertinência de equipo Safeflow em Pronto-Socorro (Petro) |
| Agent ID |
AI010 |
| Version |
0.0.0 |
| Nature |
tech |
| Layer |
— |
Inheritance
PertinentSafeflowEquipoPetroRule → PertinenceRule → BaseAgent
Core Functionality
- load_artifacts
- prepare_data
- rule_assessment
Business Rules
Pertinência da cobrança
Constantes:
REGEX_POSITIVE = re.compile(
REGEX_NEGATIVE = re.compile(
MOTIVO_GLOSA_ARVO_TEMPLATE = (
Usage
from agents.pertinentsafeflowequipopetrorule import PertinentSafeflowEquipoPetroRule
rule = PertinentSafeflowEquipoPetroRule()
violations_df = rule.rule_assessment(claims_df)
Configuration
rule = PertinentSafeflowEquipoPetroRule(
evaluated=True,
evaluated=evaluated,
artifact_loader=ArtifactLoader(self.logger),
_target_keys=set(),
DataFrame=pd.DataFrame(),
raw_taxonomy=self.artifact_loader.load_taxonomy(familia_tax_1=["MATERIAL"]),
taxonomy=raw_taxonomy[[EVENT_COLUMNS.id_evento,
subset=[EVENT_COLUMNS.id_evento,
)
| Column |
Type |
Description |
EVENT_COLUMNS.id |
- |
- |
EVENT_COLUMNS.id_fatura |
- |
- |
EVENT_COLUMNS.id_evento |
- |
- |
EVENT_COLUMNS.evento |
- |
- |
EVENT_COLUMNS.vl_pago |
- |
- |
EVENT_COLUMNS.qt_paga |
- |
- |
EVENT_COLUMNS.categoria |
- |
- |
EVENT_COLUMNS.regime_atendimento |
- |
- |
ARVO_COLUMNS.id_evento_predicted |
- |
- |
ARVO_COLUMNS.code_type_predicted |
- |
- |
ARVO_COLUMNS.partner_id |
- |
- |
Glosa DataFrame Columns
| Column |
Description |
agent_id |
AI010 |
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.