Permission
type: StructureDefinition
node role: treeRoot
id:
  v: Permission
meta:
  last updated:
    v: 2021-01-02T08:58:31.578+11:00
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition Permission Last updated: 2021-01-02 08:58:31+1100 Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Permission 0..* DomainResource Access Rules Elements defined in Ancestors:id, meta, implicitRules, language, <a href="http://hl7.org/fhir/R5/domainresource.html" title="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.">text, contained, <a href="http://hl7.org/fhir/R5/domainresource.html" title="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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.">extension, <a href="http://hl7.org/fhir/R5/domainresource.html" title="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 managable, 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.#xA;#xA;Mod…
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-category
    l: structuredefinition-category
  value: String
    v: Foundation.Security
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status
    l: structuredefinition-standards-status
  value: Code
    v: trial-use
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm
    l: structuredefinition-fmm
  value: Integer
    v: 1
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category
    l: structuredefinition-security-category
  value: Code
    v: not-classified
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
    l: structuredefinition-wg
  value: Code
    v: sec
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status
    l: entered-in-error-status
  value: Code
    v: .status = entered-in-error
extension:
  url:
    v: http://hl7.org/fhir/tools/StructureDefinition/additional-resource
    l: additional-resource
  value: Boolean
    v: true
url:
  v: http://hl7.org/fhir/StructureDefinition/Permission
  l: Permission
identifier:
  system:
    v: urn:ietf:rfc:3986
    l: 3986
  value:
    v: urn:oid:2.16.840.1.113883.4.642.5.1436
version:
  v: 1.0.0-current
name:
  v: Permission
title:
  v: Permission
status:
  v: active
date:
  v: 2021-01-02T08:58:31+11:00
publisher:
  v: HL7 International / Security
contact:
  name:
    v: HL7 International / Security
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/secure
  telecom:
    system:
      v: email
contact:
  name:
    v: John Moehrke
  telecom:
    system:
      v: email
    use:
      v: work
contact:
  name:
    v: HL7 Security Work Group
  telecom:
    system:
      v: url
    value:
      v: http://www.hl7.org/Special/committees/secure/index.cfm
description:
  v: Permission resource holds access rules for a given data and access request context.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
      l: m49.htm
    code:
      v: 001
fhir version:
  v: 6.0.0-ballot3
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
    l: fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: fhirconsent
  uri:
    v: http://hl7.org/fhir/consent
    l: consent
  name:
    v: FHIR Consent Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
    l: v3
  name:
    v: RIM Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Permission
  l: Permission
base definition:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource
derivation:
  v: specialization
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
      l: snapshot-base-version
    value: String
      v: 6.0.0-ballot3
  element:
    id:
      v: Permission
    path:
      v: Permission
    short:
      v: Access Rules
    definition:
      v: Permission resource holds access rules for a given data and access request context.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: DomainResource
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: 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
      expression:
        v: contained.where((('#'+id.trace('id') in %resource.descendants().select(reference | as(uri))) or descendants().where(reference='#' | as(uri)='#').exists()).not()).trace('unmatched', id).empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        l: DomainResource

key:
  v: dom-4
severity:
  v: error
human:
  v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
expression:
  v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
source:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource

key:
  v: dom-5
severity:
  v: error
human:
  v: If a resource is contained in another resource, it SHALL NOT have a security label
expression:
  v: contained.meta.security.empty()
source:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource

extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice
    l: elementdefinition-bestpractice
  value: Boolean
    v: true
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation
    l: elementdefinition-bestpractice-explanation
  value: Markdown
    v: 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.
key:
  v: dom-6
severity:
  v: warning
human:
  v: A resource should have narrative for robust management
expression:
  v: text.`div`.exists()
source:
  v: http://hl7.org/fhir/StructureDefinition/DomainResource
  l: DomainResource

v: false

v: false

v: false

identity:
  v: w5
map:
  v: infrastructure.information

identity:
  v: rim
map:
  v: Entity. Role, or Act,Entity, Role, or Act

id:
  v: Permission.id
path:
  v: Permission.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: Within the context of the FHIR RESTful interactions, the resource has an id except for cases like the create and conditional update. Otherwise, the use of the resouce id depends on the given use case.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Permission.meta
path:
  v: Permission.meta
short:
  v: Metadata about the resource
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
    l: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Permission.implicitRules
path:
  v: Permission.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: 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.
comment:
  v: 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 its narrative along with other profiles, value sets, etc.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
    l: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation
is summary:
  v: true

id:
  v: Permission.language
path:
  v: Permission.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: Language
  strength:
    v: required
  description:
    v: IETF language tag for a human language
  value set:
    v: http://hl7.org/fhir/ValueSet/all-languages|6.0.0-ballot3
    l: http://hl7.org/fhir/ValueSet/all-languages
  additional:
    purpose:
      v: starter
    value set:
      v: http://hl7.org/fhir/ValueSet/languages|6.0.0-ballot3
      l: http://hl7.org/fhir/ValueSet/languages

id:
  v: Permission.text
path:
  v: Permission.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: 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.
comment:
  v: Contained resources do not have a 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.
alias:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
    l: Narrative
condition:
  v: dom-6
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Permission.contained
path:
  v: Permission.contained
short:
  v: Contained, inline Resources
definition:
  v: These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, nor can they have their own independent transaction scope. This is allowed to be a Parameters resource if and only if it is referenced by a resource that provides context/meaning.
comment:
  v: 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. Contained resources may be a resource type defined in the FHIR specification, or an [additional resource](http://build.fhir.org/resource.html#additional).
alias:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
    l: Resource
condition:
  v: dom-2
condition:
  v: dom-4
condition:
  v: dom-3
condition:
  v: dom-5
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.extension
path:
  v: Permission.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.modifierExtension
path:
  v: Permission.modifierExtension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Extensions that cannot be ignored
definition:
  v: 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 managable, 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
must support:
  v: false
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.identifier
path:
  v: Permission.identifier
short:
  v: Business Identifier for permission
definition:
  v: A unique identifier assigned to this permission.
requirements:
  v: Allows permission to be distinguished and referenced.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
    l: Identifier
is summary:
  v: true
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier

id:
  v: Permission.status
path:
  v: Permission.status
short:
  v: active | entered-in-error | draft | rejected
definition:
  v: Status.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Permission.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionStatus
  strength:
    v: required
  description:
    v: Codes identifying the lifecycle stage of a product.
  value set:
    v: http://hl7.org/fhir/ValueSet/permission-status-vs
    l: permission-status-vs
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.status

id:
  v: Permission.asserter
path:
  v: Permission.asserter
short:
  v: The person or entity that asserts the permission
definition:
  v: The person or entity that asserts the permission.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.asserter
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole
    l: PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CareTeam
    l: CareTeam
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    l: RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService
    l: HealthcareService
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.grantor, Consent.grantee, Consent.manager, Consent.controller

id:
  v: Permission.date
path:
  v: Permission.date
short:
  v: The date that permission was asserted
definition:
  v: The date that permission was asserted.
alias:
  v: class
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.date
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: dateTime
    l: dateTime
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.dateTime

id:
  v: Permission.validity
path:
  v: Permission.validity
short:
  v: The period in which the permission is active
definition:
  v: The period in which the permission is active.
alias:
  v: type
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.validity
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.period

id:
  v: Permission.justification
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: right
path:
  v: Permission.justification
short:
  v: The asserted justification for using the data
definition:
  v: The asserted justification for using the data.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.justification
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Permission.justification.id
path:
  v: Permission.justification.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.justification.extension
path:
  v: Permission.justification.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.justification.modifierExtension
path:
  v: Permission.justification.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.justification.basis
path:
  v: Permission.justification.basis
short:
  v: The regulatory grounds upon which this Permission builds
definition:
  v: This would be a codeableconcept, or a coding, for example, the 6 grounds for processing in GDPR.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.justification.basis
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ConsentRegulatoryBasis
  strength:
    v: example
  description:
    v: Regulatory policy examples
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-policy
    l: consent-policy
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.regulatoryBasis

id:
  v: Permission.justification.evidence
path:
  v: Permission.justification.evidence
short:
  v: Justifing rational
comment:
  v: While any resource may be used, DocumentReference, Consent, PlanDefinition, and Contract would be most frequent
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.justification.evidence
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.policyBasis.reference

id:
  v: Permission.combining
path:
  v: Permission.combining
short:
  v: deny-overrides | permit-overrides | ordered-deny-overrides | ordered-permit-overrides | deny-unless-permit | permit-unless-deny
definition:
  v: Defines a procedure for arriving at an access decision given the set of rules.
comment:
  v: see [XACML Combining Rules](http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-cos01-en.html#_Toc325047267)
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Permission.combining
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is modifier:
  v: true
is modifier reason:
  v: Defines how the rules are to be combined.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionCombining
  strength:
    v: required
  description:
    v: How the rules are to be combined.
  value set:
    v: http://hl7.org/fhir/ValueSet/permission-rule-combining-vs
    l: permission-rule-combining-vs

id:
  v: Permission.rule
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name
    l: structuredefinition-explicit-type-name
  value: String
    v: Rule
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule
short:
  v: Constraints to the Permission
definition:
  v: A set of rules.
comment:
  v: Each `.rule` is evaluated within the combining rule identified in the `.combining` element.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
order meaning:
  v: The order of the rules processing is defined in rule combining selected in .combining element.
constraint:
  key:
    v: prm-1
  severity:
    v: error
  human:
    v: If the import element is populated then the type, data, and activity shall not be populated
  expression:
    v: import.exists() implies type.exists().not() and data.exists().not() and activity.exists().not()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Permission|1.0.0-current
    l: http://hl7.org/fhir/StructureDefinition/Permission
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Permission.rule.id
path:
  v: Permission.rule.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.extension
path:
  v: Permission.rule.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.modifierExtension
path:
  v: Permission.rule.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.import
path:
  v: Permission.rule.import
short:
  v: Reference to a Permission
definition:
  v: This rule is expressed in another Permission resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.import
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Permission|1.0.0-current
    l: http://hl7.org/fhir/StructureDefinition/Permission
condition:
  v: prm-1
is modifier:
  v: false
is summary:
  v: true

id:
  v: Permission.rule.type
path:
  v: Permission.rule.type
short:
  v: deny | permit
definition:
  v: deny | permit.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.type
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
    l: code
condition:
  v: prm-1
is modifier:
  v: true
is modifier reason:
  v: Sets the context for the meaning of the rules.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionProvisionType
  strength:
    v: required
  description:
    v: How a rule statement is applied.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-provision-type
    l: consent-provision-type
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.type

id:
  v: Permission.rule.data
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: right
path:
  v: Permission.rule.data
short:
  v: The selection criteria to identify data that is within scope of this provision
definition:
  v: A description or definition of which activities are allowed to be done on the data.
comment:
  v: Within a `.rule` any repetitions of the `.data` element are in an OR relationship. That is to say that the data identified by the rule is all the data identified by all repetitions of `.data`. Thus to identify one rule that applies to data tagged with `STD` and data that is tagged with `HIV`, one would repeat this at the `.data` level. Within the `.data` element, all elements and all repetitions of elements, are in an AND relationship. Thus to select data that has both `STD` and `HIV` one puts both into one `.rule`. To have different rules for `STD` from `HIV`, one would need to have two `.rule` elements. To have a rule that applies to both, those that have just `STD` and just `HIV`, this repetition may also be done at the data level as described above.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.data
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
condition:
  v: prm-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Permission.rule.data.id
path:
  v: Permission.rule.data.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.data.extension
path:
  v: Permission.rule.data.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.data.modifierExtension
path:
  v: Permission.rule.data.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.data.resource
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule.data.resource
short:
  v: Explicit FHIR Resource references
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.data.resource
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.data

id:
  v: Permission.rule.data.resource.id
path:
  v: Permission.rule.data.resource.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.data.resource.extension
path:
  v: Permission.rule.data.resource.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.data.resource.modifierExtension
path:
  v: Permission.rule.data.resource.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.data.resource.meaning
path:
  v: Permission.rule.data.resource.meaning
short:
  v: instance | related | dependents | authoredby
definition:
  v: How the resource reference is interpreted when testing consent restrictions.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Permission.rule.data.resource.meaning
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ConsentDataMeaning
  strength:
    v: required
  description:
    v: How a resource reference is interpreted when testing consent restrictions.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-data-meaning
    l: consent-data-meaning

id:
  v: Permission.rule.data.resource.reference
path:
  v: Permission.rule.data.resource.reference
short:
  v: The actual data reference
definition:
  v: A reference to a specific resource that defines which resources are covered by this consent.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Permission.rule.data.resource.reference
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
is summary:
  v: true

id:
  v: Permission.rule.data.resourceType
path:
  v: Permission.rule.data.resourceType
short:
  v: e.g. Resource Type, Profile, etc
definition:
  v: The resourceType(s) covered by this rule. The type can be a FHIR resource type or a profile on a type that indicates what information the rule applies to.
comment:
  v: The intention of the resourceType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.data.resourceType
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
binding:
  strength:
    v: extensible
  description:
    v: The resource types a consent provision covers.
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types
    l: resource-types

id:
  v: Permission.rule.data.security
path:
  v: Permission.rule.data.security
short:
  v: Security tag code on .meta.security
definition:
  v: The data in scope are those with the given codes present in that data .meta.security element.
comment:
  v: Note the ConfidentialityCode vocabulary indicates the highest value, thus 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.data.security
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.securityLabel

id:
  v: Permission.rule.data.period
path:
  v: Permission.rule.data.period
short:
  v: Timeframe encompasing data create/update
definition:
  v: Clinical or Operational Relevant period of time that bounds the data controlled by this rule.
comment:
  v: This has a different sense to the .validity.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.data.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
    l: Period
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.dataPeriod

id:
  v: Permission.rule.data.expression
path:
  v: Permission.rule.data.expression
short:
  v: Expression identifying the data
definition:
  v: Used when other data selection elements are insufficient.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.data.expression
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Expression
    l: Expression
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.class, Consent.provision.code, Consent.provision.expression

id:
  v: Permission.rule.activity
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule.activity
short:
  v: A description or definition of which activities are allowed to be done on the data
definition:
  v: A description or definition of which activities are allowed to be done on the data.
comment:
  v: Within a `.rule` any repetitions of the `.activity` element are in an OR relationship. That is to say that the rule applies to all the repetitions of `.activity`. Thus to identify one rule that applies to both `TREAT` and `HOPERAT`, one would have one rule with repetitions at the .activity level. Within the `.activity` element, all elements and all repetitions of elements, are in an AND relationship. Thus to control an actity that is covering purpose of both `TREAT` and `HOPERAT`, one rule with an `.activity` `.purpose` holding both `TREAT` and `HOPERAT` can define that rule. However this will not cover activities covering only `TREAT`, for that repeat at the `.activity` with just a `.purpose` of `TREAT`.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.activity
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
condition:
  v: prm-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is summary:
  v: true

id:
  v: Permission.rule.activity.id
path:
  v: Permission.rule.activity.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.activity.extension
path:
  v: Permission.rule.activity.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.activity.modifierExtension
path:
  v: Permission.rule.activity.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.activity.actor
path:
  v: Permission.rule.activity.actor
short:
  v: Who|what is controlled by this rule
definition:
  v: 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').
comment:
  v: When both reference and role are given the actor is only selected when that reference actor is functionally carrying out that role.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.activity.actor
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
meaning when missing:
  v: There is no specific actor associated with the rule
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor

id:
  v: Permission.rule.activity.actor.id
path:
  v: Permission.rule.activity.actor.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.activity.actor.extension
path:
  v: Permission.rule.activity.actor.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.activity.actor.modifierExtension
path:
  v: Permission.rule.activity.actor.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.activity.actor.role
path:
  v: Permission.rule.activity.actor.role
short:
  v: How the actor is involved
definition:
  v: How the individual is involved in the activity that is described in the rule.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.activity.actor.role
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ActorRole
  strength:
    v: extensible
  description:
    v: How an actor is involved in the rule.
  value set:
    v: http://hl7.org/fhir/ValueSet/participation-role-type
    l: participation-role-type
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor.role

id:
  v: Permission.rule.activity.actor.reference
path:
  v: Permission.rule.activity.actor.reference
short:
  v: Authorized actor(s)
definition:
  v: The actor(s) authorized for the defined activity.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Permission.rule.activity.actor.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    l: Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    l: Group
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CareTeam
    l: CareTeam
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    l: RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole
    l: PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
    l: DeviceDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService
    l: HealthcareService
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor.reference

id:
  v: Permission.rule.activity.action
path:
  v: Permission.rule.activity.action
short:
  v: Actions controlled by this rule
definition:
  v: Actions controlled by this Rule.
comment:
  v: Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.activity.action
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ProcessingActivityAction
  strength:
    v: preferred
  description:
    v: Detailed codes for the action.
  value set:
    v: http://hl7.org/fhir/ValueSet/type-restful-interaction
    l: type-restful-interaction
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.action

id:
  v: Permission.rule.activity.purpose
path:
  v: Permission.rule.activity.purpose
short:
  v: The purpose for which the permission is given
definition:
  v: The purpose for which the permission is given.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.activity.purpose
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PurposeOfUse
  strength:
    v: preferred
  description:
    v: What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse|3.1.0
    l: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.purpose

id:
  v: Permission.rule.limit
path:
  v: Permission.rule.limit
short:
  v: What limits apply to the use of the data
definition:
  v: What restrictions must be applied to the use of the data by the actor.
comment:
  v: Within a `.rule` all repetitions of the `.limit` all apply to the rule. That is to say if there are multiple limits, and the rule permits the activity, then all the identified limits are applied to that authorized activity.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.limit
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
meaning when missing:
  v: There is no limit beyond those specified in the authorized activity to the authorized data.
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children or both
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element

id:
  v: Permission.rule.limit.id
path:
  v: Permission.rule.limit.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
      l: structuredefinition-fhir-type
    value: Url
      v: id
      l: id
  code:
    v: http://hl7.org/fhirpath/System.String
    l: System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.limit.extension
path:
  v: Permission.rule.limit.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Permission.rule.limit.modifierExtension
path:
  v: Permission.rule.limit.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: 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 managable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
requirements:
  v: 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://build.fhir.org/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
    l: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    l: Element
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Permission.rule.limit.control
path:
  v: Permission.rule.limit.control
short:
  v: What coded limits apply to the use of the data
definition:
  v: One or more coded restriction such as a refrain or obligation.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.limit.control
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionUsageLimits
  strength:
    v: preferred
  description:
    v: Obligations and Refrains
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-SecurityControlObservationValue|3.0.0
    l: http://terminology.hl7.org/ValueSet/v3-SecurityControlObservationValue

id:
  v: Permission.rule.limit.tag
path:
  v: Permission.rule.limit.tag
short:
  v: The sensitivity codes that must be removed from the data
definition:
  v: When this rule authorized data use, any data that is tagged with the code here must be redacted from the data provided for that authorized use.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.limit.tag
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionUsageTags
  strength:
    v: preferred
  description:
    v: Sensitivity tags
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-InformationSensitivityPolicy|3.0.0
    l: http://terminology.hl7.org/ValueSet/v3-InformationSensitivityPolicy

id:
  v: Permission.rule.limit.element
path:
  v: Permission.rule.limit.element
short:
  v: What data elements that must be removed from the data
definition:
  v: When this rule authorized data use, the data at the path indicated here, must be redacted from the authorized data provided for that authorized use.
comment:
  v: The path identifies the element and is expressed as a `.` separated list of ancestor elements, beginning with the name of the resource or extension.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Permission.rule.limit.element
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: string
    l: string
is summary:
  v: true

element:
  id:
    v: Permission
  path:
    v: Permission
  short:
    v: Access Rules
  definition:
    v: Permission resource holds access rules for a given data and access request context.
  min:
    v: 0
  max:
    v: *
  mapping:
    identity:
      v: w5
    map:
      v: infrastructure.information
element:
  id:
    v: Permission.identifier
  path:
    v: Permission.identifier
  short:
    v: Business Identifier for permission
  definition:
    v: A unique identifier assigned to this permission.
  requirements:
    v: Allows permission to be distinguished and referenced.
  min:
    v: 0
  max:
    v: *
  type:
    code:
      v: Identifier
      l: Identifier
  is summary:
    v: true
  mapping:
    identity:
      v: w5
    map:
      v: FiveWs.identifier
element:
  id:
    v: Permission.status
  path:
    v: Permission.status
  short:
    v: active | entered-in-error | draft | rejected
  definition:
    v: Status.
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: code
      l: code
  is summary:
    v: true
  binding:
    extension:
      url:
        v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
        l: elementdefinition-bindingName
      value: String
        v: PermissionStatus
    strength:
      v: required
    description:
      v: Codes identifying the lifecycle stage of a product.
    value set:
      v: http://hl7.org/fhir/ValueSet/permission-status-vs
      l: permission-status-vs
  mapping:
    identity:
      v: fhirconsent
    map:
      v: Consent.status
element:
  id:
    v: Permission.asserter
  path:
    v: Permission.asserter
  short:
    v: The person or entity that asserts the permission
  definition:
    v: The person or entity that asserts the permission.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Reference
      l: Reference
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Practitioner
      l: Practitioner
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/PractitionerRole
      l: PractitionerRole
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Organization
      l: Organization
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/CareTeam
      l: CareTeam
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/Patient
      l: Patient
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
      l: RelatedPerson
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/HealthcareService
      l: HealthcareService
  is summary:
    v: true
  mapping:
    identity:
      v: fhirconsent
    map:
      v: Consent.grantor, Consent.grantee, Consent.manager, Consent.controller
element:
  id:
    v: Permission.date
  path:
    v: Permission.date
  short:
    v: The date that permission was asserted
  definition:
    v: The date that permission was asserted.
  alias:
    v: class
  min:
    v: 0
  max:
    v: *
  type:
    code:
      v: dateTime
      l: dateTime
  is summary:
    v: true
  mapping:
    identity:
      v: fhirconsent
    map:
      v: Consent.dateTime
element:
  id:
    v: Permission.validity
  path:
    v: Permission.validity
  short:
    v: The period in which the permission is active
  definition:
    v: The period in which the permission is active.
  alias:
    v: type
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Period
      l: Period
  is summary:
    v: true
  mapping:
    identity:
      v: fhirconsent
    map:
      v: Consent.provision.period
element:
  id:
    v: Permission.justification
  extension:
    url:
      v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
      l: uml-dir
    value: Code
      v: right
  path:
    v: Permission.justification
  short:
    v: The asserted justification for using the data
  definition:
    v: The asserted justification for using the data.
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: BackboneElement
      l: BackboneElement

v: true

id:
  v: Permission.justification.basis
path:
  v: Permission.justification.basis
short:
  v: The regulatory grounds upon which this Permission builds
definition:
  v: This would be a codeableconcept, or a coding, for example, the 6 grounds for processing in GDPR.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ConsentRegulatoryBasis
  strength:
    v: example
  description:
    v: Regulatory policy examples
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-policy
    l: consent-policy
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.regulatoryBasis

id:
  v: Permission.justification.evidence
path:
  v: Permission.justification.evidence
short:
  v: Justifing rational
comment:
  v: While any resource may be used, DocumentReference, Consent, PlanDefinition, and Contract would be most frequent
min:
  v: 0
max:
  v: *
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.policyBasis.reference

id:
  v: Permission.combining
path:
  v: Permission.combining
short:
  v: deny-overrides | permit-overrides | ordered-deny-overrides | ordered-permit-overrides | deny-unless-permit | permit-unless-deny
definition:
  v: Defines a procedure for arriving at an access decision given the set of rules.
comment:
  v: see [XACML Combining Rules](http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-cos01-en.html#_Toc325047267)
min:
  v: 1
max:
  v: 1
type:
  code:
    v: code
    l: code
is modifier:
  v: true
is modifier reason:
  v: Defines how the rules are to be combined.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionCombining
  strength:
    v: required
  description:
    v: How the rules are to be combined.
  value set:
    v: http://hl7.org/fhir/ValueSet/permission-rule-combining-vs
    l: permission-rule-combining-vs

id:
  v: Permission.rule
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/structuredefinition-explicit-type-name
    l: structuredefinition-explicit-type-name
  value: String
    v: Rule
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule
short:
  v: Constraints to the Permission
definition:
  v: A set of rules.
comment:
  v: Each `.rule` is evaluated within the combining rule identified in the `.combining` element.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
order meaning:
  v: The order of the rules processing is defined in rule combining selected in .combining element.
constraint:
  key:
    v: prm-1
  severity:
    v: error
  human:
    v: If the import element is populated then the type, data, and activity shall not be populated
  expression:
    v: import.exists() implies type.exists().not() and data.exists().not() and activity.exists().not()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Permission|1.0.0-current
    l: http://hl7.org/fhir/StructureDefinition/Permission
is summary:
  v: true

id:
  v: Permission.rule.import
path:
  v: Permission.rule.import
short:
  v: Reference to a Permission
definition:
  v: This rule is expressed in another Permission resource.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Permission|1.0.0-current
    l: http://hl7.org/fhir/StructureDefinition/Permission
condition:
  v: prm-1
is modifier:
  v: false
is summary:
  v: true

id:
  v: Permission.rule.type
path:
  v: Permission.rule.type
short:
  v: deny | permit
definition:
  v: deny | permit.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
    l: code
condition:
  v: prm-1
is modifier:
  v: true
is modifier reason:
  v: Sets the context for the meaning of the rules.
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionProvisionType
  strength:
    v: required
  description:
    v: How a rule statement is applied.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-provision-type
    l: consent-provision-type
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.type

id:
  v: Permission.rule.data
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: right
path:
  v: Permission.rule.data
short:
  v: The selection criteria to identify data that is within scope of this provision
definition:
  v: A description or definition of which activities are allowed to be done on the data.
comment:
  v: Within a `.rule` any repetitions of the `.data` element are in an OR relationship. That is to say that the data identified by the rule is all the data identified by all repetitions of `.data`. Thus to identify one rule that applies to data tagged with `STD` and data that is tagged with `HIV`, one would repeat this at the `.data` level. Within the `.data` element, all elements and all repetitions of elements, are in an AND relationship. Thus to select data that has both `STD` and `HIV` one puts both into one `.rule`. To have different rules for `STD` from `HIV`, one would need to have two `.rule` elements. To have a rule that applies to both, those that have just `STD` and just `HIV`, this repetition may also be done at the data level as described above.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
condition:
  v: prm-1
is summary:
  v: true

id:
  v: Permission.rule.data.resource
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule.data.resource
short:
  v: Explicit FHIR Resource references
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.data

id:
  v: Permission.rule.data.resource.meaning
path:
  v: Permission.rule.data.resource.meaning
short:
  v: instance | related | dependents | authoredby
definition:
  v: How the resource reference is interpreted when testing consent restrictions.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: code
    l: code
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ConsentDataMeaning
  strength:
    v: required
  description:
    v: How a resource reference is interpreted when testing consent restrictions.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-data-meaning
    l: consent-data-meaning

id:
  v: Permission.rule.data.resource.reference
path:
  v: Permission.rule.data.resource.reference
short:
  v: The actual data reference
definition:
  v: A reference to a specific resource that defines which resources are covered by this consent.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    l: Resource
is summary:
  v: true

id:
  v: Permission.rule.data.resourceType
path:
  v: Permission.rule.data.resourceType
short:
  v: e.g. Resource Type, Profile, etc
definition:
  v: The resourceType(s) covered by this rule. The type can be a FHIR resource type or a profile on a type that indicates what information the rule applies to.
comment:
  v: The intention of the resourceType element is that the codes refer to profiles or document types defined in a standard or an implementation guide somewhere.
min:
  v: 0
max:
  v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
binding:
  strength:
    v: extensible
  description:
    v: The resource types a consent provision covers.
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types
    l: resource-types

id:
  v: Permission.rule.data.security
path:
  v: Permission.rule.data.security
short:
  v: Security tag code on .meta.security
definition:
  v: The data in scope are those with the given codes present in that data .meta.security element.
comment:
  v: Note the ConfidentialityCode vocabulary indicates the highest value, thus 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.
min:
  v: 0
max:
  v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.securityLabel

id:
  v: Permission.rule.data.period
path:
  v: Permission.rule.data.period
short:
  v: Timeframe encompasing data create/update
definition:
  v: Clinical or Operational Relevant period of time that bounds the data controlled by this rule.
comment:
  v: This has a different sense to the .validity.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Period
    l: Period
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.dataPeriod

id:
  v: Permission.rule.data.expression
path:
  v: Permission.rule.data.expression
short:
  v: Expression identifying the data
definition:
  v: Used when other data selection elements are insufficient.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Expression
    l: Expression
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.class, Consent.provision.code, Consent.provision.expression

id:
  v: Permission.rule.activity
extension:
  url:
    v: http://hl7.org/fhir/build/StructureDefinition/uml-dir
    l: uml-dir
  value: Code
    v: down
path:
  v: Permission.rule.activity
short:
  v: A description or definition of which activities are allowed to be done on the data
definition:
  v: A description or definition of which activities are allowed to be done on the data.
comment:
  v: Within a `.rule` any repetitions of the `.activity` element are in an OR relationship. That is to say that the rule applies to all the repetitions of `.activity`. Thus to identify one rule that applies to both `TREAT` and `HOPERAT`, one would have one rule with repetitions at the .activity level. Within the `.activity` element, all elements and all repetitions of elements, are in an AND relationship. Thus to control an actity that is covering purpose of both `TREAT` and `HOPERAT`, one rule with an `.activity` `.purpose` holding both `TREAT` and `HOPERAT` can define that rule. However this will not cover activities covering only `TREAT`, for that repeat at the `.activity` with just a `.purpose` of `TREAT`.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
condition:
  v: prm-1
is summary:
  v: true

id:
  v: Permission.rule.activity.actor
path:
  v: Permission.rule.activity.actor
short:
  v: Who|what is controlled by this rule
definition:
  v: 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').
comment:
  v: When both reference and role are given the actor is only selected when that reference actor is functionally carrying out that role.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
meaning when missing:
  v: There is no specific actor associated with the rule
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor

id:
  v: Permission.rule.activity.actor.role
path:
  v: Permission.rule.activity.actor.role
short:
  v: How the actor is involved
definition:
  v: How the individual is involved in the activity that is described in the rule.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ActorRole
  strength:
    v: extensible
  description:
    v: How an actor is involved in the rule.
  value set:
    v: http://hl7.org/fhir/ValueSet/participation-role-type
    l: participation-role-type
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor.role

id:
  v: Permission.rule.activity.actor.reference
path:
  v: Permission.rule.activity.actor.reference
short:
  v: Authorized actor(s)
definition:
  v: The actor(s) authorized for the defined activity.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Reference
    l: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    l: Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group
    l: Group
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CareTeam
    l: CareTeam
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    l: Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    l: Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    l: Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    l: RelatedPerson
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole
    l: PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
    l: DeviceDefinition
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService
    l: HealthcareService
is summary:
  v: true
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.actor.reference

id:
  v: Permission.rule.activity.action
path:
  v: Permission.rule.activity.action
short:
  v: Actions controlled by this rule
definition:
  v: Actions controlled by this Rule.
comment:
  v: Note that this is the direct action (not the grounds for the action covered in the purpose element). At present, the only action in the understood and tested scope of this resource is 'read'.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: ProcessingActivityAction
  strength:
    v: preferred
  description:
    v: Detailed codes for the action.
  value set:
    v: http://hl7.org/fhir/ValueSet/type-restful-interaction
    l: type-restful-interaction
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.action

id:
  v: Permission.rule.activity.purpose
path:
  v: Permission.rule.activity.purpose
short:
  v: The purpose for which the permission is given
definition:
  v: The purpose for which the permission is given.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PurposeOfUse
  strength:
    v: preferred
  description:
    v: What purposes of use are controlled by this exception. If more than one label is specified, operations must have all the specified labels.
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse|3.1.0
    l: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
mapping:
  identity:
    v: fhirconsent
  map:
    v: Consent.provision.purpose

id:
  v: Permission.rule.limit
path:
  v: Permission.rule.limit
short:
  v: What limits apply to the use of the data
definition:
  v: What restrictions must be applied to the use of the data by the actor.
comment:
  v: Within a `.rule` all repetitions of the `.limit` all apply to the rule. That is to say if there are multiple limits, and the rule permits the activity, then all the identified limits are applied to that authorized activity.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
    l: BackboneElement
meaning when missing:
  v: There is no limit beyond those specified in the authorized activity to the authorized data.

id:
  v: Permission.rule.limit.control
path:
  v: Permission.rule.limit.control
short:
  v: What coded limits apply to the use of the data
definition:
  v: One or more coded restriction such as a refrain or obligation.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
    l: CodeableConcept
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionUsageLimits
  strength:
    v: preferred
  description:
    v: Obligations and Refrains
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-SecurityControlObservationValue|3.0.0
    l: http://terminology.hl7.org/ValueSet/v3-SecurityControlObservationValue

id:
  v: Permission.rule.limit.tag
path:
  v: Permission.rule.limit.tag
short:
  v: The sensitivity codes that must be removed from the data
definition:
  v: When this rule authorized data use, any data that is tagged with the code here must be redacted from the data provided for that authorized use.
min:
  v: 0
max:
  v: *
type:
  code:
    v: Coding
    l: Coding
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
      l: elementdefinition-bindingName
    value: String
      v: PermissionUsageTags
  strength:
    v: preferred
  description:
    v: Sensitivity tags
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-InformationSensitivityPolicy|3.0.0
    l: http://terminology.hl7.org/ValueSet/v3-InformationSensitivityPolicy

id:
  v: Permission.rule.limit.element
path:
  v: Permission.rule.limit.element
short:
  v: What data elements that must be removed from the data
definition:
  v: When this rule authorized data use, the data at the path indicated here, must be redacted from the authorized data provided for that authorized use.
comment:
  v: The path identifies the element and is expressed as a `.` separated list of ancestor elements, beginning with the name of the resource or extension.
min:
  v: 0
max:
  v: *
type:
  code:
    v: string
    l: string
is summary:
  v: true