FHIR CI-Build

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

Substance.shex

Biomedical Research and Regulation Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for substance

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 <markdown.shex>
IMPORT <dateTime.shex>
IMPORT <Quantity.shex>
IMPORT <Identifier.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <CodeableReference.shex>

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

# A homogeneous material with a definite composition
<Substance> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:Substance]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Unique identifier
    fhir:status @<code> AND
    	{fhir:v @fhirvs:substance-status}?;  # active | inactive | 
                                            # entered-in-error 
    fhir:category @<OneOrMore_CodeableConcept>?;  # What class/type of substance this 
                                            # is 
    fhir:code @<CodeableReference>;         # What substance this is
    fhir:description @<markdown>?;          # Textual description of the 
                                            # substance, comments 
    fhir:expiry @<dateTime>?;               # When no longer valid to use
    fhir:quantity @<Quantity>?;             # Amount of substance in the package
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

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

# A code to indicate if the substance is actively used.
fhirvs:substance-status ["active" "inactive" "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.