FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Example StructureDefinition/Count (Turtle)

Modeling and Methodology Work GroupMaturity Level: N/AStandards Status: Informative

Raw Turtle (+ also see Turtle/RDF Format Specification)

StructureDefinition for Count

@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

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

[] a fhir:StructureDefinition ;
  fhir:id [ fhir:v "Count"] ;
  fhir:text [
     fhir:status [ fhir:v "generated" ]
  ] ;
  fhir:extension ( [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
     fhir:value [ fhir:v "trial-use" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-type-characteristics" ] ;
     fhir:value [ fhir:v "has-range" ]
  ] [
     fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg" ] ;
     fhir:value [ fhir:v "fhir" ]
  ] ) ;
  fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/Count"], [ fhir:v "http://hl7.org/fhir/StructureDefinition/Count"] ;
  fhir:version [ fhir:v "6.0.0-ballot2"], [ fhir:v "6.0.0-ballot2"] ;
  fhir:name [ fhir:v "Count"], [ fhir:v "Count"] ;
  fhir:status [ fhir:v "draft"], [ fhir:v "draft"] ;
  fhir:experimental [ fhir:v "false"], [ fhir:v "false"] ;
  fhir:date [ fhir:v "2024-11-07T08:38:17+00:00"], [ fhir:v "2024-11-07T08:38:17+00:00"] ;
  fhir:publisher [ fhir:v "HL7 International / FHIR Infrastructure"], [ fhir:v "HL7 International / FHIR Infrastructure"] ;
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/fiwg" ]
     ] )
  ] ) ;
  fhir:description [ fhir:v "Count Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."], [ fhir:v "Count Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies."] ;
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] [
     fhir:coding ( [
       fhir:system [ fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm" ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ;
  fhir:purpose [ fhir:v "Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD."], [ fhir:v "Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD."] ;
  fhir:fhirVersion [ fhir:v "6.0.0-ballot2"] ;
  fhir:mapping ( [
     fhir:identity [ fhir:v "v2" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v2" ] ;
     fhir:name [ fhir:v "HL7 V2 Mapping" ]
  ] [
     fhir:identity [ fhir:v "rim" ] ;
     fhir:uri [ fhir:v "http://hl7.org/v3" ] ;
     fhir:name [ fhir:v "RIM Mapping" ]
  ] ) ;
  fhir:kind [ fhir:v "complex-type"] ;
  fhir:abstract [ fhir:v "false"] ;
  fhir:type [ fhir:v "Count"] ;
  fhir:baseDefinition [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity"] ;
  fhir:derivation [ fhir:v "specialization"] ;
  fhir:snapshot [
     fhir:element ( [
       fhir:id [ fhir:v "Count" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "Count" ] ;
       fhir:short [ fhir:v "A measured or measurable amount" ] ;
       fhir:definition [ fhir:v "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Count" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "cnt-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "There SHALL be a code with a value of \"1\" if there is a value. If system is present, it SHALL be UCUM.  If present, the value SHALL be a whole number." ] ;
         fhir:expression [ fhir:v "(code.exists() or value.empty()) and (system.empty() or system = %ucum) and (code.empty() or code = '1') and (value.empty() or value.hasValue().not() or value.toString().contains('.').not())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Count" ]
       ] [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] [
         fhir:key [ fhir:v "qty-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "If a code for the unit is present, the system SHALL also be present" ] ;
         fhir:expression [ fhir:v "code.empty() or system.exists()" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Quantity" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN (see also Range) or CQ" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ, IVL<PQ>, MO, CO, depending on the values" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.id" ] ;
       fhir:path [ fhir:v "Count.id" ] ;
       fhir:representation ( [ fhir:v "xmlAttr" ] ) ;
       fhir:short [ fhir:v "Unique id for inter-element referencing" ] ;
       fhir:definition [ fhir:v "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.id" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ] ;
           fhir:value [ fhir:v "id" ]
         ] ) ;
         fhir:code [ fhir:v "http://hl7.org/fhirpath/System.String" ]
       ] ) ;
       fhir:condition ( [ fhir:v "ele-1" ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.extension" ] ;
       fhir:path [ fhir:v "Count.extension" ] ;
       fhir:slicing [
         fhir:discriminator ( [
           fhir:type [ fhir:v "value" ] ;
           fhir:path [ fhir:v "url" ]
         ] ) ;
         fhir:description [ fhir:v "Extensions are always sliced by (at least) url" ] ;
         fhir:rules [ fhir:v "open" ]
       ] ;
       fhir:short [ fhir:v "Additional content defined by implementations" ] ;
       fhir:definition [ fhir:v "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." ] ;
       fhir:comment [ fhir:v "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." ] ;
       fhir:alias ( [ fhir:v "extensions" ] [ fhir:v "user content" ] ) ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:base [
         fhir:path [ fhir:v "Element.extension" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "*" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "Extension" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "n/a" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.value" ] ;
       fhir:path [ fhir:v "Count.value" ] ;
       fhir:short [ fhir:v "Numerical value (with implicit precision)" ] ;
       fhir:definition [ fhir:v "The value of the measured amount. The value includes an implicit precision in the presentation of the value." ] ;
       fhir:comment [ fhir:v "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)." ] ;
       fhir:requirements [ fhir:v "Precision is handled implicitly in almost all cases of measurement." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.value" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "decimal" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.2  / CQ - N/A" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.value, CO.value, MO.value, IVL.high or IVL.low depending on the value" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.comparator" ] ;
       fhir:path [ fhir:v "Count.comparator" ] ;
       fhir:short [ fhir:v "< | <= | >= | > | ad - how to understand the value" ] ;
       fhir:definition [ fhir:v "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." ] ;
       fhir:requirements [ fhir:v "Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.comparator" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:meaningWhenMissing [ fhir:v "If there is no comparator, then there is no modification of the value" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "true" ] ;
       fhir:isModifierReason [ fhir:v "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" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:binding [
         fhir:extension ( [
           fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/binding-definition" ] ;
           fhir:value [ fhir:v "How the Quantity should be understood and represented." ]
         ] [
           fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ] ;
           fhir:value [ fhir:v "QuantityComparator" ]
         ] ) ;
         fhir:strength [ fhir:v "required" ] ;
         fhir:description [ fhir:v "How the Quantity should be understood and represented." ] ;
         fhir:valueSet [ fhir:v "http://hl7.org/fhir/ValueSet/quantity-comparator|6.0.0-ballot2" ]
       ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN.1  / CQ.1" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "IVL properties" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.unit" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Count.unit" ] ;
       fhir:short [ fhir:v "Unit representation" ] ;
       fhir:definition [ fhir:v "A human-readable form of the unit." ] ;
       fhir:requirements [ fhir:v "There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.unit" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "string" ]
       ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.unit" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.system" ] ;
       fhir:path [ fhir:v "Count.system" ] ;
       fhir:short [ fhir:v "System that defines coded unit form" ] ;
       fhir:definition [ fhir:v "The identification of the system that provides the coded form of the unit." ] ;
       fhir:requirements [ fhir:v "Need to know the system that defines the coded form of the unit." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.system" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "uri" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "CO.codeSystem, PQ.translation.codeSystem" ]
       ] )
     ] [
       fhir:id [ fhir:v "Count.code" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/tools/StructureDefinition/no-binding" ] ;
         fhir:value [ fhir:v "true" ]
       ] ) ;
       fhir:path [ fhir:v "Count.code" ] ;
       fhir:short [ fhir:v "Coded form of the unit" ] ;
       fhir:definition [ fhir:v "A computer processable form of the unit in some unit representation system." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:requirements [ fhir:v "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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "1" ] ;
       fhir:base [
         fhir:path [ fhir:v "Quantity.code" ] ;
         fhir:min [ fhir:v "0" ] ;
         fhir:max [ fhir:v "1" ]
       ] ;
       fhir:type ( [
         fhir:code [ fhir:v "code" ]
       ] ) ;
       fhir:condition ( [ fhir:v "qty-3" ] ) ;
       fhir:constraint ( [
         fhir:key [ fhir:v "ele-1" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "All FHIR elements must have a @value or children" ] ;
         fhir:expression [ fhir:v "hasValue() or (children().count() > id.count())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Element" ]
       ] ) ;
       fhir:isModifier [ fhir:v "false" ] ;
       fhir:isSummary [ fhir:v "false" ] ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "(see OBX.6 etc.) / CQ.2" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ.code, MO.currency, PQ.translation.code" ]
       ] )
     ] )
  ] ;
  fhir:differential [
     fhir:element ( [
       fhir:id [ fhir:v "Count" ] ;
       fhir:extension ( [
         fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ] ;
         fhir:value [ fhir:v "trial-use" ]
       ] ) ;
       fhir:path [ fhir:v "Count" ] ;
       fhir:short [ fhir:v "A measured or measurable amount" ] ;
       fhir:definition [ fhir:v "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies." ] ;
       fhir:comment [ fhir:v "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." ] ;
       fhir:min [ fhir:v "0" ] ;
       fhir:max [ fhir:v "*" ] ;
       fhir:constraint ( [
         fhir:key [ fhir:v "cnt-3" ] ;
         fhir:severity [ fhir:v "error" ] ;
         fhir:human [ fhir:v "There SHALL be a code with a value of \"1\" if there is a value. If system is present, it SHALL be UCUM.  If present, the value SHALL be a whole number." ] ;
         fhir:expression [ fhir:v "(code.exists() or value.empty()) and (system.empty() or system = %ucum) and (code.empty() or code = '1') and (value.empty() or value.hasValue().not() or value.toString().contains('.').not())" ] ;
         fhir:source [ fhir:v "http://hl7.org/fhir/StructureDefinition/Count" ]
       ] ) ;
       fhir:mapping ( [
         fhir:identity [ fhir:v "v2" ] ;
         fhir:map [ fhir:v "SN (see also Range) or CQ" ]
       ] [
         fhir:identity [ fhir:v "rim" ] ;
         fhir:map [ fhir:v "PQ, IVL<PQ>, MO, CO, depending on the values" ]
       ] )
     ] )
  ] .

# -------------------------------------------------------------------------------------


Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.