QI-Core Implementation Guide
4.1.0 - release

Publication Build: This will be filled in by the publication tooling

## Resource Profile: QICoreSubstance - TTL Profile

TTL representation of the qicore-substance resource profile.

Raw ttl | Download

    @prefix fhir: <http://hl7.org/fhir/> .
    @prefix owl: <http://www.w3.org/2002/07/owl#> .
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

    # - resource -------------------------------------------------------------------

     a fhir:StructureDefinition;
      fhir:nodeRole fhir:treeRoot;
      fhir:Resource.id [ fhir:value "qicore-substance"];
      fhir:DomainResource.text [
         fhir:Narrative.status [ fhir:value "extensions" ];
         fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;\"><tr style=\"border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top\"><th style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"The logical name of the element\">Name</a></th><th style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Information about the use of the element\">Flags</a></th><th style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Minimum and Maximum # of times the the element can appear in the instance\">Card.</a></th><th style=\"width: 100px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Reference to the type of the element\">Type</a></th><th style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Additional information about the element\">Description &amp; Constraints</a><span style=\"float: right\"><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Legend for this format\"><img src=\"http://hl7.org/fhir/R4/help16.png\" alt=\"doco\" style=\"background-color: inherit\"/></a></span></th></tr><tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_resource.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance\">Substance</a><a name=\"Substance\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/substance.html\">Substance</a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">A homogeneous material with a definite composition</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.code\">code</a><a name=\"Substance.code\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#CodeableConcept\">CodeableConcept</a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">What substance this is</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck11.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.instance\">instance</a><a name=\"Substance.instance\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#BackboneElement\">BackboneElement</a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">If this describes a specific package/container of the substance</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck100.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vline.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.instance.quantity\">quantity</a><a name=\"Substance.instance.quantity\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#SimpleQuantity\" title=\"Quantity\">SimpleQuantity</a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Amount of substance in the package</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck01.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.ingredient\">ingredient</a><a name=\"Substance.ingredient\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"/><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">*</span></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#BackboneElement\">BackboneElement</a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Composition information about the substance</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7\"><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck010.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_element.gif\" alt=\".\" style=\"background-color: #F7F7F7; background-color: inherit\" title=\"Element\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.ingredient.quantity\">quantity</a><a name=\"Substance.ingredient.quantity\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">0</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a style=\"opacity: 0.5\" href=\"http://hl7.org/fhir/R4/datatypes.html#Ratio\">Ratio</a></td><td style=\"vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">Optional amount (concentration)</span></td></tr>\r\n<tr style=\"border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white\"><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck000.png)\" class=\"hierarchy\"><img src=\"tbl_spacer.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_blank.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"tbl_vjoin_end.png\" alt=\".\" style=\"background-color: inherit\" class=\"hierarchy\"/><img src=\"icon_reference.png\" alt=\".\" style=\"background-color: white; background-color: inherit\" title=\"Reference to another Resource\" class=\"hierarchy\"/> <a href=\"StructureDefinition-qicore-substance-definitions.html#Substance.ingredient.substance[x]\">substance[x]</a><a name=\"Substance.ingredient.substance_x_\"> </a></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"padding-left: 3px; padding-right: 3px; color: white; background-color: red\" title=\"This element must be supported\">S</span></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">1</span><span style=\"opacity: 0.5\">..</span><span style=\"opacity: 0.5\">1</span></td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><a href=\"http://hl7.org/fhir/R4/references.html\">Reference</a>(<a href=\"StructureDefinition-qicore-substance.html\">QICoreSubstance</a>)</td><td style=\"vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px\" class=\"hierarchy\"><span style=\"opacity: 0.5\">A component of the substance</span></td></tr>\r\n<tr><td colspan=\"5\" class=\"hierarchy\"><br/><a href=\"http://hl7.org/fhir/R4/formats.html#table\" title=\"Legend for this format\"><img src=\"http://hl7.org/fhir/R4/help16.png\" alt=\"doco\" style=\"background-color: inherit\"/> Documentation for this format</a></td></tr></table></div>"
      ];
      fhir:StructureDefinition.url [ fhir:value "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-substance"];
      fhir:StructureDefinition.version [ fhir:value "4.1.0"];
      fhir:StructureDefinition.name [ fhir:value "QICoreSubstance"];
      fhir:StructureDefinition.status [ fhir:value "draft"];
      fhir:StructureDefinition.experimental [ fhir:value "false"^^xsd:boolean];
      fhir:StructureDefinition.date [ fhir:value "2018-08-22"^^xsd:date];
      fhir:StructureDefinition.publisher [ fhir:value "http://www.hl7.org/Special/committees/cqi/index.cfm"];
      fhir:StructureDefinition.contact [
         fhir:index 0;
         fhir:ContactDetail.name [ fhir:value "Clinical Quality Information WG" ];
         fhir:ContactDetail.telecom [
           fhir:index 0;
           fhir:ContactPoint.system [ fhir:value "url" ];
           fhir:ContactPoint.value [ fhir:value "http://www.hl7.org/Special/committees/cqi" ]     ]
      ];
      fhir:StructureDefinition.description [ fhir:value "Profile of Substance for decision support/quality metrics. Defines the core set of elements and extensions for quality rule and measure authors."];
      fhir:StructureDefinition.jurisdiction [
         fhir:index 0;
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ];
           fhir:Coding.code [ fhir:value "US" ]     ]
      ];
      fhir:StructureDefinition.fhirVersion [ fhir:value "4.0.1"];
      fhir:StructureDefinition.mapping [
         fhir:index 0;
         fhir:StructureDefinition.mapping.identity [ fhir:value "rim" ];
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/v3" ];
         fhir:StructureDefinition.mapping.name [ fhir:value "RIM Mapping" ]
      ], [
         fhir:index 1;
         fhir:StructureDefinition.mapping.identity [ fhir:value "orim" ];
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/orim" ];
         fhir:StructureDefinition.mapping.name [ fhir:value "Ontological RIM Mapping" ]
      ], [
         fhir:index 2;
         fhir:StructureDefinition.mapping.identity [ fhir:value "w5" ];
         fhir:StructureDefinition.mapping.uri [ fhir:value "http://hl7.org/fhir/fivews" ];
         fhir:StructureDefinition.mapping.name [ fhir:value "FiveWs Pattern Mapping" ]
      ];
      fhir:StructureDefinition.kind [ fhir:value "resource"];
      fhir:StructureDefinition.abstract [ fhir:value "false"^^xsd:boolean];
      fhir:StructureDefinition.type [ fhir:value "Substance"];
      fhir:StructureDefinition.baseDefinition [
         fhir:value "http://hl7.org/fhir/StructureDefinition/Substance";
         fhir:link <http://hl7.org/fhir/StructureDefinition/Substance>
      ];
      fhir:StructureDefinition.derivation [ fhir:value "constraint"];
      fhir:StructureDefinition.snapshot [
         fhir:StructureDefinition.snapshot.element [
           fhir:index 0;
           fhir:Element.id [ fhir:value "Substance" ];
           fhir:ElementDefinition.path [ fhir:value "Substance" ];
           fhir:ElementDefinition.short [ fhir:value "A homogeneous material with a definite composition" ];
           fhir:ElementDefinition.definition [ fhir:value "A homogeneous material with a definite composition." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-2" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "If the resource is contained in another resource, it SHALL NOT contain nested Resources" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.contained.empty()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(parent::f:contained and f:contained)" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DomainResource";
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-3" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DomainResource";
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>         ]       ], [
             fhir:index 2;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-4" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DomainResource";
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>         ]       ], [
             fhir:index 3;
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-5" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "If a resource is contained in another resource, it SHALL NOT have a security label" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "contained.meta.security.empty()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "not(exists(f:contained/*/f:meta/f:security))" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DomainResource";
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>         ]       ], [
             fhir:index 4;
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice" ];
               fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]         ], [
               fhir:index 1;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation" ];
               fhir:Extension.valueMarkdown [ fhir:value "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." ]         ];
             fhir:ElementDefinition.constraint.key [ fhir:value "dom-6" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "warning" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "A resource should have narrative for robust management" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "text.`div`.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:text/h:div)" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/DomainResource";
               fhir:link <http://hl7.org/fhir/StructureDefinition/DomainResource>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "Entity. Role, or Act" ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "Material" ]       ], [
             fhir:index 2;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:Substance rdfs:subClassOf   rim:Entity, [      a owl:Restriction;     owl:onProperty  rim:Act.classCode;     owl:allValuesFrom  cs:EntityClass\\#MAT   ]." ]       ]     ], [
           fhir:index 1;
           fhir:Element.id [ fhir:value "Substance.id" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.id" ];
           fhir:ElementDefinition.short [ fhir:value "Logical id of this artifact" ];
           fhir:ElementDefinition.definition [ fhir:value "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ];
           fhir:ElementDefinition.comment [ fhir:value "The only time that a resource does not have an id is when it is being submitted to the server using a create operation." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.id" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ];
               fhir:Extension.valueUrl [ fhir:value "string" ]         ];
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 2;
           fhir:Element.id [ fhir:value "Substance.meta" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.meta" ];
           fhir:ElementDefinition.short [ fhir:value "Metadata about the resource" ];
           fhir:ElementDefinition.definition [ fhir:value "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.meta" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Meta" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 3;
           fhir:Element.id [ fhir:value "Substance.implicitRules" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.implicitRules" ];
           fhir:ElementDefinition.short [ fhir:value "A set of rules under which this content was created" ];
           fhir:ElementDefinition.definition [ fhir:value "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc." ];
           fhir:ElementDefinition.comment [ fhir:value "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.implicitRules" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "uri" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifierReason [ fhir:value "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation" ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 4;
           fhir:Element.id [ fhir:value "Substance.language" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.language" ];
           fhir:ElementDefinition.short [ fhir:value "Language of the resource content" ];
           fhir:ElementDefinition.definition [ fhir:value "The base language in which the resource is written." ];
           fhir:ElementDefinition.comment [ fhir:value "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Resource.language" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet" ];
               fhir:Extension.valueCanonical [
                 fhir:value "http://hl7.org/fhir/ValueSet/all-languages";
                 fhir:link <http://hl7.org/fhir/ValueSet/all-languages>           ]         ], [
               fhir:index 1;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ];
               fhir:Extension.valueString [ fhir:value "Language" ]         ], [
               fhir:index 2;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ];
               fhir:Extension.valueBoolean [ fhir:value "true"^^xsd:boolean ]         ];
             fhir:ElementDefinition.binding.strength [ fhir:value "preferred" ];
             fhir:ElementDefinition.binding.description [ fhir:value "A human language." ];
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/languages";
               fhir:link <http://hl7.org/fhir/ValueSet/languages>         ]       ]     ], [
           fhir:index 5;
           fhir:Element.id [ fhir:value "Substance.text" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.text" ];
           fhir:ElementDefinition.short [ fhir:value "Text summary of the resource, for human interpretation" ];
           fhir:ElementDefinition.definition [ fhir:value "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety." ];
           fhir:ElementDefinition.comment [ fhir:value "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later." ];
           fhir:ElementDefinition.alias [
             fhir:value "narrative";
             fhir:index 0       ], [
             fhir:value "html";
             fhir:index 1       ], [
             fhir:value "xhtml";
             fhir:index 2       ], [
             fhir:value "display";
             fhir:index 3       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.text" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Narrative" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "Act.text?" ]       ]     ], [
           fhir:index 6;
           fhir:Element.id [ fhir:value "Substance.contained" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.contained" ];
           fhir:ElementDefinition.short [ fhir:value "Contained, inline Resources" ];
           fhir:ElementDefinition.definition [ fhir:value "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope." ];
           fhir:ElementDefinition.comment [ fhir:value "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels." ];
           fhir:ElementDefinition.alias [
             fhir:value "inline resources";
             fhir:index 0       ], [
             fhir:value "anonymous resources";
             fhir:index 1       ], [
             fhir:value "contained resources";
             fhir:index 2       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.contained" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Resource" ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]       ]     ], [
           fhir:index 7;
           fhir:Element.id [ fhir:value "Substance.extension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.extension" ];
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.extension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]       ]     ], [
           fhir:index 8;
           fhir:Element.id [ fhir:value "Substance.modifierExtension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.modifierExtension" ];
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "DomainResource.modifierExtension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]       ]     ], [
           fhir:index 9;
           fhir:Element.id [ fhir:value "Substance.identifier" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.identifier" ];
           fhir:ElementDefinition.short [ fhir:value "Unique identifier" ];
           fhir:ElementDefinition.definition [ fhir:value "Unique identifier for the substance." ];
           fhir:ElementDefinition.comment [ fhir:value "This identifier is associated with the kind of substance in contrast to the  Substance.instance.identifier which is associated with the package/container." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.identifier" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.identifier" ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".id" ]       ]     ], [
           fhir:index 10;
           fhir:Element.id [ fhir:value "Substance.status" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.status" ];
           fhir:ElementDefinition.short [ fhir:value "active | inactive | entered-in-error" ];
           fhir:ElementDefinition.definition [ fhir:value "A code to indicate if the substance is actively used." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.status" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "code" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifierReason [ fhir:value "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ];
               fhir:Extension.valueString [ fhir:value "FHIRSubstanceStatus" ]         ];
             fhir:ElementDefinition.binding.strength [ fhir:value "required" ];
             fhir:ElementDefinition.binding.description [ fhir:value "A code to indicate if the substance is actively used." ];
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/substance-status|4.0.1";
               fhir:link <http://hl7.org/fhir/ValueSet/substance-status|4.0.1>         ]       ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.status" ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".statusCode" ]       ]     ], [
           fhir:index 11;
           fhir:Element.id [ fhir:value "Substance.category" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.category" ];
           fhir:ElementDefinition.short [ fhir:value "What class/type of substance this is" ];
           fhir:ElementDefinition.definition [ fhir:value "A code that classifies the general type of substance.  This is used  for searching, sorting and display purposes." ];
           fhir:ElementDefinition.comment [ fhir:value "The level of granularity is defined by the category concepts in the value set.   More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in Substance.code." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.category" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ];
               fhir:Extension.valueString [ fhir:value "SubstanceCategory" ]         ];
             fhir:ElementDefinition.binding.strength [ fhir:value "extensible" ];
             fhir:ElementDefinition.binding.description [ fhir:value "Category or classification of substance." ];
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/substance-category";
               fhir:link <http://hl7.org/fhir/ValueSet/substance-category>         ]       ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.class" ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".code" ]       ]     ], [
           fhir:index 12;
           fhir:Element.id [ fhir:value "Substance.code" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.code" ];
           fhir:ElementDefinition.short [ fhir:value "What substance this is" ];
           fhir:ElementDefinition.definition [ fhir:value "A code (or set of codes) that identify this substance." ];
           fhir:ElementDefinition.comment [ fhir:value "This could be a reference to an externally defined code.  It could also be a locally assigned code (e.g. a formulary),  optionally with translations to the standard drug codes." ];
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.code" ];
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "CodeableConcept" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.binding [
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ];
               fhir:Extension.valueString [ fhir:value "SubstanceCode" ]         ];
             fhir:ElementDefinition.binding.strength [ fhir:value "example" ];
             fhir:ElementDefinition.binding.description [ fhir:value "Substance codes." ];
             fhir:ElementDefinition.binding.valueSet [
               fhir:value "http://hl7.org/fhir/ValueSet/substance-code";
               fhir:link <http://hl7.org/fhir/ValueSet/substance-code>         ]       ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "w5" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "FiveWs.what[x]" ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".code" ]       ], [
             fhir:index 2;
             fhir:ElementDefinition.mapping.identity [ fhir:value "orim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "fhir:Substance.code rdfs:subPropertyOf rim:Entity.code" ]       ]     ], [
           fhir:index 13;
           fhir:Element.id [ fhir:value "Substance.description" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.description" ];
           fhir:ElementDefinition.short [ fhir:value "Textual description of the substance, comments" ];
           fhir:ElementDefinition.definition [ fhir:value "A description of the substance - its appearance, handling requirements, and other usage notes." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.description" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "string" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".player.desc" ]       ]     ], [
           fhir:index 14;
           fhir:Element.id [ fhir:value "Substance.instance" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance" ];
           fhir:ElementDefinition.short [ fhir:value "If this describes a specific package/container of the substance" ];
           fhir:ElementDefinition.definition [ fhir:value "Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.instance" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "BackboneElement" ]       ];
           fhir:ElementDefinition.meaningWhenMissing [ fhir:value "If this element is not present, then the substance resource describes a kind of substance" ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".player.determinerCode" ]       ]     ], [
           fhir:index 15;
           fhir:Element.id [ fhir:value "Substance.instance.id" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.id" ];
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr";
             fhir:index 0       ];
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ];
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ];
               fhir:Extension.valueUrl [ fhir:value "string" ]         ];
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]       ]     ], [
           fhir:index 16;
           fhir:Element.id [ fhir:value "Substance.instance.extension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.extension" ];
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]       ]     ], [
           fhir:index 17;
           fhir:Element.id [ fhir:value "Substance.instance.modifierExtension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.modifierExtension" ];
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored even if unrecognized" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ], [
             fhir:value "modifiers";
             fhir:index 2       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "BackboneElement.modifierExtension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]       ]     ], [
           fhir:index 18;
           fhir:Element.id [ fhir:value "Substance.instance.identifier" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.identifier" ];
           fhir:ElementDefinition.short [ fhir:value "Identifier of the package/container" ];
           fhir:ElementDefinition.definition [ fhir:value "Identifier associated with the package/container (usually a label affixed directly)." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.instance.identifier" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Identifier" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".id" ]       ]     ], [
           fhir:index 19;
           fhir:Element.id [ fhir:value "Substance.instance.expiry" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.expiry" ];
           fhir:ElementDefinition.short [ fhir:value "When no longer valid to use" ];
           fhir:ElementDefinition.definition [ fhir:value "When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.instance.expiry" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "dateTime" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".expiryTime" ]       ]     ], [
           fhir:index 20;
           fhir:Element.id [ fhir:value "Substance.instance.quantity" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.quantity" ];
           fhir:ElementDefinition.short [ fhir:value "Amount of substance in the package" ];
           fhir:ElementDefinition.definition [ fhir:value "The amount of the substance." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.instance.quantity" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Quantity" ];
             fhir:ElementDefinition.type.profile [
               fhir:value "http://hl7.org/fhir/StructureDefinition/SimpleQuantity";
               fhir:index 0;
               fhir:link <http://hl7.org/fhir/StructureDefinition/SimpleQuantity>         ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".player.quantity" ]       ]     ], [
           fhir:index 21;
           fhir:Element.id [ fhir:value "Substance.ingredient" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient" ];
           fhir:ElementDefinition.short [ fhir:value "Composition information about the substance" ];
           fhir:ElementDefinition.definition [ fhir:value "A substance can be composed of other substances." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.ingredient" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "BackboneElement" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".player.scopesRole[classCode=INGR]" ]       ]     ], [
           fhir:index 22;
           fhir:Element.id [ fhir:value "Substance.ingredient.id" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.id" ];
           fhir:ElementDefinition.representation [
             fhir:value "xmlAttr";
             fhir:index 0       ];
           fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ];
           fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.id" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:Element.extension [
               fhir:index 0;
               fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ];
               fhir:Extension.valueUrl [ fhir:value "string" ]         ];
             fhir:ElementDefinition.type.code [ fhir:value "http://hl7.org/fhirpath/System.String" ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]       ]     ], [
           fhir:index 23;
           fhir:Element.id [ fhir:value "Substance.ingredient.extension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.extension" ];
           fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Element.extension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "n/a" ]       ]     ], [
           fhir:index 24;
           fhir:Element.id [ fhir:value "Substance.ingredient.modifierExtension" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.modifierExtension" ];
           fhir:ElementDefinition.short [ fhir:value "Extensions that cannot be ignored even if unrecognized" ];
           fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." ];
           fhir:ElementDefinition.comment [ fhir:value "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ];
           fhir:ElementDefinition.requirements [ fhir:value "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension)." ];
           fhir:ElementDefinition.alias [
             fhir:value "extensions";
             fhir:index 0       ], [
             fhir:value "user content";
             fhir:index 1       ], [
             fhir:value "modifiers";
             fhir:index 2       ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "*" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "BackboneElement.modifierExtension" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "*" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Extension" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ], [
             fhir:index 1;
             fhir:ElementDefinition.constraint.key [ fhir:value "ext-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "Must have either extensions or value[x], not both" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "extension.exists() != value.exists()" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Extension";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Extension>         ]       ];
           fhir:ElementDefinition.isModifier [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifierReason [ fhir:value "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them" ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value "N/A" ]       ]     ], [
           fhir:index 25;
           fhir:Element.id [ fhir:value "Substance.ingredient.quantity" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.quantity" ];
           fhir:ElementDefinition.short [ fhir:value "Optional amount (concentration)" ];
           fhir:ElementDefinition.definition [ fhir:value "The amount of the ingredient in the substance - a concentration ratio." ];
           fhir:ElementDefinition.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.ingredient.quantity" ];
             fhir:ElementDefinition.base.min [ fhir:value "0"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Ratio" ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".quantity" ]       ]     ], [
           fhir:index 26;
           fhir:Element.id [ fhir:value "Substance.ingredient.substance[x]" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.substance[x]" ];
           fhir:ElementDefinition.short [ fhir:value "A component of the substance" ];
           fhir:ElementDefinition.definition [ fhir:value "Another substance that is a component of this substance." ];
           fhir:ElementDefinition.min [ fhir:value "1"^^xsd:nonNegativeInteger ];
           fhir:ElementDefinition.max [ fhir:value "1" ];
           fhir:ElementDefinition.base [
             fhir:ElementDefinition.base.path [ fhir:value "Substance.ingredient.substance[x]" ];
             fhir:ElementDefinition.base.min [ fhir:value "1"^^xsd:nonNegativeInteger ];
             fhir:ElementDefinition.base.max [ fhir:value "1" ]       ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ];
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-substance";
               fhir:index 0;
               fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-substance>         ]       ];
           fhir:ElementDefinition.constraint [
             fhir:index 0;
             fhir:ElementDefinition.constraint.key [ fhir:value "ele-1" ];
             fhir:ElementDefinition.constraint.severity [ fhir:value "error" ];
             fhir:ElementDefinition.constraint.human [ fhir:value "All FHIR elements must have a @value or children" ];
             fhir:ElementDefinition.constraint.expression [ fhir:value "hasValue() or (children().count() > id.count())" ];
             fhir:ElementDefinition.constraint.xpath [ fhir:value "@value|f:*|h:div" ];
             fhir:ElementDefinition.constraint.source [
               fhir:value "http://hl7.org/fhir/StructureDefinition/Element";
               fhir:link <http://hl7.org/fhir/StructureDefinition/Element>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.isModifier [ fhir:value "false"^^xsd:boolean ];
           fhir:ElementDefinition.isSummary [ fhir:value "true"^^xsd:boolean ];
           fhir:ElementDefinition.mapping [
             fhir:index 0;
             fhir:ElementDefinition.mapping.identity [ fhir:value "rim" ];
             fhir:ElementDefinition.mapping.map [ fhir:value ".player" ]       ]     ]
      ];
      fhir:StructureDefinition.differential [
         fhir:StructureDefinition.differential.element [
           fhir:index 0;
           fhir:Element.id [ fhir:value "Substance" ];
           fhir:ElementDefinition.path [ fhir:value "Substance" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ]     ], [
           fhir:index 1;
           fhir:Element.id [ fhir:value "Substance.code" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.code" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 2;
           fhir:Element.id [ fhir:value "Substance.instance" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ]     ], [
           fhir:index 3;
           fhir:Element.id [ fhir:value "Substance.instance.quantity" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.instance.quantity" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 4;
           fhir:Element.id [ fhir:value "Substance.ingredient" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "false"^^xsd:boolean ]     ], [
           fhir:index 5;
           fhir:Element.id [ fhir:value "Substance.ingredient.quantity" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.quantity" ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]     ], [
           fhir:index 6;
           fhir:Element.id [ fhir:value "Substance.ingredient.substance[x]" ];
           fhir:ElementDefinition.path [ fhir:value "Substance.ingredient.substance[x]" ];
           fhir:ElementDefinition.type [
             fhir:index 0;
             fhir:ElementDefinition.type.code [ fhir:value "Reference" ];
             fhir:ElementDefinition.type.targetProfile [
               fhir:value "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-substance";
               fhir:index 0;
               fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-substance>         ]       ];
           fhir:ElementDefinition.mustSupport [ fhir:value "true"^^xsd:boolean ]     ]
      ].

    # - ontology header ------------------------------------------------------------

     a owl:Ontology;
      owl:imports fhir:fhir.ttl.