PACIO Advance Directive Interoperability Implementation Guide
0.1.0 - STU 1 Ballot

Publication Build: This will be filled in by the publication tooling

## Resource Profile: PADIProvenance - Mappings

Mappings for the PADI-Provenance resource profile.

### Mappings for Workflow Pattern (http://hl7.org/fhir/workflow)

PADIProvenance
Provenance | Event
occurred[x] | Event.occurred[x]
location | Event.location
reason | Event.reasonCode
activity | Event.code
agent | Event.performer
type | Event.performer.function
who | Event.performer.actor
agent (ProvenanceAuthor) | Event.performer
type | Event.performer.function
who | Event.performer.actor
agent (ProvenanceTransmitter) | Event.performer
type | Event.performer.function
who | Event.performer.actor
agent (assembler) | Event.performer
type | Event.performer.function
who | Event.performer.actor

### Mappings for RIM Mapping (http://hl7.org/v3)

PADIProvenance
Provenance | Entity. Role, or Act, ControlAct[isNormalAct() and subsumes(CACT, classCode) and moodCode=EVN]
text | Act.text?
contained | N/A
extension | N/A
modifierExtension | N/A
target | ./outboundRelationship[isNormalActRelationship() and typeCode=SUBJ]/target OR ./participation[isNormalParticipation() and typeCode=SBJ]/role OR ./participation[isNormalParticipation() and typeCode=SBJ]/role[isNormalRole()]/player
id | n/a
extension | n/a
reference | N/A
type | N/A
identifier | .identifier
display | N/A
occurred[x] | ./effectiveTime[type=IVL_TS]
recorded | unique(./participation[isNormalParticipation() and typeCode=AUT]/time[type=TS])
policy | ./inboundRelationship[isNormalActRelationship() and typeCode="SUBJ"]/source[isNormalAct and subsumes(POLICY, classCode) and moodCode=EVN]/text[typeCode='ED'/tel
location | unique(./participation[isNormalParticipation() and typeCode=LOC]/role[isNormalRole() and subsumes(SDLOC, classCode)]/player[isNormalEntity and classCode="LOC" and determinerCode="INST"]
reason | unique(./reasonCode)
activity | Act.code
agent | ./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']
id | n/a
extension | n/a
modifierExtension | N/A
type | .role
role | .typecode
who | .id
onBehalfOf | Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]
agent (ProvenanceAuthor) | ./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']
id | n/a
extension | n/a
modifierExtension | N/A
type | .role
role | .typecode
who | .id
onBehalfOf | Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]
agent (ProvenanceTransmitter) | ./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']
id | n/a
extension | n/a
modifierExtension | N/A
type | .role
role | .typecode
who | .id
onBehalfOf | Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]
agent (assembler) | ./participation[isNormalParticipation()] OR ./outboundRelationship[isNormalActRelationship() and typeCode='DRIV']
id | n/a
extension | n/a
modifierExtension | N/A
type | .role
role | .typecode
who | .id
onBehalfOf | Person, Practitioner, Organization, Device :* .role [classCode = RoleClassMutualRelationship; role.code and * .scopes[Role](classCode=IDENT) and *.plays [Role.Code]
entity | ./subjectOf
id | n/a
extension | n/a
modifierExtension | N/A
role | ./typeCode
what | ./text/reference
agent | ./author/role
signature | ./signatureText

### Mappings for W3C PROV (http://www.w3.org/ns/prov)

PADIProvenance
Provenance | Activity
target | Entity Created/Updated
occurred[x] | Activity.startTime & Activity.endTime
recorded | Activity.when
location | Activity.location
reason | Activity.Activity
activity | Activity.Activity
agent | Agent
type | Agent.Attribution
agent (ProvenanceAuthor) | Agent
type | Agent.Attribution
agent (ProvenanceTransmitter) | Agent
type | Agent.Attribution
agent (assembler) | Agent
type | Agent.Attribution
entity | Entity
role | Entity.role
what | Entity.Identity

### Mappings for FiveWs Pattern Mapping (http://hl7.org/fhir/fivews)

PADIProvenance
Provenance |
target | FiveWs.what[x]
occurred[x] | FiveWs.done[x]
recorded | FiveWs.recorded
location | FiveWs.where[x]
reason | FiveWs.why[x]
activity | FiveWs.why[x]
agent | FiveWs.who
who | FiveWs.actor
agent (ProvenanceAuthor) | FiveWs.who
who | FiveWs.actor
agent (ProvenanceTransmitter) | FiveWs.who
who | FiveWs.actor
agent (assembler) | FiveWs.who
who | FiveWs.actor

### Mappings for FHIR AuditEvent Mapping (http://hl7.org/fhir/auditevent)

PADIProvenance
Provenance |
target | AuditEvent.entity.reference
recorded | AuditEvent.recorded
policy | AuditEvent.agent.policy
location | AuditEvent.agent.location
reason | AuditEvent.purposeOfEvent
agent | AuditEvent.agent
type | AuditEvent.agent.type
role | AuditEvent.agent.role
agent (ProvenanceAuthor) | AuditEvent.agent
type | AuditEvent.agent.type
role | AuditEvent.agent.role
agent (ProvenanceTransmitter) | AuditEvent.agent
type | AuditEvent.agent.type
role | AuditEvent.agent.role
agent (assembler) | AuditEvent.agent
type | AuditEvent.agent.type
role | AuditEvent.agent.role
entity | AuditEvent.entity
role | AuditEvent.entity.lifecycle
what | AuditEvent.entity.reference