Árvore de páginas


CONTEÚDO

  1. Visão Geral
  2. Configuraçóes INI
  3. Verbos
  4. Uso da API - GET
  5. Exemplos de JSON de Resposta
  6. Tabelas utilizadas


01. VISÃO GERAL

Esta parte da API authorizations tem como objetivo retornar os dados das guias relacionadas a uma guia principal. As guias são divididas por categorias:

  • Anexos Clínicos - clinicalAttachments
  • Prorrogações de Internação - treatmentExtensions
  • Situação Inicial - initialSituationz

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:

03. VERBOS

Seguem os verbos disponíveis na API:

Verbo

URL

Descrição

GEThttps://<url>:porta>/rest/totvsHealthPlans/v1/authorizations/{numerodaGuia}/clinicalAttachmentsRetorna anexos clínicos relacionados.
GEThttps://<url>:porta>/rest/totvsHealthPlans/v1/authorizations/{numerodaGuia}/treatmentExtensionsRetorna anexos prorrogações de internação relacionadas.
GEThttps://<url>:porta>/rest/totvsHealthPlans/v1/authorizations/{numerodaGuia}/initialSituationRetorna anexos situações iniciais relacionadas.

04. USO DA API - GET

Queryparams:

Atributo

Tipo

Regra

Descrição

pageSizeCaracterOpcional

Controle de quantidade de itens que serão retornados.

pageCaracterOpcional

Controle de paginação

expandCaracterOpcional

Indica os expandables que serão retornados no json.

Opções: beneficiary, attachments ,procedures, rejectionCauses, teeth


Exemplo solicitação anexos clínicos relacionados:


Exemplo solicitação prorrogações de internação relacionadas:


Exemplo solicitação situações iniciais relacionadas:


05. EXEMPLOS DE JSON DE RESPOSTA

Falha 400 - Guia não encontrada
{
    "code": 400,
    "message": "Nao foram encontradas guias relacionadas",
    "detailedMessage": "Entre em contato com o Suporte"
}
Sucesso 200 - Guia encontrada Anexos Clínicos
{
    "items": [
        {
            "attendanceProtocol": "00000020171228000037",
            "attachNumber": "000120171200000037",
            "mainAuthorizationCode": "000120171200000012",
            "password": "",
            "authorizationStatus": "1",
            "passwordExpireDate": "2017-12-26",
            "requestedDate": "2017-12-28",
            "authorizedDate": "2017-12-26",
            "healthProviderId": "000001",
            "subscriberId": "00010001000001026",
            "phoneNumber": "111",
            "email": "",
            "technicalJustification": "",
            "drugAdministrationStartDate": "",
            "totalCycleDosage": 0,
            "attachType": "12",
            "tissSequentialTransaction": "",
            "beneficiaryWeight": 0,
            "beneficiaryHeight": 0,
            "chemotherapyType": "",
            "tumor": "",
            "nodule": "",
            "metastasis": "",
            "therapeuticPlan": "",
            "irradiatedArea": "",
            "radioApplicationDate": "",
            "expectedCyclesNumber": 0,
            "currentCycle": 0,
            "intervalBetweenCycles": 0,
            "diagnosisDate": null,
            "primaryICD": "",
            "secondaryICD": "",
            "terciaryICD": "",
            "quaternaryICD": "",
            "imageDiagnosis": "",
            "staging": "",
            "ecog": "",
            "purpose": "",
            "histopathologicalDiagnosis": "",
            "relevantInformations": "",
            "surgery": "",
            "surgeryDate": null,
            "chemotherapy": "",
            "chemoApplicationDate": null,
            "radiationFieldsNumber": 0,
            "dailyDose": 0,
            "totalDosage": 0,
            "numberOfDays": 0,
            "daysFromCurrentCycle": 0,
            "attendanceNote": "",
            "beneficiary": {
                "subscriberId": "00010001000001026",
                "name": "ADRIANO LIMA BEZERRA",
                "socialName": "",
                "holderCPF": "71461963990",
                "birthdate": "1976-09-04",
                "weight": "",
                "height": "",
                "oldSubscriberId": "",
                "phoneNumber": "99999999",
                "gender": "1",
                "holderRelationship": "D",
                "CNS": "903985836110003"
            },
            "attachments": {},
            "procedures": [
                {
                    "sequence": "001",
                    "authLevel": "BRV",
                    "authLevelKey": "00010001001007",
                    "status": "1",
                    "authorizedQuantity": 1,
                    "auditing": "0",
                    "optionOrder": "",
                    "requestedQuantity": 1,
                    "unitaryWorth": 0,
                    "anvisaId": "",
                    "manufacturer": "",
                    "manufacturerReference": "",
                    "operationAuthorizationNumber": "",
                    "unitOfMeasurement": "",
                    "accessWay": "",
                    "frequency": 0,
                    "tableCode": "22",
                    "procedureCode": "30101018",
                    "procedureDescription": "ABRASÃO CIRÚRGICA (POR SESSÃO)",
                    "rejectionCauses": []
                },
                {
                    "sequence": "002",
                    "authLevel": "BRV",
                    "authLevelKey": "00010001001007",
                    "status": "1",
                    "authorizedQuantity": 1,
                    "auditing": "0",
                    "optionOrder": "",
                    "requestedQuantity": 1,
                    "unitaryWorth": 0,
                    "anvisaId": "",
                    "manufacturer": "",
                    "manufacturerReference": "",
                    "operationAuthorizationNumber": "",
                    "unitOfMeasurement": "",
                    "accessWay": "",
                    "frequency": 0,
                    "tableCode": "22",
                    "procedureCode": "10101012",
                    "procedureDescription": "CONSULTA EM CONSULTORIO",
                    "rejectionCauses": []
                }
            ]
        }
    ],
    "hasNext": true
}
Sucesso 200 - Guia encontrada Prorrogação de Internação
{
    "items": [
        {
            "attendanceProtocol": "00000020180110000080",
            "password": "",
            "mainAuthorizationCode": "000120180100000308",
            "requestedDate": "2018-01-10",
            "authorizedDate": "2018-01-10",
            "subscriberId": "00010004000002000",
            "healthProviderId": "000002",
            "professionalCouncil": "CRM",
            "stateAbbreviation": "SP",
            "professionalCouncilNumber": "92057",
            "clinicalCondition": "",
            "attendanceNote": "",
            "authorizationStatus": "1",
            "requestedRoomType": "",
            "dailyRequestedQuantity": 0,
            "dailyAuthorizedQuantity": 0,
            "treatmentExtensionNumber": "000120180100000331",
            "beneficiary": {
                "subscriberId": "00010004000002000",
                "name": "AMANDA BARBARA",
                "socialName": "",
                "holderCPF": "44046668458",
                "birthdate": "1983-09-26",
                "weight": "",
                "height": "",
                "oldSubscriberId": "",
                "phoneNumber": "",
                "gender": "2",
                "holderRelationship": "T",
                "CNS": "168862791410005"
            },
            "attachments": {},
            "procedures": [
                {
                    "sequence": "001",
                    "authLevel": "BR8",
                    "authLevelKey": "0110102019",
                    "status": "1",
                    "requestedQuantity": 1,
                    "authorizedQuantity": 1,
                    "auditing": "0",
                    "tableCode": "22",
                    "procedureCode": "10102019",
                    "procedureDescription": "VISITA HOSPITALAR - PACIENTE INTERNADO",
                    "rejectionCauses": []
                }
            ]
        }
    ],
    "hasNext": false
}
Sucesso 200 - Guia encontrada Situação Inicial
{
    "items": [
        {
            "sequencial": "00000000000000000001",
            "idOnHealthProvider": "132ASD3213213DASD",
            "idOnHealthInsurer": "00000000000000000001",
            "mainAuthorizationCode": "000120180100000619",
            "periodontalDisease": "0",
            "softTissuesChange": "1",
            "observation": "",
            "healthProviderId": "000004",
            "requestedDate": "2023-12-19",
            "operatorMainGuide": "",
            "tissSequentialTransaction": "000000112500",
            "attachType": "17",
            "subscriberId": "00010013000001003",
            "teeth": [
                {
                    "tooth": "11",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "12",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "13",
                    "toothStatus": 2,
                    "supranumerary": "0"
                },
                {
                    "tooth": "14",
                    "toothStatus": 2,
                    "supranumerary": "0"
                },
                {
                    "tooth": "15",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "16",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "17",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "18",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "21",
                    "toothStatus": 5,
                    "supranumerary": "0"
                },
                {
                    "tooth": "22",
                    "toothStatus": 5,
                    "supranumerary": "0"
                },
                {
                    "tooth": "23",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "24",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "25",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "26",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "27",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "28",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "31",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "32",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "33",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "34",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "35",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "36",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "37",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "38",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "41",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "42",
                    "toothStatus": 3,
                    "supranumerary": "0"
                },
                {
                    "tooth": "43",
                    "toothStatus": 4,
                    "supranumerary": "0"
                },
                {
                    "tooth": "44",
                    "toothStatus": 4,
                    "supranumerary": "0"
                },
                {
                    "tooth": "45",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "46",
                    "toothStatus": 4,
                    "supranumerary": "0"
                },
                {
                    "tooth": "47",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "48",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "51",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "52",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "53",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "54",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "55",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "61",
                    "toothStatus": 3,
                    "supranumerary": "0"
                },
                {
                    "tooth": "62",
                    "toothStatus": 3,
                    "supranumerary": "0"
                },
                {
                    "tooth": "63",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "64",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "65",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "71",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "72",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "73",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "74",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "75",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "81",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "82",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "83",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "84",
                    "toothStatus": 1,
                    "supranumerary": "0"
                },
                {
                    "tooth": "85",
                    "toothStatus": 1,
                    "supranumerary": "0"
                }
            ],
            "beneficiary": {
                "subscriberId": "00010013000001003",
                "name": "CARLOS ROBERTO",
                "socialName": "",
                "holderCPF": "44171339804",
                "birthdate": "1962-12-12",
                "weight": "",
                "height": "",
                "oldSubscriberId": "",
                "phoneNumber": "",
                "gender": "1",
                "holderRelationship": "T",
                "CNS": "758013750220006"
            },
            "attachments": {}
        }
    ],
    "hasNext": false
}

06. TABELAS UTILIZADAS

  • BEA - Atendimentos
  • BE2 - Autorização e Procedimentos
  • BEG - Autorizações Eventos Críticos 
  • B4A - Cabecalho Quimio/Radio/Opme
  • B4C - Itens anexos
  • BEG - Autorizações Eventos Críticos
  • B4Q - Cabeçalho Prorrogação Internação
  • BQV - Evolução das Diárias
  • BQZ - Críticas da Evolução de Diária
  • BEC - Anexo situação Inicial 
  • BA1 - Usuários