Skip to main content
GET
/
consultations
/
patient-history
/
{cpf}
curl https://api.medagenda.com/consultations/patient-history/12345678901
[
  {
    "consultationId": "550e8400-e29b-41d4-a716-446655440000",
    "dateTime": "2024-03-15T14:30:00",
    "duracaoMinutos": 60,
    "patient": {
      "cpf": "12345678901",
      "name": "João Silva",
      "email": "[email protected]",
      "dateOfBirth": "1985-06-15",
      "address": "Rua das Flores, 123, São Paulo, SP",
      "medicalHistory": "Hypertension, controlled with medication"
    },
    "doctor": {
      "crm": "123456SP",
      "name": "Dr. Maria Santos",
      "email": "[email protected]",
      "specialty": "Cardiologia",
      "telephone": "+5511987654321",
      "consultationValue": 350.00
    },
    "isUrgent": false,
    "observation": "Patient reports mild headaches for the past week"
  },
  {
    "consultationId": "770g0622-g4bd-63f6-c938-668877662222",
    "dateTime": "2024-02-10T09:00:00",
    "duracaoMinutos": 60,
    "patient": {
      "cpf": "12345678901",
      "name": "João Silva",
      "email": "[email protected]",
      "dateOfBirth": "1985-06-15",
      "address": "Rua das Flores, 123, São Paulo, SP",
      "medicalHistory": "Hypertension, controlled with medication"
    },
    "doctor": {
      "crm": "654321RJ",
      "name": "Dr. Carlos Mendes",
      "email": "[email protected]",
      "specialty": "Clínico Geral",
      "telephone": "+5521987654321",
      "consultationValue": 280.00
    },
    "isUrgent": false,
    "observation": "Annual checkup"
  }
]
Returns a complete consultation history for a patient identified by their CPF (Cadastro de Pessoas Físicas). This includes all past, present, and future consultations scheduled for the patient.

Path Parameters

cpf
string
required
Patient’s CPF number (11 digits, e.g., “12345678901”)

Response

Returns an array of consultation objects for the specified patient, ordered by the database.
consultations
array
Array of consultation objects for the patient
If the patient has no consultations, an empty array is returned with a 200 status code.
curl https://api.medagenda.com/consultations/patient-history/12345678901
[
  {
    "consultationId": "550e8400-e29b-41d4-a716-446655440000",
    "dateTime": "2024-03-15T14:30:00",
    "duracaoMinutos": 60,
    "patient": {
      "cpf": "12345678901",
      "name": "João Silva",
      "email": "[email protected]",
      "dateOfBirth": "1985-06-15",
      "address": "Rua das Flores, 123, São Paulo, SP",
      "medicalHistory": "Hypertension, controlled with medication"
    },
    "doctor": {
      "crm": "123456SP",
      "name": "Dr. Maria Santos",
      "email": "[email protected]",
      "specialty": "Cardiologia",
      "telephone": "+5511987654321",
      "consultationValue": 350.00
    },
    "isUrgent": false,
    "observation": "Patient reports mild headaches for the past week"
  },
  {
    "consultationId": "770g0622-g4bd-63f6-c938-668877662222",
    "dateTime": "2024-02-10T09:00:00",
    "duracaoMinutos": 60,
    "patient": {
      "cpf": "12345678901",
      "name": "João Silva",
      "email": "[email protected]",
      "dateOfBirth": "1985-06-15",
      "address": "Rua das Flores, 123, São Paulo, SP",
      "medicalHistory": "Hypertension, controlled with medication"
    },
    "doctor": {
      "crm": "654321RJ",
      "name": "Dr. Carlos Mendes",
      "email": "[email protected]",
      "specialty": "Clínico Geral",
      "telephone": "+5521987654321",
      "consultationValue": 280.00
    },
    "isUrgent": false,
    "observation": "Annual checkup"
  }
]

Use Cases

  • Patient Portal - Display consultation history to patients
  • Doctor Review - Allow doctors to review a patient’s consultation history before an appointment
  • Medical Records - Generate reports of patient visits
  • Billing - Track all consultations for billing purposes

Build docs developers (and LLMs) love