Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Goal.shex

Patient Care Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient

Raw ShEx

ShEx statement for goal

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

IMPORT <code.shex>
IMPORT <date.shex>
IMPORT <Group.shex>
IMPORT <Range.shex>
IMPORT <Ratio.shex>
IMPORT <string.shex>
IMPORT <boolean.shex>
IMPORT <Patient.shex>
IMPORT <integer.shex>
IMPORT <CareTeam.shex>
IMPORT <Quantity.shex>
IMPORT <Duration.shex>
IMPORT <Reference.shex>
IMPORT <Condition.shex>
IMPORT <Procedure.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Observation.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <NutritionOrder.shex>
IMPORT <RiskAssessment.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>
IMPORT <MedicationRequest.shex>
IMPORT <MedicationStatement.shex>


start=@<Goal> AND {fhir:nodeRole [fhir:treeRoot]}

# Describes the intended objective(s) for a patient, group or organization
<Goal> EXTENDS @<DomainResource> CLOSED {   

    a [fhir:Goal]?;
    fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # External Ids for this goal
    fhir:lifecycleStatus @<code> AND
    	{fhir:v @fhirvs:goal-status};  # proposed | planned | accepted | 
                                            # active | on-hold | completed | 
                                            # cancelled | entered-in-error | 
                                            # rejected 
    fhir:achievementStatus @<CodeableConcept>?;  # in-progress | improving | 
                                            # worsening | no-change | achieved | 
                                            # sustaining | not-achieved | 
                                            # no-progress | not-attainable 
    fhir:category @<OneOrMore_CodeableConcept>?;  # E.g. Treatment, dietary, 
                                            # behavioral, etc 
    fhir:continuous @<boolean>?;            # After meeting the goal, ongoing 
                                            # activity is needed to sustain the 
                                            # goal objective 
    fhir:priority @<CodeableConcept>?;      # high-priority | medium-priority | 
                                            # low-priority 
    fhir:description @<CodeableConcept>;    # Code or text describing goal
    fhir:subject @<Reference> AND {fhir:link 
    			@<Group> OR 
    			@<Organization> OR 
    			@<Patient> ? };  # Who this goal is intended for
    fhir:start @<date>  OR 
    			@<CodeableConcept>  ?;  # When goal pursuit begins
    fhir:target @<OneOrMore_Goal.target>?;  # Target outcome for the goal
    fhir:statusDate @<date>?;               # When goal status took effect
    fhir:statusReason @<string>?;           # Reason for current status
    fhir:source @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who's responsible for creating 
                                            # Goal? 
    fhir:addresses @<OneOrMore_Reference_Condition_OR_MedicationRequest_OR_MedicationStatement_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest>?;  # Issues addressed by this goal
    fhir:note @<OneOrMore_Annotation>?;     # Comments about the goal
    fhir:outcome @<OneOrMore_CodeableReference>?;  # What result was achieved regarding 
                                            # the goal? 
}  

# Target outcome for the goal
<Goal.target> EXTENDS @<BackboneElement> CLOSED {   
    fhir:measure @<CodeableConcept>?;       # The parameter whose value is being 
                                            # tracked 
    fhir:detail @<Quantity>  OR 
    			@<Range>  OR 
    			@<CodeableConcept>  OR 
    			@<string>  OR 
    			@<boolean>  OR 
    			@<integer>  OR 
    			@<Ratio>  ?;  # The target value to be achieved
    fhir:due @<date>  OR 
    			@<Duration>  ?;  # Reach goal on or before
}  

#---------------------- Cardinality Types (OneOrMore) -------------------

<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}

<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

<OneOrMore_Goal.target> CLOSED {
    rdf:first @<Goal.target>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Goal.target> 
}

<OneOrMore_Reference_Condition_OR_MedicationRequest_OR_MedicationStatement_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Condition> OR 
			@<MedicationRequest> OR 
			@<MedicationStatement> OR 
			@<NutritionOrder> OR 
			@<Observation> OR 
			@<Procedure> OR 
			@<RiskAssessment> OR 
			@<ServiceRequest> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Condition_OR_MedicationRequest_OR_MedicationStatement_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest> 
}

<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

<OneOrMore_CodeableReference> CLOSED {
    rdf:first @<CodeableReference>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference> 
}

#---------------------- Value Sets ------------------------

# Codes that reflect the current state of a goal and whether the goal is still being targeted.
fhirvs:goal-status ["proposed" "planned" "accepted" "active" "on-hold" "completed" "cancelled" "entered-in-error" "rejected"]


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.