Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

List.shex

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Device, Patient, Practitioner

Raw ShEx

ShEx statement for list

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 <string.shex>
IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <boolean.shex>
IMPORT <dateTime.shex>
IMPORT <CareTeam.shex>
IMPORT <Resource.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>


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

# A list is a curated collection of resources
<List> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business identifier
    fhir:status @<code> AND
    	{fhir:v @fhirvs:list-status};  # current | retired | 
                                            # entered-in-error 
    fhir:mode @<code> AND
    	{fhir:v @fhirvs:list-mode};  # working | snapshot | changes
    fhir:title @<string>?;                  # Descriptive name for the list
    fhir:code @<CodeableConcept>?;          # What the purpose of this list is
    fhir:subject @<OneOrMore_Reference_Resource>?;  # If all resources have the same 
                                            # subject(s) 
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # Context in which list created
    fhir:date @<dateTime>?;                 # When the list was prepared
    fhir:source @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who and/or what defined the list 
                                            # contents (aka Author) 
    fhir:orderedBy @<CodeableConcept>?;     # What order the list has
    fhir:note @<OneOrMore_Annotation>?;     # Comments about the list
    fhir:entry @<OneOrMore_List.entry>?;    # Entries in the list
    fhir:emptyReason @<CodeableConcept>?;   # Why list is empty
}  

# Entries in the list
<List.entry> EXTENDS @<BackboneElement> CLOSED {   
    fhir:flag @<CodeableConcept>?;          # Status/Workflow information about 
                                            # this item 
    fhir:deleted @<boolean>?;               # If this item is actually marked as 
                                            # deleted 
    fhir:date @<dateTime>?;                 # When item added to list
    fhir:item @<Reference> AND {fhir:link 
    			@<Resource> ? };  # Actual entry
}  

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

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

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

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

<OneOrMore_List.entry> CLOSED {
    rdf:first @<List.entry>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_List.entry> 
}

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

# The processing mode that applies to this list.
fhirvs:list-mode ["working" "snapshot" "changes"]

# The current state of the list.
fhirvs:list-status ["current" "retired" "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.