FHIR Release 3 (STU)

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

Security Work GroupMaturity Level: N/ABallot Status: InformativeCompartments: Device, Patient, Practitioner

R2 : R3 Converson maps for AuditEvent.

Functional status for this map: 8 tests that all execute ok. All tests pass round-trip testing and all r3 resources are valid. (see documentation)

map "http://hl7.org/fhir/StructureMap/AuditEvent2to3" = "R2 to R3 Conversions for AuditEvent"


uses "http://hl7.org/fhir/DSTU2/StructureDefinition/AuditEvent" alias  AuditEventR2 as source
uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias  AuditEvent as target

imports "http://hl7.org/fhir/StructureMap/*2to3"

group for type+types  AuditEvent extends DomainResource
  input src : AuditEventR2 as source
  input tgt : AuditEvent as target

  "AuditEvent-event" : for src.event as ev then {
     "AuditEvent-type" : for ev.type make tgt.type
     "AuditEvent-subtype" : for ev.subtype make tgt.subtype
     "AuditEvent-action" : for ev.action make tgt.action
     "AuditEvent-recorded" : for ev.dateTime make tgt.recorded
     "AuditEvent-outcome" : for ev.outcome make tgt.outcome
     "AuditEvent-outcomeDesc" : for ev.outcomeDesc make tgt.outcomeDesc
     "AuditEvent-purposeOfEvent" : for ev.purposeOfEvent make tgt.purposeOfEvent
  }
  "AuditEvent-agent" : for src.participant as vs0 make tgt.agent as vt0 then agent(vs0, vt0) 
  "AuditEvent-source" : for src.source as vs0 make tgt.source as vt0 then source (vs0, vt0)
  "AuditEvent-entity" : for src.object as vs0 make tgt.entity as vt0 then entity (vs0, vt0)
endgroup

group agent extends BackboneElement
  input src as source
  input tgt as target

  "AuditEvent.agent-role" : for src.role make tgt.role
  "AuditEvent.agent-reference" : for src.reference make tgt.reference
  "AuditEvent.agent-userId" : for src.userId make tgt.userId
  "AuditEvent.agent-altId" : for src.altId make tgt.altId
  "AuditEvent.agent-name" : for src.name make tgt.name
  "AuditEvent.agent-requestor" : for src.requestor make tgt.requestor
  "AuditEvent.agent-location" : for src.location make tgt.location
  "AuditEvent.agent-policy" : for src.policy make tgt.policy
  "AuditEvent.agent-media" : for src.media make tgt.media
  "AuditEvent.agent-network" : for src.network as vs make tgt.network as vt then network(vs, vt)
  "AuditEvent-purposeOfUse" : for src.purposeOfUse make tgt.purposeOfUse
endgroup

group network extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.agent.network-address" : for src.address make tgt.address
  "AuditEvent.agent.network-type" : for src.type make tgt.type
endgroup

group source extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.source-site" : for src.site make tgt.site
  "AuditEvent.source-identifier" : for src.identifier make tgt.identifier
  "AuditEvent.source-type" : for src.type make tgt.type
endgroup

group entity extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.entity-identifier" : for src.identifier make tgt.identifier
  "AuditEvent.entity-reference" : for src.reference make tgt.reference
  "AuditEvent.entity-type" : for src.type make tgt.type
  "AuditEvent.entity-role" : for src.role make tgt.role
  "AuditEvent.entity-lifecycle" : for src.lifecycle make tgt.lifecycle
  "AuditEvent.entity-securityLabel" : for src.securityLabel make tgt.securityLabel
  "AuditEvent.entity-name" : for src.name make tgt.name
  "AuditEvent.entity-description" : for src.description make tgt.description
  "AuditEvent.entity-query" : for src.query make tgt.query
  "AuditEvent.entity-detail" : for src.detail as vs make tgt.detail as vt then detail(vs, vt)
endgroup

group detail extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.entity.detail-type" : for src.type make tgt.type
  "AuditEvent.entity.value-type" : for src.value make tgt.value
endgroup

map "http://hl7.org/fhir/StructureMap/AuditEvent3to2" = "R3 to R2 Conversions for AuditEvent"

uses "http://hl7.org/fhir/StructureDefinition/AuditEvent" alias  AuditEvent as source
uses "http://hl7.org/fhir/DSTU2/StructureDefinition/AuditEvent" alias  AuditEventR2 as target

imports "http://hl7.org/fhir/StructureMap/*3to2"

group for type+types AuditEvent extends DomainResource
  input src : AuditEvent as source
  input tgt : AuditEventR2 as target

  "AuditEvent-event" : for src make tgt.event as ev then {
     "AuditEvent-type" : for src.type make ev.type
     "AuditEvent-subtype" : for src.subtype make ev.subtype
     "AuditEvent-action" : for src.action make ev.action
     "AuditEvent-recorded" : for src.recorded make ev.dateTime
     "AuditEvent-outcome" : for src.outcome make ev.outcome
     "AuditEvent-outcomeDesc" : for src.outcomeDesc make ev.outcomeDesc
     "AuditEvent-purposeOfEvent" : for src.purposeOfEvent make ev.purposeOfEvent
  }
  "AuditEvent-agent" : for src.agent as vs0 make tgt.participant as vt0 then agent(vs0, vt0) 
  "AuditEvent-source" : for src.source as vs0 make tgt.source as vt0 then source (vs0, vt0)
  "AuditEvent-entity" : for src.entity as vs0 make tgt.object as vt0 then entity (vs0, vt0)
endgroup

group agent extends BackboneElement
  input src as source
  input tgt as target

  "AuditEvent.agent-role" : for src.role make tgt.role
  "AuditEvent.agent-reference" : for src.reference make tgt.reference
  "AuditEvent.agent-userId" : for src.userId make tgt.userId
  "AuditEvent.agent-altId" : for src.altId make tgt.altId
  "AuditEvent.agent-name" : for src.name make tgt.name
  "AuditEvent.agent-requestor" : for src.requestor make tgt.requestor
  "AuditEvent.agent-location" : for src.location make tgt.location
  "AuditEvent.agent-policy" : for src.policy make tgt.policy
  "AuditEvent.agent-media" : for src.media make tgt.media
  "AuditEvent.agent-network" : for src.network as vs make tgt.network as vt then network(vs, vt)
  "AuditEvent-purposeOfUse" : for src.purposeOfUse make tgt.purposeOfUse
endgroup

group network extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.agent.network-address" : for src.address make tgt.address
  "AuditEvent.agent.network-type" : for src.type make tgt.type
endgroup

group source extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.source-site" : for src.site make tgt.site
  "AuditEvent.source-identifier" : for src.identifier make tgt.identifier
  "AuditEvent.source-type" : for src.type make tgt.type
endgroup

group entity extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.entity-identifier" : for src.identifier make tgt.identifier
  "AuditEvent.entity-reference" : for src.reference make tgt.reference
  "AuditEvent.entity-type" : for src.type make tgt.type
  "AuditEvent.entity-role" : for src.role make tgt.role
  "AuditEvent.entity-lifecycle" : for src.lifecycle make tgt.lifecycle
  "AuditEvent.entity-securityLabel" : for src.securityLabel make tgt.securityLabel
  "AuditEvent.entity-name" : for src.name make tgt.name
  "AuditEvent.entity-description" : for src.description make tgt.description
  "AuditEvent.entity-query" : for src.query make tgt.query
  "AuditEvent.entity-detail" : for src.detail as vs make tgt.detail as vt then detail(vs, vt)
endgroup

group detail extends BackboneElement
  input src as source
  input tgt as target
  "AuditEvent.entity.detail-type" : for src.type make tgt.type
  "AuditEvent.entity.value-type" : for src.value make tgt.value
endgroup