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 planGET
/api/v1/care-plans/List care plansGET
/api/v1/care-plans/{id}/Get care plan detailsPUT
/api/v1/care-plans/{id}/Update care planPOST
/api/v1/activities/Add activity to care planGET
/api/v1/activities/List activitiesThe CarePlan Object
Attributes
iduuidUnique identifier.
patient_uhidstringPatient UHID.
titlestringCare plan title.
descriptionstringnullableCare plan description.
statusstringStatus: draft, active, completed, revoked.
intentstringIntent: proposal, plan, order.
categorystringCategory of care plan.
period_startdateStart date.
period_enddatenullableEnd date.
author_iduuidCreating provider ID.
author_namestringProvider name.
activitiesarrayList of activities.
goalsarrayList of goals.
fhir_care_plan_idstringFHIR 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_uhidstringrequiredPatient UHID
titlestringrequiredCare plan title
categorystringrequiredCategory
descriptionstringoptionalDescription
period_startdateoptionalStart date
period_enddateoptionalEnd 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
| Status | Description |
|---|---|
draft | Care plan is being developed |
active | Care plan is currently active |
on-hold | Care plan is temporarily paused |
completed | Care plan goals achieved |
revoked | Care plan was cancelled |