voa-tiss

Ferramentas para validar documentos TISS e consultar TUSS, operadoras e dados da ANS.

Sollte ich dies verwenden

Qualität und Sicherheit

B
Qualität der Beschreibung
67%
Vollständigkeit des Schemas
77%
Qualität der Benennung
80%
Risiko der Vergiftung
100%
Übereinstimmung der Berechtigungen
100%
Einhaltung des Protokolls
100%

Befunde (17)

  • LOWTool 'tiss_validate' description lacks action verbin tiss_validate
  • LOWTool 'tiss_parse_demonstrativo' description lacks action verbin tiss_parse_demonstrativo
  • LOWTool 'tiss_plan_reconciliation' description lacks action verbin tiss_plan_reconciliation
  • LOWTool 'tuss_lookup' description lacks action verbin tuss_lookup
  • LOWTool 'tuss_search' description lacks action verbin tuss_search
  • LOWTool 'tiss_rede' description lacks action verbin tiss_rede
  • LOWTool 'operadora_rede' description lacks action verbin operadora_rede
  • LOWTool 'operadora_perfil' description lacks action verbin operadora_perfil
  • LOWTool 'tiss_sandbox_demonstrativo' description lacks action verbin tiss_sandbox_demonstrativo
  • LOWTool 'tiss_rejection_map' description lacks action verbin tiss_rejection_map

Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.

Kontextkosten

~7,228Tokens (Tool-Definitionen)
~2.5 KBTypische Antwortgröße
Erhebliche Auswirkung auf die Aufmerksamkeit (5.65% von 128k Kontext)

Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.

Installieren

Installation mit einem Klick

Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:

{
  "mcpServers": {
    "tiss": {
      "url": "https://tiss-api.voa.health/mcp"
    }
  }
}

Remote-Endpunkte

https://tiss-api.voa.health/mcpstreamable-http

Was es kann

Tool-Inventar

Tools (26)

🟢 Nur lesen🟡 Schreiben🔴 Löschen⚪ Unbekannt
⚪tiss_validate(xml, lote, operadora, contexto, data)

Valida XML TISS ou lote em JSON. Quando usar: antes de gerar ou enviar um lote. Quando não usar: para corrigir achados sem aplicar o ciclo validar → tiss_apply_fixes → validar de novo.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    },
    "lote": {
      "type": "object",
      "properties": {},
      "additionalProperties": true,
      "description": "Schema estrutural disponível em tiss://schemas/lote."
    },
    "operadora": {
      "type": "string",
      "pattern": "^[0-9]{5,6}$"
    },
    "contexto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tabela_operadora": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "registro_ans": {
              "type": "string"
            },
            "procedimentos": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "exige_autorizacao": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "vigencia_inicio": {
              "type": "string",
              "format": "date"
            },
            "vigencia_fim": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "max_guias": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "carteirinhas": {
          "type": "object"
        },
        "autorizacoes": {
          "type": "object"
        }
      }
    },
    "data": {
      "type": "string",
      "format": "date"
    }
  },
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "version": {
      "type": [
        "string",
        "null"
      ]
    },
    "findings": {
      "type": "array",
      "items": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "Finding",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "severity",
          "guia",
          "xpath",
          "pointer",
          "message",
          "fix",
          "needs",
          "glosa",
          "rule"
        ],
        "properties": {
          "code": {
            "enum": [
              "audit.autorizacao_ausente",
              "audit.autorizacao_vencida",
              "audit.carteirinha_ausente",
              "audit.carteirinha_inativa",
              "audit.carteirinha_vencida",
              "audit.data_ausente",
              "audit.operadora_divergente",
              "audit.procedimento_ausente",
              "audit.procedimento_fora_da_tabela",
              "audit.tabela_fora_de_vigencia",
              "audit.tabela_sem_procedimentos",
              "audit.valor_nao_positivo",
              "autorizacao.carteirinha",
              "autorizacao.dado_ausente",
              "autorizacao.exige_auditoria",
              "autorizacao.sem_regra",
              "guia.carteirinha_ausente",
              "guia.executante_ausente",
              "guia.sequencial",
              "item.valor_divergente",
              "item.valor_zerado",
              "lote.acima_do_teto",
              "lote.caractere_invalido",
              "lote.estrutura",
              "lote.guia_duplicada",
              "lote.hash_divergente",
              "lote.valor_total_geral",
              "lote.vazio",
              "regra.combinacao_proibida",
              "regra.exige_autorizacao",
              "regra.max_itens",
              "regra.obrigatorio",
              "regra.padrao",
              "regra.valores",
              "tuss.fora_de_vigencia",
              "tuss.inexistente",
              "versao.divergente",
              "versao.nao_detectada",
              "versao.nao_suportada",
              "xml.doctype",
              "xml.encoding",
              "xml.malformado",
              "xsd.atributo",
              "xsd.elemento_ausente",
              "xsd.elemento_inesperado",
              "xsd.enumeracao",
              "xsd.outro",
              "xsd.padrao",
              "xsd.tamanho",
              "xsd.tipo"
            ]
          },
          "severity": {
            "enum": [
              "error",
              "warning"
            ]
          },
          "guia": {
            "type": [
              "string",
              "null"
            ]
          },
          "xpath": {
            "type": [
              "string",
              "null"
            ]
          },
          "pointer": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "fix": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "needs": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "glosa": {
            "type": [
              "string",
              "null"
            ]
          },
          "rule": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      }
    },
    "decisao": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tipo",
        "rules",
        "needs"
      ],
      "properties": {
        "tipo": {
          "enum": [
            "aprovar_por_regra",
            "pendente",
            "encaminhar_auditor"
          ]
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "source",
              "mantenedor"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "source": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url",
                  "titulo",
                  "data",
                  "acesso",
                  "official"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "titulo": {
                    "type": "string"
                  },
                  "data": {
                    "type": "string"
                  },
                  "acesso": {
                    "type": "string"
                  },
                  "official": {
                    "type": "boolean"
                  }
                }
              },
              "mantenedor": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tipo"
                ],
                "properties": {
                  "tipo": {
                    "enum": [
                      "comunidade",
                      "operadora"
                    ]
                  },
                  "registro_ans": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "needs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "valid",
    "version",
    "findings"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Report",
  "additionalProperties": false
}
🟢tiss_parse_demonstrativo(xml)

Lê decisões de um demonstrativo. Quando usar: para identificar pagamentos e glosas. Quando não usar: para validar lotes.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "decisoes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "guia_ref": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "pago",
              "glosado",
              "glosa_parcial"
            ]
          },
          "motivo": {
            "type": "string"
          },
          "guia_operadora": {
            "type": "string"
          },
          "tuss_code": {
            "type": "string"
          },
          "valor_glosa_cents": {
            "type": "integer"
          },
          "valor_liberado_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": [
          "guia_ref",
          "decision",
          "motivo"
        ]
      }
    }
  },
  "required": [
    "decisoes"
  ],
  "additionalProperties": false
}
⚪tiss_plan_reconciliation(decisoes, guias, id_key, prestador_key, operadora_key, ...)

Propõe vínculos entre decisões e guias. Quando usar: após ler um demonstrativo. Quando não usar: para alterar guias.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "decisoes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "guia_ref": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "pago",
              "glosado",
              "glosa_parcial"
            ]
          },
          "motivo": {
            "type": "string"
          },
          "guia_operadora": {
            "type": "string"
          },
          "tuss_code": {
            "type": "string"
          },
          "valor_glosa_cents": {
            "type": "integer"
          },
          "valor_liberado_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": [
          "guia_ref",
          "decision",
          "motivo"
        ]
      }
    },
    "guias": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    "id_key": {
      "type": "string"
    },
    "prestador_key": {
      "type": "string"
    },
    "operadora_key": {
      "type": "string"
    },
    "status_key": {
      "type": "string"
    }
  },
  "required": [
    "decisoes",
    "guias"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "propostas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    "sem_par": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "guia_ref": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "pago",
              "glosado",
              "glosa_parcial"
            ]
          },
          "motivo": {
            "type": "string"
          },
          "guia_operadora": {
            "type": "string"
          },
          "tuss_code": {
            "type": "string"
          },
          "valor_glosa_cents": {
            "type": "integer"
          },
          "valor_liberado_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": [
          "guia_ref",
          "decision",
          "motivo"
        ]
      }
    },
    "ambiguas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "guia_ref": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "pago",
              "glosado",
              "glosa_parcial"
            ]
          },
          "motivo": {
            "type": "string"
          },
          "guia_operadora": {
            "type": "string"
          },
          "tuss_code": {
            "type": "string"
          },
          "valor_glosa_cents": {
            "type": "integer"
          },
          "valor_liberado_cents": {
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required": [
          "guia_ref",
          "decision",
          "motivo"
        ]
      }
    }
  },
  "required": [
    "propostas",
    "sem_par",
    "ambiguas"
  ],
  "additionalProperties": false
}
⚪tuss_lookup(code, tabela, include_expired, data)

Busca um código TUSS exato. Quando usar: para consultar código ou vigência. Quando não usar: para buscar por descrição.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "tabela": {
      "type": "string"
    },
    "include_expired": {
      "type": "boolean"
    },
    "data": {
      "type": "string",
      "format": "date"
    }
  },
  "required": [
    "code"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "resultados": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    }
  },
  "required": [
    "resultados"
  ],
  "additionalProperties": false
}
🟢tuss_search(text, tabela, include_expired, data, limite)

Busca códigos TUSS por texto. Quando usar: para localizar procedimentos por descrição. Quando não usar: para validar XML.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "text": {
      "type": "string"
    },
    "tabela": {
      "type": "string"
    },
    "include_expired": {
      "type": "boolean"
    },
    "data": {
      "type": "string",
      "format": "date"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    }
  },
  "required": [
    "text"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "resultados": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    }
  },
  "required": [
    "resultados"
  ],
  "additionalProperties": false
}
⚪tiss_sadt_missing(values)

Identifica campos obrigatórios SP/SADT ausentes. Quando usar: antes de renderizar uma guia. Quando não usar: para validar um lote.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "values": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "required": [
    "values"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "faltando": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "faltando"
  ],
  "additionalProperties": false
}
⚪tiss_sadt_catalog

Retorna o catálogo SP/SADT. Quando usar: para conhecer campos e domínios. Quando não usar: para preencher uma guia sem dados.

Eingabe-Schema

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {},
  "additionalProperties": true
}
⚪tiss_rede(cnpj, cnes, limite)

Consulta as operadoras vinculadas a um CNPJ ou CNES. Quando usar: para identificar vínculos de um estabelecimento. Quando não usar: para buscar o cadastro geral; use operadora_lookup.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "cnpj": {
      "type": "string"
    },
    "cnes": {
      "type": "string"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 200
    }
  },
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "atualizado_em": {
      "type": "string"
    },
    "fonte": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    },
    "operadoras": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "registro_ans": {
            "type": "string"
          },
          "nome": {
            "type": [
              "string",
              "null"
            ]
          },
          "cnes": {
            "type": [
              "string",
              "null"
            ]
          },
          "nome_estabelecimento": {
            "type": "string"
          },
          "tipo_contrato": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disponibilidade": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tipo_prestador": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "urgencia_emergencia": {
            "type": "boolean"
          },
          "dt_vinculo_inicio": {
            "type": [
              "string",
              "null"
            ]
          },
          "planos": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "required": [
          "registro_ans",
          "nome",
          "cnes",
          "nome_estabelecimento",
          "tipo_contrato",
          "disponibilidade",
          "tipo_prestador",
          "urgencia_emergencia",
          "dt_vinculo_inicio",
          "planos"
        ]
      }
    }
  },
  "required": [
    "atualizado_em",
    "fonte",
    "total",
    "operadoras"
  ],
  "additionalProperties": false
}
⚪operadora_rede(registro, uf, limite)

Consulta os estabelecimentos vinculados a uma operadora. Quando usar: para identificar unidades da rede por UF. Quando não usar: para buscar o cadastro geral; use operadora_lookup.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "registro": {
      "type": "string"
    },
    "uf": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "default": 200
    }
  },
  "required": [
    "registro"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "atualizado_em": {
      "type": "string"
    },
    "fonte": {
      "type": "string"
    },
    "registro_ans": {
      "type": "string"
    },
    "total": {
      "type": "integer"
    },
    "por_uf": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "estabelecimentos": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cnes": {
            "type": [
              "string",
              "null"
            ]
          },
          "cnpj": {
            "type": [
              "string",
              "null"
            ]
          },
          "nome": {
            "type": "string"
          },
          "classe": {
            "type": [
              "string",
              "null"
            ]
          },
          "cd_municipio": {
            "type": [
              "string",
              "null"
            ]
          },
          "uf": {
            "type": "string"
          },
          "tipo_contrato": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disponibilidade": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tipo_prestador": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "urgencia_emergencia": {
            "type": "boolean"
          },
          "dt_vinculo_inicio": {
            "type": [
              "string",
              "null"
            ]
          },
          "planos": {
            "type": "integer"
          }
        },
        "additionalProperties": false,
        "required": [
          "cnes",
          "cnpj",
          "nome",
          "classe",
          "cd_municipio",
          "uf",
          "tipo_contrato",
          "disponibilidade",
          "tipo_prestador",
          "urgencia_emergencia",
          "dt_vinculo_inicio",
          "planos"
        ]
      }
    }
  },
  "required": [
    "atualizado_em",
    "fonte",
    "registro_ans",
    "total",
    "por_uf",
    "estabelecimentos"
  ],
  "additionalProperties": false
}
⚪operadora_perfil(registro_ans)

Consulta o cadastro e a série semestral de glosa e pagamento de uma operadora na ANS. Quando usar: para conhecer uma operadora pelo registro ANS. Quando não usar: para buscar operadoras por nome.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "registro_ans": {
      "type": "string",
      "pattern": "^[0-9]{5,6}$"
    }
  },
  "required": [
    "registro_ans"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "registro_ans": {
      "type": "string"
    },
    "razao_social": {
      "type": "string"
    },
    "indicadores": {
      "type": "object",
      "properties": {
        "fonte": {
          "type": "object",
          "properties": {},
          "additionalProperties": true
        },
        "serie": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "fonte",
        "serie"
      ]
    }
  },
  "required": [
    "registro_ans",
    "razao_social",
    "indicadores"
  ],
  "additionalProperties": true
}
⚪tiss_sandbox_enviar_lote(xml, cenario, tentativa, registro_ans)

Envia um lote à operadora simulada. Quando usar: para testar integração local. Quando não usar: para transmitir dados reais.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    },
    "cenario": {
      "enum": [
        "aprovado",
        "duplicidade",
        "carteirinha_vencida",
        "sem_autorizacao",
        "falha_transitoria",
        "falha_permanente"
      ]
    },
    "tentativa": {
      "type": "integer",
      "minimum": 1
    },
    "registro_ans": {
      "type": "string",
      "pattern": "^[0-9]{5,6}$"
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "aceito": {
      "type": "boolean"
    },
    "protocolo": {
      "type": [
        "string",
        "null"
      ]
    },
    "numero_protocolo": {
      "type": [
        "string",
        "null"
      ]
    },
    "numero_lote": {
      "type": [
        "string",
        "null"
      ]
    },
    "cenario": {
      "type": "string"
    },
    "resumo": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    }
  },
  "required": [
    "aceito",
    "protocolo",
    "numero_protocolo",
    "numero_lote",
    "cenario",
    "findings"
  ],
  "additionalProperties": true
}
⚪tiss_sandbox_demonstrativo(protocolo)

Gera o demonstrativo de um protocolo simulado. Quando usar: após enviar um lote. Quando não usar: com protocolo de outra operadora.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "protocolo": {
      "type": "string"
    }
  },
  "required": [
    "protocolo"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "protocolo": {
      "type": "string"
    },
    "xml": {
      "type": "string"
    }
  },
  "required": [
    "protocolo",
    "xml"
  ],
  "additionalProperties": false
}
⚪tiss_build(lote)

Gera o XML TISS 4.03.00 de um lote em JSON, com hash do epílogo. Consulte tiss://schemas/lote para o esquema estrutural. Quando usar: depois de validar o lote em JSON sem erros. Quando não usar: para corrigir achados; use tiss_apply_fixes.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "lote": {
      "type": "object",
      "properties": {},
      "additionalProperties": true,
      "description": "Schema estrutural disponível em tiss://schemas/lote."
    }
  },
  "required": [
    "lote"
  ],
  "additionalProperties": true
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    },
    "hash": {
      "type": "string"
    }
  },
  "required": [
    "xml",
    "hash"
  ],
  "additionalProperties": false
}
⚪tiss_hash(xml)

Calcula o hash do epílogo de um XML TISS. Quando usar: para conferir a integridade do XML. Quando não usar: para validar o conteúdo; use tiss_validate.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "hash": {
      "type": "string"
    }
  },
  "required": [
    "hash"
  ],
  "additionalProperties": false
}
⚪tiss_audit(lote, contexto, data, operadora)

Audita um lote JSON com regras locais e contexto da operadora. Quando usar: para identificar inconsistências administrativas. Quando não usar: para aplicar correções; use tiss_apply_fixes.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "lote": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "contexto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tabela_operadora": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "registro_ans": {
              "type": "string"
            },
            "procedimentos": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "exige_autorizacao": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "vigencia_inicio": {
              "type": "string",
              "format": "date"
            },
            "vigencia_fim": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "max_guias": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "carteirinhas": {
          "type": "object"
        },
        "autorizacoes": {
          "type": "object"
        }
      }
    },
    "data": {
      "type": "string",
      "format": "date"
    },
    "operadora": {
      "type": [
        "string",
        "object"
      ],
      "pattern": "^[0-9]{5,6}$"
    }
  },
  "required": [
    "lote"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "version": {
      "type": [
        "string",
        "null"
      ]
    },
    "findings": {
      "type": "array",
      "items": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "title": "Finding",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "severity",
          "guia",
          "xpath",
          "pointer",
          "message",
          "fix",
          "needs",
          "glosa",
          "rule"
        ],
        "properties": {
          "code": {
            "enum": [
              "audit.autorizacao_ausente",
              "audit.autorizacao_vencida",
              "audit.carteirinha_ausente",
              "audit.carteirinha_inativa",
              "audit.carteirinha_vencida",
              "audit.data_ausente",
              "audit.operadora_divergente",
              "audit.procedimento_ausente",
              "audit.procedimento_fora_da_tabela",
              "audit.tabela_fora_de_vigencia",
              "audit.tabela_sem_procedimentos",
              "audit.valor_nao_positivo",
              "autorizacao.carteirinha",
              "autorizacao.dado_ausente",
              "autorizacao.exige_auditoria",
              "autorizacao.sem_regra",
              "guia.carteirinha_ausente",
              "guia.executante_ausente",
              "guia.sequencial",
              "item.valor_divergente",
              "item.valor_zerado",
              "lote.acima_do_teto",
              "lote.caractere_invalido",
              "lote.estrutura",
              "lote.guia_duplicada",
              "lote.hash_divergente",
              "lote.valor_total_geral",
              "lote.vazio",
              "regra.combinacao_proibida",
              "regra.exige_autorizacao",
              "regra.max_itens",
              "regra.obrigatorio",
              "regra.padrao",
              "regra.valores",
              "tuss.fora_de_vigencia",
              "tuss.inexistente",
              "versao.divergente",
              "versao.nao_detectada",
              "versao.nao_suportada",
              "xml.doctype",
              "xml.encoding",
              "xml.malformado",
              "xsd.atributo",
              "xsd.elemento_ausente",
              "xsd.elemento_inesperado",
              "xsd.enumeracao",
              "xsd.outro",
              "xsd.padrao",
              "xsd.tamanho",
              "xsd.tipo"
            ]
          },
          "severity": {
            "enum": [
              "error",
              "warning"
            ]
          },
          "guia": {
            "type": [
              "string",
              "null"
            ]
          },
          "xpath": {
            "type": [
              "string",
              "null"
            ]
          },
          "pointer": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "fix": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            ]
          },
          "needs": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "glosa": {
            "type": [
              "string",
              "null"
            ]
          },
          "rule": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      }
    },
    "decisao": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tipo",
        "rules",
        "needs"
      ],
      "properties": {
        "tipo": {
          "enum": [
            "aprovar_por_regra",
            "pendente",
            "encaminhar_auditor"
          ]
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "source",
              "mantenedor"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "source": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url",
                  "titulo",
                  "data",
                  "acesso",
                  "official"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "titulo": {
                    "type": "string"
                  },
                  "data": {
                    "type": "string"
                  },
                  "acesso": {
                    "type": "string"
                  },
                  "official": {
                    "type": "boolean"
                  }
                }
              },
              "mantenedor": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tipo"
                ],
                "properties": {
                  "tipo": {
                    "enum": [
                      "comunidade",
                      "operadora"
                    ]
                  },
                  "registro_ans": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "needs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "valid",
    "version",
    "findings"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Report",
  "additionalProperties": false
}
⚪tiss_rejection_map(lotes, contexto, operadora, regras, segredo_pseudonimo, ...)

Agrega achados por prestador e mês, sem expor dados das guias; CPF é pseudonimizado. Quando usar: para analisar rejeições por prestador. Quando não usar: para consultar guias individuais ou corrigir lotes.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "lotes": {
      "type": "array",
      "items": {
        "type": [
          "string",
          "object"
        ]
      },
      "minItems": 1,
      "maxItems": 100
    },
    "contexto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tabela_operadora": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "registro_ans": {
              "type": "string"
            },
            "procedimentos": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "exige_autorizacao": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "vigencia_inicio": {
              "type": "string",
              "format": "date"
            },
            "vigencia_fim": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "max_guias": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "carteirinhas": {
          "type": "object"
        },
        "autorizacoes": {
          "type": "object"
        }
      }
    },
    "operadora": {
      "type": "string",
      "pattern": "^[0-9]{5,6}$"
    },
    "regras": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "segredo_pseudonimo": {
      "type": "string",
      "minLength": 16
    },
    "data": {
      "type": "string",
      "format": "date"
    }
  },
  "required": [
    "lotes"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "versao": {
      "const": "1"
    },
    "lotes": {
      "type": "integer",
      "minimum": 0
    },
    "guias": {
      "type": "integer",
      "minimum": 0
    },
    "ignorados": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      }
    },
    "prestadores": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "prestador",
          "mes",
          "guias",
          "guias_com_achado",
          "valor_total",
          "valor_afetado"
        ],
        "properties": {
          "prestador": {
            "type": "string",
            "pattern": "^(codigo:.+|cnpj:\\d{14}|cpf:hmac:[0-9a-f]{64})$"
          },
          "mes": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}$"
          },
          "guias": {
            "type": "integer",
            "minimum": 0
          },
          "guias_com_achado": {
            "type": "integer",
            "minimum": 0
          },
          "valor_total": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{2}$"
          },
          "valor_afetado": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{2}$"
          }
        }
      }
    },
    "linhas": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "prestador",
          "mes",
          "codigo",
          "glosa",
          "rule_id",
          "guias",
          "valor_afetado"
        ],
        "properties": {
          "prestador": {
            "type": "string",
            "pattern": "^(codigo:.+|cnpj:\\d{14}|cpf:hmac:[0-9a-f]{64})$"
          },
          "mes": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{4}-\\d{2}$"
          },
          "codigo": {
            "type": "string"
          },
          "glosa": {
            "type": [
              "string",
              "null"
            ]
          },
          "rule_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "guias": {
            "type": "integer",
            "minimum": 0
          },
          "valor_afetado": {
            "type": "string",
            "pattern": "^-?\\d+\\.\\d{2}$"
          }
        }
      }
    }
  },
  "required": [
    "versao",
    "lotes",
    "guias",
    "ignorados",
    "prestadores",
    "linhas"
  ],
  "additionalProperties": false
}
🟡tiss_apply_fixes(lote, report)

Aplica correções JSON Patch de um relatório ao lote. Quando usar: depois de tiss_validate ou tiss_audit com achados corrigíveis. Quando não usar: para inventar dados ausentes; peça-os ao usuário.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "lote": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "report": {
      "type": "object",
      "properties": {
        "findings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          }
        }
      },
      "additionalProperties": true,
      "required": [
        "findings"
      ]
    }
  },
  "required": [
    "lote",
    "report"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "lote": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "required": [
    "lote"
  ],
  "additionalProperties": false
}
🟢glosa_explain(codigo)

Explica um código da Tabela 38 da ANS. Quando usar: ao interpretar uma glosa recebida. Quando não usar: para validar ou corrigir o lote.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "codigo": {
      "type": "string",
      "pattern": "^[0-9]{4}$"
    }
  },
  "required": [
    "codigo"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "codigo": {
      "type": "string"
    },
    "descricao": {
      "type": "string"
    },
    "grupo": {
      "type": "string"
    },
    "fonte": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string"
        },
        "titulo": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": true,
      "required": [
        "data",
        "titulo",
        "url"
      ]
    },
    "orientacao": {
      "type": "object",
      "properties": {
        "fonte": {
          "type": "string"
        },
        "texto": {
          "type": "string"
        }
      },
      "additionalProperties": true,
      "required": [
        "fonte",
        "texto"
      ]
    }
  },
  "required": [
    "codigo",
    "descricao",
    "grupo",
    "fonte",
    "orientacao"
  ],
  "additionalProperties": true
}
⚪tiss_dominio(tabela, codigo, texto, include_expired, data, ...)

Consulta tabelas e códigos de domínio TISS. Quando usar: para localizar um código ou termo de domínio. Quando não usar: para buscar procedimentos TUSS; use tuss_search.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "tabela": {
      "type": "string"
    },
    "codigo": {
      "type": "string"
    },
    "texto": {
      "type": "string"
    },
    "include_expired": {
      "type": "boolean"
    },
    "data": {
      "type": "string",
      "format": "date"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    }
  },
  "additionalProperties": false,
  "dependentRequired": {
    "codigo": [
      "tabela"
    ]
  },
  "not": {
    "required": [
      "codigo",
      "texto"
    ]
  }
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "tabelas": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    "resultados": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": false
}
⚪operadora_lookup(texto, limite)

Busca operadoras ativas pelo nome, registro, CNPJ ou localidade. Quando usar: para localizar uma operadora na base pública. Quando não usar: para consultar vínculos hospitalares; use tiss_rede.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "texto": {
      "type": "string"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 10
    }
  },
  "required": [
    "texto"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "resultados": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    }
  },
  "required": [
    "resultados"
  ],
  "additionalProperties": false
}
⚪tiss_referencia(codigo, uf, tabela, modalidade, porte, ...)

Consulta valores unitários de referência D-TISS da ANS por procedimento TUSS. Quando usar: para comparar valores informados por UF, modalidade, porte e semestre. Quando não usar: para glosa ou preço contratado de uma operadora; use as ferramentas de operadoras.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "codigo": {
      "type": "string",
      "pattern": "^[0-9]{1,10}$"
    },
    "uf": {
      "type": "string",
      "pattern": "^[A-Za-z]{2}$"
    },
    "tabela": {
      "type": "string",
      "pattern": "^[0-9]{2}$"
    },
    "modalidade": {
      "type": "string"
    },
    "porte": {
      "type": "string"
    },
    "semestre": {
      "type": "string",
      "pattern": "^[0-9]{4}-[12]$"
    }
  },
  "required": [
    "codigo",
    "uf"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "referencia": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "semestre": {
      "type": "string"
    },
    "fonte": {
      "type": "string"
    },
    "atualizado_em": {
      "type": "string"
    },
    "aviso": {
      "type": [
        "string",
        "null"
      ]
    },
    "minimo_n": {
      "type": "integer"
    }
  },
  "required": [
    "referencia",
    "semestre",
    "fonte",
    "atualizado_em",
    "aviso",
    "minimo_n"
  ],
  "additionalProperties": false
}
⚪tiss_autorizacao_build(mensagem)

Gera XML TISS 4.03.00 para solicitação ou resposta de autorização SP/SADT.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "mensagem": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "required": [
    "mensagem"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    },
    "hash": {
      "type": "string"
    }
  },
  "required": [
    "xml",
    "hash"
  ],
  "additionalProperties": false
}
🟢tiss_autorizacao_parse(xml)

Interpreta solicitações e respostas de autorização SP/SADT.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "mensagem": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "required": [
    "mensagem"
  ],
  "additionalProperties": false
}
🟢tiss_autorizacao_check(solicitacao, xml, contexto)

Valida uma solicitação SP/SADT e retorna uma decisão explicável.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "solicitacao": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "xml": {
      "type": "string"
    },
    "contexto": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
  },
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {},
  "additionalProperties": true
}
⚪tiss_sandbox_autorizacao(solicitacao, xml, cenario)

Gera uma resposta SP/SADT sintética nos cenários disponíveis.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "solicitacao": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "xml": {
      "type": "string"
    },
    "cenario": {
      "enum": [
        "aprovado",
        "pendente",
        "negado"
      ]
    }
  },
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "xml": {
      "type": "string"
    }
  },
  "required": [
    "xml"
  ],
  "additionalProperties": false
}
⚪buscar_docs(texto, limite)

Busca trechos da documentação local da biblioteca. Quando usar: para encontrar instruções e referências da API. Quando não usar: para consultar dados clínicos ou códigos específicos.

Eingabe-Schema

{
  "type": "object",
  "properties": {
    "texto": {
      "type": "string"
    },
    "limite": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 3
    }
  },
  "required": [
    "texto"
  ],
  "additionalProperties": false
}

Ausgabe-Schema

{
  "type": "object",
  "properties": {
    "resultados": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uri": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "trecho": {
            "type": "string"
          }
        },
        "additionalProperties": false,
        "required": [
          "uri",
          "titulo",
          "trecho"
        ]
      }
    }
  },
  "required": [
    "resultados"
  ],
  "additionalProperties": false
}

Community

Diesen Server bewerten

Nachweis

Aktuelle Beobachtungen

verifiziertVersion nicht aufgezeichnet26 Tools