hr-consent
type: StructureDefinition
node role: treeRoot
id:
  v: hr-consent
text:
  status:
    v: extensions
  div:
    v: Generated Narrative: StructureDefinition hr-consent Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Consent 0..* Consent A healthcare consumer's or third party's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time Slices for extension 1..* Extension Extension Slice: Unordered, Open by value:url extension:tenant S 1..1 Identifier Owning site tenant URL: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-tenant status S 1..1 code draft | active | inactive | not-done | entered-in-error | unknown Slices for category S 1..* CodeableConcept Classification of the consent statement - for indexing/retrieval Slice: Unordered, Open by value:coding.system category:permission S 1..1 CodeableConcept Which permission this resource records Binding: Consent Permission Value Set (required) coding S 1..1 Coding Code defined by a terminology system system S 1..1 uri Identity of the terminology system Required Pattern: https://fhir.savannahghi.org/ig/healthy-route/CodeSystem/hr-consent-permission subject S 1..1 Reference(Healthy Route Patient) Who the consent applies to date S 1..1 date Date the participant signed period S 0..1 Period Period over which the permission applies grantor S 1..1 Reference(Healthy Route Patient | RelatedPerson) Who is granting rights according to the policy and rules grantee S 1..* Reference(Healthy Route Organization) Party the permission is granted to controller S 0..* Reference(Healthy Route Organization) Data controller sourceReference S 0..1 Reference(Healthy Route Consent Evidence) The photographed signed page regulatoryBasis S 0..* CodeableConcept Regulatory framework the consent was taken under policyBasis S 1..1 BackboneElement Computable version of the backing policy url S 1..1 url Versioned identifier of the approved information sheet policyText S 0..* Reference(Healthy Route Document) The approved blank informat…
url:
  v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-consent
version:
  v: 0.1.0
name:
  v: HRConsent
title:
  v: Healthy Route Consent
status:
  v: draft
experimental:
  v: false
date:
  v: 2026-09-04T13:29:51+00:00
publisher:
  v: Savannah Informatics
contact:
  name:
    v: Savannah Informatics
  telecom:
    system:
      v: url
    value:
      v: https://savannahghi.org
contact:
  name:
    v: Savannah Informatics
  telecom:
    system:
      v: url
    value:
      v: https://savannahghi.org
description:
  v: The record that a participant granted or refused one permission, and the index to the page they signed.
purpose:
  v: Establishes the lawful basis for every subsequent resource held about the participant. A screening encounter, a specimen or a retinal image that cannot be traced to an active consent for the permission it relies on is a finding at audit, and this resource is what makes that traceable rather than a matter of correspondence.
fhir version:
  v: 5.0.0
mapping:
  identity:
    v: workflow
  uri:
    v: http://hl7.org/fhir/workflow
  name:
    v: Workflow Pattern
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
  name:
    v: HL7 V2 Mapping
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Consent
base definition:
  v: http://hl7.org/fhir/StructureDefinition/Consent
  link: http://hl7.org/fhir/StructureDefinition/Consent
derivation:
  v: constraint
snapshot:
  extension:
    url:
      v: http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version
    value: string
      v: 5.0.0
  element:
    id:
      v: Consent
    path:
      v: Consent
    short:
      v: A healthcare consumer's or third party's choices to permit or deny recipients or roles to perform actions for specific purposes and periods of time
    definition:
      v: A record of a healthcare consumer’s choices or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time.
    comment:
      v: Broadly, there are 3 key areas of consent for patients: Consent around sharing information (aka Privacy Consent Directive - Authorization to Collect, Use, or Disclose information), consent for specific treatment, or kinds of treatment and consent for research participation and data sharing.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Consent
      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
        link: http://hl7.org/fhir/StructureDefinition/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 in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      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
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      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
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      extension:
        value: boolean
      extension:
        value: markdown
      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
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    must support:
      v: false
    is modifier:
      v: false
    is summary:
      v: false
    mapping:
      identity:
        v: rim
      map:
        v: Entity, Role, or Act
    mapping:
      identity:
        v: workflow
      map:
        v: Event
    mapping:
      identity:
        v: w5
      map:
        v: infrastructure.information
    mapping:
      identity:
        v: v2
      map:
        v: CON

boolean
v: true

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.

id:
  v: Consent.id
path:
  v: Consent.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
    value: url
      v: id
  code:
    v: http://hl7.org/fhirpath/System.String
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.meta
path:
  v: Consent.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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.implicitRules
path:
  v: Consent.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
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
    link: http://hl7.org/fhir/StructureDefinition/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: Consent.language
path:
  v: Consent.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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/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|5.0.0
    link: 5.0
    link: .0
  additional:
    purpose:
      v: starter
    value set:
      v: http://hl7.org/fhir/ValueSet/languages|5.0.0
      link: 5.0
      link: .0

id:
  v: Consent.text
path:
  v: Consent.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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Consent.contained
path:
  v: Consent.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.
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
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: Consent.extension
path:
  v: Consent.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 1
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: 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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.extension:tenant
path:
  v: Consent.extension
slice name:
  v: tenant
short:
  v: Owning site tenant
definition:
  v: Identifies the site tenant that owns the resource.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
  profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-tenant
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-tenant
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.modifierExtension
path:
  v: Consent.modifierExtension
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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.identifier
path:
  v: Consent.identifier
short:
  v: Identifier for this record (external references)
definition:
  v: Unique identifier for this copy of the Consent Statement.
comment:
  v: This identifier identifies this copy of the consent. Where this identifier is also used elsewhere as the identifier for a consent record (e.g. a CDA consent document) then the consent details are expected to be the same.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.identifier
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.identifier
mapping:
  identity:
    v: v2
  map:
    v: CON-4 (Consent Form Number – EI) Note: An implementation-specific requirement will be needed

id:
  v: Consent.status
path:
  v: Consent.status
short:
  v: draft | active | inactive | not-done | entered-in-error | unknown
definition:
  v: Indicates the current state of this Consent resource.
comment:
  v: draft is used between the point at which the participant signs and the point at which the record has been checked against the paper. A draft consent does not authorise any activity.
requirements:
  v: Withdrawal is recorded by setting this to inactive. The resource is not deleted and its content is not altered, so the fact that consent was once held, and the date it ceased, remain available to an auditor.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.status
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: 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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentState
  strength:
    v: required
  description:
    v: Indicates the state of the consent.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-state-codes|5.0.0
    link: 5.0
    link: .0
mapping:
  identity:
    v: workflow
  map:
    v: Event.status
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: v2
  map:
    v: CON-11 (Consent Status – CNE using table HL70498)

id:
  v: Consent.category
path:
  v: Consent.category
slicing:
  discriminator:
    type:
      v: value
    path:
      v: coding.system
  description:
    v: Sliced by coding system to require exactly one permission code while permitting the HL7 consent category codes alongside it.
  rules:
    v: open
short:
  v: Classification of the consent statement - for indexing/retrieval
definition:
  v: A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.
min:
  v: 1
max:
  v: *
base:
  path:
    v: Consent.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentCategory
  strength:
    v: example
  description:
    v: A classification of the type of consents found in a consent statement.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-category|5.0.0
    link: 5.0
    link: .0
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: v2
  map:
    v: CON-2 (Consent Type - CWE using table HL70496)

id:
  v: Consent.category:permission
path:
  v: Consent.category
slice name:
  v: permission
short:
  v: Which permission this resource records
definition:
  v: A classification of the type of consents found in the statement. This element supports indexing and retrieval of consent statements.
comment:
  v: One permission per resource. A participant who is asked three questions on one form is represented by three resources sharing a date and a source reference.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.category
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: https://fhir.savannahghi.org/ig/healthy-route/ValueSet/hr-consent-permission-vs
    link: https://fhir.savannahghi.org/ig/healthy-route/ValueSet/hr-consent-permission-vs
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: v2
  map:
    v: CON-2 (Consent Type - CWE using table HL70496)

id:
  v: Consent.category:permission.id
path:
  v: Consent.category.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
    value: url
      v: id
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.category:permission.extension
path:
  v: Consent.category.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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.category:permission.coding
path:
  v: Consent.category.coding
short:
  v: Code defined by a terminology system
definition:
  v: A reference to a code defined by a terminology system.
comment:
  v: Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information. Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.
requirements:
  v: Allows for alternative encodings within a code system, and translations to other code systems.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: CodeableConcept.coding
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1-8, C*E.10-22
mapping:
  identity:
    v: rim
  map:
    v: union(., ./translation)
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding

id:
  v: Consent.category:permission.coding.id
path:
  v: Consent.category.coding.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
    value: url
      v: id
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.category:permission.coding.extension
path:
  v: Consent.category.coding.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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.category:permission.coding.system
path:
  v: Consent.category.coding.system
short:
  v: Identity of the terminology system
definition:
  v: The identification of the code system that defines the meaning of the symbol in the code.
comment:
  v: The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should be an absolute reference to some definition that establishes the system clearly and unambiguously.
requirements:
  v: Need to be unambiguous about the source of the definition of the symbol.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Coding.system
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
pattern: uri
  v: https://fhir.savannahghi.org/ig/healthy-route/CodeSystem/hr-consent-permission
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.3
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystem
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem

id:
  v: Consent.category:permission.coding.version
path:
  v: Consent.category.coding.version
short:
  v: Version of the system - if relevant
definition:
  v: The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
comment:
  v: Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.version
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
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
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.7
mapping:
  identity:
    v: rim
  map:
    v: ./codeSystemVersion
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion

id:
  v: Consent.category:permission.coding.code
path:
  v: Consent.category.coding.code
short:
  v: Symbol in syntax defined by the system
definition:
  v: A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
requirements:
  v: Need to refer to a particular code in the system.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.code
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
condition:
  v: cod-1
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
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.1
mapping:
  identity:
    v: rim
  map:
    v: ./code
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code

id:
  v: Consent.category:permission.coding.display
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Consent.category.coding.display
short:
  v: Representation defined by the system
definition:
  v: A representation of the meaning of the code in the system, following the rules of the system.
requirements:
  v: Need to be able to carry a human-readable meaning of the code for readers that do not know the system.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.display
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: cod-1
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
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.2 - but note this is not well followed
mapping:
  identity:
    v: rim
  map:
    v: CV.displayName
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName

id:
  v: Consent.category:permission.coding.userSelected
path:
  v: Consent.category.coding.userSelected
short:
  v: If this coding was chosen directly by the user
definition:
  v: Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
comment:
  v: Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
requirements:
  v: This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Coding.userSelected
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
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
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: Sometimes implied by being first
mapping:
  identity:
    v: rim
  map:
    v: CD.codingRationale
mapping:
  identity:
    v: orim
  map:
    v: fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map; fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\#true a [ fhir:source "true"; fhir:target dt:CDCoding.codingRationale\#O ]

id:
  v: Consent.category:permission.text
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable
  value: boolean
    v: true
path:
  v: Consent.category.text
short:
  v: Plain text representation of the concept
definition:
  v: A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
comment:
  v: Very often the text is the same as a displayName of one of the codings.
requirements:
  v: The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: CodeableConcept.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
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
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: C*E.9. But note many systems use C*E.2 for this
mapping:
  identity:
    v: rim
  map:
    v: ./originalText[mediaType/code="text/plain"]/data
mapping:
  identity:
    v: orim
  map:
    v: fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText

id:
  v: Consent.subject
path:
  v: Consent.subject
short:
  v: Who the consent applies to
definition:
  v: The patient/healthcare practitioner or group of persons to whom this consent applies.
comment:
  v: Constrained to Patient. Consent is never taken from a practitioner or a group in this study, and the base resource permits both.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.subject
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.subject
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.subject[x]

id:
  v: Consent.date
path:
  v: Consent.date
short:
  v: Date the participant signed
definition:
  v: Date the consent instance was agreed to.
comment:
  v: The date on the paper form, which may precede the date the record was created.
requirements:
  v: Compared against the date of the earliest study activity. An encounter, specimen or image dated before this is a protocol deviation, and the comparison is only possible if the signature date rather than the data entry date is recorded here.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.date
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: date
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: workflow
  map:
    v: Event.occurrence[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.recorded
mapping:
  identity:
    v: v2
  map:
    v: CON-13 (Consent Decision Date/Time – DTM)

id:
  v: Consent.period
path:
  v: Consent.period
short:
  v: Period over which the permission applies
definition:
  v: Effective period for this Consent Resource and all provisions unless specified in that provision.
comment:
  v: Distinct from the retention period stated in the information sheet. Present where the permission itself is time limited.
alias:
  v: period
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.grantor
path:
  v: Consent.grantor
short:
  v: Who is granting rights according to the policy and rules
definition:
  v: The entity responsible for granting the rights listed in a Consent Directive.
comment:
  v: Ordinarily the participant. RelatedPerson is admitted because both protocols provide for consent given by a legally authorised representative, and an earlier version of this profile constrained the element to Patient while its own comment said the resource must not preclude that. Where a representative consents, subject remains the participant and grantor is the representative, which is the distinction the two elements exist to carry.
alias:
  v: grantor
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.grantor
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    link: http://hl7.org/fhir/StructureDefinition/RelatedPerson
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.grantee
path:
  v: Consent.grantee
short:
  v: Party the permission is granted to
definition:
  v: The entity responsible for complying with the Consent Directive, including any obligations or limitations on authorizations and enforcement of prohibitions.
comment:
  v: In a fully computable consent, both grantee and grantor will be listed as actors within the consent. The Grantee and Grantor elements are for ease of search only.
requirements:
  v: The information sheet names the parties who will hold the data. Where a permission extends beyond the site to a party receiving the exported data, both appear here, and a permission naming only the site does not authorise transfer.
alias:
  v: grantee
min:
  v: 1
max:
  v: *
base:
  path:
    v: Consent.grantee
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.manager
path:
  v: Consent.manager
short:
  v: Consent workflow management
definition:
  v: The actor that manages the consent through its lifecycle.
alias:
  v: manager
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.manager
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/HealthcareService|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    link: 5.0
    link: .0
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness

id:
  v: Consent.controller
path:
  v: Consent.controller
short:
  v: Data controller
definition:
  v: The actor that controls/enforces the access according to the consent.
alias:
  v: controller
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.controller
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.sourceAttachment
path:
  v: Consent.sourceAttachment
short:
  v: Source from which this consent is taken
definition:
  v: The source on which this consent statement is based. The source might be a scanned original paper form.
comment:
  v: The source can be contained inline (Attachment), referenced directly (Consent), referenced in a consent repository (DocumentReference), or simply by an identifier (Identifier), e.g. a CDA document id.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.sourceAttachment
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Attachment
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: Potential mappings to CON-5,6,7,8,16,19, 20-23

id:
  v: Consent.sourceReference
path:
  v: Consent.sourceReference
short:
  v: The photographed signed page
definition:
  v: A reference to a consent that links back to such a source, a reference to a document repository (e.g. XDS) that stores the original consent document.
comment:
  v: Optional, and expected to be absent at most sites. The protocol requires the investigator to retain the signed form and states that no records may be transferred to another location or party without written notification to the sponsor; it requires the medical record to carry a statement that consent was obtained and the date, which this resource satisfies without an image. Present only where a site has chosen to hold a photograph of the page within its own tenant and its ethics committee has approved that, which is a decision beyond the protocol rather than one it mandates.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.sourceReference
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-consent-evidence
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-consent-evidence
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: v2
  map:
    v: Potential mappings to CON-5,6,7,8,16,19, 20-23

id:
  v: Consent.regulatoryBasis
path:
  v: Consent.regulatoryBasis
short:
  v: Regulatory framework the consent was taken under
definition:
  v: A set of codes that indicate the regulatory basis (if any) that this consent supports.
comment:
  v: The national research regulation that governs the site, which differs between participating countries. Country variation is carried on instances rather than by separate profiles.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.regulatoryBasis
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentRegulatoryBasis
  strength:
    v: example
  description:
    v: Regulatory policy examples
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-policy|5.0.0
    link: 5.0
    link: .0
mapping:
  identity:
    v: v2
  map:
    v: CON-3 (Consent Form ID and Version – ST) Note: An implementation-specific requirement will be needed

id:
  v: Consent.policyBasis
path:
  v: Consent.policyBasis
short:
  v: Computable version of the backing policy
definition:
  v: A Reference or URL used to uniquely identify the policy the organization will enforce for this Consent. This Reference or URL should be specific to the version of the policy and should be dereferencable to a computable policy of some form.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.policyBasis
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.policyBasis.id
path:
  v: Consent.policyBasis.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.policyBasis.extension
path:
  v: Consent.policyBasis.extension
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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.policyBasis.modifierExtension
path:
  v: Consent.policyBasis.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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.policyBasis.reference
path:
  v: Consent.policyBasis.reference
short:
  v: Reference backing policy resource
definition:
  v: A Reference that identifies the policy the organization will enforce for this Consent.
comment:
  v: While any resource may be used, Consent, PlanDefinition and Contract would be most frequent
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.policyBasis.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|5.0.0
    link: 5.0
    link: .0
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.policyBasis.url
path:
  v: Consent.policyBasis.url
short:
  v: Versioned identifier of the approved information sheet
definition:
  v: A URL that links to a computable version of the policy the organization will enforce for this Consent.
comment:
  v: Identifies a version, not a document to display. The document itself is referenced from policyText.
requirements:
  v: Ethics committees approve a specific version of the participant information sheet and consent form. Establishing which version a participant was shown is the first question asked when a form is amended mid-study, and it cannot be answered from the signature alone.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.policyBasis.url
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: url
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.policyText
path:
  v: Consent.policyText
short:
  v: The approved blank information sheet and consent form
definition:
  v: A Reference to the human readable policy explaining the basis for the Consent.
comment:
  v: The unsigned template as approved, identical for every participant given that version. Not to be confused with sourceReference, which is the individual signed page and is identifying.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.policyText
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-document-reference
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-document-reference
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.verification
path:
  v: Consent.verification
short:
  v: Consent Verified by patient or family
definition:
  v: Whether a treatment instruction (e.g. artificial respiration: yes or no) was verified with the patient, his/her family or another authorized person.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.verification
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.verification.id
path:
  v: Consent.verification.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.verification.extension
path:
  v: Consent.verification.extension
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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.verification.modifierExtension
path:
  v: Consent.verification.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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.verification.verified
path:
  v: Consent.verification.verified
short:
  v: Has been verified
definition:
  v: Has the instruction been verified.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.verification.verified
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: boolean
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.verification.verificationType
path:
  v: Consent.verification.verificationType
short:
  v: Business case of verification
definition:
  v: Extensible list of verification type starting with verification and re-validation.
comment:
  v: This allows the verification element to hold multiple use cases including RelatedPerson verification of the Grantee decision and periodic re-validation of the consent.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.verification.verificationType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentVerificationType
  strength:
    v: example
  description:
    v: Types of Verification/Validation.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-verification|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.verification.verifiedBy
path:
  v: Consent.verification.verifiedBy
short:
  v: Person who took consent
definition:
  v: The person who conducted the verification/validation of the Grantor decision.
comment:
  v: The individual, not the organisation and not the role they held. The base resource admits all three; an organisation cannot be delegated to take consent, and recording the role rather than the person would leave the identity of the signatory on the paper form unmatched in the record. Where the delegation itself needs to be established, a PractitionerRole referring to the same practitioner carries it.
requirements:
  v: Good clinical practice requires that consent be taken by a person authorised to do so on the delegation log, and the protocol requires that person to sign the form. Recording who took it is what allows that authorisation to be checked after the fact.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.verification.verifiedBy
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-practitioner
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-practitioner
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.verification.verifiedWith
path:
  v: Consent.verification.verifiedWith
short:
  v: Person who verified
definition:
  v: Who verified the instruction (Patient, Relative or other Authorized Person).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.verification.verifiedWith
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson|5.0.0
    link: 5.0
    link: .0
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.verification.verificationDate
path:
  v: Consent.verification.verificationDate
short:
  v: When consent verified
definition:
  v: Date(s) verification was collected.
comment:
  v: Allows for history of verification/validation.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.verification.verificationDate
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: dateTime
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.decision
path:
  v: Consent.decision
short:
  v: permit or deny
definition:
  v: Action to take - permit or deny - as default.
comment:
  v: A refusal is recorded as an active consent with a decision of deny, not as an absent resource. The distinction between a participant who declined and a participant who was never asked is material at audit.
requirements:
  v: Required, where the base resource makes it optional. A consent record whose decision is absent cannot be acted on, and its absence is indistinguishable from a refusal that was never recorded.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Consent.decision
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: 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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: Sets context for the values in .provision
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentProvisionType
  strength:
    v: required
  description:
    v: Sets the base decision for Consent to be either permit or deny, with provisions assumed to be a negation of the previous level.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-provision-type|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision
path:
  v: Consent.provision
short:
  v: Constraints to the base Consent.policyRule/Consent.policy
definition:
  v: An exception to the base policy of this consent. An exception can be an addition or removal of access permissions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.provision.id
path:
  v: Consent.provision.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.extension
path:
  v: Consent.provision.extension
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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.modifierExtension
path:
  v: Consent.provision.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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.provision.period
path:
  v: Consent.provision.period
short:
  v: Timeframe for this provision
definition:
  v: Timeframe for this provision.
comment:
  v: This is the bound effective time of the consent and should be in the base provision in the Consent resource.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.provision.period
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: v2
  map:
    v: CON-14&15 (Consent Effective Date Time, Consent End DateTime)

id:
  v: Consent.provision.actor
path:
  v: Consent.provision.actor
short:
  v: Who|what controlled by this provision (or group, by role)
definition:
  v: Who or what is controlled by this provision. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.actor
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
meaning when missing:
  v: There is no specific actor associated with the exception
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.provision.actor.id
path:
  v: Consent.provision.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.actor.extension
path:
  v: Consent.provision.actor.extension
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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.actor.modifierExtension
path:
  v: Consent.provision.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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.provision.actor.role
path:
  v: Consent.provision.actor.role
short:
  v: How the actor is involved
definition:
  v: How the individual is involved in the resources content that is described in the exception.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.provision.actor.role
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentActorRole
  strength:
    v: extensible
  description:
    v: How an actor is involved in the consent considerations.
  value set:
    v: http://hl7.org/fhir/ValueSet/participation-role-type|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.actor.reference
path:
  v: Consent.provision.actor.reference
short:
  v: Resource for the actor (or group, by role)
definition:
  v: The resource that identifies the actor. To identify actors by type, use group to identify a set of actors by some property they share (e.g. 'admitting officers').
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.provision.actor.reference
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Group|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/CareTeam|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson|5.0.0
    link: 5.0
    link: .0
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole|5.0.0
    link: 5.0
    link: .0
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.provision.action
path:
  v: Consent.provision.action
short:
  v: Actions controlled by this provision
definition:
  v: Actions controlled by this provision.
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: Consent.provision.action
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
meaning when missing:
  v: all actions
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentAction
  strength:
    v: example
  description:
    v: Detailed codes for the consent action.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-action|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.securityLabel
path:
  v: Consent.provision.securityLabel
short:
  v: Security Labels that define affected resources
definition:
  v: A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.
comment:
  v: If the consent specifies a security label of "R" then it applies to all resources that are labeled "R" or lower. E.g. for Confidentiality, it's a high water mark. For other kinds of security labels, subsumption logic applies. When the purpose of use tag is on the data, access request purpose of use shall not conflict.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.securityLabel
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: SecurityLabels
  strength:
    v: example
  description:
    v: Example Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-label-examples|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.purpose
path:
  v: Consent.provision.purpose
short:
  v: Context of activities covered by this provision
definition:
  v: The context of the activities a user is taking - why the user is accessing the data - that are controlled by this provision.
comment:
  v: 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: Consent.provision.purpose
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: PurposeOfUse
  strength:
    v: extensible
  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
    link: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse

id:
  v: Consent.provision.documentType
path:
  v: Consent.provision.documentType
short:
  v: e.g. Resource Type, Profile, CDA, etc
definition:
  v: The documentType(s) covered by this provision. The type can be a CDA document, or some other type that indicates what sort of information the consent relates to.
comment:
  v: Multiple types are or'ed together. The intention of the documentType element is that the codes refer to document types defined in a standard somewhere.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.documentType
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentContentClass
  strength:
    v: preferred
  description:
    v: The document type a consent provision covers.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-content-class|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.resourceType
path:
  v: Consent.provision.resourceType
short:
  v: e.g. Resource Type, Profile, etc
definition:
  v: The resourceType(s) covered by this provision. The type can be a FHIR resource type or a profile on a type that indicates what information the consent relates to.
comment:
  v: Multiple types are or'ed together. 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: Consent.provision.resourceType
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentContentClass
  strength:
    v: extensible
  description:
    v: The resource types a consent provision covers.
  value set:
    v: http://hl7.org/fhir/ValueSet/resource-types|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.code
path:
  v: Consent.provision.code
short:
  v: e.g. LOINC or SNOMED CT code, etc. in the content
definition:
  v: If this code is found in an instance, then the provision applies.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.code
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value: string
      v: ConsentContentCode
  strength:
    v: example
  description:
    v: If this code is found in an instance, then the exception applies.
  value set:
    v: http://hl7.org/fhir/ValueSet/consent-content-code|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.dataPeriod
path:
  v: Consent.provision.dataPeriod
short:
  v: Timeframe for data controlled by this provision
definition:
  v: Clinical or Operational Relevant period of time that bounds the data controlled by this provision.
comment:
  v: This has a different sense to the Consent.period - that is when the consent agreement holds. This is the time period of the data that is controlled by the agreement.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.provision.dataPeriod
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Period
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.provision.data
path:
  v: Consent.provision.data
short:
  v: Data controlled by this provision
definition:
  v: The resources controlled by this provision if specific resources are referenced.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.data
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
meaning when missing:
  v: all data
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.provision.data.id
path:
  v: Consent.provision.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
    value: url
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
condition:
  v: ele-1
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.data.extension
path:
  v: Consent.provision.data.extension
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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Consent.provision.data.modifierExtension
path:
  v: Consent.provision.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://hl7.org/fhir/R5/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
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
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
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: Consent.provision.data.meaning
path:
  v: Consent.provision.data.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: Consent.provision.data.meaning
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: 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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/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|5.0.0
    link: 5.0
    link: .0

id:
  v: Consent.provision.data.reference
path:
  v: Consent.provision.data.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: Consent.provision.data.reference
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource|5.0.0
    link: 5.0
    link: .0
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true

id:
  v: Consent.provision.expression
path:
  v: Consent.provision.expression
short:
  v: A computable expression of the consent
definition:
  v: A computable (FHIRPath or other) definition of what is controlled by this consent.
comment:
  v: Constraining the expression type for a specific implementation via profile is recommended
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Consent.provision.expression
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Expression
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

id:
  v: Consent.provision.provision
path:
  v: Consent.provision.provision
short:
  v: Nested Exception Provisions
definition:
  v: Provisions which provide exceptions to the base provision or subprovisions.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Consent.provision.provision
  min:
    v: 0
  max:
    v: *
content reference:
  v: http://hl7.org/fhir/StructureDefinition/Consent#Consent.provision
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
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false

element:
  id:
    v: Consent
  path:
    v: Consent
element:
  id:
    v: Consent.extension
  path:
    v: Consent.extension
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: url
    ordered:
      v: false
    rules:
      v: open
  min:
    v: 1
element:
  id:
    v: Consent.extension:tenant
  path:
    v: Consent.extension
  slice name:
    v: tenant
  short:
    v: Owning site tenant
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: Extension
    profile:
      v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-tenant
      link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-tenant
  must support:
    v: true
element:
  id:
    v: Consent.status
  path:
    v: Consent.status
  comment:
    v: draft is used between the point at which the participant signs and the point at which the record has been checked against the paper. A draft consent does not authorise any activity.
  requirements:
    v: Withdrawal is recorded by setting this to inactive. The resource is not deleted and its content is not altered, so the fact that consent was once held, and the date it ceased, remain available to an auditor.
  must support:
    v: true
element:
  id:
    v: Consent.category
  path:
    v: Consent.category
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: coding.system
    description:
      v: Sliced by coding system to require exactly one permission code while permitting the HL7 consent category codes alongside it.
    rules:
      v: open
  min:
    v: 1
  must support:
    v: true
element:
  id:
    v: Consent.category:permission
  path:
    v: Consent.category
  slice name:
    v: permission
  short:
    v: Which permission this resource records
  comment:
    v: One permission per resource. A participant who is asked three questions on one form is represented by three resources sharing a date and a source reference.
  min:
    v: 1
  max:
    v: 1
  must support:
    v: true
  binding:
    strength:
      v: required
    value set:
      v: https://fhir.savannahghi.org/ig/healthy-route/ValueSet/hr-consent-permission-vs
      link: https://fhir.savannahghi.org/ig/healthy-route/ValueSet/hr-consent-permission-vs
element:
  id:
    v: Consent.category:permission.coding
  path:
    v: Consent.category.coding
  min:
    v: 1
  max:
    v: 1
  must support:
    v: true
element:
  id:
    v: Consent.category:permission.coding.system
  path:
    v: Consent.category.coding.system
  min:
    v: 1
  pattern: uri
    v: https://fhir.savannahghi.org/ig/healthy-route/CodeSystem/hr-consent-permission
  must support:
    v: true
element:
  id:
    v: Consent.subject
  path:
    v: Consent.subject
  comment:
    v: Constrained to Patient. Consent is never taken from a practitioner or a group in this study, and the base resource permits both.
  min:
    v: 1
  type:
    code:
      v: Reference
    target profile:
      v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
      link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
  must support:
    v: true
element:
  id:
    v: Consent.date
  path:
    v: Consent.date
  short:
    v: Date the participant signed
  comment:
    v: The date on the paper form, which may precede the date the record was created.
  requirements:
    v: Compared against the date of the earliest study activity. An encounter, specimen or image dated before this is a protocol deviation, and the comparison is only possible if the signature date rather than the data entry date is recorded here.
  min:
    v: 1
  must support:
    v: true
element:
  id:
    v: Consent.period
  path:
    v: Consent.period
  short:
    v: Period over which the permission applies
  comment:
    v: Distinct from the retention period stated in the information sheet. Present where the permission itself is time limited.
  must support:
    v: true
element:
  id:
    v: Consent.grantor
  path:
    v: Consent.grantor
  comment:
    v: Ordinarily the participant. RelatedPerson is admitted because both protocols provide for consent given by a legally authorised representative, and an earlier version of this profile constrained the element to Patient while its own comment said the resource must not preclude that. Where a representative consents, subject remains the participant and grantor is the representative, which is the distinction the two elements exist to carry.
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: Reference
    target profile:
      v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
      link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-patient
    target profile:
      v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
      link: http://hl7.org/fhir/StructureDefinition/RelatedPerson
  must support:
    v: true
element:
  id:
    v: Consent.grantee
  path:
    v: Consent.grantee
  short:
    v: Party the permission is granted to
  requirements:
    v: The information sheet names the parties who will hold the data. Where a permission extends beyond the site to a party receiving the exported data, both appear here, and a permission naming only the site does not authorise transfer.
  min:
    v: 1
  type:
    code:
      v: Reference
    target profile:
      v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
      link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
  must support:
    v: true

id:
  v: Consent.controller
path:
  v: Consent.controller
short:
  v: Data controller
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-organization
must support:
  v: true

id:
  v: Consent.sourceReference
path:
  v: Consent.sourceReference
short:
  v: The photographed signed page
comment:
  v: Optional, and expected to be absent at most sites. The protocol requires the investigator to retain the signed form and states that no records may be transferred to another location or party without written notification to the sponsor; it requires the medical record to carry a statement that consent was obtained and the date, which this resource satisfies without an image. Present only where a site has chosen to hold a photograph of the page within its own tenant and its ethics committee has approved that, which is a decision beyond the protocol rather than one it mandates.
max:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-consent-evidence
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-consent-evidence
must support:
  v: true

id:
  v: Consent.regulatoryBasis
path:
  v: Consent.regulatoryBasis
short:
  v: Regulatory framework the consent was taken under
comment:
  v: The national research regulation that governs the site, which differs between participating countries. Country variation is carried on instances rather than by separate profiles.
must support:
  v: true

id:
  v: Consent.policyBasis
path:
  v: Consent.policyBasis
min:
  v: 1
must support:
  v: true

id:
  v: Consent.policyBasis.url
path:
  v: Consent.policyBasis.url
short:
  v: Versioned identifier of the approved information sheet
comment:
  v: Identifies a version, not a document to display. The document itself is referenced from policyText.
requirements:
  v: Ethics committees approve a specific version of the participant information sheet and consent form. Establishing which version a participant was shown is the first question asked when a form is amended mid-study, and it cannot be answered from the signature alone.
min:
  v: 1
must support:
  v: true

id:
  v: Consent.policyText
path:
  v: Consent.policyText
short:
  v: The approved blank information sheet and consent form
comment:
  v: The unsigned template as approved, identical for every participant given that version. Not to be confused with sourceReference, which is the individual signed page and is identifying.
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-document-reference
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-document-reference
must support:
  v: true

id:
  v: Consent.verification
path:
  v: Consent.verification
min:
  v: 1
max:
  v: 1
must support:
  v: true

id:
  v: Consent.verification.verified
path:
  v: Consent.verification.verified
must support:
  v: true

id:
  v: Consent.verification.verifiedBy
path:
  v: Consent.verification.verifiedBy
short:
  v: Person who took consent
comment:
  v: The individual, not the organisation and not the role they held. The base resource admits all three; an organisation cannot be delegated to take consent, and recording the role rather than the person would leave the identity of the signatory on the paper form unmatched in the record. Where the delegation itself needs to be established, a PractitionerRole referring to the same practitioner carries it.
requirements:
  v: Good clinical practice requires that consent be taken by a person authorised to do so on the delegation log, and the protocol requires that person to sign the form. Recording who took it is what allows that authorisation to be checked after the fact.
min:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-practitioner
    link: https://fhir.savannahghi.org/ig/healthy-route/StructureDefinition/hr-practitioner
must support:
  v: true

id:
  v: Consent.verification.verificationDate
path:
  v: Consent.verification.verificationDate
min:
  v: 1
max:
  v: 1
must support:
  v: true

id:
  v: Consent.decision
path:
  v: Consent.decision
short:
  v: permit or deny
comment:
  v: A refusal is recorded as an active consent with a decision of deny, not as an absent resource. The distinction between a participant who declined and a participant who was never asked is material at audit.
requirements:
  v: Required, where the base resource makes it optional. A consent record whose decision is absent cannot be acted on, and its absence is indistinguishable from a refusal that was never recorded.
min:
  v: 1
must support:
  v: true