StructureDefinition-ch-emed-ratio-with-emed-units.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <StructureDefinition xmlns="http://hl7.org/fhir"> 3 <id value="ch-emed-ratio-with-emed-units" /> 4 <url value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-emed-ratio-with-emed-units" /> 5 <version value="6.0.0-ballot-ci-build" /> 6 <name value="CHCoreRatioWithEmedUnits" /> 7 <title value="CH EMED Ratio with EMED Units" /> 8 <status value="active" /> 9 <date value="2025-01-29T14:29:51.0000000+01:00" /> 10 <publisher value="HL7 Switzerland" /> 11 <contact> 12 <name value="HL7 Switzerland" /> 13 <telecom> 14 <system value="url" /> 15 <value value="https://www.hl7.ch/" /> 16 </telecom> 17 </contact> 18 <contact> 19 <name value="HL7 Switzerland" /> 20 <telecom> 21 <system value="url" /> 22 <value value="https://www.hl7.ch/" /> 23 <use value="work" /> 24 </telecom> 25 </contact> 26 <description value="A ratio with defined units" /> 27 <jurisdiction> 28 <coding> 29 <system value="urn:iso:std:iso:3166" /> 30 <code value="CH" /> 31 </coding> 32 </jurisdiction> 33 <copyright value="CC0-1.0" /> 34 <fhirVersion value="4.0.1" /> 35 <mapping> 36 <identity value="v2" /> 37 <uri value="http://hl7.org/v2" /> 38 <name value="HL7 v2 Mapping" /> 39 </mapping> 40 <mapping> 41 <identity value="rim" /> 42 <uri value="http://hl7.org/v3" /> 43 <name value="RIM Mapping" /> 44 </mapping> 45 <kind value="complex-type" /> 46 <abstract value="false" /> 47 <type value="Ratio" /> 48 <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Ratio" /> 49 <derivation value="constraint" /> 50 <snapshot> 51 <element id="Ratio"> 52 <path value="Ratio" /> 53 <short value="A ratio of two Quantity values - a numerator and a denominator" /> 54 <definition value="A relationship of two Quantity values - expressed as a numerator and a denominator." /> 55 <comment value="The Ratio datatype should only be used to express a relationship of two numbers if the relationship cannot be suitably expressed using a Quantity and a common unit. Where the denominator value is known to be fixed to "1", Quantity should be used instead of Ratio." /> 56 <min value="0" /> 57 <max value="*" /> 58 <base> 59 <path value="Ratio" /> 60 <min value="0" /> 61 <max value="*" /> 62 </base> 63 <condition value="ele-1" /> 64 <constraint> 65 <key value="ele-1" /> 66 <severity value="error" /> 67 <human value="All FHIR elements must have a @value or children" /> 68 <expression value="hasValue() or (children().count() > id.count())" /> 69 <xpath value="@value|f:*|h:div" /> 70 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 71 </constraint> 72 <constraint> 73 <key value="rat-1" /> 74 <severity value="error" /> 75 <human value="Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present" /> 76 <expression value="(numerator.empty() xor denominator.exists()) and (numerator.exists() or extension.exists())" /> 77 <xpath value="(count(f:numerator) = count(f:denominator)) and ((count(f:numerator) > 0) or (count(f:extension) > 0))" /> 78 <source value="http://hl7.org/fhir/StructureDefinition/Ratio" /> 79 </constraint> 80 <isModifier value="false" /> 81 <mapping> 82 <identity value="rim" /> 83 <map value="n/a" /> 84 </mapping> 85 <mapping> 86 <identity value="v2" /> 87 <map value="N/A" /> 88 </mapping> 89 <mapping> 90 <identity value="rim" /> 91 <map value="RTO" /> 92 </mapping> 93 </element> 94 <element id="Ratio.id"> 95 <path value="Ratio.id" /> 96 <representation value="xmlAttr" /> 97 <short value="Unique id for inter-element referencing" /> 98 <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." /> 99 <min value="0" /> 100 <max value="1" /> 101 <base> 102 <path value="Element.id" /> 103 <min value="0" /> 104 <max value="1" /> 105 </base> 106 <type> 107 <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type"> 108 <valueUrl value="string" /> 109 </extension> 110 <code value="http://hl7.org/fhirpath/System.String" /> 111 </type> 112 <isModifier value="false" /> 113 <isSummary value="false" /> 114 <mapping> 115 <identity value="rim" /> 116 <map value="n/a" /> 117 </mapping> 118 </element> 119 <element id="Ratio.extension"> 120 <path value="Ratio.extension" /> 121 <slicing> 122 <discriminator> 123 <type value="value" /> 124 <path value="url" /> 125 </discriminator> 126 <description value="Extensions are always sliced by (at least) url" /> 127 <rules value="open" /> 128 </slicing> 129 <short value="Additional content defined by implementations" /> 130 <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 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." /> 131 <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." /> 132 <alias value="extensions" /> 133 <alias value="user content" /> 134 <min value="0" /> 135 <max value="*" /> 136 <base> 137 <path value="Element.extension" /> 138 <min value="0" /> 139 <max value="*" /> 140 </base> 141 <type> 142 <code value="Extension" /> 143 </type> 144 <constraint> 145 <key value="ele-1" /> 146 <severity value="error" /> 147 <human value="All FHIR elements must have a @value or children" /> 148 <expression value="hasValue() or (children().count() > id.count())" /> 149 <xpath value="@value|f:*|h:div" /> 150 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 151 </constraint> 152 <constraint> 153 <key value="ext-1" /> 154 <severity value="error" /> 155 <human value="Must have either extensions or value[x], not both" /> 156 <expression value="extension.exists() != value.exists()" /> 157 <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])" /> 158 <source value="http://hl7.org/fhir/StructureDefinition/Extension" /> 159 </constraint> 160 <isModifier value="false" /> 161 <isSummary value="false" /> 162 <mapping> 163 <identity value="rim" /> 164 <map value="n/a" /> 165 </mapping> 166 </element> 167 <element id="Ratio.numerator"> 168 <path value="Ratio.numerator" /> 169 <short value="Numerator value" /> 170 <definition value="The value of the numerator." /> 171 <min value="1" /> 172 <max value="1" /> 173 <base> 174 <path value="Ratio.numerator" /> 175 <min value="0" /> 176 <max value="1" /> 177 </base> 178 <type> 179 <code value="Quantity" /> 180 <profile value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units" /> 181 </type> 182 <constraint> 183 <key value="ele-1" /> 184 <severity value="error" /> 185 <human value="All FHIR elements must have a @value or children" /> 186 <expression value="hasValue() or (children().count() > id.count())" /> 187 <xpath value="@value|f:*|h:div" /> 188 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 189 </constraint> 190 <isModifier value="false" /> 191 <isSummary value="true" /> 192 <mapping> 193 <identity value="rim" /> 194 <map value=".numerator" /> 195 </mapping> 196 </element> 197 <element id="Ratio.denominator"> 198 <path value="Ratio.denominator" /> 199 <short value="Denominator value" /> 200 <definition value="The value of the denominator." /> 201 <min value="1" /> 202 <max value="1" /> 203 <base> 204 <path value="Ratio.denominator" /> 205 <min value="0" /> 206 <max value="1" /> 207 </base> 208 <type> 209 <code value="Quantity" /> 210 <profile value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units" /> 211 </type> 212 <constraint> 213 <key value="ele-1" /> 214 <severity value="error" /> 215 <human value="All FHIR elements must have a @value or children" /> 216 <expression value="hasValue() or (children().count() > id.count())" /> 217 <xpath value="@value|f:*|h:div" /> 218 <source value="http://hl7.org/fhir/StructureDefinition/Element" /> 219 </constraint> 220 <isModifier value="false" /> 221 <isSummary value="true" /> 222 <mapping> 223 <identity value="rim" /> 224 <map value=".denominator" /> 225 </mapping> 226 </element> 227 </snapshot> 228 <differential> 229 <element id="Ratio.numerator"> 230 <path value="Ratio.numerator" /> 231 <min value="1" /> 232 <type> 233 <code value="Quantity" /> 234 <profile value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units" /> 235 </type> 236 </element> 237 <element id="Ratio.denominator"> 238 <path value="Ratio.denominator" /> 239 <min value="1" /> 240 <type> 241 <code value="Quantity" /> 242 <profile value="http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-quantity-with-emed-units" /> 243 </type> 244 </element> 245 </differential> 246 </StructureDefinition>