This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

XDS profile for Document Reference

Scope and Usage

The XDS profile describes in detail how the DocumentReference and DocumentManifest resources are used in the context of XDS. The two resources may be used as a facade to an existing XDS server, such as is used for the IHE MHD specification, or it can be used the other way around, where the XDS functionality is implemented using a FHIR based server as the storage mechanism.

Background and Context

The FHIR DocumentReference and DocumentManifest is based on the functionality defined by XDS, but they differ from XDS in some significant ways:

Mapping Notes

The formal mappings are found below, but this section provides some additional description to help understand the relationships between the XDS tranasction and the FHIR resources.

Patient The following attributes of patient are all found in the Patient resource:
  • patientId: Patient.identifier. The patientId has a use of "official"
  • sourcePatientId: Patient.identifier. The sourcePatientId has a use of "usual"
  • PatientInfo: Various properties as appropriate in the Patient resource
Author The following attributes of author are all found in the Practitioner resource:
  • authorInstitution: Practitioner.organization (and possibly Organization.identifier and Organization.name in a target Organization resource)
  • authorPerson: Practitioner.identifier and Practitioner.name
  • authorRole: Practitioner.role
  • authorSpecialty: Practitioner.specialty
  • authorTelecommunication: Practitioner.telecom
LegalAuthenticator In XDS, policy is that there is a "legal authenticator", and this is represented in the DocumentReference.authenticator element (it has a more general meaning so it's not so restrictive outside the XDS use case)
Identifiers The different identifiers go in different places, depending on the nature of the identifier:
  • entryUUID: Logical Id of the DocumentReference/DocumentManifest resource
  • uniqueId: DocumentReference.masterIdentier - the identifier of the document itself
  • homeCommunityId & repositoryUniqueId: These data items are not needed in a FHIR context because the document reference is directly available. If it's still needed for XDS service calls, use a service parameter by the name same name. Where the homeCommunityId is needed in a manifest, an extension is defined (http://hl7.org/fhir/xds#homeCommunityId, which contains a uri)
Availability Status

Approved (available for patient care): DocumentReference/Manifest.status = current

Deprecated (obsolete): DocumentReference/Manifest.status = superceded

Comments The information that currently is found in the comments slot is placed in the equivalent resource narrative (for human consumption).
Folders There is no direct equivalent between to XDS folders in FHIR. Workflow associated with a document reference may be managed using Tags, or documents can be explicitly grouped using the List resource

Handling Updates

The RESTful API allows updates to the DocumentReference/DocumentManifest resources that the document repository is built on.

In the context of XDS, servers SHALL ensure that the masterIdentifier element of a DocumentReference is never changed after the resource is created. When a new document is created, a new DocumentReference SHALL be created. The server SHOULD ensure that the supercedes element is correctly populated, along with the status of any existing documents that are being superceded. It MAY choose to do this by requiring the clients to perform this operation, or simply performing the operation itself.

When used with XDS, updates to the document reference resource are only performed to correct the details associated with the document description - other identifiers, context, location etc. The document itself, the hash value, etc, SHOULD never change. Servers MAY choose to maintain the repository of resources so that there is only one DocumentReference for each original document (unique masterIdentifiers), but doing so will require some way of resolving conflicting claims around the document metadata from different submitters.

In order to implement the XDS profile, a server SHALL keep a full version history of DocumentReference, DocumentManifest, Patient, and Practitioner resources. This allows for Audit investigations, and also replication using stnadard pub/sub arrangements.

This profile was published on Sun, Jun 24, 2012 00:00+1000 as a draft by HL7 , and profiles the DocumentReference Resource

The id of this profile is xds

Content

 doco
<!-- Resources -->
<!-- DocumentReference -->
<DocumentReference xmlns="http://hl7.org/fhir">
 <!-- from Element: extension -->
 <extension><!-- 0..* Extension Additional Content defined by implementations --></extension>
 <modifierExtension><!-- 0..* Extension Extensions that cannot be ignored --></modifierExtension>
 <text><!-- 0..1 Narrative Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <masterIdentifier><!-- 1..1 Identifier XDSDocumentEntry.uniqueId --></masterIdentifier>
 <identifier><!-- 0..* Identifier XDSDocumentEntry.referenceIdList --></identifier>
 <subject><!-- 1..1 Resource(Patient) 
     XDSDocumentEntry.patientId + sourcePatientId/sourcePatientInfo --></subject>
 <type><!-- 1..1 CodeableConcept XDSDocumentEntry.typeCode --></type>
 <class><!-- 1..1 CodeableConcept XDSDocumentEntry.classCode --></class>
 <author><!-- 1..* Resource(Practitioner|Device) XDSDocumentEntry.author --></author>
 <custodian><!-- 0..0 Resource(Organization) n/a --></custodian>
 <policyManager value="[uri]"/><!-- 0..1 XDSDocumentEntry.homeCommunityId -->
 <authenticator><!-- 0..1 Resource(Practitioner) ?? --></authenticator>
 <created value="[dateTime]"/><!-- 1..1 XDSDocumentEntry.creationTime -->
 <indexed value="[instant]"/><!-- 1..1 XDS submission time or XDSDocumentEntry.creationTime  if unknown -->
 <status value="[code]"/><!-- 1..1 implied by XDS workflow -->
 <docStatus><!-- 0..0 CodeableConcept preliminary | final | appended | amended | entered in error --></docStatus>
 <relatesTo>  <!-- 0..* Relationships that this document has with other document references that already exist -->
  <extension><!-- 0..* Extension Additional Content defined by implementations --></extension>
  <modifierExtension><!-- 0..* Extension Extensions that cannot be ignored --></modifierExtension>
  <code value="[code]"/><!-- 1..1 The type of relationship that this document has with anther document -->
  <target><!-- 1..1 Resource(DocumentReference) The target document of this relationship --></target>
 </relatesTo>
 <description value="[string]"/><!-- 0..1 XDSDocumentEntry.title -->
 <confidentiality><!-- 1..1 CodeableConcept XDSDocumentEntry.confidentialityCode --></confidentiality>
 <primaryLanguage value="[code]"/><!-- 0..1 XDSDocumentEntry.languageCode -->
 <mimeType value="[code]"/><!-- 1..1 XDSDocumentEntry.mimeType -->
 <format><!-- 1..1 CodeableConcept XDSDocumentEntry.formatCode --></format>
 <size value="[integer]"/><!-- 0..1 XDSDocumentEntry.size -->
 <hash value="[string]"/><!-- 0..1 XDSDocumentEntry.hash -->
 <location value="[uri]"/><!-- 0..1 repository location (by implication & configuration) -->
 <service>  <!-- 0..0 can be determined from repository location + parameters -->
 </service>
 <context>  <!-- 0..1 event codes, service Start & Stop time, and facility type -->
  <extension><!-- 0..* Extension Additional Content defined by implementations --></extension>
  <modifierExtension><!-- 0..* Extension Extensions that cannot be ignored --></modifierExtension>
  <event><!-- 0..* CodeableConcept XDSDocumentEntry.eventCodeList --></event>
  <period><!-- 1..1 Period 
      XDSDocumentEntry.serviceStartTime & XDSDocumentEntry.serviceStopTime --></period>
  <facilityType><!-- 0..1 CodeableConcept XDSDocumentEntry.healthCareFacilityTypeCode --></facilityType>
 </context>
</DocumentReference>

<!-- DocumentManifest -->
<DocumentManifest xmlns="http://hl7.org/fhir">
 <!-- from Element: extension -->
 <extension><!-- 0..* Extension Additional Content defined by implementations --></extension>
 <modifierExtension><!-- 0..* Extension Extensions that cannot be ignored --></modifierExtension>
 <text><!-- 0..1 Narrative Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <masterIdentifier><!-- 1..1 Identifier Unique Identifier for the set of documents --></masterIdentifier>
 <identifier><!-- 1..1 Identifier SubmissionSet.uniqueId --></identifier>
 <subject><!-- 1..* Resource(Patient) SubmissionSet.patientId --></subject>
 <recipient><!-- 0..* Resource(Patient|Practitioner|Organization) 
     SubmissionSet.intendedRecipient  --></recipient>
 <type><!-- 0..1 CodeableConcept SubmissionSet.contentTypeCode --></type>
 <author><!-- 1..* Resource(Practitioner|Device) SubmissionSet.author --></author>
 <created value="[dateTime]"/><!-- 0..1 SubmissionSet.submissionTime -->
 <source value="[uri]"/><!-- 0..1 SubmissionSet.sourceId -->
 <status value="[code]"/><!-- 1..1 SubmissionSet.availabilityStatus -->
 <supercedes><!-- 0..1 Resource(DocumentManifest) todo --></supercedes>
 <description value="[string]"/><!-- 0..1 SubmissionSet.title -->
 <confidentiality><!-- 0..0 CodeableConcept SubmissionSet.confidentialityCode --></confidentiality>
 <content><!-- 1..* Resource(DocumentReference) SubmissionSet.documentEntry --></content>
</DocumentManifest>

<!-- Extensions -->
<extension> <!--  0..1 Context: Resource = Practitioner -->
 <url value="http://hl7.org/fhir/xds#author-institution-repeats"/>
 <valueResourceReference><!--  0..1  Resource(Organization) Additional Institutions --> </valueResourceReference>
</extension>

<extension> <!--  0..1 Context: Resource = DocumentReference -->
 <url value="http://hl7.org/fhir/xds#practiceSettingCode"/>
 <valueCodeableConcept><!--  0..1  CodeableConcept XDSDocumentEntry.practiceSettingCode --> </valueCodeableConcept>
</extension>

This profile as XML or JSON.

.

Example

Example Instance "Example for Profile XDS profile for Document Reference"

<feed xmlns="http://www.w3.org/2005/Atom">
  <title>XDS Submission - prepared by Health Intersections Test Script</title>
  <id>urn:uuid:02f06039-da24-4585-953b-0e9da4e79f41</id>
  <updated>2013-07-01T13:11:33Z</updated>
  <author>
    <name>XDS --&gt; FHIR Reference Bridge</name>
    <uri>http://www.healthintersections.com.au/xds2fhir.js</uri>
  </author>
  <entry>
    <title>Document Reference (XDS Entry)</title>
    <id>cid:f6791f11-ef7c-4877-a92b-adf7df4948a6@healthintersections.com.au</id>
    <link href="cid:f6791f11-ef7c-4877-a92b-adf7df4948a6@healthintersections.com.au" rel="self"/>
    <updated>2013-07-01T13:11:33Z</updated>
    <content type="text/xml">
      <DocumentReference xmlns="http://hl7.org/fhir">
        <extension url="http://hl7.org/fhir/Profile/xds-profile#practiceSettingCode">
          <valueCodeableConcept>
            <coding>
              <system value="http://ihe.net/connectathon/practiceSettingCodes"/>
              <code value="General Medicine"/>
              <display value="General Medicine"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">
            <a href="http://localhost:9556/svc/fhir/Binary/@1e404af3-077f-4bee-b7a6-a9be97e1ce32">Document: urn:oid:129.6.58.92.88336</a>undefined, created 24/12/2005</div>
        </text>
        <masterIdentifier>
          <system value="urn:ietf:rfc:3986"/>
          <value value="urn:oid:129.6.58.92.88336"/>
        </masterIdentifier>
        <subject>
          <reference value="http://localhost/patient/search?identifier=http://acme.org/xds/patients!89765a87b"/>
        </subject>
        <type>
          <coding>
            <system value="http://ihe.net/connectathon/classCodes"/>
            <code value="History and Physical"/>
            <display value="History and Physical"/>
          </coding>
        </type>
        <author>
          <reference value="cid:af500afb-d680-4fa0-bcf2-ba1f5c5b096d@healthintersections.com.au"/>
        </author>
        <author>
          <reference value="cid:51b578b4-3ccb-4e67-b0dc-ef519d82ef2d@healthintersections.com.au"/>
        </author>
        <created value="2005-12-24"/>
        <indexed value="2013-07-01T23:11:33+10:00"/>
        <status value="current"/>
        <description value="Physical"/>
        <primaryLanguage value="en-us"/>
        <mimeType value="text/plain"/>
        <format value="urn:oid:1.3.6.1.4.1.19376.1.5.3.1.1.16.1.4"/>
        <location value="http://localhost:9556/svc/fhir/Binary/@1e404af3-077f-4bee-b7a6-a9be97e1ce32"/>
        <context>
          <period>
            <start value="2004-12-23T08:00:00"/>
            <end value="2004-12-23T08:01:00"/>
          </period>
        </context>
      </DocumentReference>
    </content>
  </entry>
  <entry>
    <title>patient record</title>
    <id>http://localhost/patient/search?identifier=http://acme.org/xds/patients!89765a87b</id>
    <link href="http://localhost/patient/search?identifier=http://acme.org/xds/patients!89765a87b" rel="self"/>
    <updated>2013-07-01T13:11:33Z</updated>
    <content type="text/xml">
      <Patient xmlns="http://hl7.org/fhir">
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">Person DOE, John, M, dob: 27/05/1956</div>
        </text>
        <identifier>
          <system value="usual"/>
          <value value="MRN"/>
        </identifier>
        <name>
            <use value="usual"/>
            <text value="DOE, John"/>
            <family value="Doe"/>
            <given value="John"/>
          </name>
        <birthDate value="1956-05-27"/>

      </Patient>
    </content>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Person DOE, John, M, dob: 27/05/1956</div>
    </summary>
  </entry>
  <entry>
    <title>Author</title>
    <id>cid:af500afb-d680-4fa0-bcf2-ba1f5c5b096d@healthintersections.com.au</id>
    <link href="cid:af500afb-d680-4fa0-bcf2-ba1f5c5b096d@healthintersections.com.au" rel="self"/>
    <updated>2013-07-01T13:11:33Z</updated>
    <content type="text/xml">
      <Practitioner xmlns="http://hl7.org/fhir">
        <extension url="http://hl7.org/fhir/Profile/xds-profile#author-institution-repeats">
          <valueResource>
            <display value="Parma Community"/>
          </valueResource>
        </extension>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">Author Person @ Cleveland Clinic</div>
        </text>
        <identifier>
          <system value="usual"/>
        </identifier>
          <name>
            <use value="usual"/>
            <family value="Smitty"/>
            <given value="Gerald"/>
          </name>
        
        <organization>
          <display value="Cleveland Clinic"/>
        </organization>
        <role>
          <coding>
            <code value="Attending"/>
          </coding>
        </role>
        <specialty>
          <coding>
            <code value="Orthopedic"/>
          </coding>
        </specialty>
      </Practitioner>
    </content>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Author Person @ Cleveland Clinic</div>
    </summary>
  </entry>
  <entry>
    <title>Author</title>
    <id>cid:51b578b4-3ccb-4e67-b0dc-ef519d82ef2d@healthintersections.com.au</id>
    <link href="cid:51b578b4-3ccb-4e67-b0dc-ef519d82ef2d@healthintersections.com.au" rel="self"/>
    <updated>2013-07-01T13:11:33Z</updated>
    <content type="text/xml">
      <Practitioner xmlns="http://hl7.org/fhir">
        <extension url="http://hl7.org/fhir/Profile/xds-profile#author-institution-repeats">
          <valueResource>
            <display value="Berea Community"/>
          </valueResource>
        </extension>
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">Author Person @ Cleveland Clinic</div>
        </text>
        <identifier>
          <system value="usual"/>
        </identifier>
          <name>
            <use value="usual"/>
            <family value="Dopplemeyer"/>
            <given value="Sherry"/>
          </name>
        
        <organization>
          <display value="Cleveland Clinic"/>
        </organization>
        <role>
          <coding>
            <code value="Primary Surgon"/>
          </coding>
        </role>
        <specialty>
          <coding>
            <code value="Orthopedic"/>
          </coding>
        </specialty>
      </Practitioner>
    </content>
    <summary type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">Author Person @ Cleveland Clinic</div>
    </summary>
  </entry>
  <entry>
    <title>binary document</title>
    <id>urn:uuid:1e404af3-077f-4bee-b7a6-a9be97e1ce32</id>
    <link href="urn:uuid:1e404af3-077f-4bee-b7a6-a9be97e1ce32" rel="self"/>
    <updated>2013-07-01T13:11:33Z</updated>
    <content type="text/xml">
      <Binary contentType="text/plain" xmlns="http://hl7.org/fhir">YXNkYXNkYXNkYXNkYXNk</Binary>
    </content>
  </entry>
</feed>