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

List.shex

Maturity Level : N/A
Responsible Owner: FHIR Infrastructure Work Group Standards Status : Informative Compartments : 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>

# ShEx Version 2.2
IMPORT <Code.shex>

IMPORT <Group.shex>
IMPORT <string.shex>

IMPORT <String.shex>

IMPORT <Device.shex>
IMPORT <Patient.shex>
IMPORT <boolean.shex>
IMPORT <dateTime.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:status @<Code> AND

    	{fhir:v @fhirvs:list-status};  # current | retired | 
                                            # entered-in-error 
    fhir:mode @<code> AND

    fhir:mode @<Code> AND

    	{fhir:v @fhirvs:list-mode};  # working | snapshot | changes
    fhir:title @<string>?;                  # Descriptive name for the list

    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 

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

    			@<Encounter> ? }?;  # Context in which list created
    fhir:date @<dateTime>?;                 # When the list was prepared
    fhir:source @<Reference> AND {fhir:link 

    fhir:date @<DateTime>?;                 # When the list was prepared
    fhir:source @<Reference> AND {fhir:l 

    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Group> 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 

    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 

    fhir:date @<DateTime>?;                 # When item added to list
    fhir:item @<Reference> AND {fhir:l 

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

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

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