Ratio.xml
  1 <?xml version="1.0" encoding="utf-8"?>
  2 <StructureDefinition xmlns="http://hl7.org/fhir">
  3   <id value="Ratio" />
  4   <meta>
  5     <lastUpdated value="2023-03-26T06:21:02.749+02:00" />
  6   </meta>
  7   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
  8     <valueCode value="normative" />
  9   </extension>
 10   <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 11     <valueCode value="4.0.0" />
 12   </extension>
 13   <url value="http://hl7.org/fhir/StructureDefinition/Ratio" />
 14   <version value="5.0.0" />
 15   <name value="Ratio" />
 16   <status value="active" />
 17   <experimental value="false" />
 18   <date value="2023-03-26T06:21:02.0000000+02:00" />
 19   <publisher value="HL7 FHIR Standard" />
 20   <contact>
 21     <telecom>
 22       <system value="url" />
 23       <value value="http://hl7.org/fhir" />
 24     </telecom>
 25   </contact>
 26   <description value="Ratio Type: A relationship of two Quantity values - expressed as a numerator and a denominator." />
 27   <jurisdiction>
 28     <coding>
 29       <system value="http://unstats.un.org/unsd/methods/m49/m49.htm" />
 30       <code value="001" />
 31       <display value="World" />
 32     </coding>
 33   </jurisdiction>
 34   <purpose value="Need to able to capture ratios for some measurements (titers) and some rates (costs)." />
 35   <fhirVersion value="5.0.0" />
 36   <mapping>
 37     <identity value="v2" />
 38     <uri value="http://hl7.org/v2" />
 39     <name value="HL7 V2 Mapping" />
 40   </mapping>
 41   <mapping>
 42     <identity value="rim" />
 43     <uri value="http://hl7.org/v3" />
 44     <name value="RIM Mapping" />
 45   </mapping>
 46   <kind value="complex-type" />
 47   <abstract value="false" />
 48   <type value="Ratio" />
 49   <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DataType" />
 50   <derivation value="specialization" />
 51   <snapshot>
 52     <element id="Ratio">
 53       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
 54         <valueCode value="normative" />
 55       </extension>
 56       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
 57         <valueCode value="4.0.0" />
 58       </extension>
 59       <path value="Ratio" />
 60       <short value="A ratio of two Quantity values - a numerator and a denominator" />
 61       <definition value="A relationship of two Quantity values - expressed as a numerator and a denominator." />
 62       <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." />
 63       <min value="0" />
 64       <max value="*" />
 65       <base>
 66         <path value="Ratio" />
 67         <min value="0" />
 68         <max value="*" />
 69       </base>
 70       <constraint>
 71         <key value="ele-1" />
 72         <severity value="error" />
 73         <human value="All FHIR elements must have a @value or children" />
 74         <expression value="hasValue() or (children().count() > id.count())" />
 75         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
 76       </constraint>
 77       <constraint>
 78         <key value="rat-1" />
 79         <severity value="error" />
 80         <human value="Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present" />
 81         <expression value="(numerator.exists() and denominator.exists()) or (numerator.empty() and denominator.empty() and extension.exists())" />
 82         <source value="http://hl7.org/fhir/StructureDefinition/Ratio" />
 83       </constraint>
 84       <isModifier value="false" />
 85       <mapping>
 86         <identity value="rim" />
 87         <map value="n/a,RTO" />
 88       </mapping>
 89       <mapping>
 90         <identity value="v2" />
 91         <map value="N/A" />
 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="id" />
109         </extension>
110         <code value="http://hl7.org/fhirpath/System.String" />
111       </type>
112       <condition value="ele-1" />
113       <isModifier value="false" />
114       <isSummary value="false" />
115       <mapping>
116         <identity value="rim" />
117         <map value="n/a" />
118       </mapping>
119     </element>
120     <element id="Ratio.extension">
121       <path value="Ratio.extension" />
122       <slicing>
123         <discriminator>
124           <type value="value" />
125           <path value="url" />
126         </discriminator>
127         <description value="Extensions are always sliced by (at least) url" />
128         <rules value="open" />
129       </slicing>
130       <short value="Additional content defined by implementations" />
131       <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." />
132       <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." />
133       <alias value="extensions" />
134       <alias value="user content" />
135       <min value="0" />
136       <max value="*" />
137       <base>
138         <path value="Element.extension" />
139         <min value="0" />
140         <max value="*" />
141       </base>
142       <type>
143         <code value="Extension" />
144       </type>
145       <constraint>
146         <key value="ele-1" />
147         <severity value="error" />
148         <human value="All FHIR elements must have a @value or children" />
149         <expression value="hasValue() or (children().count() > id.count())" />
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         <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
158       </constraint>
159       <isModifier value="false" />
160       <isSummary value="false" />
161       <mapping>
162         <identity value="rim" />
163         <map value="n/a" />
164       </mapping>
165     </element>
166     <element id="Ratio.numerator">
167       <path value="Ratio.numerator" />
168       <short value="Numerator value" />
169       <definition value="The value of the numerator." />
170       <min value="0" />
171       <max value="1" />
172       <base>
173         <path value="Ratio.numerator" />
174         <min value="0" />
175         <max value="1" />
176       </base>
177       <type>
178         <code value="Quantity" />
179       </type>
180       <condition value="rat-1" />
181       <constraint>
182         <key value="ele-1" />
183         <severity value="error" />
184         <human value="All FHIR elements must have a @value or children" />
185         <expression value="hasValue() or (children().count() > id.count())" />
186         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
187       </constraint>
188       <isModifier value="false" />
189       <isSummary value="true" />
190       <mapping>
191         <identity value="rim" />
192         <map value=".numerator" />
193       </mapping>
194     </element>
195     <element id="Ratio.denominator">
196       <path value="Ratio.denominator" />
197       <short value="Denominator value" />
198       <definition value="The value of the denominator." />
199       <min value="0" />
200       <max value="1" />
201       <base>
202         <path value="Ratio.denominator" />
203         <min value="0" />
204         <max value="1" />
205       </base>
206       <type>
207         <code value="Quantity" />
208         <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
209       </type>
210       <condition value="rat-1" />
211       <constraint>
212         <key value="ele-1" />
213         <severity value="error" />
214         <human value="All FHIR elements must have a @value or children" />
215         <expression value="hasValue() or (children().count() > id.count())" />
216         <source value="http://hl7.org/fhir/StructureDefinition/Element" />
217       </constraint>
218       <isModifier value="false" />
219       <isSummary value="true" />
220       <mapping>
221         <identity value="rim" />
222         <map value=".denominator" />
223       </mapping>
224     </element>
225   </snapshot>
226   <differential>
227     <element id="Ratio">
228       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
229         <valueCode value="normative" />
230       </extension>
231       <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
232         <valueCode value="4.0.0" />
233       </extension>
234       <path value="Ratio" />
235       <short value="A ratio of two Quantity values - a numerator and a denominator" />
236       <definition value="A relationship of two Quantity values - expressed as a numerator and a denominator." />
237       <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." />
238       <min value="0" />
239       <max value="*" />
240       <constraint>
241         <key value="rat-1" />
242         <severity value="error" />
243         <human value="Numerator and denominator SHALL both be present, or both are absent. If both are absent, there SHALL be some extension present" />
244         <expression value="(numerator.exists() and denominator.exists()) or (numerator.empty() and denominator.empty() and extension.exists())" />
245         <source value="http://hl7.org/fhir/StructureDefinition/Ratio" />
246       </constraint>
247       <mapping>
248         <identity value="v2" />
249         <map value="N/A" />
250       </mapping>
251       <mapping>
252         <identity value="rim" />
253         <map value="RTO" />
254       </mapping>
255     </element>
256     <element id="Ratio.numerator">
257       <path value="Ratio.numerator" />
258       <short value="Numerator value" />
259       <definition value="The value of the numerator." />
260       <min value="0" />
261       <max value="1" />
262       <type>
263         <code value="Quantity" />
264       </type>
265       <condition value="rat-1" />
266       <isSummary value="true" />
267       <mapping>
268         <identity value="rim" />
269         <map value=".numerator" />
270       </mapping>
271     </element>
272     <element id="Ratio.denominator">
273       <path value="Ratio.denominator" />
274       <short value="Denominator value" />
275       <definition value="The value of the denominator." />
276       <min value="0" />
277       <max value="1" />
278       <type>
279         <code value="Quantity" />
280         <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity" />
281       </type>
282       <condition value="rat-1" />
283       <isSummary value="true" />
284       <mapping>
285         <identity value="rim" />
286         <map value=".denominator" />
287       </mapping>
288     </element>
289   </differential>
290 </StructureDefinition>