# Add goals and progress reviews

Canonical page: https://docs.ovok.com/guides/whole-person-wellness/add-goals-and-progress-reviews

## What we are building [#what-we-are-building]

A simple flow for the member and coach to agree on a personal, non-clinical goal and revisit it over time.

## What you should already have [#what-you-should-already-have]

- An authenticated patient app from [step 3](./build-onboarding-authentication-and-profile).
- The coach relationship and server-side access boundary from [step 8](./add-the-coach-relationship).
- The FHIR [Goal](/api/fhir/r4/goal) and [CarePlan](/api/fhir/r4/care-plan) references.

## The implementation [#the-implementation]

Use a Goal for one member-chosen objective. The text below is an example, not a prescribed health target:

~~~ts
import { useOvok } from "@ovok/core/next/react";

export function useCreatePersonalGoal() {
  const client = useOvok();

  return async (patientId: string, description: string) => {
    return client.fhir.create({
      resourceType: "Goal",
      lifecycleStatus: "proposed",
      description: { text: description },
      subject: { reference: "Patient/" + patientId },
      startDate: new Date().toISOString().slice(0, 10),
    });
  };
}
~~~

Keep the goal in a proposed state until the member and coach agree. Then update the existing resource to the appropriate lifecycle state:

~~~ts
import { useOvok } from "@ovok/core/next/react";

export function useAcceptGoal() {
  const client = useOvok();

  return async (goal: Parameters<typeof client.fhir.update>[0]) =>
    client.fhir.update({
      ...goal,
      lifecycleStatus: "accepted",
    });
}
~~~

Load goals through an explicit Patient-scoped FHIR search in the member or coach context. The server-side policy must authorize each result. A step count, sleep entry or reflection does not automatically mean a goal was completed; the goal definition and the person's own review decide that.

A CarePlan is optional. Use it only if your workflow has a real plan with coordinated activities or participants. Do not create an empty CarePlan just to group a single Goal.

## Important Ovok decisions [#important-ovok-decisions]

- FHIR Goal provides a standard lifecycle, description and Patient subject. It does not supply wellness coaching logic.
- Keep goals specific to what the member chooses. Do not prescribe exercise, diet, sleep targets or medical treatment.
- Goal completion is not inferred from nearby Observations unless the goal's actual definition and an appropriate reviewed workflow establish that relationship.
- Access to Goal and CarePlan records is governed by the project's FHIR capabilities and AccessPolicy, not by the FHIR references alone.
- A coach's interpretation remains human. The app may prompt a review but must not generate a clinical recommendation.

## Expected result [#expected-result]

The member and coach can see a proposed goal, agree on it, and review its lifecycle state alongside the separate reflections and measurements.

## Common errors and troubleshooting [#common-errors-and-troubleshooting]

| Symptom | Check |
| --- | --- |
| Goal creation is denied | Check the Patient policy and project CapabilityStatement. Do not loosen authorization for every resource. |
| The screen marks a goal complete when a metric crosses a value | Remove the automatic inference unless the product has a reviewed and authorized rule for that goal. |
| CarePlan has no real plan content | Omit it; a single Goal can stand on its own. |
| A goal sounds like medical advice | Replace it with the member's own behavioral intention and review it with their coach. |

## Previous / next [#previous--next]

- Previous: [Step 8: Add the coach relationship](./add-the-coach-relationship)
- Next: [Step 10: Finish history, settings, localisation and validation](./finish-history-settings-localisation-and-validation)
