athena-auditevent-profile
type: StructureDefinition
node role: treeRoot
id:
  v: athena-auditevent-profile
text:
  status:
    v: extensions
  div: Generated Narrative: StructureDefinition athena-auditevent-profile Name Flags Card. Type Description & Constraints AuditEvent 0..* AuditEvent Event record kept for security purposes id 0..1 id Logical id of this artifact meta 0..1 Meta Metadata about the resource versionId 0..1 id Version specific identifier lastUpdated S 1..1 instant When the resource version last changed Slices for profile S 2..* canonical() Profiles this resource claims to conform to Slice: Unordered, Open by value:uri profile:athena-argonautrequirements S 1..1 canonical() Profiles this resource claims to conform to Fixed Value: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent profile:athena-auditevent-profile S 1..1 canonical() Profiles this resource claims to conform to Fixed Value: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile Slices for security 0..1 Coding Security Labels applied to this resource Slice: Unordered, Open by value:coding security:SENSITIVE-CHART 0..1 Coding Security Labels applied to this resource type S 1..1 Coding Type/identifier of event subtype 0..* Coding More specific type/id for the event action 0..1 code Type of action performed during the event period S 1..1 Period When the activity occurred recorded S 1..1 instant Time when the event was recorded outcome 0..1 code Whether the event succeeded or failed outcomeDesc 0..1 string Description of the event outcome purposeOfEvent 0..* CodeableConcept The purposeOfUse of the event agent S 1..* BackboneElement Actor involved in the event who 0..1 Reference(Practitioner | Organization | Device | Patient | RelatedPerson) Identifier of who name 0..1 string Human friendly name for the agent requestor S 1..1 boolean Whether user is initiator location 0..1 Reference(Location) Where policy 0..* uri Policy that authorized event media 0..1 Coding Type of media network 0..1 BackboneElement Logical network location for application activity address 0..1 string I…
url:
  v: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile
version:
  v: 25.0.0
name:
  v: AthenaAuditEvent
status:
  v: active
experimental:
  v: false
date:
  v: 2022-03-01
publisher:
  v: athenahealth
contact:
  telecom:
    system:
      v: url
    value:
      v: http://athenahealth.com
description:
  v: Defines constraints and extensions on the auditevent resource as supported by Athena Products.
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: athenaflow
  uri:
    v: http://unknown.org/athenaFlow
  name:
    v: athenaFlow
mapping:
  identity:
    v: athenapractice
  uri:
    v: http://unknown.org/athenaPractice
  name:
    v: athenaPractice
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: dicom
  uri:
    v: http://nema.org/dicom
  name:
    v: DICOM Tag Mapping
mapping:
  identity:
    v: v2
  uri:
    v: http://hl7.org/v2
  name:
    v: HL7 v2 Mapping
mapping:
  identity:
    v: w3c.prov
  uri:
    v: http://www.w3.org/ns/prov
  name:
    v: W3C PROV
mapping:
  identity:
    v: fhirprovenance
  uri:
    v: http://hl7.org/fhir/provenance
  name:
    v: FHIR Provenance Mapping
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
kind:
  v: resource
abstract:
  v: false
type:
  v: AuditEvent
base definition:
  v: http://hl7.org/fhir/StructureDefinition/AuditEvent
  link: http://hl7.org/fhir/StructureDefinition/AuditEvent
derivation:
  v: constraint
snapshot:
  element:
    id:
      v: AuditEvent
    path:
      v: AuditEvent
    short:
      v: Event record kept for security purposes
    definition:
      v: A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage.
    comment:
      v: Based on ATNA (RFC 3881).
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: AuditEvent
      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()
      xpath:
        v: not(parent::f:contained and f:contained)
      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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
      xpath:
        v: not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))
      source:
        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()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      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()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource

v: true

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.

v: false

v: false

v: false

identity:
  v: athenaflow
map:
  v: FHIRR4_AUDITEVENTVIEW

identity:
  v: athenapractice
map:
  v: FHIRR4_AUDITEVENTVIEW

identity:
  v: rim
map:
  v: ControlAct[moodCode=EVN]

identity:
  v: dicom
map:
  v: Message

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

identity:
  v: workflow
map:
  v: Event

id:
  v: AuditEvent.id
path:
  v: AuditEvent.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: The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: id
must support:
  v: false
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeId(%EVENT_ID%)
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeId(%EVENT_ID%)
mapping:
  identity:
    v: v2
  map:
    v: MakeId(%PID%)
mapping:
  identity:
    v: w3c.prov
  map:
    v: The id attribute will always be mapped using the MakeId() function. This function will construct an ID as appropriate. The first argument is a string which is unused at this time.

id:
  v: AuditEvent.meta
path:
  v: AuditEvent.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())
  xpath:
    v: @value|f:*|h:div
  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: AuditEvent.meta.id
path:
  v: AuditEvent.meta.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.meta.extension
path:
  v: AuditEvent.meta.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.meta.versionId
path:
  v: AuditEvent.meta.versionId
short:
  v: Version specific identifier
definition:
  v: The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
comment:
  v: The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.versionId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: id
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())
  xpath:
    v: @value|f:*|h:div
  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: dicom
  map:
    v: Don't map versionId if we don't support versioning.
mapping:
  identity:
    v: w3c.prov
  map:
    v: If the resource supports retrieval of specific versions, this identifier should use the MakeVersionId() function with the field giving the version id as the first argument.

id:
  v: AuditEvent.meta.lastUpdated
path:
  v: AuditEvent.meta.lastUpdated
short:
  v: When the resource version last changed
definition:
  v: When the resource last changed - e.g. when the version changed.
comment:
  v: This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http://hl7.org/fhir/R4/http.html#read) interaction.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Meta.lastUpdated
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: instant
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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: athenapractice
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: v2
  map:
    v: %DB_UPDATED_DATE%
mapping:
  identity:
    v: w3c.prov
  map:
    v: This is almost always %DB_UPDATED_DATE%, but may be another field if that field contains the last update date of the record.

id:
  v: AuditEvent.meta.source
path:
  v: AuditEvent.meta.source
short:
  v: Identifies where the resource comes from
definition:
  v: A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](http://hl7.org/fhir/R4/provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.
comment:
  v: In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.source
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: AuditEvent.meta.profile
path:
  v: AuditEvent.meta.profile
slicing:
  discriminator:
    type:
      v: value
    path:
      v: uri
  rules:
    v: open
short:
  v: Profiles this resource claims to conform to
definition:
  v: A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url).
comment:
  v: It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
min:
  v: 2
max:
  v: *
base:
  path:
    v: Meta.profile
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: canonical
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())
  xpath:
    v: @value|f:*|h:div
  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: AuditEvent.meta.profile:athena-argonautrequirements
path:
  v: AuditEvent.meta.profile
slice name:
  v: athena-argonautrequirements
short:
  v: Profiles this resource claims to conform to
definition:
  v: A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url).
comment:
  v: It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Meta.profile
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: canonical
fixed:
  v: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent
  link: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent
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())
  xpath:
    v: @value|f:*|h:div
  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: w3c.prov
  map:
    v: These are fixed values that contain the URLs assocaited with any profile we want to always claim conformance to.

id:
  v: AuditEvent.meta.profile:athena-auditevent-profile
path:
  v: AuditEvent.meta.profile
slice name:
  v: athena-auditevent-profile
short:
  v: Profiles this resource claims to conform to
definition:
  v: A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url).
comment:
  v: It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Meta.profile
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: canonical
fixed:
  v: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile
  link: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile
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())
  xpath:
    v: @value|f:*|h:div
  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: w3c.prov
  map:
    v: The last profile is always the GE profile for this resource.

id:
  v: AuditEvent.meta.security
path:
  v: AuditEvent.meta.security
slicing:
  discriminator:
    type:
      v: value
    path:
      v: coding
  rules:
    v: open
short:
  v: Security Labels applied to this resource
definition:
  v: Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
comment:
  v: The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.security
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: SecurityLabels
  strength:
    v: extensible
  description:
    v: Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-labels
    link: http://hl7.org/fhir/ValueSet/security-labels

id:
  v: AuditEvent.meta.security:SENSITIVE-CHART
path:
  v: AuditEvent.meta.security
slice name:
  v: SENSITIVE-CHART
short:
  v: Security Labels applied to this resource
definition:
  v: Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
comment:
  v: The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.security
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: SecurityLabels
  strength:
    v: extensible
  description:
    v: Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-labels
    link: http://hl7.org/fhir/ValueSet/security-labels
mapping:
  identity:
    v: athenaflow
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: athenapractice
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: v2
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: dicom
  map:
    v: Need a user story to address the issue of resetting the code because we don't want to mark a chart as NOT being sensitive if it was originally marked that way, BUT the update did not change the value explicitely.
mapping:
  identity:
    v: w3c.prov
  map:
    v: All data related to a patient must be joined with the PERSON table or view by PID, and the SENSITIVECHART flag needs to be reported. If the value is one, we will output an HL7 V3 ConfidentialityCode of "R" to indicate that this is a sensitive chart, or "N" to indicate that this chart is not sensitive. We will need user stories to address access control policies for sensitive charts for read, query, create and update.

id:
  v: AuditEvent.meta.tag
path:
  v: AuditEvent.meta.tag
short:
  v: Tags applied to this resource
definition:
  v: Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
comment:
  v: The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Meta.tag
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Tags
  strength:
    v: example
  description:
    v: Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".
  value set:
    v: http://hl7.org/fhir/ValueSet/common-tags
    link: http://hl7.org/fhir/ValueSet/common-tags

id:
  v: AuditEvent.implicitRules
path:
  v: AuditEvent.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 it's 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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
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 it's meaning or interpretation
is summary:
  v: true

id:
  v: AuditEvent.language
path:
  v: AuditEvent.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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    value:
      v: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

id:
  v: AuditEvent.text
path:
  v: AuditEvent.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 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
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: AuditEvent.contained
path:
  v: AuditEvent.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, and nor can they have their own independent transaction scope.
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
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: AuditEvent.extension
path:
  v: AuditEvent.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 resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
comment:
  v: There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.modifierExtension
path:
  v: AuditEvent.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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 resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: AuditEvent.type
path:
  v: AuditEvent.type
short:
  v: Type/identifier of event
definition:
  v: Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.
requirements:
  v: This identifies the performed function. For "Execute" Event Action Code audit records, this identifies the application function performed.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.type
  min:
    v: 1
  max:
    v: 1
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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventType
  strength:
    v: extensible
  description:
    v: Type of event.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-event-type
    link: http://hl7.org/fhir/ValueSet/audit-event-type
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeCoding(%EVENT_TYPE_ID%,null,%EVENT_TYPE_DESCRIPTION%)
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeCoding(%EVENT_TYPE_ID%,null,%EVENT_TYPE_DESCRIPTION%)
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventId
mapping:
  identity:
    v: workflow
  map:
    v: Event.code
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity

id:
  v: AuditEvent.subtype
path:
  v: AuditEvent.subtype
short:
  v: More specific type/id for the event
definition:
  v: Identifier for the category of event.
requirements:
  v: This field enables queries of messages by implementation-defined event categories.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.subtype
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventSubType
  strength:
    v: extensible
  description:
    v: Sub-type of event.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-event-sub-type
    link: http://hl7.org/fhir/ValueSet/audit-event-sub-type
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventTypeCode
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.action
path:
  v: AuditEvent.action
short:
  v: Type of action performed during the event
definition:
  v: Indicator for type of action performed during the event that generated the audit.
requirements:
  v: This broadly indicates what kind of action was done on the AuditEvent.entity by the AuditEvent.agent.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.action
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventAction
  strength:
    v: required
  description:
    v: Indicator for type of action performed during the event that generated the event.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-event-action|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: athenaflow
  map:
    v: MapCode(%ACTIONTYPE%,"EVENTACTION")
mapping:
  identity:
    v: athenapractice
  map:
    v: MapCode(%ACTIONTYPE%,"EVENTACTION")
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventActionCode
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.period
path:
  v: AuditEvent.period
short:
  v: When the activity occurred
definition:
  v: The period during which the activity occurred.
comment:
  v: In a distributed system, some sort of common time base (e.g. an NTP [RFC1305] server) is a good implementation tactic.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: MakePeriod(%EVENT_TIMESTAMP%)
mapping:
  identity:
    v: athenapractice
  map:
    v: MakePeriod(%EVENT_TIMESTAMP%)
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime
mapping:
  identity:
    v: dicom
  map:
    v: EventDateTime
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.when
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.recorded
mapping:
  identity:
    v: workflow
  map:
    v: Event.occurred[x]
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.done[x]
mapping:
  identity:
    v: rim
  map:
    v: ./effectiveTime[type=IVL_TS]
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.startTime & Activity.endTime
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.occurred[x]

id:
  v: AuditEvent.recorded
path:
  v: AuditEvent.recorded
short:
  v: Time when the event was recorded
definition:
  v: The time when the event was recorded.
comment:
  v: In a distributed system, some sort of common time base (e.g. an NTP [RFC1305] server) is a good implementation tactic.
requirements:
  v: This ties an event to a specific date and time. Security audits typically require a consistent time base (e.g. UTC), to eliminate time-zone issues arising from geographical distribution.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.recorded
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: instant
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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: athenapractice
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime
mapping:
  identity:
    v: dicom
  map:
    v: EventDateTime
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.when
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.recorded
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.recorded

id:
  v: AuditEvent.outcome
path:
  v: AuditEvent.outcome
short:
  v: Whether the event succeeded or failed
definition:
  v: Indicates whether the event succeeded or failed.
comment:
  v: In some cases a "success" may be partial, for example, an incomplete or interrupted transfer of a radiological study. For the purpose of establishing accountability, these distinctions are not relevant.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.outcome
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventOutcome
  strength:
    v: required
  description:
    v: Indicates whether the event succeeded or failed.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-event-outcome|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: athenaflow
  map:
    v: MapCode(%OUTCOME%,"EVENTOUTCOME")
mapping:
  identity:
    v: athenapractice
  map:
    v: MapCode(%OUTCOME%,"EVENTOUTCOME")
mapping:
  identity:
    v: rim
  map:
    v: .actionNegationInd
mapping:
  identity:
    v: dicom
  map:
    v: EventOutcomeIndicator
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.outcomeDesc
path:
  v: AuditEvent.outcomeDesc
short:
  v: Description of the event outcome
definition:
  v: A free text description of the outcome of the event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.outcomeDesc
  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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: %OUTCOME_DESCRIPTION%
mapping:
  identity:
    v: athenapractice
  map:
    v: %OUTCOME_DESCRIPTION%
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=OUT].target.text
mapping:
  identity:
    v: dicom
  map:
    v: EventOutcomeDescription
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.purposeOfEvent
path:
  v: AuditEvent.purposeOfEvent
short:
  v: The purposeOfUse of the event
definition:
  v: The purposeOfUse (reason) that was used during the event being recorded.
comment:
  v: Use participant.purposeOfUse when you know that is specific to the participant, otherwise use event.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.purposeOfEvent
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditPurposeOfUse
  strength:
    v: extensible
  description:
    v: The reason the activity took place.
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
    link: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
mapping:
  identity:
    v: rim
  map:
    v: * .reasonCode [ControlActReason when Act.class = CACT Control Act] *.outboundRelationship[typeCode=RSON].target
mapping:
  identity:
    v: dicom
  map:
    v: EventPurposeOfUse
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.Activity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.reason, Provenance.activity
mapping:
  identity:
    v: workflow
  map:
    v: Event.reasonCode
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: rim
  map:
    v: * .reasonCode [ControlActReason when Act.class = CACT Control Act] *.outboundRelationship[typeCode=RSON].target

id:
  v: AuditEvent.agent
path:
  v: AuditEvent.agent
short:
  v: Actor involved in the event
definition:
  v: An actor taking an active role in the event or activity that is logged.
comment:
  v: There may be more than one user per event, for example, in cases of actions initiated by one user for other users, or in events that involve more than one user, hardware device, or system process. However, only one user may be the initiator/requestor for the event.
requirements:
  v: An agent can be a person, an organization, software, device, or other actors that may be ascribed responsibility.
alias:
  v: ActiveParticipant
min:
  v: 1
max:
  v: *
base:
  path:
    v: AuditEvent.agent
  min:
    v: 1
  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())
  xpath:
    v: @value|f:*|h:div
  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: rim
  map:
    v: .participation
mapping:
  identity:
    v: dicom
  map:
    v: ActiveParticipant
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who

id:
  v: AuditEvent.agent.id
path:
  v: AuditEvent.agent.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.agent.extension
path:
  v: AuditEvent.agent.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.agent.modifierExtension
path:
  v: AuditEvent.agent.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.agent.type
path:
  v: AuditEvent.agent.type
short:
  v: How agent participated
definition:
  v: Specification of the participation type the user plays when performing the event.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.type
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: AuditAgentType
  strength:
    v: extensible
  description:
    v: The Participation type of the agent to the event.
  value set:
    v: http://hl7.org/fhir/ValueSet/participation-role-type
    link: http://hl7.org/fhir/ValueSet/participation-role-type
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.function
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .typeCode and/or .functionCode
mapping:
  identity:
    v: dicom
  map:
    v: RoleIdCode
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Attribution
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent.type

id:
  v: AuditEvent.agent.role
path:
  v: AuditEvent.agent.role
short:
  v: Agent role in the event
definition:
  v: The security role that the user was acting under, that come from local codes defined by the access control security system (e.g. RBAC, ABAC) used in the local context.
comment:
  v: Should be roles relevant to the event. Should not be an exhaustive list of roles.
requirements:
  v: This value ties an audited event to a user's role(s). It is an optional value that might be used to group events for analysis by user functional role categories.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.agent.role
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: AuditAgentRole
  strength:
    v: example
  description:
    v: What security role enabled the agent to participate in the event.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-role-type
    link: http://hl7.org/fhir/ValueSet/security-role-type
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .role
mapping:
  identity:
    v: dicom
  map:
    v: RoleIdCode
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Attribution
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent.role

id:
  v: AuditEvent.agent.who
path:
  v: AuditEvent.agent.who
short:
  v: Identifier of who
definition:
  v: Reference to who this agent is that was involved in the event.
comment:
  v: Where a User ID is available it will go into who.identifier.
requirements:
  v: This field ties an audit event to a specific resource or identifier.
alias:
  v: userId
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.who
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    link: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    link: http://hl7.org/fhir/StructureDefinition/Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    link: http://hl7.org/fhir/StructureDefinition/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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: MakeReference("USR",%PVID%,"Practitioner")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("USR",%PVID%,"Practitioner")
mapping:
  identity:
    v: rim
  map:
    v: .role
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Identity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent.actor
mapping:
  identity:
    v: workflow
  map:
    v: Event.performer.actor
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: dicom
  map:
    v: UserId
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent.who

id:
  v: AuditEvent.agent.altId
path:
  v: AuditEvent.agent.altId
short:
  v: Alternative User identity
definition:
  v: Alternative agent Identifier. For a human, this should be a user identifier text string from authentication system. This identifier would be one known to a common authentication system (e.g. single sign-on), if available.
requirements:
  v: In some situations, a human user may authenticate with one identity but, to access a specific application system, may use a synonymous identify. For example, some "single sign on" implementations will do this. The alternative identifier would then be the original identify used for authentication, and the User ID is the one known to and used by the application.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.altId
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who
mapping:
  identity:
    v: rim
  map:
    v: .id (distinguish id type by root)
mapping:
  identity:
    v: dicom
  map:
    v: AlternativeUserId
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Identity

id:
  v: AuditEvent.agent.name
path:
  v: AuditEvent.agent.name
short:
  v: Human friendly name for the agent
definition:
  v: Human-meaningful name for the agent.
requirements:
  v: The User ID and Authorization User ID may be internal or otherwise obscure values. This field assists the auditor in identifying the actual user.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.name
  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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: %LOGINNAME%
mapping:
  identity:
    v: athenapractice
  map:
    v: %LOGINNAME%
mapping:
  identity:
    v: rim
  map:
    v: .name
mapping:
  identity:
    v: dicom
  map:
    v: UserName
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Identity
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who

id:
  v: AuditEvent.agent.requestor
path:
  v: AuditEvent.agent.requestor
short:
  v: Whether user is initiator
definition:
  v: Indicator that the user is or is not the requestor, or initiator, for the event being audited.
comment:
  v: There can only be one initiator. If the initiator is not clear, then do not choose any one participant as the initiator.
requirements:
  v: This value is used to distinguish between requestor-users and recipient-users. For example, one person may initiate a report-output to be sent to another user.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.requestor
  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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: %UserIsRequestor%
mapping:
  identity:
    v: athenapractice
  map:
    v: %UserIsRequestor%
mapping:
  identity:
    v: rim
  map:
    v: If participation.typeCode was author, then true
mapping:
  identity:
    v: dicom
  map:
    v: UserIsRequestor
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.who

id:
  v: AuditEvent.agent.location
path:
  v: AuditEvent.agent.location
short:
  v: Where
definition:
  v: Where the event occurred.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.location
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location
    link: http://hl7.org/fhir/StructureDefinition/Location
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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: MakeReference("LOCREG",%LOCID%,"Location")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("LOCREG",%LOCID%,"Location")
mapping:
  identity:
    v: rim
  map:
    v: * Role.Class =SDLOC *Role.Code = ServiceDeliveryLocationRoleType *Entity.Code = PlaceEntityType = df.Types of places for Entity.Class = PLC *EntityClass = PLC = df.A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant.
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.location
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.location
mapping:
  identity:
    v: workflow
  map:
    v: Event.location
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]
mapping:
  identity:
    v: rim
  map:
    v: * Role.Class =SDLOC *Role.Code = ServiceDeliveryLocationRoleType *Entity.Code = PlaceEntityType = df.Types of places for Entity.Class = PLC *EntityClass = PLC = df.A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place might or might not be constant.

id:
  v: AuditEvent.agent.policy
path:
  v: AuditEvent.agent.policy
short:
  v: Policy that authorized event
definition:
  v: The policy or plan that authorized the activity being recorded. Typically, a single activity may have multiple applicable policies, such as patient consent, guarantor funding, etc. The policy would also indicate the security token used.
comment:
  v: For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.
requirements:
  v: This value is used retrospectively to determine the authorization policies.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.agent.policy
  min:
    v: 0
  max:
    v: *
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())
  xpath:
    v: @value|f:*|h:div
  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: ActPolicyType
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantRoleIDCode
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.policy
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]

id:
  v: AuditEvent.agent.media
path:
  v: AuditEvent.agent.media
short:
  v: Type of media
definition:
  v: Type of media involved. Used when the event is about exporting/importing onto media.
requirements:
  v: Usually, this is used instead of specifying a network address. This field is not used for Media Id (i.e. the serial number of a CD).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.media
  min:
    v: 0
  max:
    v: 1
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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: DICOMMediaType
  strength:
    v: extensible
  description:
    v: Used when the event is about exporting/importing onto media.
  value set:
    v: http://hl7.org/fhir/ValueSet/dicm-405-mediatype
    link: http://hl7.org/fhir/ValueSet/dicm-405-mediatype
mapping:
  identity:
    v: rim
  map:
    v: .player.description.mediaType
mapping:
  identity:
    v: dicom
  map:
    v: MediaType
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]

id:
  v: AuditEvent.agent.network
path:
  v: AuditEvent.agent.network
short:
  v: Logical network location for application activity
definition:
  v: Logical network location for application activity, if the activity has a network location.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.network
  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())
  xpath:
    v: @value|f:*|h:div
  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: .player.description.reference
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]

id:
  v: AuditEvent.agent.network.id
path:
  v: AuditEvent.agent.network.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.agent.network.extension
path:
  v: AuditEvent.agent.network.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.agent.network.modifierExtension
path:
  v: AuditEvent.agent.network.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.agent.network.address
path:
  v: AuditEvent.agent.network.address
short:
  v: Identifier for the network access point of the user device
definition:
  v: An identifier for the network access point of the user device for the audit event.
comment:
  v: This could be a device id, IP address or some other identifier associated with a device.
requirements:
  v: This datum identifies the user's network access point, which may be distinct from the server that performed the action. It is an optional value that may be used to group events recorded on separate servers for analysis of a specific network access point's data access across all servers.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.network.address
  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())
  xpath:
    v: @value|f:*|h:div
  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: pre-coordinated into URL
mapping:
  identity:
    v: dicom
  map:
    v: NetworkAccessPointID
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Location
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]

id:
  v: AuditEvent.agent.network.type
path:
  v: AuditEvent.agent.network.type
short:
  v: The type of network access point
definition:
  v: An identifier for the type of network access point that originated the audit event.
requirements:
  v: This datum identifies the type of network access point identifier of the user device for the audit event. It is an optional value that may be used to group events recorded on separate servers for analysis of access according to a network access point's type.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.agent.network.type
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventAgentNetworkType
  strength:
    v: required
  description:
    v: The type of network access point of this agent in the audit event.
  value set:
    v: http://hl7.org/fhir/ValueSet/network-type|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: pre-coordinated into URL
mapping:
  identity:
    v: dicom
  map:
    v: NetworkAccessPointTypeCode
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.where[x]

id:
  v: AuditEvent.agent.purposeOfUse
path:
  v: AuditEvent.agent.purposeOfUse
short:
  v: Reason given for this user
definition:
  v: The reason (purpose of use), specific to this agent, that was used during the event being recorded.
comment:
  v: Use participant.purposeOfUse when you know that is specific to the participant, otherwise use event.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.agent.purposeOfUse
  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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditPurposeOfUse
  strength:
    v: extensible
  description:
    v: The reason the activity took place.
  value set:
    v: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
    link: http://terminology.hl7.org/ValueSet/v3-PurposeOfUse
mapping:
  identity:
    v: rim
  map:
    v: *.reasonCode [ActHealthInformationPurposeOfUseReason codes/v:PurposeOfUse (2.16.840.1.113883.1.11.20448) * .outboundRelationship[typeCode=RSON or SUBJ].target
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Activity
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.why[x]
mapping:
  identity:
    v: rim
  map:
    v: *.reasonCode [ActHealthInformationPurposeOfUseReason codes/v:PurposeOfUse (2.16.840.1.113883.1.11.20448) * .outboundRelationship[typeCode=RSON or SUBJ].target

id:
  v: AuditEvent.source
path:
  v: AuditEvent.source
short:
  v: Audit Event Reporter
definition:
  v: The system that is reporting the event.
comment:
  v: Since multi-tier, distributed, or composite applications make source identification ambiguous, this collection of fields may repeat for each application or process actively involved in the event. For example, multiple value-sets can identify participating web servers, application processes, and database server threads in an n-tier distributed application. Passive event participants (e.g. low-level network transports) need not be identified.
requirements:
  v: The event is reported by one source.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.source
  min:
    v: 1
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: rim
  map:
    v: .participation[typeCode=INF].role[classCode=ASSIGN].player[classCode=DEV, determinerCode=INSTANCE]
mapping:
  identity:
    v: dicom
  map:
    v: AuditSourceIdentification

id:
  v: AuditEvent.source.id
path:
  v: AuditEvent.source.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.source.extension
path:
  v: AuditEvent.source.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.source.modifierExtension
path:
  v: AuditEvent.source.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.source.site
path:
  v: AuditEvent.source.site
short:
  v: Logical source location within the enterprise
definition:
  v: Logical source location within the healthcare enterprise network. For example, a hospital or other provider location within a multi-entity provider group.
requirements:
  v: This value differentiates among the sites in a multi-site enterprise health information system.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.source.site
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: rim
  map:
    v: .scopedRole[classCode=LOCE].player.desc
mapping:
  identity:
    v: dicom
  map:
    v: AuditEnterpriseSiteId

id:
  v: AuditEvent.source.observer
path:
  v: AuditEvent.source.observer
short:
  v: The identity of source detecting the event
definition:
  v: Identifier of the source where the event was detected.
requirements:
  v: This field ties the event to a specific source system. It may be used to group events for analysis according to where the event was detected.
alias:
  v: SourceId
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.source.observer
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/PractitionerRole
    link: http://hl7.org/fhir/StructureDefinition/PractitionerRole
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    link: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    link: http://hl7.org/fhir/StructureDefinition/Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    link: http://hl7.org/fhir/StructureDefinition/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())
  xpath:
    v: @value|f:*|h:div
  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: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: dicom
  map:
    v: AuditSourceId

id:
  v: AuditEvent.source.type
path:
  v: AuditEvent.source.type
short:
  v: The type of source where event originated
definition:
  v: Code specifying the type of source where event originated.
requirements:
  v: This field indicates which type of source is identified by the Audit Source ID. It is an optional value that may be used to group events for analysis according to the type of source where the event occurred.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.source.type
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: AuditEventSourceType
  strength:
    v: extensible
  description:
    v: Code specifying the type of system that detected and recorded the event.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-source-type
    link: http://hl7.org/fhir/ValueSet/audit-source-type
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.witness
mapping:
  identity:
    v: rim
  map:
    v: .code
mapping:
  identity:
    v: dicom
  map:
    v: AuditSourceTypeCode

id:
  v: AuditEvent.entity
path:
  v: AuditEvent.entity
short:
  v: Data or objects used
definition:
  v: Specific instances of data or objects that have been accessed.
comment:
  v: Data or objects used.
requirements:
  v: The event may have other entities involved.
alias:
  v: ParticipantObject
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.entity
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: sev-1
  severity:
    v: error
  human:
    v: Either a name or a query (NOT both)
  expression:
    v: name.empty() or query.empty()
  xpath:
    v: not(exists(f:name)) or not(exists(f:query))
  source:
    v: http://hl7.org/fhir/StructureDefinition/AuditEvent
    link: http://hl7.org/fhir/StructureDefinition/AuditEvent
must support:
  v: false
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=SUBJ].target or .participation[typeCode=SBJ].role
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectIdentification
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.target, Provenance.entity
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.entity.id
path:
  v: AuditEvent.entity.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.entity.extension
path:
  v: AuditEvent.entity.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.entity.modifierExtension
path:
  v: AuditEvent.entity.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.entity.what
path:
  v: AuditEvent.entity.what
short:
  v: Specific instance of resource
definition:
  v: Identifies a specific instance of the entity. The reference should be version specific.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.what
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    link: http://hl7.org/fhir/StructureDefinition/Resource
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())
  xpath:
    v: @value|f:*|h:div
  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: athenaflow
  map:
    v: MakeReference("PERSON",%PID%,"Patient")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("PATIENTPROFILE",%PID%,"Patient")
mapping:
  identity:
    v: rim
  map:
    v: [self]
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectID
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.target, Provenance.entity.reference
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]
mapping:
  identity:
    v: rim
  map:
    v: .id
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectID and ParticipantObjectIDTypeCode
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.target, Provenance.entity.what

id:
  v: AuditEvent.entity.type
path:
  v: AuditEvent.entity.type
short:
  v: Type of entity involved
definition:
  v: The type of the object that was involved in this audit event.
comment:
  v: This value is distinct from the user's role or any user relationship to the participant object.
requirements:
  v: To describe the object being acted upon. In addition to queries on the subject of the action in an auditable event, it is also important to be able to query on the object type for the action.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.type
  min:
    v: 0
  max:
    v: 1
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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventEntityType
  strength:
    v: extensible
  description:
    v: Code for the entity type involved in the audit event.
  value set:
    v: http://hl7.org/fhir/ValueSet/audit-entity-type
    link: http://hl7.org/fhir/ValueSet/audit-entity-type
mapping:
  identity:
    v: rim
  map:
    v: [self::Act].code or role.player.code
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectTypeCode
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.type
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.entity.type
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.what[x]

id:
  v: AuditEvent.entity.role
path:
  v: AuditEvent.entity.role
short:
  v: What role the entity played
definition:
  v: Code representing the role the entity played in the event being audited.
comment:
  v: See RFC 3881 for rules concerning matches between role and type.
requirements:
  v: For some detailed audit analysis it may be necessary to indicate a more granular type of entity, based on the application role it serves.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.role
  min:
    v: 0
  max:
    v: 1
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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventEntityRole
  strength:
    v: extensible
  description:
    v: Code representing the role the entity played in the audit event.
  value set:
    v: http://hl7.org/fhir/ValueSet/object-role
    link: http://hl7.org/fhir/ValueSet/object-role
mapping:
  identity:
    v: rim
  map:
    v: role.code (not sure what this would mean for an Act)
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectTypeCodeRole
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.role
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.lifecycle
path:
  v: AuditEvent.entity.lifecycle
short:
  v: Life-cycle stage for the entity
definition:
  v: Identifier for the data life-cycle stage for the entity.
comment:
  v: This can be used to provide an audit trail for data, over time, as it passes through the system.
requirements:
  v: Institutional policies for privacy and security may optionally fall under different accountability rules based on data life cycle. This provides a differentiating value for those cases.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.lifecycle
  min:
    v: 0
  max:
    v: 1
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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: AuditEventEntityLifecycle
  strength:
    v: extensible
  description:
    v: Identifier for the data life-cycle stage for the entity.
  value set:
    v: http://hl7.org/fhir/ValueSet/object-lifecycle-events
    link: http://hl7.org/fhir/ValueSet/object-lifecycle-events
mapping:
  identity:
    v: rim
  map:
    v: target of ObservationEvent[code="lifecycle"].value
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDataLifeCycle
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.role
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.entity.role
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.securityLabel
path:
  v: AuditEvent.entity.securityLabel
short:
  v: Security labels on the entity
definition:
  v: Security labels for the identified entity.
comment:
  v: Copied from entity meta security tags.
requirements:
  v: This field identifies the security labels for a specific instance of an object, such as a patient, to detect/track privacy and security issues.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.entity.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())
  xpath:
    v: @value|f:*|h:div
  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:
      v: SecurityLabels
  strength:
    v: extensible
  description:
    v: Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-labels
    link: http://hl7.org/fhir/ValueSet/security-labels
mapping:
  identity:
    v: rim
  map:
    v: .confidentialityCode
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectSensitivity
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.name
path:
  v: AuditEvent.entity.name
short:
  v: Descriptor for entity
definition:
  v: A name of the entity in the audit event.
comment:
  v: This field may be used in a query/report to identify audit events for a specific person. For example, where multiple synonymous Participant Object IDs (patient number, medical record number, encounter number, etc.) have been used.
requirements:
  v: Use only where entity can't be identified with an identifier.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
condition:
  v: sev-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())
  xpath:
    v: @value|f:*|h:div
  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: rim
  map:
    v: .title
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectName
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.Label
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.description
path:
  v: AuditEvent.entity.description
short:
  v: Descriptive text
definition:
  v: Text that describes the entity in more detail.
requirements:
  v: Use only where entity can't be identified with an identifier.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.description
  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())
  xpath:
    v: @value|f:*|h:div
  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: .text
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDescription
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.query
path:
  v: AuditEvent.entity.query
short:
  v: Query parameters
definition:
  v: The query parameters for a query-type entities.
comment:
  v: The meaning and secondary-encoding of the content of base64 encoded blob is specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and AuditEvent.entity.role. The base64 is a general-use and safe container for event specific data blobs regardless of the encoding used by the transaction being recorded. An AuditEvent consuming application must understand the event it is consuming and the formats used by the event. For example, if auditing an Oracle network database access, the Oracle formats must be understood as they will be simply encoded in the base64binary blob.
requirements:
  v: For query events, it may be necessary to capture the actual query input to the query process in order to identify the specific event. Because of differences among query implementations and data encoding for them, this is a base 64 encoded data blob. It may be subsequently decoded or interpreted by downstream audit analysis processing.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.query
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: base64Binary
condition:
  v: sev-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())
  xpath:
    v: @value|f:*|h:div
  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: rim
  map:
    v: No mapping
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectQuery
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context

id:
  v: AuditEvent.entity.detail
path:
  v: AuditEvent.entity.detail
short:
  v: Additional Information about the entity
definition:
  v: Tagged value pairs for conveying additional information about the entity.
requirements:
  v: Implementation-defined data about specific details of the object accessed or used.
min:
  v: 0
max:
  v: *
base:
  path:
    v: AuditEvent.entity.detail
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: .inboundRelationship[typeCode=SUBJ].target[classCode=OBS, moodCode=EVN]
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDetail

id:
  v: AuditEvent.entity.detail.id
path:
  v: AuditEvent.entity.detail.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:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: AuditEvent.entity.detail.extension
path:
  v: AuditEvent.entity.detail.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.entity.detail.modifierExtension
path:
  v: AuditEvent.entity.detail.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 manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. 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/R4/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())
  xpath:
    v: @value|f:*|h:div
  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()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  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: AuditEvent.entity.detail.type
path:
  v: AuditEvent.entity.detail.type
short:
  v: Name of the property
definition:
  v: The type of extra detail provided in the value.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.detail.type
  min:
    v: 1
  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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: .code
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDetail.type

id:
  v: AuditEvent.entity.detail.value[x]
path:
  v: AuditEvent.entity.detail.value[x]
short:
  v: Property value
definition:
  v: The value of the extra detail.
comment:
  v: The value can be string when known to be a string, else base64 encoding should be used to protect binary or undefined content. The meaning and secondary-encoding of the content of base64 encoded blob is specific to the AuditEvent.type, AuditEvent.subtype, AuditEvent.entity.type, and AuditEvent.entity.role. The base64 is a general-use and safe container for event specific data blobs regardless of the encoding used by the transaction being recorded. An AuditEvent consuming application must understand the event it is consuming and the formats used by the event. For example if auditing an Oracle network database access, the Oracle formats must be understood as they will be simply encoded in the base64binary blob.
requirements:
  v: Should not duplicate the entity value unless absolutely necessary.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: AuditEvent.entity.detail.value[x]
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: string
type:
  code:
    v: base64Binary
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())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.context
mapping:
  identity:
    v: rim
  map:
    v: .value
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDetail.value

element:
  id:
    v: AuditEvent
  path:
    v: AuditEvent
  comment:
    v: Based on ATNA (RFC 3881).
  must support:
    v: false
  mapping:
    identity:
      v: athenaflow
    map:
      v: FHIRR4_AUDITEVENTVIEW
  mapping:
    identity:
      v: athenapractice
    map:
      v: FHIRR4_AUDITEVENTVIEW
  mapping:
    identity:
      v: rim
    map:
      v: ControlAct[moodCode=EVN]
  mapping:
    identity:
      v: dicom
    map:
      v: Message
element:
  id:
    v: AuditEvent.id
  path:
    v: AuditEvent.id
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: id
  must support:
    v: false
  mapping:
    identity:
      v: athenaflow
    map:
      v: MakeId(%EVENT_ID%)
  mapping:
    identity:
      v: athenapractice
    map:
      v: MakeId(%EVENT_ID%)
  mapping:
    identity:
      v: v2
    map:
      v: MakeId(%PID%)
  mapping:
    identity:
      v: w3c.prov
    map:
      v: The id attribute will always be mapped using the MakeId() function. This function will construct an ID as appropriate. The first argument is a string which is unused at this time.
element:
  id:
    v: AuditEvent.meta
  path:
    v: AuditEvent.meta
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Meta
  must support:
    v: false
element:
  id:
    v: AuditEvent.meta.versionId
  path:
    v: AuditEvent.meta.versionId
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: id
  must support:
    v: false
  mapping:
    identity:
      v: dicom
    map:
      v: Don't map versionId if we don't support versioning.
  mapping:
    identity:
      v: w3c.prov
    map:
      v: If the resource supports retrieval of specific versions, this identifier should use the MakeVersionId() function with the field giving the version id as the first argument.
element:
  id:
    v: AuditEvent.meta.lastUpdated
  path:
    v: AuditEvent.meta.lastUpdated
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: instant
  must support:
    v: true
  mapping:
    identity:
      v: athenaflow
    map:
      v: %EVENT_TIMESTAMP%
  mapping:
    identity:
      v: athenapractice
    map:
      v: %EVENT_TIMESTAMP%
  mapping:
    identity:
      v: v2
    map:
      v: %DB_UPDATED_DATE%
  mapping:
    identity:
      v: w3c.prov
    map:
      v: This is almost always %DB_UPDATED_DATE%, but may be another field if that field contains the last update date of the record.
element:
  id:
    v: AuditEvent.meta.profile
  path:
    v: AuditEvent.meta.profile
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: uri
    rules:
      v: open
  min:
    v: 2
  max:
    v: *
  type:
    code:
      v: canonical
  must support:
    v: true
element:
  id:
    v: AuditEvent.meta.profile:athena-argonautrequirements
  path:
    v: AuditEvent.meta.profile
  slice name:
    v: athena-argonautrequirements
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: canonical
  fixed:
    v: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent
    link: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent
  must support:
    v: true
  mapping:
    identity:
      v: w3c.prov
    map:
      v: These are fixed values that contain the URLs assocaited with any profile we want to always claim conformance to.
element:
  id:
    v: AuditEvent.meta.profile:athena-auditevent-profile
  path:
    v: AuditEvent.meta.profile
  slice name:
    v: athena-auditevent-profile
  min:
    v: 1
  max:
    v: 1
  type:
    code:
      v: canonical
  fixed:
    v: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile
    link: https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-auditevent-profile
  must support:
    v: true
  mapping:
    identity:
      v: w3c.prov

v: The last profile is always the GE profile for this resource.

id:
  v: AuditEvent.meta.security
path:
  v: AuditEvent.meta.security
slicing:
  discriminator:
    type:
      v: value
    path:
      v: coding
  rules:
    v: open
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false

id:
  v: AuditEvent.meta.security:SENSITIVE-CHART
path:
  v: AuditEvent.meta.security
slice name:
  v: SENSITIVE-CHART
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: athenapractice
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: v2
  map:
    v: CheckSensitive(%SENSITIVECHART%)
mapping:
  identity:
    v: dicom
  map:
    v: Need a user story to address the issue of resetting the code because we don't want to mark a chart as NOT being sensitive if it was originally marked that way, BUT the update did not change the value explicitely.
mapping:
  identity:
    v: w3c.prov
  map:
    v: All data related to a patient must be joined with the PERSON table or view by PID, and the SENSITIVECHART flag needs to be reported. If the value is one, we will output an HL7 V3 ConfidentialityCode of "R" to indicate that this is a sensitive chart, or "N" to indicate that this chart is not sensitive. We will need user stories to address access control policies for sensitive charts for read, query, create and update.

id:
  v: AuditEvent.type
path:
  v: AuditEvent.type
min:
  v: 1
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: true
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeCoding(%EVENT_TYPE_ID%,null,%EVENT_TYPE_DESCRIPTION%)
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeCoding(%EVENT_TYPE_ID%,null,%EVENT_TYPE_DESCRIPTION%)
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventId

id:
  v: AuditEvent.subtype
path:
  v: AuditEvent.subtype
min:
  v: 0
max:
  v: *
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventTypeCode

id:
  v: AuditEvent.action
path:
  v: AuditEvent.action
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: MapCode(%ACTIONTYPE%,"EVENTACTION")
mapping:
  identity:
    v: athenapractice
  map:
    v: MapCode(%ACTIONTYPE%,"EVENTACTION")
mapping:
  identity:
    v: rim
  map:
    v: .code (type, subtype and action are pre-coordinated or sent as translations)
mapping:
  identity:
    v: dicom
  map:
    v: EventActionCode

id:
  v: AuditEvent.period
path:
  v: AuditEvent.period
comment:
  v: In a distributed system, some sort of common time base (e.g. an NTP [RFC1305] server) is a good implementation tactic.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: Period
must support:
  v: true
mapping:
  identity:
    v: athenaflow
  map:
    v: MakePeriod(%EVENT_TIMESTAMP%)
mapping:
  identity:
    v: athenapractice
  map:
    v: MakePeriod(%EVENT_TIMESTAMP%)
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime
mapping:
  identity:
    v: dicom
  map:
    v: EventDateTime
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.when
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.recorded

id:
  v: AuditEvent.recorded
path:
  v: AuditEvent.recorded
min:
  v: 1
max:
  v: 1
type:
  code:
    v: instant
must support:
  v: true
mapping:
  identity:
    v: athenaflow
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: athenapractice
  map:
    v: %EVENT_TIMESTAMP%
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime
mapping:
  identity:
    v: dicom
  map:
    v: EventDateTime
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.when
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.recorded

id:
  v: AuditEvent.outcome
path:
  v: AuditEvent.outcome
comment:
  v: In some cases a "success" may be partial, for example, an incomplete or interrupted transfer of a radiological study. For the purpose of establishing accountability, these distinctions are not relevant.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: MapCode(%OUTCOME%,"EVENTOUTCOME")
mapping:
  identity:
    v: athenapractice
  map:
    v: MapCode(%OUTCOME%,"EVENTOUTCOME")
mapping:
  identity:
    v: rim
  map:
    v: .actionNegationInd
mapping:
  identity:
    v: dicom
  map:
    v: EventOutcomeIndicator

id:
  v: AuditEvent.outcomeDesc
path:
  v: AuditEvent.outcomeDesc
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: %OUTCOME_DESCRIPTION%
mapping:
  identity:
    v: athenapractice
  map:
    v: %OUTCOME_DESCRIPTION%
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=OUT].target.text
mapping:
  identity:
    v: dicom
  map:
    v: EventOutcomeDescription

id:
  v: AuditEvent.purposeOfEvent
path:
  v: AuditEvent.purposeOfEvent
comment:
  v: Use participant.purposeOfUse when you know that is specific to the participant, otherwise use event.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: * .reasonCode [ControlActReason when Act.class = CACT Control Act] *.outboundRelationship[typeCode=RSON].target
mapping:
  identity:
    v: dicom
  map:
    v: EventPurposeOfUse
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.Activity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.reason, Provenance.activity

id:
  v: AuditEvent.agent
path:
  v: AuditEvent.agent
comment:
  v: There may be more than one user per event, for example, in cases of actions initiated by one user for other users, or in events that involve more than one user, hardware device, or system process. However, only one user may be the initiator/requestor for the event.
min:
  v: 1
max:
  v: *
type:
  code:
    v: BackboneElement
must support:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .participation
mapping:
  identity:
    v: dicom
  map:
    v: ActiveParticipant
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent

id:
  v: AuditEvent.agent.who
path:
  v: AuditEvent.agent.who
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Practitioner
    link: http://hl7.org/fhir/StructureDefinition/Practitioner
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Organization
    link: http://hl7.org/fhir/StructureDefinition/Organization
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Device
    link: http://hl7.org/fhir/StructureDefinition/Device
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Patient
    link: http://hl7.org/fhir/StructureDefinition/Patient
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/RelatedPerson
    link: http://hl7.org/fhir/StructureDefinition/RelatedPerson
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeReference("USR",%PVID%,"Practitioner")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("USR",%PVID%,"Practitioner")
mapping:
  identity:
    v: rim
  map:
    v: .role
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Identity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.agent.actor

id:
  v: AuditEvent.agent.name
path:
  v: AuditEvent.agent.name
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: %LOGINNAME%
mapping:
  identity:
    v: athenapractice
  map:
    v: %LOGINNAME%
mapping:
  identity:
    v: rim
  map:
    v: .name
mapping:
  identity:
    v: dicom
  map:
    v: UserName
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Identity

id:
  v: AuditEvent.agent.requestor
path:
  v: AuditEvent.agent.requestor
comment:
  v: There can only be one initiator. If the initiator is not clear, then do not choose any one participant as the initiator.
min:
  v: 1
max:
  v: 1
type:
  code:
    v: boolean
must support:
  v: true
mapping:
  identity:
    v: athenaflow
  map:
    v: %UserIsRequestor%
mapping:
  identity:
    v: athenapractice
  map:
    v: %UserIsRequestor%
mapping:
  identity:
    v: rim
  map:
    v: If participation.typeCode was author, then true
mapping:
  identity:
    v: dicom
  map:
    v: UserIsRequestor

id:
  v: AuditEvent.agent.location
path:
  v: AuditEvent.agent.location
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location
    link: http://hl7.org/fhir/StructureDefinition/Location
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeReference("LOCREG",%LOCID%,"Location")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("LOCREG",%LOCID%,"Location")
mapping:
  identity:
    v: rim
  map:
    v: * Role.Class =SDLOC *Role.Code = ServiceDeliveryLocationRoleType *Entity.Code = PlaceEntityType = df.Types of places for Entity.Class = PLC *EntityClass = PLC = df.A physical place or site with its containing structure. May be natural or man-made. The geographic position of a place may or may not be constant.
mapping:
  identity:
    v: w3c.prov
  map:
    v: Activity.location
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.location

id:
  v: AuditEvent.agent.policy
path:
  v: AuditEvent.agent.policy
comment:
  v: For example: Where an OAuth token authorizes, the unique identifier from the OAuth token is placed into the policy element Where a policy engine (e.g. XACML) holds policy logic, the unique policy identifier is placed into the policy element.
min:
  v: 0
max:
  v: *
type:
  code:
    v: uri
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: ActPolicyType
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantRoleIDCode
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.policy

id:
  v: AuditEvent.agent.media
path:
  v: AuditEvent.agent.media
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .player.description.mediaType
mapping:
  identity:
    v: dicom
  map:
    v: MediaType

id:
  v: AuditEvent.agent.network
path:
  v: AuditEvent.agent.network
min:
  v: 0
max:
  v: 1
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .player.description.reference

id:
  v: AuditEvent.agent.network.address
path:
  v: AuditEvent.agent.network.address
comment:
  v: This could be a device id, IP address or some other identifier associated with a device.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: pre-coordinated into URL
mapping:
  identity:
    v: dicom
  map:
    v: NetworkAccessPointID
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Location

id:
  v: AuditEvent.agent.network.type
path:
  v: AuditEvent.agent.network.type
min:
  v: 0
max:
  v: 1
type:
  code:
    v: code
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: pre-coordinated into URL
mapping:
  identity:
    v: dicom
  map:
    v: NetworkAccessPointTypeCode

id:
  v: AuditEvent.agent.purposeOfUse
path:
  v: AuditEvent.agent.purposeOfUse
comment:
  v: Use participant.purposeOfUse when you know that is specific to the participant, otherwise use event.purposeOfEvent. For example, during a machine-to-machine transfer it might not be obvious to the audit system who caused the event, but it does know why.
min:
  v: 0
max:
  v: *
type:
  code:
    v: CodeableConcept
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: *.reasonCode [ActHealthInformationPurposeOfUseReason codes/v:PurposeOfUse (2.16.840.1.113883.1.11.20448) * .outboundRelationship[typeCode=RSON or SUBJ].target
mapping:
  identity:
    v: w3c.prov
  map:
    v: Agent.Activity

id:
  v: AuditEvent.entity
path:
  v: AuditEvent.entity
comment:
  v: Data or objects used.
min:
  v: 0
max:
  v: *
type:
  code:
    v: BackboneElement
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .outboundRelationship[typeCode=SUBJ].target or .participation[typeCode=SBJ].role
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectIdentification
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.target, Provenance.entity

id:
  v: AuditEvent.entity.what
path:
  v: AuditEvent.entity.what
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Resource
    link: http://hl7.org/fhir/StructureDefinition/Resource
must support:
  v: false
mapping:
  identity:
    v: athenaflow
  map:
    v: MakeReference("PERSON",%PID%,"Patient")
mapping:
  identity:
    v: athenapractice
  map:
    v: MakeReference("PATIENTPROFILE",%PID%,"Patient")
mapping:
  identity:
    v: rim
  map:
    v: [self]
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectID
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.target, Provenance.entity.reference

id:
  v: AuditEvent.entity.type
path:
  v: AuditEvent.entity.type
comment:
  v: This value is distinct from the user's role or any user relationship to the participant object.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: [self::Act].code or role.player.code
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectTypeCode
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.type
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.entity.type

id:
  v: AuditEvent.entity.role
path:
  v: AuditEvent.entity.role
comment:
  v: See RFC 3881 for rules concerning matches between role and type.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: role.code (not sure what this would mean for an Act)
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectTypeCodeRole
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.role

id:
  v: AuditEvent.entity.lifecycle
path:
  v: AuditEvent.entity.lifecycle
comment:
  v: This can be used to provide an audit trail for data, over time, as it passes through the system.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: target of ObservationEvent[code="lifecycle"].value
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDataLifeCycle
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.role
mapping:
  identity:
    v: fhirprovenance
  map:
    v: Provenance.entity.role

id:
  v: AuditEvent.entity.securityLabel
path:
  v: AuditEvent.entity.securityLabel
min:
  v: 0
max:
  v: *
type:
  code:
    v: Coding
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .confidentialityCode
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectSensitivity

id:
  v: AuditEvent.entity.name
path:
  v: AuditEvent.entity.name
comment:
  v: This field may be used in a query/report to identify audit events for a specific person. For example, where multiple synonymous Participant Object IDs (patient number, medical record number, encounter number, etc.) have been used.
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .title
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectName
mapping:
  identity:
    v: w3c.prov
  map:
    v: Entity.Label

id:
  v: AuditEvent.entity.description
path:
  v: AuditEvent.entity.description
min:
  v: 0
max:
  v: 1
type:
  code:
    v: string
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .text
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectDescription

id:
  v: AuditEvent.entity.query
path:
  v: AuditEvent.entity.query
min:
  v: 0
max:
  v: 1
type:
  code:
    v: base64Binary
must support:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: No mapping
mapping:
  identity:
    v: dicom
  map:
    v: ParticipantObjectQuery