Kulcare Docs
DeveloperPatients

Patient History APIs

This document covers the patient history log endpoints for retrieving clinical events and activities.

Authentication

All patient history endpoints require authentication. Include the JWT token in the Authorization header:

Authorization: Bearer YOUR_AUTH_TOKEN

Base URL

/clinical

Endpoints Overview

MethodEndpointDescription
GET/clinical/patients/:patient_id/patient_historiesList histories for a specific patient

List Patient Histories

GET /clinical/patients/:patient_id/patient_histories

Retrieve patient history logs with optional filtering and pagination.

Query Parameters

ParameterTypeRequiredDescriptionExample
patient_idUUIDNoPatient ID (already in URL)019c9411-f78f-77c6-85e3-84b2b87e1dbb
facility_idUUIDNoFilter by facility01900002-0000-7000-8000-000000000001
keyStringNoFilter by history typeAPPOINTMENT, ENCOUNTER, PRESCRIPTION
practitioner_idUUIDNoFilter by practitioner01900004-0000-7000-8000-000000000004
start_dateDateNoFilter by date range (start)2026-01-01
end_dateDateNoFilter by date range (end)2026-01-31
pageIntegerNoPage number (default: 1)1
per_pageIntegerNoItems per page (default: 25, max: 100)25

Filter Values (key parameter)

Available history types for filtering:

KeyDescription
APPOINTMENTAppointment events
ENCOUNTERConsultation/encounter events
PRESCRIPTIONPrescription events
OBSERVATIONObservation/vitals events
NOTEClinical notes
LAB_REPORTLaboratory reports
IMMUNISATIONImmunization records
ALLERGYAllergy records
CONDITIONMedical conditions
CARE_PLANCare plan events
GOALTreatment goals
MEDICATION_REQUESTMedication requests
DIAGNOSTIC_REPORTDiagnostic reports
VITALSVital signs
PATIENT_PHOTOPatient photos
SHARED_RECORDShared medical records
TELEMEDICINE_PRESCRIPTIONTelemedicine prescriptions
THERAPY_NOTESTherapy notes
DERMA_EXAMINATIONDermatology examinations
NEURO_EXAMINATIONNeurology examinations
CARDIO_EXAMINATIONCardiology examinations
DENTAL_EXAMINATIONDental examinations
MEDICAL_RECORDMedical records

Example Request

# Using query parameter
curl -X GET "https://api.kulcare.com/clinical/patient_histories?patient_id=019c9411-f78f-77c6-85e3-84b2b87e1dbb&key=APPOINTMENT&start_date=2026-01-01&end_date=2026-01-31" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN"

# Using nested route
curl -X GET "https://api.kulcare.com/clinical/patients/019c9411-f78f-77c6-85e3-84b2b87e1dbb/patient_histories?per_page=50" \
  -H "Authorization: Bearer YOUR_AUTH_TOKEN"

Response

{
  "data": {
    "patient": {
      "id": "019c9411-f78f-77c6-85e3-84b2b87e1dbb",
      "name": "John Doe",
      "first_name": "John",
      "last_name": "Doe",
      "gender": "male",
      "date_of_birth": "1990-01-15",
      "phone_number": "+919999999999",
      "created_at": "2025-01-01T00:00:00Z"
    },
    "histories": [
      [
        {
          "id": "019c9411-f78f-77c6-85e3-84b2b87e1dbc",
          "key": "APPOINTMENT",
          "activity_ts": "2026-02-26T10:57:55.000000Z",
          "activity_data": {
            "id": "019c9411-f78f-77c6-85e3-84b2b87e1dba",
            "status": "arrived",
            "appointment_type": "walk_in",
            "start_time": "2026-02-26T10:57:55.000000Z",
            "end_time": null
          },
          "practice_viewable": true,
          "patient_viewable": true
        }
      ],
      [
        {
          "id": "019c9411-f78f-77c6-85e3-84b2b87e1dbd",
          "key": "ENCOUNTER",
          "activity_ts": "2026-02-25T09:30:00.000000Z",
          "activity_data": {
            "id": "019c9411-f78f-77c6-85e3-84b2b87e1db9",
            "status": "completed",
            "encounter_type": "consultation"
          },
          "practice_viewable": true,
          "patient_viewable": true
        }
      ]
    ]
  },
  "meta": {
    "pagination": {
      "current_page": 1,
      "next_page": null,
      "prev_page": null,
      "total_pages": 1,
      "total_count": 2
    }
  }
}

Response Fields

FieldTypeDescription
data.patientObjectPatient information (from PatientBlueprint)
data.historiesArray[Array]Array of daily grouped history logs
data.histories[].idUUIDUnique history log ID
data.histories[].keyStringHistory type (e.g., APPOINTMENT, ENCOUNTER)
data.histories[].activity_tsDateTimeTimestamp of the activity
data.histories[].activity_dataObjectType-specific activity data
data.histories[].practice_viewableBooleanWhether visible to practice
data.histories[].patient_viewableBooleanWhether visible to patient
meta.paginationObjectPagination metadata

Activity Data by History Type

APPOINTMENT

{
  "id": "uuid",
  "status": "arrived",
  "appointment_type": "walk_in",
  "start_time": "2026-02-26T10:57:55.000000Z",
  "end_time": null
}

ENCOUNTER

{
  "id": "uuid",
  "status": "completed",
  "encounter_type": "consultation",
  "start_time": "2026-02-25T09:30:00.000000Z",
  "end_time": "2026-02-25T10:00:00.000000Z"
}

PRESCRIPTION / MEDICATION_REQUEST

{
  "id": "uuid",
  "status": "active",
  "medications": [
    {
      "name": "Paracetamol",
      "dosage": "500mg",
      "frequency": " thrice a day",
      "duration": "5 days"
    }
  ]
}

OBSERVATION / VITALS

{
  "id": "uuid",
  "type": "vitals",
  "data": {
    "blood_pressure": "120/80",
    "heart_rate": 72,
    "temperature": 98.6
  }
}

Error Responses

404 Not Found

{
  "errors": [
    {
      "message": "Patient not found"
    }
  ]
}

401 Unauthorized

{
  "errors": [
    {
      "message": "Authentication required"
    }
  ]
}

On this page