臺灣健保署基礎實作指引
0.0.1 - ci-build

臺灣健保署基礎實作指引, published by 衛生福利部中央健康保險署. This guide is not an authorized publication; it is the continuous build for version 0.0.1 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/TWNHIFHIR/base/ and changes regularly. See the Directory of published versions

Resource Profile: DocumentReferenceTWNHIBASE - Mappings

Draft as of 2025-11-13

Mappings for the DocumentReference-twnhibase resource profile.

Mappings to Structures in this Implementation Guide

NameMapping to TWNHIBASE DocumentReferencedoco
.. DocumentReference
... id
    ... meta
      .... id
        .... extension
          .... versionId
            .... lastUpdated
              .... source
                .... profile
                  .... security
                    .... tag
                      ... implicitRules
                        ... text
                          ... contained
                            ... extension
                              ... modifierExtension
                                ... masterIdentifier
                                  ... identifier
                                    ... status
                                      ... docStatus
                                        ... type
                                          ... category
                                            .... id
                                              .... extension
                                                .... coding
                                                  ..... id
                                                    ..... extension
                                                      ..... system
                                                        ..... version
                                                          ..... code
                                                            ..... display
                                                              ..... userSelected
                                                                .... text
                                                                  ... subject
                                                                    ... date
                                                                      ... author
                                                                        ... authenticator
                                                                          ... custodian
                                                                            ... relatesTo
                                                                              .... id
                                                                                .... extension
                                                                                  .... modifierExtension
                                                                                    .... code
                                                                                      .... target
                                                                                        ... description
                                                                                          ... securityLabel
                                                                                            ... content
                                                                                              .... id
                                                                                                .... extension
                                                                                                  .... modifierExtension
                                                                                                    .... attachment
                                                                                                      ..... id
                                                                                                        ..... extension
                                                                                                          ..... contentType
                                                                                                            ..... language
                                                                                                              ..... data
                                                                                                                ..... url
                                                                                                                ..... size
                                                                                                                  ..... hash
                                                                                                                    ..... title
                                                                                                                    ..... creation
                                                                                                                      .... format
                                                                                                                        ... context
                                                                                                                          .... id
                                                                                                                            .... extension
                                                                                                                              .... modifierExtension
                                                                                                                                .... encounter
                                                                                                                                  .... event
                                                                                                                                    .... period
                                                                                                                                      .... facilityType
                                                                                                                                        .... practiceSetting
                                                                                                                                          .... sourcePatientInfo
                                                                                                                                            .... related

                                                                                                                                              doco Documentation for this format

                                                                                                                                              Mappings to other Structures

                                                                                                                                              No Mappings Found

                                                                                                                                              Other Mappings

                                                                                                                                              NameWorkflow PatternFHIR CompositionRIM MappingCDA (R2)FiveWs Pattern MappingHL7 v2 MappingXDS metadata equivalentdoco
                                                                                                                                              .. DocumentReference
                                                                                                                                              Event
                                                                                                                                              when describing a Composition
                                                                                                                                              Document[classCode="DOC" and moodCode="EVN"]
                                                                                                                                              when describing a CDA
                                                                                                                                              ... id
                                                                                                                                              ... meta
                                                                                                                                              .... id
                                                                                                                                              n/a
                                                                                                                                              .... extension
                                                                                                                                              n/a
                                                                                                                                              .... versionId
                                                                                                                                              .... lastUpdated
                                                                                                                                              .... source
                                                                                                                                              .... profile
                                                                                                                                              .... security
                                                                                                                                              .... tag
                                                                                                                                              ... implicitRules
                                                                                                                                              ... text
                                                                                                                                              Act.text?
                                                                                                                                              ... contained
                                                                                                                                              N/A
                                                                                                                                              ... extension
                                                                                                                                              N/A
                                                                                                                                              ... modifierExtension
                                                                                                                                              N/A
                                                                                                                                              ... masterIdentifier
                                                                                                                                              Event.identifier
                                                                                                                                              Composition.identifier
                                                                                                                                              .id
                                                                                                                                              ClinicalDocument/id
                                                                                                                                              FiveWs.identifier
                                                                                                                                              TXA-12
                                                                                                                                              DocumentEntry.uniqueId
                                                                                                                                              ... identifier
                                                                                                                                              Event.identifier
                                                                                                                                              .id / .setId
                                                                                                                                              FiveWs.identifier
                                                                                                                                              TXA-16?
                                                                                                                                              DocumentEntry.entryUUID
                                                                                                                                              ... status
                                                                                                                                              Event.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"
                                                                                                                                              FiveWs.status
                                                                                                                                              TXA-19
                                                                                                                                              DocumentEntry.availabilityStatus
                                                                                                                                              ... docStatus
                                                                                                                                              Composition.status
                                                                                                                                              .statusCode
                                                                                                                                              FiveWs.status
                                                                                                                                              TXA-17
                                                                                                                                              ... type
                                                                                                                                              CD
                                                                                                                                              CE/CNE/CWE
                                                                                                                                              ... category
                                                                                                                                              CD
                                                                                                                                              CE/CNE/CWE
                                                                                                                                              .... id
                                                                                                                                              n/a
                                                                                                                                              .... extension
                                                                                                                                              .... coding
                                                                                                                                              CV
                                                                                                                                              CE/CNE/CWE subset one of the sets of component 1-3 or 4-6
                                                                                                                                              ..... id
                                                                                                                                              n/a
                                                                                                                                              ..... extension
                                                                                                                                              ..... system
                                                                                                                                              ./codeSystem
                                                                                                                                              C*E.3
                                                                                                                                              ..... version
                                                                                                                                              ./codeSystemVersion
                                                                                                                                              C*E.7
                                                                                                                                              ..... code
                                                                                                                                              ./code
                                                                                                                                              C*E.1
                                                                                                                                              ..... display
                                                                                                                                              CV.displayName
                                                                                                                                              C*E.2 - but note this is not well followed
                                                                                                                                              ..... userSelected
                                                                                                                                              CD.codingRationale
                                                                                                                                              Sometimes implied by being first
                                                                                                                                              .... text
                                                                                                                                              ./originalText[mediaType/code="text/plain"]/data
                                                                                                                                              C*E.9. But note many systems use C*E.2 for this
                                                                                                                                              ... subject
                                                                                                                                              Event.subject
                                                                                                                                              Composition.subject
                                                                                                                                              .participation[typeCode="SBJ"].role[typeCode="PAT"]
                                                                                                                                              ClinicalDocument/recordTarget/
                                                                                                                                              FiveWs.subject
                                                                                                                                              PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)
                                                                                                                                              DocumentEntry.patientId
                                                                                                                                              ... date
                                                                                                                                              Event.occurrence[x]
                                                                                                                                              Composition.date
                                                                                                                                              .availabilityTime[type="TS"]
                                                                                                                                              FiveWs.recorded
                                                                                                                                              ... author
                                                                                                                                              Event.performer.actor
                                                                                                                                              Composition.author
                                                                                                                                              .participation[typeCode="AUT"].role[classCode="ASSIGNED"]
                                                                                                                                              ClinicalDocument/author
                                                                                                                                              TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)
                                                                                                                                              DocumentEntry.author
                                                                                                                                              ... authenticator
                                                                                                                                              Event.performer.actor
                                                                                                                                              Composition.attester
                                                                                                                                              .participation[typeCode="AUTHEN"].role[classCode="ASSIGNED"]
                                                                                                                                              ClinicalDocument/legalAuthenticator
                                                                                                                                              FiveWs.witness
                                                                                                                                              TXA-10
                                                                                                                                              DocumentEntry.legalAuthenticator
                                                                                                                                              ... 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.code
                                                                                                                                              .outboundRelationship.typeCode
                                                                                                                                              DocumentEntry Associations type
                                                                                                                                              .... target
                                                                                                                                              Composition.relatesTo.target
                                                                                                                                              • .target[classCode="DOC"
                                                                                                                                              • moodCode="EVN"].id
                                                                                                                                              DocumentEntry Associations reference
                                                                                                                                              ... description
                                                                                                                                              .outboundRelationship[typeCode="SUBJ"].target.text
                                                                                                                                              TXA-25
                                                                                                                                              DocumentEntry.comments
                                                                                                                                              ... securityLabel
                                                                                                                                              CD
                                                                                                                                              CE/CNE/CWE
                                                                                                                                              ... content
                                                                                                                                              Bundle(Composition+*)
                                                                                                                                              document.text
                                                                                                                                              .... id
                                                                                                                                              n/a
                                                                                                                                              .... extension
                                                                                                                                              n/a
                                                                                                                                              .... modifierExtension
                                                                                                                                              N/A
                                                                                                                                              .... attachment
                                                                                                                                              • Composition.language
                                                                                                                                              • Composition.title
                                                                                                                                              • Composition.date
                                                                                                                                              document.text
                                                                                                                                              • ClinicalDocument/languageCode
                                                                                                                                              • ClinicalDocument/title
                                                                                                                                              • ClinicalDocument/date
                                                                                                                                              TXA-3 for mime type
                                                                                                                                              • DocumentEntry.mimeType
                                                                                                                                              • DocumentEntry.languageCode
                                                                                                                                              • DocumentEntry.URI
                                                                                                                                              • DocumentEntry.size
                                                                                                                                              • DocumentEntry.hash
                                                                                                                                              • DocumentEntry.title
                                                                                                                                              • DocumentEntry.creationTime
                                                                                                                                              ..... id
                                                                                                                                              n/a
                                                                                                                                              ..... extension
                                                                                                                                              n/a
                                                                                                                                              ..... contentType
                                                                                                                                              • ./mediaType
                                                                                                                                              • ./charset
                                                                                                                                              ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used
                                                                                                                                              ..... language
                                                                                                                                              ./language
                                                                                                                                              ..... data
                                                                                                                                              ./data
                                                                                                                                              ED.5
                                                                                                                                              ..... url
                                                                                                                                              ./reference/literal
                                                                                                                                              RP.1+RP.2 - if they refer to a URL (see v2.6)
                                                                                                                                              ..... size
                                                                                                                                              N/A (needs data type R3 proposal)
                                                                                                                                              ..... hash
                                                                                                                                              :ED/integrityCheckAlgorithm="SHA-1"]
                                                                                                                                              ..... title
                                                                                                                                              ./title/data
                                                                                                                                              ..... creation
                                                                                                                                              N/A (needs data type R3 proposal)
                                                                                                                                              .... format
                                                                                                                                              Composition.meta.profile
                                                                                                                                              document.text
                                                                                                                                              derived from the IHE Profile or Implementation Guide templateID
                                                                                                                                              DocumentEntry.formatCode
                                                                                                                                              ... context
                                                                                                                                              outboundRelationship[typeCode="SUBJ"].target[classCode<'ACT']
                                                                                                                                              .... id
                                                                                                                                              n/a
                                                                                                                                              .... extension
                                                                                                                                              n/a
                                                                                                                                              .... modifierExtension
                                                                                                                                              N/A
                                                                                                                                              .... encounter
                                                                                                                                              Event.context
                                                                                                                                              Composition.encounter
                                                                                                                                              • unique(highest(./outboundRelationship[typeCode="SUBJ" and isNormalActRelationship()]
                                                                                                                                              • priorityNumber)/target[moodCode="EVN" and classCode=("ENC"
                                                                                                                                              • "PCPR") and isNormalAct])
                                                                                                                                              FiveWs.context
                                                                                                                                              .... event
                                                                                                                                              CD
                                                                                                                                              CE/CNE/CWE
                                                                                                                                              .... period
                                                                                                                                              Composition.event.period
                                                                                                                                              .effectiveTime
                                                                                                                                              ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/low/ @value --> ClinicalDocument/documentationOf/ serviceEvent/effectiveTime/high/ @value
                                                                                                                                              • DocumentEntry.serviceStartTime
                                                                                                                                              • DocumentEntry.serviceStopTime
                                                                                                                                              .... facilityType
                                                                                                                                              usually from a mapping to a local ValueSet
                                                                                                                                              .participation[typeCode="LOC"].role[classCode="DSDLOC"].code
                                                                                                                                              usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code
                                                                                                                                              DocumentEntry.healthcareFacilityTypeCode
                                                                                                                                              .... practiceSetting
                                                                                                                                              CD
                                                                                                                                              CE/CNE/CWE
                                                                                                                                              .... sourcePatientInfo
                                                                                                                                              Composition.subject
                                                                                                                                              .participation[typeCode="SBJ"].role[typeCode="PAT"]
                                                                                                                                              ClinicalDocument/recordTarget/
                                                                                                                                              • DocumentEntry.sourcePatientInfo
                                                                                                                                              • DocumentEntry.sourcePatientId
                                                                                                                                              .... related
                                                                                                                                              Composition.event.detail
                                                                                                                                              ./outboundRelationship[typeCode="PERT" and isNormalActRelationship()] / target[isNormalAct]
                                                                                                                                              ClinicalDocument/relatedDocument
                                                                                                                                              DocumentEntry.referenceIdList

                                                                                                                                              doco Documentation for this format