Care Plan Service — Event Schemas
Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · 03 platform-services · 02 DDD
Events Produced
All events use CloudEvents v1.0 envelope. NATS subject = event type.
| Event type (subject) | Version | Retention class | Trigger |
|---|---|---|---|
care_plan.care_plan.created.v1 | v1 | clinical — 10 years | New care plan persisted |
care_plan.care_plan.updated.v1 | v1 | clinical — 10 years | Status or metadata changed |
care_plan.care_plan.reviewed.v1 | v1 | clinical — 10 years | Review workflow completed |
care_plan.goal.created.v1 | v1 | clinical — 10 years | Goal added to plan |
care_plan.goal.updated.v1 | v1 | clinical — 10 years | Goal status or target changed |
care_plan.activity.created.v1 | v1 | clinical — 10 years | Activity added |
care_plan.activity.completed.v1 | v1 | clinical — 10 years | Activity marked complete |
care_plan.care_team.updated.v1 | v1 | clinical — 10 years | Care team membership changed |
Events Consumed
| Event type | Source service | Purpose |
|---|---|---|
registration.patient.registered.v1 | registration-service | Validate patientId exists (async enrichment, not blocking write) |
identity.user.deactivated.v1 | identity-service | Check if care team members are deactivated (alert only) |
Payload Schemas
care_plan.care_plan.created.v1
{
"specversion": "1.0",
"type": "care_plan.care_plan.created.v1",
"source": "https://platform.ghasi.health/services/care-plan-service",
"id": "evt_01...",
"time": "2026-04-18T10:00:00Z",
"tenantid": "ten_01...",
"actorid": "usr_01...",
"correlationid": "req_01...",
"datacontenttype": "application/json",
"data": {
"carePlanId": "cp_01...",
"patientId": "pat_01...",
"tenantId": "ten_01...",
"title": "Diabetes Management Plan",
"status": "draft",
"category": { "coding": [{ "system": "http://snomed.info/sct", "code": "734163000" }] },
"version": 1,
"createdAt": "2026-04-18T10:00:00Z",
"createdBy": "usr_01..."
}
}
care_plan.care_plan.updated.v1
{
"data": {
"carePlanId": "cp_01...",
"patientId": "pat_01...",
"tenantId": "ten_01...",
"previousStatus": "draft",
"newStatus": "active",
"version": 2,
"updatedAt": "2026-04-18T11:00:00Z",
"updatedBy": "usr_01..."
}
}
care_plan.goal.created.v1
{
"data": {
"goalId": "cpg_01...",
"carePlanId": "cp_01...",
"patientId": "pat_01...",
"tenantId": "ten_01...",
"description": "Achieve HbA1c < 7%",
"status": "proposed",
"dueAt": "2026-09-01",
"createdAt": "2026-04-18T10:05:00Z"
}
}
care_plan.activity.completed.v1
{
"data": {
"activityId": "cpa_01...",
"carePlanId": "cp_01...",
"patientId": "pat_01...",
"tenantId": "ten_01...",
"description": "Monthly dietitian consultation",
"completedAt": "2026-05-18T09:30:00Z",
"completionNote": "Patient attended; diet plan adjusted",
"completedBy": "usr_01..."
}
}
care_plan.care_plan.reviewed.v1
{
"data": {
"carePlanId": "cp_01...",
"patientId": "pat_01...",
"tenantId": "ten_01...",
"reviewedBy": "usr_01...",
"reviewedAt": "2026-07-01T10:00:00Z",
"reviewNote": "Goals on track; plan extended",
"nextReviewDue": "2026-10-01",
"version": 4
}
}
NATS JetStream Configuration
| Stream | Subjects | Retention | Max age | Replicas |
|---|---|---|---|---|
CARE_PLAN_EVENTS | care_plan.> | limits | 10 years | 3 |
Consumer groups:
patient-chart-service— interested in allcare_plan.>events for chart displaypopulation-health-service— interested incare_plan.goal.*.v1communication-service— interested incare_plan.care_plan.reviewed.v1for reminder scheduling