FHIR CI-Build

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

Valueset.shex

Responsible Owner: Terminology Infrastructure Work GroupStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for valueset

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

# ShEx Version 2.2
IMPORT <Uri.shex>
IMPORT <Code.shex>
IMPORT <Date.shex>
IMPORT <Coding.shex>
IMPORT <Period.shex>
IMPORT <String.shex>
IMPORT <Boolean.shex>
IMPORT <Decimal.shex>
IMPORT <Integer.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <Canonical.shex>
IMPORT <Identifier.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>
IMPORT <RelatedArtifact.shex>

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

# A set of codes drawn from one or more code systems
<ValueSet> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:ValueSet]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:url @<Uri>?;                       # Canonical identifier for this 
                                            # value set, represented as a URI 
                                            # (globally unique) 
    fhir:identifier @<OneOrMore_Identifier>?;  # Additional identifier for the 
                                            # value set (business identifier) 
    fhir:version @<String>?;                # Business version of the value set
    fhir:versionAlgorithm @<String>  OR 
    			@<Coding>  ?;  # How to compare versions
    fhir:name @<String>?;                   # Name for this value set (computer 
                                            # friendly) 
    fhir:title @<String>?;                  # Name for this value set (human 
                                            # friendly) 
    fhir:status @<Code> AND
    	{fhir:v @fhirvs:publication-status};  # draft | active | retired | unknown
    fhir:experimental @<Boolean>?;          # For testing only - never for real 
                                            # usage 
    fhir:date @<DateTime>?;                 # Date last changed
    fhir:publisher @<String>?;              # Name of the publisher/steward 
                                            # (organization or individual) 
    fhir:contact @<OneOrMore_ContactDetail>?;  # Contact details for the publisher
    fhir:description @<Markdown>?;          # Natural language description of 
                                            # the value set 
    fhir:useContext @<OneOrMore_UsageContext>?;  # The context that the content is 
                                            # intended to support 
    fhir:jurisdiction @<OneOrMore_CodeableConcept>?;  # Jurisdiction of the authority that 
                                            # maintains the  value set (if 
                                            # applicable) 
    fhir:immutable @<Boolean>?;             # Indicates whether or not any 
                                            # change to the content logical 
                                            # definition may occur 
    fhir:purpose @<Markdown>?;              # Why this value set is defined
    fhir:copyright @<Markdown>?;            # Notice about intellectual property 
                                            # ownership, can include 
                                            # restrictions on use 
    fhir:copyrightLabel @<String>?;         # Copyright holder and year(s)
    fhir:approvalDate @<Date>?;             # When the ValueSet was approved by 
                                            # publisher 
    fhir:lastReviewDate @<Date>?;           # When the ValueSet was last 
                                            # reviewed by the publisher 
    fhir:effectivePeriod @<Period>?;        # When the ValueSet is expected to 
                                            # be used 
    fhir:topic @<OneOrMore_CodeableConcept>?;  # E.g. Education, Treatment, 
                                            # Assessment, etc 
    fhir:author @<OneOrMore_ContactDetail>?;  # Who authored the ValueSet
    fhir:editor @<OneOrMore_ContactDetail>?;  # Who edited the ValueSet
    fhir:reviewer @<OneOrMore_ContactDetail>?;  # Who reviewed the ValueSet
    fhir:endorser @<OneOrMore_ContactDetail>?;  # Who endorsed the ValueSet
    fhir:relatedArtifact @<OneOrMore_RelatedArtifact>?;  # Additional documentation, 
                                            # citations, etc 
    fhir:compose @<ValueSet.compose>?;      # Content logical definition of the 
                                            # value set (CLD) 
    fhir:expansion @<ValueSet.expansion>?;  # Used when the value set is 
                                            # "expanded" 
}  

# Content logical definition of the value set (CLD)
<ValueSet.compose> EXTENDS @<BackboneElement> CLOSED {   
    fhir:lockedDate @<Date>?;               # Fixed date for references with no 
                                            # specified version (transitive) 
    fhir:inactive @<Boolean>?;              # Whether inactive codes are in the 
                                            # value set 
    fhir:include @<OneOrMore_ValueSet.compose.include>;  # Include one or more codes from a 
                                            # code system or other value set(s) 
    fhir:exclude @<OneOrMore_ValueSet.compose.include>?;  # Explicitly exclude codes from a 
                                            # code system or other value sets 
    fhir:property @<OneOrMore_String>?;     # Property to return if client 
                                            # doesn't override 
}  

# Include one or more codes from a code system or other value set(s)
<ValueSet.compose.include> EXTENDS @<BackboneElement> CLOSED {   
    fhir:system @<Uri>?;                    # The system the codes come from
    fhir:version @<String>?;                # Specific version of the code 
                                            # system referred to 
    fhir:concept @<OneOrMore_ValueSet.compose.include.concept>?;  # A concept defined in the system
    fhir:filter @<OneOrMore_ValueSet.compose.include.filter>?;  # Select codes/concepts by their 
                                            # properties (including 
                                            # relationships) 
    fhir:valueSet @<OneOrMore_Canonical>?;  # Select the contents included in 
                                            # this value set 
    fhir:copyright @<Markdown>?;            # A copyright statement for the 
                                            # specific code system included in 
                                            # the value set 
}  

# A concept defined in the system
<ValueSet.compose.include.concept> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Code or expression from system
    fhir:display @<String>?;                # Text to display for this code for 
                                            # this value set in this valueset 
    fhir:designation @<OneOrMore_ValueSet.compose.include.concept.designation>?;  # Additional representations for 
                                            # this concept 
}  

# Additional representations for this concept
<ValueSet.compose.include.concept.designation> EXTENDS @<BackboneElement> CLOSED {   
    fhir:language @<Code> AND
    	{fhir:v @fhirvs:all-languages}?;  # Human language of the designation
    fhir:use @<Coding>?;                    # Types of uses of designations
    fhir:additionalUse @<OneOrMore_Coding>?;  # Additional ways how this 
                                            # designation would be used 
    fhir:value @<String>;                   # The text value for this designation
}  

# Select codes/concepts by their properties (including relationships)
<ValueSet.compose.include.filter> EXTENDS @<BackboneElement> CLOSED {   
    fhir:property @<Code>;                  # A property/filter defined by the 
                                            # code system 
    fhir:op @<Code> AND
    	{fhir:v @fhirvs:filter-operator};  # = | is-a | descendent-of | 
                                            # is-not-a | regex | in | not-in | 
                                            # generalizes | child-of | 
                                            # descendent-leaf | exists | 
                                            # property-value-of 
    fhir:value @<String>?;                  # Code from the system, or regex 
                                            # criteria, or boolean value for 
                                            # exists 
    fhir:filter @<OneOrMore_ValueSet.compose.include.filter>?;  # Sub-filter to specify the set of 
                                            # codes 
}  

# Sub-filter to specify the set of codes
<ValueSet.compose.include.filter.filternull> CLOSED {   
}  

# Used when the value set is "expanded"
<ValueSet.expansion> EXTENDS @<BackboneElement> CLOSED {   
    fhir:identifier @<Uri>?;                # Identifies the value set expansion 
                                            # (business identifier) 
    fhir:next @<Uri>?;                      # Opaque urls for paging through 
                                            # expansion results 
    fhir:timestamp @<DateTime>;             # Time ValueSet expansion happened
    fhir:total @<Integer>?;                 # Total number of codes in the 
                                            # expansion 
    fhir:offset @<Integer>?;                # Offset at which this resource 
                                            # starts 
    fhir:parameter @<OneOrMore_ValueSet.expansion.parameter>?;  # Parameter that controlled the 
                                            # expansion process 
    fhir:property @<OneOrMore_ValueSet.expansion.property>?;  # Additional information supplied 
                                            # about each concept 
    fhir:contains @<OneOrMore_ValueSet.expansion.contains>?;  # Codes in the value set
}  

# Parameter that controlled the expansion process
<ValueSet.expansion.parameter> EXTENDS @<BackboneElement> CLOSED {   
    fhir:name @<String>;                    # Name as assigned by the client or 
                                            # server 
    fhir:value @<String>  OR 
    			@<Boolean>  OR 
    			@<Integer>  OR 
    			@<Decimal>  OR 
    			@<Uri>  OR 
    			@<Code>  OR 
    			@<DateTime>  ?;  # Value of the named parameter
}  

# Additional information supplied about each concept
<ValueSet.expansion.property> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Identifies the property on the 
                                            # concepts, and when referred to in 
                                            # operations 
    fhir:uri @<Uri>?;                       # Formal identifier for the property
}  

# Codes in the value set
<ValueSet.expansion.contains> EXTENDS @<BackboneElement> CLOSED {   
    fhir:system @<Uri>?;                    # System value for the code
    fhir:abstract @<Boolean>?;              # If user cannot select this entry
    fhir:inactive @<Boolean>?;              # If concept is inactive in the code 
                                            # system 
    fhir:version @<String>?;                # Version in which this code/display 
                                            # is defined 
    fhir:code @<Code>?;                     # Code - if blank, this is not a 
                                            # selectable code 
    fhir:display @<String>?;                # User display for the concept
    fhir:designation @<OneOrMore_ValueSet.compose.include.concept.designation>?;  # Additional representations for 
                                            # this item 
    fhir:property @<OneOrMore_ValueSet.expansion.contains.property>?;  # Property value for the concept
    fhir:contains @<OneOrMore_ValueSet.expansion.contains>?;  # Codes contained under this entry
}  

# Property value for the concept
<ValueSet.expansion.contains.property> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Reference to 
                                            # ValueSet.expansion.property.code 
    fhir:value @<Code>  OR 
    			@<Coding>  OR 
    			@<String>  OR 
    			@<Integer>  OR 
    			@<Boolean>  OR 
    			@<DateTime>  OR 
    			@<Decimal>  ;  # Value of the property for this 
                                            # concept 
    fhir:subProperty @<OneOrMore_ValueSet.expansion.contains.property.subProperty>?;  # SubProperty value for the concept
}  

# SubProperty value for the concept
<ValueSet.expansion.contains.property.subProperty> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<Code>;                      # Reference to 
                                            # ValueSet.expansion.property.code 
    fhir:value @<Code>  OR 
    			@<Coding>  OR 
    			@<String>  OR 
    			@<Integer>  OR 
    			@<Boolean>  OR 
    			@<DateTime>  OR 
    			@<Decimal>  ;  # Value of the subproperty for this 
                                            # concept 
}  

# Codes contained under this entry
<ValueSet.expansion.contains.containsnull> CLOSED {   
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_ContactDetail> CLOSED {
    rdf:first @<ContactDetail>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ContactDetail> 
}
<OneOrMore_UsageContext> CLOSED {
    rdf:first @<UsageContext>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_UsageContext> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}
<OneOrMore_RelatedArtifact> CLOSED {
    rdf:first @<RelatedArtifact>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_RelatedArtifact> 
}
<OneOrMore_ValueSet.compose.include> CLOSED {
    rdf:first @<ValueSet.compose.include>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.compose.include> 
}
<OneOrMore_String> CLOSED {
    rdf:first @<String>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_String> 
}
<OneOrMore_ValueSet.compose.include.concept> CLOSED {
    rdf:first @<ValueSet.compose.include.concept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.compose.include.concept> 
}
<OneOrMore_ValueSet.compose.include.filter> CLOSED {
    rdf:first @<ValueSet.compose.include.filter>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.compose.include.filter> 
}
<OneOrMore_Canonical> CLOSED {
    rdf:first @<Canonical>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Canonical> 
}
<OneOrMore_ValueSet.compose.include.concept.designation> CLOSED {
    rdf:first @<ValueSet.compose.include.concept.designation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.compose.include.concept.designation> 
}
<OneOrMore_Coding> CLOSED {
    rdf:first @<Coding>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Coding> 
}
<OneOrMore_ValueSet.expansion.parameter> CLOSED {
    rdf:first @<ValueSet.expansion.parameter>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.expansion.parameter> 
}
<OneOrMore_ValueSet.expansion.property> CLOSED {
    rdf:first @<ValueSet.expansion.property>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.expansion.property> 
}
<OneOrMore_ValueSet.expansion.contains> CLOSED {
    rdf:first @<ValueSet.expansion.contains>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.expansion.contains> 
}
<OneOrMore_ValueSet.expansion.contains.property> CLOSED {
    rdf:first @<ValueSet.expansion.contains.property>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.expansion.contains.property> 
}
<OneOrMore_ValueSet.expansion.contains.property.subProperty> CLOSED {
    rdf:first @<ValueSet.expansion.contains.property.subProperty>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ValueSet.expansion.contains.property.subProperty> 
}

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

# This value set includes all possible codes from BCP-47 (see http://tools.ietf.org/html/bcp47)
fhirvs:all-languages ["aa" "ab" "ace" "ach" "ada" "ady" "ae" "af" "afa" "afh" "ain" "ak" "akk" "ale" "alg" "alt" "am" "an" "ang" "anp" "apa" "ar" "arc" "arn" "arp" "art" "arw" "as" "ast" "ath" "aus" "av" "awa" "ay" "az" "ba" "bad" "bai" "bal" "ban" "bas" "bat" "be" "bej" "bem" "ber" "bg" "bho" "bi" "bik" "bin" "bla" "bm" "bn" "bnt" "bo" "br" "bra" "bs" "btk" "bua" "bug" "byn" "ca" "cad" "cai" "car" "cau" "ce" "ceb" "cel" "ch" "chb" "chg" "chk" "chm" "chn" "cho" "chp" "chr" "chy" "cmc" "cnr" "co" "cop" "cpe" "cpf" "cpp" "cr" "crh" "crp" "cs" "csb" "cu" "cus" "cv" "cy" "da" "dak" "dar" "day" "de" "del" "den" "dgr" "din" "doi" "dra" "dsb" "dua" "dum" "dv" "dyu" "dz" "ee" "efi" "egy" "eka" "el" "elx" "en" "enm" "eo" "es" "et" "eu" "ewo" "fa" "fan" "fat" "ff" "fi" "fil" "fiu" "fj" "fo" "fon" "fr" "frm" "fro" "frr" "frs" "fur" "fy" "ga" "gaa" "gay" "gba" "gd" "gem" "gez" "gil" "gl" "gmh" "gn" "goh" "gon" "gor" "got" "grb" "grc" "gsw" "gu" "gv" "gwi" "ha" "hai" "haw" "he" "hi" "hil" "him" "hit" "hmn" "ho" "hr" "hsb" "ht" "hu" "hup" "hy" "hz" "ia" "iba" "id" "ie" "ig" "ii" "ijo" "ik" "ilo" "inc" "ine" "inh" "io" "ira" "iro" "is" "it" "iu" "ja" "jbo" "jpr" "jrb" "jv" "ka" "kaa" "kab" "kac" "kam" "kar" "kaw" "kbd" "kg" "kha" "khi" "kho" "ki" "kj" "kk" "kl" "km" "kmb" "kn" "ko" "kok" "kos" "kpe" "kr" "krc" "krl" "kro" "kru" "ks" "ku" "kum" "kut" "kv" "kw" "ky" "la" "lad" "lah" "lam" "lb" "lez" "lg" "li" "ln" "lo" "lol" "loz" "lt" "lu" "lua" "lui" "lun" "luo" "lus" "lv" "mad" "mag" "mai" "mak" "man" "map" "mas" "mdf" "mdr" "men" "mg" "mga" "mh" "mi" "mic" "min" "mis" "mk" "mkh" "ml" "mn" "mnc" "mni" "mno" "moh" "mos" "mr" "ms" "mt" "mul" "mun" "mus" "mwl" "mwr" "my" "myn" "myv" "na" "nah" "nai" "nap" "nb" "nd" "nds" "ne" "new" "ng" "nia" "nic" "niu" "nl" "nn" "no" "nog" "non" "nqo" "nr" "nso" "nub" "nv" "nwc" "ny" "nym" "nyn" "nyo" "nzi" "oc" "oj" "om" "or" "os" "osa" "ota" "oto" "pa" "paa" "pag" "pal" "pam" "pap" "pau" "peo" "phi" "phn" "pi" "pl" "pon" "pra" "pro" "ps" "pt" "qu" "raj" "rap" "rar" "rm" "rn" "ro" "roa" "rom" "ru" "rup" "rw" "sa" "sad" "sah" "sai" "sal" "sam" "sas" "sat" "sc" "scn" "sco" "sd" "se" "sel" "sem" "sg" "sga" "sgn" "shn" "si" "sid" "sio" "sit" "sk" "sl" "sla" "sm" "sma" "smi" "smj" "smn" "sms" "sn" "snk" "so" "sog" "son" "sq" "sr" "srn" "srr" "ss" "ssa" "st" "su" "suk" "sus" "sux" "sv" "sw" "syc" "syr" "ta" "tai" "te" "tem" "ter" "tet" "tg" "th" "ti" "tig" "tiv" "tk" "tkl" "tl" "tlh" "tli" "tmh" "tn" "to" "tog" "tpi" "tr" "ts" "tsi" "tt" "tum" "tup" "tut" "tvl" "tw" "ty" "tyv" "udm" "ug" "uga" "uk" "umb" "und" "ur" "uz" "vai" "ve" "vi" "vo" "vot" "wa" "wak" "wal" "war" "was" "wen" "wo" "xal" "xh" "yao" "yap" "yi" "yo" "ypk" "za" "zap" "zbl" "zen" "zgh" "zh" "znd" "zu" "zun" "zxx" "zza"]

# The kind of operation to perform as a part of a property based filter.
fhirvs:filter-operator ["=" "is-a" "descendent-of" "is-not-a" "regex" "in" "not-in" "generalizes" "child-of" "descendent-leaf" "exists" "property-value-of"]

# The lifecycle status of an artifact.
fhirvs:publication-status ["draft" "active" "retired" "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.