FHIR Release 3 (STU)

This page is part of the FHIR Specification (v3.0.2: STU 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3

Consent.profile.json

Community Based Collaborative Care Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Patient

Raw JSON (canonical form)

StructureDefinition for consent

{
  "resourceType": "StructureDefinition",
  "id": "Consent",
  "meta": {
    "lastUpdated": "2019-10-24T11:53:00+11:00"
  },
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 1
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "cbcc"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Consent",
  "name": "Consent",
  "status": "draft",
  "date": "2019-10-24T11:53:00+11:00",
  "publisher": "Health Level Seven International (Community Based Collaborative Care)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/cbcc/index.cfm"
        }
      ]
    }
  ],
  "description": "Base StructureDefinition for Consent Resource",
  "fhirVersion": "3.0.2",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Consent",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "Consent",
        "path": "Consent",
        "short": "A healthcare consumer's policy choices to permits or denies recipients or roles to perform actions for specific purposes and periods of time",
        "definition": "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.",
        "comment": "Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives.",
        "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": "ppc-1",
            "severity": "error",
            "human": "Either a Policy or PolicyRule",
            "expression": "policy.exists() or policyRule.exists()",
            "xpath": "exists(f:policy) or exists(f:policyRule)"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "rim",
            "map": "FinancialConsent"
          },
          {
            "identity": "w5",
            "map": "infrastructure.information"
          }
        ]
      },
      {
        "id": "Consent.id",
        "path": "Consent.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "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": "Consent.meta",
        "path": "Consent.meta",
        "short": "Metadata about the resource",
        "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.implicitRules",
        "path": "Consent.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.",
        "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": "Consent.language",
        "path": "Consent.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "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": "Consent.text",
        "path": "Consent.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
        "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.",
        "alias": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.text",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Narrative"
          }
        ],
        "condition": [
          "dom-1"
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"
          }
        ]
      },
      {
        "id": "Consent.contained",
        "path": "Consent.contained",
        "short": "Contained, inline Resources",
        "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
        "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.",
        "alias": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.contained",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Resource"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.extension",
        "path": "Consent.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.modifierExtension",
        "path": "Consent.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "short": "Identifier for this record (external references)",
        "definition": "Unique identifier for this copy of the Consent Statement.",
        "comment": "This identifier is identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueIdentifier": {
              "system": "urn:ietf:rfc:3986",
              "value": "Local eCMS identifier"
            }
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".id"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "short": "draft | proposed | active | rejected | inactive | entered-in-error",
        "definition": "Indicates the current state of this consent.",
        "comment": "This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid.",
        "requirements": "The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentState"
            }
          ],
          "strength": "required",
          "description": "Indicates the state of the consent",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-state-codes"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "HL7 Table 0498 - Consent Status"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "short": "Classification of the consent statement - for indexing/retrieval",
        "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentCategory"
            }
          ],
          "strength": "example",
          "description": "A classification of the type of consents found in a consent statement",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-category"
          }
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "CNTRCT"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "short": "Who the consent applies to",
        "definition": "The patient/healthcare consumer to whom this consent applies.",
        "comment": "Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          },
          {
            "identity": "w5",
            "map": "who.focus"
          }
        ]
      },
      {
        "id": "Consent.period",
        "path": "Consent.period",
        "short": "Period that this consent applies",
        "definition": "Relevant time or time-period when this Consent is applicable.",
        "comment": "This can be a subset of the period of the original statement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "meaningWhenMissing": "all date ranges included",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "FinancialConsent activityTime"
          },
          {
            "identity": "w5",
            "map": "when.done"
          }
        ]
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "short": "When this Consent was created or indexed",
        "definition": "When this  Consent was issued / created / indexed.",
        "comment": "This is not the time of the original consent, but the time that this statement was made or derived.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "FinancialConsent effectiveTime"
          },
          {
            "identity": "w5",
            "map": "when.recorded"
          }
        ]
      },
      {
        "id": "Consent.consentingParty",
        "path": "Consent.consentingParty",
        "short": "Who is agreeing to the policy and exceptions",
        "definition": "Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.",
        "comment": "Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian.",
        "alias": [
          "consentor"
        ],
        "min": 0,
        "max": "*",
        "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"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.actor"
          }
        ]
      },
      {
        "id": "Consent.actor",
        "path": "Consent.actor",
        "short": "Who|what controlled by this consent (or group, by role)",
        "definition": "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "There is no specific actor associated with the consent",
        "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,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.actor"
          }
        ]
      },
      {
        "id": "Consent.actor.id",
        "path": "Consent.actor.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.actor.extension",
        "path": "Consent.actor.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.actor.modifierExtension",
        "path": "Consent.actor.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.actor.role",
        "path": "Consent.actor.role",
        "short": "How the actor is involved",
        "definition": "How the individual is involved in the resources content that is described in the consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentActorRole"
            }
          ],
          "strength": "extensible",
          "description": "How an actor is involved in the consent considerations",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
          }
        }
      },
      {
        "id": "Consent.actor.reference",
        "path": "Consent.actor.reference",
        "short": "Resource for the actor (or group, by role)",
        "definition": "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 1,
        "max": "1",
        "type": [
          {
            "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/CareTeam"
          },
          {
            "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": "Consent.action",
        "path": "Consent.action",
        "short": "Actions controlled by this consent",
        "definition": "Actions controlled by this consent.",
        "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "meaningWhenMissing": "all actions",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentAction"
            }
          ],
          "strength": "example",
          "description": "Detailed codes for the consent action.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-action"
          }
        }
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "short": "Custodian of the consent",
        "definition": "The organization that manages the consent, and the framework within which it is executed.",
        "alias": [
          "custodian"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.witness"
          }
        ]
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "short": "Source from which this consent is taken",
        "definition": "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.",
        "comment": "The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Attachment"
          },
          {
            "code": "Identifier"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Consent"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "short": "Policies covered by this consent",
        "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.",
        "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": "Consent.policy.id",
        "path": "Consent.policy.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.policy.extension",
        "path": "Consent.policy.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.policy.modifierExtension",
        "path": "Consent.policy.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.policy.authority",
        "path": "Consent.policy.authority",
        "short": "Enforcement source for policy",
        "definition": "Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ]
      },
      {
        "id": "Consent.policy.uri",
        "path": "Consent.policy.uri",
        "short": "Specific policy covered by this consent",
        "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.",
        "comment": "This element is for discoverability / documentation, and does not modify or qualify the policy rules.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ]
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "short": "Policy that this consents to",
        "definition": "A referece to the specific computable policy.",
        "comment": "If the policy reference is not known, the resource cannot be processed. Where the reference is absent, there is no particular policy other than what is expressed directly in the consent resource.",
        "requirements": "Might be a unique identifier of a policy set in XACML, or other rules engine.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ],
        "isSummary": true
      },
      {
        "id": "Consent.securityLabel",
        "path": "Consent.securityLabel",
        "short": "Security Labels that define affected resources",
        "definition": "A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.",
        "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": 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": "Consent.purpose",
        "path": "Consent.purpose",
        "short": "Context of activities for which the agreement is made",
        "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.",
        "comment": "This element is for discoverability / documentation, and does not modify or qualify the policy (e.g. the policy itself describes the purposes for which it applies).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "PurposeOfUse"
            }
          ],
          "strength": "extensible",
          "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
          }
        }
      },
      {
        "id": "Consent.dataPeriod",
        "path": "Consent.dataPeriod",
        "short": "Timeframe for data controlled by this consent",
        "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this consent.",
        "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.data",
        "path": "Consent.data",
        "short": "Data controlled by this consent",
        "definition": "The resources controlled by this consent, if specific resources are referenced.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "all data",
        "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,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          }
        ]
      },
      {
        "id": "Consent.data.id",
        "path": "Consent.data.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.data.extension",
        "path": "Consent.data.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.data.modifierExtension",
        "path": "Consent.data.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.data.meaning",
        "path": "Consent.data.meaning",
        "short": "instance | related | dependents | authoredby",
        "definition": "How the resource reference is interpreted when testing consent restrictions.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentDataMeaning"
            }
          ],
          "strength": "required",
          "description": "How a resource reference is interpreted when testing consent restrictions",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-data-meaning"
          }
        }
      },
      {
        "id": "Consent.data.reference",
        "path": "Consent.data.reference",
        "short": "The actual data reference",
        "definition": "A reference to a specific resource that defines which resources are covered by this consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Except"
          }
        ],
        "path": "Consent.except",
        "short": "Additional rule -  addition or removal of permissions",
        "definition": "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.",
        "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": "Consent.except.id",
        "path": "Consent.except.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.extension",
        "path": "Consent.except.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.modifierExtension",
        "path": "Consent.except.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.except.type",
        "path": "Consent.except.type",
        "short": "deny | permit",
        "definition": "Action  to take - permit or deny - when the exception conditions are met.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentExceptType"
            }
          ],
          "strength": "required",
          "description": "How an exception statement is applied, such as adding additional consent or removing consent",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-except-type"
          }
        }
      },
      {
        "id": "Consent.except.period",
        "path": "Consent.except.period",
        "short": "Timeframe for this exception",
        "definition": "The timeframe in this exception is valid.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except.actor",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "ExceptActor"
          }
        ],
        "path": "Consent.except.actor",
        "short": "Who|what controlled by this exception (or group, by role)",
        "definition": "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "There is no specific actor associated with the exception",
        "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": "Consent.except.actor.id",
        "path": "Consent.except.actor.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.actor.extension",
        "path": "Consent.except.actor.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.actor.modifierExtension",
        "path": "Consent.except.actor.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.except.actor.role",
        "path": "Consent.except.actor.role",
        "short": "How the actor is involved",
        "definition": "How the individual is involved in the resources content that is described in the exception.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentActorRole"
            }
          ],
          "strength": "extensible",
          "description": "How an actor is involved in the consent considerations",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
          }
        }
      },
      {
        "id": "Consent.except.actor.reference",
        "path": "Consent.except.actor.reference",
        "short": "Resource for the actor (or group, by role)",
        "definition": "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 1,
        "max": "1",
        "type": [
          {
            "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/CareTeam"
          },
          {
            "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": "Consent.except.action",
        "path": "Consent.except.action",
        "short": "Actions controlled by this exception",
        "definition": "Actions controlled by this Exception.",
        "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "meaningWhenMissing": "all actions",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentAction"
            }
          ],
          "strength": "example",
          "description": "Detailed codes for the consent action.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-action"
          }
        }
      },
      {
        "id": "Consent.except.securityLabel",
        "path": "Consent.except.securityLabel",
        "short": "Security Labels that define affected resources",
        "definition": "A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.",
        "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": 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": "Consent.except.purpose",
        "path": "Consent.except.purpose",
        "short": "Context of activities covered by this exception",
        "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.",
        "comment": "E.g. if the purpose is 'research', then the operational context must be research, in order for the consent to apply. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "PurposeOfUse"
            }
          ],
          "strength": "extensible",
          "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
          }
        }
      },
      {
        "id": "Consent.except.class",
        "path": "Consent.except.class",
        "short": "e.g. Resource Type, Profile, or CDA etc",
        "definition": "The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.",
        "comment": "Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentContentClass"
            }
          ],
          "strength": "extensible",
          "description": "The class (type) of information a consent rule covers",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-content-class"
          }
        }
      },
      {
        "id": "Consent.except.code",
        "path": "Consent.except.code",
        "short": "e.g. LOINC or SNOMED CT code, etc in the content",
        "definition": "If this code is found in an instance, then the exception applies.",
        "comment": "Typical use of this is a Document code with class = CDA.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentContentCode"
            }
          ],
          "strength": "example",
          "description": "If this code is found in an instance, then the exception applies",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-content-code"
          }
        }
      },
      {
        "id": "Consent.except.dataPeriod",
        "path": "Consent.except.dataPeriod",
        "short": "Timeframe for data controlled by this exception",
        "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this exception.",
        "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except.data",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "ExceptData"
          }
        ],
        "path": "Consent.except.data",
        "short": "Data controlled by this exception",
        "definition": "The resources controlled by this exception, if specific resources are referenced.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "all data",
        "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,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          }
        ]
      },
      {
        "id": "Consent.except.data.id",
        "path": "Consent.except.data.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.data.extension",
        "path": "Consent.except.data.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Consent.except.data.modifierExtension",
        "path": "Consent.except.data.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Consent.except.data.meaning",
        "path": "Consent.except.data.meaning",
        "short": "instance | related | dependents | authoredby",
        "definition": "How the resource reference is interpreted when testing consent restrictions.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentDataMeaning"
            }
          ],
          "strength": "required",
          "description": "How a resource reference is interpreted when testing consent restrictions",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-data-meaning"
          }
        }
      },
      {
        "id": "Consent.except.data.reference",
        "path": "Consent.except.data.reference",
        "short": "The actual data reference",
        "definition": "A reference to a specific resource that defines which resources are covered by this consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
          }
        ],
        "isSummary": true
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Consent",
        "path": "Consent",
        "short": "A healthcare consumer's policy choices to permits or denies recipients or roles to perform actions for specific purposes and periods of time",
        "definition": "A record of a healthcare consumer’s policy choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.",
        "comment": "Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment, and general advance care directives.",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "ppc-1",
            "severity": "error",
            "human": "Either a Policy or PolicyRule",
            "expression": "policy.exists() or policyRule.exists()",
            "xpath": "exists(f:policy) or exists(f:policyRule)"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "FinancialConsent"
          },
          {
            "identity": "w5",
            "map": "infrastructure.information"
          }
        ]
      },
      {
        "id": "Consent.identifier",
        "path": "Consent.identifier",
        "short": "Identifier for this record (external references)",
        "definition": "Unique identifier for this copy of the Consent Statement.",
        "comment": "This identifier is identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "example": [
          {
            "label": "General",
            "valueIdentifier": {
              "system": "urn:ietf:rfc:3986",
              "value": "Local eCMS identifier"
            }
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".id"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "id": "Consent.status",
        "path": "Consent.status",
        "short": "draft | proposed | active | rejected | inactive | entered-in-error",
        "definition": "Indicates the current state of this consent.",
        "comment": "This element is labeled as a modifier because the status contains the codes rejected and entered-in-error that mark the Consent as not currently valid.",
        "requirements": "The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentState"
            }
          ],
          "strength": "required",
          "description": "Indicates the state of the consent",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-state-codes"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "HL7 Table 0498 - Consent Status"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "id": "Consent.category",
        "path": "Consent.category",
        "short": "Classification of the consent statement - for indexing/retrieval",
        "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentCategory"
            }
          ],
          "strength": "example",
          "description": "A classification of the type of consents found in a consent statement",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-category"
          }
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "CNTRCT"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "id": "Consent.patient",
        "path": "Consent.patient",
        "short": "Who the consent applies to",
        "definition": "The patient/healthcare consumer to whom this consent applies.",
        "comment": "Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          },
          {
            "identity": "w5",
            "map": "who.focus"
          }
        ]
      },
      {
        "id": "Consent.period",
        "path": "Consent.period",
        "short": "Period that this consent applies",
        "definition": "Relevant time or time-period when this Consent is applicable.",
        "comment": "This can be a subset of the period of the original statement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "meaningWhenMissing": "all date ranges included",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "FinancialConsent activityTime"
          },
          {
            "identity": "w5",
            "map": "when.done"
          }
        ]
      },
      {
        "id": "Consent.dateTime",
        "path": "Consent.dateTime",
        "short": "When this Consent was created or indexed",
        "definition": "When this  Consent was issued / created / indexed.",
        "comment": "This is not the time of the original consent, but the time that this statement was made or derived.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "FinancialConsent effectiveTime"
          },
          {
            "identity": "w5",
            "map": "when.recorded"
          }
        ]
      },
      {
        "id": "Consent.consentingParty",
        "path": "Consent.consentingParty",
        "short": "Who is agreeing to the policy and exceptions",
        "definition": "Either the Grantor, which is the entity responsible for granting the rights listed in a Consent Directive or the Grantee, which is the entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.",
        "comment": "Commonly, the patient the consent pertains to is the consentor, but particularly for young and old people, it may be some other person - e.g. a legal guardian.",
        "alias": [
          "consentor"
        ],
        "min": 0,
        "max": "*",
        "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"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.actor"
          }
        ]
      },
      {
        "id": "Consent.actor",
        "path": "Consent.actor",
        "short": "Who|what controlled by this consent (or group, by role)",
        "definition": "Who or what is controlled by this consent. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "There is no specific actor associated with the consent",
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.actor"
          }
        ]
      },
      {
        "id": "Consent.actor.role",
        "path": "Consent.actor.role",
        "short": "How the actor is involved",
        "definition": "How the individual is involved in the resources content that is described in the consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentActorRole"
            }
          ],
          "strength": "extensible",
          "description": "How an actor is involved in the consent considerations",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
          }
        }
      },
      {
        "id": "Consent.actor.reference",
        "path": "Consent.actor.reference",
        "short": "Resource for the actor (or group, by role)",
        "definition": "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 1,
        "max": "1",
        "type": [
          {
            "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/CareTeam"
          },
          {
            "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": "Consent.action",
        "path": "Consent.action",
        "short": "Actions controlled by this consent",
        "definition": "Actions controlled by this consent.",
        "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "meaningWhenMissing": "all actions",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentAction"
            }
          ],
          "strength": "example",
          "description": "Detailed codes for the consent action.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-action"
          }
        }
      },
      {
        "id": "Consent.organization",
        "path": "Consent.organization",
        "short": "Custodian of the consent",
        "definition": "The organization that manages the consent, and the framework within which it is executed.",
        "alias": [
          "custodian"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "who.witness"
          }
        ]
      },
      {
        "id": "Consent.source[x]",
        "path": "Consent.source[x]",
        "short": "Source from which this consent is taken",
        "definition": "The source on which this consent statement is based. The source might be a scanned original paper form, or a reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.",
        "comment": "The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Attachment"
          },
          {
            "code": "Identifier"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Consent"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Contract"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.policy",
        "path": "Consent.policy",
        "short": "Policies covered by this consent",
        "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ]
      },
      {
        "id": "Consent.policy.authority",
        "path": "Consent.policy.authority",
        "short": "Enforcement source for policy",
        "definition": "Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ]
      },
      {
        "id": "Consent.policy.uri",
        "path": "Consent.policy.uri",
        "short": "Specific policy covered by this consent",
        "definition": "The references to the policies that are included in this consent scope. Policies may be organizational, but are often defined jurisdictionally, or in law.",
        "comment": "This element is for discoverability / documentation, and does not modify or qualify the policy rules.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ]
      },
      {
        "id": "Consent.policyRule",
        "path": "Consent.policyRule",
        "short": "Policy that this consents to",
        "definition": "A referece to the specific computable policy.",
        "comment": "If the policy reference is not known, the resource cannot be processed. Where the reference is absent, there is no particular policy other than what is expressed directly in the consent resource.",
        "requirements": "Might be a unique identifier of a policy set in XACML, or other rules engine.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "condition": [
          "ppc-1"
        ],
        "isSummary": true
      },
      {
        "id": "Consent.securityLabel",
        "path": "Consent.securityLabel",
        "short": "Security Labels that define affected resources",
        "definition": "A set of security labels that define which resources are controlled by this consent. If more than one label is specified, all resources must have all the specified labels.",
        "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": 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": "Consent.purpose",
        "path": "Consent.purpose",
        "short": "Context of activities for which the agreement is made",
        "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this consent.",
        "comment": "This element is for discoverability / documentation, and does not modify or qualify the policy (e.g. the policy itself describes the purposes for which it applies).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "PurposeOfUse"
            }
          ],
          "strength": "extensible",
          "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
          }
        }
      },
      {
        "id": "Consent.dataPeriod",
        "path": "Consent.dataPeriod",
        "short": "Timeframe for data controlled by this consent",
        "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this consent.",
        "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.data",
        "path": "Consent.data",
        "short": "Data controlled by this consent",
        "definition": "The resources controlled by this consent, if specific resources are referenced.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "all data",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          }
        ]
      },
      {
        "id": "Consent.data.meaning",
        "path": "Consent.data.meaning",
        "short": "instance | related | dependents | authoredby",
        "definition": "How the resource reference is interpreted when testing consent restrictions.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentDataMeaning"
            }
          ],
          "strength": "required",
          "description": "How a resource reference is interpreted when testing consent restrictions",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-data-meaning"
          }
        }
      },
      {
        "id": "Consent.data.reference",
        "path": "Consent.data.reference",
        "short": "The actual data reference",
        "definition": "A reference to a specific resource that defines which resources are covered by this consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "Except"
          }
        ],
        "path": "Consent.except",
        "short": "Additional rule -  addition or removal of permissions",
        "definition": "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except.type",
        "path": "Consent.except.type",
        "short": "deny | permit",
        "definition": "Action  to take - permit or deny - when the exception conditions are met.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentExceptType"
            }
          ],
          "strength": "required",
          "description": "How an exception statement is applied, such as adding additional consent or removing consent",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-except-type"
          }
        }
      },
      {
        "id": "Consent.except.period",
        "path": "Consent.except.period",
        "short": "Timeframe for this exception",
        "definition": "The timeframe in this exception is valid.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except.actor",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "ExceptActor"
          }
        ],
        "path": "Consent.except.actor",
        "short": "Who|what controlled by this exception (or group, by role)",
        "definition": "Who or what is controlled by this Exception. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "There is no specific actor associated with the exception",
        "isSummary": true
      },
      {
        "id": "Consent.except.actor.role",
        "path": "Consent.except.actor.role",
        "short": "How the actor is involved",
        "definition": "How the individual is involved in the resources content that is described in the exception.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentActorRole"
            }
          ],
          "strength": "extensible",
          "description": "How an actor is involved in the consent considerations",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-role-type"
          }
        }
      },
      {
        "id": "Consent.except.actor.reference",
        "path": "Consent.except.actor.reference",
        "short": "Resource for the actor (or group, by role)",
        "definition": "The resource that identifies the actor. To identify a actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
        "min": 1,
        "max": "1",
        "type": [
          {
            "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/CareTeam"
          },
          {
            "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": "Consent.except.action",
        "path": "Consent.except.action",
        "short": "Actions controlled by this exception",
        "definition": "Actions controlled by this Exception.",
        "comment": "Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "meaningWhenMissing": "all actions",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentAction"
            }
          ],
          "strength": "example",
          "description": "Detailed codes for the consent action.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-action"
          }
        }
      },
      {
        "id": "Consent.except.securityLabel",
        "path": "Consent.except.securityLabel",
        "short": "Security Labels that define affected resources",
        "definition": "A set of security labels that define which resources are controlled by this exception. If more than one label is specified, all resources must have all the specified labels.",
        "comment": "If the consent specifies a security label of \"R\" then it applies to all resources that are labeled \"R\" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": 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": "Consent.except.purpose",
        "path": "Consent.except.purpose",
        "short": "Context of activities covered by this exception",
        "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this exception.",
        "comment": "E.g. if the purpose is 'research', then the operational context must be research, in order for the consent to apply. Not all of the security labels make sense for use in this element (may define a narrower value set?).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "PurposeOfUse"
            }
          ],
          "strength": "extensible",
          "description": "What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-PurposeOfUse"
          }
        }
      },
      {
        "id": "Consent.except.class",
        "path": "Consent.except.class",
        "short": "e.g. Resource Type, Profile, or CDA etc",
        "definition": "The class of information covered by this exception. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.",
        "comment": "Multiple types are or'ed together. The intention of the contentType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentContentClass"
            }
          ],
          "strength": "extensible",
          "description": "The class (type) of information a consent rule covers",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-content-class"
          }
        }
      },
      {
        "id": "Consent.except.code",
        "path": "Consent.except.code",
        "short": "e.g. LOINC or SNOMED CT code, etc in the content",
        "definition": "If this code is found in an instance, then the exception applies.",
        "comment": "Typical use of this is a Document code with class = CDA.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentContentCode"
            }
          ],
          "strength": "example",
          "description": "If this code is found in an instance, then the exception applies",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-content-code"
          }
        }
      },
      {
        "id": "Consent.except.dataPeriod",
        "path": "Consent.except.dataPeriod",
        "short": "Timeframe for data controlled by this exception",
        "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this exception.",
        "comment": "This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true
      },
      {
        "id": "Consent.except.data",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
            "valueString": "ExceptData"
          }
        ],
        "path": "Consent.except.data",
        "short": "Data controlled by this exception",
        "definition": "The resources controlled by this exception, if specific resources are referenced.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "meaningWhenMissing": "all data",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Role"
          }
        ]
      },
      {
        "id": "Consent.except.data.meaning",
        "path": "Consent.except.data.meaning",
        "short": "instance | related | dependents | authoredby",
        "definition": "How the resource reference is interpreted when testing consent restrictions.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ConsentDataMeaning"
            }
          ],
          "strength": "required",
          "description": "How a resource reference is interpreted when testing consent restrictions",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/consent-data-meaning"
          }
        }
      },
      {
        "id": "Consent.except.data.reference",
        "path": "Consent.except.data.reference",
        "short": "The actual data reference",
        "definition": "A reference to a specific resource that defines which resources are covered by this consent.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Resource"
          }
        ],
        "isSummary": true
      }
    ]
  }
}

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