Skip to content

Goal Profile

Canonical../StructureDefinition/nexus-emr-core-goal
Statusdraft (experimental) · 1.26.0
BaseGoal (constraint)
SourceFSH · JSON

Nexus EMR profile for Goal -- the measurable target behind CDM flowsheets and care gaps. First pass: lifecycle, description, target (measure/detail/due), addresses. Closed to SMART apps pending an exposure decision.

TypedFhir API / Pydantic schema

The typed accessor surface Goal exposes for Goal — generated from this IG's compiled profile; each typed accessor has a validating raw-FHIR twin (xRaw) where marked. The three ports are parity-enforced.

The AI-facing shape: from typed_fhir.facade.generated.schemas import GoalSchemamodel_json_schema() is a structured-output / tool definition; instantiating validates an extraction. Generated source.

class GoalSchema(BaseModel):
    """AI-facing shape of the Goal profile: the facade's typed accessor
    surface (curated + salient fields) as a pydantic model. `model_json_schema()` is a
    structured-output / tool schema; instantiating validates an extraction."""

    model_config = ConfigDict(extra="forbid")

    lifecycle_status: Literal[
        "accepted",
        "active",
        "cancelled",
        "completed",
        "entered-in-error",
        "on-hold",
        "planned",
        "proposed",
        "rejected",
    ] | None = Field(
        None,
        description=(
            "proposed | planned | accepted | active | on-hold | completed | cancelled | "
            "entered-in-error | rejected. The state of the goal throughout its lifecycle. Note: "
            "This is a modifier element. A `proposed` Goal that is being SUGGESTED rides in the "
            "transaction Bundle contained in its review Task, like every other suggested resource "
            "-- it does not sit first-class in the chart before someone accepts it. (This "
            "element's `proposed` code is Goal's own lifecycle vocabulary and is unrelated to "
            "`Task.intent`.). Goal.lifecycleStatus — 1..1"
        ),
    )
    achievement_status: Concept | None = Field(
        None,
        description=(
            "in-progress | improving | worsening | no-change | achieved | sustaining | "
            "not-achieved | no-progress | not-attainable. Describes the progression, or lack "
            "thereof, towards the goal against the target. Goal.achievementStatus — 0..1. codes "
            "(preferred): achieved | improving | in-progress | no-change | no-progress | "
            "not-achieved | not-attainable | sustaining | …"
        ),
    )
    category: Concept | None = Field(
        None,
        description=(
            "E.g. Treatment, dietary, behavioral, etc. Indicates a category the goal falls "
            "within. Goal.category — 0..*"
        ),
    )
    priority: Concept | None = Field(
        None,
        description=(
            "high-priority | medium-priority | low-priority. Identifies the mutually agreed level "
            "of importance associated with reaching/sustaining the goal. Note: Extensions are "
            "available to track priorities as established by each participant (i.e. Priority from "
            "the patient's perspective, different practitioners' perspectives, family member's "
            "perspectives) The ordinal extension on Coding can be used to convey a numerically "
            "comparable ranking to priority. (Keep in mind that different coding systems may use "
            "a \"low value=important\". Goal.priority — 0..1. codes (preferred): high-priority | "
            "low-priority | medium-priority"
        ),
    )
    description: Concept | None = Field(
        None,
        description=(
            "The goal, human-readable ('HbA1c under 7%'). Human-readable and/or coded description "
            "of a specific desired objective of care, such as \"control blood pressure\" or "
            "\"negotiate an obstacle course\" or \"dance with child at wedding\". Note: If no code is "
            "available, use CodeableConcept.text. Goal.description — 1..1"
        ),
    )
    subject: Reference | None = Field(
        None,
        description=(
            "The patient. Identifies the patient, group or organization for whom the goal is "
            "being established. Goal.subject — 1..1"
        ),
    )
    target: dict | None = Field(
        None,
        description=(
            "The measurable target a flowsheet row checks against. Indicates what should be done "
            "by when. Note: When multiple targets are present for a single goal instance, all "
            "targets must be met for the overall goal to be met. Goal.target — 0..*"
        ),
    )
    addresses: Reference | None = Field(
        None,
        description=(
            "The condition(s) this goal manages. The identified conditions and other health "
            "record elements that are intended to be addressed by the goal. Goal.addresses — 0..*"
        ),
    )
    outcome_code: Concept | None = Field(
        None,
        description=(
            "What result was achieved regarding the goal?. Identifies the change (or lack of "
            "change) at the point when the status of the goal is assessed. Note: Note that this "
            "should not duplicate the goal status. Goal.outcomeCode — 0..*"
        ),
    )