Histórico da Página
CONTEÚDO
- Visão Geral
- Configurações INI
- Verbos
- Exemplo de Chamada da API
- Atributos de Resposta
- Exemplos de JSON de Resposta
01. VISÃO GERAL
A API authorizations tem como objetivo, retornar os dados de uma guia gerada no sistema SIGAPLS. A API recebe um path param com a matrícula, e retorna todos os dados das tabelas BEA, BE2 e BEG dessa guia:
Tabela | Atributo |
---|---|
BEA | |
BE2 | procedures |
BEG | rejectionCauses |
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:
1. Configuração do REST do Protheus
Com o INI Protheus configurado, a nomenclatura das API´s ficará no formato: <url + Porta + chave rest definidos no INI Protheus> + /totvsHealthPlans/v1/authorizations/<guia>. Exemplo:
Logo, a minha URL será: http://localhost:8080/rest/totvsHealthPlans/v1/authorizations/<guia>
03. VERBOS
Seguem os verbos disponíveis na API:
Verbo | Path | Path Param | Descrição |
---|---|---|---|
GET | authorizations | idHealthIns (número da guia) | Guia realizada pelo beneficiário |
04. EXEMPLO DE CHAMADA DA API
Exemplo de chamada para a guia 0001.2022.09.00000215:
http://localhost:8080/rest/totvsHealthPlans/v1/authorizations/000120220900000215
05. ATRIBUTOS DE RESPOSTA
Cabeçalho
Atributo | Campo | Tipo |
---|---|---|
subscriberId | BEA_OPEUSR+BEA_CODEMP+BEA_MATRIC+BEA_TIPREG+BEA_DIGITO | Caracter |
primaryICD | BEA_CID | Caracter |
attendanceLocation | BEA_LOCAL | Caracter |
password | BEA_SENHA | Caracter |
accidentIndication | BEA_INDACI | Caracter |
attendanceModel | BEA_TIPADM | Caracter |
attendanceProtocol | BEA_PROATE | Caracter |
attendanceType | BEA_TIPATE | Caracter |
authorizationDate | BEA_DATPRO | Data |
authorizationStatus | BEA_STATUS | Caracter |
authorizationType | BEA_TIPGUI | Caracter |
billingType | BEA_TIPFAT | Caracter |
clinicalCondition | BEA_INDCLI | Caracter |
closingReason | BEA_TIPSAI | Caracter |
consultationType | BEA_TIPCON | Caracter |
endTreatmentDate | BEA_DPTETA | Data |
healthProviderId | BEA_CODRDA | Caracter |
idAuthOnHealthProvider | BEA_GUIPRE | Caracter |
locationCode | BEA_CODLOC | Caracter |
mainAuthorizationCode | BEA_GUIPRI | Caracter |
newbornAttendance | BEA_ATERNA | Caracter |
passwordExpireDate | BEA_VALSEN | Data |
priorAuthorization | BEA_LIBERA | Caracter |
priorAuthorizationStatus | BEA_STALIB | Caracter |
professionalRequestorId | BEA_CDPFSO | Caracter |
professionalExecutorId | BEA_CDPFRE | Caracter |
requestDate | BEA_DATSOL | Data |
attendanceToken | BEA_TOKEDI | Caracter |
missingValidationCode | BEA_AUSVLD | Caracter |
specialtyCode | BEA_CODESP | Caracter |
professionalRequestorCouncil | BEA_SIGLA | Caracter |
professionalRequestorState | BEA_ESTSOL | Caracter |
professionalRequestorCouncilNumber | BEA_REGSOL | Caracter |
professionalRequestorSpecialtyCode | BEA_ESPSOL | Caracter |
professionalExecutorCouncil | BEA_SIGEXE | Caracter |
professionalExecutorState | BEA_ESTEXE | Caracter |
professionalExecutorCouncilNumber | BEA_REGEXE | Caracter |
dischargedType | BE4_TIPALT | Caracter |
dischargedDate | BE4_DTALTA | Data |
dischargedHour | BE4_HRALTA | Caracter |
expectedHospitalizationDate | BE4_PRVINT | Data |
hospType | BE4_TIPINT | Caracter |
Atributo procedures
Atributo | Campo | Tipo |
---|---|---|
authLevel | BE2_NIVAUT | Caracter |
sequence | BE2_SEQUEN | Caracter |
status | BE2_STATUS | Caracter |
requestedQuantity | BE2_QTDSOL | Numérico |
authorizedQuantity | BE2_QTDPRO | Numérico |
balance | BE2_SALDO | Numérico |
unitaryWorth | BE2_VLRAPR | Numérico |
executionDate | BE2_DATPRO | Data |
startingTime | BE2_HORPRO | Caracter |
endingTime | BE2_HORFIM | Caracter |
accessWay | BE2_VIA | Caracter |
usedTechnique | BE2_TECUTI | Caracter |
authLevelKey | BE2_CHVNIV | Caracter |
auditing | BE2_AUDITO | Caracter |
priorAuthorization | BE2_LIBERA | Caracter |
priorAuthorizationStatus | BE2_STALIB | Caracter |
tableCode | BE2_CODPAD | Caracter |
procedureCode | BE2_CODPRO | Caracter |
Atributo rejectionCauses
Atributo | Campo | Tipo |
---|---|---|
procedureSequence | BEG_SEQUEN | Caracter |
code | BEG_CODGLO | Caracter |
rejectionSequence | BEG_SEQCRI | Caracter |
description | BEG_DESGLO | Caracter |
06. EXEMPLOS DE JSON DE RESPOSTA
Bloco de código | ||
---|---|---|
| ||
{ "endTreatmentDate": null, "locationCode": "001", "professionalRequestorSpecialtyCode": "063", "professionalRequestorCouncil": "CRM", "professionalExecutorCouncil": "", "procedures": [ { "status": "0", "sequence": "001", "endingTime": "1800", "auditing": "1", "requestedQuantity": 1, "startingTime": "1800", "tableCode": "22", "authorizedQuantity": 1, "accessWay": "", "priorAuthorization": "0", "priorAuthorizationStatus": "", "rejectionCauses": [ { "code": "", "procedureSequence": "001", "rejectionSequence": "002", "description": "NÍVEL: BRV - PLANOS E GRUPOS DE COBERTURA ( 02 - ATUALIZACOES / PRODUTO SAUDE / PRODUTO SAUDE --> FOLDER COBERTURA/CAREN" }, { "code": "025", "procedureSequence": "001", "rejectionSequence": "001", "description": "PARA ESTE PROCEDIMENTO NECESSITA AUDITORIA." } ], "executionDate": "2022-09-15", "procedureCode": "10101012", "unitaryWorth": 0, "authLevelKey": "00010001001022", "balance": 0, "usedTechnique": "", "authLevel": "" } ], "healthProviderId": "000004", "consultationType": "1", "requestDate": null, "dischargedDate": null, "hospType": "", "priorAuthorizationStatus": "", "newbornAttendance": "0", "professionalExecutorState": "", "attendanceLocation": "008", "specialtyCode": "002", "authorizationType": "01", "passwordExpireDate": "2022-10-15", "professionalRequestorId": "A01834", "missingValidationCode": "01", "attendanceModel": "1", "attendanceToken": "", "professionalRequestorCouncilNumber": "654321", "professionalExecutorCouncilNumber": "", "subscriberId": "00010101000007012", "billingType": "", "dischargedType": "", "professionalExecutorId": "", "accidentIndication": "9", "priorAuthorization": "0", "idAuthOnHealthProvider": "", "password": "", "attendanceType": "05", "attendanceProtocol": "88888820220915300033", "dischargedHour": null, "authorizationStatus": "6", "primaryICD": "", "professionalRequestorState": "SP", "authorizationDate": "2022-09-15", "mainAuthorizationCode": "", "expectedHospitalizationDate": null, "closingReason": "", "clinicalCondition": "" } |
Bloco de código | ||
---|---|---|
| ||
{ "code": 400, "message": "Guia informada nao encontrada", "detailedMessage": "Entre em contato com o Suporte", "helpUrl": "", "details": [ { "code": "", "message": "", "detailedMessage": "", "helpUrl": "" } ] } |