SQL on FHIR
2.0.0-pre - ci-build
SQL on FHIR, published by HL7. This guide is not an authorized publication; it is the continuous build for version 2.0.0-pre built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/FHIR/sql-on-fhir-v2/ and changes regularly. See the Directory of published versions
Draft as of 2024-10-03 |
XML representation of the TabularViewDefinition logical model.
<StructureDefinition xmlns="http://hl7.org/fhir">
<id value="TabularViewDefinition"/>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureDefinition TabularViewDefinition</b></p><a name="TabularViewDefinition"> </a><a name="hcTabularViewDefinition"> </a><a name="TabularViewDefinition-en-US"> </a><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="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" 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="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" 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="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Minimum and Maximum # of times the element can appear in the instance">Card.</a></th><th style="width: 100px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" 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="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Additional information about the element">Description & Constraints</a><span style="float: right"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" 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_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-TabularViewDefinition-definitions.html#ViewDefinition">ViewDefinition</a><a name="ViewDefinition"> </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="StructureDefinition-ViewDefinition.html">ViewDefinition</a></td><td style="vertical-align: top; text-align : left; background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><br/>Elements defined in Ancestors:<a href="StructureDefinition-ViewDefinition.html" title="Canonical identifier for this view definition, represented as a URI (globally unique)">url</a>, <a href="StructureDefinition-ViewDefinition.html" title="Additional identifier for the view definition">identifier</a>, <a href="StructureDefinition-ViewDefinition.html" title="Name of the view definition, must be in a database-friendly format.">name</a>, <a href="StructureDefinition-ViewDefinition.html" title="A optional human-readable description of the view.">title</a>, <a href="StructureDefinition-ViewDefinition.html" title="Metadata about the view definition">meta</a>, <a href="StructureDefinition-ViewDefinition.html" title="draft | active | retired | unknown">status</a>, <a href="StructureDefinition-ViewDefinition.html" title="For testing purposes, not real usage">experimental</a>, <a href="StructureDefinition-ViewDefinition.html" title="Name of the publisher/steward (organization or individual)">publisher</a>, <a href="StructureDefinition-ViewDefinition.html" title="Contact details for the publisher">contact</a>, <a href="StructureDefinition-ViewDefinition.html" title="Natural language description of the view definition">description</a>, <a href="StructureDefinition-ViewDefinition.html" title="The context that the content is intended to support">useContext</a>, <a href="StructureDefinition-ViewDefinition.html" title="Use and/or publishing restrictions">copyright</a>, <a href="StructureDefinition-ViewDefinition.html" title="The FHIR resource that the view is based upon, e.g. 'Patient' or 'Observation'.">resource</a>, <a href="StructureDefinition-ViewDefinition.html" title="The FHIR version(s) for the FHIR resource. The value of this element is the
formal version of the specification, without the revision number, e.g.
[publication].[major].[minor].">fhirVersion</a>, <a href="StructureDefinition-ViewDefinition.html" title="A constant is a value that is injected into a FHIRPath expression through the use of a FHIRPath
external constant with the same name.">constant</a>, <a href="StructureDefinition-ViewDefinition.html" title="The select structure defines the columns to be used in the resulting view. These are expressed
in the `column` structure below, or in nested `select`s for nested resources.">select</a>, <a href="StructureDefinition-ViewDefinition.html" title="A series of zero or more FHIRPath constraints to filter resources for the view. Every constraint
must evaluate to true for the resource to be included in the view.">where</a><br/><span style="opacity: 0.5">View Definition</span><br/><span style="font-weight:bold">Instances of this logical model are not marked to be the target of a Reference</span></td></tr>
<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_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: #F7F7F7; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-TabularViewDefinition-definitions.html#ViewDefinition.select">select</a><a name="ViewDefinition.select"> </a></td><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : left; background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/></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_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_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-TabularViewDefinition-definitions.html#ViewDefinition.select.column">column</a><a name="ViewDefinition.select.column"> </a></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="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R5/conformance-rules.html#constraints" title="This element has or is affected by constraints ( no-collections, primitives-only )">C</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">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/R5/types.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">A column to be produced in the resulting table.</span><br/><span style="font-weight:bold">no-collections: </span>Tabular view columns must not be collections.<br/><span style="font-weight:bold">primitives-only: </span>Tabular view columns only contain primitive values.</td></tr>
<tr><td colspan="5" class="hierarchy"><br/><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/> Documentation for this format</a></td></tr></table></div>
</text>
<url
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/TabularViewDefinition"/>
<version value="2.0.0-pre"/>
<name value="TabularViewDefinition"/>
<title value="Tabular View Definition"/>
<status value="draft"/>
<date value="2024-10-03T17:43:57+00:00"/>
<publisher value="HL7"/>
<contact>
<name value="HL7"/>
<telecom>
<system value="url"/>
<value value="http://example.org/example-publisher"/>
</telecom>
</contact>
<description
value="A profile for View Definitions where each resulting field must contain only a simple scalar value.
This is sometimes referred to as 'CSV Mode', but applies to any system that explicitly constrains
its views or tables to tabular data."/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
<display value="World"/>
</coding>
</jurisdiction>
<fhirVersion value="5.0.0"/>
<mapping>
<identity value="rim"/>
<uri value="http://hl7.org/v3"/>
<name value="RIM Mapping"/>
</mapping>
<kind value="logical"/>
<abstract value="false"/>
<type
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
<baseDefinition
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
<derivation value="constraint"/>
<snapshot>
<element id="ViewDefinition">
<path value="ViewDefinition"/>
<short value="View Definition"/>
<definition
value="A ViewDefinition represents a tabular projection of a FHIR resource, where the columns and inclusion
criteria are defined by FHIRPath expressions. "/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Base"/>
<min value="0"/>
<max value="*"/>
</base>
<isModifier value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.url">
<path value="ViewDefinition.url"/>
<short
value="Canonical identifier for this view definition, represented as a URI (globally unique)"/>
<definition
value="Canonical identifier for this view definition, represented as a URI (globally unique)"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.url"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
</element>
<element id="ViewDefinition.identifier">
<path value="ViewDefinition.identifier"/>
<short value="Additional identifier for the view definition"/>
<definition value="Additional identifier for the view definition"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.identifier"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Identifier"/>
</type>
</element>
<element id="ViewDefinition.name">
<path value="ViewDefinition.name"/>
<short
value="Name of view definition (computer and database friendly)"/>
<definition
value="Name of the view definition, must be in a database-friendly format."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.name"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<constraint>
<key value="sql-name"/>
<severity value="error"/>
<human
value="Name is limited to letters, numbers, or underscores and cannot start with an
underscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$
This makes it usable as table names in a wide variety of databases."/>
<expression value="empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
</constraint>
</element>
<element id="ViewDefinition.title">
<path value="ViewDefinition.title"/>
<short value="Name for this view definition (human friendly)"/>
<definition value="A optional human-readable description of the view."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.title"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.meta">
<path value="ViewDefinition.meta"/>
<short value="Metadata about the view definition"/>
<definition value="Metadata about the view definition"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.meta"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="Meta"/>
</type>
</element>
<element id="ViewDefinition.status">
<path value="ViewDefinition.status"/>
<short value="draft | active | retired | unknown"/>
<definition value="draft | active | retired | unknown"/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.status"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<valueSet value="http://hl7.org/fhir/ValueSet/publication-status"/>
</binding>
</element>
<element id="ViewDefinition.experimental">
<path value="ViewDefinition.experimental"/>
<short value="For testing purposes, not real usage"/>
<definition value="For testing purposes, not real usage"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.experimental"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="boolean"/>
</type>
</element>
<element id="ViewDefinition.publisher">
<path value="ViewDefinition.publisher"/>
<short
value="Name of the publisher/steward (organization or individual)"/>
<definition
value="Name of the publisher/steward (organization or individual)"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.publisher"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.contact">
<path value="ViewDefinition.contact"/>
<short value="Contact details for the publisher"/>
<definition value="Contact details for the publisher"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.contact"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="ContactDetail"/>
</type>
</element>
<element id="ViewDefinition.description">
<path value="ViewDefinition.description"/>
<short value="Natural language description of the view definition"/>
<definition
value="Natural language description of the view definition"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.description"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="markdown"/>
</type>
</element>
<element id="ViewDefinition.useContext">
<path value="ViewDefinition.useContext"/>
<short value="The context that the content is intended to support"/>
<definition
value="The context that the content is intended to support"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.useContext"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="UsageContext"/>
</type>
</element>
<element id="ViewDefinition.copyright">
<path value="ViewDefinition.copyright"/>
<short value="Use and/or publishing restrictions"/>
<definition value="Use and/or publishing restrictions"/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.copyright"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="markdown"/>
</type>
</element>
<element id="ViewDefinition.resource">
<path value="ViewDefinition.resource"/>
<short value="FHIR resource for the ViewDefinition"/>
<definition
value="The FHIR resource that the view is based upon, e.g. 'Patient' or 'Observation'."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.resource"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<valueSet value="http://hl7.org/fhir/ValueSet/resource-types"/>
</binding>
</element>
<element id="ViewDefinition.fhirVersion">
<path value="ViewDefinition.fhirVersion"/>
<short value="FHIR version(s) of the resource for the ViewDefinition"/>
<definition
value="The FHIR version(s) for the FHIR resource. The value of this element is the
formal version of the specification, without the revision number, e.g.
[publication].[major].[minor]."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.fhirVersion"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="code"/>
</type>
<binding>
<strength value="required"/>
<valueSet value="http://hl7.org/fhir/ValueSet/FHIR-version"/>
</binding>
</element>
<element id="ViewDefinition.constant">
<path value="ViewDefinition.constant"/>
<short value="Constant that can be used in FHIRPath expressions"/>
<definition
value="A constant is a value that is injected into a FHIRPath expression through the use of a FHIRPath
external constant with the same name."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.constant"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
</element>
<element id="ViewDefinition.constant.id">
<path value="ViewDefinition.constant.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition
value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="id"/>
</extension>
<code value="http://hl7.org/fhirpath/System.String"/>
</type>
<condition value="ele-1"/>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.constant.extension">
<path value="ViewDefinition.constant.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition
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 managable, 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."/>
<comment
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."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.constant.modifierExtension">
<path value="ViewDefinition.constant.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition
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 managable, 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.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment
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."/>
<requirements
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/R5/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="true"/>
<isModifierReason
value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="ViewDefinition.constant.name">
<path value="ViewDefinition.constant.name"/>
<short value="Name of constant (referred to in FHIRPath as %[name])"/>
<definition
value="Name of constant (referred to in FHIRPath as %[name])"/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.constant.name"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<constraint>
<key value="sql-name"/>
<severity value="error"/>
<human
value="Name is limited to letters, numbers, or underscores and cannot start with an
underscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$
This makes it usable as table names in a wide variety of databases."/>
<expression value="empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
</constraint>
</element>
<element id="ViewDefinition.constant.value[x]">
<path value="ViewDefinition.constant.value[x]"/>
<short value="Value of constant"/>
<definition
value="The value that will be substituted in place of the constant reference. This
is done by including `%your_constant_name` in a FHIRPath expression, which effectively converts
the FHIR literal defined here to a FHIRPath literal used in the path expression.
Support for additional types may be added in the future."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.constant.value[x]"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="base64Binary"/>
</type>
<type>
<code value="boolean"/>
</type>
<type>
<code value="canonical"/>
</type>
<type>
<code value="code"/>
</type>
<type>
<code value="date"/>
</type>
<type>
<code value="dateTime"/>
</type>
<type>
<code value="decimal"/>
</type>
<type>
<code value="id"/>
</type>
<type>
<code value="instant"/>
</type>
<type>
<code value="integer"/>
</type>
<type>
<code value="integer64"/>
</type>
<type>
<code value="oid"/>
</type>
<type>
<code value="string"/>
</type>
<type>
<code value="positiveInt"/>
</type>
<type>
<code value="time"/>
</type>
<type>
<code value="unsignedInt"/>
</type>
<type>
<code value="uri"/>
</type>
<type>
<code value="url"/>
</type>
<type>
<code value="uuid"/>
</type>
</element>
<element id="ViewDefinition.select">
<path value="ViewDefinition.select"/>
<short
value="A collection of columns and nested selects to include in the view."/>
<definition
value="The select structure defines the columns to be used in the resulting view. These are expressed
in the `column` structure below, or in nested `select`s for nested resources."/>
<min value="1"/>
<max value="*"/>
<base>
<path value="ViewDefinition.select"/>
<min value="1"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="sql-expressions"/>
<severity value="error"/>
<human
value="Can only have at most one of `forEach` or `forEachOrNull`."/>
<expression value="(forEach | forEachOrNull).count() <= 1"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
</constraint>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
</element>
<element id="ViewDefinition.select.id">
<path value="ViewDefinition.select.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition
value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="id"/>
</extension>
<code value="http://hl7.org/fhirpath/System.String"/>
</type>
<condition value="ele-1"/>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.extension">
<path value="ViewDefinition.select.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition
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 managable, 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."/>
<comment
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."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.modifierExtension">
<path value="ViewDefinition.select.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition
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 managable, 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.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment
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."/>
<requirements
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/R5/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="true"/>
<isModifierReason
value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="ViewDefinition.select.column">
<path value="ViewDefinition.select.column"/>
<short value="A column to be produced in the resulting table."/>
<definition
value="A column to be produced in the resulting table. The column is relative to the select structure
that contains it."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.select.column"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="no-collections"/>
<severity value="error"/>
<human value="Tabular view columns must not be collections."/>
<expression value="collection.empty() or collection = false"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/TabularViewDefinition"/>
</constraint>
<constraint>
<key value="primitives-only"/>
<severity value="error"/>
<human value="Tabular view columns only contain primitive values."/>
<expression
value="type in ('base64Binary' | 'boolean' | 'canonical' | 'code' | 'dateTime' | 'decimal' | 'id' | 'instant' | 'integer' | 'integer64' | 'markdown' | 'oid' | 'string' | 'positiveInt' | 'time' | 'unsignedInt' | 'url' | 'uuid')"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/TabularViewDefinition"/>
</constraint>
</element>
<element id="ViewDefinition.select.column.id">
<path value="ViewDefinition.select.column.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition
value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="id"/>
</extension>
<code value="http://hl7.org/fhirpath/System.String"/>
</type>
<condition value="ele-1"/>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.extension">
<path value="ViewDefinition.select.column.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition
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 managable, 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."/>
<comment
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."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.modifierExtension">
<path value="ViewDefinition.select.column.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition
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 managable, 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.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment
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."/>
<requirements
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/R5/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="true"/>
<isModifierReason
value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.path">
<path value="ViewDefinition.select.column.path"/>
<short
value="FHIRPath expression that creates a column and defines its content"/>
<definition
value="A FHIRPath expression that evaluates to the value that will be output in the column for each
resource. The input context is the collection of resources of the type specified in the resource
element. Constants defined in Reference({constant}) can be referenced as %[name]."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.path"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.select.column.name">
<path value="ViewDefinition.select.column.name"/>
<short value="Column name produced in the output"/>
<definition
value="Name of the column produced in the output, must be in a database-friendly format. The column
names in the output must not have any duplicates."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.name"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
<constraint>
<key value="sql-name"/>
<severity value="error"/>
<human
value="Name is limited to letters, numbers, or underscores and cannot start with an
underscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$
This makes it usable as table names in a wide variety of databases."/>
<expression value="empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition"/>
</constraint>
</element>
<element id="ViewDefinition.select.column.description">
<path value="ViewDefinition.select.column.description"/>
<short value="Description of the column"/>
<definition value="A human-readable description of the column."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.description"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="markdown"/>
</type>
</element>
<element id="ViewDefinition.select.column.collection">
<path value="ViewDefinition.select.column.collection"/>
<short value="Indicates whether the column may have multiple values."/>
<definition
value="Indicates whether the column may have multiple values. Defaults to `false` if unset.
ViewDefinitions must have this set to `true` if multiple values may be returned. Implementations SHALL
report an error if multiple values are produced when that is not the case."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.collection"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="boolean"/>
</type>
</element>
<element id="ViewDefinition.select.column.type">
<path value="ViewDefinition.select.column.type"/>
<short value="A FHIR StructureDefinition URI for the column's type."/>
<definition
value="A FHIR StructureDefinition URI for the column's type. Relative URIs are implicitly given
the 'http://hl7.org/fhir/StructureDefinition/' prefix. The URI may also use FHIR element ID notation to indicate
a backbone element within a structure. For instance, `Observation.referenceRange` may be specified to indicate
the returned type is that backbone element.
This field *must* be provided if a ViewDefinition returns a non-primitive type. Implementations should report an error
if the returned type does not match the type set here, or if a non-primitive type is returned but this field is unset."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.type"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="uri"/>
</type>
</element>
<element id="ViewDefinition.select.column.tag">
<path value="ViewDefinition.select.column.tag"/>
<short value="Additional metadata describing the column"/>
<definition
value="Tags can be used to attach additional metadata to columns, such as implementation-specific
directives or database-specific type hints."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.select.column.tag"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
</element>
<element id="ViewDefinition.select.column.tag.id">
<path value="ViewDefinition.select.column.tag.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition
value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="id"/>
</extension>
<code value="http://hl7.org/fhirpath/System.String"/>
</type>
<condition value="ele-1"/>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.tag.extension">
<path value="ViewDefinition.select.column.tag.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition
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 managable, 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."/>
<comment
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."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.tag.modifierExtension">
<path value="ViewDefinition.select.column.tag.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition
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 managable, 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.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment
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."/>
<requirements
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/R5/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="true"/>
<isModifierReason
value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="ViewDefinition.select.column.tag.name">
<path value="ViewDefinition.select.column.tag.name"/>
<short value="Name of tag"/>
<definition
value="A name that identifies the meaning of the tag. A namespace should be used to scope the tag to
a particular context. For example, 'ansi/type' could be used to indicate the type that should
be used to represent the value within an ANSI SQL database."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.tag.name"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.select.column.tag.value">
<path value="ViewDefinition.select.column.tag.value"/>
<short value="Value of tag"/>
<definition value="Value of tag"/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.column.tag.value"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.select.select">
<path value="ViewDefinition.select.select"/>
<short value="Nested select relative to a parent expression."/>
<definition
value="Nested select relative to a parent expression. If the parent `select` has a `forEach` or `forEachOrNull`, this child select will apply for each item in that expression."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.select.select"/>
<min value="0"/>
<max value="*"/>
</base>
<contentReference
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition#ViewDefinition.select"/>
</element>
<element id="ViewDefinition.select.forEach">
<path value="ViewDefinition.select.forEach"/>
<short
value="A FHIRPath expression to retrieve the parent element(s) used in the containing select. The default is effectively `$this`."/>
<definition
value="A FHIRPath expression to retrieve the parent element(s) used in the containing select, relative to the root resource or parent `select`,
if applicable. `forEach` will produce a row for each element selected in the expression. For example, using forEach on `address` in Patient will
generate a new row for each address, with columns defined in the corresponding `column` structure."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.forEach"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.select.forEachOrNull">
<path value="ViewDefinition.select.forEachOrNull"/>
<short
value="Same as forEach, but will produce a row with null values if the collection is empty."/>
<definition
value="Same as forEach, but produces a single row with null values in the nested expression if the collection is empty. For example,
with a Patient resource, a `forEachOrNull` on address will produce a row for each patient even if there are no addresses; it will
simply set the address columns to `null`."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.select.forEachOrNull"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.select.unionAll">
<path value="ViewDefinition.select.unionAll"/>
<short
value="Creates a union of all rows in the given selection structures."/>
<definition
value="A `unionAll` combines the results of multiple selection structures. Each structure under the `unionAll` must produce the same column names
and types. The results from each nested selection will then have their own row."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.select.unionAll"/>
<min value="0"/>
<max value="*"/>
</base>
<contentReference
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition#ViewDefinition.select"/>
</element>
<element id="ViewDefinition.where">
<path value="ViewDefinition.where"/>
<short
value="A series of zero or more FHIRPath constraints to filter resources for the view."/>
<definition
value="A series of zero or more FHIRPath constraints to filter resources for the view. Every constraint
must evaluate to true for the resource to be included in the view."/>
<min value="0"/>
<max value="*"/>
<base>
<path value="ViewDefinition.where"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="BackboneElement"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
</element>
<element id="ViewDefinition.where.id">
<path value="ViewDefinition.where.id"/>
<representation value="xmlAttr"/>
<short value="Unique id for inter-element referencing"/>
<definition
value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="Element.id"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
<valueUrl value="id"/>
</extension>
<code value="http://hl7.org/fhirpath/System.String"/>
</type>
<condition value="ele-1"/>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.where.extension">
<path value="ViewDefinition.where.extension"/>
<slicing>
<discriminator>
<type value="value"/>
<path value="url"/>
</discriminator>
<description value="Extensions are always sliced by (at least) url"/>
<rules value="open"/>
</slicing>
<short value="Additional content defined by implementations"/>
<definition
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 managable, 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."/>
<comment
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."/>
<alias value="extensions"/>
<alias value="user content"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="Element.extension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="false"/>
<isSummary value="false"/>
<mapping>
<identity value="rim"/>
<map value="n/a"/>
</mapping>
</element>
<element id="ViewDefinition.where.modifierExtension">
<path value="ViewDefinition.where.modifierExtension"/>
<short value="Extensions that cannot be ignored even if unrecognized"/>
<definition
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 managable, 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.
Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."/>
<comment
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."/>
<requirements
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/R5/extensibility.html#modifierExtension)."/>
<alias value="extensions"/>
<alias value="user content"/>
<alias value="modifiers"/>
<min value="0"/>
<max value="*"/>
<base>
<path value="BackboneElement.modifierExtension"/>
<min value="0"/>
<max value="*"/>
</base>
<type>
<code value="Extension"/>
</type>
<constraint>
<key value="ele-1"/>
<severity value="error"/>
<human value="All FHIR elements must have a @value or children"/>
<expression
value="hasValue() or (children().count() > id.count())"/>
<source value="http://hl7.org/fhir/StructureDefinition/Element"/>
</constraint>
<constraint>
<key value="ext-1"/>
<severity value="error"/>
<human value="Must have either extensions or value[x], not both"/>
<expression value="extension.exists() != value.exists()"/>
<source value="http://hl7.org/fhir/StructureDefinition/Extension"/>
</constraint>
<isModifier value="true"/>
<isModifierReason
value="Modifier extensions are expected to modify the meaning or interpretation of the element that contains them"/>
<isSummary value="true"/>
<mapping>
<identity value="rim"/>
<map value="N/A"/>
</mapping>
</element>
<element id="ViewDefinition.where.path">
<path value="ViewDefinition.where.path"/>
<short value="A FHIRPath expression defining a filter condition"/>
<definition
value="A FHIRPath expression that defines a filter that must evaluate to true for a resource to be
included in the output. The input context is the collection of resources of the type specified in
the resource element. Constants defined in Reference({constant}) can be referenced as %[name]."/>
<min value="1"/>
<max value="1"/>
<base>
<path value="ViewDefinition.where.path"/>
<min value="1"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
<element id="ViewDefinition.where.description">
<path value="ViewDefinition.where.description"/>
<short
value="A human-readable description of the above where constraint."/>
<definition
value="A human-readable description of the above where constraint."/>
<min value="0"/>
<max value="1"/>
<base>
<path value="ViewDefinition.where.description"/>
<min value="0"/>
<max value="1"/>
</base>
<type>
<code value="string"/>
</type>
</element>
</snapshot>
<differential>
<element id="ViewDefinition">
<path value="ViewDefinition"/>
</element>
<element id="ViewDefinition.select.column">
<path value="ViewDefinition.select.column"/>
<constraint>
<key value="no-collections"/>
<severity value="error"/>
<human value="Tabular view columns must not be collections."/>
<expression value="collection.empty() or collection = false"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/TabularViewDefinition"/>
</constraint>
<constraint>
<key value="primitives-only"/>
<severity value="error"/>
<human value="Tabular view columns only contain primitive values."/>
<expression
value="type in ('base64Binary' | 'boolean' | 'canonical' | 'code' | 'dateTime' | 'decimal' | 'id' | 'instant' | 'integer' | 'integer64' | 'markdown' | 'oid' | 'string' | 'positiveInt' | 'time' | 'unsignedInt' | 'url' | 'uuid')"/>
<source
value="http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/TabularViewDefinition"/>
</constraint>
</element>
</differential>
</StructureDefinition>