Skip to main content
GET
/
patients
/
{id}
curl -X GET /patients/65f8a1b2c3d4e5f6789012ab?uid=doctor_uid_123 \
  -H "Authorization: Bearer your_jwt_token_here"
{
  "success": true,
  "data": {
    "_id": "65f8a1b2c3d4e5f6789012ab",
    "doctor_id": "doctor_uid_123",
    "firstName": "John",
    "lastName": "Doe",
    "dateOfBirth": "1985-06-15",
    "address": {
      "street": "123 Main St",
      "city": "New York",
      "state": "NY",
      "zipCode": "10001"
    },
    "insurance": {
      "provider": "Blue Cross",
      "policyNumber": "BC123456"
    },
    "medicalHistory": "No significant medical history",
    "currentMedications": "None",
    "contact": {
      "phone": "+1234567890",
      "email": "[email protected]"
    }
  }
}

Overview

Fetches detailed information for a specific patient by their ID. The patient must belong to the requesting doctor for security.

Authentication

Authorization
string
required
Bearer token for authenticated access
Authorization: Bearer your_jwt_token_here

Path Parameters

id
string
required
Patient identifier (ObjectId format)

Query Parameters

uid
string
required
Doctor’s user ID (for verification that the patient belongs to this doctor)

Response

success
boolean
Whether the request was successful
data
object
The patient object
error
string
Error message (only present when success is false)

Example Request

curl -X GET /patients/65f8a1b2c3d4e5f6789012ab?uid=doctor_uid_123 \
  -H "Authorization: Bearer your_jwt_token_here"

Example Response

{
  "success": true,
  "data": {
    "_id": "65f8a1b2c3d4e5f6789012ab",
    "doctor_id": "doctor_uid_123",
    "firstName": "John",
    "lastName": "Doe",
    "dateOfBirth": "1985-06-15",
    "address": {
      "street": "123 Main St",
      "city": "New York",
      "state": "NY",
      "zipCode": "10001"
    },
    "insurance": {
      "provider": "Blue Cross",
      "policyNumber": "BC123456"
    },
    "medicalHistory": "No significant medical history",
    "currentMedications": "None",
    "contact": {
      "phone": "+1234567890",
      "email": "[email protected]"
    }
  }
}

Error Responses

{
  "success": false,
  "error": "Patient not found"
}
{
  "success": false,
  "error": "Failed to fetch patient"
}