PackagesCanonicalsLogsProblems
    Packages
    ch.fhir.ig.ch-epr-ppqm@0.2.0
    http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent
{
  "description": "Swiss EPR Policy Set as a Consent",
  "_filename": "StructureDefinition-PpqmConsent.json",
  "package_name": "ch.fhir.ig.ch-epr-ppqm",
  "date": "2022-04-13T11:21:22+02:00",
  "derivation": "constraint",
  "publisher": "eHealth Suisse",
  "fhirVersion": "4.0.1",
  "jurisdiction": [ {
    "coding": [ {
      "code": "CHE",
      "system": "urn:iso:std:iso:3166"
    } ]
  } ],
  "name": "PpqmConsent",
  "mapping": [ {
    "uri": "http://hl7.org/fhir/workflow",
    "name": "Workflow Pattern",
    "identity": "workflow"
  }, {
    "uri": "http://hl7.org/v2",
    "name": "HL7 v2 Mapping",
    "identity": "v2"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  }, {
    "uri": "http://hl7.org/fhir/fivews",
    "name": "FiveWs Pattern Mapping",
    "identity": "w5"
  }, {
    "uri": "http://docs.oasis-open.org/xacml/2.0",
    "name": "CH:PPQ XACML 2.0 Policy Set",
    "identity": "ppqm-consent-xacml20-mapping"
  } ],
  "abstract": false,
  "copyright": "CC-BY-SA-4.0",
  "type": "Consent",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": "PpqmConsent",
  "package_version": "0.2.0",
  "extension": [ {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
    "valueString": "Foundation.Security"
  }, {
    "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
    "valueCode": "patient"
  } ],
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-3",
        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
        "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "dom-5",
        "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
        "xpath": "not(exists(f:contained/*/f:meta/f:security))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.security.empty()"
      }, {
        "key": "dom-6",
        "human": "A resource should have narrative for robust management",
        "xpath": "exists(f:text/h:div)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "warning",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
          "valueBoolean": true
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
          "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
        } ],
        "expression": "text.`div`.exists()"
      }, {
        "key": "ppc-1",
        "human": "Either a Policy or PolicyRule",
        "xpath": "exists(f:policy) or exists(f:policyRule)",
        "source": "http://hl7.org/fhir/StructureDefinition/Consent",
        "severity": "error",
        "expression": "policy.exists() or policyRule.exists()"
      }, {
        "key": "ppc-2",
        "human": "IF Scope=privacy, there must be a patient",
        "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='patient-privacy'])))",
        "source": "http://hl7.org/fhir/StructureDefinition/Consent",
        "severity": "error",
        "expression": "patient.exists() or scope.coding.where(system='something' and code='patient-privacy').exists().not()"
      }, {
        "key": "ppc-3",
        "human": "IF Scope=research, there must be a patient",
        "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='research'])))",
        "source": "http://hl7.org/fhir/StructureDefinition/Consent",
        "severity": "error",
        "expression": "patient.exists() or scope.coding.where(system='something' and code='research').exists().not()"
      }, {
        "key": "ppc-4",
        "human": "IF Scope=adr, there must be a patient",
        "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='adr'])))",
        "source": "http://hl7.org/fhir/StructureDefinition/Consent",
        "severity": "error",
        "expression": "patient.exists() or scope.coding.where(system='something' and code='adr').exists().not()"
      }, {
        "key": "ppc-5",
        "human": "IF Scope=treatment, there must be a patient",
        "xpath": "exists(f:patient) or not(exists(f:scope/f:coding[f:system/@value='something' and f:code/@value='treatment'])))",
        "source": "http://hl7.org/fhir/StructureDefinition/Consent",
        "severity": "error",
        "expression": "patient.exists() or scope.coding.where(system='something' and code='treatment').exists().not()"
      }, {
        "key": "ch-epr-ppqm-template-structure",
        "human": "The resource shall correspong to one of official policy set templates",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "(\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '201')) and \r\n                    (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'PAT') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and \r\n                    provision.actor.reference.identifier.value.matches('^[0-9]{18}$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    provision.purpose.empty() and \r\n                    (provision.actor.reference.identifier.value = patient.identifier.value)\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '202')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:emergency-access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:emergency-access-level:restricted')\r\n                    ) and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    provision.actor.reference.identifier.empty() and \r\n                    (provision.actor.reference.display = 'all') and\r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'EMER')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '203')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted')\r\n                    ) and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    provision.actor.reference.identifier.empty() and \r\n                    (provision.actor.reference.display = 'all') and\r\n                    (provision.purpose.count() = 2) and \r\n                    (provision.purpose.exists(code = 'NORM')) and\r\n                    (provision.purpose.exists(code = 'AUTO'))\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '301')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted')\r\n                    ) and \r\n                    (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and \r\n                    provision.actor.reference.identifier.value.matches('^[0-9]{13}$') and \r\n                    provision.actor.reference.display.empty() and\r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'NORM')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '302')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted')\r\n                    ) and \r\n                    provision.period.end.exists() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and \r\n                    provision.actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\\\.0)|(\\\\.[1-9][0-9]*))*$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'NORM')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '303')) and \r\n                    (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'REP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and \r\n                    provision.actor.reference.identifier.value.matches('^\\\\S+$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    provision.purpose.empty()\r\n                )"
      } ],
      "path": "Consent",
      "min": 0,
      "definition": "A record of a healthcare consumer’s  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.",
      "isModifier": false,
      "short": "A healthcare consumer's  choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "Event",
        "identity": "workflow"
      }, {
        "map": "CON",
        "identity": "v2"
      }, {
        "map": "FinancialConsent",
        "identity": "rim"
      }, {
        "map": "PolicySet",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "max": "*",
      "id": "Consent",
      "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent"
      },
      "isSummary": false
    }, {
      "path": "Consent.id",
      "min": 0,
      "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "isModifier": false,
      "short": "Logical id of this artifact",
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "max": "1",
      "id": "Consent.id",
      "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.id"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.meta",
      "min": 0,
      "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
      "isModifier": false,
      "short": "Metadata about the resource",
      "type": [ {
        "code": "Meta"
      } ],
      "max": "1",
      "id": "Consent.meta",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.meta"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.implicitRules",
      "min": 0,
      "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. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
      "isModifier": true,
      "short": "A set of rules under which this content was created",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.implicitRules",
      "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.implicitRules"
      },
      "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.language",
      "min": 0,
      "definition": "The base language in which the resource is written.",
      "isModifier": false,
      "short": "Language of the resource content",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical": "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
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "Consent.language",
      "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.language"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.text",
      "min": 0,
      "definition": "A human-readable narrative that contains a summary of the resource and can 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.",
      "isModifier": false,
      "short": "Text summary of the resource, for human interpretation",
      "mapping": [ {
        "map": "Act.text?",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Narrative"
      } ],
      "alias": [ "narrative", "html", "xhtml", "display" ],
      "max": "1",
      "id": "Consent.text",
      "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DomainResource.text"
      },
      "isSummary": false
    }, {
      "path": "Consent.contained",
      "min": 0,
      "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.",
      "isModifier": false,
      "short": "Contained, inline Resources",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Resource"
      } ],
      "alias": [ "inline resources", "anonymous resources", "contained resources" ],
      "max": "*",
      "id": "Consent.contained",
      "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.contained"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier",
      "min": 2,
      "definition": "Unique identifier for this copy of the Consent Statement.",
      "isModifier": false,
      "short": "Identifier for this record (external references)",
      "mapping": [ {
        "map": "Event.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": ".id",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "ordered": false,
        "description": "PpqmConsent Identifiers",
        "discriminator": [ {
          "path": "type.coding",
          "type": "pattern"
        } ]
      },
      "type": [ {
        "code": "Identifier"
      } ],
      "max": "*",
      "id": "Consent.identifier",
      "comment": "This identifier 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.",
      "example": [ {
        "label": "General",
        "valueIdentifier": {
          "value": "Local eCMS identifier",
          "system": "urn:ietf:rfc:3986"
        }
      } ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.identifier"
      },
      "isSummary": true
    }, {
      "path": "Consent.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.identifier.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.identifier.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "1",
      "id": "Consent.identifier.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 0,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "Consent.identifier.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.identifier.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.value",
      "min": 0,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "The value that is unique",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      }, {
        "map": "/PolicySet/@PolicySetId",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Consent.identifier.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Consent.identifier.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "1",
      "id": "Consent.identifier.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier",
      "min": 1,
      "definition": "Unique identifier for this copy of the Consent Statement.",
      "isModifier": false,
      "short": "UUID of the Policy Set",
      "mapping": [ {
        "map": "Event.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": ".id",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "sliceName": "policySetId",
      "max": "1",
      "id": "Consent.identifier:policySetId",
      "comment": "This identifier 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.",
      "example": [ {
        "label": "General",
        "valueIdentifier": {
          "value": "Local eCMS identifier",
          "system": "urn:ietf:rfc:3986"
        }
      } ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.identifier"
      },
      "isSummary": true
    }, {
      "path": "Consent.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.identifier:policySetId.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.identifier:policySetId.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "0",
      "id": "Consent.identifier:policySetId.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 1,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "Consent.identifier:policySetId.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "path": "Consent.identifier.type.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.identifier:policySetId.type.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.identifier.type.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.identifier:policySetId.type.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.identifier:policySetId.type.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "patternCoding": {
        "code": "policySetId",
        "system": "http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType"
      },
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.identifier:policySetId.type.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "0",
      "id": "Consent.identifier:policySetId.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ch-epr-ppqm-uuid-format",
        "human": "The policy set ID must be a UUID in URN format",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$')"
      } ],
      "path": "Consent.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "UUID of the policy set in URN format",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Consent.identifier:policySetId.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "0",
      "id": "Consent.identifier:policySetId.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "0",
      "id": "Consent.identifier:policySetId.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier",
      "min": 1,
      "definition": "Unique identifier for this copy of the Consent Statement.",
      "isModifier": false,
      "short": "Template ID of the policy set",
      "mapping": [ {
        "map": "Event.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": ".id",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "sliceName": "templateId",
      "max": "1",
      "id": "Consent.identifier:templateId",
      "comment": "This identifier 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.",
      "example": [ {
        "label": "General",
        "valueIdentifier": {
          "value": "Local eCMS identifier",
          "system": "urn:ietf:rfc:3986"
        }
      } ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.identifier"
      },
      "isSummary": true
    }, {
      "path": "Consent.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.identifier:templateId.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.identifier:templateId.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "0",
      "id": "Consent.identifier:templateId.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 1,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "Consent.identifier:templateId.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "path": "Consent.identifier.type.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.identifier:templateId.type.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.identifier.type.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.identifier:templateId.type.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.identifier:templateId.type.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "patternCoding": {
        "code": "templateId",
        "system": "http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType"
      },
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.type.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.identifier:templateId.type.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "0",
      "id": "Consent.identifier:templateId.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "Template ID of the policy set",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmPolicySetTemplateId"
      },
      "max": "1",
      "id": "Consent.identifier:templateId.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "0",
      "id": "Consent.identifier:templateId.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "0",
      "id": "Consent.identifier:templateId.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.status",
      "requirements": "The Consent Directive that is pointed to might be in various lifecycle states, e.g., a revoked Consent Directive.",
      "min": 1,
      "definition": "Indicates the current state of this consent.",
      "isModifier": true,
      "short": "Fixed status value",
      "mapping": [ {
        "map": "Event.status",
        "identity": "workflow"
      }, {
        "map": "FiveWs.status",
        "identity": "w5"
      }, {
        "map": "HL7 Table 0498 - Consent Status",
        "identity": "v2"
      }, {
        "map": ".statusCode",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "patternCode": "active",
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-state-codes|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentState"
        } ],
        "description": "Indicates the state of the consent."
      },
      "max": "1",
      "id": "Consent.status",
      "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.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.status"
      },
      "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.scope",
      "min": 1,
      "definition": "A selector of the type of consent being presented: ADR, Privacy, Treatment, Research.  This list is now extensible.",
      "isModifier": true,
      "short": "Fixed scope value",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-scope",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentScope"
        } ],
        "description": "The four anticipated uses for the Consent Resource."
      },
      "max": "1",
      "id": "Consent.scope",
      "patternCodeableConcept": {
        "coding": [ {
          "code": "patient-privacy",
          "system": "http://terminology.hl7.org/CodeSystem/consentscope"
        } ]
      },
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.scope"
      },
      "isModifierReason": "Allows changes to codes based on scope selection",
      "isSummary": true
    }, {
      "path": "Consent.scope.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.scope.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.scope.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.scope.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.scope.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.scope.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.scope.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.scope.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.category",
      "min": 1,
      "definition": "A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.",
      "isModifier": false,
      "short": "Fixed category value",
      "mapping": [ {
        "map": "Event.code",
        "identity": "workflow"
      }, {
        "map": "FiveWs.class",
        "identity": "w5"
      }, {
        "map": "HL7 Table 0497 - Consent Type",
        "identity": "v2"
      }, {
        "map": "CNTRCT",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-category",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentCategory"
        } ],
        "description": "A classification of the type of consents found in a consent statement."
      },
      "max": "1",
      "id": "Consent.category",
      "patternCodeableConcept": {
        "coding": [ {
          "code": "INFA",
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
        } ]
      },
      "base": {
        "max": "*",
        "min": 1,
        "path": "Consent.category"
      },
      "isSummary": true
    }, {
      "path": "Consent.category.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.category.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.category.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.category.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.category.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.category.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.category.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.category.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient",
      "min": 1,
      "definition": "The patient/healthcare consumer to whom this consent applies.",
      "isModifier": false,
      "short": "Who the consent applies to",
      "mapping": [ {
        "map": "Event.subject",
        "identity": "workflow"
      }, {
        "map": "FiveWs.subject[x]",
        "identity": "w5"
      }, {
        "map": "Role",
        "identity": "rim"
      }, {
        "map": "FiveWs.subject",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Patient" ]
      } ],
      "max": "1",
      "id": "Consent.patient",
      "comment": "Commonly, the patient the consent pertains to is the author, but for young and old people, it may be some other person.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.patient"
      },
      "isSummary": true
    }, {
      "path": "Consent.patient.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.patient.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.patient.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.patient.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.reference",
      "min": 0,
      "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
      "isModifier": false,
      "short": "Literal reference, Relative, internal or absolute URL",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "Consent.patient.reference",
      "condition": [ "ref-1" ],
      "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.reference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.type",
      "min": 0,
      "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
      "isModifier": false,
      "short": "Type the reference refers to (e.g. \"Patient\")",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/resource-types",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "FHIRResourceTypeExt"
        } ],
        "description": "Aa resource (or, for logical models, the URI of the logical model)."
      },
      "max": "0",
      "id": "Consent.patient.type",
      "comment": "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier",
      "min": 1,
      "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
      "isModifier": false,
      "short": "Logical reference, when literal reference is not known",
      "mapping": [ {
        "map": ".identifier",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Consent.patient.identifier",
      "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.identifier"
      },
      "isSummary": true
    }, {
      "path": "Consent.patient.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.patient.identifier.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.patient.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.patient.identifier.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "0",
      "id": "Consent.patient.identifier.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 0,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "0",
      "id": "Consent.patient.identifier.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 1,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      }, {
        "map": "/PolicySet/Target/Resources/Resource/ResourceMatch/AttributeValue/InstanceIdentifier/@root",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.patient.identifier.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.3",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ch-epr-ppqm-epr-spid-format",
        "human": "The patient ID must be an EPR-SPID",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "matches('^[0-9]{18}$')"
      } ],
      "path": "Consent.patient.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "EPR-SPID of the patient (18 digits)",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      }, {
        "map": "/PolicySet/Target/Resources/Resource/ResourceMatch/AttributeValue/InstanceIdentifier/@extension",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Consent.patient.identifier.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "0",
      "id": "Consent.patient.identifier.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "0",
      "id": "Consent.patient.identifier.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.patient.display",
      "min": 0,
      "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
      "isModifier": false,
      "short": "Text alternative for the resource",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "0",
      "id": "Consent.patient.display",
      "comment": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.dateTime",
      "min": 0,
      "definition": "When this  Consent was issued / created / indexed.",
      "isModifier": false,
      "short": "When this Consent was created or indexed",
      "mapping": [ {
        "map": "Event.occurrence[x]",
        "identity": "workflow"
      }, {
        "map": "FiveWs.recorded",
        "identity": "w5"
      }, {
        "map": "Field 13/ Consent Decision Date",
        "identity": "v2"
      }, {
        "map": "FinancialConsent effectiveTime",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "0",
      "id": "Consent.dateTime",
      "comment": "This is not the time of the original consent, but the time that this statement was made or derived.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.dateTime"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.performer",
      "min": 0,
      "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.",
      "isModifier": false,
      "short": "Who is agreeing to the policy and rules",
      "mapping": [ {
        "map": "Event.performer",
        "identity": "workflow"
      }, {
        "map": "FiveWs.actor",
        "identity": "w5"
      }, {
        "map": "Field 24/ ConsenterID",
        "identity": "v2"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/PractitionerRole" ]
      } ],
      "alias": [ "consentor" ],
      "max": "0",
      "id": "Consent.performer",
      "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.performer"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.organization",
      "min": 0,
      "definition": "The organization that manages the consent, and the framework within which it is executed.",
      "isModifier": false,
      "short": "Custodian of the consent",
      "mapping": [ {
        "map": "Event.performer",
        "identity": "workflow"
      }, {
        "map": "FiveWs.witness",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "alias": [ "custodian" ],
      "max": "0",
      "id": "Consent.organization",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.organization"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.source[x]",
      "min": 0,
      "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.",
      "isModifier": false,
      "short": "Source from which this consent is taken",
      "mapping": [ {
        "map": "Field 19 Informational Material Supplied Indicator",
        "identity": "v2"
      } ],
      "type": [ {
        "code": "Attachment"
      }, {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Consent", "http://hl7.org/fhir/StructureDefinition/DocumentReference", "http://hl7.org/fhir/StructureDefinition/Contract", "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" ]
      } ],
      "max": "0",
      "id": "Consent.source[x]",
      "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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.source[x]"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policy",
      "min": 0,
      "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.",
      "isModifier": false,
      "short": "Policies covered by this consent",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "max": "0",
      "id": "Consent.policy",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.policy"
      },
      "isSummary": false
    }, {
      "path": "Consent.policy.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.policy.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.policy.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.policy.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.policy.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Consent.policy.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policy.authority",
      "min": 0,
      "definition": "Entity or Organization having regulatory jurisdiction or accountability for  enforcing policies pertaining to Consent Directives.",
      "isModifier": false,
      "short": "Enforcement source for policy",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.policy.authority",
      "condition": [ "ppc-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.policy.authority"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policy.uri",
      "min": 0,
      "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.",
      "isModifier": false,
      "short": "Specific policy covered by this consent",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.policy.uri",
      "condition": [ "ppc-1" ],
      "comment": "This element is for discoverability / documentation and does not modify or qualify the policy rules.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.policy.uri"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule",
      "requirements": "Might be a unique identifier of a policy set in XACML, or other rules engine.",
      "min": 1,
      "definition": "A reference to the specific base computable regulation or policy.",
      "isModifier": false,
      "short": "ID of the referenced basis policy set",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-policy",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentPolicyRule"
        } ],
        "description": "Regulatory policy examples."
      },
      "max": "1",
      "id": "Consent.policyRule",
      "condition": [ "ppc-1" ],
      "comment": "If the policyRule is absent, computable consent would need to be constructed from the elements of the Consent resource.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.policyRule"
      },
      "isSummary": true
    }, {
      "path": "Consent.policyRule.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.policyRule.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.policyRule.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.policyRule.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.policyRule.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "path": "Consent.policyRule.coding.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.policyRule.coding.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.policyRule.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.policyRule.coding.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 0,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "isModifier": false,
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "0",
      "id": "Consent.policyRule.coding.system",
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "isModifier": false,
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "Consent.policyRule.coding.version",
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "isModifier": false,
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      }, {
        "map": "/PolicySet/PolicySetIdReference",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmReferencedPolicySet"
      },
      "max": "1",
      "id": "Consent.policyRule.coding.code",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "isModifier": false,
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.policyRule.coding.display",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "isModifier": false,
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "0",
      "id": "Consent.policyRule.coding.userSelected",
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.policyRule.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.policyRule.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.verification",
      "min": 0,
      "definition": "Whether a treatment instruction (e.g. artificial respiration yes or no) was verified with the patient, his/her family or another authorized person.",
      "isModifier": false,
      "short": "Consent Verified by patient or family",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "max": "0",
      "id": "Consent.verification",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.verification"
      },
      "isSummary": true
    }, {
      "path": "Consent.verification.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.verification.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.verification.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.verification.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.verification.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Consent.verification.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.verification.verified",
      "min": 1,
      "definition": "Has the instruction been verified.",
      "isModifier": false,
      "short": "Has been verified",
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Consent.verification.verified",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.verification.verified"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.verification.verifiedWith",
      "min": 0,
      "definition": "Who verified the instruction (Patient, Relative or other Authorized Person).",
      "isModifier": false,
      "short": "Person who verified",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson" ]
      } ],
      "max": "1",
      "id": "Consent.verification.verifiedWith",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.verification.verifiedWith"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.verification.verificationDate",
      "min": 0,
      "definition": "Date verification was collected.",
      "isModifier": false,
      "short": "When consent verified",
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "Consent.verification.verificationDate",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.verification.verificationDate"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision",
      "min": 1,
      "definition": "An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.",
      "isModifier": false,
      "short": "Constraints to the base Consent.policyRule",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
        "valueString": "provision"
      } ],
      "max": "1",
      "id": "Consent.provision",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.provision"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Consent.provision.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.type",
      "min": 0,
      "definition": "Action  to take - permit or deny - when the rule conditions are met.  Not permitted in root rule, required in all nested rules.",
      "isModifier": false,
      "short": "deny | permit",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-provision-type|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentProvisionType"
        } ],
        "description": "How a rule statement is applied, such as adding additional consent or removing consent."
      },
      "max": "0",
      "id": "Consent.provision.type",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.provision.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.period",
      "min": 0,
      "definition": "The timeframe in this rule is valid.",
      "isModifier": false,
      "short": "Timeframe for this rule",
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "Consent.provision.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.provision.period"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.period.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.period.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.period.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.period.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ch-epr-ppqm-date-format",
        "human": "Timestamp must have precision of days, i.e. not contain the time part",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')"
      } ],
      "path": "Consent.provision.period.start",
      "min": 0,
      "definition": "The start of the period. The boundary is inclusive.",
      "isModifier": false,
      "short": "Start date of the policy set validity, yyyy-mm-dd",
      "mapping": [ {
        "map": "DR.1",
        "identity": "v2"
      }, {
        "map": "./low",
        "identity": "rim"
      }, {
        "map": "/PolicySet/Target/Environments/Environment/EnvironmentMatch[@MatchId='urn:oasis:names:tc:xacml:1.0:function:date-less-than-or-equal']/AtributeValue",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Consent.provision.period.start",
      "condition": [ "per-1" ],
      "comment": "If the low element is missing, the meaning is that the low boundary is not known.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Period.start"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ch-epr-ppqm-date-format",
        "human": "Timestamp must have precision of days, i.e. not contain the time part",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')"
      } ],
      "path": "Consent.provision.period.end",
      "min": 1,
      "definition": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
      "isModifier": false,
      "short": "End date of the policy set validity, yyyy-mm-dd",
      "mapping": [ {
        "map": "DR.2",
        "identity": "v2"
      }, {
        "map": "./high",
        "identity": "rim"
      }, {
        "map": "/PolicySet/Target/Environments/Environment/EnvironmentMatch[@MatchId='urn:oasis:names:tc:xacml:1.0:function:date-greater-than-or-equal']/AtributeValue",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "mustSupport": true,
      "meaningWhenMissing": "If the end of the period is missing, it means that the period is ongoing",
      "max": "1",
      "id": "Consent.provision.period.end",
      "condition": [ "per-1" ],
      "comment": "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Period.end"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor",
      "min": 1,
      "definition": "Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
      "isModifier": false,
      "short": "Who|what controlled by this rule (or group, by role)",
      "type": [ {
        "code": "BackboneElement"
      } ],
      "meaningWhenMissing": "There is no specific actor associated with the exception",
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
        "valueString": "provisionActor"
      } ],
      "max": "1",
      "id": "Consent.provision.actor",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.actor"
      },
      "isSummary": false
    }, {
      "path": "Consent.provision.actor.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Consent.provision.actor.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role",
      "min": 1,
      "definition": "How the individual is involved in the resources content that is described in the exception.",
      "isModifier": false,
      "short": "How the actor is involved",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-term/ValueSet/EprRole"
      },
      "max": "1",
      "id": "Consent.provision.actor.role",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.provision.actor.role"
      },
      "isSummary": false
    }, {
      "path": "Consent.provision.actor.role.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.role.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.role.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.role.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "Consent.provision.actor.role.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.actor.role.coding.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.role.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.role.coding.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "isModifier": false,
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:2.0:subject:role']/AttributeValue/CodedValue/@codeSystem",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.system",
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.6",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "isModifier": false,
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.version",
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "isModifier": false,
      "short": "EPR actor role code",
      "mapping": [ {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:2.0:subject:role']/AttributeValue/CodedValue/@code",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.code",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "isModifier": false,
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.display",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "isModifier": false,
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.coding.userSelected",
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.role.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.provision.actor.role.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference",
      "min": 1,
      "definition": "The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').",
      "isModifier": false,
      "short": "Resource for the actor (or group, by role)",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/CareTeam", "http://hl7.org/fhir/StructureDefinition/Organization", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/PractitionerRole" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Consent.provision.actor.reference",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.provision.actor.reference"
      },
      "isSummary": false
    }, {
      "path": "Consent.provision.actor.reference.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.reference.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.reference.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.reference.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.reference",
      "min": 0,
      "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
      "isModifier": false,
      "short": "Literal reference, Relative, internal or absolute URL",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.reference",
      "condition": [ "ref-1" ],
      "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.reference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.type",
      "min": 0,
      "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
      "isModifier": false,
      "short": "Type the reference refers to (e.g. \"Patient\")",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/resource-types",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "FHIRResourceTypeExt"
        } ],
        "description": "Aa resource (or, for logical models, the URI of the logical model)."
      },
      "max": "0",
      "id": "Consent.provision.actor.reference.type",
      "comment": "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier",
      "min": 0,
      "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
      "isModifier": false,
      "short": "This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative",
      "mapping": [ {
        "map": ".identifier",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier",
      "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.identifier"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.actor.reference.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.reference.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.reference.identifier.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.use",
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 1,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "isModifier": false,
      "short": "Description of identifier",
      "mapping": [ {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type",
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.actor.reference.identifier.type.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.reference.identifier.type.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 1,
      "definition": "A reference to a code defined by a terminology system.",
      "isModifier": false,
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type.coding",
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.actor.reference.identifier.type.coding.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type.coding.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.actor.reference.identifier.type.coding.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 0,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "isModifier": false,
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.type.coding.system",
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "isModifier": false,
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.type.coding.version",
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "isModifier": false,
      "short": "Actor identifier type code (name qualifier)",
      "mapping": [ {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier']/AttributeValue",
        "comment": "if NOT equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmActorIdentifierType"
      },
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type.coding.code",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "isModifier": false,
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.type.coding.display",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "isModifier": false,
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.type.coding.userSelected",
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.type.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "isModifier": false,
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.type.text",
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "isModifier": false,
      "short": "The namespace for the identifier value",
      "mapping": [ {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.system",
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "isModifier": false,
      "short": "ID of an healthcare professional, group of healthcare professionals, patient, or representative",
      "mapping": [ {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:1.0:subject:subject-id']/AttributeValue",
        "comment": "if identifier.type is NOT equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:organization-id']/AttributeValue",
        "comment": "if identifier.type is equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Consent.provision.actor.reference.identifier.value",
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "isModifier": false,
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "isModifier": false,
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "0",
      "id": "Consent.provision.actor.reference.identifier.assigner",
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.actor.reference.display",
      "min": 0,
      "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
      "isModifier": false,
      "short": "This element is present only in policy sets which reference indefinite sets of actors",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.provision.actor.reference.display",
      "comment": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.action",
      "min": 0,
      "definition": "Actions controlled by this Rule.",
      "isModifier": false,
      "short": "Actions controlled by this rule",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "meaningWhenMissing": "all actions",
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-action",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentAction"
        } ],
        "description": "Detailed codes for the consent action."
      },
      "max": "0",
      "id": "Consent.provision.action",
      "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'.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.action"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.securityLabel",
      "min": 0,
      "definition": "A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.",
      "isModifier": false,
      "short": "Security Labels that define affected resources",
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/security-labels",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "SecurityLabels"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "Security Labels from the Healthcare Privacy and Security Classification System."
      },
      "max": "0",
      "id": "Consent.provision.securityLabel",
      "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. When the purpose of use tag is on the data, access request purpose of use shall not conflict.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.securityLabel"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose",
      "min": 0,
      "definition": "The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.",
      "isModifier": false,
      "short": "Context of activities covered by this rule",
      "type": [ {
        "code": "Coding"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-term/ValueSet/EprPurposeOfUse"
      },
      "max": "*",
      "id": "Consent.provision.purpose",
      "comment": "When the purpose of use tag is on the data, access request purpose of use shall not conflict.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.purpose"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.purpose.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.purpose.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.purpose.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.purpose.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 1,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "isModifier": false,
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:purposeofuse']/AttributeValue/CodedValue/@codeSystem",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Consent.provision.purpose.system",
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.5",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "isModifier": false,
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Consent.provision.purpose.version",
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 1,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "isModifier": false,
      "short": "Symbol in syntax defined by the system",
      "mapping": [ {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:purposeofuse']/AttributeValue/CodedValue/@code",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "max": "1",
      "id": "Consent.provision.purpose.code",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "isModifier": false,
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Consent.provision.purpose.display",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.purpose.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "isModifier": false,
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "Consent.provision.purpose.userSelected",
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.class",
      "min": 0,
      "definition": "The class of information covered by this rule. 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.",
      "isModifier": false,
      "short": "e.g. Resource Type, Profile, CDA, etc.",
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-content-class",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentContentClass"
        } ],
        "description": "The class (type) of information a consent rule covers."
      },
      "max": "0",
      "id": "Consent.provision.class",
      "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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.class"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.code",
      "min": 0,
      "definition": "If this code is found in an instance, then the rule applies.",
      "isModifier": false,
      "short": "e.g. LOINC or SNOMED CT code, etc. in the content",
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-content-code",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentContentCode"
        } ],
        "description": "If this code is found in an instance, then the exception applies."
      },
      "max": "0",
      "id": "Consent.provision.code",
      "comment": "Typical use of this is a Document code with class = CDA.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.dataPeriod",
      "min": 0,
      "definition": "Clinical or Operational Relevant period of time that bounds the data controlled by this rule.",
      "isModifier": false,
      "short": "Timeframe for data controlled by this rule",
      "type": [ {
        "code": "Period"
      } ],
      "max": "0",
      "id": "Consent.provision.dataPeriod",
      "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.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Consent.provision.dataPeriod"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.data",
      "min": 0,
      "definition": "The resources controlled by this rule if specific resources are referenced.",
      "isModifier": false,
      "short": "Data controlled by this rule",
      "mapping": [ {
        "map": "Role",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "meaningWhenMissing": "all data",
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name",
        "valueString": "provisionData"
      } ],
      "max": "0",
      "id": "Consent.provision.data",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.data"
      },
      "isSummary": true
    }, {
      "path": "Consent.provision.data.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Consent.provision.data.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.data.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Consent.provision.data.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.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Consent.provision.data.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Consent.provision.data.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.data.meaning",
      "min": 1,
      "definition": "How the resource reference is interpreted when testing consent restrictions.",
      "isModifier": false,
      "short": "instance | related | dependents | authoredby",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/consent-data-meaning|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ConsentDataMeaning"
        } ],
        "description": "How a resource reference is interpreted when testing consent restrictions."
      },
      "max": "1",
      "id": "Consent.provision.data.meaning",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.provision.data.meaning"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.data.reference",
      "min": 1,
      "definition": "A reference to a specific resource that defines which resources are covered by this consent.",
      "isModifier": false,
      "short": "The actual data reference",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "max": "1",
      "id": "Consent.provision.data.reference",
      "base": {
        "max": "1",
        "min": 1,
        "path": "Consent.provision.data.reference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Consent.provision.provision",
      "min": 0,
      "definition": "Rules which provide exceptions to the base rule or subrules.",
      "isModifier": false,
      "short": "Nested Exception Rules",
      "contentReference": "http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision",
      "max": "0",
      "id": "Consent.provision.provision",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Consent.provision.provision"
      },
      "isSummary": false
    } ]
  },
  "status": "active",
  "id": "29af67b5-a505-402e-8ce9-3eed942307f8",
  "kind": "resource",
  "url": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
  "version": "0.2.0",
  "differential": {
    "element": [ {
      "id": "Consent",
      "path": "Consent",
      "mapping": [ {
        "map": "PolicySet",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "constraint": [ {
        "key": "ch-epr-ppqm-template-structure",
        "human": "The resource shall correspong to one of official policy set templates",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "(\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '201')) and \r\n                    (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'PAT') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:2015:epr-spid') and \r\n                    provision.actor.reference.identifier.value.matches('^[0-9]{18}$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    provision.purpose.empty() and \r\n                    (provision.actor.reference.identifier.value = patient.identifier.value)\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '202')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:emergency-access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:emergency-access-level:restricted')\r\n                    ) and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    provision.actor.reference.identifier.empty() and \r\n                    (provision.actor.reference.display = 'all') and\r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'EMER')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '203')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:provide-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:provide-level:restricted')\r\n                    ) and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    provision.actor.reference.identifier.empty() and \r\n                    (provision.actor.reference.display = 'all') and\r\n                    (provision.purpose.count() = 2) and \r\n                    (provision.purpose.exists(code = 'NORM')) and\r\n                    (provision.purpose.exists(code = 'AUTO'))\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '301')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted') or\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted')\r\n                    ) and \r\n                    (policyRule.coding.code.contains('delegation').empty() or provision.period.end.exists()) and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:gs1:gln') and \r\n                    provision.actor.reference.identifier.value.matches('^[0-9]{13}$') and \r\n                    provision.actor.reference.display.empty() and\r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'NORM')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '302')) and \r\n                    (\r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:normal') or \r\n                        (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:restricted')\r\n                    ) and \r\n                    provision.period.end.exists() and \r\n                    (provision.actor.role.coding.code = 'HCP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:oasis:names:tc:xspa:1.0:subject:organization-id') and \r\n                    provision.actor.reference.identifier.value.lower().matches('^urn:oid:([0-2])((\\\\.0)|(\\\\.[1-9][0-9]*))*$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    (provision.purpose.count() = 1) and \r\n                    (provision.purpose.code = 'NORM')\r\n                ) or (\r\n                    identifier.exists((type.coding.system = 'http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType') and (type.coding.code = 'templateId') and (value = '303')) and \r\n                    (policyRule.coding.code = 'urn:e-health-suisse:2015:policies:access-level:full') and \r\n                    provision.period.empty() and \r\n                    (provision.actor.role.coding.code = 'REP') and \r\n                    (provision.actor.reference.identifier.type.coding.code = 'urn:e-health-suisse:representative-id') and \r\n                    provision.actor.reference.identifier.value.matches('^\\\\S+$') and \r\n                    provision.actor.reference.display.empty() and \r\n                    provision.purpose.empty()\r\n                )"
      } ]
    }, {
      "id": "Consent.identifier",
      "min": 2,
      "path": "Consent.identifier",
      "slicing": {
        "rules": "open",
        "ordered": false,
        "description": "PpqmConsent Identifiers",
        "discriminator": [ {
          "path": "type.coding",
          "type": "pattern"
        } ]
      }
    }, {
      "id": "Consent.identifier.value",
      "path": "Consent.identifier.value",
      "mapping": [ {
        "map": "/PolicySet/@PolicySetId",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.identifier:policySetId",
      "max": "1",
      "min": 1,
      "path": "Consent.identifier",
      "short": "UUID of the Policy Set",
      "sliceName": "policySetId",
      "mustSupport": true
    }, {
      "id": "Consent.identifier:policySetId.use",
      "max": "0",
      "path": "Consent.identifier.use"
    }, {
      "id": "Consent.identifier:policySetId.type",
      "min": 1,
      "path": "Consent.identifier.type",
      "mustSupport": true
    }, {
      "id": "Consent.identifier:policySetId.type.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.identifier.type.coding",
      "patternCoding": {
        "code": "policySetId",
        "system": "http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType"
      }
    }, {
      "id": "Consent.identifier:policySetId.system",
      "max": "0",
      "path": "Consent.identifier.system"
    }, {
      "id": "Consent.identifier:policySetId.value",
      "min": 1,
      "path": "Consent.identifier.value",
      "short": "UUID of the policy set in URN format",
      "constraint": [ {
        "key": "ch-epr-ppqm-uuid-format",
        "human": "The policy set ID must be a UUID in URN format",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "lower().matches('^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$')"
      } ],
      "mustSupport": true
    }, {
      "id": "Consent.identifier:policySetId.period",
      "max": "0",
      "path": "Consent.identifier.period"
    }, {
      "id": "Consent.identifier:policySetId.assigner",
      "max": "0",
      "path": "Consent.identifier.assigner"
    }, {
      "id": "Consent.identifier:templateId",
      "max": "1",
      "min": 1,
      "path": "Consent.identifier",
      "short": "Template ID of the policy set",
      "sliceName": "templateId",
      "mustSupport": true
    }, {
      "id": "Consent.identifier:templateId.use",
      "max": "0",
      "path": "Consent.identifier.use"
    }, {
      "id": "Consent.identifier:templateId.type",
      "min": 1,
      "path": "Consent.identifier.type",
      "mustSupport": true
    }, {
      "id": "Consent.identifier:templateId.type.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.identifier.type.coding",
      "patternCoding": {
        "code": "templateId",
        "system": "http://fhir.ch/ig/ch-epr-ppqm/CodeSystem/PpqmConsentIdentifierType"
      }
    }, {
      "id": "Consent.identifier:templateId.system",
      "max": "0",
      "path": "Consent.identifier.system"
    }, {
      "id": "Consent.identifier:templateId.value",
      "min": 1,
      "path": "Consent.identifier.value",
      "short": "Template ID of the policy set",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmPolicySetTemplateId"
      },
      "mustSupport": true
    }, {
      "id": "Consent.identifier:templateId.period",
      "max": "0",
      "path": "Consent.identifier.period"
    }, {
      "id": "Consent.identifier:templateId.assigner",
      "max": "0",
      "path": "Consent.identifier.assigner"
    }, {
      "id": "Consent.status",
      "path": "Consent.status",
      "short": "Fixed status value",
      "patternCode": "active"
    }, {
      "id": "Consent.scope",
      "path": "Consent.scope",
      "short": "Fixed scope value",
      "patternCodeableConcept": {
        "coding": [ {
          "code": "patient-privacy",
          "system": "http://terminology.hl7.org/CodeSystem/consentscope"
        } ]
      }
    }, {
      "id": "Consent.scope.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.scope.coding"
    }, {
      "id": "Consent.category",
      "max": "1",
      "path": "Consent.category",
      "short": "Fixed category value",
      "patternCodeableConcept": {
        "coding": [ {
          "code": "INFA",
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode"
        } ]
      }
    }, {
      "id": "Consent.category.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.category.coding"
    }, {
      "id": "Consent.patient",
      "min": 1,
      "path": "Consent.patient"
    }, {
      "id": "Consent.patient.reference",
      "max": "0",
      "path": "Consent.patient.reference"
    }, {
      "id": "Consent.patient.type",
      "max": "0",
      "path": "Consent.patient.type"
    }, {
      "id": "Consent.patient.identifier",
      "min": 1,
      "path": "Consent.patient.identifier",
      "mustSupport": true
    }, {
      "id": "Consent.patient.identifier.use",
      "max": "0",
      "path": "Consent.patient.identifier.use"
    }, {
      "id": "Consent.patient.identifier.type",
      "max": "0",
      "path": "Consent.patient.identifier.type"
    }, {
      "id": "Consent.patient.identifier.system",
      "min": 1,
      "path": "Consent.patient.identifier.system",
      "mapping": [ {
        "map": "/PolicySet/Target/Resources/Resource/ResourceMatch/AttributeValue/InstanceIdentifier/@root",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.3"
    }, {
      "id": "Consent.patient.identifier.value",
      "min": 1,
      "path": "Consent.patient.identifier.value",
      "short": "EPR-SPID of the patient (18 digits)",
      "mapping": [ {
        "map": "/PolicySet/Target/Resources/Resource/ResourceMatch/AttributeValue/InstanceIdentifier/@extension",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "constraint": [ {
        "key": "ch-epr-ppqm-epr-spid-format",
        "human": "The patient ID must be an EPR-SPID",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "matches('^[0-9]{18}$')"
      } ]
    }, {
      "id": "Consent.patient.identifier.period",
      "max": "0",
      "path": "Consent.patient.identifier.period"
    }, {
      "id": "Consent.patient.identifier.assigner",
      "max": "0",
      "path": "Consent.patient.identifier.assigner"
    }, {
      "id": "Consent.patient.display",
      "max": "0",
      "path": "Consent.patient.display"
    }, {
      "id": "Consent.dateTime",
      "max": "0",
      "path": "Consent.dateTime"
    }, {
      "id": "Consent.performer",
      "max": "0",
      "path": "Consent.performer"
    }, {
      "id": "Consent.organization",
      "max": "0",
      "path": "Consent.organization"
    }, {
      "id": "Consent.source[x]",
      "max": "0",
      "path": "Consent.source[x]"
    }, {
      "id": "Consent.policy",
      "max": "0",
      "path": "Consent.policy"
    }, {
      "id": "Consent.policyRule",
      "min": 1,
      "path": "Consent.policyRule",
      "short": "ID of the referenced basis policy set",
      "mustSupport": true
    }, {
      "id": "Consent.policyRule.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.policyRule.coding"
    }, {
      "id": "Consent.policyRule.coding.system",
      "max": "0",
      "path": "Consent.policyRule.coding.system"
    }, {
      "id": "Consent.policyRule.coding.version",
      "max": "0",
      "path": "Consent.policyRule.coding.version"
    }, {
      "id": "Consent.policyRule.coding.code",
      "min": 1,
      "path": "Consent.policyRule.coding.code",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmReferencedPolicySet"
      },
      "mapping": [ {
        "map": "/PolicySet/PolicySetIdReference",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.policyRule.coding.userSelected",
      "max": "0",
      "path": "Consent.policyRule.coding.userSelected"
    }, {
      "id": "Consent.verification",
      "max": "0",
      "path": "Consent.verification"
    }, {
      "id": "Consent.provision",
      "min": 1,
      "path": "Consent.provision"
    }, {
      "id": "Consent.provision.type",
      "max": "0",
      "path": "Consent.provision.type"
    }, {
      "id": "Consent.provision.period.start",
      "path": "Consent.provision.period.start",
      "short": "Start date of the policy set validity, yyyy-mm-dd",
      "mapping": [ {
        "map": "/PolicySet/Target/Environments/Environment/EnvironmentMatch[@MatchId='urn:oasis:names:tc:xacml:1.0:function:date-less-than-or-equal']/AtributeValue",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "constraint": [ {
        "key": "ch-epr-ppqm-date-format",
        "human": "Timestamp must have precision of days, i.e. not contain the time part",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')"
      } ],
      "mustSupport": true
    }, {
      "id": "Consent.provision.period.end",
      "min": 1,
      "path": "Consent.provision.period.end",
      "short": "End date of the policy set validity, yyyy-mm-dd",
      "mapping": [ {
        "map": "/PolicySet/Target/Environments/Environment/EnvironmentMatch[@MatchId='urn:oasis:names:tc:xacml:1.0:function:date-greater-than-or-equal']/AtributeValue",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "constraint": [ {
        "key": "ch-epr-ppqm-date-format",
        "human": "Timestamp must have precision of days, i.e. not contain the time part",
        "source": "http://fhir.ch/ig/ch-epr-ppqm/StructureDefinition/PpqmConsent",
        "severity": "error",
        "expression": "toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')"
      } ],
      "mustSupport": true
    }, {
      "id": "Consent.provision.actor",
      "max": "1",
      "min": 1,
      "path": "Consent.provision.actor"
    }, {
      "id": "Consent.provision.actor.role",
      "path": "Consent.provision.actor.role",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-term/ValueSet/EprRole"
      },
      "mustSupport": true
    }, {
      "id": "Consent.provision.actor.role.coding.system",
      "min": 1,
      "path": "Consent.provision.actor.role.coding.system",
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:2.0:subject:role']/AttributeValue/CodedValue/@codeSystem",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.6"
    }, {
      "id": "Consent.provision.actor.role.coding.code",
      "min": 1,
      "path": "Consent.provision.actor.role.coding.code",
      "short": "EPR actor role code",
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:2.0:subject:role']/AttributeValue/CodedValue/@code",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.provision.actor.reference",
      "path": "Consent.provision.actor.reference",
      "mustSupport": true
    }, {
      "id": "Consent.provision.actor.reference.reference",
      "max": "0",
      "path": "Consent.provision.actor.reference.reference"
    }, {
      "id": "Consent.provision.actor.reference.type",
      "max": "0",
      "path": "Consent.provision.actor.reference.type"
    }, {
      "id": "Consent.provision.actor.reference.identifier",
      "path": "Consent.provision.actor.reference.identifier",
      "short": "This element is present only in policy sets which reference a particular healthcare professional, group of healthcare professionals, patient, or representative",
      "mustSupport": true
    }, {
      "id": "Consent.provision.actor.reference.identifier.use",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.use"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type",
      "min": 1,
      "path": "Consent.provision.actor.reference.identifier.type"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.coding",
      "max": "1",
      "min": 1,
      "path": "Consent.provision.actor.reference.identifier.type.coding"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.coding.system",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.type.coding.system"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.coding.version",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.type.coding.version"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.coding.code",
      "min": 1,
      "path": "Consent.provision.actor.reference.identifier.type.coding.code",
      "short": "Actor identifier type code (name qualifier)",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-ppqm/ValueSet/PpqmActorIdentifierType"
      },
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:1.0:subject:subject-id-qualifier']/AttributeValue",
        "comment": "if NOT equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.coding.userSelected",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.type.coding.userSelected"
    }, {
      "id": "Consent.provision.actor.reference.identifier.type.text",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.type.text"
    }, {
      "id": "Consent.provision.actor.reference.identifier.value",
      "min": 1,
      "path": "Consent.provision.actor.reference.identifier.value",
      "short": "ID of an healthcare professional, group of healthcare professionals, patient, or representative",
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xacml:1.0:subject:subject-id']/AttributeValue",
        "comment": "if identifier.type is NOT equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      }, {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:organization-id']/AttributeValue",
        "comment": "if identifier.type is equal to 'urn:oasis:names:tc:xspa:1.0:subject:organization-id'",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.provision.actor.reference.identifier.period",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.period"
    }, {
      "id": "Consent.provision.actor.reference.identifier.assigner",
      "max": "0",
      "path": "Consent.provision.actor.reference.identifier.assigner"
    }, {
      "id": "Consent.provision.actor.reference.display",
      "path": "Consent.provision.actor.reference.display",
      "short": "This element is present only in policy sets which reference indefinite sets of actors",
      "mustSupport": true
    }, {
      "id": "Consent.provision.action",
      "max": "0",
      "path": "Consent.provision.action"
    }, {
      "id": "Consent.provision.securityLabel",
      "max": "0",
      "path": "Consent.provision.securityLabel"
    }, {
      "id": "Consent.provision.purpose",
      "path": "Consent.provision.purpose",
      "binding": {
        "strength": "required",
        "valueSet": "http://fhir.ch/ig/ch-epr-term/ValueSet/EprPurposeOfUse"
      },
      "mustSupport": true
    }, {
      "id": "Consent.provision.purpose.system",
      "min": 1,
      "path": "Consent.provision.purpose.system",
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:purposeofuse']/AttributeValue/CodedValue/@codeSystem",
        "identity": "ppqm-consent-xacml20-mapping"
      } ],
      "patternUri": "urn:oid:2.16.756.5.30.1.127.3.10.5"
    }, {
      "id": "Consent.provision.purpose.code",
      "min": 1,
      "path": "Consent.provision.purpose.code",
      "mapping": [ {
        "map": "/PolicySet/Target/Subjects/Subject/SubjectMatch[SubjectAttributeDesignator/@AttributeId='urn:oasis:names:tc:xspa:1.0:subject:purposeofuse']/AttributeValue/CodedValue/@code",
        "identity": "ppqm-consent-xacml20-mapping"
      } ]
    }, {
      "id": "Consent.provision.class",
      "max": "0",
      "path": "Consent.provision.class"
    }, {
      "id": "Consent.provision.code",
      "max": "0",
      "path": "Consent.provision.code"
    }, {
      "id": "Consent.provision.dataPeriod",
      "max": "0",
      "path": "Consent.provision.dataPeriod"
    }, {
      "id": "Consent.provision.data",
      "max": "0",
      "path": "Consent.provision.data"
    }, {
      "id": "Consent.provision.provision",
      "max": "0",
      "path": "Consent.provision.provision"
    } ]
  },
  "contact": [ {
    "name": "eHealth Suisse",
    "telecom": [ {
      "value": "http://www.e-health-suisse.ch",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Consent"
}