Care Plans

Care Plans enable coordinated, patient-centered care by defining goals, activities, and care team members for managing a patient's health conditions.

Endpoints

POST/api/v1/care-plans/Create a care plan
GET/api/v1/care-plans/List care plans
GET/api/v1/care-plans/{id}/Get care plan details
PUT/api/v1/care-plans/{id}/Update care plan
POST/api/v1/activities/Add activity to care plan
GET/api/v1/activities/List activities

The CarePlan Object

Attributes

iduuid

Unique identifier.

patient_uhidstring

Patient UHID.

titlestring

Care plan title.

descriptionstringnullable

Care plan description.

statusstring

Status: draft, active, completed, revoked.

intentstring

Intent: proposal, plan, order.

categorystring

Category of care plan.

period_startdate

Start date.

period_enddatenullable

End date.

author_iduuid

Creating provider ID.

author_namestring

Provider name.

activitiesarray

List of activities.

goalsarray

List of goals.

fhir_care_plan_idstring

FHIR resource ID.

RESPONSE200
{
  "id": "cp-123-456-789",
  "patient_uhid": "UG123456789A",
  "title": "Diabetes Management Plan",
  "description": "Comprehensive diabetes care plan",
  "status": "active",
  "intent": "plan",
  "category": "chronic-disease-management",
  "period_start": "2024-01-01",
  "period_end": "2024-12-31",
  "author_id": "prov-xyz-789",
  "author_name": "Dr. Sarah Nakamya",
  "activities": [
    {
      "id": "act-001",
      "title": "Daily blood glucose monitoring"
    },
    {
      "id": "act-002",
      "title": "Monthly HbA1c test"
    }
  ],
  "goals": [
    {
      "id": "goal-001",
      "description": "Maintain HbA1c below 7%"
    }
  ]
}

Create a Care Plan

POST/api/v1/care-plans/

Request Body

patient_uhidstringrequired

Patient UHID

titlestringrequired

Care plan title

categorystringrequired

Category

descriptionstringoptional

Description

period_startdateoptional

Start date

period_enddateoptional

End date

Request
bash
curl -X POST https://api.mediloop.co/api/v1/care-plans/ \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "patient_uhid": "UG123456789A",
    "title": "Diabetes Management Plan",
    "category": "chronic-disease-management",
    "description": "Comprehensive diabetes care",
    "period_start": "2024-01-01",
    "period_end": "2024-12-31"
  }'
RESPONSE201
{
  "id": "cp-new-123",
  "patient_uhid": "UG123456789A",
  "title": "Diabetes Management Plan",
  "status": "active",
  "created_at": "2024-01-15T10:00:00Z"
}

Add Activity

Add an activity to an existing care plan.

POST/api/v1/activities/
Request
bash
curl -X POST https://api.mediloop.co/api/v1/activities/ \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "care_plan_id": "cp-123-456",
    "title": "Daily blood glucose monitoring",
    "description": "Check fasting blood glucose every morning",
    "frequency": "daily",
    "status": "scheduled"
  }'
RESPONSE201
{
  "id": "act-new-001",
  "care_plan_id": "cp-123-456",
  "title": "Daily blood glucose monitoring",
  "status": "scheduled",
  "created_at": "2024-01-15T10:00:00Z"
}

Care Plan Status

StatusDescription
draftCare plan is being developed
activeCare plan is currently active
on-holdCare plan is temporarily paused
completedCare plan goals achieved
revokedCare plan was cancelled