Busca de Paciente
O paciente pode ser localizado dentro de um acompanhamento específico ou dentro de um programa como um todo.
Busca por acompanhamento
Endpoint: /integration/api/v1/follow-up-patient/{followupSlug}/{cpf}
Para buscar o paciente dentro de um acompanhamento, é necessário utilizar o slug do acompanhamento
e o CPF
do paciente.
Exemplo:
curl --location --request GET 'https://patient-care-homolog.azurefd.net/integration/api/v1/followup-up-patient/<followupSlug>/<cpf>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization': 'Bearer <token>'
Retorno:
{
"cpf": "string",
"isPrescriptionValid": true,
"isEligible": true,
"idPlanPhase": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"planPhase": "string",
"isActive": true,
"patientCycleHistory": [
{
"cycleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"dosage": "string",
"daysLate": 0,
"cycle": "string",
"createdDate": "2022-10-24T17:18:58.295Z"
}
]
}
Busca por programa
Endpoint: /integration/api/v2/clients/{clientId}/program/{programSlug}/patients
Para buscar o paciente dentro de um programa, é necessário utilizar o id do cliente
, o slug do programa
e o CPF
ou telefone
do paciente.
O id do cliente
e o slug do programa
fazem parte da URL. Já o CPF ou Telefone são enviados como query strings
.
Exemplo com CPF:
curl --location --request GET 'https://patient-care-homolog.azurefd.net/integration/api/v2/clients/<clientId>/program/<programSlug>/patients?cpf=<cpf>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization': 'Bearer <token>'
Exemplo com Telefone:
curl --location --request GET 'https://patient-care-homolog.azurefd.net/integration/api/v2/clients/<clientId>/program/<programSlug>/patients?telefone=<telefone>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization': 'Bearer <token>'
Retorno:
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cpf": "string",
"name": "string",
"program": {
"name": "string" // nome do programa
},
"followUp": {
"name": "string", // nome do acompanhamento
"slug": "string" // slug do acompanhamento
},
"phase": {
"name": "string" // nome da fase atual que o paciente se encontra
},
"isActive": true,
"acceptedProgramTerms": true,
"acceptedCall": true,
"acceptedSms": true,
"acceptedWhatsapp": true,
"acceptedEmail": true
}
]