R6 Ballot (1st Draft)

This page is part of the FHIR Specification v6.0.0-ballot1: Release 6 Ballot (1st Draft) (see Ballot Notes). The current version is 5.0.0. For a full list of available versions, see the Directory of published versions

Careplan.shex

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

Raw ShEx

ShEx statement for careplan

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 <uri.shex>
IMPORT <code.shex>
IMPORT <Task.shex>
IMPORT <Goal.shex>
IMPORT <Group.shex>
IMPORT <string.shex>
IMPORT <Period.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <dateTime.shex>
IMPORT <CareTeam.shex>
IMPORT <Resource.shex>
IMPORT <canonical.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Appointment.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DeviceRequest.shex>
IMPORT <SupplyRequest.shex>
IMPORT <DomainResource.shex>
IMPORT <NutritionOrder.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>
IMPORT <MedicationRequest.shex>
IMPORT <VisionPrescription.shex>
IMPORT <CommunicationRequest.shex>
IMPORT <RequestOrchestration.shex>
IMPORT <ImmunizationRecommendation.shex>


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

# Healthcare plan for patient or group
<CarePlan> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # External Ids for this plan
    fhir:instantiatesCanonical @<OneOrMore_canonical>?;  # Instantiates FHIR protocol or 
                                            # definition 
    fhir:instantiatesUri @<OneOrMore_uri>?;  # Instantiates external protocol or 
                                            # definition 
    fhir:basedOn @<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest>?;  # Fulfills plan, proposal or order
    fhir:replaces @<OneOrMore_Reference_CarePlan>?;  # CarePlan replaced by this CarePlan
    fhir:partOf @<OneOrMore_Reference_CarePlan>?;  # Part of referenced CarePlan
    fhir:status @<code> AND
    	{fhir:v @fhirvs:request-status};  # draft | active | on-hold | revoked 
                                            # | completed | entered-in-error | 
                                            # unknown 
    fhir:intent @<code> AND
    	{fhir:v @fhirvs:care-plan-intent};  # proposal | plan | order | option | 
                                            # directive 
    fhir:category @<OneOrMore_CodeableConcept>?;  # Type of plan
    fhir:title @<string>?;                  # Human-friendly name for the care 
                                            # plan 
    fhir:description @<string>?;            # Summary of nature of plan
    fhir:subject @<Reference> AND {fhir:link 
    			@<Group> OR 
    			@<Patient> ? };  # Who the care plan is for
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # The Encounter during which this 
                                            # CarePlan was created 
    fhir:period @<Period>?;                 # Time period plan covers
    fhir:created @<dateTime>?;              # Date record was first recorded
    fhir:custodian @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who is the designated responsible 
                                            # party 
    fhir:contributor @<OneOrMore_Reference_CareTeam_OR_Device_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>?;  # Who provided the content of the 
                                            # care plan 
    fhir:careTeam @<OneOrMore_Reference_CareTeam>?;  # Who's involved in plan?
    fhir:addresses @<OneOrMore_CodeableReference>?;  # Health issues this plan addresses
    fhir:supportingInfo @<OneOrMore_Reference_Resource>?;  # Information considered as part of 
                                            # plan 
    fhir:goal @<OneOrMore_Reference_Goal>?;  # Desired outcome of plan
    fhir:activity @<OneOrMore_CarePlan.activity>?;  # Action to occur or has occurred as 
                                            # part of plan 
    fhir:note @<OneOrMore_Annotation>?;     # Comments about the plan
}  

# Action to occur or has occurred as part of plan
<CarePlan.activity> EXTENDS @<BackboneElement> CLOSED {   
    fhir:performedActivity @<OneOrMore_CodeableReference>?;  # Results of the activity (concept, 
                                            # or Appointment, Encounter, 
                                            # Procedure, etc.) 
    fhir:progress @<OneOrMore_Annotation>?;  # Comments about the activity 
                                            # status/progress 
    fhir:plannedActivityReference @<Reference> AND {fhir:link 
    			@<Appointment> OR 
    			@<CommunicationRequest> OR 
    			@<DeviceRequest> OR 
    			@<ImmunizationRecommendation> OR 
    			@<MedicationRequest> OR 
    			@<NutritionOrder> OR 
    			@<RequestOrchestration> OR 
    			@<ServiceRequest> OR 
    			@<SupplyRequest> OR 
    			@<Task> OR 
    			@<VisionPrescription> ? }?;  # Activity that is intended to be 
                                            # part of the care plan 
}  

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

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

<OneOrMore_canonical> CLOSED {
    rdf:first @<canonical>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_canonical> 
}

<OneOrMore_uri> CLOSED {
    rdf:first @<uri>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_uri> 
}

<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<CarePlan> OR 
			@<NutritionOrder> OR 
			@<RequestOrchestration> OR 
			@<ServiceRequest> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> 
}

<OneOrMore_Reference_CarePlan> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<CarePlan> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan> 
}

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

<OneOrMore_Reference_CareTeam_OR_Device_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<CareTeam> OR 
			@<Device> OR 
			@<Organization> OR 
			@<Patient> OR 
			@<Practitioner> OR 
			@<PractitionerRole> OR 
			@<RelatedPerson> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CareTeam_OR_Device_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> 
}

<OneOrMore_Reference_CareTeam> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<CareTeam> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CareTeam> 
}

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

<OneOrMore_Reference_Resource> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Resource> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource> 
}

<OneOrMore_Reference_Goal> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Goal> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Goal> 
}

<OneOrMore_CarePlan.activity> CLOSED {
    rdf:first @<CarePlan.activity>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CarePlan.activity> 
}

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

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

# Codes indicating the degree of authority/intentionality associated with a care plan.
fhirvs:care-plan-intent ["proposal" "plan" "order" "option" "directive"]

# Codes identifying the lifecycle stage of a request.
fhirvs:request-status ["draft" "active" "on-hold" "revoked" "completed" "entered-in-error" "unknown"]


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.