Care Plans
Protocols, draft-to-active enrollment, and provider-proposed plans.
A CarePlan is a patient's active treatment or monitoring plan. It instantiates a PlanDefinition, the governed, versioned protocol that describes the actions to perform. Palamond separates the two clearly: the PlanDefinition is the catalog template (shared, governed), and the CarePlan is the patient's instance. You read plans from the record plane; the enrollment endpoints own the lifecycle.
The shape
| Field | Purpose |
|---|---|
status | draft (not yet active), active, revoked, completed. |
intent | plan. |
subject | The patient. |
instantiatesCanonical | The PlanDefinition (pinned as url|version) this plan runs. |
addresses | The Condition the plan treats, when there is one. |
period | start is set when the plan becomes active. |
supportingInfo | The EpisodeOfCare that ties the journey together. |
The plan always pins the exact protocol version it instantiated. A version published later does not retroactively change an active plan.
The catalog
PlanDefinition resources are authored and deployed centrally as versioned canonicals. Your app does not resolve them itself: protocols.list lists what the organization offers, and entries with a protocol canonical are enrollable.
const catalog = await palamond.protocols.list();
const enrollable = catalog.filter((p) => p.protocol);
// [{ healthcareService: 'HealthcareService/...', name: '...', protocol: 'https://...|1.0.0' }]Enrollment is draft, then activate
Enrollment is a two-step lifecycle so a plan can be prepared before it starts driving work:
- Enroll (
enrollments.create) creates adraftCarePlan from the catalog entry. Nothing is scheduled yet. - Activate (
enrollments.activate) flips it toactive, setsperiod.start, and generates the plan's actions: immediate tasks, scheduled appointments, and recurring occurrences.
const { carePlan } = await palamond.enrollments.create({
healthcareService: enrollable[0].healthcareService,
});
// carePlan.status === 'draft'
const activated = await palamond.enrollments.activate(carePlan.id);
// activated.carePlan.status === 'active'The platform resolves the protocol behind the catalog entry server-side, so patients never need to read a PlanDefinition.
Enrolling is idempotent: re-enrolling in the same offering reuses the existing draft, so a double submit is safe. A plan that allows only a single enrollment answers 409 conflict when one already ran.
The full flow is in Enroll in a Care Plan.
Provider-proposed plans
A plan can also originate from the care team. When a provider selects a treatment and composes it, the platform stands up a draft CarePlan immediately, so the proposed plan is visible on the chart before the patient has decided. To the patient, this surfaces as a proposed plan they can accept or decline.
Show proposed plans by querying draft plans (searches are auto-scoped to the signed-in patient):
const proposed = await palamond.searchResources('CarePlan', { status: 'draft' });Accepting is activation: enrollments.activate flips the draft to active and instantiates exactly the version the patient was shown. Declining is enrollments.end, which revokes the draft and cancels its open work.
Do not try to activate a proposed plan by patching CarePlan.status: CarePlan is read-only on the record plane and the write answers 405. Use the enrollment endpoints, which keep the version pinning and the audit trail intact.
Reading a patient's plans
const plans = await palamond.searchResources('CarePlan', {
'status:not': 'revoked',
});Group by status to separate active plans from proposed ones, and read title and instantiatesCanonical to label them.