Introdução


Contexto

O documento a seguir detalha o passo a passo da apuração da Variação da Despesa Assistencial (VDA) do ano de 2021 sobre o ano de 2020. Espera-se que esse documento possa auxiliar o público a replicar o cálculo da VDA 2021 e acompanhar a evolução da mesma ao longo do ano.

A VDA é um dos principais componentes do cálculo do Índice de Reajuste de Planos Individuais (IRPI), que estabelece o teto máximo para o reajuste anual por variação de custos das mensalidades dos planos de saúde de contratação individual ou familiar. A metodologia de cálculo do IRPI e da própria VDA foi estabelecida pela RN nº 441/2018 e está detalhada no Espaço do Consumidor no site da ANS.

A VDA expressa a variação da despesa assistencial média por beneficiário dos contratos dos planos individuais de cobertura médico-hospitalar regulamentados pela Lei nº 9.656, de 1998. A VDA, para fins do cálculo do IRPI, tem como base as despesas assistenciais incorridas de janeiro a dezembro e a média de beneficiários ao longo dos 12 meses de janeiro a dezembro nos dois anos imediatamente anteriores ao ano de divulgação do índice de reajuste.

A medida de tendência central do setor de saúde suplementar é a média da VDA das operadoras ponderada pelo número de beneficiários do período mais recente, conforme consignada no Anexo II da Resolução Normativa - RN nº 441, de 19 de dezembro de 2018. A fórmula para o cálculo da média ponderada da VDA das operadoras do setor em determinado ano é:

\[VDA_{p} = \sum_{i=1}^{n} \left[\left(\displaystyle\frac{\frac{DA_{p}}{Ben_{p}}}{\frac{DA_{p-1}}{Ben_{p-1}}} - 1\right) \times Ben_{p}\right]\div\sum_{i=1}^{n} Ben_{p}\]

Onde:
i = Operadora na base de cálculo
n = Todas as operadoras na base de cálculo
p = Período de janeiro a dezembro do ano calendário anterior ao início da aplicação do IRPI
DA = Despesa assistencial em carteira própria acumulada ao fim do período
Ben = Média mensal de beneficiários em carteira própria ao longo do período


Três conjuntos de dados do setor de saúde suplementar foram utilizados para extrair informações de despesa assistencial, quantidade de beneficiários com vínculos ativos e características das operadoras de planos de saúde. Esses conjuntos de dados podem ser acessadas pelo portal de dados abertos da Agência Nacional de Saúde Suplementar (ANS). Os links específicos para cada base utilizada neste cálculo estão disponíveis na respectiva seção de “Limpeza e Tratamento de Dados”.


Setup

Desenvolvido em R versão 4.1.3 e RStudio 2022.02.0 Build 443 for Windows

# Setup (bibliotecas, funções e variáveis globais) =============================
library(data.table)
library(tidyverse)
library(dtplyr)
library(lubridate)

# "Desliga" notação científica. 
options(scipen=999)

# função para exclusão de valores extremos por boxplot 1.5xIQR
trim.df <- function(df, metrica){
  df |> filter((metrica > quantile(metrica, 0.25) - 1.5 * IQR(metrica)) 
                & (metrica < quantile(metrica, 0.75) + 1.5 * IQR(metrica)))
}

# função para gerar resumo de estatísticas descritivas
statsVDA <- function(df){
  df |> 
    summarise(n_ops = n_distinct(cd_ops),
              benef = sum(benefm),
              mediaP = weighted.mean(vda, w = benefm),
              min = min(vda),
              q1 = quantile(vda, p = .25, names = F),
              median = median(vda),
              q3 = quantile(vda, p = .75, names = F),
              max = max(vda),
              dp = sd(vda),
              media = mean(vda),
              .groups = 'drop') |>
    mutate(across( c(mediaP:media), ~ round(.x, 2) ))
}

# período de análise
(periodo <- c(make_date(2020,01,01), make_date(2021,12,01)))

Limpeza e tratamento dos dados


Operadoras

As características das operadoras são obtidas do Sistema de Cadastro de Operadoras (CADOP).

Dois conjuntos de dados estão disponíveis no Portal de Dados Abertos da ANS (https://dados.gov.br/organization/agencia-nacional-de-saude-suplementar-ans):

Esses conjuntos de dados incluem características como o razão social, modalidade da operadora, assim como as datas de início (data do registro da operadora junto à ANS) e fim de operação (data do cancelamento do registro).

O código a seguir faz a leitura dos arquivos *.csv:

cadop <- fread(paste0("http://ftp.dadosabertos.ans.gov.br/FTP/PDA/",
                      "operadoras_de_plano_de_saude_ativas/",
                      "Relatorio_cadop.csv")) |>
  lazy_dt() |>
  mutate(Data_Descredenciamento = "", Motivo_do_Descredenciamento = "") |>
  mutate(across(everything(), ~as.character(.))) |>
  as_tibble() |>
  rbind(
    fread(paste0("http://ftp.dadosabertos.ans.gov.br/FTP/PDA/",
                 "operadoras_de_plano_de_saude_canceladas/",
                 "Relatorio_cadop_canceladas.csv")) |>
      lazy_dt() |>
      mutate(across(everything(), ~as.character(.))) |>
      as_tibble()
  ) |>  
  rename_with(tolower) |> 
  mutate(
    dt_registro = dmy(data_registro_ans), 
    dt_cancelamento = dmy(data_descredenciamento),
    modalidade = if_else(modalidade == 'Seguradora Especializada em Saúde', 'Seguradora',
                         modalidade),
    cd_ops = as.integer(registro_ans),
    # remove tab e quebra de linha:
    razao_social = str_replace_all(str_trim(razao_social), "[\r\n]", " ") 
  ) |> 
  select(cd_ops, razao_social, modalidade, dt_registro, dt_cancelamento) |>
  as_tibble() 


Para o cálculo da VDA no IRPI selecionam-se as operadoras médico-hospitalares e são desconsideradas

  1. Operadoras que iniciaram operação entre janeiro de 2020 e dezembro de 2021.
  2. Operadoras que tiveram registro cancelado até dezembro de 2021.
  3. Operadoras com ressalvas nas demonstrações financeiras protocoladas junto à ANS referentes a 2020 ou 2021.

O código a seguir filtra operadoras médico-hospitalares e identifica operadoras a serem desconsideradas na base de cálculo da VDA:

ressalvas <- fread("_datasets/ressalvas.csv", encoding = 'UTF-8') |> 
  distinct(cd_ops) |> 
  mutate(lg_ressalva = 1L) |> 
  as_tibble()

cadop <- cadop |> 
  # apenas operadoras médico-hospitalares
  filter(modalidade %in% c('Autogestão', 'Cooperativa Médica', 'Filantropia',
                           'Medicina de Grupo', 'Seguradora')) |>  
  # marca operadoras em fim de operação e/ou início de operação
  mutate(lg_cancelada = if_else(year(dt_cancelamento) <= year(periodo[2]) & !is.na(dt_cancelamento),1L,
                                0L), 
         lg_nova_ops  = if_else(year(dt_registro) >= year(periodo[1]),1L, 
                                0L)) |> 
  select(cd_ops, razao_social, modalidade, lg_cancelada, lg_nova_ops) |>
  left_join(ressalvas, by = 'cd_ops') |> 
  mutate(lg_ressalva = if_else(is.na(lg_ressalva), 0L, lg_ressalva))

remove(ressalvas)


Despesa Assistencial

As informações das despesas incorridas na prestação de assistência médico-hospitalar são extraídas das Demonstrações Contábeis informadas pelas operadoras no Documento de Informações Periódicas das Operadoras de Planos de Assistência à Saúde (DIOPS). O prazo de envio das informações ao DIOPS se encerra em 31 de março.

As demonstrações financeiras publicadas seguem os critérios do Plano de Contas Padrão da ANS para as operadoras de planos de saúde, conforme estabelecido pelas Resoluções Normativas RN nº 528, de 29 de abril de 2022 e RN nº 435, de 23 de novembro de 2018.

A base de dados do DIOPS referente ao ano de 2021 pode ser acessada no Portal de Dados Abertos da ANS (https://dados.gov.br/organization/agencia-nacional-de-saude-suplementar-ans), conjunto de dados Demonstrações Contábeis. Esse conjunto de dados detalha o saldo acumulado em reais ao final de cada trimestre nas contas contábeis de cada operadora.

A base de dados do DIOPS referente ao ano de 2020 foi atualizada para contemplar as retificações feitas ao longo do ano por operadoras com ressalvas. Essa base atualizada está disponível no Anexo da Nota Técnica nº 1/2022/COREF/GEFAP/DIRAD-DIPRO/DIPRO (doc SEI nº 23583642) e no sítio oficial da agência (https://www.gov.br/ans/pt-br) em Portal ANS > Espaço do Consumidor > Reajuste > Individual ou Familiar > Metodologia de Cálculo > Reajuste 2022

O código a seguir faz a leitura dos arquivos *.csv:

files <- list.files(path = "_datasets/diops", full.names = T)
diops <- rbindlist(
  lapply(files, fread, 
         dec=",", drop='DESCRICAO', colClasses = c(CD_CONTA_CONTABIL="character"))) |> 
  lazy_dt() |> 
  rename_with(tolower) |> 
  filter(nchar(cd_conta_contabil) == 9, # filtra contas contábeis de 9 dígitos
         vl_saldo_final != 0) |> # exclui linhas sem saldo
  mutate(id_calendar = ymd(data) + months(2)) |> # altera para último mês do trimestre
  rename(cd_ops = reg_ans) |> 
  select(cd_ops, cd_conta_contabil, id_calendar, vl_saldo_final) |> 
  as_tibble()

remove(files)


O alvo da análise é a despesa assistencial incorrida pela operadora em carteira própria. Os valores de Despesa Assistencial em Carteira Própria correspondem à totalização dos saldos dos seguintes grupos de contas contábeis do Plano de Contas Padrão da ANS:

Conta contábil Descrição Totalização
411X1 Eventos/ Sinistros Conhecidos ou Avisados de Assistência a Saúde Medico Hospitalar (+)
411X1XX8 Corresponsabilidade Assumida (-)
31171 (-) Contraprestações de Corresponsabilidade Cedida de Assistência Médico-Hospitalar (-)

Dessa forma, o valor da despesa assistencial em carteira própria inclui valores de Eventos/ Sinistros conhecidos ou avisados e valores de gastos de corresponsabilidade de carteira própria cedida a terceiros (contas contábeis redutoras de receita 31171). Valores de corresponsabilidade assumida são desconsiderados, pois referem-se a despesas assistenciais incorridas em atendimento a carteira de terceiros (outras operadoras).

O código a seguir totaliza a despesa assistencial por trimestre, operadora e tipo de carteira:

diops <- diops |>  
  filter( # filtra contas contábeis relevantes para a análise
    # despesa / corresponsabilidade assumida médico-hospitalar
    (substr(cd_conta_contabil, 1, 3) == '411' & substr(cd_conta_contabil, 5, 5) == '1')
    # receita / corresponsabilidade cedida médico-hospitalar
    | (substr(cd_conta_contabil, 1, 5) == '31111' | substr(cd_conta_contabil, 1, 5) == '31171')
  ) |> 
  mutate(
    gr_cc = case_when(
      substr(cd_conta_contabil, 1, 1) == '4' ~ 'eventos',
      substr(cd_conta_contabil, 1, 5) == '31111' ~ 'receita', 
      substr(cd_conta_contabil, 1, 5) == '31171' ~ 'corr_cedida', # redutora de receita
      TRUE ~ 'EXCLUIR'), 
  ) |>
  group_by(cd_ops, cd_conta_contabil, id_calendar, gr_cc) |> 
  summarise(vl_saldo_final = sum(vl_saldo_final), 
            .groups = 'drop') |>  
  pivot_wider(names_from = gr_cc, values_from = vl_saldo_final, values_fill = 0) |> 
  # identifica tipos de plano pela conta contábil
  mutate(
    vigencia = case_when(
      substr(cd_conta_contabil, 8, 8) == '8' ~ 'corr_assumida', 
      substr(cd_conta_contabil, 8, 8) %in% c('1','3','5') ~ 'A',
      substr(cd_conta_contabil, 8, 8) %in% c('2','4','6') ~ 'P',
      TRUE ~ 'EXCLUIR'), 
    contratacao = case_when(
      substr(cd_conta_contabil, 8, 8) == '8' ~ 'corr_assumida', 
      substr(cd_conta_contabil, 8, 8) %in% c('1','2') ~ 'Individual',
      substr(cd_conta_contabil, 8, 8) %in% c('3','4') ~ 'Adesão',
      substr(cd_conta_contabil, 8, 8) %in% c('5','6') ~ 'Empresarial',
      TRUE ~ 'EXCLUIR'), 
    financiamento = case_when(
      substr(cd_conta_contabil, 8, 8) == '8' ~ 'corr_assumida', 
      substr(cd_conta_contabil, 6, 6) == '1' ~ 'Pre-estabelecido',
      substr(cd_conta_contabil, 6, 6) == '2' ~ 'Pós-estabelecido',
      TRUE ~ 'EXCLUIR'), 
  ) |> 
  filter(vigencia != 'corr_assumida') |>     # exclui corr assumida
  mutate(despesa = eventos - corr_cedida,
         contratacao = as.factor(contratacao)) |> # inclui corr cedida na despesa
  group_by(cd_ops, vigencia, contratacao, financiamento, id_calendar) |> 
  summarise(receita = sum(receita), 
            despesa = sum(despesa), 
            .groups = 'drop')


Filtra segmentos alvo da análise e totaliza por trimestre, operadora e tipo de plano:

diops <- diops |> 
  # filtra planos novos (posteriores à Lei) com formação de preço pré-estabelecida
  filter( 
    vigencia == 'P', 
    financiamento == 'Pre-estabelecido', 
  ) |> 
  select(-vigencia, -financiamento) |> 
  # filtra operadoras médico-hospitalares
  inner_join(select(cadop,cd_ops),  by="cd_ops")


Beneficiários (semi-aditivo)

As informações de vínculos ativos de beneficiários são obtidas através do Sistema de Informação de Beneficiários (SIB), que é atualizado mensalmente.

A base de dados do SIB referente aos anos de 2020 e 2021 pode ser acessada no Portal de Dados Abertos da ANS (https://dados.gov.br/organization/agencia-nacional-de-saude-suplementar-ans), conjunto de dados Beneficiários por operadora e tipo de carteira para cálculo da VDA no site da ANS. Esse conjunto de dados informa a quantidade de vínculos ativos de beneficiários em planos de saúde médico-hospitalar mês a mês por operadora e tipo de plano.

O código a seguir faz a leitura dos arquivos publicados no portal de dados abertos:

sib <- fread(paste0("http://ftp.dadosabertos.ans.gov.br/FTP/PDA/",
                    "beneficiarios_vinculos_tipo_contratacao_vda/",
                    "Beneficiarios_operadora_e_carteira.csv"), 
             encoding = "UTF-8") |>
  lazy_dt() |>
  rename_with(tolower) |> 
  mutate(id_calendar = make_date(as.integer(mes/100), mes - (as.integer(mes/100)) * 100, 1)) |>
  filter(id_calendar >= periodo[1], id_calendar <= periodo[2],  # período de análise
         nr_benef != 0, !is.na(nr_benef)) |> # exclui zeros e nulos
  rename(
    cd_ops = cd_operadora, 
    vigencia = vigencia_plano, contratacao = gr_contratacao, financiamento = tipo_financiamento,
    benef = nr_benef
  ) |> 
  mutate(contratacao = case_when(
    contratacao == 'Coletivo empresarial' ~ 'Empresarial',
    contratacao == 'Coletivo por adesão' ~ 'Adesão',
    contratacao == 'Individual ou familiar' ~ 'Individual',
    TRUE ~ 'Não identificado')) |> 
  select(cd_ops, cobertura,  
         vigencia, contratacao, financiamento, 
         id_calendar, benef) |> 
  as_tibble()


Filtra segmentos alvo da análise e totaliza por mês, operadora e tipo de plano.

sib <- sib |> 
  filter(
    cobertura == "Médico-hospitalar",
    vigencia == 'P', # planos novos (posteriores à Lei)
    financiamento != 'Pós-estabelecido', # formação de preço pré-estabelecida
    contratacao %in% c('Empresarial', 'Individual', 'Adesão')) |> 
  # Filtra operadoras médico-hospitalares
  inner_join(select(cadop,cd_ops), by="cd_ops") |> 
  group_by(cd_ops, contratacao, id_calendar) |> 
  summarise(benef = sum(benef), .groups = 'drop') 


Calcula média de beneficiários acumulada no ano por operadora e tipo de contratação:

sib <- sib |> 
  arrange(cd_ops, contratacao, id_calendar) |> 
  # cria coluna do ano
  mutate(id_calendar = ymd(id_calendar), 
         ano = as.integer(year(id_calendar))) |> 
  # calcula a média por operadora, contratacao e ano
  group_by(cd_ops, contratacao, ano) |> 
  mutate(
    # NOTA: a função só calcula para períodos com uma sequência ininterrupta de 12 meses
    benefm = RcppRoll::roll_meanr(benef, n = 12, fill = NA_real_, na.rm = FALSE),
    mes = as.integer(month(id_calendar)),
    contratacao = as.factor(contratacao),
  ) |> 
  ungroup() |> 
  filter(mes == 12, !is.na(benefm)) |> # seleciona o(s) período(s) alvo da análise
  select(-benef, -ano, -mes) 

Cálculo da VDA


Despesa por Beneficiário

Essa seção gera a base de despesa assistencial e beneficiários e calcula a despesa por beneficiário.

A despesa por beneficiário é a despesa assistencial da carteira própria de uma operadora incorrida em certo período, dividida pela média de vínculos ativos de beneficiários ao longo do mesmo período. Essa métrica representa o principal componente de custo de um plano de saúde e está expressa de forma a permitir compará-la entre operadoras por tipo de carteira e acompanhar sua evolução ao longo do tempo.

Nota:
Para facilitar a comparabilidade e acompanhamento da despesa por beneficiário ao longo do tempo, é possível normalizar a métrica dividindo-a pelo número de meses do período sem impacto sobre a VDA.

A base de cálculo da VDA considera apenas:

  • Operadoras válidas

  • Observações que apresentam valor positivo de despesa

  • Observações que apresentam uma sequência ininterrupta de 12 meses de beneficiários no ano

O código a seguir consolida os dados de operadoras, beneficiários e despesas, filtra as observações relevantes e calcula a Despesa por Beneficiário (média mensal):

df.vda <- diops |> 
  select(-receita) |> 
  inner_join(sib, by=c('cd_ops', 'contratacao', 'id_calendar')) |> 
  inner_join(cadop, by='cd_ops') |> 
  filter(
    lg_cancelada == 0, 
    lg_nova_ops  == 0, 
    lg_ressalva  == 0,
    despesa > 0
  ) |> 
  select(-c(lg_cancelada, lg_nova_ops, lg_ressalva)) |> 
  relocate(c(razao_social, modalidade), .after = cd_ops) |> 
  arrange(cd_ops, contratacao, id_calendar) |> 
  mutate(dpb = if_else(benefm > 0, despesa/ benefm / month(id_calendar), NA_real_))


Visualização gráfica da distribuição da despesa por beneficiário das operadoras.

Nota: Excluíram-se os valores atípicos pelo método de boxplot 1,5xIQR para que fosse possível visualizar a distribuição da grande maioria dos dados.


VDA por operadora

A VDA de uma operadora é a variação da despesa por beneficiário desta operadora sobre o mesmo período do ano anterior, conforme a seguinte fórmula:

\[VDA_{ip} = \displaystyle\frac{\frac{DA_{ip}}{Ben_{ip}}}{\frac{DA_{i\ \left(p-1\right)}}{Ben_{i\ \left(p-1\right)}}} - 1\]

Onde:
i = Operadora na base de cálculo
p = Ano calendário anterior ao início da aplicação do IRPI
DA = Despesa assistencial em carteira própria acumulada ao fim do período
Ben = Média mensal de beneficiários em carteira própria ao longo do período

O código a seguir calcula a VDA por operadora:

df.vda <- df.vda |>
  arrange(cd_ops, contratacao, id_calendar) |> 
  mutate(vda = if_else(lag(cd_ops) == cd_ops & lag(contratacao) == contratacao
                       & year(lag(id_calendar)) == year(id_calendar) - 1, (dpb/lag(dpb) - 1) * 100,
                       NA_real_)) |> 
  filter(!is.na(vda)) |> 
  select(-id_calendar)


VDA do setor

Estatísticas descritivas da base de cálculo da VDA.


Visualização gráfica da distribuição da VDA das operadoras através de um gráfico boxplot.


O código a seguir identifica valores atípicos pela metodologia BoxPlot 1,5xIQR e calcula a proporção de valores atípicos por carteira:

# === IDENTIFICA OUTLIERS === CRITÉRIO: BOX-PLOT 1.5x ===
df.vda <- df.vda |>
  group_by(contratacao) |> 
  mutate(lg_outlier = if_else(vda >= (quantile(vda, 0.75, names = F) + 1.5 * IQR(vda)) 
                              | vda <= (quantile(vda, 0.25, names = F) - 1.5 * IQR(vda)), 1L, 
                              0L)) |> 
  ungroup()
`summarise()` has grouped output by 'contratacao'. You can override using the `.groups` argument.


Boxplot da distribuição da VDA após a exclusão dos valores atípicos.


Histograma da distribuição da VDA sem os valores atípicos.


A metodologia de cálculo da VDA do setor para aplicação como componente do IRPI adota a VDA média ponderada pela quantidade de beneficiários no ano mais recente, após a exclusão dos valores atípicos. A seguir, apresenta-se a média ponderada da VDA (mediaP) e demais estatísticas descritivas da sua distribuição em cada carteira.


Base de cálculo


Gera a base completa que reúne todas as observações de receita, despesa e beneficiários informadas pelas operadoras para os dois anos e o cálculo da VDA por operadora.

sib2 <- sib |> 
  mutate(ano = if_else(year(id_calendar)==year(periodo[1]),"ano1","ano2")) |> 
  select(-id_calendar) |> 
  rename(ben = benefm) |> 
  pivot_wider(names_from = ano, values_from = ben, values_fill = 0, names_prefix = "ben_") |> 
  mutate(
    # marca obs sem sequencia ininterrupta de beneficiarios
    lg_excl_benef = if_else(ben_ano1 < 1 | ben_ano2 < 1, 1L, 0L)
  ) 

diops2 <- diops |> 
  mutate(ano = if_else(year(id_calendar)==year(periodo[1]),"ano1","ano2")) |> 
  select(-id_calendar) |> 
  pivot_wider(names_from = ano, values_from = c(despesa, receita), values_fill = 0) |> 
  # marca obs que não têm despesa nos dois anos
  mutate(lg_excl_despesa = if_else(despesa_ano1 <= 0 | despesa_ano2 <= 0, 1L, 
                                 0L)) 

df.vda2 <- df.vda |> 
  select(cd_ops, contratacao, vda, lg_outlier)

df.reunida <-  sib2 |> 
  full_join(diops2, by=c('cd_ops', 'contratacao')) |> 
  mutate(dpb_ano1 = if_else(despesa_ano1 > 0 & ben_ano1 > 0, round(despesa_ano1 / ben_ano1 / 12, 2),
                            NA_real_),
         dpb_ano2 = if_else(despesa_ano2 > 0 & ben_ano2 > 0, round(despesa_ano2 / ben_ano2 / 12, 2), 
                            NA_real_)) |> 
  full_join(df.vda2, by=c('cd_ops', 'contratacao')) |> 
  inner_join(cadop, by = 'cd_ops') |> 
  relocate(razao_social:lg_ressalva, .after = cd_ops) |> 
  select(cd_ops,razao_social,modalidade,contratacao, 
         starts_with('lg_'),
         starts_with('receita'), 
         starts_with('despesa'), 
         starts_with('ben'), 
         everything()) |> 
  mutate(across(receita_ano1:ben_ano2, ~if_else(.x==0,NA_real_,.x))) |> 
  mutate(across(starts_with("lg_excl"), ~if_else(is.na(.x),1L,.x)))

remove(diops2, sib2, df.vda2)



Glossário

Beneficiário: Indivíduo (pessoa física) beneficiário de cobertura de plano privado de assistência à saúde e consumidor de serviços de assistência à saúde.

Contratante: Pessoa física ou jurídica responsável pela contratação do plano privado de assistência à saúde.

Operadora: Pessoa jurídica constituída sob a modalidade de sociedade civil ou comercial, cooperativa ou entidade de autogestão, que opere produto, serviço ou contrato de plano privado de assistência à saúde.

Plano Privado de Assistência à Saúde: Prestação continuada de serviços ou cobertura de custos assistenciais a preço pré ou pós estabelecido, por prazo indeterminado, com a finalidade de garantir, sem limite financeiro, a assistência à saúde, pela faculdade de acesso e atendimento por profissionais ou serviços de saúde, livremente escolhidos, integrantes ou não de rede credenciada, contratada ou referenciada, visando a assistência médica, hospitalar e odontológica, a ser paga integral ou parcialmente às expensas da operadora contratada, mediante reembolso ou pagamento direto ao prestador, por conta e ordem do consumidor.

Tipo de contratação:

  • Individual ou Familiar, oferece cobertura da atenção prestada para a livre adesão de beneficiários, pessoas naturais, com ou sem grupo familiar

  • Coletivo empresarial, quando a contratação é feita por meio de pessoa jurídica para a cobertura de pessoas a ela vinculadas por relação empregatícia ou estatutária

  • Coletivo por adesão, quando a contratação é feita por meio de pessoa jurídica de caráter profissional, classista ou setorial (e.g. conselhos profissionais, entidades de classe, sindicatos, cooperativas, etc.)

Tipo de financiamento:

  • Pré-estabelecido, quando o valor da contraprestação pecuniária é pré-fixado mediante negociação anual, caracterizando contrato de risco.

  • Pós-estabelecido, quando o valor da contraprestação pecuniária é estabelecido após a ocorrência dos procedimentos de assistência à saúde.

LS0tDQp0aXRsZTogIlZhcmlhw6fDo28gZGEgRGVzcGVzYSBBc3Npc3RlbmNpYWwgKFZEQSkiDQphdXRob3I6ICJBZ8OqbmNpYSBOYWNpb25hbCBkZSBTYcO6ZGUgU3VwbGVtZW50YXIiDQpkYXRlOiAiQXR1YWxpemFkbyBlbSBgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkLyVtLyVZJylgIg0Kb3V0cHV0Og0KICBodG1sX25vdGVib29rOg0KICAgIHRvYzogeWVzDQogICAgdG9jX2RlcHRoOiAzDQogICAgdG9jX2Zsb2F0OiB5ZXMNCiAgd29yZF9kb2N1bWVudDoNCiAgICB0b2M6IHllcw0KICAgIHRvY19kZXB0aDogJzMnDQotLS0NCg0KKioqDQoNCiMjIEludHJvZHXDp8Ojbw0KDQo8YnI+DQoNCiMjIyBDb250ZXh0bw0KDQpPIGRvY3VtZW50byBhIHNlZ3VpciBkZXRhbGhhIG8gcGFzc28gYSBwYXNzbyBkYSBhcHVyYcOnw6NvIGRhICoqVmFyaWHDp8OjbyBkYSBEZXNwZXNhIEF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