Árvore de páginas


CONTEÚDO

  1. Visão Geral
  2. Configurações INI
  3. Verbos
  4. Path Param
  5. Exemplos de Jsons de Resposta

01. VISÃO GERAL

A API beneficiaryTeeth tem como objetivo retornar os dentes do último anexo de Situação Inicial recebido pelo beneficiário. Serão destacados os dentes que estão Ausentes. Essa implementação foi criada para gerar o Odontograma no Portal Autorizador HAT com os dentes ausentes destacados.

02. CONFIGURAÇÕES INI

Para iniciar a instalação do processo, devemos configurar seu INI Protheus com a funcionalidade REST para habilitar o acesso as API´s. Documentos auxiliares:

Configuração do REST Protheus

Com o INI Protheus configurado, a nomenclatura das API´s ficará no formato: <url + Porta + chave rest definidos no INI Protheus> +  /totvsHealthPlans/v1/beneficiaryTeeth

Exemplo:

image2020-12-17_15-28-30.png

Logo, a minha URL será: http://localhost:8080/rest/totvsHealthPlans/v1/beneficiaryTeeth/{subscriberId}

03. VERBOS

Seguem os verbos disponíveis na API:

VerboPathDescrição
GET/beneficiaryTeeth/{subscriberId}Retorna dados do último anexo de Situação Inicial

04. PATH PARAMS - GET

Lista de query params obrigatórios:

Path ParamDescrição
subscriberIdMatrícula ou CPF do beneficiário


Exemplo de solicitação para o beneficiário 00010101000007012:



05. EXEMPLOS DO JSON DE RESPOSTA

Sucesso 200
{
    "items": [
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "11",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "12",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "13",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "14",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "15",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "16",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "85",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "17",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "18",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "21",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "22",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "23",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "24",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "25",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "26",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "27",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "28",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "31",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "32",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "33",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "34",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "35",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "36",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "37",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "38",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "41",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "42",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "43",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "44",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "45",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "46",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "47",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "48",
            "toothStatus": 5
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "51",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "52",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "53",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "54",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "55",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "61",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "62",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "63",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "64",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "65",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "71",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "72",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "73",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "74",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "75",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "81",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "82",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "83",
            "toothStatus": 1
        },
        {
            "supranumerary": "0",
            "subscriberId": "00010101000007012",
            "healthProviderId": "000004",
            "idOnHealthInsurer": "12341242143434444",
            "observation": "",
            "tooth": "84",
            "toothStatus": 1
        }
    ],
    "hasNext": false
}
Erro 400
{
    "code": 400,
    "message": "Matricula informada 90010101000007012 nao encontrada na tabela BA1.",
    "detailedMessage": "Beneficiario nao encontrado"
}