FHIR CI-Build

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

Nutritionproduct.shex

Orders and Observations Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw ShEx

ShEx statement for nutritionproduct

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 <Ratio.shex>
IMPORT <string.shex>
IMPORT <boolean.shex>
IMPORT <markdown.shex>
IMPORT <Quantity.shex>
IMPORT <dateTime.shex>
IMPORT <Annotation.shex>
IMPORT <Identifier.shex>
IMPORT <Attachment.shex>
IMPORT <base64Binary.shex>
IMPORT <Organization.shex>
IMPORT <DomainResource.shex>
IMPORT <SimpleQuantity.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableReference.shex>

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

# A product used for nutritional purposes (i.e. food or supplement)
<NutritionProduct> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:NutritionProduct]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:code @<CodeableConcept>?;          # A code that can identify the 
                                            # product 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:nutritionproduct-status};  # active | inactive | 
                                            # entered-in-error 
    fhir:category @<OneOrMore_CodeableConcept>?;  # Broad product groups, like Fruit, 
                                            # Grain, Beverages, or Vegetables 
                                            # Products 
    fhir:manufacturer @<OneOrMore_Reference_Organization>?;  # Manufacturer, representative or 
                                            # officially responsible for the 
                                            # product 
    fhir:nutrient @<OneOrMore_NutritionProduct.nutrient>?;  # The product's nutritional 
                                            # information expressed by the 
                                            # nutrients 
    fhir:ingredientSummary @<markdown>?;    # Textual description of product 
                                            # ingredients 
    fhir:ingredient @<OneOrMore_NutritionProduct.ingredient>?;  # Ingredients contained in this 
                                            # product 
    fhir:energy @<Quantity>?;               # The amount of energy present in 
                                            # the product expressed in 
                                            # kilocalories or kilojoules 
    fhir:characteristic @<OneOrMore_NutritionProduct.characteristic>?;  # Specifies descriptive properties 
                                            # of the nutrition product 
    fhir:instance @<OneOrMore_NutritionProduct.instance>?;  # One or several physical instances 
                                            # or occurrences of the nutrition 
                                            # product 
    fhir:note @<OneOrMore_Annotation>?;     # Comments made about the product
}  

# Ingredients contained in this product
<NutritionProduct.ingredient> EXTENDS @<BackboneElement> CLOSED {   
    fhir:item @<CodeableReference>;         # The ingredient contained in the 
                                            # product 
    fhir:amount @<Ratio>  OR 
    			@<Quantity>  ?;  # The amount of ingredient that is 
                                            # in the product 
    fhir:allergen @<boolean>?;              # Known or suspected substances that 
                                            # are a part of this product 
}  

# The product's nutritional information expressed by the nutrients
<NutritionProduct.nutrient> EXTENDS @<BackboneElement> CLOSED {   
    fhir:item @<CodeableReference>;         # The (relevant) nutrients in the 
                                            # product 
    fhir:amount @<Ratio>  OR 
    			@<Quantity>  ?;  # The amount of nutrient present in 
                                            # the product 
}  

# One or several physical instances or occurrences of the nutrition product
<NutritionProduct.instance> EXTENDS @<BackboneElement> CLOSED {   
    fhir:quantity @<Quantity>?;             # The amount of items or instances
    fhir:identifier @<OneOrMore_Identifier>?;  # The identifier for the physical 
                                            # instance, typically a serial 
                                            # number or manufacturer number 
    fhir:name @<string>?;                   # The name or brand for the specific 
                                            # product 
    fhir:lotNumber @<string>?;              # The identification of the batch or 
                                            # lot of the product 
    fhir:expiry @<dateTime>?;               # The expiry date or date and time 
                                            # for the product 
    fhir:useBy @<dateTime>?;                # The date until which the product 
                                            # is expected to be good for 
                                            # consumption 
    fhir:biologicalSourceEvent @<Identifier>?;  # An identifier that supports 
                                            # traceability to the event during 
                                            # which material in this product 
                                            # from one or more biological 
                                            # entities was obtained or pooled 
}  

# Specifies descriptive properties of the nutrition product
<NutritionProduct.characteristic> EXTENDS @<BackboneElement> CLOSED {   
    fhir:type @<CodeableConcept>;           # Code specifying the type of 
                                            # characteristic 
    fhir:value @<CodeableConcept>  OR 
    			@<string>  OR 
    			@<SimpleQuantity>  OR 
    			@<base64Binary>  OR 
    			@<Attachment>  OR 
    			@<boolean>  ;  # The value of the characteristic
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}
<OneOrMore_Reference_Organization> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Organization> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Organization> 
}
<OneOrMore_NutritionProduct.nutrient> CLOSED {
    rdf:first @<NutritionProduct.nutrient>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_NutritionProduct.nutrient> 
}
<OneOrMore_NutritionProduct.ingredient> CLOSED {
    rdf:first @<NutritionProduct.ingredient>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_NutritionProduct.ingredient> 
}
<OneOrMore_NutritionProduct.characteristic> CLOSED {
    rdf:first @<NutritionProduct.characteristic>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_NutritionProduct.characteristic> 
}
<OneOrMore_NutritionProduct.instance> CLOSED {
    rdf:first @<NutritionProduct.instance>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_NutritionProduct.instance> 
}
<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}

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

# Codes identifying the lifecycle stage of a product.
fhirvs:nutritionproduct-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.