US Veterans Health Administration FHIR Map Set Implementation Guide
1.3.1 - 250401 United States of America flag

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

Resource Profile: DocumentReferenceDocumentReference - Mappings

Active as of 2025-03-31

Mappings for the DocumentReferenceDocumentReference resource profile.

Scroll down for the Raw FHIR, CDW & SDA mappings (if any).

Note that the CDW and SDA mappings are derived from a look-up based on the VistA source mappings in CDW and VPR SDA.

Mapping Sources

Use Case: Document Reference (Source)HOSPITAL LOCATION (44)2TYPETIU DOCUMENT (8925).001IEN.01DOCUMENT TYPE.02PATIENT.03VISIT.07EPISODE BEGIN DATE/TIME.08EPISODE END DATE/TIME.13VISIT TYPE2REPORT TEXT1201ENTRY DATE/TIME1202AUTHOR/DICTATOR1205HOSPITAL LOCATION1212DIVISION1306VERIFIED BY1402TREATING SPECIALTY1502SIGNED BY1701SUBJECT (OPTIONAL description)PATIENT/IHS (9000001).01NAMETIU DOCUMENT DEFINITION (8925.1)1501VHA ENTERPRISE STANDARD TITLETIU VHA ENTERPRISE STANDARD TITLE (8926.1).01STANDARD TITLE.08DOCUMENT TYPE2CODING SYSTEM

Raw Mappings

key status direction source mapApproach mapCase FHIR Path subPath mapValue mapParameter mapComment FHIR URL | Ver
870 team-approved V2F target not supported DocumentReference.masterIdentifier Not Must Support http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
871 team-approved V2F TIU DOCUMENT - IEN (8925-.001) source value DocumentReference.identifier .system = http://va.gov/identifiers/$Sta3n/8925 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
871-1 team-approved V2F fixed value DocumentReference.identifier .system http://va.gov/identifiers/$Sta3n/8925 generated from mapParameter line 1 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
874 team-approved V2F TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE (8925-.01 > 8925.1-1501 > 8926.1) source value DocumentReference.type .coding.system=http://loinc.org
.coding.code={CODING SYSTEM(2)}
.text={DOCUMENT TYPE(.08)}
Get LOINC from VistA or use TIU_VHA_ENTERPRISE_STANDARD_TITLE_8926.1 file provided by KBS to look up LOINC mapping CDW now has a view. N.B. CODING SYSTEM(2) is always LOINC codes! http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
874-1 team-approved V2F fixed value DocumentReference.type .coding.system http://loinc.org generated from mapParameter line 1 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
874-2 team-approved V2F TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - CODING SYSTEM (8925-.01 > 8925.1-1501 > 8926.1-2) source value DocumentReference.type .coding.code generated from mapParameter line 2 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
874-3 team-approved V2F TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - DOCUMENT TYPE (8925-.01 > 8925.1-1501 > 8926.1-.08) source value DocumentReference.type .text generated from mapParameter line 3 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
875 for review V2F fixed value DocumentReference.category[us-core] http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category#clinical-note (= NOTE, ADDENDUM, CONSULT, etc.?) Use TIU_VHA_ENTERPRISE_STANDARD_TITLE_8926.1 file provided by KBS to look up DocType If the document has a type or parent value, use that for the category http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
876 team-approved V2F TIU DOCUMENT - PATIENT > PATIENT/IHS - NAME (8925-.02 > 9000001-.01) reference DocumentReference.subject /Patient Pointer to PATIENT/HIS FILE (#9000001) http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
877 team-approved V2F transform DocumentReference.date Resource_creation_time() looking into façade pattern guidance on whether this is meaningful. 03/6/23 updated mapping based on LHV feedback http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
878 team-approved V2F TIU DOCUMENT - AUTHOR/DICTATOR (8925-1202) reference DocumentReference.author /Practitioner http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
1663 for review V2F TIU DOCUMENT - SIGNED BY (8925-1502) reference DocumentReference.author /Practitioner Added signed by as an author since it allows more than one. http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
879 team-approved V2F TIU DOCUMENT - VERIFIED BY (8925-1306) reference DocumentReference.authenticator /Practitioner http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
880 team-approved V2F TIU DOCUMENT - DIVISION (8925-1212) reference DocumentReference.custodian /Organization who maintains the document = VA…. Or maybe a specific? Clinic Per 03/02/2023 email from LH, changed the Vista field from 1205 (hospital location) to 1212 (division). http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
885 team-approved V2F TIU DOCUMENT - SUBJECT (OPTIONAL description) (8925-1701) source value DocumentReference.description http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
886 team-approved V2F target not supported DocumentReference.securityLabel http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
887 team-approved V2F target not supported DocumentReference.content.id remove http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
888 team-approved V2F TIU DOCUMENT - IEN (8925-.001) source value DocumentReference.content.attachment.id keep. Using HDR to pull text; need this http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
889 team-approved V2F fixed value DocumentReference.content.attachment.contentType #text/plain http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
890 team-approved V2F target not supported DocumentReference.content.attachment.language http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
892 team-approved V2F TIU DOCUMENT - REPORT TEXT (8925-2) transform DocumentReference.content.attachment.url create(Binary) option 2: USED in PHAPI US Core: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present. http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
893 team-approved V2F TIU DOCUMENT - REPORT TEXT (8925-2) transform DocumentReference.content.attachment.size calculate() http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
894 team-approved V2F TIU DOCUMENT - REPORT TEXT (8925-2) transform DocumentReference.content.attachment.hash calculate() http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
895 team-approved V2F TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - STANDARD TITLE (8925-.01 > 8925.1-1501 > 8926.1-.01) source value DocumentReference.content.attachment.title 03/06/23 added the secondary subfield based on LH feedback http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
896 team-approved V2F TIU DOCUMENT - ENTRY DATE/TIME (8925-1201) source value DocumentReference.content.attachment.creation .07 does not indicate parent or child document only the treatment episode associated with document http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
897 team-approved V2F target not supported DocumentReference.content.format These are specific document types, mostly IHE, not MIME http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
898 team-approved V2F target not supported DocumentReference.context.id Or ad hoc, for transient assets http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
899 team-approved V2F TIU DOCUMENT - VISIT (8925-.03) reference DocumentReference.context.encounter http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
900 team-approved V2F TIU DOCUMENT - VISIT TYPE (8925-.13) source value DocumentReference.context.event candidate: 8925-.13 http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
901 team-approved V2F TIU DOCUMENT - EPISODE BEGIN DATE/TIME (8925-.07) source value DocumentReference.context.period .start http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
902 team-approved V2F TIU DOCUMENT - EPISODE END DATE/TIME (8925-.08) source value DocumentReference.context.period .end http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
903 team-approved V2F TIU DOCUMENT - HOSPITAL LOCATION > HOSPITAL LOCATION - TYPE (8925-1205 > 44-2) source value DocumentReference.context.facilityType http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
904 team-approved V2F TIU DOCUMENT - TREATING SPECIALTY (8925-1402) source value DocumentReference.context.practiceSetting http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
905 team-approved V2F target not supported DocumentReference.context.sourcePatientInfo a snapshot of patient at time of document http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1
906 team-approved V2F target not supported DocumentReference.context.related other related assets http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference | 5.0.1

Mappings for Veterans Health Information Systems Technology and Architecture (VistA) ()

DocumentReferenceDocumentReference
DocumentReference
   masterIdentifier870: target not supported

Not Must Support

   identifier871: source value based on TIU DOCUMENT - IEN (8925-.001)
      system871-1: fixed value = http://va.gov/identifiers/$Sta3n/8925

generated from mapParameter line 1

   type874: source value based on TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE (8925-.01 > 8925.1-1501 > 8926.1)

Get LOINC from VistA or use TIU_VHA_ENTERPRISE_STANDARD_TITLE_8926.1 file provided by KBS to look up LOINC mapping CDW now has a view. N.B. CODING SYSTEM(2) is always LOINC codes!

      coding
         system874-1: fixed value = http://loinc.org

generated from mapParameter line 1

         code874-2: source value based on TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - CODING SYSTEM (8925-.01 > 8925.1-1501 > 8926.1-2)

generated from mapParameter line 2

      text874-3: source value based on TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - DOCUMENT TYPE (8925-.01 > 8925.1-1501 > 8926.1-.08)

generated from mapParameter line 3

   category (us-core)875: fixed value = http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category#clinical-note

(= NOTE, ADDENDUM, CONSULT, etc.?) Use TIU_VHA_ENTERPRISE_STANDARD_TITLE_8926.1 file provided by KBS to look up DocType If the document has a type or parent value, use that for the category

   subject876: reference based on TIU DOCUMENT - PATIENT > PATIENT/IHS - NAME (8925-.02 > 9000001-.01)

Pointer to PATIENT/HIS FILE (#9000001)

   date877: transform using Resource_creation_time()

looking into façade pattern guidance on whether this is meaningful. 03/6/23 updated mapping based on LHV feedback

   author878: reference based on TIU DOCUMENT - AUTHOR/DICTATOR (8925-1202), 1663: reference based on TIU DOCUMENT - SIGNED BY (8925-1502),

Added signed by as an author since it allows more than one.

   authenticator879: reference based on TIU DOCUMENT - VERIFIED BY (8925-1306)
   custodian880: reference based on TIU DOCUMENT - DIVISION (8925-1212)

who maintains the document = VA…. Or maybe a specific? Clinic Per 03/02/2023 email from LH, changed the Vista field from 1205 (hospital location) to 1212 (division).

   description885: source value based on TIU DOCUMENT - SUBJECT (OPTIONAL description) (8925-1701)
   securityLabel886: target not supported
   content
      id887: target not supported

remove

      attachment
         id888: source value based on TIU DOCUMENT - IEN (8925-.001)

keep. Using HDR to pull text; need this

         contentType889: fixed value = #text/plain
         language890: target not supported
         url892: transform using create(Binary) on TIU DOCUMENT - REPORT TEXT (8925-2)

option 2: USED in PHAPI US Core: DocumentReference.content.attachment.url or DocumentReference.content.attachment.data or both SHALL be present.

         size893: transform using calculate() on TIU DOCUMENT - REPORT TEXT (8925-2)
         hash894: transform using calculate() on TIU DOCUMENT - REPORT TEXT (8925-2)
         title895: source value based on TIU DOCUMENT - DOCUMENT TYPE > TIU DOCUMENT DEFINITION - VHA ENTERPRISE STANDARD TITLE > TIU VHA ENTERPRISE STANDARD TITLE - STANDARD TITLE (8925-.01 > 8925.1-1501 > 8926.1-.01)

03/06/23 added the secondary subfield based on LH feedback

         creation896: source value based on TIU DOCUMENT - ENTRY DATE/TIME (8925-1201)

.07 does not indicate parent or child document only the treatment episode associated with document

      format897: target not supported

These are specific document types, mostly IHE, not MIME

   context
      id898: target not supported

Or ad hoc, for transient assets

      encounter899: reference based on TIU DOCUMENT - VISIT (8925-.03)
      event900: source value based on TIU DOCUMENT - VISIT TYPE (8925-.13)

candidate: 8925-.13

      period
         start901: source value based on TIU DOCUMENT - EPISODE BEGIN DATE/TIME (8925-.07)
         end902: source value based on TIU DOCUMENT - EPISODE END DATE/TIME (8925-.08)
      facilityType903: source value based on TIU DOCUMENT - HOSPITAL LOCATION > HOSPITAL LOCATION - TYPE (8925-1205 > 44-2)
      practiceSetting904: source value based on TIU DOCUMENT - TREATING SPECIALTY (8925-1402)
      sourcePatientInfo905: target not supported

a snapshot of patient at time of document

      related906: target not supported

other related assets

Mappings for Clinical Data Warehouse (CDW) ()

DocumentReferenceDocumentReference
DocumentReference
   typeTIU.TIUDocument.TIUDocumentDefinitionIEN
      coding
         codeTIU.TIUDocument.TIUDocumentDefinitionIEN
      textTIU.TIUDocument.TIUDocumentDefinitionIEN
   subjectTIU.TIUDocument.PatientIEN
   authorTIU.TIUDocument.AuthorDictatorStaffIEN, TIU.TIUDocument.SignedByStaffIEN
   authenticatorTIU.TIUDocument.VerifiedByStaffIEN
   custodianTIU.TIUDocument.InstitutionIEN
   descriptionTIU.TIUDocument.DocumentSubject
   content
      attachment
         titleTIU.TIUDocument.TIUDocumentDefinitionIEN
         creationTIU.TIUDocument.EntryDateTime
   context
      encounterTIU.TIUDocument.VisitIEN
      eventTIU.TIUDocument.VisitType
      period
         startTIU.TIUDocument.EpisodeBeginDateTime
         endTIU.TIUDocument.EpisodeEndDateTime
      facilityTypeTIU.TIUDocument.DocumentLocationIEN Dim.Location.LocationType,Dim.Location.LocationType
      practiceSettingTIU.TIUDocument.TreatingSpecialtyIEN

Mappings for Summary Document Architecure (SDA) ()

DocumentReferenceDocumentReference
DocumentReference
   typeAdvanceDirective.Alert,AdvanceDirective.Status,Alert.Alert,Alert.AlertType,Documents.DocumentName,Documents.DocumentType,Documents.Extension[DocumentExtension].NationalTitle,Documents.Extension[DocumentExtension].NationalTitleRole,Documents.Extension[DocumentExtension].NationalTitleService,Documents.Extension[DocumentExtension].NationalTitleSetting,Documents.Extension[DocumentExtension].NationalTitleSubject,Documents.Extension[DocumentExtension].NationalTitleType,Documents.DocumentCompletionStatus.Description,Documents.DocumentClass[VA.DocumentClass].Description,Documents.NationalTitle[VA.NationalTitle].Description,Documents.NationalTitleRole[VA.NationalTitleRole].Description,Documents.NationalTitleService[VA.NationalTitleService].Description,Documents.NationalTitleSetting[VA.NationalTitleSetting].Description,Documents.NationalTitleSubject[VA.NationalTitleSubject].Description,Documents.NationalTitleType[VA.NationalTitleType].Description,Documents.CareProvider.Description,Documents.CareProvider.Name
      coding
         codeAdvanceDirective.Alert,AdvanceDirective.Status,Alert.Alert,Alert.AlertType,Documents.DocumentName,Documents.DocumentType,Documents.Extension[DocumentExtension].NationalTitle,Documents.Extension[DocumentExtension].NationalTitleRole,Documents.Extension[DocumentExtension].NationalTitleService,Documents.Extension[DocumentExtension].NationalTitleSetting,Documents.Extension[DocumentExtension].NationalTitleSubject,Documents.Extension[DocumentExtension].NationalTitleType,Documents.DocumentCompletionStatus.Description,Documents.DocumentClass[VA.DocumentClass].Description,Documents.NationalTitle[VA.NationalTitle].Description,Documents.NationalTitleRole[VA.NationalTitleRole].Description,Documents.NationalTitleService[VA.NationalTitleService].Description,Documents.NationalTitleSetting[VA.NationalTitleSetting].Description,Documents.NationalTitleSubject[VA.NationalTitleSubject].Description,Documents.NationalTitleType[VA.NationalTitleType].Description,Documents.CareProvider.Description,Documents.CareProvider.Name
      textAdvanceDirective.Alert,AdvanceDirective.Status,Alert.Alert,Alert.AlertType,Documents.DocumentName,Documents.DocumentType,Documents.Extension[DocumentExtension].NationalTitle,Documents.Extension[DocumentExtension].NationalTitleRole,Documents.Extension[DocumentExtension].NationalTitleService,Documents.Extension[DocumentExtension].NationalTitleSetting,Documents.Extension[DocumentExtension].NationalTitleSubject,Documents.Extension[DocumentExtension].NationalTitleType,Documents.DocumentCompletionStatus.Description,Documents.DocumentClass[VA.DocumentClass].Description,Documents.NationalTitle[VA.NationalTitle].Description,Documents.NationalTitleRole[VA.NationalTitleRole].Description,Documents.NationalTitleService[VA.NationalTitleService].Description,Documents.NationalTitleSetting[VA.NationalTitleSetting].Description,Documents.NationalTitleSubject[VA.NationalTitleSubject].Description,Documents.NationalTitleType[VA.NationalTitleType].Description,Documents.CareProvider.Description,Documents.CareProvider.Name
   subjectDocuments.DocumentType
   authorAlert.EnteredBy, Documents.Extension[DocumentExtension].CareProviders
   custodianAdvanceDirective.EnteredAt,Documents.EnteredAt
   descriptionDocuments.Extension[DocumentExtension].Subject
   content
      attachment
         urlAdvanceDirective.Comments,Alert.Comments,Documents.NoteText
         sizeAdvanceDirective.Comments,Alert.Comments,Documents.NoteText
         hashAdvanceDirective.Comments,Alert.Comments,Documents.NoteText
         titleAdvanceDirective.Alert,AdvanceDirective.Status,Alert.Alert,Alert.AlertType,Documents.DocumentName,Documents.DocumentType,Documents.Extension[DocumentExtension].NationalTitle,Documents.Extension[DocumentExtension].NationalTitleRole,Documents.Extension[DocumentExtension].NationalTitleService,Documents.Extension[DocumentExtension].NationalTitleSetting,Documents.Extension[DocumentExtension].NationalTitleSubject,Documents.Extension[DocumentExtension].NationalTitleType,Documents.DocumentCompletionStatus.Description,Documents.DocumentClass[VA.DocumentClass].Description,Documents.NationalTitle[VA.NationalTitle].Description,Documents.NationalTitleRole[VA.NationalTitleRole].Description,Documents.NationalTitleService[VA.NationalTitleService].Description,Documents.NationalTitleSetting[VA.NationalTitleSetting].Description,Documents.NationalTitleSubject[VA.NationalTitleSubject].Description,Documents.NationalTitleType[VA.NationalTitleType].Description,Documents.CareProvider.Description,Documents.CareProvider.Name
   context
      encounterAdvanceDirective.EncounterNumber,Alert.EncounterNumber,Documents.EncounterNumber
      facilityTypeAlert.EnteredAt,Documents.Extension[DocumentExtension].PatientLocation

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

DocumentReferenceDocumentReference
DocumentReferenceEvent
   masterIdentifierEvent.identifier
   identifierEvent.identifier
   statusEvent.status
   typeEvent.code
   subjectEvent.subject
   dateEvent.occurrence[x]
   authorEvent.performer.actor
   authenticatorEvent.performer.actor
   custodianEvent.performer.actor
   context
      encounterEvent.context

Mappings for FHIR Composition (http://hl7.org/fhir/composition)

DocumentReferenceDocumentReference
DocumentReferencewhen describing a Composition
   masterIdentifierComposition.identifier
   docStatusComposition.status
   typeComposition.type
   categoryComposition.class
   category (us-core)Composition.class
   subjectComposition.subject
   dateComposition.date
   authorComposition.author
   authenticatorComposition.attester
   custodianComposition.custodian
   relatesToComposition.relatesTo
      codeComposition.relatesTo.code
      targetComposition.relatesTo.target
   securityLabelComposition.confidentiality, Composition.meta.security
   contentBundle(Composition+*)
      attachmentComposition.language, Composition.title, Composition.date
      formatComposition.meta.profile
   context
      encounterComposition.encounter
      eventComposition.event.code
      periodComposition.event.period
      facilityTypeusually from a mapping to a local ValueSet
      practiceSettingusually from a mapping to a local ValueSet
      sourcePatientInfoComposition.subject
      relatedComposition.event.detail

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

DocumentReferenceDocumentReference
DocumentReferenceEntity. Role, or Act, Document[classCode="DOC" and moodCode="EVN"]
   textAct.text?
   containedN/A
   extensionN/A
   modifierExtensionN/A
   masterIdentifier.id
   identifier.id / .setId
      idn/a
      extensionn/a
      useRole.code or implied by context
      typeRole.code or implied by context
      systemII.root or Role.id.root
      valueII.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)
      periodRole.effectiveTime or implied by context
      assignerII.assigningAuthorityName but note that this is an improper use by the definition of the field. Also Role.scoper
   statusinterim: .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", code) and isNormalAct()]); amended: .completionCode="AU" && ./statusCode[isNormalDatatype()]="complete" and ./inboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]/source[subsumesCode("ActClass#CACT") and moodCode="EVN" and domainMember("ReviseDocument", code) and isNormalAct() and statusCode="completed"]; withdrawn : .completionCode=NI && ./statusCode[isNormalDatatype()]="obsolete"
   docStatus.statusCode
   type./code
      idn/a
      extensionn/a
      codingunion(., ./translation)
         idn/a
         extensionn/a
         system./codeSystem
         version./codeSystemVersion
         code./code
         displayCV.displayName
         userSelectedCD.codingRationale
      text./originalText[mediaType/code="text/plain"]/data
   category.outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
   category (us-core).outboundRelationship[typeCode="COMP].target[classCode="LIST", moodCode="EVN"].code
   subject.participation[typeCode="SBJ"].role[typeCode="PAT"]
   date.availabilityTime[type="TS"]
   author.participation[typeCode="AUT"].role[classCode="ASSIGNED"]
   authenticator.participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
   custodian.participation[typeCode="RCV"].role[classCode="CUST"].scoper[classCode="ORG" and determinerCode="INST"]
   relatesTo.outboundRelationship
      idn/a
      extensionn/a
      modifierExtensionN/A
      code.outboundRelationship.typeCode
      target.target[classCode="DOC", moodCode="EVN"].id
   description.outboundRelationship[typeCode="SUBJ"].target.text
   securityLabel.confidentialityCode
   contentdocument.text
      idn/a
      extensionn/a
      modifierExtensionN/A
      attachmentdocument.text
         idn/a
         extensionn/a
         contentType./mediaType, ./charset
         language./language
         data./data
         url./reference/literal
         sizeN/A (needs data type R3 proposal)
         hash.integrityCheck[parent::ED/integrityCheckAlgorithm="SHA-1"]
         title./title/data
         creationN/A (needs data type R3 proposal)
      formatdocument.text
   contextoutboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']
      idn/a
      extensionn/a
      modifierExtensionN/A
      encounterunique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()], priorityNumber)/target[moodCode="EVN" and classCode=("ENC", "PCPR") and isNormalAct])
      event.code
      period.effectiveTime
         idn/a
         extensionn/a
         start./low
         end./high
      facilityType.participation[typeCode="LOC"].role[classCode="DSDLOC"].code
      practiceSetting.participation[typeCode="LOC"].role[classCode="DSDLOC"].code
      sourcePatientInfo.participation[typeCode="SBJ"].role[typeCode="PAT"]
      related./outboundRelationship[typeCode="PERT" and isNormalActRelationship()] / target[isNormalAct]

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

DocumentReferenceDocumentReference
DocumentReferencewhen describing a CDA
   masterIdentifierClinicalDocument/id
   typeClinicalDocument/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.
   categoryDerived 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
   category (us-core)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
   subjectClinicalDocument/recordTarget/
   authorClinicalDocument/author
   authenticatorClinicalDocument/legalAuthenticator
   securityLabelClinicalDocument/confidentialityCode/@code
   content
      attachmentClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date
      formatderived from the IHE Profile or Implementation Guide templateID
   context
      periodClinicalDocument/documentationOf/ serviceEvent/effectiveTime/low/ @value --> ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/high/ @value
      facilityTypeusually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code
      practiceSettingusually from a mapping to a local ValueSet
      sourcePatientInfoClinicalDocument/recordTarget/
      relatedClinicalDocument/relatedDocument

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

DocumentReferenceDocumentReference
DocumentReference
   masterIdentifierFiveWs.identifier
   identifierFiveWs.identifier
   statusFiveWs.status
   docStatusFiveWs.status
   typeFiveWs.class
   categoryFiveWs.class
   category (us-core)FiveWs.class
   subjectFiveWs.subject[x], FiveWs.subject
   dateFiveWs.recorded
   authenticatorFiveWs.witness
   context
      encounterFiveWs.context

Mappings for HL7 v2 Mapping (http://hl7.org/v2)

DocumentReferenceDocumentReference
DocumentReference
   masterIdentifierTXA-12
   identifierTXA-16?
      useN/A
      typeCX.5
      systemCX.4 / EI-2-4
      valueCX.1 / EI.1
      periodCX.7 + CX.8
      assignerCX.4 / (CX.4,CX.9,CX.10)
   statusTXA-19
   docStatusTXA-17
   typeTXA-2
      codingC*E.1-8, C*E.10-22
         systemC*E.3
         versionC*E.7
         codeC*E.1
         displayC*E.2 - but note this is not well followed
         userSelectedSometimes implied by being first
      textC*E.9. But note many systems use C*E.2 for this
   subjectPID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)
   authorTXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)
   authenticatorTXA-10
   descriptionTXA-25
   securityLabelTXA-18
   content
      attachmentTXA-3 for mime type
         contentTypeED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used
         dataED.5
         urlRP.1+RP.2 - if they refer to a URL (see v2.6)
   context
      period
         startDR.1
         endDR.2

Mappings for XDS metadata equivalent (http://ihe.net/xds)

DocumentReferenceDocumentReference
DocumentReference
   masterIdentifierDocumentEntry.uniqueId
   identifierDocumentEntry.entryUUID
   statusDocumentEntry.availabilityStatus
   typeDocumentEntry.type
   categoryDocumentEntry.class
   category (us-core)DocumentEntry.class
   subjectDocumentEntry.patientId
   authorDocumentEntry.author
   authenticatorDocumentEntry.legalAuthenticator
   relatesToDocumentEntry Associations
      codeDocumentEntry Associations type
      targetDocumentEntry Associations reference
   descriptionDocumentEntry.comments
   securityLabelDocumentEntry.confidentialityCode
   content
      attachmentDocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime
      formatDocumentEntry.formatCode
   context
      eventDocumentEntry.eventCodeList
      periodDocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime
      facilityTypeDocumentEntry.healthcareFacilityTypeCode
      practiceSettingDocumentEntry.practiceSettingCode
      sourcePatientInfoDocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId
      relatedDocumentEntry.referenceIdList