R6 Ballot (3rd Draft) FHIR CI-Build

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

Careplan.shex

Maturity Level : N/A
Responsible Owner: Patient Care Work Group Standards Status : Informative Compartments : Encounter , Group , 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 <code.shex>

# ShEx Version 2.2
IMPORT <Code.shex>

IMPORT <Task.shex>
IMPORT <Goal.shex>
IMPORT <Group.shex>
IMPORT <string.shex>

IMPORT <String.shex>

IMPORT <Period.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <dateTime.shex>

IMPORT <DateTime.shex>

IMPORT <CareTeam.shex>
IMPORT <Resource.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: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:status @<Code> AND

    	{fhir:v @fhirvs:request-status};  # draft | active | on-hold | 
                                            # entered-in-error | ended | 
                                            # completed | revoked | unknown 
    fhir:intent @<code> AND

    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 

    fhir:title @<String>?;                  # Human-friendly name for the care 

                                            # plan 
    fhir:description @<string>?;            # Summary of nature of plan
    fhir:subject @<Reference> AND {fhir:link 

    fhir:description @<String>?;            # Summary of nature of plan
    fhir:subject @<Reference> AND {fhir:l 

    			@<Group> OR 
    			@<Patient> ? };  # Who the care plan is for
    fhir:encounter @<Reference> AND {fhir:link 

    fhir:encounter @<Reference> AND {fhir:l 

    			@<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 

    fhir:created @<DateTime>?;              # Date record was first recorded
    fhir:custodian @<Reference> AND {fhir:l 

    			@<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>?;  # Activities that are completed or 
                                            # in progress (concept, or 
                                            # Appointment, Encounter, Procedure, 
                                            # etc.) 
    fhir:progress @<OneOrMore_Annotation>?;  # Comments about the activity 
                                            # status/progress 
    fhir:plannedActivityReference @<Reference> AND {fhir:link 

    fhir:plannedActivityReference @<Reference> AND {fhir:l 

    			@<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_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 

    rdf:first @<Reference> AND {fhir:l 

			@<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 

    rdf:first @<Reference> AND {fhir:l 

			@<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 

    rdf:first @<Reference> AND {fhir:l 

			@<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 

    rdf:first @<Reference> AND {fhir:l 

			@<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 

    rdf:first @<Reference> AND {fhir:l 

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

    rdf:first @<Reference> AND {fhir:l 

			@<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" "entered-in-error" "ended" "completed" "revoked" "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.