R5 Final QA

This page is part of the FHIR Specification (v5.0.0-draft-final: Final QA Preview for R5 - see ballot notes). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Episodeofcare.shex

Patient Administration Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient, Practitioner

Raw ShEx

ShEx statement for episodeofcare

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 <Period.shex>
IMPORT <Patient.shex>
IMPORT <Account.shex>
IMPORT <CareTeam.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <DomainResource.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>


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

# An association of a Patient with an Organization and  Healthcare Provider(s) for a period of time that the Organization assumes some level of responsibility
<EpisodeOfCare> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier(s) relevant 
                                            # for this EpisodeOfCare 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:episode-of-care-status};  # planned | waitlist | active | 
                                            # onhold | finished | cancelled | 
                                            # entered-in-error 
    fhir:statusHistory @<OneOrMore_EpisodeOfCare.statusHistory>?;  # Past list of status codes (the 
                                            # current status may be included to 
                                            # cover the start date of the 
                                            # status) 
    fhir:type @<OneOrMore_CodeableConcept>?;  # Type/class  - e.g. specialist 
                                            # referral, disease management 
    fhir:reason @<OneOrMore_EpisodeOfCare.reason>?;  # The list of medical reasons that 
                                            # are expected to be addressed 
                                            # during the episode of care 
    fhir:diagnosis @<OneOrMore_EpisodeOfCare.diagnosis>?;  # The list of medical conditions 
                                            # that were addressed during the 
                                            # episode of care 
    fhir:patient @<Reference> AND {fhir:link 
    			@<Patient> ? };  # The patient who is the focus of 
                                            # this episode of care 
    fhir:managingOrganization @<Reference> AND {fhir:link 
    			@<Organization> ? }?;  # Organization that assumes 
                                            # responsibility for care 
                                            # coordination 
    fhir:period @<Period>?;                 # Interval during responsibility is 
                                            # assumed 
    fhir:referralRequest @<OneOrMore_Reference_ServiceRequest>?;  # Originating Referral Request(s)
    fhir:careManager @<Reference> AND {fhir:link 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? }?;  # Care manager/care coordinator for 
                                            # the patient 
    fhir:careTeam @<OneOrMore_Reference_CareTeam>?;  # Other practitioners facilitating 
                                            # this episode of care 
    fhir:account @<OneOrMore_Reference_Account>?;  # The set of accounts that may be 
                                            # used for billing for this 
                                            # EpisodeOfCare 
}  

# The list of medical conditions that were addressed during the episode of care
<EpisodeOfCare.diagnosis> EXTENDS @<BackboneElement> CLOSED {   
    fhir:condition @<OneOrMore_CodeableReference>?;  # The medical condition that was 
                                            # addressed during the episode of 
                                            # care 
    fhir:use @<CodeableConcept>?;           # Role that this diagnosis has 
                                            # within the episode of care (e.g. 
                                            # admission, billing, discharge …) 
}  

# Past list of status codes (the current status may be included to cover the start date of the status)
<EpisodeOfCare.statusHistory> EXTENDS @<BackboneElement> CLOSED {   
    fhir:status @<code> AND
    	{fhir:v @fhirvs:episode-of-care-status};  # planned | waitlist | active | 
                                            # onhold | finished | cancelled | 
                                            # entered-in-error 
    fhir:period @<Period>;                  # Duration the EpisodeOfCare was in 
                                            # the specified status 
}  

# The list of medical reasons that are expected to be addressed during the episode of care
<EpisodeOfCare.reason> EXTENDS @<BackboneElement> CLOSED {   
    fhir:use @<CodeableConcept>?;           # What the reason value should be 
                                            # used for/as 
    fhir:value @<OneOrMore_CodeableReference>?;  # Medical reason to be addressed
}  

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

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

<OneOrMore_EpisodeOfCare.statusHistory> CLOSED {
    rdf:first @<EpisodeOfCare.statusHistory>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_EpisodeOfCare.statusHistory> 
}

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

<OneOrMore_EpisodeOfCare.reason> CLOSED {
    rdf:first @<EpisodeOfCare.reason>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_EpisodeOfCare.reason> 
}

<OneOrMore_EpisodeOfCare.diagnosis> CLOSED {
    rdf:first @<EpisodeOfCare.diagnosis>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_EpisodeOfCare.diagnosis> 
}

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

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

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

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

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

# The status of the episode of care.
fhirvs:episode-of-care-status ["planned" "waitlist" "active" "onhold" "finished" "cancelled" "entered-in-error"]


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.