Unified.to
All articles

How to Build Care Management on Care Plans and Goals from EHRs with Unified.to's Healthcare API

·

Your product can read a patient's care plans and the goals they work toward from AdvancedMD, athenahealth, CharmHealth, Epic, MEDITECH, NextGen Healthcare, Oracle Health, PointClickCare, SMART on FHIR, TruBridge and Veradigm through one connection (as of 24 October 2026). Orion Health returns care plans as well.

sdk.healthcare.listHealthcareCareplans and sdk.healthcare.listHealthcareGoals return the same Care Plan and Goal objects on each of them, linked to each other and to the conditions they address. Every request is executed directly against the customer's EHR.

Why does care management need the EHR's care plan?

A care management product that builds its own plan drifts from the one the clinician wrote, and the patient hears two different stories. Chronic care management, remote patient monitoring, value-based care and patient engagement apps all act on that plan: what the care team decided, which conditions it addresses, and what targets the patient is working toward (HbA1c below 7%, blood pressure below 130/80).

The EHR already holds the plan and its goals. Unified.to's Healthcare API returns care plans and goals as a Care Plan object and a Goal object, already linked, so your product can show and track the care team's plan instead of inventing one.

What are the steps to build a care-management view?

A care-management view: each active plan, the conditions it addresses, its goals with target dates and progress, and the readings that measure them.

  1. Authorize the customer's EHR and store one connection ID
  2. List the patient's care plans and goals
  3. Link goals to plans, and both to the problem list
  4. Track progress against goals with observations
  5. Pick up changes where supported

List plans and goals

import { UnifiedTo } from '@unified-api/typescript-sdk';

const sdk = new UnifiedTo({
  security: { jwt: process.env.UNIFIED_API_KEY },
});

const [careplans, goals] = await Promise.all([
  sdk.healthcare.listHealthcareCareplans({ connectionId, patientId }),
  sdk.healthcare.listHealthcareGoals({ connectionId, patientId }),
]);

What do the Care Plan and Goal fields mean?

Care Plan

name and description are the plan's title and summary. status is DRAFT, ACTIVE, ON_HOLD, REVOKED, COMPLETED, ENTERED_IN_ERROR or UNKNOWN; show ACTIVE plans by default.

condition_ids are the problems the plan addresses, goal_ids the goals it works toward, and practitioner_ids the clinicians who wrote or contributed to it. start_at and end_at give its period, and notes holds free-text instructions.

Goal

name is the goal as written ("HbA1c below 7%"), with codes when it's coded.

status is the lifecycle: PROPOSED, PLANNED, ACCEPTED, ACTIVE, ON_HOLD, COMPLETED, CANCELLED, REJECTED or ENTERED_IN_ERROR.

achievement_status is the care team's assessment of progress: IN_PROGRESS, IMPROVING, WORSENING, NO_CHANGE, ACHIEVED, SUSTAINING, NOT_ACHIEVED, NO_PROGRESS or NOT_ATTAINABLE. Show it next to your own measurements; it's the clinician's judgment, not a calculation.

start_at and due_at frame the goal, practitioner_id is who set it, and condition_ids what it addresses.

Each care plan's goal_ids and condition_ids point at Goal and Condition records, so index goals by ID and look them up:

const goalsById = new Map(goals.map((g) => [g.id, g]));

const plans = careplans
  .filter((plan) => plan.status === 'ACTIVE')
  .map((plan) => ({
    plan,
    goals: (plan.goal_ids ?? []).map((id) => goalsById.get(id)).filter(Boolean),
  }));

Some EHRs record goals without linking them to a plan. Show unlinked active goals in their own section rather than dropping them.

To show the conditions, list them once with listHealthcareConditions (see How to Build a Patient Chart Summary) and look them up by condition_ids, the same way.

Track progress with observations

Goals state targets; observations hold the measurements. For a blood-pressure goal, read the patient's vital signs and plot them against due_at:

const vitals = await sdk.healthcare.listHealthcareObservations({
  connectionId,
  patientId,
  type: 'VITAL_SIGNS',
});

Where your product collects readings (remote monitoring devices, patient-entered values), you can write them back as observations on EHRs that accept them, so the care team sees the same numbers in the chart.

What if an EHR doesn't return care plans or goals?

Check support before you scope on the Supported Integrations page. Orion Health returns care plans but not goals, and lists care plans without fetching them one by one (as of 24 October 2026).

Handle 501 separately from an empty list. An empty list means the patient has no plan; 501 means the EHR doesn't return plans or goals through Unified.to.

Plans and goals are read-only through the unified objects. The care team owns the plan; your product reads and tracks it.

How do I pick up changes to plans and goals?

On SMART on FHIR, TruBridge and Veradigm (as of 24 October 2026), updatedGte and Unified.to's [virtual webhooks](/blog/what_are_virtual_webhooks_how_they_differ_from_sync_based_webhooks) for healthcare_careplan and healthcare_goal deliver changes, such as a goal being marked achieved. On the others, read before each outreach or review cycle.

→ Start your 30-day free trial → Book a demo

All articles