FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

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 <NutritionIntake.shex>
IMPORT <PractitionerRole.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:acceptance @<OneOrMore_Goal.acceptance>?;  # Individual acceptance of goal
    fhir:target @<OneOrMore_Goal.target>?;  # Target outcome for the goal
    fhir:statusDate @<date>?;               # When goal achievment status took 
                                            # effect 
    fhir:statusReason @<OneOrMore_CodeableConcept>?;  # Reason for current lifecycle 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_NutritionIntake_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest>?;  # Issues addressed by this goal
    fhir:note @<OneOrMore_Annotation>?;     # Comments about the goal
}  

# Individual acceptance of goal
<Goal.acceptance> EXTENDS @<BackboneElement> CLOSED {   
    fhir:participant @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? };  # Individual or organization whose 
                                            # acceptance is reflected 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:goal-accept-status}?;  # agree | disagree | pending
    fhir:priority @<CodeableConcept>?;      # Priority of goal for individual
}  

# 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.acceptance> CLOSED {
    rdf:first @<Goal.acceptance>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Goal.acceptance> 
}
<OneOrMore_Goal.target> CLOSED {
    rdf:first @<Goal.target>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Goal.target> 
}
<OneOrMore_Reference_Condition_OR_MedicationRequest_OR_MedicationStatement_OR_NutritionIntake_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Condition> OR 
			@<MedicationRequest> OR 
			@<MedicationStatement> OR 
			@<NutritionIntake> OR 
			@<NutritionOrder> OR 
			@<Observation> OR 
			@<Procedure> OR 
			@<RiskAssessment> OR 
			@<ServiceRequest> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Condition_OR_MedicationRequest_OR_MedicationStatement_OR_NutritionIntake_OR_NutritionOrder_OR_Observation_OR_Procedure_OR_RiskAssessment_OR_ServiceRequest> 
}
<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

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

# Codes that identify whether the goal has been accepted or not.
fhirvs:goal-accept-status ["agree" "disagree" "pending"]

# 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.