Árvore de páginas

CONTEÚDO

  1. Visão Geral
  2. Configurações INI
  3. Verbos
  4. Exemplo de Chamada da API
  5. Atributos de Resposta
  6. Exemplos de JSON de Resposta


01. VISÃO GERAL

A API executions tem como objetivo, trabalhar com ações relacionadas as guias geradas no sistema de gestão Plano de Saúde.


VERBO GET

Retornar Dados de uma Guia

Através do verbo GET, a API irá retornar os dados das execuções vinculadas a liberação enviada.


Guias SADT:

TabelaAtributo
BEA(raiz do json)
BE2procedures




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/executions/<guia>. Exemplo:

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

Logo, a minha URL será: http://localhost:8080/rest/totvsHealthPlans/v1/executions/<guia>

03. VERBOS

Seguem os verbos disponíveis na API:

VerboPathPath ParamQuery ParamDescrição
GETexecutionsidHealthIns (número da guia)
Numero da liberação

04. EXEMPLO DE CHAMADA DA API

Chamada GET - Retorna dados de uma Guia

Exemplo de chamada para a guia 0001.2024.04.00000196:

http://localhost:8080/rest/totvsHealthPlans/v1/executions/000120240400000196



05. ATRIBUTOS DE RESPOSTA


CHAMADA GET

Cabeçalho

AtributoCampoTipo

subscriberId

BEA_OPEUSR+BEA_CODEMP+BEA_MATRIC+BEA_TIPREG+BEA_DIGITOCaracter
primaryICDBEA_CIDCaracter
attendanceLocationBEA_LOCALCaracter
passwordBEA_SENHACaracter
accidentIndicationBEA_INDACICaracter
attendanceModelBEA_TIPADMCaracter
attendanceProtocolBEA_PROATECaracter
attendanceTypeBEA_TIPATECaracter
authorizationDateBEA_DATPROData
authorizationStatusBEA_STATUSCaracter
authorizationTypeBEA_TIPGUICaracter
billingTypeBEA_TIPFATCaracter
clinicalConditionBEA_INDCLICaracter
closingReasonBEA_TIPSAICaracter
consultationTypeBEA_TIPCONCaracter
endTreatmentDateBEA_DPTETAData
healthProviderIdBEA_CODRDACaracter
idAuthOnHealthProviderBEA_GUIPRECaracter
locationCodeBEA_CODLOCCaracter
mainAuthorizationCodeBEA_GUIPRICaracter
newbornAttendanceBEA_ATERNACaracter
passwordExpireDateBEA_VALSENData
priorAuthorizationBEA_LIBERACaracter
priorAuthorizationStatusBEA_STALIBCaracter
professionalRequestorIdBEA_CDPFSOCaracter
professionalExecutorIdBEA_CDPFRECaracter
requestDateBEA_DATSOLData
attendanceTokenBEA_TOKEDICaracter
missingValidationCodeBEA_AUSVLDCaracter
specialtyCodeBEA_CODESPCaracter
professionalRequestorCouncilBEA_SIGLA Caracter
professionalRequestorStateBEA_ESTSOLCaracter
professionalRequestorCouncilNumberBEA_REGSOLCaracter
professionalRequestorSpecialtyCodeBEA_ESPSOLCaracter
professionalExecutorCouncilBEA_SIGEXECaracter
professionalExecutorStateBEA_ESTEXECaracter
professionalExecutorCouncilNumberBEA_REGEXECaracter
dischargedTypeBE4_TIPALTCaracter
dischargedDateBE4_DTALTAData
dischargedHourBE4_HRALTACaracter
expectedHospitalizationDateBE4_PRVINTData
hospTypeBE4_TIPINTCaracter


Atributo procedures

AtributoCampoTipo
authLevelBE2_NIVAUTCaracter
sequenceBE2_SEQUENCaracter
statusBE2_STATUSCaracter
requestedQuantityBE2_QTDSOLNumérico
authorizedQuantityBE2_QTDPRONumérico
balance BE2_SALDONumérico
unitaryWorthBD6_VLRPAG + BD6_VLRGLONumérico
executionDateBE2_DATPROData
startingTime BE2_HORPROCaracter
endingTimeBE2_HORFIMCaracter
accessWayBE2_VIACaracter
usedTechniqueBE2_TECUTICaracter
authLevelKeyBE2_CHVNIVCaracter
auditingBE2_AUDITOCaracter
priorAuthorizationBE2_LIBERACaracter
priorAuthorizationStatusBE2_STALIBCaracter
tableCodeBE2_CODPADCaracter
procedureCodeBE2_CODPROCaracter


Atributo rejectionCauses

AtributoCampoTipo
procedureSequenceBEG_SEQUEN/BEL_SEQUENCaracter
codeBEG_CODGLO/BEL_CODGLOCaracter
rejectionSequenceBEG_SEQCRI/BEL_SEQCRICaracter
descriptionBEG_DESGLO/BEL_DESGLOCaracter


06. EXEMPLOS DE JSON DE RESPOSTA


Solicitação GET:

Sucesso 202 - Guia encontrada
{
    "items": [
        {
            "ansRegistry": "888888",
            "idOnHealthInsurer": "000120240400000197",
            "idOnHealthProvider": "000120240400000197",
            "journey": "2",
            "subscriberId": "00010101000007012",
            "primaryICD": "",
            "attendanceLocation": "008",
            "password": "96753982225399803499",
            "accidentIndication": "9",
            "attendanceModel": "1",
            "attendanceProtocol": "88888820240402300053",
            "attendanceType": "02",
            "authorizationDate": "2024-04-02",
            "authorizationStatus": "1",
            "authorizationType": "2",
            "guideType": "02",
            "billingType": "",
            "clinicalCondition": "",
            "closingReason": "",
            "consultationType": "1",
            "endTreatmentDate": "",
            "healthProviderId": "000004",
            "idAuthOnHealthProvider": "",
            "locationCode": "001",
            "mainAuthorizationCode": "000120240400000196",
            "newbornAttendance": false,
            "passwordExpireDate": "2298-01-15",
            "priorAuthorization": false,
            "priorAuthorizationStatus": "",
            "professionalRequestorId": "000026",
            "professionalExecutorId": "",
            "requestDate": "2024-04-02",
            "attendanceToken": "",
            "missingValidationCode": "",
            "specialtyCode": "015",
            "specialCoverage": "",
            "attendanceScheme": "02",
            "occupationalHealth": "",
            "attendanceNote": " ",
            "professionalRequestorCouncil": "CRFA",
            "professionalRequestorState": "SP",
            "professionalRequestorCouncilNumber": "132456",
            "professionalRequestorSpecialtyCode": "005",
            "professionalExecutorCouncil": "",
            "professionalExecutorState": "",
            "professionalExecutorCouncilNumber": "",
            "dischargedType": "",
            "dischargedDate": "",
            "dischargedHour": "",
            "expectedHospitalizationDate": "",
            "expectedAdmissionDate": "",
            "hospitalizationDate": "",
            "hospitalizationHour": "",
            "hospType": "",
            "hasClinicalAttachment": false,
            "hasTreatmentExtension": false,
            "hasInitialSituation": false,
            ,
            "professional": {
                "idOnHealthInsurer": "000026",
                "phoneNumber": "9999999",
                "professionalCouncil": "CRFA",
                "professionalIdentifier": "",
                "professionalCouncilNumber": "132456",
                "name": "ROBERTO",
                "email": "",
                "stateAbbreviation": "SP",
                "cbos": {
                    "code": "221105",
                    "specialtyDescription": "Biologo",
                    "specialtyCode": "005",
                    "description": "Biologo"
                }
            },
            "procedures": [
                {
                    "authLevel": "BR8",
                    "sequence": "001",
                    "status": 1,
                    "requestedQuantity": 1,
                    "authorizedQuantity": 1,
                    "authorized": "S",
                    "balance": 0,
                    "unitaryWorth": 30,
                    "executionDate": "2024-04-02",
                    "startingTime": "1740",
                    "endingTime": "1740",
                    "accessWay": "1",
                    "usedTechnique": "",
                    "authLevelKey": "0110101013",
                    "auditing": "0",
                    "toothRegion": "",
                    "surfaces": "",
                    "priorAuthorization": "0",
                    "priorAuthorizationStatus": "2",
                    "obsAudito": "",
                    "medicalTeam": [
                        []
                    ],
                    "tableCode": "00",
                    "procedureCode": "10101013",
                    "procedureDescription": "GLICOSE",
                    "procedureType": "5",
                    "rejectionCauses": []
                }
            ]        
        }
    ],
    "hasNext": false
}
Falha 400 - Guia não encontrada
{
    "items": [],
    "hasNext": false
}