Patient Search
The patient can be located within a specific follow-up or within a program as a whole.
Search by follow-up
Endpoint: /integration/api/v1/follow-up-patient/{followupSlug}/{cpf}
To search for the patient within a follow-up, it is necessary to use the followup slug
and the patient's CPF
.
Example:
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>'
Result:
{
"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"
}
]
}
Search by program
Endpoint: /integration/api/v2/clients/{clientId}/program/{programSlug}/patients
To search for the patient within a program, it is necessary to use the client id
, the program slug
and the patient's CPF
or phone number
.
The client id
and the program slug
are part of the URL. The CPF
or phone number
are sent as query strings
.
CPF example:
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>'
Phone number example:
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>'
Result:
[
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"cpf": "string",
"name": "string",
"program": {
"name": "string" // program name
},
"followUp": {
"name": "string", // follow-up name
"slug": "string" // follow-up slug
},
"phase": {
"name": "string" // current patient phase
},
"isActive": true,
"acceptedProgramTerms": true,
"acceptedCall": true,
"acceptedSms": true,
"acceptedWhatsapp": true,
"acceptedEmail": true
}
]