Goal

Introduction #

The Goal model represents a patient Goal in Canvas, which is always associated with a Note and a Patient.

Basic usage #

To get a goal by identifier, use the get method on the Goal model manager:

from canvas_sdk.v1.data.goal import Goal

goal = Goal.objects.get(id="b80b1cdc-2e6a-4aca-90cc-ebc02e683f35")

If you have a patient object, or note object, the goals for a patient or note can be accessed with the goals attribute on a Patient or Note object:

from canvas_sdk.v1.data.patient import Patient
from canvas_sdk.v1.data.note import Note

patient = Patient.objects.get(id="1eed3ea2a8d546a1b681a2a45de1d790")
goals = patient.goals.all()

note = Note.objects.get(id="89992c23-c298-4118-864a-26cb3e1ae822")
goals = note.goals.all()

Filtering #

Goals can be filtered by any attribute that exists on the model.

Filtering for goals is done with the filter method on the Goal model manager.

By attribute #

Specify an attribute with filter to filter by that attribute:

from canvas_sdk.v1.data.goal import Goal, GoalAchievementStatus

goals = Goal.objects.filter(achievement_status=GoalAchievementStatus.IN_PROGRESS)

Attributes #

Goal #

Field NameType
idUUID
dbidInteger
createdDateTime
modifiedDateTime
originatorCanvasUser
committerCanvasUser
entered_in_errorCanvasUser
patientPatient
noteNote
lifecycle_statusGoalLifecycleStatus
achievement_statusGoalAchievementStatus
priorityGoalPriority
due_dateDate
start_dateDate
progressString
goal_statementString

Enumeration types #

GoalLifecycleStatus #

NameValue
PROPOSEDproposed
PLANNEDplanned
ACCEPTEDaccepted
ACTIVEactive
ON_HOLDon-hold
COMPLETEDcompleted
CANCELLEDcancelled
REJECTEDrejected

GoalAchievementStatus #

NameValue
IN_PROGRESSin-progress
IMPROVINGimproving
WORSENINGworsening
NO_CHANGEno-change
ACHIEVEDachieved
SUSTAININGsustaining
NOT_ACHIEVEDnot-achieved
NO_PROGRESSno-progress
NOT_ATTAINABLEnot-attainable

GoalPriority #

NameValue
HIGHhigh-priority
MEDIUMmedium-priority
LOWlow-priority