{"abstract":false,"base":"http://hl7.org/fhir/StructureDefinition/Quantity","constrainedType":"Quantity","contact":[{"telecom":[{"system":"other","value":"http://hl7.org/fhir"}]}],"date":"2015-12-03T09:57:31+11:00","description":"An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)","differential":{"element":[{"constraint":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-expression","valueString":"(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')"}],"human":"There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = \"urn:iso:std:iso:4217\" - currency).","key":"mny-1","severity":"error","xpath":"(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"}],"definition":"There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = \"urn:iso:std:iso:4217\" - currency).","isModifier":false,"max":"*","min":0,"name":"Money","path":"Quantity","short":"An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)","type":[{"code":"Quantity"}]}]},"fhirVersion":"1.1.0","id":"Money","kind":"datatype","name":"Money","publisher":"HL7 FHIR Standard","resourceType":"StructureDefinition","snapshot":{"element":[{"base":{"max":"*","min":0,"path":"Quantity"},"comments":"The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator.","constraint":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-expression","valueString":"code.empty() or system"}],"human":"If a code for the unit is present, the system SHALL also be present","key":"qty-3","severity":"error","xpath":"not(exists(f:code)) or exists(f:system)"},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-expression","valueString":"(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')"}],"human":"There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = \"urn:iso:std:iso:4217\" - currency).","key":"mny-1","severity":"error","xpath":"(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"}],"definition":"There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = \"urn:iso:std:iso:4217\" - currency).","isSummary":true,"mapping":[{"identity":"v2","map":"SN (see also Range) or CQ"},{"identity":"rim","map":"PQ, IVL<PQ>, MO, CO, depending on the values"}],"max":"*","min":0,"name":"Money","path":"Quantity","short":"An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)","type":[{"code":"Quantity"}]},{"base":{"max":"1","min":0,"path":"Quantity.id"},"definition":"unique id for the element within a resource (for internal references).","mapping":[{"identity":"rim","map":"n/a"}],"max":"1","min":0,"path":"Quantity.id","representation":["xmlAttr"],"short":"xml:id (or equivalent in JSON)","type":[{"code":"id"}]},{"alias":["extensions","user content"],"base":{"max":"*","min":0,"path":"Quantity.extension"},"comments":"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.","definition":"May be used to represent additional information that is not part of the basic definition of the element. In order 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.","mapping":[{"identity":"rim","map":"n/a"}],"max":"*","min":0,"path":"Quantity.extension","short":"Additional Content defined by implementations","type":[{"code":"Extension"}]},{"base":{"max":"1","min":0,"path":"Quantity.value"},"comments":"The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).","definition":"The value of the measured amount. The value includes an implicit precision in the presentation of the value.","isSummary":true,"mapping":[{"identity":"v2","map":"SN.2  / CQ - N/A"},{"identity":"rim","map":"PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value"}],"max":"1","min":0,"path":"Quantity.value","requirements":"Precision is handled implicitly in almost all cases of measurement.","short":"Numerical value (with implicit precision)","type":[{"code":"decimal"}]},{"base":{"max":"1","min":0,"path":"Quantity.comparator"},"binding":{"description":"How the Quantity should be understood and represented.","strength":"required","valueSetReference":{"reference":"http://hl7.org/fhir/ValueSet/quantity-comparator"}},"comments":"This is labeled as \"Is Modifier\" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value.","definition":"How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is \"<\" , then the real value is < stated value.","isModifier":true,"isSummary":true,"mapping":[{"identity":"v2","map":"SN.1  / CQ.1"},{"identity":"rim","map":"IVL properties"}],"max":"1","meaningWhenMissing":"If there is no comparator, then there is no modification of the value","min":0,"path":"Quantity.comparator","requirements":"Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.","short":"< | <= | >= | > - how to understand the value","type":[{"code":"code"}]},{"base":{"max":"1","min":0,"path":"Quantity.unit"},"definition":"A human-readable form of the unit.","isSummary":true,"mapping":[{"identity":"v2","map":"(see OBX.6 etc.) / CQ.2"},{"identity":"rim","map":"PQ.unit"}],"max":"1","min":0,"path":"Quantity.unit","requirements":"There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.","short":"Unit representation","type":[{"code":"string"}]},{"base":{"max":"1","min":0,"path":"Quantity.system"},"condition":["qty-3"],"definition":"The identification of the system that provides the coded form of the unit.","isSummary":true,"mapping":[{"identity":"v2","map":"(see OBX.6 etc.) / CQ.2"},{"identity":"rim","map":"CO.codeSystem, PQ.translation.codeSystem"}],"max":"1","min":0,"path":"Quantity.system","requirements":"Need to know the system that defines the coded form of the unit.","short":"System that defines coded unit form","type":[{"code":"uri"}]},{"base":{"max":"1","min":0,"path":"Quantity.code"},"comments":"The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system.","definition":"A computer processable form of the unit in some unit representation system.","isSummary":true,"mapping":[{"identity":"v2","map":"(see OBX.6 etc.) / CQ.2"},{"identity":"rim","map":"PQ.code, MO.currency, PQ.translation.code"}],"max":"1","min":0,"path":"Quantity.code","requirements":"Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.","short":"Coded form of the unit","type":[{"code":"code"}]}]},"status":"draft","text":{"div":"<div><h2>Data type Money</h2><p>An amount of money. With regard to precision, see [Decimal Precision](datatypes.html#precision)</p><h3>Rule</h3><p>There SHALL be a code if there is a value and it SHALL be an expression of currency.  If system is present, it SHALL be ISO 4217 (system = &quot;urn:iso:std:iso:4217&quot; - currency).</p><p>XPath:</p><blockquote><pre>(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')</pre></blockquote></div>","status":"generated"},"url":"http://hl7.org/fhir/StructureDefinition/Money"}