Skip to main content

GoalSetter

Set and track patient goals as FHIR Goal resources. Supports lifecycle status management, achievement tracking, priority levels, and target date scheduling.

Usage

import { GoalSetter } from '@clinikapi/react';

<GoalSetter
  proxyUrl="/api/clinik"
  patientId="pt_abc123"
  expressedById="prac_def456"
  theme="light"
/>

Props

PropTypeRequiredDescription
proxyUrlstringYesBackend proxy URL
patientIdstringYesPatient ID
expressedByIdstringNoWho expressed the goal (practitioner or patient)
theme'light' | 'dark'NoColor theme

Form Fields

FieldDescription
DescriptionGoal description (e.g. “Reduce HbA1c to below 7%“)
Lifecycle statusproposed, accepted, active, completed, cancelled
Achievement statusin-progress, improving, worsening, no-change, achieved, not-achieved
Priorityhigh-priority, medium-priority, low-priority
Start dateWhen to begin working toward the goal
Target due dateTarget date for goal achievement
NoteAdditional notes about the goal

Lifecycle Status Values

StatusDescription
proposedGoal has been suggested
acceptedGoal has been accepted by the patient
activeGoal is being actively pursued
completedGoal tracking is complete
cancelledGoal has been cancelled

Achievement Status Values

StatusDescription
in-progressGoal is being worked on
improvingProgress is being made
worseningMoving away from the goal
no-changeNo progress detected
achievedGoal has been met
not-achievedGoal was not met

Proxy Action

The widget sends goals.create with:
{
  "action": "goals.create",
  "data": {
    "patientId": "pt_abc123",
    "expressedById": "prac_def456",
    "description": "Reduce HbA1c to below 7%",
    "lifecycleStatus": "active",
    "achievementStatus": "in-progress",
    "priority": "high-priority",
    "startDate": "2025-01-15",
    "targetDueDate": "2025-07-15",
    "note": "Patient motivated to improve diabetes control through diet and exercise"
  }
}