{

"resourceType": "Bundle",
"id": "profiles-others",
"meta": {
  "lastUpdated": "2017-04-26T18:33:43.228-04:00"
},
"type": "collection",
"entry": [
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/consentdirective",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "consentdirective",
      "url": "http://hl7.org/fhir/StructureDefinition/consentdirective",
      "name": "Consent Directive",
      "status": "draft",
      "date": "2014-01-31",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Contract",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Contract",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Contract",
            "path": "Contract",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract",
              "min": 0,
              "max": "*"
            }
          },
          {
            "id": "Contract.id",
            "path": "Contract.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.meta",
            "path": "Contract.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.implicitRules",
            "path": "Contract.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Contract.language",
            "path": "Contract.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "strength": "required",
              "description": "A human language.",
              "valueSetUri": "http://tools.ietf.org/html/bcp47"
            }
          },
          {
            "id": "Contract.text",
            "path": "Contract.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Contract.contained",
            "path": "Contract.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Contract.extension",
            "path": "Contract.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.modifierExtension",
            "path": "Contract.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.identifier",
            "path": "Contract.identifier",
            "label": "ConsentDirective-identifier",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.issued",
            "path": "Contract.issued",
            "label": "ConsentDirective-issued",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.applies",
            "path": "Contract.applies",
            "label": "ConsentDirective-applies",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.applies",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.subject",
            "path": "Contract.subject",
            "label": "ConsentDirective-subject",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.subject",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.authority",
            "path": "Contract.authority",
            "label": "ConsentDirective-authority",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.authority",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ]
          },
          {
            "id": "Contract.domain",
            "path": "Contract.domain",
            "label": "ConsentDirective-domain",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.domain",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ]
          },
          {
            "id": "Contract.type",
            "path": "Contract.type",
            "label": "ConsentDirective-type",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "strength": "example",
              "description": "List of overall contract codes.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-type"
              }
            }
          },
          {
            "id": "Contract.subType",
            "path": "Contract.subType",
            "label": "ConsentDirective-subType",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.subType",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "strength": "example",
              "description": "Detailed codes within the above.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-subtype"
              }
            }
          },
          {
            "id": "Contract.action",
            "path": "Contract.action",
            "label": "ConsentDirective-action",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.action",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-action"
              }
            }
          },
          {
            "id": "Contract.actionReason",
            "path": "Contract.actionReason",
            "label": "ConsentDirective-actionReason",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.actionReason",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action reason.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "Contract.actor",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "Actor"
              }
            ],
            "path": "Contract.actor",
            "label": "ConsentDirective-actor",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.actor",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.actor.id",
            "path": "Contract.actor.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.actor.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.actor.extension",
            "path": "Contract.actor.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.actor.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.actor.modifierExtension",
            "path": "Contract.actor.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.actor.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.actor.entity",
            "path": "Contract.actor.entity",
            "label": "ConsentDirective-actor-entity",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.actor.entity",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Substance"
              }
            ]
          },
          {
            "id": "Contract.actor.role",
            "path": "Contract.actor.role",
            "label": "ConsentDirective-actor-role",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.actor.role",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract actor role.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-actorrole"
              }
            }
          },
          {
            "id": "Contract.valuedItem",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ValuedItem"
              }
            ],
            "path": "Contract.valuedItem",
            "label": "ConsentDirective-valuedItem",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Contract.valuedItem",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.id",
            "path": "Contract.valuedItem.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.extension",
            "path": "Contract.valuedItem.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.valuedItem.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.modifierExtension",
            "path": "Contract.valuedItem.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.valuedItem.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.valuedItem.entity[x]",
            "path": "Contract.valuedItem.entity[x]",
            "label": "ConsentDirective-valuedItem-entity[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.entity[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.identifier",
            "path": "Contract.valuedItem.identifier",
            "label": "ConsentDirective-valuedItem-identifier",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.effectiveTime",
            "path": "Contract.valuedItem.effectiveTime",
            "label": "ConsentDirective-valuedItem-effectiveTime",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.effectiveTime",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.quantity",
            "path": "Contract.valuedItem.quantity",
            "label": "ConsentDirective-valuedItem-quantity",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.quantity",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "xpath": "not(exists(f:code)) or exists(f:system)"
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "comparator.empty()"
                  }
                ],
                "key": "sqty-1",
                "severity": "error",
                "human": "The comparator is not used on a SimpleQuantity",
                "expression": "comparator.empty()",
                "xpath": "not(exists(f:comparator))"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.valuedItem.unitPrice",
            "path": "Contract.valuedItem.unitPrice",
            "label": "ConsentDirective-valuedItem-unitprice",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.unitPrice",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "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')"
                  }
                ],
                "key": "mny-1",
                "severity": "error",
                "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).",
                "expression": "(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')",
                "xpath": "(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.valuedItem.factor",
            "path": "Contract.valuedItem.factor",
            "label": "ConsentDirective-valuedItem-factor",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.factor",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.points",
            "path": "Contract.valuedItem.points",
            "label": "ConsentDirective-valuedItem-points",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.points",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.net",
            "path": "Contract.valuedItem.net",
            "label": "ConsentDirective-valuedItem-net",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.valuedItem.net",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "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')"
                  }
                ],
                "key": "mny-1",
                "severity": "error",
                "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).",
                "expression": "(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')",
                "xpath": "(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.signer",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "Signatory"
              }
            ],
            "path": "Contract.signer",
            "label": "ConsentDirective-signer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.signer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.signer.id",
            "path": "Contract.signer.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.signer.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.signer.extension",
            "path": "Contract.signer.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.signer.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.signer.modifierExtension",
            "path": "Contract.signer.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.signer.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.signer.type",
            "path": "Contract.signer.type",
            "label": "ConsentDirective-signer-type",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.signer.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "strength": "preferred",
              "description": "List of parties who may be signing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-signer-type"
              }
            }
          },
          {
            "id": "Contract.signer.party",
            "path": "Contract.signer.party",
            "label": "ConsentDirective-signer-party",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.signer.party",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ]
          },
          {
            "id": "Contract.signer.signature",
            "path": "Contract.signer.signature",
            "label": "ConsentDirective-signer-signature",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.signer.signature",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Contract.term",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "Term"
              }
            ],
            "path": "Contract.term",
            "label": "ConsentDirective-term",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.id",
            "path": "Contract.term.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.term.extension",
            "path": "Contract.term.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.term.modifierExtension",
            "path": "Contract.term.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.term.identifier",
            "path": "Contract.term.identifier",
            "label": "ConsentDirective-term-identifier",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.issued",
            "path": "Contract.term.issued",
            "label": "ConsentDirective-term-issued",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.applies",
            "path": "Contract.term.applies",
            "label": "ConsentDirective-term-applies",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.applies",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.type",
            "path": "Contract.term.type",
            "label": "ConsentDirective-term-type",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the types of contract provisions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-term-type"
              }
            }
          },
          {
            "id": "Contract.term.subType",
            "path": "Contract.term.subType",
            "label": "ConsentDirective-term-subType",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.subType",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the subtypes of contract provisions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-term-subtype"
              }
            }
          },
          {
            "id": "Contract.term.topic",
            "path": "Contract.term.topic",
            "label": "ConsentDirective-term-topic",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.topic",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.term.action",
            "path": "Contract.term.action",
            "label": "ConsentDirective-term-action",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.action",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-action"
              }
            }
          },
          {
            "id": "Contract.term.actionReason",
            "path": "Contract.term.actionReason",
            "label": "ConsentDirective-term-actionReason",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.actionReason",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action reason.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "Contract.term.actor",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "TermActor"
              }
            ],
            "path": "Contract.term.actor",
            "label": "ConsentDirective-term-actor",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.actor",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.actor.id",
            "path": "Contract.term.actor.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.actor.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.term.actor.extension",
            "path": "Contract.term.actor.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.actor.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.term.actor.modifierExtension",
            "path": "Contract.term.actor.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.actor.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.term.actor.entity",
            "path": "Contract.term.actor.entity",
            "label": "ConsentDirective-term-actor-entity",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.term.actor.entity",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Substance"
              }
            ]
          },
          {
            "id": "Contract.term.actor.role",
            "path": "Contract.term.actor.role",
            "label": "ConsentDirective-term-actor-role",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.actor.role",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract actor role.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-actorrole"
              }
            }
          },
          {
            "id": "Contract.term.text",
            "path": "Contract.term.text",
            "label": "ConsentDirective-term-text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "TermValuedItem"
              }
            ],
            "path": "Contract.term.valuedItem",
            "label": "ConsentDirective-term-valuedItem",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Contract.term.valuedItem",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.id",
            "path": "Contract.term.valuedItem.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.extension",
            "path": "Contract.term.valuedItem.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.valuedItem.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.modifierExtension",
            "path": "Contract.term.valuedItem.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.valuedItem.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.term.valuedItem.entity[x]",
            "path": "Contract.term.valuedItem.entity[x]",
            "label": "ConsentDirective-term-valuedItem-entity[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.entity[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.identifier",
            "path": "Contract.term.valuedItem.identifier",
            "label": "ConsentDirective-term-valuedItem",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.effectiveTime",
            "path": "Contract.term.valuedItem.effectiveTime",
            "label": "ConsentDirective-term-valuedItem-effectiveTime",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.effectiveTime",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.quantity",
            "path": "Contract.term.valuedItem.quantity",
            "label": "ConsentDirective-term-valuedItem-quantity",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.quantity",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "xpath": "not(exists(f:code)) or exists(f:system)"
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "comparator.empty()"
                  }
                ],
                "key": "sqty-1",
                "severity": "error",
                "human": "The comparator is not used on a SimpleQuantity",
                "expression": "comparator.empty()",
                "xpath": "not(exists(f:comparator))"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.valuedItem.unitPrice",
            "path": "Contract.term.valuedItem.unitPrice",
            "label": "ConsentDirective-term-valuedItem-unitPrice",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.unitPrice",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "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')"
                  }
                ],
                "key": "mny-1",
                "severity": "error",
                "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).",
                "expression": "(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')",
                "xpath": "(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.valuedItem.factor",
            "path": "Contract.term.valuedItem.factor",
            "label": "ConsentDirective-term-valuedItem-factor",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.factor",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.points",
            "path": "Contract.term.valuedItem.points",
            "label": "ConsentDirective-term-valuedItem-points",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.points",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.net",
            "path": "Contract.term.valuedItem.net",
            "label": "ConsentDirective-term-valuedItem-net",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.term.valuedItem.net",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ],
            "constraint": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                    "valueString": "code.empty() or system"
                  }
                ],
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system",
                "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')"
                  }
                ],
                "key": "mny-1",
                "severity": "error",
                "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).",
                "expression": "(code or value.empty()) and (system.empty() or system = 'urn:iso:std:iso:4217')",
                "xpath": "(f:code or not(f:value)) and (not(exists(f:system)) or f:system/@value='urn:iso:std:iso:4217')"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.group",
            "path": "Contract.term.group",
            "label": "ConsentDirective-term-group",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.term.group",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Contract.term"
          },
          {
            "id": "Contract.binding[x]",
            "path": "Contract.binding[x]",
            "label": "ConsentDirective-binding[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.binding[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.friendly",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "FriendlyLanguage"
              }
            ],
            "path": "Contract.friendly",
            "label": "ConsentDirective-friendly",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.friendly",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.friendly.id",
            "path": "Contract.friendly.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.friendly.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.friendly.extension",
            "path": "Contract.friendly.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.friendly.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.friendly.modifierExtension",
            "path": "Contract.friendly.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.friendly.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.friendly.content[x]",
            "path": "Contract.friendly.content[x]",
            "label": "ConsentDirective-friendly-content[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.friendly.content[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.legal",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "LegalLanguage"
              }
            ],
            "path": "Contract.legal",
            "label": "ConsentDirective-legal",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.legal",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.legal.id",
            "path": "Contract.legal.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.legal.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.legal.extension",
            "path": "Contract.legal.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.legal.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.legal.modifierExtension",
            "path": "Contract.legal.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.legal.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.legal.content[x]",
            "path": "Contract.legal.content[x]",
            "label": "ConsentDirective-legal-content[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.legal.content[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.rule",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ComputableLanguage"
              }
            ],
            "path": "Contract.rule",
            "label": "ConsentDirective-rule",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.rule",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.rule.id",
            "path": "Contract.rule.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Contract.rule.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ]
          },
          {
            "id": "Contract.rule.extension",
            "path": "Contract.rule.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.rule.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Contract.rule.modifierExtension",
            "path": "Contract.rule.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Contract.rule.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Contract.rule.content[x]",
            "path": "Contract.rule.content[x]",
            "label": "ConsentDirective-rule-content[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Contract.rule.content[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Contract",
            "path": "Contract",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Contract.actor",
            "path": "Contract.actor",
            "label": "ConsentDirective-actor",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.actor.entity",
            "path": "Contract.actor.entity",
            "label": "ConsentDirective-actor-entity",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Substance"
              }
            ]
          },
          {
            "id": "Contract.actor.role",
            "path": "Contract.actor.role",
            "label": "ConsentDirective-actor-role",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract actor role.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-actorrole"
              }
            }
          },
          {
            "id": "Contract.identifier",
            "path": "Contract.identifier",
            "label": "ConsentDirective-identifier",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.issued",
            "path": "Contract.issued",
            "label": "ConsentDirective-issued",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.applies",
            "path": "Contract.applies",
            "label": "ConsentDirective-applies",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.topic",
            "path": "Contract.topic",
            "label": "ConsentDirective-topic",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.authority",
            "path": "Contract.authority",
            "label": "ConsentDirective-authority",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ]
          },
          {
            "id": "Contract.domain",
            "path": "Contract.domain",
            "label": "ConsentDirective-domain",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ]
          },
          {
            "id": "Contract.type",
            "path": "Contract.type",
            "label": "ConsentDirective-type",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "strength": "example",
              "description": "List of overall contract codes.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-type"
              }
            }
          },
          {
            "id": "Contract.type.coding.code",
            "path": "Contract.type.coding.code",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "57016-8",
            "isSummary": true
          },
          {
            "id": "Contract.type.coding.system",
            "path": "Contract.type.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Contract.subType",
            "path": "Contract.subType",
            "label": "ConsentDirective-subType",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "strength": "example",
              "description": "Detailed codes within the above.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-subtype"
              }
            }
          },
          {
            "id": "Contract.action",
            "path": "Contract.action",
            "label": "ConsentDirective-action",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-action"
              }
            }
          },
          {
            "id": "Contract.actionReason",
            "path": "Contract.actionReason",
            "label": "ConsentDirective-actionReason",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action reason.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "Contract.signer",
            "path": "Contract.signer",
            "label": "ConsentDirective-signer",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.signer.type",
            "path": "Contract.signer.type",
            "label": "ConsentDirective-signer-type",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "strength": "preferred",
              "description": "List of parties who may be signing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-signer-type"
              }
            }
          },
          {
            "id": "Contract.signer.party",
            "path": "Contract.signer.party",
            "label": "ConsentDirective-signer-party",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ]
          },
          {
            "id": "Contract.signer.signature",
            "path": "Contract.signer.signature",
            "label": "ConsentDirective-signer-signature",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Contract.valuedItem",
            "path": "Contract.valuedItem",
            "label": "ConsentDirective-valuedItem",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.entity[x]",
            "path": "Contract.valuedItem.entity[x]",
            "label": "ConsentDirective-valuedItem-entity[x]",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.identifier",
            "path": "Contract.valuedItem.identifier",
            "label": "ConsentDirective-valuedItem-identifier",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Identifier"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.effectiveTime",
            "path": "Contract.valuedItem.effectiveTime",
            "label": "ConsentDirective-valuedItem-effectiveTime",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.quantity",
            "path": "Contract.valuedItem.quantity",
            "label": "ConsentDirective-valuedItem-quantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.unitPrice",
            "path": "Contract.valuedItem.unitPrice",
            "label": "ConsentDirective-valuedItem-unitprice",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.factor",
            "path": "Contract.valuedItem.factor",
            "label": "ConsentDirective-valuedItem-factor",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.points",
            "path": "Contract.valuedItem.points",
            "label": "ConsentDirective-valuedItem-points",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.valuedItem.net",
            "path": "Contract.valuedItem.net",
            "label": "ConsentDirective-valuedItem-net",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ]
          },
          {
            "id": "Contract.term",
            "path": "Contract.term",
            "label": "ConsentDirective-term",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.actor",
            "path": "Contract.term.actor",
            "label": "ConsentDirective-term-actor",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.actor.entity",
            "path": "Contract.term.actor.entity",
            "label": "ConsentDirective-term-actor-entity",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Substance"
              }
            ]
          },
          {
            "id": "Contract.term.actor.role",
            "path": "Contract.term.actor.role",
            "label": "ConsentDirective-term-actor-role",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract actor role.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-actorrole"
              }
            }
          },
          {
            "id": "Contract.term.identifier",
            "path": "Contract.term.identifier",
            "label": "ConsentDirective-term-identifier",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.issued",
            "path": "Contract.term.issued",
            "label": "ConsentDirective-term-issued",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.applies",
            "path": "Contract.term.applies",
            "label": "ConsentDirective-term-applies",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Contract.term.type",
            "path": "Contract.term.type",
            "label": "ConsentDirective-term-type",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the types of contract provisions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-term-type"
              }
            }
          },
          {
            "id": "Contract.term.subType",
            "path": "Contract.term.subType",
            "label": "ConsentDirective-term-subType",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the subtypes of contract provisions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-term-subtype"
              }
            }
          },
          {
            "id": "Contract.term.topic",
            "path": "Contract.term.topic",
            "label": "ConsentDirective-term-topic",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.term.action",
            "path": "Contract.term.action",
            "label": "ConsentDirective-term-action",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/contract-action"
              }
            }
          },
          {
            "id": "Contract.term.actionReason",
            "path": "Contract.term.actionReason",
            "label": "ConsentDirective-term-actionReason",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "strength": "example",
              "description": "Detailed codes for the contract action reason.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "Contract.term.text",
            "path": "Contract.term.text",
            "label": "ConsentDirective-term-text",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem",
            "path": "Contract.term.valuedItem",
            "label": "ConsentDirective-term-valuedItem",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.entity[x]",
            "path": "Contract.term.valuedItem.entity[x]",
            "label": "ConsentDirective-term-valuedItem-entity[x]",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.identifier",
            "path": "Contract.term.valuedItem.identifier",
            "label": "ConsentDirective-term-valuedItem",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Identifier"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.effectiveTime",
            "path": "Contract.term.valuedItem.effectiveTime",
            "label": "ConsentDirective-term-valuedItem-effectiveTime",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.quantity",
            "path": "Contract.term.valuedItem.quantity",
            "label": "ConsentDirective-term-valuedItem-quantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.unitPrice",
            "path": "Contract.term.valuedItem.unitPrice",
            "label": "ConsentDirective-term-valuedItem-unitPrice",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.factor",
            "path": "Contract.term.valuedItem.factor",
            "label": "ConsentDirective-term-valuedItem-factor",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.points",
            "path": "Contract.term.valuedItem.points",
            "label": "ConsentDirective-term-valuedItem-points",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ]
          },
          {
            "id": "Contract.term.valuedItem.net",
            "path": "Contract.term.valuedItem.net",
            "label": "ConsentDirective-term-valuedItem-net",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/Money"
              }
            ]
          },
          {
            "id": "Contract.term.group",
            "path": "Contract.term.group",
            "label": "ConsentDirective-term-group",
            "min": 0,
            "max": "*",
            "contentReference": "#term"
          },
          {
            "id": "Contract.binding[x]",
            "path": "Contract.binding[x]",
            "label": "ConsentDirective-binding[x]",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.friendly",
            "path": "Contract.friendly",
            "label": "ConsentDirective-friendly",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.friendly.content[x]",
            "path": "Contract.friendly.content[x]",
            "label": "ConsentDirective-friendly-content[x]",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.legal",
            "path": "Contract.legal",
            "label": "ConsentDirective-legal",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.legal.content[x]",
            "path": "Contract.legal.content[x]",
            "label": "ConsentDirective-legal-content[x]",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ]
          },
          {
            "id": "Contract.rule",
            "path": "Contract.rule",
            "label": "ConsentDirective-rule",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "BackboneElement"
              }
            ]
          },
          {
            "id": "Contract.rule.content[x]",
            "path": "Contract.rule.content[x]",
            "label": "ConsentDirective-rule-content[x]",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Attachment"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/familymemberhistory-genetic",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "familymemberhistory-genetic",
      "url": "http://hl7.org/fhir/StructureDefinition/familymemberhistory-genetic",
      "name": "Family member history for genetics analysis",
      "status": "draft",
      "experimental": false,
      "date": "2013-10-02",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "FamilyMemberHistory",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/FamilyMemberHistory",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "FamilyMemberHistory",
            "path": "FamilyMemberHistory",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "fhs-2",
                "severity": "error",
                "human": "Can only have estimatedAge if age[x] is present",
                "expression": "age.exists() or estimatedAge.empty()",
                "xpath": "exists(*[starts-with(local-name(.), 'age')]) or not(exists(f:estimatedAge))",
                "source": "FamilyMemberHistory"
              },
              {
                "key": "fhs-3",
                "severity": "error",
                "human": "Not Done Reason can only be specified if NotDone is \"true\"",
                "expression": "notDone or notDoneReason.exists().not()",
                "xpath": "f:notDone/@value=true() or not(exists(f:notDoneReason))",
                "source": "FamilyMemberHistory"
              },
              {
                "key": "fhs-1",
                "severity": "error",
                "human": "Can have age[x] or born[x], but not both",
                "expression": "age.empty() or born.empty()",
                "xpath": "not (*[starts-with(local-name(.), 'age')] and *[starts-with(local-name(.), 'birth')])",
                "source": "FamilyMemberHistory"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.id",
            "path": "FamilyMemberHistory.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.meta",
            "path": "FamilyMemberHistory.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.implicitRules",
            "path": "FamilyMemberHistory.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.language",
            "path": "FamilyMemberHistory.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.text",
            "path": "FamilyMemberHistory.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "FamilyMemberHistory.contained",
            "path": "FamilyMemberHistory.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.extension",
            "path": "FamilyMemberHistory.extension",
            "slicing": {
              "id": "1",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.extension:parent",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Parent",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ],
            "mustSupport": true,
            "isModifier": false
          },
          {
            "id": "FamilyMemberHistory.extension:sibling",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Sibling",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ],
            "mustSupport": true,
            "isModifier": false
          },
          {
            "id": "FamilyMemberHistory.extension:observation",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Observation",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ],
            "mustSupport": true,
            "isModifier": false
          },
          {
            "id": "FamilyMemberHistory.modifierExtension",
            "path": "FamilyMemberHistory.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "FamilyMemberHistory.identifier",
            "path": "FamilyMemberHistory.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.definition",
            "path": "FamilyMemberHistory.definition",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.definition",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/PlanDefinition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Questionnaire"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.status",
            "path": "FamilyMemberHistory.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FamilyHistoryStatus"
                }
              ],
              "strength": "required",
              "description": "A code that identifies the status of the family history record.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/history-status"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.notDone",
            "path": "FamilyMemberHistory.notDone",
            "comment": "This element is labeled as a modifier because it marks the family member history as a family member history that did not occur.  The more attributes are populated, the more constrained the negated statement is.  This notDone element is being evaluated and will likely be removed in a subsequent release.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.notDone",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.notDoneReason",
            "path": "FamilyMemberHistory.notDoneReason",
            "comment": "This notDoneReason element is being evaluated and will likely be replaced in a subsequent release (e.g. dataAbsentReason).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.notDoneReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "fhs-3"
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FamilyHistoryNotDoneReason"
                }
              ],
              "strength": "example",
              "description": "Codes describing the reason why a family member history was not done.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/history-not-done-reason"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.patient",
            "path": "FamilyMemberHistory.patient",
            "min": 1,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.patient",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.date",
            "path": "FamilyMemberHistory.date",
            "comment": "This should be captured even if the same as the date on the List aggregating the full family history.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.date",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.name",
            "path": "FamilyMemberHistory.name",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.relationship:relationship",
            "path": "FamilyMemberHistory.relationship",
            "sliceName": "Relationship",
            "min": 1,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.relationship",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FamilialRelationship"
                }
              ],
              "strength": "example",
              "description": "The nature of the relationship between the patient and the related person being described in the family member history.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-FamilyMember"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.gender:gender",
            "path": "FamilyMemberHistory.gender",
            "sliceName": "Gender",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.gender",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AdministrativeGender"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The gender of a person used for administrative purposes.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/administrative-gender"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.born[x]:bornage",
            "path": "FamilyMemberHistory.born[x]",
            "sliceName": "BornAge",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.born[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              },
              {
                "code": "date"
              },
              {
                "code": "string"
              }
            ],
            "condition": [
              "fhs-1"
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.age[x]:age",
            "path": "FamilyMemberHistory.age[x]",
            "sliceName": "Age",
            "comment": "use estimatedAge to indicate whether the age is actual or not.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.age[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "string"
              }
            ],
            "condition": [
              "fhs-1"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.estimatedAge",
            "path": "FamilyMemberHistory.estimatedAge",
            "comment": "This element is labeled as a modifier because the fact tha age is estimated can/should change the results of any algorithm that calculates based on the specified age.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.estimatedAge",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "meaningWhenMissing": "It is unknown whether the age is an estimate or not",
            "condition": [
              "fhs-2"
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.deceased[x]:deceasedage",
            "path": "FamilyMemberHistory.deceased[x]",
            "sliceName": "DeceasedAge",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.deceased[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              },
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "date"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.reasonCode",
            "path": "FamilyMemberHistory.reasonCode",
            "comment": "Textual reasons can be caprued using reasonCode.text.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.reasonCode",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FamilyHistoryReason"
                }
              ],
              "strength": "example",
              "description": "Codes indicating why the family member history was done.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/clinical-findings"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.reasonReference",
            "path": "FamilyMemberHistory.reasonReference",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.reasonReference",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Condition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              }
            ],
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.note",
            "path": "FamilyMemberHistory.note",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.note",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Annotation"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.condition:condition",
            "path": "FamilyMemberHistory.condition",
            "sliceName": "Condition",
            "comment": "If none of the conditions listed have an outcome of \"death\" specified, that indicates that none of the specified conditions are known to have been the primary cause of death.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "FamilyMemberHistory.condition",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.id",
            "path": "FamilyMemberHistory.condition.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.condition:condition.extension",
            "path": "FamilyMemberHistory.condition.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "FamilyMemberHistory.condition:condition.modifierExtension",
            "path": "FamilyMemberHistory.condition.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.code",
            "path": "FamilyMemberHistory.condition.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.condition.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ConditionCode"
                }
              ],
              "strength": "example",
              "description": "Identification of the Condition or diagnosis.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/condition-code"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.condition:condition.outcome",
            "path": "FamilyMemberHistory.condition.outcome",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.condition.outcome",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ConditionOutcome"
                }
              ],
              "strength": "example",
              "description": "The result of the condition for the patient; e.g. death, permanent disability, temporary disability, etc.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/condition-outcome"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.condition:condition.onset[x]",
            "path": "FamilyMemberHistory.condition.onset[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.condition.onset[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "Period"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.note",
            "path": "FamilyMemberHistory.condition.note",
            "min": 0,
            "max": "1",
            "base": {
              "path": "FamilyMemberHistory.condition.note",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Annotation"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "FamilyMemberHistory",
            "path": "FamilyMemberHistory",
            "min": 0,
            "max": "*"
          },
          {
            "id": "FamilyMemberHistory.extension:parent",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Parent",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-parent"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.extension:sibling",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Sibling",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-sibling"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.extension:observation",
            "path": "FamilyMemberHistory.extension",
            "sliceName": "Observation",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/family-member-history-genetics-observation"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.relationship:relationship",
            "path": "FamilyMemberHistory.relationship",
            "sliceName": "Relationship",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.gender:gender",
            "path": "FamilyMemberHistory.gender",
            "sliceName": "Gender",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AdministrativeGender"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The gender of a person used for administrative purposes.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/administrative-gender"
              }
            }
          },
          {
            "id": "FamilyMemberHistory.born[x]:bornage",
            "path": "FamilyMemberHistory.born[x]",
            "sliceName": "BornAge",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Period"
              },
              {
                "code": "date"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.age[x]:age",
            "path": "FamilyMemberHistory.age[x]",
            "sliceName": "Age",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.deceased[x]:deceasedage",
            "path": "FamilyMemberHistory.deceased[x]",
            "sliceName": "DeceasedAge",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "boolean"
              },
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "date"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition",
            "path": "FamilyMemberHistory.condition",
            "sliceName": "Condition",
            "min": 0,
            "max": "*",
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.code",
            "path": "FamilyMemberHistory.condition.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.outcome",
            "path": "FamilyMemberHistory.condition.outcome",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.onset[x]",
            "path": "FamilyMemberHistory.condition.onset[x]",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Age"
              },
              {
                "code": "Range"
              },
              {
                "code": "Period"
              },
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "FamilyMemberHistory.condition:condition.note",
            "path": "FamilyMemberHistory.condition.note",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Annotation"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/shareablevalueset",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "shareablevalueset",
      "url": "http://hl7.org/fhir/StructureDefinition/shareablevalueset",
      "name": "Shareable ValueSet",
      "status": "draft",
      "experimental": false,
      "date": "2017-04-26T18:33:43-04:00",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "ValueSet",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ValueSet",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "ValueSet",
            "path": "ValueSet",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "vsd-5",
                "severity": "error",
                "human": "Value set SHALL contain at least one of a compose or an expansion element",
                "expression": "compose.exists() or expansion.exists()",
                "xpath": "exists(f:compose) or exists(f:expansion)",
                "source": "ValueSet"
              }
            ]
          },
          {
            "id": "ValueSet.id",
            "path": "ValueSet.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.meta",
            "path": "ValueSet.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.implicitRules",
            "path": "ValueSet.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.language",
            "path": "ValueSet.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "ValueSet.text",
            "path": "ValueSet.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "ValueSet.contained",
            "path": "ValueSet.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "ValueSet.extension",
            "path": "ValueSet.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.modifierExtension",
            "path": "ValueSet.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "ValueSet.url",
            "path": "ValueSet.url",
            "comment": "Can be a urn:uuid: or a urn:oid:, but real http: addresses are preferred.  Multiple instances may share the same url if they have a distinct version.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.url",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.identifier",
            "path": "ValueSet.identifier",
            "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this value set outside of FHIR, where it is not possible to use the logical URI.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.version",
            "path": "ValueSet.version",
            "comment": "There may be different value set instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a refrence to a particular business version of the value set with the format [url]|[version].",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.name",
            "path": "ValueSet.name",
            "comment": "The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly. A name should be provided unless the value set is a contained resource (e.g. an anonymous value set in a profile). Most registries will require a name.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.title",
            "path": "ValueSet.title",
            "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.title",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.status",
            "path": "ValueSet.status",
            "comment": "Allows filtering of value sets that are appropriate for use vs. not.  \nThis is labeled as \"Is Modifier\" because applications should not use a retired value set without due consideration.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "PublicationStatus"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The lifecycle status of a Value Set or Concept Map.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/publication-status"
              }
            }
          },
          {
            "id": "ValueSet.experimental",
            "path": "ValueSet.experimental",
            "comment": "Allows filtering of value set that are appropriate for use vs. not. This is labeled as \"Is Modifier\" because applications should not use an experimental value set in production.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.experimental",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.date",
            "path": "ValueSet.date",
            "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the value set. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.date",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.publisher",
            "path": "ValueSet.publisher",
            "comment": "Usually an organization, but may be an individual. The publisher (or steward) of the value set is the organization or individual primarily responsible for the maintenance and upkeep of the value set. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the value set. This item SHOULD be populated unless the information is available from context.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.publisher",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.contact",
            "path": "ValueSet.contact",
            "comment": "May be a web site, an email address, a telephone number, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.contact",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "ContactDetail"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.description",
            "path": "ValueSet.description",
            "comment": "This description can be used to capture details such as why the value set was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the value set as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created). The description is not intended to describe the semantics of the Value Set - there are no intrinsic semantics separate from the codes contained in its expansion. The description should capture its intended use, which is needed for ensuring integrity for its use in models across future changes. A description should be provided unless the value set is a contained resource (e.g. an anonymous value set in a profile). Most registries will require a description.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "ValueSet.useContext",
            "path": "ValueSet.useContext",
            "comment": "When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.useContext",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "UsageContext"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.jurisdiction",
            "path": "ValueSet.jurisdiction",
            "comment": "It may be possible for the value set to be used in jurisdictions other than those for which it was originally designed or intended.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.jurisdiction",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Jurisdiction"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "Countries and regions within which this artifact is targeted for use",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/jurisdiction"
              }
            }
          },
          {
            "id": "ValueSet.immutable",
            "path": "ValueSet.immutable",
            "comment": "Normally immutability is set to 'false', which is the default assumption if it is not populated.  Note that the implication is that if this is set to 'true', there may be only one ValueSet version for this definition. Immutability tends to be set to 'true' in one of two cases: - Where the value set, by the nature of its usage, cannot change.  For example \"All specializations of ACT in ActClassCode\" - Where there's no safe way to express the \"Purpose\" such that someone else could safely make changes to the value set definition. Source workflow control must guarantee that the same URI always yields the same definition.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.immutable",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.purpose",
            "path": "ValueSet.purpose",
            "comment": "This element does not describe the usage of the value set Instead  it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this value set.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.purpose",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "ValueSet.copyright",
            "path": "ValueSet.copyright",
            "comment": "null Frequently, the copyright differs between the value set and the codes that are included. The copyright statement should clearly differentiate between these when required.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.copyright",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "ValueSet.extensible",
            "path": "ValueSet.extensible",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.extensible",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose",
            "path": "ValueSet.compose",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "vsd-5"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "ValueSet.compose.id",
            "path": "ValueSet.compose.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.extension",
            "path": "ValueSet.compose.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.compose.modifierExtension",
            "path": "ValueSet.compose.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.lockedDate",
            "path": "ValueSet.compose.lockedDate",
            "comment": "With a defined lockedDate the value set is considered \"Locked\". Otherwise, the value set may have different expansions as underlying code systems and/or value sets evolve.  The interpretation of lockedDate is often dependent on the context - e.g. a SNOMED CT derived value set with a lockedDate will have a different expansion in USA than in UK.  If a value set specifies a version for include and exclude statements, and also specifies a locked date, the specified versions need to be available that date, or the value set will not be usable.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.lockedDate",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "date"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.inactive",
            "path": "ValueSet.compose.inactive",
            "comment": "Note that in the FHIR terminology framework, \"deprecated\" does not mean inactive, but in some code systems (e.g. LOINC, deprecated means inactive). Code systems should define what codes are considered to be inactive. If this is not clearly defined (including in the FHIR code system resource), then all codes are assumed to be active.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.inactive",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ConceptSet"
              }
            ],
            "path": "ValueSet.compose.include",
            "comment": "All the conditions in an include must be true. If a system is listed, all the codes from the system are listed. If one or more filters are listed, all of the filters must apply. If one or more value sets are listed, the codes must be in all the value sets. E.g. each include is 'include all the codes that meet all these conditions'.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.include",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vsd-2",
                "severity": "error",
                "human": "A value set with concepts or filters SHALL include a system",
                "expression": "(concept.exists() or filter.exists()) implies system.exists()",
                "xpath": "not(exists(f:concept) or exists(f:filter)) or exists(f:system)"
              },
              {
                "key": "vsd-3",
                "severity": "error",
                "human": "Cannot have both concept and filter",
                "expression": "concept.empty() or filter.empty()",
                "xpath": "not(exists(f:concept)) or not(exists(f:filter))"
              },
              {
                "key": "vsd-1",
                "severity": "error",
                "human": "A value set include/exclude SHALL have a value set or a system",
                "expression": "valueSet.exists() or system.exists()",
                "xpath": "exists(f:valueSet) or exists(f:system)"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.id",
            "path": "ValueSet.compose.include.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.extension",
            "path": "ValueSet.compose.include.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.modifierExtension",
            "path": "ValueSet.compose.include.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.system",
            "path": "ValueSet.compose.include.system",
            "comment": "If there are no codes or filters, the entire code system is included. Note that the set of codes that are included may contain abstract codes. See ''Coding.system'' for further documentation about the correct value for the system element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "condition": [
              "vsd-1",
              "vsd-2"
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.version",
            "path": "ValueSet.compose.include.version",
            "comment": "This is used when selecting the descendants of a concept - they may change between versions. If no version is specified, then the exact contents of the value set may not be known until a context of use binds it to a particular version.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.concept",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ConceptReference"
              }
            ],
            "path": "ValueSet.compose.include.concept",
            "comment": "The list of concepts is considered ordered, though the order may not have any particular significance. Typically, the order of an expansion follows that defined in the compose element.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.include.concept",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "vsd-3"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.id",
            "path": "ValueSet.compose.include.concept.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.extension",
            "path": "ValueSet.compose.include.concept.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.modifierExtension",
            "path": "ValueSet.compose.include.concept.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.concept.code",
            "path": "ValueSet.compose.include.concept.code",
            "comment": "Expressions are allowed if defined by the underlying code system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.concept.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.display",
            "path": "ValueSet.compose.include.concept.display",
            "comment": "The value set resource allows for an alternative display to be specified for when this concept is used in this particular value set. See notes in the value set narrative about the correct use of this element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.concept.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.designation",
            "path": "ValueSet.compose.include.concept.designation",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.include.concept.designation",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.designation.id",
            "path": "ValueSet.compose.include.concept.designation.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.designation.extension",
            "path": "ValueSet.compose.include.concept.designation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.concept.designation.modifierExtension",
            "path": "ValueSet.compose.include.concept.designation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.concept.designation.language",
            "path": "ValueSet.compose.include.concept.designation.language",
            "comment": "In the absence of a language, the resource language applies.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.concept.designation.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "ValueSet.compose.include.concept.designation.use",
            "path": "ValueSet.compose.include.concept.designation.use",
            "comment": "If no use is provided, the designation can be assumed to be suitable for general display to a human user.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.concept.designation.use",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ConceptDesignationUse"
                }
              ],
              "strength": "extensible",
              "description": "Details of how a designation would be used.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/designation-use"
              }
            }
          },
          {
            "id": "ValueSet.compose.include.concept.designation.value",
            "path": "ValueSet.compose.include.concept.designation.value",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.concept.designation.value",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.filter",
            "path": "ValueSet.compose.include.filter",
            "comment": "Selecting codes by specifying filters based on properties is only possible where the underlying code system defines appropriate properties. Note that in some cases, the underlying code system defines the logical concepts but not the literal codes for the concepts. In such cases, the literal definitions may be provided by a third party.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.include.filter",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "vsd-3"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.filter.id",
            "path": "ValueSet.compose.include.filter.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.filter.extension",
            "path": "ValueSet.compose.include.filter.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.compose.include.filter.modifierExtension",
            "path": "ValueSet.compose.include.filter.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.filter.property",
            "path": "ValueSet.compose.include.filter.property",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.filter.property",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.filter.op",
            "path": "ValueSet.compose.include.filter.op",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.filter.op",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FilterOperator"
                }
              ],
              "strength": "required",
              "description": "The kind of operation to perform as a part of a property based filter.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/filter-operator"
              }
            }
          },
          {
            "id": "ValueSet.compose.include.filter.value",
            "path": "ValueSet.compose.include.filter.value",
            "comment": "Use regex matching with care - full regex matching on every SNOMED CT term is prohibitive, for example.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.compose.include.filter.value",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.include.valueSet",
            "path": "ValueSet.compose.include.valueSet",
            "comment": "The value set URI is either a logical reference to a defined value set such as a [SNOMED CT reference set]{snomedct.html#implicit}, or a direct reference to a value set definition using ValueSet.url. The reference may not refer to an actual FHIR ValueSet resource; in this case, whatever is referred to is an implicit definition of a value set that needs to be clear about how versions are resolved.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.include.valueSet",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "condition": [
              "vsd-1"
            ],
            "isSummary": true
          },
          {
            "id": "ValueSet.compose.exclude",
            "path": "ValueSet.compose.exclude",
            "comment": "Usually this is used to selectively exclude codes that were included by subsumption in the inclusions. Any display names specified for the codes are ignored.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.compose.exclude",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#ValueSet.compose.include",
            "condition": [
              "vsd-2"
            ]
          },
          {
            "id": "ValueSet.expansion",
            "path": "ValueSet.expansion",
            "comment": "Expansion is performed to produce a collection of codes that are ready to use for data entry or validation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "vsd-5"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.id",
            "path": "ValueSet.expansion.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.extension",
            "path": "ValueSet.expansion.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.modifierExtension",
            "path": "ValueSet.expansion.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.expansion.identifier",
            "path": "ValueSet.expansion.identifier",
            "comment": "Typically, this uri is a UUID (e.g. urn:uuid:8230ff20-c97a-4167-a59d-dc2cb9df16dd).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.identifier",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.timestamp",
            "path": "ValueSet.expansion.timestamp",
            "comment": "This SHOULD be a fully populated instant, but in some circumstances, value sets are expanded by hand, and the expansion is published without that precision.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.timestamp",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.total",
            "path": "ValueSet.expansion.total",
            "comment": "Paging only applies to flat expansions.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.total",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "integer"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.offset",
            "path": "ValueSet.expansion.offset",
            "comment": "Paging only applies to flat expansions. If a filter is applied, the count is the number of concepts that matched the filter, not the number of concepts in an unfiltered view of the expansion.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.offset",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "integer"
              }
            ],
            "meaningWhenMissing": "Paging is not being used"
          },
          {
            "id": "ValueSet.expansion.parameter",
            "path": "ValueSet.expansion.parameter",
            "comment": "The server decides which parameters to include here, but at a minimum, the list SHOULD include the date, filter, and profile parameters passed to the $expand operation (if any).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.expansion.parameter",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.parameter.id",
            "path": "ValueSet.expansion.parameter.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.parameter.extension",
            "path": "ValueSet.expansion.parameter.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.parameter.modifierExtension",
            "path": "ValueSet.expansion.parameter.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.expansion.parameter.name",
            "path": "ValueSet.expansion.parameter.name",
            "comment": "The names are assigned at the discretion of the server.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.parameter.name",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.parameter.value[x]",
            "path": "ValueSet.expansion.parameter.value[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.parameter.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              },
              {
                "code": "boolean"
              },
              {
                "code": "integer"
              },
              {
                "code": "decimal"
              },
              {
                "code": "uri"
              },
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains",
            "path": "ValueSet.expansion.contains",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.expansion.contains",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vsd-6",
                "severity": "error",
                "human": "SHALL have a code or a display",
                "expression": "code.exists() or display.exists()",
                "xpath": "exists(f:code) or exists(f:display)"
              },
              {
                "key": "vsd-9",
                "severity": "error",
                "human": "Must have a code if not abstract",
                "expression": "code.exists() or abstract = true",
                "xpath": "exists(f:code) or (f:abstract/@value = true())"
              },
              {
                "key": "vsd-10",
                "severity": "error",
                "human": "Must have a system if a code is present",
                "expression": "code.empty() or system.exists()",
                "xpath": "exists(f:system) or not(exists(f:code))"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains.id",
            "path": "ValueSet.expansion.contains.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains.extension",
            "path": "ValueSet.expansion.contains.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains.modifierExtension",
            "path": "ValueSet.expansion.contains.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ValueSet.expansion.contains.system",
            "path": "ValueSet.expansion.contains.system",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains.abstract",
            "path": "ValueSet.expansion.contains.abstract",
            "comment": "This should not be understood to exclude its use for searching (e.g. by subsumption testing). The client should know whether it is appropriate for the user to select an abstract code or not.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.abstract",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false
          },
          {
            "id": "ValueSet.expansion.contains.inactive",
            "path": "ValueSet.expansion.contains.inactive",
            "comment": "This should only have a value if the concept is inactive.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.inactive",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false
          },
          {
            "id": "ValueSet.expansion.contains.version",
            "path": "ValueSet.expansion.contains.version",
            "comment": "The exact value of the version string is specified by the system from which the code is derived.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.expansion.contains.code",
            "path": "ValueSet.expansion.contains.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "condition": [
              "vsd-6"
            ]
          },
          {
            "id": "ValueSet.expansion.contains.display",
            "path": "ValueSet.expansion.contains.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ValueSet.expansion.contains.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "condition": [
              "vsd-6"
            ]
          },
          {
            "id": "ValueSet.expansion.contains.designation",
            "path": "ValueSet.expansion.contains.designation",
            "comment": "The designations provided must be based on the value set and code system definitions.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.expansion.contains.designation",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#ValueSet.compose.include.concept.designation"
          },
          {
            "id": "ValueSet.expansion.contains.contains",
            "path": "ValueSet.expansion.contains.contains",
            "comment": "If the expansion uses this element, there is  no implication about the logical relationship between them, and the  structure cannot be used for logical inferencing. The structure  exists to provide navigational assistance for helping human users to  locate codes in the expansion.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ValueSet.expansion.contains.contains",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#ValueSet.expansion.contains"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "ValueSet",
            "path": "ValueSet",
            "min": 1,
            "max": "1"
          },
          {
            "id": "ValueSet.url",
            "path": "ValueSet.url",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ]
          },
          {
            "id": "ValueSet.version",
            "path": "ValueSet.version",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.name",
            "path": "ValueSet.name",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.status",
            "path": "ValueSet.status",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "ValueSet.experimental",
            "path": "ValueSet.experimental",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "boolean"
              }
            ]
          },
          {
            "id": "ValueSet.publisher",
            "path": "ValueSet.publisher",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ValueSet.description",
            "path": "ValueSet.description",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "ValueSet.immutable",
            "path": "ValueSet.immutable",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "boolean"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/procedurerequest-genetics",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "procedurerequest-genetics",
      "url": "http://hl7.org/fhir/StructureDefinition/procedurerequest-genetics",
      "name": "ProcedureRequest-Genetics",
      "status": "draft",
      "experimental": false,
      "date": "2015-10-20",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "ProcedureRequest",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "ProcedureRequest",
            "path": "ProcedureRequest",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "ProcedureRequest.id",
            "path": "ProcedureRequest.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.meta",
            "path": "ProcedureRequest.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.implicitRules",
            "path": "ProcedureRequest.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.language",
            "path": "ProcedureRequest.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "ProcedureRequest.text",
            "path": "ProcedureRequest.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "ProcedureRequest.contained",
            "path": "ProcedureRequest.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "ProcedureRequest.extension",
            "path": "ProcedureRequest.extension",
            "slicing": {
              "id": "2",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ProcedureRequest.extension:item",
            "path": "ProcedureRequest.extension",
            "sliceName": "Item",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/procedurerequest-geneticsItem"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "ProcedureRequest.modifierExtension",
            "path": "ProcedureRequest.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "ProcedureRequest.identifier",
            "path": "ProcedureRequest.identifier",
            "comment": "The identifier.type element is used to distinguish between the identifiers assigned by the orderer (known as the 'Placer' in HL7 v2) and the producer of the observations in response to the order (known as the 'Filler' in HL7 v2).  For further discussion and examples see the resource notes section below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.definition",
            "path": "ProcedureRequest.definition",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.definition",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/PlanDefinition"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.basedOn",
            "path": "ProcedureRequest.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.replaces",
            "path": "ProcedureRequest.replaces",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.replaces",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.requisition",
            "path": "ProcedureRequest.requisition",
            "comment": "Requests are linked either by a \"basedOn\" relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.requisition",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.status",
            "path": "ProcedureRequest.status",
            "comment": "The status is generally fully in the control of the requester - they determine whether the order is draft or active and, after it has been activated, competed, cancelled or suspended. States relating to the activities of the performer are reflected on either the corresponding event (see [Event Pattern](event.html) for general discussion) or using the [Task](task.html) resource.\n\nThis element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestStatus"
                }
              ],
              "strength": "required",
              "description": "The status of a procedure or diagnostic order.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/request-status"
              }
            }
          },
          {
            "id": "ProcedureRequest.intent",
            "path": "ProcedureRequest.intent",
            "comment": "This element is labeled as a modifier because the intent alters when and how the resource is actually applicable.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.intent",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestIntent"
                }
              ],
              "strength": "required",
              "description": "The kind of procedure or diagnostic request",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/request-intent"
              }
            }
          },
          {
            "id": "ProcedureRequest.priority",
            "path": "ProcedureRequest.priority",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.priority",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If missing, this task should be performed with normal priority",
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestPriority"
                }
              ],
              "strength": "required",
              "description": "Identifies the level of importance to be assigned to actioning the request",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/request-priority"
              }
            }
          },
          {
            "id": "ProcedureRequest.doNotPerform",
            "path": "ProcedureRequest.doNotPerform",
            "comment": "This element is labeled as a [modifier](conformance-rules.html#isModifier.html) because it indicates that a procedure shouldn't happen, instead of a request for it to happen.  In general, only the code and timeframe will be present, though occasional additional qualifiers such as body site or even performer could be included to narrow the scope of the prohibition.  If the ProcedureRequest.code and ProcedureRequest.doNotPerform both contain negation, that will reinforce prohibition and should not have a double negative interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.doNotPerform",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.category",
            "path": "ProcedureRequest.category",
            "comment": "There may be multiple axis of categorization depending on the context or use case for retrieving or displaying the resource.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestCategory"
                }
              ],
              "strength": "example",
              "description": "Classification of the procedure",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/procedure-category"
              }
            }
          },
          {
            "id": "ProcedureRequest.code",
            "path": "ProcedureRequest.code",
            "comment": "Many laboratory and radiology procedure codes embed the specimen/organ system in the test ordeer name, for example,  serum or serum/plasma glucose, or a chest xray. The specimen may not be recorded separately from the test code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestCode"
                }
              ],
              "strength": "example",
              "description": "Codes for tests/services that can be performed by procedure or diagnostic services.  For laboratory, LOINC is  (preferred)[http://build.fhir.org/terminologies.html#preferred] and a valueset using LOINC Order codes is available [here](valueset-diagnostic-requests.html).",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/procedure-code"
              }
            }
          },
          {
            "id": "ProcedureRequest.subject",
            "path": "ProcedureRequest.subject",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.subject",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.context",
            "path": "ProcedureRequest.context",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.occurrence[x]",
            "path": "ProcedureRequest.occurrence[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.occurrence[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              },
              {
                "code": "Timing"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.asNeeded[x]",
            "path": "ProcedureRequest.asNeeded[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.asNeeded[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              },
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureAsNeededReason"
                }
              ],
              "strength": "example",
              "description": "A coded concept identifying the pre-condition that should hold prior to performing a procedure.  For example \"pain\", \"on flare-up\", etc.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/medication-as-needed-reason"
              }
            }
          },
          {
            "id": "ProcedureRequest.authoredOn",
            "path": "ProcedureRequest.authoredOn",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.authoredOn",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.requester",
            "path": "ProcedureRequest.requester",
            "comment": "This not the dispatcher, but rather who is the authorizer.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.requester",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.requester.id",
            "path": "ProcedureRequest.requester.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ProcedureRequest.requester.extension",
            "path": "ProcedureRequest.requester.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ProcedureRequest.requester.modifierExtension",
            "path": "ProcedureRequest.requester.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.requester.agent",
            "path": "ProcedureRequest.requester.agent",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.requester.agent",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.requester.onBehalfOf",
            "path": "ProcedureRequest.requester.onBehalfOf",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.requester.onBehalfOf",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.performerType",
            "path": "ProcedureRequest.performerType",
            "comment": "this is a  role, not  a participation type.  I.e. does not describe the task, but describes the capacity.  For example, “compounding pharmacy” or “psychiatrist” or “internal referral”.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.performerType",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestParticipantRole"
                }
              ],
              "strength": "example",
              "description": "Indicates specific responsibility of an individual within the care team, such as \"Primary physician\", \"Team coordinator\", \"Caregiver\", etc.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/participant-role"
              }
            }
          },
          {
            "id": "ProcedureRequest.performer",
            "path": "ProcedureRequest.performer",
            "comment": "If needed, use an [extension](extensibility.html) for listing alternative performers and/or roles and/or preference.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ProcedureRequest.performer",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/HealthcareService"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.reasonCode",
            "path": "ProcedureRequest.reasonCode",
            "comment": "This may be used to decide how the diagnostic investigation will be performed, or even if it will be performed at all.   Use CodeableConcept text element if the data is free (uncoded) text as shown in the [CT Scan example](procedurerequest-example-di.html).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.reasonCode",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProcedureRequestReason"
                }
              ],
              "strength": "example",
              "description": "Diagnosis or problem codes justifying the reason for requesting the procedure or diagnostic investigation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/procedure-reason"
              }
            }
          },
          {
            "id": "ProcedureRequest.reasonReference",
            "path": "ProcedureRequest.reasonReference",
            "comment": "This may be used to decide how the diagnostic investigation will be performed, or even if it will be performed at all.   Use CodeableConcept text element if the data is free (uncoded) text as shown in the [CT Scan example](procedurerequest-example-di.html).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.reasonReference",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Condition"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.supportingInfo",
            "path": "ProcedureRequest.supportingInfo",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.supportingInfo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ]
          },
          {
            "id": "ProcedureRequest.specimen",
            "path": "ProcedureRequest.specimen",
            "comment": "Many diagnostic procedures need a specimen, but the request itself is not actually about the specimen. This element is for when the diagnostic is requested on already existing specimens and the request points to the specimen it applies to.    Conversely, If the request is entered first with an unknown specimen, The [Specimen](specimen.html) resource references to the ProcedureRequest.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.specimen",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ProcedureRequest.bodySite",
            "path": "ProcedureRequest.bodySite",
            "comment": "Only used if not implicit in the code found in ProcedureRequest.type.  If the use case requires BodySite to be handled as a separate resource instead of an inline coded element (e.g. to identify and track separately)  then use the standard extension [procedurerequest-targetBodySite](extension-procedurerequest-targetbodysite.html).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.bodySite",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "ProcedureRequest.note",
            "path": "ProcedureRequest.note",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.note",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Annotation"
              }
            ]
          },
          {
            "id": "ProcedureRequest.relevantHistory",
            "path": "ProcedureRequest.relevantHistory",
            "comment": "This may not include provenances for all versions of the request – only those deemed “relevant” or important.\rThis SHALL NOT include the Provenance associated with this current version of the resource.  (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update.  Until then, it can be queried directly as the Provenance that points to this version using _revinclude\rAll Provenances should have some historical version of this Request as their subject.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ProcedureRequest.relevantHistory",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Provenance"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "ProcedureRequest",
            "path": "ProcedureRequest",
            "min": 0,
            "max": "*"
          },
          {
            "id": "ProcedureRequest.extension:item",
            "path": "ProcedureRequest.extension",
            "sliceName": "Item",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/procedurerequest-geneticsItem"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/shareablecodesystem",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "shareablecodesystem",
      "url": "http://hl7.org/fhir/StructureDefinition/shareablecodesystem",
      "name": "Shareable CodeSystem",
      "status": "draft",
      "experimental": false,
      "date": "2017-04-26T18:33:43-04:00",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "CodeSystem",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CodeSystem",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "CodeSystem",
            "path": "CodeSystem",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "csd-1",
                "severity": "error",
                "human": "Within a code system definition, all the codes SHALL be unique",
                "expression": "(concept.code | descendants().concept.code).isDistinct()",
                "xpath": "count(distinct-values(descendant::f:concept/f:code/@value))=count(descendant::f:concept)",
                "source": "CodeSystem"
              }
            ]
          },
          {
            "id": "CodeSystem.id",
            "path": "CodeSystem.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.meta",
            "path": "CodeSystem.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.implicitRules",
            "path": "CodeSystem.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.language",
            "path": "CodeSystem.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "CodeSystem.text",
            "path": "CodeSystem.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "CodeSystem.contained",
            "path": "CodeSystem.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "CodeSystem.extension",
            "path": "CodeSystem.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.modifierExtension",
            "path": "CodeSystem.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "CodeSystem.url",
            "path": "CodeSystem.url",
            "comment": "Can be a urn:uuid: or a urn:oid:, but real http: addresses are preferred.  Multiple instances may share the same url if they have a distinct version.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.url",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.identifier",
            "path": "CodeSystem.identifier",
            "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this code system outside of FHIR, where it is not possible to use the logical URI.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.version",
            "path": "CodeSystem.version",
            "comment": "There may be different code system instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a refrence to a particular business version of the code system with the format [url]|[version].",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.name",
            "path": "CodeSystem.name",
            "comment": "The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.title",
            "path": "CodeSystem.title",
            "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.title",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.status",
            "path": "CodeSystem.status",
            "comment": "Allows filtering of code systems that are appropriate for use vs. not.  \nThis is labeled as \"Is Modifier\" because applications should not use a retired code system without due consideration.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "PublicationStatus"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The lifecycle status of a Value Set or Concept Map.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/publication-status"
              }
            }
          },
          {
            "id": "CodeSystem.experimental",
            "path": "CodeSystem.experimental",
            "comment": "Allows filtering of code system that are appropriate for use vs. not. This is labeled as \"Is Modifier\" because applications should not use an experimental code system in production.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.experimental",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.date",
            "path": "CodeSystem.date",
            "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the code system. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.date",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.publisher",
            "path": "CodeSystem.publisher",
            "comment": "Usually an organization, but may be an individual. The publisher (or steward) of the code system is the organization or individual primarily responsible for the maintenance and upkeep of the code system. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the code system. This item SHOULD be populated unless the information is available from context.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.publisher",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.contact",
            "path": "CodeSystem.contact",
            "comment": "May be a web site, an email address, a telephone number, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.contact",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "ContactDetail"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.description",
            "path": "CodeSystem.description",
            "comment": "This description can be used to capture details such as why the code system was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the code system as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "CodeSystem.useContext",
            "path": "CodeSystem.useContext",
            "comment": "When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.useContext",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "UsageContext"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.jurisdiction",
            "path": "CodeSystem.jurisdiction",
            "comment": "It may be possible for the code system to be used in jurisdictions other than those for which it was originally designed or intended.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.jurisdiction",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Jurisdiction"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "Countries and regions within which this artifact is targeted for use",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/jurisdiction"
              }
            }
          },
          {
            "id": "CodeSystem.purpose",
            "path": "CodeSystem.purpose",
            "comment": "This element does not describe the usage of the code system Instead  it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this code system.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.purpose",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "CodeSystem.copyright",
            "path": "CodeSystem.copyright",
            "comment": "... Sometimes, the copyright differs between the code system and the codes that are included. The copyright statement should clearly differentiate between these when required.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.copyright",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "CodeSystem.caseSensitive",
            "path": "CodeSystem.caseSensitive",
            "comment": "If this value is missing, then it is not specified whether a code system is case sensitive or not. When the rule is not known, Postel's law should be followed: produce codes with the correct case, and accept codes in any case. This element is primarily provided to support validation software.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.caseSensitive",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.valueSet",
            "path": "CodeSystem.valueSet",
            "comment": "The definition of the value set SHALL include all codes from this code system, and it SHALL be immutable.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.valueSet",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.hierarchyMeaning",
            "path": "CodeSystem.hierarchyMeaning",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.hierarchyMeaning",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "CodeSystemHierarchyMeaning"
                }
              ],
              "strength": "required",
              "description": "The meaning of the hierarchy of concepts in a code system",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning"
              }
            }
          },
          {
            "id": "CodeSystem.compositional",
            "path": "CodeSystem.compositional",
            "comment": "Note that the code system resource does not define what the compositional grammar is, only whether or not there is one.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.compositional",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.versionNeeded",
            "path": "CodeSystem.versionNeeded",
            "comment": "Best practice is that code systems do not redefine concepts, or that if concepts are redefined, a new code system definition is created. But this is not always possible, so some code systems may be defined as 'versionNeeded'.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.versionNeeded",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.content",
            "path": "CodeSystem.content",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.content",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "CodeSystemContentMode"
                }
              ],
              "strength": "required",
              "description": "How much of the content of the code system - the concepts and codes it defines - are represented in a code system resource",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/codesystem-content-mode"
              }
            }
          },
          {
            "id": "CodeSystem.count",
            "path": "CodeSystem.count",
            "comment": "The count of concepts defined in this resource cannot be more than this value, but may be less for several reasons - see the content value.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.count",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "unsignedInt"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.filter",
            "path": "CodeSystem.filter",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.filter",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.filter.id",
            "path": "CodeSystem.filter.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.filter.extension",
            "path": "CodeSystem.filter.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.filter.modifierExtension",
            "path": "CodeSystem.filter.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.filter.code",
            "path": "CodeSystem.filter.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.filter.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.filter.description",
            "path": "CodeSystem.filter.description",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.filter.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.filter.operator",
            "path": "CodeSystem.filter.operator",
            "min": 1,
            "max": "*",
            "base": {
              "path": "CodeSystem.filter.operator",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FilterOperator"
                }
              ],
              "strength": "required",
              "description": "The kind of operation to perform as a part of a property based filter.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/filter-operator"
              }
            }
          },
          {
            "id": "CodeSystem.filter.value",
            "path": "CodeSystem.filter.value",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.filter.value",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.property",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "Property"
              }
            ],
            "path": "CodeSystem.property",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.property",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.property.id",
            "path": "CodeSystem.property.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.property.extension",
            "path": "CodeSystem.property.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.property.modifierExtension",
            "path": "CodeSystem.property.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.property.code",
            "path": "CodeSystem.property.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.property.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.property.uri",
            "path": "CodeSystem.property.uri",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.property.uri",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.property.description",
            "path": "CodeSystem.property.description",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.property.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "CodeSystem.property.type",
            "path": "CodeSystem.property.type",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.property.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "PropertyType"
                }
              ],
              "strength": "required",
              "description": "The type of a property value",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/concept-property-type"
              }
            }
          },
          {
            "id": "CodeSystem.concept",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ConceptDefinition"
              }
            ],
            "path": "CodeSystem.concept",
            "comment": "If this is empty, it means that the code system resource does not represent the content of the code system.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "CodeSystem.concept",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.id",
            "path": "CodeSystem.concept.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.extension",
            "path": "CodeSystem.concept.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.modifierExtension",
            "path": "CodeSystem.concept.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.concept.code",
            "path": "CodeSystem.concept.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.display",
            "path": "CodeSystem.concept.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.definition",
            "path": "CodeSystem.concept.definition",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.definition",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.designation",
            "path": "CodeSystem.concept.designation",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.concept.designation",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.designation.id",
            "path": "CodeSystem.concept.designation.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.designation.extension",
            "path": "CodeSystem.concept.designation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.designation.modifierExtension",
            "path": "CodeSystem.concept.designation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.concept.designation.language",
            "path": "CodeSystem.concept.designation.language",
            "comment": "In the absence of a language, the resource language applies.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.designation.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "CodeSystem.concept.designation.use",
            "path": "CodeSystem.concept.designation.use",
            "comment": "If no use is provided, the designation can be assumed to be suitable for general display to a human user.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.designation.use",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ConceptDesignationUse"
                }
              ],
              "strength": "extensible",
              "description": "Details of how a designation would be used.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/designation-use"
              }
            }
          },
          {
            "id": "CodeSystem.concept.designation.value",
            "path": "CodeSystem.concept.designation.value",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.designation.value",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.property",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ConceptProperty"
              }
            ],
            "path": "CodeSystem.concept.property",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.concept.property",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.property.id",
            "path": "CodeSystem.concept.property.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.property.extension",
            "path": "CodeSystem.concept.property.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.property.modifierExtension",
            "path": "CodeSystem.concept.property.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "CodeSystem.concept.property.code",
            "path": "CodeSystem.concept.property.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.property.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.property.value[x]",
            "path": "CodeSystem.concept.property.value[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "CodeSystem.concept.property.value[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              },
              {
                "code": "Coding"
              },
              {
                "code": "string"
              },
              {
                "code": "integer"
              },
              {
                "code": "boolean"
              },
              {
                "code": "dateTime"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.concept",
            "path": "CodeSystem.concept.concept",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeSystem.concept.concept",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#CodeSystem.concept"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "CodeSystem",
            "path": "CodeSystem",
            "min": 1,
            "max": "1"
          },
          {
            "id": "CodeSystem.url",
            "path": "CodeSystem.url",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ]
          },
          {
            "id": "CodeSystem.version",
            "path": "CodeSystem.version",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.name",
            "path": "CodeSystem.name",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.status",
            "path": "CodeSystem.status",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "CodeSystem.experimental",
            "path": "CodeSystem.experimental",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "boolean"
              }
            ]
          },
          {
            "id": "CodeSystem.publisher",
            "path": "CodeSystem.publisher",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.description",
            "path": "CodeSystem.description",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "CodeSystem.caseSensitive",
            "path": "CodeSystem.caseSensitive",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "boolean"
              }
            ]
          },
          {
            "id": "CodeSystem.concept",
            "path": "CodeSystem.concept",
            "min": 1,
            "max": "*"
          },
          {
            "id": "CodeSystem.concept.code",
            "path": "CodeSystem.concept.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.display",
            "path": "CodeSystem.concept.display",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.definition",
            "path": "CodeSystem.concept.definition",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "CodeSystem.concept.concept",
            "path": "CodeSystem.concept.concept",
            "min": 0,
            "max": "*",
            "contentReference": "#CodeSystem.concept"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/devicemetricobservation",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "devicemetricobservation",
      "url": "http://hl7.org/fhir/StructureDefinition/devicemetricobservation",
      "name": "Device Metric Observation Profile",
      "status": "draft",
      "experimental": false,
      "date": "2014-11-17",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.effectiveDateTime",
            "path": "Observation.effectiveDateTime",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "mustSupport": false,
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.value[x]",
            "path": "Observation.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": false,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": false,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))",
                "source": "Observation.referenceRange"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.status",
            "path": "Observation.status",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "min": 0,
            "max": "0",
            "mustSupport": false
          },
          {
            "id": "Observation.effectiveDateTime",
            "path": "Observation.effectiveDateTime",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "instant"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.value[x]",
            "path": "Observation.value[x]",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ],
            "mustSupport": false
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "min": 0,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 0,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ],
            "mustSupport": true
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/observation-genetics",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "observation-genetics",
      "url": "http://hl7.org/fhir/StructureDefinition/observation-genetics",
      "name": "Observation-genetics",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-14",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "slicing": {
              "id": "3",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:dnasequencevariantname",
            "path": "Observation.extension",
            "sliceName": "DNASequenceVariantName",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNASequenceVariantName"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:dnavariantid",
            "path": "Observation.extension",
            "sliceName": "DNAVariantId",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNAVariantId"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:dnasequencevarianttype",
            "path": "Observation.extension",
            "sliceName": "DNASequenceVariantType",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNASequenceVariantType"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:aminoacidchangename",
            "path": "Observation.extension",
            "sliceName": "AminoAcidChangeName",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:aminoacidchangetype",
            "path": "Observation.extension",
            "sliceName": "AminoAcidChangeType",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeType"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:genesymbol",
            "path": "Observation.extension",
            "sliceName": "GeneSymbol",
            "comment": "Other systems or genes not defined in HGNC (e.g., BCR-ABL fusion gene) can be added by using a local extension.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:dnaregionname",
            "path": "Observation.extension",
            "sliceName": "DNARegionName",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:allelename",
            "path": "Observation.extension",
            "sliceName": "AlleleName",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAlleleName"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:allelicstate",
            "path": "Observation.extension",
            "sliceName": "AllelicState",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAllelicState"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:allelicfrequency",
            "path": "Observation.extension",
            "sliceName": "AllelicFrequency",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAllelicFrequency"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:copynumberevent",
            "path": "Observation.extension",
            "sliceName": "CopyNumberEvent",
            "comment": "Loss of heterozygosity (LOH) is a functional variant whereby the sequence alteration causes a loss of function of one allele of a gene ([SO:0001786](http://www.sequenceontology.org/browser/current_svn/term/SO:0001786)).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:genomicsourceclass",
            "path": "Observation.extension",
            "sliceName": "GenomicSourceClass",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:phaseset",
            "path": "Observation.extension",
            "sliceName": "PhaseSet",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:sequence",
            "path": "Observation.extension",
            "sliceName": "Sequence",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsSequence"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.extension:interpretation",
            "path": "Observation.extension",
            "sliceName": "Interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.value[x]",
            "path": "Observation.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "boolean"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Sequence"
              }
            ]
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.extension:dnasequencevariantname",
            "path": "Observation.extension",
            "sliceName": "DNASequenceVariantName",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNASequenceVariantName"
              }
            ]
          },
          {
            "id": "Observation.extension:dnavariantid",
            "path": "Observation.extension",
            "sliceName": "DNAVariantId",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNAVariantId"
              }
            ]
          },
          {
            "id": "Observation.extension:dnasequencevarianttype",
            "path": "Observation.extension",
            "sliceName": "DNASequenceVariantType",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNASequenceVariantType"
              }
            ]
          },
          {
            "id": "Observation.extension:aminoacidchangename",
            "path": "Observation.extension",
            "sliceName": "AminoAcidChangeName",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeName"
              }
            ]
          },
          {
            "id": "Observation.extension:aminoacidchangetype",
            "path": "Observation.extension",
            "sliceName": "AminoAcidChangeType",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAminoAcidChangeType"
              }
            ]
          },
          {
            "id": "Observation.extension:genesymbol",
            "path": "Observation.extension",
            "sliceName": "GeneSymbol",
            "comment": "Other systems or genes not defined in HGNC (e.g., BCR-ABL fusion gene) can be added by using a local extension.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGene"
              }
            ]
          },
          {
            "id": "Observation.extension:dnaregionname",
            "path": "Observation.extension",
            "sliceName": "DNARegionName",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName"
              }
            ]
          },
          {
            "id": "Observation.extension:allelename",
            "path": "Observation.extension",
            "sliceName": "AlleleName",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAlleleName"
              }
            ]
          },
          {
            "id": "Observation.extension:allelicstate",
            "path": "Observation.extension",
            "sliceName": "AllelicState",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAllelicState"
              }
            ]
          },
          {
            "id": "Observation.extension:allelicfrequency",
            "path": "Observation.extension",
            "sliceName": "AllelicFrequency",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsAllelicFrequency"
              }
            ]
          },
          {
            "id": "Observation.extension:copynumberevent",
            "path": "Observation.extension",
            "sliceName": "CopyNumberEvent",
            "comment": "Loss of heterozygosity (LOH) is a functional variant whereby the sequence alteration causes a loss of function of one allele of a gene ([SO:0001786](http://www.sequenceontology.org/browser/current_svn/term/SO:0001786)).",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsCopyNumberEvent"
              }
            ]
          },
          {
            "id": "Observation.extension:genomicsourceclass",
            "path": "Observation.extension",
            "sliceName": "GenomicSourceClass",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass"
              }
            ]
          },
          {
            "id": "Observation.extension:phaseset",
            "path": "Observation.extension",
            "sliceName": "PhaseSet",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsPhaseSet"
              }
            ]
          },
          {
            "id": "Observation.extension:sequence",
            "path": "Observation.extension",
            "sliceName": "Sequence",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsSequence"
              }
            ]
          },
          {
            "id": "Observation.extension:interpretation",
            "path": "Observation.extension",
            "sliceName": "Interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/observation-geneticsInterpretation"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "vitalsigns",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "### Complete Summary of the Mandatory Requirements\n\n1.  One status in `Observation.status`which has a [required](http://build.fhir.org/terminologies.html#extensible) binding to:\n    -    [ObservationStatus] value set.\n1.  A category in `Observation.category` which must have:\n    -   a fixed `Observation.category.coding.system`=\"http://hl7.org/fhir/observation-category\"\n    -   a fixed `Observation.category.coding.code`= \"vital-signs\"\n\n1.  A code in `Observation.code`\n    -   a fixed `Observation.code.coding.system`= \"http://loinc.org\"\n    -   a LOINC code in `Observation.code.coding.code` which has an [extensible](http://build.fhir.org/terminologies.html#extensible) binding to:\n         -   [Vital Signs] value set.\n                \n1.  One patient in `Observation.subject`\n1.  A date and time in `effectiveDateTime` or `effectivePeriod`\n1.  Either one `Observation.valueQuantity` or, if there is no value, one code in `Observation.DataAbsentReason`\n    -   Each Observation.valueQuantity must have:\n        -   One numeric value in `Observation.valueQuantity.value`\n        -   a fixed `Observation.valueQuantity.system`=\"http://unitsofmeasure\"\n        -   a UCUM unit code in `Observation.valueQuantity.code` which has an [required] binding to:\n             -   [Vital Signs Units] value set.\n    -   Observation.DataAbsentReason is bound to [Observation Value\n        Absent Reason] value set.\n\n1.  When using a panel code to group component observations (Note: See\n    the comments regarding blood pressure in the table above), one or\n    more `Observation.component.code` each of which must have:\n    -   a fixed\n        `Observation.component.code.coding.system` =\"<http://loinc.org>\"\n         -   a LOINC code in `Observation.code.coding.code` which has an [extensible] binding to:\n             -   [Vital Signs Units] value set.\n\n1.  Either one `Observation.component.valueQuantity` or, if there is\n    no value, one code in `Observation.component.DataAbsentReason`\n    -   Each Observation.component.valueQuantity must have:\n        -   One numeric value in\n            `Observation.component.valueQuantity.value`\n        -   a fixed `Observation.component.valueQuantity.system`= \"<http://unitsofmeasure.org>\"\n        -   a UCUM unit code in\n            `Observation.component.valueQuantity.code` which has an [required] binding to:\n             -   [Vital Signs Units] value set.\n    -   Observation.component.DataAbsentReason is bound to [Observation\n        Value Absent Reason] value set.\n\n1.  When using a panel code to group observations, one or more reference\n    to Vitals Signs Observations in `Observation.related.target`\n    -   a fixed `Observation.related.type`= \"has-member\"\n\n [Vital Signs]: valueset-observation-vitalsignresult.html\n  [Vital Signs Units]: valueset-ucum-vitals-common.html\n  [extensible]: terminologies.html#extensible\n  [ObservationStatus]: valueset-observation-status.html\n [Observation Value Absent Reason]: valueset-observation-valueabsentreason.html\n[required]: terminologies.html#required"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*",
            "constraint": [
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ]
          },
          {
            "id": "Observation.status",
            "path": "Observation.status",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "min": 1,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "vs-4"
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "condition": [
              "vs-1"
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "vs-2"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.unit",
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "vs-2"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "mustSupport": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "constraint": [
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "vs-3"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "mustSupport": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "vs-3"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bodyweight",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bodyweight",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'29463-7'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  `Observation.valueQuantity.code` = **'kg', 'g', or '[lb_av]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bodyweight",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyWeightCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyweightcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyweightcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "29463-7",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyWeightUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Weight",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodyweight"
              }
            }
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bodyweightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyWeightCode"
          },
          {
            "id": "Observation.code.coding:bodyweightcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bodyweightcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "29463-7"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyWeightUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Weight",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodyweight"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/resprate",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "resprate",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'9279-1'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'/min'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/resprate",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode",
            "path": "Observation.code.coding",
            "sliceName": "RespRateCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:respratecode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:respratecode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "9279-1",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:respratecode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "/min",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:respratecode",
            "path": "Observation.code.coding",
            "sliceName": "RespRateCode"
          },
          {
            "id": "Observation.code.coding:respratecode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:respratecode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "9279-1"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "/min"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/heartrate",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "heartrate",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'8867-4'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'/min'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/heartrate",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode",
            "path": "Observation.code.coding",
            "sliceName": "HeartRateCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:heartratecode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:heartratecode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8867-4",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:heartratecode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "/min",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:heartratecode",
            "path": "Observation.code.coding",
            "sliceName": "HeartRateCode"
          },
          {
            "id": "Observation.code.coding:heartratecode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:heartratecode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8867-4"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "/min"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bodytemp",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bodytemp",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'8310-5'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'Cel', or '[degF]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bodytemp",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyTempCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodytempcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodytempcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8310-5",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodytempcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyTempUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Temperature",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodytemp"
              }
            }
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bodytempcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyTempCode"
          },
          {
            "id": "Observation.code.coding:bodytempcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bodytempcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8310-5"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyTempUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Temperature",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodytemp"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bodyheight",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bodyheight",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'8302-2'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'cm', or '[in_i]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bodyheight",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyHeightCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyheightcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyheightcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8302-2",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyheightcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bodyheightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyHeightCode"
          },
          {
            "id": "Observation.code.coding:bodyheightcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bodyheightcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8302-2"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bodylength",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bodylength",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'8306-3'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'cm', or '[in_i]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bodylength",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyLengthCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodylengthcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodylengthcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8306-3",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodylengthcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bodylengthcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyLengthCode"
          },
          {
            "id": "Observation.code.coding:bodylengthcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bodylengthcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8306-3"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/headcircum",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "headcircum",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'8287-5'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'cm', or '[in_i]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/headcircum",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode",
            "path": "Observation.code.coding",
            "sliceName": "HeadCircumCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:headcircumcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:headcircumcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8287-5",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:headcircumcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:headcircumcode",
            "path": "Observation.code.coding",
            "sliceName": "HeadCircumCode"
          },
          {
            "id": "Observation.code.coding:headcircumcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:headcircumcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8287-5"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodyLengthUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for Body Length measures such as Body Height and Head Circumference",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-bodylength"
              }
            }
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/oxygensat",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "oxygensat",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "\"####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'59408-5'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'%'**\r\""
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/oxygensat",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode",
            "path": "Observation.code.coding",
            "sliceName": "OxygenSatCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:oxygensatcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:oxygensatcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "59408-5",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:oxygensatcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "%",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:oxygensatcode",
            "path": "Observation.code.coding",
            "sliceName": "OxygenSatCode"
          },
          {
            "id": "Observation.code.coding:oxygensatcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:oxygensatcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "59408-5"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "%"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bmi",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bmi",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **'39156-5'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  a fixed`Observation.valueQuantity.code` = **'kg/m2'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bmi",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode",
            "path": "Observation.code.coding",
            "sliceName": "BMICode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bmicode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bmicode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "39156-5",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bmicode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "kg/m2",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bmicode",
            "path": "Observation.code.coding",
            "sliceName": "BMICode"
          },
          {
            "id": "Observation.code.coding:bmicode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bmicode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "39156-5"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity"
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "kg/m2"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/bp",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "bp",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\r\r1.  One code in `Observation.code` which must have\r    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\r    -   a fixed  `Observation.code.coding.code`= **85354-9'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r2.  One  `Observation.component.code`  which must have\r    -   a fixed `Observation.component.code.coding.system`=**'http://loinc.org'**\r    -   fixed  `Observation.component.code.coding.code`= **'8480-6'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r3.   One  `Observation.component.code`  which must have\r    -   a fixed `Observation.component.code.coding.system`=**'http://loinc.org'**\r    -   fixed  `Observation.component.code.coding.code`= **'8462-4'**\r    -   Other additional codes are allowed - e.g. more specific LOINC\r        Codes, SNOMED CT concepts, system specific codes. All codes\r        SHALL have an system value\r4.  fixed`Observation.component.valueQuantity.code` = **'mm[Hg]'**"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/bp",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode",
            "path": "Observation.code.coding",
            "sliceName": "BPCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bpcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bpcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "85354-9",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bpcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code.coding.code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation.component"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp",
            "path": "Observation.component",
            "sliceName": "SystolicBP",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation.component"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code",
            "path": "Observation.component.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component:systolicbp.code.id",
            "path": "Observation.component.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.code.extension",
            "path": "Observation.component.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.code.coding",
            "path": "Observation.component.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode",
            "path": "Observation.component.code.coding",
            "sliceName": "SBPCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.id",
            "path": "Observation.component.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.extension",
            "path": "Observation.component.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.system",
            "path": "Observation.component.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.version",
            "path": "Observation.component.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.code",
            "path": "Observation.component.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8480-6",
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.userSelected",
            "path": "Observation.component.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mm[Hg]",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:systolicbp.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component:systolicbp.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component:systolicbp.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          },
          {
            "id": "Observation.component:diastolicbp",
            "path": "Observation.component",
            "sliceName": "DiastolicBP",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation.component"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code",
            "path": "Observation.component.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component:diastolicbp.code.id",
            "path": "Observation.component.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.code.extension",
            "path": "Observation.component.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.code.coding",
            "path": "Observation.component.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode",
            "path": "Observation.component.code.coding",
            "sliceName": "DBPCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.id",
            "path": "Observation.component.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.extension",
            "path": "Observation.component.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.system",
            "path": "Observation.component.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.version",
            "path": "Observation.component.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.code",
            "path": "Observation.component.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8462-4",
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.userSelected",
            "path": "Observation.component.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mm[Hg]",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component:diastolicbp.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component:diastolicbp.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component:diastolicbp.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bpcode",
            "path": "Observation.code.coding",
            "sliceName": "BPCode"
          },
          {
            "id": "Observation.code.coding:bpcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bpcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "85354-9"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code.coding.code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.component:systolicbp",
            "path": "Observation.component",
            "sliceName": "SystolicBP"
          },
          {
            "id": "Observation.component:systolicbp.code",
            "path": "Observation.component.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.component:systolicbp.code.coding",
            "path": "Observation.component.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode",
            "path": "Observation.component.code.coding",
            "sliceName": "SBPCode"
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.system",
            "path": "Observation.component.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.component:systolicbp.code.coding:sbpcode.code",
            "path": "Observation.component.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8480-6"
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "type": [
              {
                "code": "Quantity"
              }
            ]
          },
          {
            "id": "Observation.component:systolicbp.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mm[Hg]"
          },
          {
            "id": "Observation.component:diastolicbp",
            "path": "Observation.component",
            "sliceName": "DiastolicBP"
          },
          {
            "id": "Observation.component:diastolicbp.code",
            "path": "Observation.component.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.component:diastolicbp.code.coding",
            "path": "Observation.component.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode",
            "path": "Observation.component.code.coding",
            "sliceName": "DBPCode"
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.system",
            "path": "Observation.component.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.component:diastolicbp.code.coding:dbpcode.code",
            "path": "Observation.component.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "8462-4"
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "type": [
              {
                "code": "Quantity"
              }
            ]
          },
          {
            "id": "Observation.component:diastolicbp.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mm[Hg]"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/vitalspanel",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "vitalspanel",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "####Complete Summary of the Mandatory Requirements\n\n1.  One code in `Observation.code` which must have\n    -   a fixed `Observation.code.coding.system`=**'http ://loinc.org'**\n    -   a fixed  `Observation.code.coding.code`= **'85353-1'**\n    -   Other additional codes are allowed - e.g. more specific LOINC\n        Codes, SNOMED CT concepts, system specific codes. All codes\n        SHALL have an system value\n1.  No value in `Observation.value[x]`\n1.  At Least one Vitals Sign Observation reference in `Observation.related`"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/vitalspanel",
      "name": "Vital Signs Profile",
      "title": "VitalSigns",
      "status": "draft",
      "experimental": false,
      "date": "2016-03-25",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/vitalsigns",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              },
              {
                "key": "vs-2",
                "severity": "error",
                "human": "If there is no component or related element then either a value[x] or a data absent reason must be present",
                "expression": "(component.empty() and related.empty()) implies (dataAbsentReason or value)",
                "xpath": "exists(f:component) or exists(f:related) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Status"
                }
              ],
              "strength": "required",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "constraint": [
              {
                "key": "vs-4",
                "severity": "error",
                "human": "Must have a category of 'vital-signs' and a code system 'http://hl7.org/fhir/observation-category'",
                "expression": "where(coding.system='http://hl7.org/fhir/observation-category' and coding.code='vital-signs').exists()",
                "xpath": "exists(f:coding/code[@value='vital-signs']) and exists(f:coding/system[@value='http://hl7.org/fhir/observation-category'])"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.code.id",
            "path": "Observation.code.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.extension",
            "path": "Observation.code.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyWeightCode",
            "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "CodeableConcept.coding",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.id",
            "path": "Observation.code.coding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyweightcode.extension",
            "path": "Observation.code.coding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.code.coding:bodyweightcode.system",
            "path": "Observation.code.coding.system",
            "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.version",
            "path": "Observation.code.coding.version",
            "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.code",
            "path": "Observation.code.coding.code",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "85353-1",
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.display",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.coding.display",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.display",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.coding:bodyweightcode.userSelected",
            "path": "Observation.code.coding.userSelected",
            "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Coding.userSelected",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.code.text",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.code.text",
            "comment": "Very often the text is the same as a displayName of one of the codings.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "CodeableConcept.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "constraint": [
              {
                "key": "vs-1",
                "severity": "error",
                "human": "Datetime must be at least to day.",
                "expression": "($this as dateTime).toString().length() >= 8",
                "xpath": "f:matches(effectiveDateTime,/\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z)/)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "has-member",
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/vitalsigns"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "vs-3",
                "severity": "error",
                "human": "If there is no a value a data absent reason must be present",
                "expression": "value.exists() or dataAbsentReason.exists()",
                "xpath": "exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:dataAbsentReason)"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSigns"
                }
              ],
              "strength": "extensible",
              "description": "This identifies the vital sign result type.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity",
            "path": "Observation.component.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "VitalSignsUnits"
                }
              ],
              "strength": "required",
              "description": "Common UCUM units for recording Vital Signs",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-vitals-common"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.id",
            "path": "Observation.component.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.extension",
            "path": "Observation.component.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.valueQuantity.value",
            "path": "Observation.component.valueQuantity.value",
            "comment": "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).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.comparator",
            "path": "Observation.component.valueQuantity.comparator",
            "comment": "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.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.component.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.component.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.system",
            "path": "Observation.component.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.valueQuantity.code",
            "path": "Observation.component.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DAR"
                }
              ],
              "strength": "extensible",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "comment": "additional codes that translate or map to this code are allowed.  For example a more granular LOINC code or code that is used locally in a system."
          },
          {
            "id": "Observation.code.coding",
            "path": "Observation.code.coding",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "code"
                }
              ],
              "ordered": false,
              "rules": "open"
            }
          },
          {
            "id": "Observation.code.coding:bodyweightcode",
            "path": "Observation.code.coding",
            "sliceName": "BodyWeightCode"
          },
          {
            "id": "Observation.code.coding:bodyweightcode.system",
            "path": "Observation.code.coding.system",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://loinc.org"
          },
          {
            "id": "Observation.code.coding:bodyweightcode.code",
            "path": "Observation.code.coding.code",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "85353-1"
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 1,
            "max": "*"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/lipidprofile",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "lipidprofile",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-summary",
          "valueMarkdown": "This is a test summary [lipids](observation.html)"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "oo"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/lipidprofile",
      "name": "Example Lipid Profile",
      "status": "draft",
      "experimental": true,
      "date": "2012-05-12",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "DiagnosticReport",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "comment": "In this profile, mustSupport means that authoring systems must include the ability to report these elements, and processing systems must cater for them by either displaying them to the user or considering them appropriately in decision support systems.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.id",
            "path": "DiagnosticReport.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.meta",
            "path": "DiagnosticReport.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.implicitRules",
            "path": "DiagnosticReport.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.language",
            "path": "DiagnosticReport.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "DiagnosticReport.text",
            "path": "DiagnosticReport.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "DiagnosticReport.contained",
            "path": "DiagnosticReport.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension",
            "path": "DiagnosticReport.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.modifierExtension",
            "path": "DiagnosticReport.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "DiagnosticReport.identifier",
            "path": "DiagnosticReport.identifier",
            "comment": "Usually assigned by the Information System of the diagnostic service provider (filler id).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.basedOn",
            "path": "DiagnosticReport.basedOn",
            "comment": "Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single test result resource. Note that there are also cases where one request leads to multiple reports.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.status",
            "path": "DiagnosticReport.status",
            "comment": "This is labeled as \"Is Modifier\" because applications need to take appropriate action if a report is withdrawn.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportStatus"
                }
              ],
              "strength": "required",
              "description": "The status of the diagnostic report as a whole.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-report-status"
              }
            }
          },
          {
            "id": "DiagnosticReport.category",
            "path": "DiagnosticReport.category",
            "comment": "The level of granularity is defined by the category concepts in the value set. More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in DiagnosticReport.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.category",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticServiceSection"
                }
              ],
              "strength": "example",
              "description": "Codes for diagnostic service sections.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-service-sections"
              }
            }
          },
          {
            "id": "DiagnosticReport.code",
            "path": "DiagnosticReport.code",
            "comment": "LOINC code includes \"direct\" LDL - does this mean LDL derived by measuring VLDL by ultracentrifugation? This panel includes both measured and calculated LDL.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "57698-3",
                  "display": "Lipid panel with direct LDL - Serum or Plasma"
                }
              ]
            },
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportCodes"
                }
              ],
              "strength": "preferred",
              "description": "Codes that describe Diagnostic Reports.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/report-codes"
              }
            }
          },
          {
            "id": "DiagnosticReport.subject",
            "path": "DiagnosticReport.subject",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.context",
            "path": "DiagnosticReport.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.effective[x]",
            "path": "DiagnosticReport.effective[x]",
            "comment": "If the diagnostic procedure was performed on the patient, this is the time it was performed. If there are specimens, the diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship between the specimens and the diagnostically relevant time is not always automatic.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.issued",
            "path": "DiagnosticReport.issued",
            "comment": "May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer",
            "path": "DiagnosticReport.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.id",
            "path": "DiagnosticReport.performer.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.extension",
            "path": "DiagnosticReport.performer.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.modifierExtension",
            "path": "DiagnosticReport.performer.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.role",
            "path": "DiagnosticReport.performer.role",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.role",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Role"
                }
              ],
              "strength": "example",
              "description": "Indicate a role of diagnostic report performer",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/performer-role"
              }
            }
          },
          {
            "id": "DiagnosticReport.performer.actor",
            "path": "DiagnosticReport.performer.actor",
            "comment": "This is not necessarily the source of the atomic data items. It is the entity that takes responsibility for the clinical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.actor",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.specimen",
            "path": "DiagnosticReport.specimen",
            "comment": "If the specimen is sufficiently specified with a code in the test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per observation or group.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.specimen",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "DiagnosticReport.result",
            "path": "DiagnosticReport.result",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "reference.code"
                }
              ],
              "ordered": true,
              "rules": "closed"
            },
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ]
          },
          {
            "id": "DiagnosticReport.result:cholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "Cholesterol",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/cholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:triglyceride",
            "path": "DiagnosticReport.result",
            "sliceName": "Triglyceride",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/triglyceride"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:hdlcholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "HDLCholesterol",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/hdlcholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:ldlcholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "LDLCholesterol",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ldlcholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.imagingStudy",
            "path": "DiagnosticReport.imagingStudy",
            "comment": "ImagingStudy and ImageManifest and the image element are somewhat overlapping - typically, the list of image references in the image element will also be found in one of the imaging study resources. However each caters to different types of displays for different types of purposes. Neither, either, or both may be provided.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.imagingStudy",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingStudy"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingManifest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image",
            "path": "DiagnosticReport.image",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.image",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.id",
            "path": "DiagnosticReport.image.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.extension",
            "path": "DiagnosticReport.image.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.modifierExtension",
            "path": "DiagnosticReport.image.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.comment",
            "path": "DiagnosticReport.image.comment",
            "comment": "The comment should be displayed with the image. It would be common for the report to include additional discussion of the image contents in other sections such as the conclusion.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.link",
            "path": "DiagnosticReport.image.link",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.link",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Media"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.conclusion",
            "path": "DiagnosticReport.conclusion",
            "comment": "It's not unusual for the lab to make some kind of interpretative comment on the set of results.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.conclusion",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.codedDiagnosis",
            "path": "DiagnosticReport.codedDiagnosis",
            "comment": "Not used in this context.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "DiagnosticReport.codedDiagnosis",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AdjunctDiagnosis"
                }
              ],
              "strength": "example",
              "description": "Diagnosis codes provided as adjuncts to the report.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/clinical-findings"
              }
            }
          },
          {
            "id": "DiagnosticReport.presentedForm",
            "path": "DiagnosticReport.presentedForm",
            "comment": "\"application/pdf\" is recommended as the most reliable and interoperable in this context.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.presentedForm",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Attachment"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "comment": "In this profile, mustSupport means that authoring systems must include the ability to report these elements, and processing systems must cater for them by either displaying them to the user or considering them appropriately in decision support systems.",
            "min": 1,
            "max": "1"
          },
          {
            "id": "DiagnosticReport.code",
            "path": "DiagnosticReport.code",
            "comment": "LOINC code includes \"direct\" LDL - does this mean LDL derived by measuring VLDL by ultracentrifugation? This panel includes both measured and calculated LDL.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "57698-3",
                  "display": "Lipid panel with direct LDL - Serum or Plasma"
                }
              ]
            }
          },
          {
            "id": "DiagnosticReport.result",
            "path": "DiagnosticReport.result",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "reference.code"
                }
              ],
              "ordered": true,
              "rules": "closed"
            },
            "max": "1"
          },
          {
            "id": "DiagnosticReport.result:cholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "Cholesterol",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/cholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:triglyceride",
            "path": "DiagnosticReport.result",
            "sliceName": "Triglyceride",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/triglyceride"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:hdlcholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "HDLCholesterol",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/hdlcholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.result:ldlcholesterol",
            "path": "DiagnosticReport.result",
            "sliceName": "LDLCholesterol",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ldlcholesterol"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.conclusion",
            "path": "DiagnosticReport.conclusion",
            "comment": "It's not unusual for the lab to make some kind of interpretative comment on the set of results.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "DiagnosticReport.codedDiagnosis",
            "path": "DiagnosticReport.codedDiagnosis",
            "comment": "Not used in this context.",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/cholesterol",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "cholesterol",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "oo"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/cholesterol",
      "name": "Example Lipid Profile",
      "status": "draft",
      "experimental": true,
      "date": "2012-05-12",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "35200-5",
                  "display": "Cholesterol"
                }
              ]
            },
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.id",
            "path": "Observation.valueQuantity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.extension",
            "path": "Observation.valueQuantity.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "comment": "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).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Quantity.value",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "No need for this on cholesterol.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Quantity.comparator",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "meaningWhenMissing": "If there is no comparator, then there is no modification of the value",
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuantityComparator"
                }
              ],
              "strength": "required",
              "description": "How the Quantity should be understood and represented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/quantity-comparator"
              }
            }
          },
          {
            "id": "Observation.valueQuantity.unit",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.unit",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "fixedString": "mmol/L",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.system",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "condition": [
              "qty-3"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Quantity.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mmol/L",
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))",
                "source": "Observation.referenceRange"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 4.5
            },
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system.exists()",
                "xpath": "not(exists(f:code)) or exists(f:system)",
                "source": "Quantity"
              },
              {
                "key": "sqty-1",
                "severity": "error",
                "human": "The comparator is not used on a SimpleQuantity",
                "expression": "comparator.empty()",
                "xpath": "not(exists(f:comparator))",
                "source": "Quantity:simplequantity"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Sequence"
              }
            ]
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 1,
            "max": "1"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "35200-5",
                  "display": "Cholesterol"
                }
              ]
            },
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.value",
            "path": "Observation.valueQuantity.value",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "decimal"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.comparator",
            "path": "Observation.valueQuantity.comparator",
            "comment": "No need for this on cholesterol.",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "code"
              }
            ]
          },
          {
            "id": "Observation.valueQuantity.unit",
            "path": "Observation.valueQuantity.unit",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "fixedString": "mmol/L",
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.system",
            "path": "Observation.valueQuantity.system",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://unitsofmeasure.org",
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity.code",
            "path": "Observation.valueQuantity.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "fixedCode": "mmol/L",
            "mustSupport": true
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "min": 1,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 4.5
            }
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 0,
            "max": "0"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/triglyceride",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "triglyceride",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "oo"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/triglyceride",
      "name": "Example Lipid Profile",
      "status": "draft",
      "experimental": true,
      "date": "2012-05-12",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "patternCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "35217-9"
                }
              ]
            },
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))",
                "source": "Observation.referenceRange"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Sequence"
              }
            ]
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 1,
            "max": "1"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "patternCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "35217-9"
                }
              ]
            },
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "min": 1,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1"
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 0,
            "max": "0"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/hdlcholesterol",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "hdlcholesterol",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "oo"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/hdlcholesterol",
      "name": "Example Lipid Profile",
      "status": "draft",
      "experimental": true,
      "date": "2012-05-12",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "2085-9",
                  "display": "HDL Cholesterol"
                }
              ]
            },
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))",
                "source": "Observation.referenceRange"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "comment": "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.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 1.5
            },
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system.exists()",
                "xpath": "not(exists(f:code)) or exists(f:system)",
                "source": "Quantity"
              },
              {
                "key": "sqty-1",
                "severity": "error",
                "human": "The comparator is not used on a SimpleQuantity",
                "expression": "comparator.empty()",
                "xpath": "not(exists(f:comparator))",
                "source": "Quantity:simplequantity"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Sequence"
              }
            ]
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 1,
            "max": "1"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "fixedCodeableConcept": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "2085-9",
                  "display": "HDL Cholesterol"
                }
              ]
            },
            "mustSupport": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "min": 1,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 1.5
            }
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 0,
            "max": "0"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/ldlcholesterol",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "ldlcholesterol",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "oo"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/ldlcholesterol",
      "name": "Example Lipid Profile",
      "status": "draft",
      "experimental": true,
      "date": "2012-05-12",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Observation",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "comment": "Used for simple observations such as device measurements, laboratory atomic results, vital signs, height, weight, smoking status, comments, etc.  Other resources are used to provide context for observations such as lab reports, etc.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "obs-7",
                "severity": "error",
                "human": "If code is the same as a component code then the value element associated with the code SHALL NOT be present",
                "expression": "value.empty() or code!=component.code",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'value')])) or not(count(for $coding in f:code/f:coding return parent::*/f:component/f:code/f:coding[f:code/@value=$coding/f:code/@value and f:system/@value=$coding/f:system/@value])=0)",
                "source": "Observation"
              },
              {
                "key": "obs-6",
                "severity": "error",
                "human": "dataAbsentReason SHALL only be present if Observation.value[x] is not present",
                "expression": "dataAbsentReason.empty() or value.empty()",
                "xpath": "not(exists(f:dataAbsentReason)) or (not(exists(*[starts-with(local-name(.), 'value')])))",
                "source": "Observation"
              }
            ]
          },
          {
            "id": "Observation.id",
            "path": "Observation.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.meta",
            "path": "Observation.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.implicitRules",
            "path": "Observation.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.language",
            "path": "Observation.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Observation.text",
            "path": "Observation.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Observation.contained",
            "path": "Observation.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Observation.extension",
            "path": "Observation.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.modifierExtension",
            "path": "Observation.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Observation.identifier",
            "path": "Observation.identifier",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.basedOn",
            "path": "Observation.basedOn",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.status",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
                "valueString": "default: final"
              }
            ],
            "path": "Observation.status",
            "comment": "This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationStatus"
                }
              ],
              "strength": "required",
              "description": "Codes providing the status of an observation.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-status"
              }
            }
          },
          {
            "id": "Observation.category",
            "path": "Observation.category",
            "comment": "In addition to the required category valueset, this element allows various categorization schemes based on the owner’s definition of the category and effectively multiple categories can be used at once.  The level of granularity is defined by the category concepts in the value set.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.category",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCategory"
                }
              ],
              "strength": "preferred",
              "description": "Codes for high level observation categories.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-category"
              }
            }
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "LDLCodes"
                }
              ],
              "strength": "required",
              "description": "LDL Cholesterol codes - measured or calculated",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ldlcholesterol-codes"
              }
            }
          },
          {
            "id": "Observation.subject",
            "path": "Observation.subject",
            "comment": "One would expect this element to be a cardinality  of 1..1.  The only circumstance in which the subject can be missing is when the observation is made by a device that does not know the patient. In this case, the observation SHALL be matched to a patient through some context/channel matching technique, and at this point, the observation should be updated.\r\rIf the target of the observation is different than the subject, the general extension [observation-focal-subject](extension-observation-focal-subject.html).  may be used.  However, the distinction between the patient's own value for an observation versus that of the fetus, or the donor or blood product unit, etc., are often specified in the observation code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.context",
            "path": "Observation.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ]
          },
          {
            "id": "Observation.effective[x]",
            "path": "Observation.effective[x]",
            "comment": "At least a date should be present unless this observation is a historical report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.issued",
            "path": "Observation.issued",
            "comment": "Updated when the result is updated.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.performer",
            "path": "Observation.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. This element has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueString, valueBoolean, valueRange, valueRatio, valueSampledData, valueAttachment, valueTime, valueDateTime, or valuePeriod. (The name format is \"'value' + the type name\" with a capital on the first letter of the type).\r\r\rIf the data element is usually coded or if the type associated with the Observation.value defines a coded value, use CodeableConcept instead of string datatype even if the value is uncoded text.  A value set is bound to the ValueCodeableConcept element.    For further discussion and examples see the  [notes section](observation.html#notes) below.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "condition": [
              "obs-7"
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Observation.dataAbsentReason",
            "path": "Observation.dataAbsentReason",
            "comment": "Null or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"specimen unsatisfactory\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed. Note that an observation may only be reported if there are values to report. For example differential cell counts values may be reported only when > 0.  Because of these options, use-case agreements are required to interpret general observations for null or exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.bodySite",
            "path": "Observation.bodySite",
            "comment": "Only used if not implicit in code found in Observation.code.  In many systems, this may be represented as a related observation instead of an inline component.   If the use case requires BodySite to be handled as a separate resource (e.g. to identify and track separately) then use the standard extension[ body-site-instance](extension-body-site-instance.html).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.bodySite",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BodySite"
                }
              ],
              "strength": "example",
              "description": "Codes describing anatomical locations. May include laterality.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/body-site"
              }
            }
          },
          {
            "id": "Observation.method",
            "path": "Observation.method",
            "comment": "Only used if not implicit in code for Observation.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.method",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationMethod"
                }
              ],
              "strength": "example",
              "description": "Methods for simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-methods"
              }
            }
          },
          {
            "id": "Observation.specimen",
            "path": "Observation.specimen",
            "comment": "Should only be used if not implicit in code found in `Observation.code`.  Observations are not made on specimens themselves; they are made on a subject, but in many cases by the means of a specimen. Note that although specimens are often involved, they are not always tracked and reported explicitly. Also note that observation resources may be used in contexts that track the specimen explicitly (e.g. Diagnostic Report).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.specimen",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "Observation.device",
            "path": "Observation.device",
            "comment": "An extension should be used if further typing of the device is needed.  Devices used to support obtaining an observation can be represented using either an extension or through the Observation.related element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.device",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/DeviceMetric"
              }
            ]
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "obs-3",
                "severity": "error",
                "human": "Must have at least a low or a high or text",
                "expression": "low.exists() or high.exists() or text.exists()",
                "xpath": "(exists(f:low) or exists(f:high)or exists(f:text))",
                "source": "Observation.referenceRange"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.id",
            "path": "Observation.referenceRange.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.extension",
            "path": "Observation.referenceRange.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.modifierExtension",
            "path": "Observation.referenceRange.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.low",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "condition": [
              "obs-3"
            ]
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.high",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 3.0
            },
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "qty-3",
                "severity": "error",
                "human": "If a code for the unit is present, the system SHALL also be present",
                "expression": "code.empty() or system.exists()",
                "xpath": "not(exists(f:code)) or exists(f:system)",
                "source": "Quantity"
              },
              {
                "key": "sqty-1",
                "severity": "error",
                "human": "The comparator is not used on a SimpleQuantity",
                "expression": "comparator.empty()",
                "xpath": "not(exists(f:comparator))",
                "source": "Quantity:simplequantity"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal range is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeMeaning"
                }
              ],
              "strength": "extensible",
              "description": "Code for the meaning of a reference range.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-meaning"
              }
            }
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "comment": "This SHOULD be populated if there is more than one range.  If this element is not present then the normal population is assumed.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.appliesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRangeType"
                }
              ],
              "strength": "example",
              "description": "Codes identifying the population the reference range applies to.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/referencerange-appliesto"
              }
            }
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.referenceRange.age",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.text",
            "path": "Observation.referenceRange.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.referenceRange.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "comment": "For a discussion on the ways Observations can assembled in groups together see [Notes below](observation.html#4.20.4).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "Observation.related",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.related.id",
            "path": "Observation.related.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.related.extension",
            "path": "Observation.related.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.related.modifierExtension",
            "path": "Observation.related.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.related.type",
            "path": "Observation.related.type",
            "comment": "The \"derived-from\" type is the only logical choice when referencing the QuestionnaireAnswer resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.related.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationRelationshipType"
                }
              ],
              "strength": "required",
              "description": "Codes specifying how two observations are related.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-relationshiptypes"
              }
            }
          },
          {
            "id": "Observation.related.target",
            "path": "Observation.related.target",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.related.target",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Sequence"
              }
            ]
          },
          {
            "id": "Observation.component",
            "path": "Observation.component",
            "comment": "For a discussion on the ways Observations can be assembled in groups together see [Notes](observation.html#notes) below.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.id",
            "path": "Observation.component.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Observation.component.extension",
            "path": "Observation.component.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Observation.component.modifierExtension",
            "path": "Observation.component.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Observation.component.code",
            "path": "Observation.component.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Observation.component.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationCode"
                }
              ],
              "strength": "example",
              "description": "Codes identifying names of simple observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "Observation.component.value[x]",
            "path": "Observation.component.value[x]",
            "comment": "Normally, an observation will have either a single value or a set of related observations. A few observations (e.g. Apgar score) may have both a value and related observations (for an Apgar score, the observations from which the measure is derived). If a value is present, the datatype for this element should be determined by Observation.code. A CodeableConcept with just a text would be used instead of a string if the field was usually coded, or if the type associated with the Observation.code defines a coded value.   For boolean values use valueCodeableConcept and select codes from <http://hl7.org/fhir/ValueSet/v2-0136> (these \"yes/no\" concepts can be mapped to the display name \"true/false\" or other mutually exclusive terms that may be needed\").  The element, Observation.value[x], has a variable name depending on the type as follows: valueQuantity, valueCodeableConcept, valueRatio, valueChoice, valuePeriod, valueSampleData, or valueString (the name format is \"'value' + the type name\" with a capital on the first letter of the type).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Quantity"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "string"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "time"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Observation.component.dataAbsentReason",
            "path": "Observation.component.dataAbsentReason",
            "comment": "\"Null\" or exceptional values can be represented two ways in FHIR Observations.  One way is to simply include them in the value set and represent the exceptions in the value.  For example, measurement values for a serology test could be  \"detected\", \"not detected\", \"inconclusive\", or  \"test not done\".   The alternate way is to use the value element for actual observations and use the explicit dataAbsentReason element to record exceptional values.  For example, the dataAbsentReason code \"error\" could be used when the measurement was not completed.  Because of these options, use-case agreements are required to interpret general observations for exceptional values.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.dataAbsentReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "obs-6"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationValueAbsentReason"
                }
              ],
              "strength": "extensible",
              "description": "Codes specifying why the result (Observation.value[x]) is missing.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-valueabsentreason"
              }
            }
          },
          {
            "id": "Observation.component.interpretation",
            "path": "Observation.component.interpretation",
            "comment": "The component interpretation applies only to the individual component value.  For an overall interpretation all components together use thes Observation.interpretation element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Observation.component.interpretation",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ObservationInterpretation"
                }
              ],
              "strength": "extensible",
              "description": "Codes identifying interpretations of observations.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-interpretation"
              }
            }
          },
          {
            "id": "Observation.component.referenceRange",
            "path": "Observation.component.referenceRange",
            "comment": "Most observations only have one generic reference range. Systems MAY choose to restrict to only supplying the relevant reference range based on knowledge about the patient (e.g., specific to the patient's age, gender, weight and other factors), but this may not be possible or appropriate. Whenever more than one reference range is supplied, the differences between them SHOULD be provided in the reference range and/or age properties.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Observation.component.referenceRange",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Observation.referenceRange"
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Observation",
            "path": "Observation",
            "min": 1,
            "max": "1"
          },
          {
            "id": "Observation.code",
            "path": "Observation.code",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "LDLCodes"
                }
              ],
              "strength": "required",
              "description": "LDL Cholesterol codes - measured or calculated",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ldlcholesterol-codes"
              }
            }
          },
          {
            "id": "Observation.valueQuantity",
            "path": "Observation.valueQuantity",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Quantity"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.interpretation",
            "path": "Observation.interpretation",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.comment",
            "path": "Observation.comment",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange",
            "path": "Observation.referenceRange",
            "min": 1,
            "max": "1",
            "mustSupport": true
          },
          {
            "id": "Observation.referenceRange.low",
            "path": "Observation.referenceRange.low",
            "min": 0,
            "max": "0"
          },
          {
            "id": "Observation.referenceRange.high",
            "path": "Observation.referenceRange.high",
            "comment": "Per Australian NHF Recommendations.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Quantity",
                "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
              }
            ],
            "fixedQuantity": {
              "value": 3.0
            }
          },
          {
            "id": "Observation.referenceRange.type",
            "path": "Observation.referenceRange.type",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.appliesTo",
            "path": "Observation.referenceRange.appliesTo",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          },
          {
            "id": "Observation.referenceRange.age",
            "path": "Observation.referenceRange.age",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "Range"
              }
            ]
          },
          {
            "id": "Observation.related",
            "path": "Observation.related",
            "min": 0,
            "max": "0"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/diagnosticreport-genetics",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "diagnosticreport-genetics",
      "url": "http://hl7.org/fhir/StructureDefinition/diagnosticreport-genetics",
      "name": "DiagnosticReport-Genetics",
      "status": "draft",
      "experimental": false,
      "date": "2015-10-09",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "DiagnosticReport",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "comment": "This is intended to capture a single report, and is not suitable for use in displaying summary information that covers multiple reports.  For example, this resource has not been designed for laboratory cumulative reporting formats nor detailed structured reports for sequencing.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.id",
            "path": "DiagnosticReport.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.meta",
            "path": "DiagnosticReport.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.implicitRules",
            "path": "DiagnosticReport.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.language",
            "path": "DiagnosticReport.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "DiagnosticReport.text",
            "path": "DiagnosticReport.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "DiagnosticReport.contained",
            "path": "DiagnosticReport.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension",
            "path": "DiagnosticReport.extension",
            "slicing": {
              "id": "4",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:assessedcondition",
            "path": "DiagnosticReport.extension",
            "sliceName": "AssessedCondition",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:familymemberhistory",
            "path": "DiagnosticReport.extension",
            "sliceName": "FamilyMemberHistory",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:analysis",
            "path": "DiagnosticReport.extension",
            "sliceName": "Analysis",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.modifierExtension",
            "path": "DiagnosticReport.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "DiagnosticReport.identifier",
            "path": "DiagnosticReport.identifier",
            "comment": "Usually assigned by the Information System of the diagnostic service provider (filler id).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.basedOn",
            "path": "DiagnosticReport.basedOn",
            "comment": "Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single test result resource. Note that there are also cases where one request leads to multiple reports.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.status",
            "path": "DiagnosticReport.status",
            "comment": "This is labeled as \"Is Modifier\" because applications need to take appropriate action if a report is withdrawn.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportStatus"
                }
              ],
              "strength": "required",
              "description": "The status of the diagnostic report as a whole.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-report-status"
              }
            }
          },
          {
            "id": "DiagnosticReport.category",
            "path": "DiagnosticReport.category",
            "comment": "The level of granularity is defined by the category concepts in the value set. More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in DiagnosticReport.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.category",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticServiceSection"
                }
              ],
              "strength": "example",
              "description": "Codes for diagnostic service sections.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-service-sections"
              }
            }
          },
          {
            "id": "DiagnosticReport.code",
            "path": "DiagnosticReport.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportCodes"
                }
              ],
              "strength": "preferred",
              "description": "Codes that describe Diagnostic Reports.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/report-codes"
              }
            }
          },
          {
            "id": "DiagnosticReport.subject",
            "path": "DiagnosticReport.subject",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.context",
            "path": "DiagnosticReport.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.effective[x]",
            "path": "DiagnosticReport.effective[x]",
            "comment": "If the diagnostic procedure was performed on the patient, this is the time it was performed. If there are specimens, the diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship between the specimens and the diagnostically relevant time is not always automatic.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.issued",
            "path": "DiagnosticReport.issued",
            "comment": "May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer",
            "path": "DiagnosticReport.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.id",
            "path": "DiagnosticReport.performer.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.extension",
            "path": "DiagnosticReport.performer.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.modifierExtension",
            "path": "DiagnosticReport.performer.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.role",
            "path": "DiagnosticReport.performer.role",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.role",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Role"
                }
              ],
              "strength": "example",
              "description": "Indicate a role of diagnostic report performer",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/performer-role"
              }
            }
          },
          {
            "id": "DiagnosticReport.performer.actor",
            "path": "DiagnosticReport.performer.actor",
            "comment": "This is not necessarily the source of the atomic data items. It is the entity that takes responsibility for the clinical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.actor",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.specimen",
            "path": "DiagnosticReport.specimen",
            "comment": "If the specimen is sufficiently specified with a code in the test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per observation or group.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.specimen",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "DiagnosticReport.result",
            "path": "DiagnosticReport.result",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ]
          },
          {
            "id": "DiagnosticReport.imagingStudy",
            "path": "DiagnosticReport.imagingStudy",
            "comment": "ImagingStudy and ImageManifest and the image element are somewhat overlapping - typically, the list of image references in the image element will also be found in one of the imaging study resources. However each caters to different types of displays for different types of purposes. Neither, either, or both may be provided.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.imagingStudy",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingStudy"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingManifest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image",
            "path": "DiagnosticReport.image",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.image",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.id",
            "path": "DiagnosticReport.image.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.extension",
            "path": "DiagnosticReport.image.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.modifierExtension",
            "path": "DiagnosticReport.image.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.comment",
            "path": "DiagnosticReport.image.comment",
            "comment": "The comment should be displayed with the image. It would be common for the report to include additional discussion of the image contents in other sections such as the conclusion.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.link",
            "path": "DiagnosticReport.image.link",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.link",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Media"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.conclusion",
            "path": "DiagnosticReport.conclusion",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.conclusion",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.codedDiagnosis",
            "path": "DiagnosticReport.codedDiagnosis",
            "min": 0,
            "max": "0",
            "base": {
              "path": "DiagnosticReport.codedDiagnosis",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AdjunctDiagnosis"
                }
              ],
              "strength": "example",
              "description": "Diagnosis codes provided as adjuncts to the report.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/clinical-findings"
              }
            }
          },
          {
            "id": "DiagnosticReport.presentedForm",
            "path": "DiagnosticReport.presentedForm",
            "comment": "\"application/pdf\" is recommended as the most reliable and interoperable in this context.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.presentedForm",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Attachment"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "min": 0,
            "max": "*"
          },
          {
            "id": "DiagnosticReport.extension:assessedcondition",
            "path": "DiagnosticReport.extension",
            "sliceName": "AssessedCondition",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAssessedCondition"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:familymemberhistory",
            "path": "DiagnosticReport.extension",
            "sliceName": "FamilyMemberHistory",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsFamilyMemberHistory"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:analysis",
            "path": "DiagnosticReport.extension",
            "sliceName": "Analysis",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport-geneticsAnalysis"
              }
            ]
          },
          {
            "id": "DiagnosticReport.codedDiagnosis",
            "path": "DiagnosticReport.codedDiagnosis",
            "min": 0,
            "max": "0",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/hlaresult",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "hlaresult",
      "url": "http://hl7.org/fhir/StructureDefinition/hlaresult",
      "name": "Profile for HLA Genotyping Results",
      "status": "draft",
      "experimental": false,
      "date": "2015-10-09",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "DiagnosticReport",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "comment": "This is intended to capture a single report, and is not suitable for use in displaying summary information that covers multiple reports.  For example, this resource has not been designed for laboratory cumulative reporting formats nor detailed structured reports for sequencing.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.id",
            "path": "DiagnosticReport.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.meta",
            "path": "DiagnosticReport.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.implicitRules",
            "path": "DiagnosticReport.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.language",
            "path": "DiagnosticReport.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "DiagnosticReport.text",
            "path": "DiagnosticReport.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "DiagnosticReport.contained",
            "path": "DiagnosticReport.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension",
            "path": "DiagnosticReport.extension",
            "slicing": {
              "id": "5",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:allele-database",
            "path": "DiagnosticReport.extension",
            "sliceName": "allele-database",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:glstring",
            "path": "DiagnosticReport.extension",
            "sliceName": "glstring",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:haploid",
            "path": "DiagnosticReport.extension",
            "sliceName": "haploid",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:method",
            "path": "DiagnosticReport.extension",
            "sliceName": "method",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.modifierExtension",
            "path": "DiagnosticReport.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "DiagnosticReport.identifier",
            "path": "DiagnosticReport.identifier",
            "comment": "Usually assigned by the Information System of the diagnostic service provider (filler id).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.basedOn",
            "path": "DiagnosticReport.basedOn",
            "comment": "Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single test result resource. Note that there are also cases where one request leads to multiple reports.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.basedOn",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/NutritionOrder"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ProcedureRequest"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.status",
            "path": "DiagnosticReport.status",
            "comment": "This is labeled as \"Is Modifier\" because applications need to take appropriate action if a report is withdrawn.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportStatus"
                }
              ],
              "strength": "required",
              "description": "The status of the diagnostic report as a whole.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-report-status"
              }
            }
          },
          {
            "id": "DiagnosticReport.category",
            "path": "DiagnosticReport.category",
            "comment": "The level of granularity is defined by the category concepts in the value set. More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in DiagnosticReport.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.category",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticServiceSection"
                }
              ],
              "strength": "example",
              "description": "Codes for diagnostic service sections.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/diagnostic-service-sections"
              }
            }
          },
          {
            "id": "DiagnosticReport.code",
            "path": "DiagnosticReport.code",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiagnosticReportCodes"
                }
              ],
              "strength": "preferred",
              "description": "Codes that describe Diagnostic Reports.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/report-codes"
              }
            }
          },
          {
            "id": "DiagnosticReport.subject",
            "path": "DiagnosticReport.subject",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.subject",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.context",
            "path": "DiagnosticReport.context",
            "comment": "This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter or episode but still be tied to the context of the encounter or episode (e.g. pre-admission lab tests).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.context",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.effective[x]",
            "path": "DiagnosticReport.effective[x]",
            "comment": "If the diagnostic procedure was performed on the patient, this is the time it was performed. If there are specimens, the diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship between the specimens and the diagnostically relevant time is not always automatic.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.effective[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              },
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.issued",
            "path": "DiagnosticReport.issued",
            "comment": "May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.issued",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer",
            "path": "DiagnosticReport.performer",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.performer",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.id",
            "path": "DiagnosticReport.performer.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.extension",
            "path": "DiagnosticReport.performer.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.performer.modifierExtension",
            "path": "DiagnosticReport.performer.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.performer.role",
            "path": "DiagnosticReport.performer.role",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.role",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Role"
                }
              ],
              "strength": "example",
              "description": "Indicate a role of diagnostic report performer",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/performer-role"
              }
            }
          },
          {
            "id": "DiagnosticReport.performer.actor",
            "path": "DiagnosticReport.performer.actor",
            "comment": "This is not necessarily the source of the atomic data items. It is the entity that takes responsibility for the clinical report.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.performer.actor",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.specimen",
            "path": "DiagnosticReport.specimen",
            "comment": "If the specimen is sufficiently specified with a code in the test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per observation or group.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.specimen",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Specimen"
              }
            ]
          },
          {
            "id": "DiagnosticReport.result",
            "path": "DiagnosticReport.result",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.result",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Observation"
              }
            ]
          },
          {
            "id": "DiagnosticReport.imagingStudy",
            "path": "DiagnosticReport.imagingStudy",
            "comment": "ImagingStudy and ImageManifest and the image element are somewhat overlapping - typically, the list of image references in the image element will also be found in one of the imaging study resources. However each caters to different types of displays for different types of purposes. Neither, either, or both may be provided.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.imagingStudy",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingStudy"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ImagingManifest"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image",
            "path": "DiagnosticReport.image",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.image",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.id",
            "path": "DiagnosticReport.image.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.extension",
            "path": "DiagnosticReport.image.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.modifierExtension",
            "path": "DiagnosticReport.image.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.image.comment",
            "path": "DiagnosticReport.image.comment",
            "comment": "The comment should be displayed with the image. It would be common for the report to include additional discussion of the image contents in other sections such as the conclusion.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.image.link",
            "path": "DiagnosticReport.image.link",
            "min": 1,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.image.link",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Media"
              }
            ],
            "isSummary": true
          },
          {
            "id": "DiagnosticReport.conclusion",
            "path": "DiagnosticReport.conclusion",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DiagnosticReport.conclusion",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "DiagnosticReport.codedDiagnosis",
            "path": "DiagnosticReport.codedDiagnosis",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.codedDiagnosis",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AdjunctDiagnosis"
                }
              ],
              "strength": "example",
              "description": "Diagnosis codes provided as adjuncts to the report.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/clinical-findings"
              }
            }
          },
          {
            "id": "DiagnosticReport.presentedForm",
            "path": "DiagnosticReport.presentedForm",
            "comment": "\"application/pdf\" is recommended as the most reliable and interoperable in this context.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DiagnosticReport.presentedForm",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Attachment"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "DiagnosticReport",
            "path": "DiagnosticReport",
            "min": 0,
            "max": "*"
          },
          {
            "id": "DiagnosticReport.extension:allele-database",
            "path": "DiagnosticReport.extension",
            "sliceName": "allele-database",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-allele-database"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:glstring",
            "path": "DiagnosticReport.extension",
            "sliceName": "glstring",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-glstring"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:haploid",
            "path": "DiagnosticReport.extension",
            "sliceName": "haploid",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-haploid"
              }
            ]
          },
          {
            "id": "DiagnosticReport.extension:method",
            "path": "DiagnosticReport.extension",
            "sliceName": "method",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/hla-genotyping-results-method"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/clinicaldocument",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "clinicaldocument",
      "url": "http://hl7.org/fhir/StructureDefinition/clinicaldocument",
      "name": "Clinical Document Profile for Composition",
      "status": "draft",
      "experimental": false,
      "date": "2015-03-17",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Composition",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Composition",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Composition",
            "path": "Composition",
            "comment": "While the focus of this specification is on patient-specific clinical statements, this resource can also apply to other healthcare-related statements such as study protocol designs, healthcare invoices and other activities that are not necessarily patient-specific or clinical.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "Composition.id",
            "path": "Composition.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.meta",
            "path": "Composition.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.implicitRules",
            "path": "Composition.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Composition.language",
            "path": "Composition.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Composition.text",
            "path": "Composition.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Composition.contained",
            "path": "Composition.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Composition.extension",
            "path": "Composition.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Composition.modifierExtension",
            "path": "Composition.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Composition.identifier",
            "path": "Composition.identifier",
            "comment": "See discussion in resource definition for how these relate.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.status",
            "path": "Composition.status",
            "comment": "If a composition is marked as withdrawn, the compositions/documents in the series, or data from the composition or document series, should never be displayed to a user without being clearly marked as untrustworthy. The flag \"entered-in-error\" is why this element is labeled as a modifier of other elements. \n\nSome reporting work flows require that the original narrative of a final document never be altered; instead, only new narrative can be added. The composition resource has no explicit status for explicitly noting whether this business rule is in effect. This would be handled by an extension if required.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "CompositionStatus"
                }
              ],
              "strength": "required",
              "description": "The workflow/clinical status of the composition.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/composition-status"
              }
            }
          },
          {
            "id": "Composition.type",
            "path": "Composition.type",
            "comment": "For Composition type, LOINC is ubiquitous and strongly endorsed by HL7. Most implementation guides will require a specific LOINC code, or use LOINC as an extensible binding.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DocumentType"
                }
              ],
              "strength": "preferred",
              "description": "Type of a composition.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/doc-typecodes"
              }
            }
          },
          {
            "id": "Composition.class",
            "path": "Composition.class",
            "comment": "This is a metadata field from [XDS/MHD](http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD)).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.class",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DocumentClass"
                }
              ],
              "strength": "example",
              "description": "High-level kind of a clinical document at a macro level.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/doc-classcodes"
              }
            }
          },
          {
            "id": "Composition.subject",
            "path": "Composition.subject",
            "comment": "For clinical documents, this is usually the patient.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.subject",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.encounter",
            "path": "Composition.encounter",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.encounter",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Encounter"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.date",
            "path": "Composition.date",
            "comment": "The Last Modified Date on the composition may be after the date of the document was attested without being changed.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.date",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.author",
            "path": "Composition.author",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Composition.author",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.title",
            "path": "Composition.title",
            "comment": "For many compositions, the title is the same as the text or a display name of Composition.type (e.g. a \"consultation\" or \"progress note\"). Note that CDA does not make title mandatory, but there are no known cases where it is useful for title to be omitted, so it is mandatory here. Feedback on this requirement is welcome during the trial use period.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.title",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.confidentiality",
            "path": "Composition.confidentiality",
            "comment": "The exact use of this element, and enforcement and issues related to highly sensitive documents are out of scope for the base specification, and delegated to implementation profiles (see security section).\n\nThis element is labeled as a modifier because highly confidential documents must not be treated as if they are not.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.confidentiality",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DocumentConfidentiality"
                }
              ],
              "strength": "required",
              "description": "Codes specifying the level of confidentiality of the composition.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-ConfidentialityClassification"
              }
            }
          },
          {
            "id": "Composition.attester",
            "path": "Composition.attester",
            "comment": "Only list each attester once.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.attester",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.attester.id",
            "path": "Composition.attester.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Composition.attester.extension",
            "path": "Composition.attester.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Composition.attester.modifierExtension",
            "path": "Composition.attester.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Composition.attester.mode",
            "path": "Composition.attester.mode",
            "comment": "Use more than one code where a single attester has more than one mode (professional and legal are often paired).",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Composition.attester.mode",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "CompositionAttestationMode"
                }
              ],
              "strength": "required",
              "description": "The way in which a person authenticated a composition.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/composition-attestation-mode"
              }
            }
          },
          {
            "id": "Composition.attester.time",
            "path": "Composition.attester.time",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.attester.time",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.attester.party",
            "path": "Composition.attester.party",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.attester.party",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.custodian",
            "path": "Composition.custodian",
            "comment": "This is useful when documents are derived from a composition - provides guidance for how to get the latest version of the document. This is optional because this is sometimes not known by the authoring system, and can be inferred by context. However, it is important that this information be known when working with a derived document, so providing a custodian is encouraged.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.custodian",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.relatesTo",
            "path": "Composition.relatesTo",
            "comment": "A document is a version specific composition.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.relatesTo",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.relatesTo.id",
            "path": "Composition.relatesTo.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Composition.relatesTo.extension",
            "path": "Composition.relatesTo.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Composition.relatesTo.modifierExtension",
            "path": "Composition.relatesTo.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Composition.relatesTo.code",
            "path": "Composition.relatesTo.code",
            "comment": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.relatesTo.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DocumentRelationshipType"
                }
              ],
              "strength": "required",
              "description": "The type of relationship between documents.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/document-relationship-type"
              }
            }
          },
          {
            "id": "Composition.relatesTo.target[x]",
            "path": "Composition.relatesTo.target[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Composition.relatesTo.target[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Composition"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.event",
            "path": "Composition.event",
            "comment": "The event needs to be consistent with the type element, though can provide further information if desired.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.event",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.event.id",
            "path": "Composition.event.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Composition.event.extension",
            "path": "Composition.event.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Composition.event.modifierExtension",
            "path": "Composition.event.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Composition.event.code",
            "path": "Composition.event.code",
            "comment": "An event can further specialize the act inherent in the typeCode, such as where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more eventCodes are included, they SHALL NOT conflict with the values inherent in the classCode, practiceSettingCode or typeCode, as such a conflict would create an ambiguous situation. This short list of codes is provided to be used as key words for certain types of queries.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.event.code",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DocumentEventType"
                }
              ],
              "strength": "example",
              "description": "This list of codes represents the main clinical acts being documented.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-ActCode"
              }
            }
          },
          {
            "id": "Composition.event.period",
            "path": "Composition.event.period",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.event.period",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.event.detail",
            "path": "Composition.event.detail",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.event.detail",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Composition.section",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "Section"
              }
            ],
            "path": "Composition.section",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.section",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "cmp-1",
                "severity": "error",
                "human": "A section must at least one of text, entries, or sub-sections",
                "expression": "text.exists() or entry.exists() or section.exists()",
                "xpath": "exists(f:text) or exists(f:entry) or exists(f:section)"
              },
              {
                "key": "cmp-2",
                "severity": "error",
                "human": "A section can only have an emptyReason if it is empty",
                "expression": "emptyReason.empty() or entry.empty()",
                "xpath": "not(exists(f:emptyReason) and exists(f:entry))"
              }
            ]
          },
          {
            "id": "Composition.section.id",
            "path": "Composition.section.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Composition.section.extension",
            "path": "Composition.section.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Composition.section.modifierExtension",
            "path": "Composition.section.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Composition.section.title",
            "path": "Composition.section.title",
            "comment": "The title identifies the section for a human reader. The title must be consistent with the narrative of the resource that is the target of the section.content reference. Generally, sections SHOULD have titles, but in some documents, it is unnecessary or inappropriate. Typically, this is where a section has subsections that have their own adequately distinguishing title,  or documents that only have a single section. Most Implementation Guides will make section title to be a required element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.title",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Composition.section.code",
            "path": "Composition.section.code",
            "comment": "The code identifies the section for an automated processor of the document. This is particularly relevant when using profiles to control the structure of the document.   If the section has content (instead of sub-sections), the section.code does not change the meaning or interpretation of the resource that is the content of the section in the comments for the section.code.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.code",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "CompositionSectionType"
                }
              ],
              "strength": "example",
              "description": "Classification of a section of a composition/document.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/doc-section-codes"
              }
            }
          },
          {
            "id": "Composition.section.text",
            "path": "Composition.section.text",
            "comment": "Document profiles may define what content should be represented in the narrative to ensure clinical safety.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "cmp-1"
            ]
          },
          {
            "id": "Composition.section.mode",
            "path": "Composition.section.mode",
            "comment": "This element is labeled as a modifier because a change list must not be mis-understood as a complete list.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.mode",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "SectionMode"
                }
              ],
              "strength": "required",
              "description": "The processing mode that applies to this section.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/list-mode"
              }
            }
          },
          {
            "id": "Composition.section.orderedBy",
            "path": "Composition.section.orderedBy",
            "comment": "Applications SHOULD render ordered lists in the order provided, but MAY allow users to re-order based on their own preferences as well. If there is no order specified, the order is unknown, though there may still be some order.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.orderedBy",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "SectionEntryOrder"
                }
              ],
              "strength": "preferred",
              "description": "What order applies to the items in the entry.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/list-order"
              }
            }
          },
          {
            "id": "Composition.section.entry",
            "path": "Composition.section.entry",
            "comment": "If there are no entries in the list, an emptyReason SHOULD be provided.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.section.entry",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "condition": [
              "cmp-2"
            ]
          },
          {
            "id": "Composition.section.emptyReason",
            "path": "Composition.section.emptyReason",
            "comment": "The various reasons for an empty section make a significant interpretation to its interpretation. Note that this code is for use when the entire section content has been suppressed, and not for when individual items are omitted - implementers may consider using a text note or a flag on an entry in these cases.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Composition.section.emptyReason",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "condition": [
              "cmp-2"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "SectionEmptyReason"
                }
              ],
              "strength": "preferred",
              "description": "If a section is empty, why it is empty.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/list-empty-reason"
              }
            }
          },
          {
            "id": "Composition.section.section",
            "path": "Composition.section.section",
            "comment": "Nested sections are primarily used to help human readers navigate to particular portions of the document.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Composition.section.section",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Composition.section",
            "condition": [
              "cmp-1"
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Composition",
            "path": "Composition",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Composition.subject",
            "path": "Composition.subject",
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ]
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/elementdefinition-de",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "elementdefinition-de",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "fhir"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-de",
      "name": "DataElement constraint on ElementDefinition data type",
      "status": "draft",
      "experimental": false,
      "date": "2015-02-28",
      "fhirVersion": "3.0.0",
      "kind": "complex-type",
      "abstract": false,
      "type": "ElementDefinition",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ElementDefinition",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "ElementDefinition",
            "path": "ElementDefinition",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition",
              "min": 0,
              "max": "*"
            },
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "eld-2",
                "severity": "error",
                "human": "Min <= Max",
                "expression": "min.empty() or max.empty() or (max = '*') or (min <= max.toInteger())",
                "xpath": "not(exists(f:min)) or not(exists(f:max)) or (not(f:max/@value) and not(f:min/@value)) or (f:max/@value = '*') or (number(f:max/@value) >= f:min/@value)",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-5",
                "severity": "error",
                "human": "if the element definition has a contentReference, it cannot have type, defaultValue, fixed, pattern, example, minValue, maxValue, maxLength, or binding",
                "expression": "contentReference.empty() or (type.empty() and defaultValue.empty() and fixed.empty() and pattern.empty() and example.empty() and minValue.empty() and maxValue.empty() and maxLength.empty() and binding.empty())",
                "xpath": "not(exists(f:contentReference) and (exists(f:type) or exists(f:*[starts-with(local-name(.), 'value')]) or exists(f:*[starts-with(local-name(.), 'defaultValue')])  or exists(f:*[starts-with(local-name(.), 'fixed')]) or exists(f:*[starts-with(local-name(.), 'pattern')]) or exists(f:*[starts-with(local-name(.), 'example')]) or exists(f:*[starts-with(local-name(.), 'f:minValue')]) or exists(f:*[starts-with(local-name(.), 'f:maxValue')]) or exists(f:maxLength) or exists(f:binding)))",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-7",
                "severity": "error",
                "human": "Pattern may only be specified if there is one type",
                "expression": "pattern.empty() or (type.count() <= 1)",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'pattern')])) or (count(f:type)<=1)",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-6",
                "severity": "error",
                "human": "Fixed value may only be specified if there is one type",
                "expression": "fixed.empty() or (type.count()  <= 1)",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'fixed')])) or (count(f:type)<=1)",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-11",
                "severity": "error",
                "human": "Binding can only be present for coded elements, string, and uri",
                "expression": "binding.empty() or type.code.empty() or type.select((code = 'code') or (code = 'Coding') or (code='CodeableConcept') or (code = 'Quantity') or (code = 'Extension') or (code = 'string') or (code = 'uri')).exists()",
                "xpath": "not(exists(f:binding)) or (count(f:type/f:code) = 0) or  f:type/f:code/@value=('code','Coding','CodeableConcept','Quantity','Extension', 'string', 'uri')",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-8",
                "severity": "error",
                "human": "Pattern and value are mutually exclusive",
                "expression": "pattern.empty() or fixed.empty()",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'pattern')])) or not(exists(f:*[starts-with(local-name(.), 'fixed')]))",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-14",
                "severity": "error",
                "human": "Constraints must be unique by key",
                "expression": "constraint.select(key).isDistinct()",
                "xpath": "count(f:constraint) = count(distinct-values(f:constraint/f:key/@value))",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-13",
                "severity": "error",
                "human": "Types must be unique by the combination of code and profile",
                "expression": "type.select(code&profile&targetProfile).isDistinct()",
                "xpath": "not(exists(for $type in f:type return $type/preceding-sibling::f:type[f:code/@value=$type/f:code/@value and f:profile/@value = $type/f:profile/@value]))",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-16",
                "severity": "error",
                "human": "sliceName must be a proper token",
                "expression": "sliceName.empty() or sliceName.matches('^[a-zA-Z0-9\\\\-\\\\_]+$')",
                "xpath": "not(exists(f:sliceName/@value)) or matches(f:sliceName/@value, '^[a-zA-Z0-9\\\\-\\\\_]+$')",
                "source": "ElementDefinition"
              },
              {
                "key": "eld-15",
                "severity": "error",
                "human": "default value and meaningWhenMissing are mutually exclusive",
                "expression": "defaultValue.empty() or meaningWhenMissing.empty()",
                "xpath": "not(exists(f:*[starts-with(local-name(.), 'fixed')])) or not(exists(f:meaningWhenMissing))",
                "source": "ElementDefinition"
              }
            ]
          },
          {
            "id": "ElementDefinition.id",
            "path": "ElementDefinition.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension",
            "path": "ElementDefinition.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:question",
            "path": "ElementDefinition.extension",
            "sliceName": "Question",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/elementdefinition-question"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:question.id",
            "path": "ElementDefinition.extension.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:question.extension",
            "path": "ElementDefinition.extension.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:question.url",
            "path": "ElementDefinition.extension.url",
            "representation": [
              "xmlAttr"
            ],
            "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Extension.url",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://hl7.org/fhir/StructureDefinition/elementdefinition-question"
          },
          {
            "id": "ElementDefinition.extension:question.valueString",
            "path": "ElementDefinition.extension.valueString",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Extension.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:allowedunits",
            "path": "ElementDefinition.extension",
            "sliceName": "AllowedUnits",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:allowedunits.id",
            "path": "ElementDefinition.extension.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:allowedunits.extension",
            "path": "ElementDefinition.extension.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:allowedunits.url",
            "path": "ElementDefinition.extension.url",
            "representation": [
              "xmlAttr"
            ],
            "comment": "The definition may point directly to a computable or human-readable definition of the extensibility codes, or it may be a logical URI as declared in some other specification. The definition SHALL be a URI for the Structure Definition defining the extension.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Extension.url",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "fixedUri": "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"
          },
          {
            "id": "ElementDefinition.extension:allowedunits.value[x]",
            "path": "ElementDefinition.extension.value[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Extension.value[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ValueSet"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Units"
                }
              ],
              "strength": "required",
              "description": "Units of measure allowed for an element",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/ucum-units"
              }
            }
          },
          {
            "id": "ElementDefinition.path",
            "path": "ElementDefinition.path",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.path",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.representation",
            "path": "ElementDefinition.representation",
            "comment": "In resources, this is rarely used except for special cases where the representation deviates from the normal, and can only be done in the base standard (and profiles must reproduce what the base standard does). This element is used quite commonly in Logical models when the logical models represent a specific serialization format (e.g. CDA, v2 etc).",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.representation",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "PropertyRepresentation"
                }
              ],
              "strength": "required",
              "description": "How a property is represented when serialized.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/property-representation"
              }
            }
          },
          {
            "id": "ElementDefinition.sliceName",
            "path": "ElementDefinition.sliceName",
            "comment": "The name SHALL be unique within the structure within the context of the constrained resource element.  (Though to avoid confusion, uniqueness across all elements is recommended.).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.sliceName",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.label",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.label",
            "comment": "See also the extension (http://hl7.org/fhir/StructureDefinition/elementdefinition-question)[extension-elementdefinition-question.html].",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.label",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.code",
            "path": "ElementDefinition.code",
            "comment": "The concept SHALL be properly aligned with the data element definition and other constraints, as defined in the code system, including relationships, of any code listed here.  Where multiple codes exist in a terminology that could correspond to the data element, the most granular code(s) should be selected, so long as they are not more restrictive than the data element itself. The mappings may be used to provide more or less granular or structured equivalences in the code system.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.code",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ElementDefinitionCode"
                }
              ],
              "strength": "example",
              "description": "Codes that indicate the meaning of a data element.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/observation-codes"
              }
            }
          },
          {
            "id": "ElementDefinition.slicing",
            "path": "ElementDefinition.slicing",
            "comment": "The first element in the sequence, the one that carries the slicing, is the definition that applies to all the slices. This is based on the unconstrained element, but can apply any constraints as appropriate. This may include the common constraints on the children of the element.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.slicing",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "eld-1",
                "severity": "error",
                "human": "If there are no discriminators, there must be a definition",
                "expression": "discriminator.exists() or description.exists()",
                "xpath": "(f:discriminator) or (f:description)",
                "source": "ElementDefinition.slicing"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.slicing.id",
            "path": "ElementDefinition.slicing.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.slicing.extension",
            "path": "ElementDefinition.slicing.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.slicing.discriminator",
            "path": "ElementDefinition.slicing.discriminator",
            "comment": "If there is no discriminator, the content is hard to process, so this should be avoided. If the base element has a cardinality of ..1, and there is a choice of types, the discriminator must be \"@type\".",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.slicing.discriminator",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.slicing.discriminator.id",
            "path": "ElementDefinition.slicing.discriminator.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.slicing.discriminator.extension",
            "path": "ElementDefinition.slicing.discriminator.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.slicing.discriminator.type",
            "path": "ElementDefinition.slicing.discriminator.type",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.slicing.discriminator.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DiscriminatorType"
                }
              ],
              "strength": "required",
              "description": "How an element value is interpreted when discrimination is evaluated",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/discriminator-type"
              }
            }
          },
          {
            "id": "ElementDefinition.slicing.discriminator.path",
            "path": "ElementDefinition.slicing.discriminator.path",
            "comment": "The only FHIRPath functions that are allowed are resolve(), and extension(url).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.slicing.discriminator.path",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.slicing.description",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.slicing.description",
            "comment": "If it's really not possible to differentiate them, the design should be re-evaluated to make the content usable.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.slicing.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "condition": [
              "eld-1"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.slicing.ordered",
            "path": "ElementDefinition.slicing.ordered",
            "comment": "Order should only be required when it is a pressing concern for presentation. Profile authors should consider making the order a feature of the rules about the narrative, not the rules about the data - requiring ordered data makes the profile much less re-usable.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.slicing.ordered",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isSummary": true
          },
          {
            "id": "ElementDefinition.slicing.rules",
            "path": "ElementDefinition.slicing.rules",
            "comment": "Allowing additional elements makes for a much for flexible template - it's open for use in wider contexts, but also means that the content of the resource is not closed, and applications have to decide how to handle content not described by the profile.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.slicing.rules",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "SlicingRules"
                }
              ],
              "strength": "required",
              "description": "How slices are interpreted when evaluating an instance.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/resource-slicing-rules"
              }
            }
          },
          {
            "id": "ElementDefinition.short",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.short",
            "comment": "May change the term to provide language more appropriate to the context of the profile or to reflect slicing.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.short",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.definition",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.definition",
            "comment": "It is easy for a different definition to change the meaning of an element and this can have nasty downstream consequences. Please be careful when providing definitions.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.definition",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.comment",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.comment",
            "comment": "If it is possible to capture usage rules using constraints, that mechanism should be used in preference to this element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.requirements",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.requirements",
            "comment": "This element does not describe the usage of the element (that's done in comments), rather it's for traceability of *why* the element is either needed or why the constraints exist as they do.  This may be used to point to source materials or specifications that drove the structure of this data element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.requirements",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.alias",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.alias",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.alias",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.min",
            "path": "ElementDefinition.min",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.min",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "unsignedInt"
              }
            ],
            "condition": [
              "eld-2"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.max",
            "path": "ElementDefinition.max",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.max",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "condition": [
              "eld-3",
              "eld-2"
            ],
            "constraint": [
              {
                "key": "eld-3",
                "severity": "error",
                "human": "Max SHALL be a number or \"*\"",
                "expression": "empty() or ($this = '*') or (toInteger() >= 0)",
                "xpath": "@value='*' or (normalize-space(@value)!='' and normalize-space(translate(@value, '0123456789',''))='')"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.base",
            "path": "ElementDefinition.base",
            "comment": "The base information does not carry any information that could not be determined from the path and related profiles, but making this determination requires both that the related profiles are available, and that the algorithm to determine them be available. So they are deformalised into this location for tooling convenience, and to ensure that the base information is available without dependencies.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.base",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.base.id",
            "path": "ElementDefinition.base.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.base.extension",
            "path": "ElementDefinition.base.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.base.path",
            "path": "ElementDefinition.base.path",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.base.path",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.base.min",
            "path": "ElementDefinition.base.min",
            "comment": "This is provided for consistency with max, and may affect code generation of mandatory elements of the base resource are generated differently (some reference implementations have done this).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.base.min",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "unsignedInt"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.base.max",
            "path": "ElementDefinition.base.max",
            "comment": "This is provided to code generation, since the serialization representation in JSON differs depending on whether the base element has max > 1. Also, some forms of code generation may differ.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.base.max",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.contentReference",
            "path": "ElementDefinition.contentReference",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.contentReference",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "condition": [
              "eld-5"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.type",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "TypeRef"
              }
            ],
            "path": "ElementDefinition.type",
            "comment": "The Type of the element can be left blank in a differential constraint, in which case the type is inherited from the resource. Abstract types are not permitted to appear as a type when multiple types are listed.  (I.e. Abstract types cannot be part of a choice).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.type",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "condition": [
              "eld-13"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "eld-4",
                "severity": "error",
                "human": "Aggregation may only be specified if one of the allowed types for the element is a resource",
                "expression": "aggregation.empty() or (code = 'Reference')",
                "xpath": "not(exists(f:aggregation)) or exists(f:code[@value = 'Reference'])",
                "source": "ElementDefinition.type"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.type.id",
            "path": "ElementDefinition.type.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.type.extension",
            "path": "ElementDefinition.type.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.type.code",
            "path": "ElementDefinition.type.code",
            "comment": "If the element is a reference to another resource, this element contains \"Reference\", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient). There would be one pair of type/code for each allowed target resource type.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.type.code",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "FHIRDefinedTypeExt"
                }
              ],
              "strength": "extensible",
              "description": "Either a resource or a data type, including logical model types",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/defined-types"
              }
            }
          },
          {
            "id": "ElementDefinition.type.profile",
            "path": "ElementDefinition.type.profile",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.type.profile",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.type.targetProfile",
            "path": "ElementDefinition.type.targetProfile",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.type.targetProfile",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.type.aggregation",
            "path": "ElementDefinition.type.aggregation",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.type.aggregation",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "condition": [
              "eld-4"
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AggregationMode"
                }
              ],
              "strength": "required",
              "description": "How resource references can be aggregated.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/resource-aggregation-mode"
              }
            }
          },
          {
            "id": "ElementDefinition.type.versioning",
            "path": "ElementDefinition.type.versioning",
            "comment": "The base specification never makes a rule as to which form is allowed, but implementation guides may do this.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.type.versioning",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "defaultValueCode": "either",
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ReferenceVersionRules"
                }
              ],
              "strength": "required",
              "description": "Whether a reference needs to be version specific or version independent, or whether either can be used",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/reference-version-rules"
              }
            }
          },
          {
            "id": "ElementDefinition.defaultValue[x]",
            "path": "ElementDefinition.defaultValue[x]",
            "comment": "Default values can only be specified on a resource, data type, or extension definition, and never in a profile that applies to one of these. Specifying a default value means that the property can never been unknown - it must always have a value. Further, the default value can never be changed. For these reasons, default values are (and should be) used extremely sparingly.\r\n  This element should only be used on child elements of complex data elements.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.defaultValue[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              },
              {
                "code": "boolean"
              },
              {
                "code": "code"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "decimal"
              },
              {
                "code": "id"
              },
              {
                "code": "instant"
              },
              {
                "code": "integer"
              },
              {
                "code": "markdown"
              },
              {
                "code": "oid"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "string"
              },
              {
                "code": "time"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "uri"
              },
              {
                "code": "Address"
              },
              {
                "code": "Age"
              },
              {
                "code": "Annotation"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Coding"
              },
              {
                "code": "ContactPoint"
              },
              {
                "code": "Count"
              },
              {
                "code": "Distance"
              },
              {
                "code": "Duration"
              },
              {
                "code": "HumanName"
              },
              {
                "code": "Identifier"
              },
              {
                "code": "Money"
              },
              {
                "code": "Period"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "Reference"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Signature"
              },
              {
                "code": "Timing"
              },
              {
                "code": "Meta"
              }
            ],
            "condition": [
              "eld-15"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.meaningWhenMissing",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.meaningWhenMissing",
            "comment": "Implicit meanings for missing values can only be specified on a resource, data type, or extension definition, and never in a profile that applies to one of these. An implicit meaning for a missing value can never be changed, and specifying one has the consequence that constraining its use in profiles eliminates use cases as possibilities, not merely moving them out of scope.\r\n  This element should only be used on child elements of complex data elements.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.meaningWhenMissing",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ],
            "condition": [
              "eld-15"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.orderMeaning",
            "path": "ElementDefinition.orderMeaning",
            "comment": "This element can only be asserted on repeating elements and can only be introduced when defining resources or data types.  It can be further refined profiled elements but if absent in the base type, a profile cannot assert meaning.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.orderMeaning",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.fixed[x]",
            "path": "ElementDefinition.fixed[x]",
            "comment": "This is not recommended for Coding and CodeableConcept since these often have highly contextual properties such as version or display.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.fixed[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              },
              {
                "code": "boolean"
              },
              {
                "code": "code"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "decimal"
              },
              {
                "code": "id"
              },
              {
                "code": "instant"
              },
              {
                "code": "integer"
              },
              {
                "code": "markdown"
              },
              {
                "code": "oid"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "string"
              },
              {
                "code": "time"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "uri"
              },
              {
                "code": "Address"
              },
              {
                "code": "Age"
              },
              {
                "code": "Annotation"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Coding"
              },
              {
                "code": "ContactPoint"
              },
              {
                "code": "Count"
              },
              {
                "code": "Distance"
              },
              {
                "code": "Duration"
              },
              {
                "code": "HumanName"
              },
              {
                "code": "Identifier"
              },
              {
                "code": "Money"
              },
              {
                "code": "Period"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "Reference"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Signature"
              },
              {
                "code": "Timing"
              },
              {
                "code": "Meta"
              }
            ],
            "condition": [
              "eld-5",
              "eld-6",
              "eld-8"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.pattern[x]",
            "path": "ElementDefinition.pattern[x]",
            "comment": "Mostly used for fixing values of CodeableConcept. At present, pattern[x] is not recommended as a basis for slicing while issues related to this are investigated during the STU period.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.pattern[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              },
              {
                "code": "boolean"
              },
              {
                "code": "code"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "decimal"
              },
              {
                "code": "id"
              },
              {
                "code": "instant"
              },
              {
                "code": "integer"
              },
              {
                "code": "markdown"
              },
              {
                "code": "oid"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "string"
              },
              {
                "code": "time"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "uri"
              },
              {
                "code": "Address"
              },
              {
                "code": "Age"
              },
              {
                "code": "Annotation"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Coding"
              },
              {
                "code": "ContactPoint"
              },
              {
                "code": "Count"
              },
              {
                "code": "Distance"
              },
              {
                "code": "Duration"
              },
              {
                "code": "HumanName"
              },
              {
                "code": "Identifier"
              },
              {
                "code": "Money"
              },
              {
                "code": "Period"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "Reference"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Signature"
              },
              {
                "code": "Timing"
              },
              {
                "code": "Meta"
              }
            ],
            "condition": [
              "eld-5",
              "eld-7",
              "eld-8"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.example",
            "path": "ElementDefinition.example",
            "comment": "Examples will most commonly be present for data where it's not implicitly obvious from either the data type or value set what the values might be.  (I.e. Example values for dates or quantities would generally be unnecessary.)  If the example value is fully populated, the publication tool can generate an instance automatically.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.example",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.example.id",
            "path": "ElementDefinition.example.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.example.extension",
            "path": "ElementDefinition.example.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.example.label",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.example.label",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.example.label",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.example.value[x]",
            "path": "ElementDefinition.example.value[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.example.value[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              },
              {
                "code": "boolean"
              },
              {
                "code": "code"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "decimal"
              },
              {
                "code": "id"
              },
              {
                "code": "instant"
              },
              {
                "code": "integer"
              },
              {
                "code": "markdown"
              },
              {
                "code": "oid"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "string"
              },
              {
                "code": "time"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "uri"
              },
              {
                "code": "Address"
              },
              {
                "code": "Age"
              },
              {
                "code": "Annotation"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "CodeableConcept"
              },
              {
                "code": "Coding"
              },
              {
                "code": "ContactPoint"
              },
              {
                "code": "Count"
              },
              {
                "code": "Distance"
              },
              {
                "code": "Duration"
              },
              {
                "code": "HumanName"
              },
              {
                "code": "Identifier"
              },
              {
                "code": "Money"
              },
              {
                "code": "Period"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Range"
              },
              {
                "code": "Ratio"
              },
              {
                "code": "Reference"
              },
              {
                "code": "SampledData"
              },
              {
                "code": "Signature"
              },
              {
                "code": "Timing"
              },
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.minValue[x]",
            "path": "ElementDefinition.minValue[x]",
            "comment": "Except for date/date/instant, the type of the minValue[x] SHALL be the same as the specified type of the element. For the date/dateTime/instant values, the type of minValue[x] SHALL be either the same, or a a [Duration](datatypes.html#duration) which specifies a relative time limit to the current time. The duration value is positive, and is subtracted from the current clock to determine the minimum allowable value.   A minimum value for a Quantity is interpreted as an canonical minimum - e.g. you cannot provide 100mg if the minimum value is 10g.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.minValue[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "instant"
              },
              {
                "code": "time"
              },
              {
                "code": "decimal"
              },
              {
                "code": "integer"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "Quantity"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.maxValue[x]",
            "path": "ElementDefinition.maxValue[x]",
            "comment": "Except for date/date/instant, the type of the maxValue[x] SHALL be the same as the specified type of the element. For the date/dateTime/instant values, the type of maxValue[x] SHALL be either the same, or a a [Duration](datatypes.html#duration) which specifies a relative time limit to the current time. The duration value is positive, and is added to the current clock to determine the maximum allowable value.   A maximum value for a Quantity is interpreted as an canonical maximum - e.g. you cannot provide 10g if the maximum value is 50mg.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.maxValue[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "instant"
              },
              {
                "code": "time"
              },
              {
                "code": "decimal"
              },
              {
                "code": "integer"
              },
              {
                "code": "positiveInt"
              },
              {
                "code": "unsignedInt"
              },
              {
                "code": "Quantity"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.maxLength",
            "path": "ElementDefinition.maxLength",
            "comment": "Receivers are not required to reject instances that exceed the maximum length.  The full length could be stored.  In some cases, data might be truncated, though truncation should be undertaken with care and an understanding of the consequences of doing so. If not specified, there is no conformance expectation for length support.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.maxLength",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "integer"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.condition",
            "path": "ElementDefinition.condition",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.condition",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint",
            "path": "ElementDefinition.constraint",
            "comment": "Constraints should be declared on the \"context\" element - the lowest element in the hierarchy that is common to all nodes referenced by the constraint.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.constraint",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.id",
            "path": "ElementDefinition.constraint.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.constraint.extension",
            "path": "ElementDefinition.constraint.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.constraint.key",
            "path": "ElementDefinition.constraint.key",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.key",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "condition": [
              "eld-14"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.requirements",
            "path": "ElementDefinition.constraint.requirements",
            "comment": "To be used if the reason for the constraint may not be intuitive to all implementers.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.requirements",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.severity",
            "path": "ElementDefinition.constraint.severity",
            "comment": "This allows constraints to be asserted as \"shall\" (error) and \"should\" (warning).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.severity",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ConstraintSeverity"
                }
              ],
              "strength": "required",
              "description": "SHALL applications comply with this constraint?",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/constraint-severity"
              }
            }
          },
          {
            "id": "ElementDefinition.constraint.human",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.constraint.human",
            "comment": "Should be expressed in business terms as much as possible.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.human",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.expression",
            "path": "ElementDefinition.constraint.expression",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.expression",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.xpath",
            "path": "ElementDefinition.constraint.xpath",
            "comment": "Elements SHALL use \"f\" as the namespace prefix for the FHIR namespace, and \"x\" for the xhtml namespace, and SHALL NOT use any other prefixes. \n\nNote: we are considering deprecating the xpath element. Implementer feedback is welcome.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.xpath",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.constraint.source",
            "path": "ElementDefinition.constraint.source",
            "comment": "This is used when, e.g. rendering, where it is not useful to present inherited constraints when rendering the snapshot.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.constraint.source",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.mustSupport",
            "path": "ElementDefinition.mustSupport",
            "comment": "\"Something useful\" is context dependent and impossible to describe in the base FHIR specification. For this reason, tue mustSupport flag is never set to true by the FHIR specification itself - it is only set to true in profiles. \n\nThis is done in [Resource Profiles](profiling.html#mustsupport), where the profile labels an element as mustSupport=true. When a profile does this, it SHALL also make clear exactly what kind of \"support\" is required, as this can mean many things.\n\nNote that an element that has the property IsModifier is not necessarily a \"key\" element (e.g. one of the important elements to make use of the resource), nor is it automatically mustSupport - however both of these things are more likely to be true for IsModifier elements than for other elements.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.mustSupport",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isSummary": true
          },
          {
            "id": "ElementDefinition.isModifier",
            "path": "ElementDefinition.isModifier",
            "comment": "Only the definition of an element can set IsModifier true - either the specification itself or where an extension is originally defined. Once set, it cannot be changed in derived profiles. An element/extension that has isModifier=true SHOULD also have a minimum cardinality of 1, so that there is no lack of clarity about what to do if it is missing. If it can be missing, the definition SHALL make the meaning of a missing element clear.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.isModifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isSummary": true
          },
          {
            "id": "ElementDefinition.isSummary",
            "path": "ElementDefinition.isSummary",
            "comment": "Some resources include a set of simple metadata, and some very large data. This element is used to reduce the quantity of data returned in searches. Note that servers may pre-cache summarized resources for optimal performance, so servers may not support per-profile use of the isSummary flag. When a request is made with _summary=true, serailisers only include elements marked as 'isSummary = true'. Other than Attachment.data, all data type properties are included in the summary form. Modifier elements or elements with minimum cardinality = 1 must be marked as summary elements.",
            "min": 0,
            "max": "0",
            "base": {
              "path": "ElementDefinition.isSummary",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "isSummary": true
          },
          {
            "id": "ElementDefinition.binding",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
                "valueString": "ElementDefinitionBinding"
              }
            ],
            "path": "ElementDefinition.binding",
            "comment": "For a CodeableConcept, when no codes are allowed - only text, use a binding of strength \"required\" with a description explaining that no coded values are allowed and what sort of information to put in the \"text\" element.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.binding",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "condition": [
              "eld-11"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "eld-10",
                "severity": "error",
                "human": "provide either a reference or a description (or both)",
                "expression": "valueSet.exists() or description.exists()",
                "xpath": "(exists(f:valueSetUri) or exists(f:valueSetReference)) or exists(f:description)"
              },
              {
                "key": "eld-12",
                "severity": "error",
                "human": "ValueSet as a URI SHALL start with http:// or https:// or urn:",
                "expression": "valueSet.is(uri).not() or valueSet.as(uri).startsWith('http:') or valueSet.as(uri).startsWith('https') or valueSet.as(uri).startsWith('urn:')",
                "xpath": "not(exists(f:valueSetUri)) or (starts-with(string(f:valueSetUri/@value), 'http:') or starts-with(string(f:valueSetUri/@value), 'https:') or starts-with(string(f:valueSetUri/@value), 'urn:'))"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.binding.id",
            "path": "ElementDefinition.binding.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.binding.extension",
            "path": "ElementDefinition.binding.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.binding.strength",
            "path": "ElementDefinition.binding.strength",
            "comment": "For further discussion, see [Using Terminologies](terminologies.html).",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.binding.strength",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "BindingStrength"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "Indication of the degree of conformance expectations associated with a binding.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/binding-strength"
              }
            }
          },
          {
            "id": "ElementDefinition.binding.description",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
                "valueBoolean": true
              }
            ],
            "path": "ElementDefinition.binding.description",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.binding.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "condition": [
              "eld-10"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.binding.valueSet[x]",
            "path": "ElementDefinition.binding.valueSet[x]",
            "comment": "For value sets with a referenceResource, the display can contain the value set description.  The reference may be version-specific or not.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.binding.valueSet[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ValueSet"
              }
            ],
            "condition": [
              "eld-10",
              "eld-12"
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.mapping",
            "path": "ElementDefinition.mapping",
            "comment": "Mappings are not necessarily specific enough for safe translation.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "ElementDefinition.mapping",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Element"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.mapping.id",
            "path": "ElementDefinition.mapping.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "ElementDefinition.mapping.extension",
            "path": "ElementDefinition.mapping.extension",
            "slicing": {
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "description": "Extensions are always sliced by (at least) url",
              "rules": "open"
            },
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "ElementDefinition.mapping.identity",
            "path": "ElementDefinition.mapping.identity",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.mapping.identity",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.mapping.language",
            "path": "ElementDefinition.mapping.language",
            "comment": "If omitted, then there can be no expectation of computational interpretation of the mapping.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.mapping.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "MimeType"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The mime type of an attachment. Any valid mime type is allowed.",
              "valueSetUri": "http://www.rfc-editor.org/bcp/bcp13.txt"
            }
          },
          {
            "id": "ElementDefinition.mapping.map",
            "path": "ElementDefinition.mapping.map",
            "comment": "For most mappings, the syntax is undefined.  Syntax will be provided for mappings to the RIM.  Multiple mappings may be possible and may include constraints on other resource elements that identify when a particular mapping applies.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "ElementDefinition.mapping.map",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "ElementDefinition.mapping.comment",
            "path": "ElementDefinition.mapping.comment",
            "min": 0,
            "max": "1",
            "base": {
              "path": "ElementDefinition.mapping.comment",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "ElementDefinition",
            "path": "ElementDefinition",
            "min": 0,
            "max": "*"
          },
          {
            "id": "ElementDefinition.extension:question",
            "path": "ElementDefinition.extension",
            "sliceName": "Question",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/elementdefinition-question"
              }
            ]
          },
          {
            "id": "ElementDefinition.extension:allowedunits",
            "path": "ElementDefinition.extension",
            "sliceName": "AllowedUnits",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/elementdefinition-allowedUnits"
              }
            ]
          },
          {
            "id": "ElementDefinition.representation",
            "path": "ElementDefinition.representation",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.slicing",
            "path": "ElementDefinition.slicing",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.short",
            "path": "ElementDefinition.short",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.contentReference",
            "path": "ElementDefinition.contentReference",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.type",
            "path": "ElementDefinition.type"
          },
          {
            "id": "ElementDefinition.type.profile",
            "path": "ElementDefinition.type.profile",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.type.aggregation",
            "path": "ElementDefinition.type.aggregation",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.defaultValue[x]",
            "path": "ElementDefinition.defaultValue[x]",
            "comment": "...  This element should only be used on child elements of complex data elements."
          },
          {
            "id": "ElementDefinition.meaningWhenMissing",
            "path": "ElementDefinition.meaningWhenMissing",
            "comment": "...  This element should only be used on child elements of complex data elements."
          },
          {
            "id": "ElementDefinition.fixed[x]",
            "path": "ElementDefinition.fixed[x]",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.pattern[x]",
            "path": "ElementDefinition.pattern[x]",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.isModifier",
            "path": "ElementDefinition.isModifier",
            "min": 0,
            "max": "0"
          },
          {
            "id": "ElementDefinition.isSummary",
            "path": "ElementDefinition.isSummary",
            "min": 0,
            "max": "0"
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/ehrsrle-auditevent",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "ehrsrle-auditevent",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "ehr"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/ehrsrle-auditevent",
      "name": "EHRS FM Record Lifecycle Event - Audit Event",
      "status": "draft",
      "experimental": false,
      "date": "2014-12-04",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "AuditEvent",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AuditEvent",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "AuditEvent",
            "path": "AuditEvent",
            "comment": "Based on ATNA (RFC 3881).",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "AuditEvent.id",
            "path": "AuditEvent.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "AuditEvent.meta",
            "path": "AuditEvent.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "AuditEvent.implicitRules",
            "path": "AuditEvent.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.language",
            "path": "AuditEvent.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "AuditEvent.text",
            "path": "AuditEvent.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "AuditEvent.contained",
            "path": "AuditEvent.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "AuditEvent.extension",
            "path": "AuditEvent.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.modifierExtension",
            "path": "AuditEvent.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "AuditEvent.type",
            "path": "AuditEvent.type",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventType"
                }
              ],
              "strength": "extensible",
              "description": "Type of event.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-event-type"
              }
            }
          },
          {
            "id": "AuditEvent.subtype",
            "path": "AuditEvent.subtype",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.subtype",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventSubType"
                }
              ],
              "strength": "extensible",
              "description": "Sub-type of event.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-event-sub-type"
              }
            }
          },
          {
            "id": "AuditEvent.action",
            "path": "AuditEvent.action",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.action",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventAction"
                }
              ],
              "strength": "required",
              "description": "Indicator for type of action performed during the event that generated the event",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-event-action"
              }
            }
          },
          {
            "id": "AuditEvent.recorded",
            "path": "AuditEvent.recorded",
            "comment": "In a distributed system, some sort of common time base (e.g. an NTP [RFC1305] server) is a good implementation tactic.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.recorded",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.outcome",
            "path": "AuditEvent.outcome",
            "comment": "In some cases a \"success\" may be partial, for example, an incomplete or interrupted transfer of a radiological study. For the purpose of establishing accountability, these distinctions are not relevant.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.outcome",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventOutcome"
                }
              ],
              "strength": "required",
              "description": "Indicates whether the event succeeded or failed",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-event-outcome"
              }
            }
          },
          {
            "id": "AuditEvent.outcomeDesc",
            "path": "AuditEvent.outcomeDesc",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.outcomeDesc",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "AuditEvent.purposeOfEvent",
            "path": "AuditEvent.purposeOfEvent",
            "comment": "Use AuditEvent.agent.purposeOfUse when you know that it is specific to the agent, otherwise use AuditEvent.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.purposeOfEvent",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditPurposeOfUse"
                }
              ],
              "strength": "extensible",
              "description": "The reason the activity took place.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "AuditEvent.agent",
            "path": "AuditEvent.agent",
            "comment": "Several agents may be associated (i.e. have some responsibility for an activity) with an event or activity.\n\nFor example, an activity may be initiated by one user for other users or involve more than one user. However, only one user may be the initiator/requestor for the activity.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "AuditEvent.agent",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.id",
            "path": "AuditEvent.agent.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.extension",
            "path": "AuditEvent.agent.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.modifierExtension",
            "path": "AuditEvent.agent.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.agent.role",
            "path": "AuditEvent.agent.role",
            "comment": "Should be roles relevant to the event. Should  not be an exhaustive list of roles.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.agent.role",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditAgentRole"
                }
              ],
              "strength": "extensible",
              "description": "What security role enabled the agent to participate in the event",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
              }
            }
          },
          {
            "id": "AuditEvent.agent.reference",
            "path": "AuditEvent.agent.reference",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.reference",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.agent.userId",
            "path": "AuditEvent.agent.userId",
            "comment": "A unique value within the Audit Source ID. For node-based authentication -- where only the system hardware or process, but not a human user, is identified -- User ID would be the node name.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.userId",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.agent.altId",
            "path": "AuditEvent.agent.altId",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.altId",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.name",
            "path": "AuditEvent.agent.name",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.requestor",
            "path": "AuditEvent.agent.requestor",
            "comment": "There can only be one initiator. If the initiator is not clear, then do not choose any one agent as the initiator.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.requestor",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.location",
            "path": "AuditEvent.agent.location",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.location",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.policy",
            "path": "AuditEvent.agent.policy",
            "comment": "For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.agent.policy",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.media",
            "path": "AuditEvent.agent.media",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.media",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "DICOMMediaType"
                }
              ],
              "strength": "extensible",
              "description": "Used when the event is about exporting/importing onto media.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/dicm-405-mediatype"
              }
            }
          },
          {
            "id": "AuditEvent.agent.network",
            "path": "AuditEvent.agent.network",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.network",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.network.id",
            "path": "AuditEvent.agent.network.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.network.extension",
            "path": "AuditEvent.agent.network.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.agent.network.modifierExtension",
            "path": "AuditEvent.agent.network.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.agent.network.address",
            "path": "AuditEvent.agent.network.address",
            "comment": "This could be a device id, IP address or some other identifier associated with a device.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.network.address",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.network.type",
            "path": "AuditEvent.agent.network.type",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.agent.network.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventAgentNetworkType"
                }
              ],
              "strength": "required",
              "description": "The type of network access point of this agent in the audit event",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/network-type"
              }
            }
          },
          {
            "id": "AuditEvent.agent.purposeOfUse",
            "path": "AuditEvent.agent.purposeOfUse",
            "comment": "Use AuditEvent.agent.purposeOfUse when you know that is specific to the agent, otherwise use AuditEvent.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.agent.purposeOfUse",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditPurposeOfUse"
                }
              ],
              "strength": "extensible",
              "description": "The reason the activity took place.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "AuditEvent.source",
            "path": "AuditEvent.source",
            "comment": "Since multi-tier, distributed, or composite applications make source identification ambiguous, this collection of fields may repeat for each application or process actively involved in the event. For example, multiple value-sets can identify participating web servers, application processes, and database server threads in an n-tier distributed application. Passive event participants (e.g. low-level network transports) need not be identified.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.source",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source.id",
            "path": "AuditEvent.source.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.source.extension",
            "path": "AuditEvent.source.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.source.modifierExtension",
            "path": "AuditEvent.source.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.source.site",
            "path": "AuditEvent.source.site",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.source.site",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source.identifier",
            "path": "AuditEvent.source.identifier",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.source.identifier",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.source.type",
            "path": "AuditEvent.source.type",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.source.type",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventSourceType"
                }
              ],
              "strength": "extensible",
              "description": "Code specifying the type of system that detected and recorded the event.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-source-type"
              }
            }
          },
          {
            "id": "AuditEvent.entity",
            "path": "AuditEvent.entity",
            "comment": "Required unless the values for event identification, agent identification, and audit source identification are sufficient to document the entire auditable event. Because events may have more than one entity, this group can be a repeating set of values.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.entity",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "sev-1",
                "severity": "error",
                "human": "Either a name or a query (NOT both)",
                "expression": "name.empty() or query.empty()",
                "xpath": "not(exists(f:name)) or not(exists(f:query))",
                "source": "AuditEvent.entity"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.id",
            "path": "AuditEvent.entity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.extension",
            "path": "AuditEvent.entity.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.modifierExtension",
            "path": "AuditEvent.entity.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.identifier",
            "path": "AuditEvent.entity.identifier",
            "comment": "Identifier detail depends on entity type.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.identifier",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.reference",
            "path": "AuditEvent.entity.reference",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.reference",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.type",
            "path": "AuditEvent.entity.type",
            "comment": "This value is distinct from the user's role or any user relationship to the entity.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.type",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventEntityType"
                }
              ],
              "strength": "extensible",
              "description": "Code for the entity type involved in the audit event",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/audit-entity-type"
              }
            }
          },
          {
            "id": "AuditEvent.entity.role",
            "path": "AuditEvent.entity.role",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.role",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventEntityRole"
                }
              ],
              "strength": "extensible",
              "description": "Code representing the role the entity played in the audit event",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/object-role"
              }
            }
          },
          {
            "id": "AuditEvent.entity.lifecycle",
            "path": "AuditEvent.entity.lifecycle",
            "comment": "This can be used to provide an audit trail for data, over time, as it passes through the system.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.lifecycle",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "AuditEventEntityLifecycle"
                }
              ],
              "strength": "extensible",
              "description": "Identifier for the data life-cycle stage for the entity",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/object-lifecycle-events"
              }
            }
          },
          {
            "id": "AuditEvent.entity.securityLabel",
            "path": "AuditEvent.entity.securityLabel",
            "comment": "Copied from entity meta security tags.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.entity.securityLabel",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "SecurityLabels"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "Security Labels from the Healthcare Privacy and Security Classification System.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/security-labels"
              }
            }
          },
          {
            "id": "AuditEvent.entity.name",
            "path": "AuditEvent.entity.name",
            "comment": "This field may be used in a query/report to identify audit events for a specific person.  For example, where multiple synonymous entity identifiers (patient number, medical record number, encounter number, etc.) have been used.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "condition": [
              "sev-1"
            ],
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.description",
            "path": "AuditEvent.entity.description",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.query",
            "path": "AuditEvent.entity.query",
            "min": 0,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.query",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              }
            ],
            "condition": [
              "sev-1"
            ],
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.detail",
            "path": "AuditEvent.entity.detail",
            "min": 0,
            "max": "*",
            "base": {
              "path": "AuditEvent.entity.detail",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.detail.id",
            "path": "AuditEvent.entity.detail.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.detail.extension",
            "path": "AuditEvent.entity.detail.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.detail.modifierExtension",
            "path": "AuditEvent.entity.detail.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "AuditEvent.entity.detail.type",
            "path": "AuditEvent.entity.detail.type",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.detail.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "AuditEvent.entity.detail.value",
            "path": "AuditEvent.entity.detail.value",
            "comment": "The value is base64 encoded to enable various encodings or binary content.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "AuditEvent.entity.detail.value",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "base64Binary"
              }
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "AuditEvent",
            "path": "AuditEvent",
            "min": 0,
            "max": "*"
          },
          {
            "id": "AuditEvent.type",
            "path": "AuditEvent.type",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.subtype",
            "path": "AuditEvent.subtype",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.action",
            "path": "AuditEvent.action",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.recorded",
            "path": "AuditEvent.recorded",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.purposeOfEvent",
            "path": "AuditEvent.purposeOfEvent",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent",
            "path": "AuditEvent.agent",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.role",
            "path": "AuditEvent.agent.role",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.reference",
            "path": "AuditEvent.agent.reference",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.userId",
            "path": "AuditEvent.agent.userId",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.requestor",
            "path": "AuditEvent.agent.requestor",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.location",
            "path": "AuditEvent.agent.location",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.policy",
            "path": "AuditEvent.agent.policy",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.network",
            "path": "AuditEvent.agent.network",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.network.address",
            "path": "AuditEvent.agent.network.address",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.network.type",
            "path": "AuditEvent.agent.network.type",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.agent.purposeOfUse",
            "path": "AuditEvent.agent.purposeOfUse",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source",
            "path": "AuditEvent.source",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source.site",
            "path": "AuditEvent.source.site",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source.identifier",
            "path": "AuditEvent.source.identifier",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.source.type",
            "path": "AuditEvent.source.type",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity",
            "path": "AuditEvent.entity",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.identifier",
            "path": "AuditEvent.entity.identifier",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.reference",
            "path": "AuditEvent.entity.reference",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.type",
            "path": "AuditEvent.entity.type",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.role",
            "path": "AuditEvent.entity.role",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.lifecycle",
            "path": "AuditEvent.entity.lifecycle",
            "mustSupport": true
          },
          {
            "id": "AuditEvent.entity.securityLabel",
            "path": "AuditEvent.entity.securityLabel",
            "mustSupport": true
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/ehrsrle-provenance",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "ehrsrle-provenance",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
          "valueCode": "ehr"
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/ehrsrle-provenance",
      "name": "EHRS FM Record Lifecycle Event - Provenance",
      "status": "draft",
      "experimental": false,
      "date": "2014-01-31",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Provenance",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Provenance",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Provenance",
            "path": "Provenance",
            "comment": "Some parties may be duplicated between the target resource and its provenance.  For instance, the prescriber is usually (but not always) the author of the prescription resource. This resource is defined with close consideration for W3C Provenance.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              }
            ]
          },
          {
            "id": "Provenance.id",
            "path": "Provenance.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Provenance.meta",
            "path": "Provenance.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Provenance.implicitRules",
            "path": "Provenance.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Provenance.language",
            "path": "Provenance.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Provenance.text",
            "path": "Provenance.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Provenance.contained",
            "path": "Provenance.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Provenance.extension",
            "path": "Provenance.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Provenance.modifierExtension",
            "path": "Provenance.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Provenance.target",
            "path": "Provenance.target",
            "comment": "Target references are usually version specific, but may not be, if a version has not been assigned or if the provenance information is part of the set of resources being maintained (i.e. a document). When using the RESTful API, the identity of the resource may not be known (especially not the version specific one); the client may either submit the resource first, and then the provenance, or it may submit both using a single transaction. See the notes on transaction for further discussion.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Provenance.target",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Provenance.period",
            "path": "Provenance.period",
            "comment": "The period can be a little arbitrary; where possible, the time should correspond to human assessment of the activity time.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Provenance.period",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Provenance.recorded",
            "path": "Provenance.recorded",
            "comment": "This can be a little different from the time stamp on the resource if there is a delay between recording the event and updating the provenance and target resource.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Provenance.recorded",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "instant"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Provenance.policy",
            "path": "Provenance.policy",
            "comment": "For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.policy",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Provenance.location",
            "path": "Provenance.location",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Provenance.location",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Provenance.reason",
            "path": "Provenance.reason",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.reason",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProvenanceReason"
                }
              ],
              "strength": "extensible",
              "description": "The reason the activity took place.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
              }
            }
          },
          {
            "id": "Provenance.activity",
            "path": "Provenance.activity",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Provenance.activity",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "mustSupport": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProvenanceActivity"
                }
              ],
              "strength": "extensible",
              "description": "The activity that took place.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/provenance-activity-type"
              }
            }
          },
          {
            "id": "Provenance.agent",
            "path": "Provenance.agent",
            "comment": "Several agents may be associated (i.e. has some responsibility for an activity) with an activity and vice-versa.",
            "min": 1,
            "max": "*",
            "base": {
              "path": "Provenance.agent",
              "min": 1,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Provenance.agent.id",
            "path": "Provenance.agent.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Provenance.agent.extension",
            "path": "Provenance.agent.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Provenance.agent.modifierExtension",
            "path": "Provenance.agent.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Provenance.agent.role",
            "path": "Provenance.agent.role",
            "comment": "For example: author, performer, enterer, attester, doctor, nurse, clerk, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.agent.role",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProvenanceAgentRole"
                }
              ],
              "strength": "extensible",
              "description": "The role that a provenance agent played with respect to the activity.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
              }
            }
          },
          {
            "id": "Provenance.agent.who[x]",
            "path": "Provenance.agent.who[x]",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Provenance.agent.who[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "mustSupport": true,
            "isSummary": true
          },
          {
            "id": "Provenance.agent.onBehalfOf[x]",
            "path": "Provenance.agent.onBehalfOf[x]",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Provenance.agent.onBehalfOf[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
              }
            ],
            "mustSupport": true
          },
          {
            "id": "Provenance.agent.relatedAgentType",
            "path": "Provenance.agent.relatedAgentType",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Provenance.agent.relatedAgentType",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "RelatedAgentType"
                }
              ],
              "strength": "example",
              "description": "Type of relationship between two provenance agents.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/v3-RoleLinkType"
              }
            }
          },
          {
            "id": "Provenance.entity",
            "path": "Provenance.entity",
            "comment": "Multiple userIds may be associated with the same Practitioner or other individual across various appearances, each with distinct privileges.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.entity",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "Provenance.entity.id",
            "path": "Provenance.entity.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Provenance.entity.extension",
            "path": "Provenance.entity.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Provenance.entity.modifierExtension",
            "path": "Provenance.entity.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Provenance.entity.role",
            "path": "Provenance.entity.role",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Provenance.entity.role",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ProvenanceEntityRole"
                }
              ],
              "strength": "required",
              "description": "How an entity was used in an activity.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/provenance-entity-role"
              }
            }
          },
          {
            "id": "Provenance.entity.what[x]",
            "path": "Provenance.entity.what[x]",
            "comment": "Identity may be a reference to a resource or to something else, depending on the type.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Provenance.entity.what[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              },
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Provenance.entity.agent",
            "path": "Provenance.entity.agent",
            "comment": "A usecase where one Provenance.entity.agent is used where the Entity that was used in the creation/updating of the Target, is not in the context of the same custodianship as the Target, and thus the meaning of Provenance.entity.agent is to say that the entity referenced is managed elsewhere and that this Agent provided access to it.  This would be similar to where the Entity being referenced is managed outside FHIR, such as through HL7 v2, v3, or XDS. This might be where the Entity being referenced is managed in another FHIR resource server. Thus it explains the Provenance of that Entity's use in the context of this Provenance activity.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.entity.agent",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Provenance.agent"
          },
          {
            "id": "Provenance.signature",
            "path": "Provenance.signature",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Provenance.signature",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Signature"
              }
            ],
            "mustSupport": true
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Provenance",
            "path": "Provenance",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Provenance.target",
            "path": "Provenance.target",
            "mustSupport": true
          },
          {
            "id": "Provenance.period",
            "path": "Provenance.period",
            "mustSupport": true
          },
          {
            "id": "Provenance.recorded",
            "path": "Provenance.recorded",
            "mustSupport": true
          },
          {
            "id": "Provenance.policy",
            "path": "Provenance.policy",
            "mustSupport": true
          },
          {
            "id": "Provenance.location",
            "path": "Provenance.location",
            "mustSupport": true
          },
          {
            "id": "Provenance.reason",
            "path": "Provenance.reason",
            "mustSupport": true
          },
          {
            "id": "Provenance.activity",
            "path": "Provenance.activity",
            "mustSupport": true
          },
          {
            "id": "Provenance.agent",
            "path": "Provenance.agent",
            "mustSupport": true
          },
          {
            "id": "Provenance.agent.who[x]",
            "path": "Provenance.agent.who[x]",
            "mustSupport": true
          },
          {
            "id": "Provenance.agent.onBehalfOf[x]",
            "path": "Provenance.agent.onBehalfOf[x]",
            "mustSupport": true
          },
          {
            "id": "Provenance.signature",
            "path": "Provenance.signature",
            "mustSupport": true
          }
        ]
      }
    }
  },
  {
    "fullUrl": "http://hl7.org/fhir/StructureDefinition/cqif-questionnaire",
    "resource": {
      "resourceType": "StructureDefinition",
      "id": "cqif-questionnaire",
      "url": "http://hl7.org/fhir/StructureDefinition/cqif-questionnaire",
      "name": "CQIF-Questionnaire",
      "status": "draft",
      "experimental": false,
      "date": "2015-05-30",
      "fhirVersion": "3.0.0",
      "kind": "resource",
      "abstract": false,
      "type": "Questionnaire",
      "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
      "derivation": "constraint",
      "snapshot": {
        "element": [
          {
            "id": "Questionnaire",
            "path": "Questionnaire",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire",
              "min": 0,
              "max": "*"
            },
            "constraint": [
              {
                "key": "dom-2",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                "expression": "contained.contained.empty()",
                "xpath": "not(parent::f:contained and f:contained)",
                "source": "DomainResource"
              },
              {
                "key": "dom-1",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
                "expression": "contained.text.empty()",
                "xpath": "not(parent::f:contained and f:text)",
                "source": "DomainResource"
              },
              {
                "key": "dom-4",
                "severity": "error",
                "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                "source": "DomainResource"
              },
              {
                "key": "dom-3",
                "severity": "error",
                "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
                "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()",
                "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
                "source": "DomainResource"
              },
              {
                "key": "que-2",
                "severity": "error",
                "human": "The link ids for groups and questions must be unique within the questionnaire",
                "expression": "descendants().linkId.isDistinct()",
                "xpath": "count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value))",
                "source": "Questionnaire"
              }
            ]
          },
          {
            "id": "Questionnaire.id",
            "path": "Questionnaire.id",
            "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "id"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.meta",
            "path": "Questionnaire.meta",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.meta",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Meta"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.implicitRules",
            "path": "Questionnaire.implicitRules",
            "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.implicitRules",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.language",
            "path": "Questionnaire.language",
            "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Resource.language",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                  "valueReference": {
                    "reference": "http://hl7.org/fhir/ValueSet/all-languages"
                  }
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Language"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "A human language.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/languages"
              }
            }
          },
          {
            "id": "Questionnaire.text",
            "path": "Questionnaire.text",
            "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "DomainResource.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "condition": [
              "dom-1"
            ]
          },
          {
            "id": "Questionnaire.contained",
            "path": "Questionnaire.contained",
            "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.contained",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Resource"
              }
            ]
          },
          {
            "id": "Questionnaire.extension",
            "path": "Questionnaire.extension",
            "slicing": {
              "id": "6",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.extension:library",
            "path": "Questionnaire.extension",
            "sliceName": "library",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-library"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.modifierExtension",
            "path": "Questionnaire.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "DomainResource.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true
          },
          {
            "id": "Questionnaire.url",
            "path": "Questionnaire.url",
            "comment": "Can be a urn:uuid: or a urn:oid:, but real http: addresses are preferred.  Multiple instances may share the same url if they have a distinct version.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.url",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.identifier",
            "path": "Questionnaire.identifier",
            "comment": "Typically, this is used for identifiers that can go in an HL7 V3 II (instance identifier) data type, e.g., to identify this questionnaire outside of FHIR, where it is not possible to use the logical URI.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.identifier",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.version",
            "path": "Questionnaire.version",
            "comment": "There may be different questionnaire instances that have the same identifier but different versions.  The version can be appended to the url in a reference to allow a refrence to a particular business version of the questionnaire with the format [url]|[version].",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.version",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.name",
            "path": "Questionnaire.name",
            "comment": "The name is not expected to be globally unique. The name should be a simple alpha-numeric type name to ensure that it is computable friendly.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.name",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.title",
            "path": "Questionnaire.title",
            "comment": "This name does not need to be machine-processing friendly and may contain punctuation, white-space, etc.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.title",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.status",
            "path": "Questionnaire.status",
            "comment": "Allows filtering of questionnaires that are appropriate for use vs. not.  \nThis is labeled as \"Is Modifier\" because applications should not use a retired questionnaire without due consideration.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Questionnaire.status",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "PublicationStatus"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "The lifecycle status of a Value Set or Concept Map.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/publication-status"
              }
            }
          },
          {
            "id": "Questionnaire.experimental",
            "path": "Questionnaire.experimental",
            "comment": "Allows filtering of questionnaire that are appropriate for use vs. not. This is labeled as \"Is Modifier\" because applications should not use an experimental questionnaire in production.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.experimental",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.date",
            "path": "Questionnaire.date",
            "comment": "Note that this is not the same as the resource last-modified-date, since the resource may be a secondary representation of the questionnaire. Additional specific dates may be added as extensions or be found by consulting Provenances associated with past versions of the resource.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.date",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.publisher",
            "path": "Questionnaire.publisher",
            "comment": "Usually an organization, but may be an individual. The publisher (or steward) of the questionnaire is the organization or individual primarily responsible for the maintenance and upkeep of the questionnaire. This is not necessarily the same individual or organization that developed and initially authored the content. The publisher is the primary point of contact for questions or issues with the questionnaire. This item SHOULD be populated unless the information is available from context.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.publisher",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.description",
            "path": "Questionnaire.description",
            "comment": "This description can be used to capture details such as why the questionnaire was built, comments about misuse, instructions for clinical use and interpretation, literature references, examples from the paper world, etc. It is not a rendering of the questionnaire as conveyed in the 'text' field of the resource itself. This item SHOULD be populated unless the information is available from context (e.g. the language of the profile is presumed to be the predominant language in the place the profile was created).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.description",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "Questionnaire.purpose",
            "path": "Questionnaire.purpose",
            "comment": "This element does not describe the usage of the questionnaire Instead  it provides traceability of ''why'' the resource is either needed or ''why'' it is defined as it is.  This may be used to point to source materials or specifications that drove the structure of this questionnaire.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.purpose",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "Questionnaire.approvalDate",
            "path": "Questionnaire.approvalDate",
            "comment": "The 'date' element may be more recent than the approval date because of minor changes / editorial corrections.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.approvalDate",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "date"
              }
            ]
          },
          {
            "id": "Questionnaire.lastReviewDate",
            "path": "Questionnaire.lastReviewDate",
            "comment": "If specified, this is usually after the approval date.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.lastReviewDate",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "date"
              }
            ]
          },
          {
            "id": "Questionnaire.effectivePeriod",
            "path": "Questionnaire.effectivePeriod",
            "comment": "The effective period for a questionnaire  determines when the content is applicable for usage and is independent of publication and review dates. For example, a measure intended to be used for the year 2016 might be published in 2015.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.effectivePeriod",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Period"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.useContext",
            "path": "Questionnaire.useContext",
            "comment": "When multiple useContexts are specified, there is no expectation whether all or any of the contexts apply.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.useContext",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "UsageContext"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.jurisdiction",
            "path": "Questionnaire.jurisdiction",
            "comment": "It may be possible for the questionnaire to be used in jurisdictions other than those for which it was originally designed or intended.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.jurisdiction",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "Jurisdiction"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "extensible",
              "description": "Countries and regions within which this artifact is targeted for use",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/jurisdiction"
              }
            }
          },
          {
            "id": "Questionnaire.contact",
            "path": "Questionnaire.contact",
            "comment": "May be a web site, an email address, a telephone number, etc.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.contact",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "ContactDetail"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.copyright",
            "path": "Questionnaire.copyright",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.copyright",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "markdown"
              }
            ]
          },
          {
            "id": "Questionnaire.code",
            "path": "Questionnaire.code",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.code",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireConcept"
                }
              ],
              "strength": "example",
              "description": "Codes for questionnaires, groups and individual questions",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/questionnaire-questions"
              }
            }
          },
          {
            "id": "Questionnaire.subjectType",
            "path": "Questionnaire.subjectType",
            "comment": "If none are specified, then the subject is unlimited.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.subjectType",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "ResourceType"
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                  "valueBoolean": true
                }
              ],
              "strength": "required",
              "description": "One of the resource types defined as part of FHIR.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/resource-types"
              }
            }
          },
          {
            "id": "Questionnaire.item",
            "path": "Questionnaire.item",
            "comment": "The content of the questionnaire is constructed from an ordered, hierarchical collection of items.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.item",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "que-3"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "que-9",
                "severity": "error",
                "human": "Read-only can't be specified for \"display\" items",
                "expression": "type!='display' or readOnly.empty()",
                "xpath": "not(f:type/@value='display' and f:readOnly)",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-8",
                "severity": "error",
                "human": "Default values can't be specified for groups or display items",
                "expression": "(type!='group' and type!='display') or initial.empty()",
                "xpath": "not(f:type/@value=('group', 'display') and f:*[starts-with(local-name(.), 'initial')])",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-6",
                "severity": "error",
                "human": "Required and repeat aren't permitted for display items",
                "expression": "type!='display' or (required.empty() and repeats.empty())",
                "xpath": "not(f:type/@value='display' and (f:required or f:repeats))",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-5",
                "severity": "error",
                "human": "Only 'choice' items can have options",
                "expression": "(type ='choice' or type = 'open-choice') or (options.empty() and option.empty())",
                "xpath": "f:type/@value=('choice','open-choice') or not(f:option or f:options)",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-4",
                "severity": "error",
                "human": "A question cannot have both option and options",
                "expression": "option.empty() or options.empty()",
                "xpath": "not(f:options and f:option)",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-3",
                "severity": "error",
                "human": "Display items cannot have a \"code\" asserted",
                "expression": "type!='display' or code.empty()",
                "xpath": "not(f:type/@value='display' and f:code)",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-10",
                "severity": "error",
                "human": "Maximum length can only be declared for simple question types",
                "expression": "(type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url')) or maxLength.empty()",
                "xpath": "f:type/@value=('boolean', 'decimal', 'integer', 'open-choice', 'string', 'text', 'url') or not(f:maxLength)",
                "source": "Questionnaire.item"
              },
              {
                "key": "que-1",
                "severity": "error",
                "human": "Group items must have nested items, display items cannot have nested items",
                "expression": "(type='group' implies item.empty().not()) and (type.trace('type')='display' implies item.trace('item').empty())",
                "xpath": "not((f:type/@value='group' and not(f:item)) or (f:type/@value='display' and f:item))",
                "source": "Questionnaire.item"
              }
            ]
          },
          {
            "id": "Questionnaire.item.id",
            "path": "Questionnaire.item.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension",
            "path": "Questionnaire.item.extension",
            "slicing": {
              "id": "7",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension:condition",
            "path": "Questionnaire.item.extension",
            "sliceName": "condition",
            "comment": "Note that per Lloyd this extension may not be necessary, it may be able to specified structurally using the elements already available within Questionnaire.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-condition"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension:initialvalue",
            "path": "Questionnaire.item.extension",
            "sliceName": "initialValue",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-initialValue"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension:calculatedvalue",
            "path": "Questionnaire.item.extension",
            "sliceName": "calculatedValue",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-calculatedValue"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.modifierExtension",
            "path": "Questionnaire.item.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.item.linkId",
            "path": "Questionnaire.item.linkId",
            "comment": "This ''can'' be a meaningful identifier (e.g. a LOINC code) but is not intended to have any meaning.  GUIDs or sequential numbers are appropriate here.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.linkId",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.definition",
            "path": "Questionnaire.item.definition",
            "comment": "the URI refers to an ElementDefinition in either a [StructureDefinition](structuredefinition.html#) or a [DataElement](dataelement.html#), and always starts with the canonical URL for the target resource. When referring to a StructureDefinition, a fragment identifier is used to specify the element definition by its id [Element.id](element-definitions.html#Element.id). E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]. In the absence of a fragment identifier, the first/root element definition in the target is the matching element definition. Note that [LOINC codes](loinc.html#dataelements) implicitly define DataElement resources.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.definition",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "uri"
              }
            ]
          },
          {
            "id": "Questionnaire.item.code",
            "path": "Questionnaire.item.code",
            "comment": "The value may come from the ElementDefinition referred to by .definition.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.item.code",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Coding"
              }
            ],
            "condition": [
              "que-3"
            ],
            "isSummary": true,
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireConcept"
                }
              ],
              "strength": "example",
              "description": "Codes for questionnaires, groups and individual questions",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/questionnaire-questions"
              }
            }
          },
          {
            "id": "Questionnaire.item.prefix",
            "path": "Questionnaire.item.prefix",
            "comment": "These are generally unique within a questionnaire, though this is not guaranteed. Some questionnaires may have multiple questions with the same label with logic to control which gets exposed.\n\nTypically these won't be used for \"display\" items, though such use is not prohibited.\n\nSystems SHOULD NOT generate their own prefixes if prefixes are defined for any items within a Questionnaire.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.prefix",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.text",
            "path": "Questionnaire.item.text",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.text",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ],
            "isSummary": true
          },
          {
            "id": "Questionnaire.item.type",
            "path": "Questionnaire.item.type",
            "comment": "Additional constraints on the type of answer can be conveyed by extensions. The value may come from the ElementDefinition referred to by .definition.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.type",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "code"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireItemType"
                }
              ],
              "strength": "required",
              "description": "Distinguishes groups from questions and display text and indicates data type for questions",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/item-type"
              }
            }
          },
          {
            "id": "Questionnaire.item.enableWhen",
            "path": "Questionnaire.item.enableWhen",
            "comment": "If multiple repetitions of this extension are present, the item should be enabled when the condition for *any* of the repetitions is true.  I.e. treat \"enableWhen\"s as being joined by an \"or\" clause.\n\nThis element is a modifier because if enableWhen is present for an item, \"required\" is ignored unless one of the enableWhen conditions is met.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.item.enableWhen",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "que-7",
                "severity": "error",
                "human": "enableWhen must contain either a 'answer' or a 'hasAnswer' element",
                "expression": "hasAnswer.exists() xor answer.exists()",
                "xpath": "count(f:*[starts-with(local-name(.), 'answer')]|self::f:hasAnswer) = 1"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.item.enableWhen.id",
            "path": "Questionnaire.item.enableWhen.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.enableWhen.extension",
            "path": "Questionnaire.item.enableWhen.extension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.enableWhen.modifierExtension",
            "path": "Questionnaire.item.enableWhen.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.item.enableWhen.question",
            "path": "Questionnaire.item.enableWhen.question",
            "comment": "If multiple question occurrences are present for the same question (same linkId), then this refers to the nearest question occurrence reachable by tracing first the \"ancestor\" axis and then the \"preceding\" axis and then the \"following\" axis.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.enableWhen.question",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.enableWhen.hasAnswer",
            "path": "Questionnaire.item.enableWhen.hasAnswer",
            "comment": "If answered=false and answer values are also provided, then they are treated as \"or\".  I.e. \"Enable if the question is unanswered or the answer is one of the specified values\".  If answered=true and answers are present, one of the specified answers must be met. (So there's little reason to specify answered=true if answers are present.).",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.enableWhen.hasAnswer",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "condition": [
              "que-7"
            ]
          },
          {
            "id": "Questionnaire.item.enableWhen.answer[x]",
            "path": "Questionnaire.item.enableWhen.answer[x]",
            "comment": "Multiple answers are treated as \"or\".  E.g. Enable if question 1 = A, C or E.  \n\nComponents not specified in the answer do not need to match.  For example, if enableWhen specifies code + system for a Coding, it is ok if the answer has a \"display\" element.  I.e. treat the answer as a 'pattern'.\n\nThe dataType of this element must be the same as the data type of the question being referenced.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.enableWhen.answer[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              },
              {
                "code": "decimal"
              },
              {
                "code": "integer"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "time"
              },
              {
                "code": "string"
              },
              {
                "code": "uri"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "Coding"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "condition": [
              "que-7"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireQuestionOption2"
                }
              ],
              "strength": "example",
              "description": "Allowed values to answer questions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/questionnaire-answers"
              }
            }
          },
          {
            "id": "Questionnaire.item.required",
            "path": "Questionnaire.item.required",
            "comment": "Questionnaire.item.required only has meaning for elements that are conditionally enabled with enableWhen if the condition evaluates to true.  If an item that contains other items is marked as required, that does not automatically make the contained elements required (though required groups must contain at least one child element). The value may come from the ElementDefinition referred to by .definition.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.required",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "condition": [
              "que-6"
            ]
          },
          {
            "id": "Questionnaire.item.repeats",
            "path": "Questionnaire.item.repeats",
            "comment": "If a question is marked as repeats=true, then multiple answers can be provided for the question in the corresponding QuestionnaireResponse.  When rendering the questionnaire, it is up to the rendering software whether to render the question text for each answer repetition or to simply list each of the answers beneath the question.  (Which is most appropriate visually may depend on the type of answer as well as whether there are nested items.). The value may come from the ElementDefinition referred to by .definition.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.repeats",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "defaultValueBoolean": false,
            "condition": [
              "que-6"
            ]
          },
          {
            "id": "Questionnaire.item.readOnly",
            "path": "Questionnaire.item.readOnly",
            "comment": "The value of readOnly elements can be established by asserting  extensions for defaultValues, linkages that support pre-population and/or extensions that support calculation based on other answers.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.readOnly",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              }
            ],
            "condition": [
              "que-9"
            ]
          },
          {
            "id": "Questionnaire.item.maxLength",
            "path": "Questionnaire.item.maxLength",
            "comment": "For base64binary, reflects the number of characters representing the encoded data, not the number of bytes of the binary data. The value may come from the ElementDefinition referred to by .definition.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.maxLength",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "integer"
              }
            ],
            "condition": [
              "que-10"
            ]
          },
          {
            "id": "Questionnaire.item.options",
            "path": "Questionnaire.item.options",
            "comment": "LOINC defines many useful value sets for questionnaire responses. See [LOINC Answer Lists](loinc.html#alist). The value may come from the ElementDefinition referred to by .definition.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.options",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/ValueSet"
              }
            ],
            "condition": [
              "que-4",
              "que-5"
            ]
          },
          {
            "id": "Questionnaire.item.option",
            "path": "Questionnaire.item.option",
            "comment": "This element can be used when the value set machinery of options is deemed too cumbersome or when there's a need to capture options that are not codes.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.item.option",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "BackboneElement"
              }
            ],
            "condition": [
              "que-4",
              "que-5"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              }
            ]
          },
          {
            "id": "Questionnaire.item.option.id",
            "path": "Questionnaire.item.option.id",
            "representation": [
              "xmlAttr"
            ],
            "min": 0,
            "max": "1",
            "base": {
              "path": "Element.id",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "string"
              }
            ]
          },
          {
            "id": "Questionnaire.item.option.extension",
            "path": "Questionnaire.item.option.extension",
            "slicing": {
              "id": "8",
              "discriminator": [
                {
                  "type": "value",
                  "path": "url"
                }
              ],
              "ordered": false,
              "rules": "open"
            },
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.option.extension:optioncode",
            "path": "Questionnaire.item.option.extension",
            "sliceName": "optionCode",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Element.extension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-optionCode"
              }
            ],
            "condition": [
              "ele-1"
            ],
            "constraint": [
              {
                "key": "ele-1",
                "severity": "error",
                "human": "All FHIR elements must have a @value or children",
                "expression": "hasValue() | (children().count() > id.count())",
                "xpath": "@value|f:*|h:div",
                "source": "Element"
              },
              {
                "key": "ext-1",
                "severity": "error",
                "human": "Must have either extensions or value[x], not both",
                "expression": "extension.exists() != value.exists()",
                "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                "source": "Extension"
              }
            ]
          },
          {
            "id": "Questionnaire.item.option.modifierExtension",
            "path": "Questionnaire.item.option.modifierExtension",
            "comment": "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.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "BackboneElement.modifierExtension",
              "min": 0,
              "max": "*"
            },
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": true,
            "isSummary": true
          },
          {
            "id": "Questionnaire.item.option.value[x]",
            "path": "Questionnaire.item.option.value[x]",
            "comment": "The data type of the value must agree with the item.type.",
            "min": 1,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.option.value[x]",
              "min": 1,
              "max": "1"
            },
            "type": [
              {
                "code": "integer"
              },
              {
                "code": "date"
              },
              {
                "code": "time"
              },
              {
                "code": "string"
              },
              {
                "code": "Coding"
              }
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireQuestionOption"
                }
              ],
              "strength": "example",
              "description": "Allowed values to answer questions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/questionnaire-answers"
              }
            }
          },
          {
            "id": "Questionnaire.item.initial[x]",
            "path": "Questionnaire.item.initial[x]",
            "comment": "The user is allowed to change the value and override the default (unless marked as read-only). If the user doesn't change the value, then this initial value will be persisted when the QuestionnaireResponse is initially created.  Note that default values can influence results.\n\nThe data type of initial[x] must agree with the item.type.",
            "min": 0,
            "max": "1",
            "base": {
              "path": "Questionnaire.item.initial[x]",
              "min": 0,
              "max": "1"
            },
            "type": [
              {
                "code": "boolean"
              },
              {
                "code": "decimal"
              },
              {
                "code": "integer"
              },
              {
                "code": "date"
              },
              {
                "code": "dateTime"
              },
              {
                "code": "time"
              },
              {
                "code": "string"
              },
              {
                "code": "uri"
              },
              {
                "code": "Attachment"
              },
              {
                "code": "Coding"
              },
              {
                "code": "Quantity"
              },
              {
                "code": "Reference",
                "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
              }
            ],
            "condition": [
              "que-8"
            ],
            "binding": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                  "valueString": "QuestionnaireQuestionOption2"
                }
              ],
              "strength": "example",
              "description": "Allowed values to answer questions.",
              "valueSetReference": {
                "reference": "http://hl7.org/fhir/ValueSet/questionnaire-answers"
              }
            }
          },
          {
            "id": "Questionnaire.item.item",
            "path": "Questionnaire.item.item",
            "comment": "There is no specified limit to the depth of nesting.  However, Questionnaire authors are encouraged to consider the impact on the user and user interface of overly deep nesting.",
            "min": 0,
            "max": "*",
            "base": {
              "path": "Questionnaire.item.item",
              "min": 0,
              "max": "*"
            },
            "contentReference": "#Questionnaire.item",
            "condition": [
              "que-1"
            ]
          }
        ]
      },
      "differential": {
        "element": [
          {
            "id": "Questionnaire",
            "path": "Questionnaire",
            "min": 0,
            "max": "*"
          },
          {
            "id": "Questionnaire.extension:library",
            "path": "Questionnaire.extension",
            "sliceName": "library",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-library"
              }
            ]
          },
          {
            "id": "Questionnaire.item",
            "path": "Questionnaire.item"
          },
          {
            "id": "Questionnaire.item.extension:condition",
            "path": "Questionnaire.item.extension",
            "sliceName": "condition",
            "comment": "Note that per Lloyd this extension may not be necessary, it may be able to specified structurally using the elements already available within Questionnaire.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-condition"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension:initialvalue",
            "path": "Questionnaire.item.extension",
            "sliceName": "initialValue",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-initialValue"
              }
            ]
          },
          {
            "id": "Questionnaire.item.extension:calculatedvalue",
            "path": "Questionnaire.item.extension",
            "sliceName": "calculatedValue",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-calculatedValue"
              }
            ]
          },
          {
            "id": "Questionnaire.item.option",
            "path": "Questionnaire.item.option"
          },
          {
            "id": "Questionnaire.item.option.extension:optioncode",
            "path": "Questionnaire.item.option.extension",
            "sliceName": "optionCode",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension",
                "profile": "http://hl7.org/fhir/StructureDefinition/cqif-optionCode"
              }
            ]
          }
        ]
      }
    }
  }
]

}