FoundationThis is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
| Responsible Owner: Terminology Infrastructure Work Group | Standards Status: Informative | Compartments: No defined compartments |
ShEx statement for codesystem
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 <UnsignedInt.shex>
IMPORT <UsageContext.shex>
IMPORT <ContactDetail.shex>
IMPORT <DomainResource.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>
IMPORT <RelatedArtifact.shex>
start=@<CodeSystem> AND {fhir:nodeRole [fhir:treeRoot]}
# Declares the existence of and describes a code system or code system supplement
<CodeSystem> EXTENDS @<DomainResource> CLOSED {
a [fhir:CodeSystem]?;fhir:nodeRole [fhir:treeRoot]?;
fhir:url @<Uri>?; # Canonical identifier for this code
# system, represented as a URI
# (globally unique) (Coding.system)
fhir:identifier @<OneOrMore_Identifier>?; # Additional identifier for the code
# system (business identifier)
fhir:version @<String>?; # Business version of the code
# system (Coding.version)
fhir:versionAlgorithm @<String> OR
@<Coding> ?; # How to compare versions
fhir:name @<String>?; # Name for this code system
# (computer friendly)
fhir:title @<String>?; # Name for this code system (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 code system
fhir:useContext @<OneOrMore_UsageContext>?; # The context that the content is
# intended to support
fhir:jurisdiction @<OneOrMore_CodeableConcept>?; # Jurisdiction of the authority that
# maintains the code system (if
# applicable)
fhir:purpose @<Markdown>?; # Why this code system 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 CodeSystem was approved
# by publisher
fhir:lastReviewDate @<Date>?; # When the CodeSystem was last
# reviewed by the publisher
fhir:effectivePeriod @<Period>?; # When the CodeSystem is expected to
# be used
fhir:topic @<OneOrMore_CodeableConcept>?; # E.g. Education, Treatment,
# Assessment, etc
fhir:author @<OneOrMore_ContactDetail>?; # Who authored the CodeSystem
fhir:editor @<OneOrMore_ContactDetail>?; # Who edited the CodeSystem
fhir:reviewer @<OneOrMore_ContactDetail>?; # Who reviewed the CodeSystem
fhir:endorser @<OneOrMore_ContactDetail>?; # Who endorsed the CodeSystem
fhir:relatedArtifact @<OneOrMore_RelatedArtifact>?; # Additional documentation,
# citations, etc
fhir:caseSensitive @<Boolean>?; # If code comparison is case
# sensitive
fhir:valueSet @<Canonical>?; # Canonical reference to the value
# set with entire code system
fhir:hierarchyMeaning @<Code> AND
{fhir:v @fhirvs:codesystem-hierarchy-meaning}?; # grouped-by | is-a | part-of |
# classified-with
fhir:compositional @<Boolean>?; # If code system defines a
# compositional grammar
fhir:versionNeeded @<Boolean>?; # If definitions are not stable
fhir:content @<Code> AND
{fhir:v @fhirvs:codesystem-content-mode}; # not-present | example | fragment |
# complete | supplement
fhir:supplements @<Canonical>?; # Canonical URL of Code System this
# adds designations and properties
# to
fhir:count @<UnsignedInt>?; # Total concepts in the code system
fhir:filter @<OneOrMore_CodeSystem.filter>?; # Filter that can be used in a value
# set
fhir:property @<OneOrMore_CodeSystem.property>?; # Additional information supplied
# about each concept
fhir:concept @<OneOrMore_CodeSystem.concept>?; # Concepts in the code system
}
# Filter that can be used in a value set
<CodeSystem.filter> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<Code>; # Code that identifies the filter
fhir:description @<String>?; # How or why the filter is used
fhir:operator @<OneOrMore_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
}
# Additional information supplied about each concept
<CodeSystem.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
fhir:description @<String>?; # Why the property is defined,
# and/or what it conveys
fhir:type @<Code> AND
{fhir:v @fhirvs:concept-property-type}; # code | Coding | string | integer |
# boolean | dateTime | decimal
}
# Concepts in the code system
<CodeSystem.concept> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<Code>; # Code that identifies concept
fhir:display @<String>?; # Text to display to the user
fhir:definition @<String>?; # Formal definition
fhir:designation @<OneOrMore_CodeSystem.concept.designation>?; # Additional representations for the
# concept
fhir:property @<OneOrMore_CodeSystem.concept.property>?; # Property value for the concept
fhir:concept @<OneOrMore_CodeSystem.concept>?; # Child Concepts
# (is-a/contains/categorizes)
}
# Additional representations for the concept
<CodeSystem.concept.designation> EXTENDS @<BackboneElement> CLOSED {
fhir:language @<Code> AND
{fhir:v @fhirvs:all-languages}?; # Human language of the designation
fhir:use @<Coding>?; # Details how this designation would
# be used
fhir:additionalUse @<OneOrMore_Coding>?; # Additional ways how this
# designation would be used
fhir:value @<String>; # The text value for this designation
}
# Property value for the concept
<CodeSystem.concept.property> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<Code>; # Reference to
# CodeSystem.property.code or a FHIR
# defined concept-property
fhir:value @<Code> OR
@<Coding> OR
@<String> OR
@<Integer> OR
@<Boolean> OR
@<DateTime> OR
@<Decimal> ; # Value of the property for this
# concept
}
# Child Concepts (is-a/contains/categorizes)
<CodeSystem.concept.conceptnull> 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_CodeSystem.filter> CLOSED {
rdf:first @<CodeSystem.filter> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeSystem.filter>
}
<OneOrMore_CodeSystem.property> CLOSED {
rdf:first @<CodeSystem.property> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeSystem.property>
}
<OneOrMore_CodeSystem.concept> CLOSED {
rdf:first @<CodeSystem.concept> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeSystem.concept>
}
<OneOrMore_Code> CLOSED {
rdf:first @<Code> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Code>
}
<OneOrMore_CodeSystem.concept.designation> CLOSED {
rdf:first @<CodeSystem.concept.designation> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeSystem.concept.designation>
}
<OneOrMore_CodeSystem.concept.property> CLOSED {
rdf:first @<CodeSystem.concept.property> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeSystem.concept.property>
}
<OneOrMore_Coding> CLOSED {
rdf:first @<Coding> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Coding>
}
#---------------------- 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 extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource.
fhirvs:codesystem-content-mode ["not-present" "example" "fragment" "complete" "supplement"]
# The meaning of the hierarchy of concepts in a code system.
fhirvs:codesystem-hierarchy-meaning ["grouped-by" "is-a" "part-of" "classified-with"]
# The type of a property value.
fhirvs:concept-property-type ["code" "Coding" "string" "integer" "boolean" "dateTime" "decimal"]
# 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.
FHIR ®© HL7.org 2011+. FHIR R6 hl7.fhir.r6.core#6.0.0-ballot4 generated on Tue, Aug 18, 2026 17:36+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R4 |
Compare to R5 |
Compare to Last Ballot |
|
Propose a change