Pharmaceutical Quality (Industry)
1.0.0 - STU1

Pharmaceutical Quality (Industry), published by HL7 International / Biomedical Research and Regulation. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/uv-dx-pq/ and changes regularly. See the Directory of published versions

## Resource Profile: CompositionDrugPQ - Mappings

Active as of 2024-05-08

Mappings for the Composition-drug-pq resource profile.

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

CompositionDrugPQ
Composition | Event
identifier | Event.identifier
status | Event.status
type | Event.code
subject | Event.subject
encounter | Event.encounter
date | Event.occurrence[x]
author | Event.performer

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

CompositionDrugPQ
Composition | infrastructure.documents
url | FiveWs.identifier
identifier | FiveWs.identifier
version | FiveWs.version
status | FiveWs.status
type | FiveWs.class
category | FiveWs.class
subject | FiveWs.subject[x]
encounter | FiveWs.context
date | FiveWs.done[x]
author | FiveWs.author
attester |
party | FiveWs.witness
section |
author | FiveWs.author

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

CompositionDrugPQ
Composition | Entity, Role, or Act,Document[classCode="DOC" and moodCode="EVN" and isNormalAct()]
text | Act.text?
contained | N/A
extension | N/A
modifierExtension | N/A
identifier | Document.id / Document.setId
status | interim: .completionCode="IN" & ./statusCode[isNormalDatatype()]="active"; final: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and not(./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseComposition", code) and isNormalAct()]); amended: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseComposition", code) and isNormalAct() and statusCode="completed"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete"
type | ./code
category | .outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
subject | .participation[typeCode="SBJ"].role[typeCode="PAT"]
encounter | unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()], priorityNumber)/target[moodCode="EVN" and classCode=("ENC", "PCPR") and isNormalAct])
date | .effectiveTime[type="TS"]
author | .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
title | ./title
attester | .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
id | n/a
extension | n/a
modifierExtension | N/A
mode | unique(./modeCode)
time | ./time[type="TS" and isNormalDatatype()]
party | ./role[classCode="ASSIGNED" and isNormalRole]/player[determinerCode="INST" and classCode=("DEV", "PSN") and isNormalEntity()] or ./role[classCode="ASSIGNED" and isNormalRole and not(player)]/scoper[determinerCode="INST" and classCode="ORG" and isNormalEntity()]
custodian | .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]
relatesTo | .outboundRelationship
event | outboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']
id | n/a
extension | n/a
modifierExtension | N/A
period | .effectiveTime
detail | .outboundRelationship[typeCode="SUBJ"].target
section | ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]
id | n/a
extension | n/a
modifierExtension | N/A
title | ./title
code | ./code
author | .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
text | .text
orderedBy | .outboundRelationship[typeCode=COMP].sequenceNumber > 1
entry | .outboundRelationship[typeCode=COMP] or .participation[typeCode=SBJ]
emptyReason | .inboundRelationship[typeCode=SUBJ,code<ListEmptyReason].value[type=CD]
section | ./outboundRelationship[typeCode="COMP" and isNormalActRelationship()]/target[moodCode="EVN" and classCode="DOCSECT" and isNormalAct]

### Mappings for CDA (R2) (http://hl7.org/v3/cda)

CompositionDrugPQ
Composition | ClinicalDocument
identifier | .setId
version | .versionNumber
status | n/a
type | .code
category | n/a
subject | .recordTarget
encounter | .componentOf.encompassingEncounter
date | .effectiveTime
author | .author.assignedAuthor
title | .title
attester | .authenticator/.legalAuthenticator
mode | implied by .authenticator/.legalAuthenticator
time | .authenticator.time
party | .authenticator.assignedEnttty
custodian | .custodian.assignedCustodian
relatesTo | .relatedDocument
event | .documentationOf.serviceEvent
period | .effectiveTime
detail | n/a
section | .component.structuredBody.component.section
title | .title
code | .code
author | .author.assignedAuthor
focus | .subject? (CDA did not differentiate between subject and focus)
text | .text
orderedBy | n/a
entry | .entry
emptyReason | n/a
section | .component.section

### Mappings for FHIR DocumentReference (http://hl7.org/fhir/documentreference)

CompositionDrugPQ
Composition | when described by DocumentReference
identifier | DocumentReference.identifier
version | DocumentReference.version
status | DocumentReference.docStatus
type | DocumentReference.type
category | DocumenttReference.category
subject | DocumentReference.subject
encounter | DocumentReference.context
date | DocumentReference.content.attachment.date, DocumentReference.date
author | DocumentReference.author
title | DocumentReference.description, DocumentReference.content.attachment.title
attester | DocumentReference.attester
mode | DocumentReference.attester.mode
time | DocumentReference.attester.time
party | DocumentReference.attester.party
custodian | DocumentReference.custodian
relatesTo | DocumentReference.relatesTo
event |
period | DocumentReference.period
detail | DocumentReference.event