SGHI FHIR Profile Implementation Guide
0.1.0 - ci-build

SGHI FHIR Profile Implementation Guide, published by Kathurima Kimathi. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/savannahghi/sil_fhir_profile_ig/ and changes regularly. See the Directory of published versions

## Resource Profile: SGHIDocumentReference - Mappings

Draft as of 2026-04-27

Mappings for the documentreference resource profile.

#### Mappings to Structures in this Implementation Guide

No Mappings Found

#### Mappings to other Structures

No Mappings Found

#### Other Mappings

Name | Workflow Pattern | FiveWs Pattern Mapping | FHIR Composition | RIM Mapping | XDS metadata equivalent | CDA (R2) | HL7 V2 Mapping
--- | --- | --- | --- | --- | --- | --- | ---
DocumentReference | Event | infrastructure.documents | when describing a Composition | Entity Role or Act Document[classCode="DOC" and moodCode="EVN"] | DocumentEntry | when describing a CDA |
id |  |  |  |  |  |  |
meta |  |  |  |  |  |  |
implicitRules |  |  |  |  |  |  |
language |  |  |  |  |  |  |
text |  |  |  | Act.text? |  |  |
contained |  |  |  | N/A |  |  |
extension |  |  |  | N/A |  |  |
modifierExtension |  |  |  | N/A |  |  |
identifier | Event.identifier | FiveWs.identifier | Composition.identifier | .id / .setId | DocumentEntry.entryUUID DocumentEntry.uniqueId | ClinicalDocument/id | TXA-12
id |  |  |  | n/a |  |  |
extension |  |  |  | n/a |  |  |
use |  |  |  | Role.code or implied by context |  |  | N/A
type |  |  |  | Role.code or implied by context |  |  | CX.5
system |  |  |  | II.root or Role.id.root |  |  | CX.4 / EI-2-4
value |  |  |  | II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root) |  |  | CX.1 / EI.1
period |  |  |  | Role.effectiveTime or implied by context |  |  | CX.7 + CX.8
assigner |  |  |  | II.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper |  |  | CX.4 / (CX.4 CX.9 CX.10)
version |  | FiveWs.version | Composition.version |  |  |  |
basedOn |  |  |  | .outboundRelationship[typeCode=FLFS].target | DocumentEntry.referenceIdList |  |
status | Event.status | FiveWs.status |  | .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("ReviseDocument" .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument" .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete" | DocumentEntry.availabilityStatus |  | TXA-19
docStatus |  | FiveWs.status | Composition.status | .statusCode |  |  | TXA-17
modality |  | FiveWs.class |  |  |  |  |
type | Event.code | FiveWs.what[x] | Composition.type | ./code | DocumentEntry.typeCode | ClinicalDocument/code/@code The typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC in which case the mapping step can be omitted. | TXA-2
category |  | FiveWs.what[x] | Composition.category | .outboundRelationship[typeCode="COMP].target[classCode="LIST" moodCode="EVN"].code | DocumentEntry.classCode | Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code |
subject | Event.subject | FiveWs.subject[x] | Composition.subject | .participation[typeCode="SBJ"].role[typeCode="PAT"] | DocumentEntry.patientId | ClinicalDocument/recordTarget/ | PID-3 (No standard way to define a Practitioner or Group subject in HL7 V2 MDM message)
context | Event.encounter | FiveWs.context | Composition.encounter | unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()] priorityNumber)/target[moodCode="EVN" and classCode=("ENC" "PCPR") and isNormalAct]) |  |  |
event |  |  | Composition.event.detail | .code | DocumentEntry.referenceIdList |  |
bodySite |  |  |  | .targetSiteCode |  |  |
facilityType |  |  | usually from a mapping to a local ValueSet | .participation[typeCode="LOC"].role[classCode="DSDLOC"].code | DocumentEntry.healthcareFacilityTypeCode | usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code |
practiceSetting |  |  | usually from a mapping to a local ValueSet | .participation[typeCode="LOC"].role[classCode="DSDLOC"].code | DocumentEntry.practiceSettingCode | usually from a mapping to a local ValueSet |
period |  |  | Composition.event.period | .effectiveTime | DocumentEntry.serviceStartTime DocumentEntry.serviceStopTime | ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/low/ @value --> ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/high/ @value |
date | Event.occurrence[x] | FiveWs.recorded | Composition.date | .availabilityTime[type="TS"] |  |  |
author | Event.performer.actor |  | Composition.author | .participation[typeCode="AUT"].role[classCode="ASSIGNED"] | DocumentEntry.author | ClinicalDocument/author | TXA-9 (No standard way to indicate a Device in HL7 V2 MDM message)
attester | Event.performer.actor |  | Composition.attester | .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"] | DocumentEntry.legalAuthenticator | .authenticator/.legalAuthenticator |
id |  |  |  | n/a |  |  |
extension |  |  |  | n/a |  |  |
modifierExtension |  |  |  | N/A |  |  |
mode |  |  | Composition.attester.mode | unique(./modeCode) |  | implied by .authenticator/.legalAuthenticator |
time |  |  | Composition.attester.time | ./time[type="TS" and isNormalDatatype()] |  | .authenticator.time |
party |  | FiveWs.witness | Composition.attester.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()] |  | .authenticator.assignedEnttty | TXA-10
custodian | Event.performer.actor |  | Composition.custodian | .participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"] |  |  |
relatesTo |  |  | Composition.relatesTo | .outboundRelationship | DocumentEntry Associations |  |
id |  |  |  | n/a |  |  |
extension |  |  |  | n/a |  |  |
modifierExtension |  |  |  | N/A |  |  |
code |  |  | Composition.relatesTo.type | .outboundRelationship.typeCode | DocumentEntry Associations type | ClinicalDocument/relatedDocument/typeCode |
target |  |  | Composition.relatesTo.resourceReference | .target[classCode="DOC" moodCode="EVN"].id | DocumentEntry Associations reference | ClinicalDocument/relatedDocument/parentDocument |
description |  |  |  | .outboundRelationship[typeCode="SUBJ"].target.text | DocumentEntry.comments |  | TXA-25
securityLabel |  |  | Bundle.meta.security | .confidentialityCode | DocumentEntry.confidentialityCode | ClinicalDocument/confidentialityCode/@code | TXA-18
content |  |  | Bundle(Composition+*) | document.text |  |  |
id |  |  |  | n/a |  |  |
extension |  |  |  | n/a |  |  |
modifierExtension |  |  |  | N/A |  |  |
attachment |  |  | Composition.language Composition.title Composition.date | document.text | DocumentEntry.mimeType DocumentEntry.languageCode DocumentEntry.URI DocumentEntry.size DocumentEntry.hash DocumentEntry.title DocumentEntry.creationTime | ClinicalDocument/languageCode ClinicalDocument/title ClinicalDocument/date | TXA-3 for mime type
profile |  |  | Composition.meta.profile | document.text | DocumentEntry.formatCode | derived from the IHE Profile or Implementation Guide templateID |
id |  |  |  | n/a |  |  |
extension |  |  |  | n/a |  |  |
modifierExtension |  |  |  | N/A |  |  |
value[x] |  |  | Composition.meta.profile | document.text | DocumentEntry.formatCode | derived from the IHE Profile or Implementation Guide templateID |
Documentation for this format