DSTU2

This page is part of the FHIR Specification (v0.0.82: (v1.0.2: DSTU 1). 2). The current version which supercedes this version is 5.0.0 . For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Documentreference.profile.xml Documentreference.profile.json

Raw JSON ( canonical form )

Profile StructureDefinition for documentreference

{
  "resourceType": "Profile",

  "resourceType": "StructureDefinition",
  "id": "DocumentReference",
  "meta": {
    "lastUpdated": "2015-10-24T07:41:03.495+11:00"
  },

  "text": {
    "status": "generated",
    "div": "<div><pre>\r\n&lt;<a title=\"A reference to a document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference\"><b>DocumentReference</b></a> xmlns=&quot;http://hl7.org/fhir&quot;&gt; <span style=\"float: right\"><a title=\"Documentation for this format\" href=\"formats.html\"><img alt=\"doco\" src=\"help.png\"/></a></span>\r\n &lt;!-- from <a href=\"resources.html\">Resource</a>: <a href=\"extensibility.html\">extension</a>, <a href=\"extensibility.html#modifierExtension\">modifierExtension</a>, language, <a href=\"narrative.html#Narrative\">text</a>, and <a href=\"references.html#contained\">contained</a> --&gt;\r\n &lt;<a title=\"Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.masterIdentifier\"><b>masterIdentifier</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#Identifier\">Identifier</a></span> <span style=\"color: navy\">Master Version Specific Identifier</span><span style=\"color: Gray\"> --&gt;</span>&lt;/masterIdentifier&gt;\r\n &lt;<a title=\"Other identifiers associated with the document, including version independent, source record and workflow related identifiers.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.identifier\"><b>identifier</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..*</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#Identifier\">Identifier</a></span> <span style=\"color: navy\">Other identifiers for the document</span><span style=\"color: Gray\"> --&gt;</span>&lt;/identifier&gt;\r\n &lt;<a title=\"Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.subject\"><b>subject</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"patient.html#Patient\">Patient</a>|<a href=\"practitioner.html#Practitioner\">Practitioner</a>|<a href=\"group.html#Group\">Group</a>|<a href=\"device.html#Device\">Device</a>)</span> <span style=\"color: navy\">\r\n     Who|what is the subject of the document</span><span style=\"color: Gray\"> --&gt;</span>&lt;/subject&gt;\r\n &lt;<a title=\"Specifies the particular kind of document (e.g. Patient Summary, Discharge Summary, Prescription, etc.).\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.type\"><b>type</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"valueset-doc-codes.html\">What kind of document this is (LOINC if possible)</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/type&gt;\r\n &lt;<a title=\"A categorization for the type of the document. This may be implied by or derived from the code specified in the Document Type.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.class\"><b>class</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"valueset-xds-typecodes.html\">Categorization of Document</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/class&gt;\r\n &lt;<a title=\"Identifies who is responsible for adding the information to the document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.author\"><b>author</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..*</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>|<a href=\"device.html#Device\">Device</a>|<a href=\"patient.html#Patient\">Patient</a>|<a href=\"relatedperson.html#RelatedPerson\">RelatedPerson</a>)</span> <span style=\"color: navy\">\r\n     Who and/or what authored the document</span><span style=\"color: Gray\"> --&gt;</span>&lt;/author&gt;\r\n &lt;<a title=\"Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.custodian\"><b>custodian</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"organization.html#Organization\">Organization</a>)</span> <span style=\"color: navy\">Org which maintains the document</span><span style=\"color: Gray\"> --&gt;</span>&lt;/custodian&gt;\r\n &lt;<a title=\"A reference to a domain or server that manages policies under which the document is accessed and/or made available.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.policyManager\"><b>policyManager</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#uri\">uri</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Manages access policies for the document</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"Which person or organization authenticates that this document is valid.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.authenticator\"><b>authenticator</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"practitioner.html#Practitioner\">Practitioner</a>|<a href=\"organization.html#Organization\">Organization</a>)</span> <span style=\"color: navy\">\r\n     Who/What authenticated the document</span><span style=\"color: Gray\"> --&gt;</span>&lt;/authenticator&gt;\r\n &lt;<a title=\"When the document was created.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.created\"><b>created</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#dateTime\">dateTime</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Document creation time</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"When the document reference was created.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.indexed\"><b>indexed</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#instant\">instant</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">When this document reference created</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"The status of this document reference (this element modifies the meaning of other elements)\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.status\"><span style=\"text-decoration: underline\"><b>status</b></span></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#code\">code</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"document-reference-status.html\">current | superceded | entered in error</a></span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"The status of the underlying document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.docStatus\"><b>docStatus</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <a style=\"color: navy\" href=\"composition-status.html\">preliminary | final | appended | amended | entered in error</a><span style=\"color: Gray\"> --&gt;</span>&lt;/docStatus&gt;\r\n &lt;<a title=\"Relationships that this document has with other document references that already exist (this element modifies the meaning of other elements)\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.relatesTo\"><span style=\"text-decoration: underline\"><b>relatesTo</b></span></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>0..*</b></span> Relationships to other documents --&gt;</span>\r\n  &lt;<a title=\"The type of relationship that this document has with anther document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.relatesTo.code\"><b>code</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#code\">code</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"document-relationship-type.html\">replaces | transforms | signs | appends</a></span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"The target document of this relationship.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.relatesTo.target\"><b>target</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"references.html#Resource\">Resource</a>(<a href=\"documentreference.html#DocumentReference\">DocumentReference</a>)</span> <span style=\"color: navy\">Target of the relationship</span><span style=\"color: Gray\"> --&gt;</span>&lt;/target&gt;\r\n &lt;/relatesTo&gt;\r\n &lt;<a title=\"Human-readable description of the source document. This is sometimes known as the &quot;title&quot;.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.description\"><b>description</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Human-readable description (title)</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"A code specifying the level of confidentiality of the XDS Document (this element modifies the meaning of other elements)\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.confidentiality\"><span style=\"text-decoration: underline\"><b>confidentiality</b></span></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..*</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <a style=\"color: navy\" href=\"v3/vs/Confidentiality/index.html\">Sensitivity of source document</a><span style=\"color: Gray\"> --&gt;</span>&lt;/confidentiality&gt;\r\n &lt;<a title=\"The primary language in which the source document is written.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.primaryLanguage\"><b>primaryLanguage</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#code\">code</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"http://tools.ietf.org/html/bcp47.html\">The marked primary language for the document</a></span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"The mime type of the source document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.mimeType\"><b>mimeType</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#code\">code</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"http://www.rfc-editor.org/bcp/bcp13.txt.html\">Mime type, + maybe character encoding</a></span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"An identifier that identifies that the format and content of the document conforms to additional rules beyond the base format indicated in the mimeType.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.format\"><b>format</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#uri\">uri</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..*</b></span> <span style=\"color: navy\">Format/content rules for the document</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"The size of the source document this reference refers to in bytes.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.size\"><b>size</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#integer\">integer</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Size of the document in bytes</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"A hash of the source document to ensure that changes have not occurred.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.hash\"><b>hash</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">HexBinary representation of SHA1</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"A url at which the document can be accessed.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.location\"><b>location</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#uri\">uri</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span title=\"Inv-1: A location or a service (or both) SHALL be provided\" style=\"color: brown\"><b><img alt=\"??\" src=\"lock.png\"/> 0..1</b></span> <span style=\"color: navy\">Where to access the document</span><span style=\"color: Gray\"> --&gt;</span>\r\n &lt;<a title=\"A description of a service call that can be used to retrieve the document.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service\"><b>service</b></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span title=\"Inv-1: A location or a service (or both) SHALL be provided\" style=\"color: brown\"><b><img alt=\"??\" src=\"lock.png\"/> 0..1</b></span> If access is not fully described by location --&gt;</span>\r\n  &lt;<a title=\"The type of the service that can be used to access the documents.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service.type\"><b>type</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"valueset-documentreference-service-types.html\">Type of service (i.e. XDS.b)</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/type&gt;\r\n  &lt;<a title=\"Where the service end-point is located.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service.address\"><b>address</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Where service is located (usually a URL)</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;<a title=\"A list of named parameters that is used in the service call.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service.parameter\"><b>parameter</b></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>0..*</b></span> Service call parameters --&gt;</span>\r\n   &lt;<a title=\"The name of a parameter.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service.parameter.name\"><b>name</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>1..1</b></span> <span style=\"color: navy\">Parameter name in service call</span><span style=\"color: Gray\"> --&gt;</span>\r\n   &lt;<a title=\"The value of the named parameter.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.service.parameter.value\"><b>value</b></a> value=&quot;[<span style=\"color: darkgreen\"><a href=\"datatypes.html#string\">string</a></span>]&quot;/&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: navy\">Parameter value for the name</span><span style=\"color: Gray\"> --&gt;</span>\r\n  &lt;/parameter&gt;\r\n &lt;/service&gt;\r\n &lt;<a title=\"The clinical context in which the document was prepared.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.context\"><b>context</b></a>&gt;  <span style=\"color: Gray\">&lt;!-- <span style=\"color: brown\"><b>0..1</b></span> Clinical context of document --&gt;</span>\r\n  &lt;<a title=\"This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a &quot;History and Physical Report&quot; in which the procedure being documented is necessarily a &quot;History and Physical&quot; act.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.context.event\"><b>event</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..*</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <a style=\"color: navy\" href=\"v3/ActCode/index.html\">Main Clinical Acts Documented</a><span style=\"color: Gray\"> --&gt;</span>&lt;/event&gt;\r\n  &lt;<a title=\"The time period over which the service that is described by the document was provided.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.context.period\"><b>period</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#Period\">Period</a></span> <span style=\"color: navy\">Time of service that is being documented</span><span style=\"color: Gray\"> --&gt;</span>&lt;/period&gt;\r\n  &lt;<a title=\"The kind of facility where the patient was seen.\" class=\"dict\" href=\"documentreference-definitions.html#DocumentReference.context.facilityType\"><b>facilityType</b></a>&gt;<span style=\"color: Gray\">&lt;!--</span> <span style=\"color: brown\"><b>0..1</b></span> <span style=\"color: darkgreen\"><a href=\"datatypes.html#CodeableConcept\">CodeableConcept</a></span> <span style=\"color: navy\"><a style=\"color: navy\" href=\"valueset-xds-facilitycodes.html\">Kind of facility where patient was seen</a></span><span style=\"color: Gray\"> --&gt;</span>&lt;/facilityType&gt;\r\n &lt;/context&gt;\r\n&lt;/DocumentReference&gt;\r\n</pre></div>"

    "div": "<div>!-- Snipped for Brevity --></div>"

  },
  "name": "documentreference",
  "publisher": "FHIR Project",
  "description": "Basic Profile. A reference to a document.",

  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "name": "DocumentReference",

  "status": "draft",
  "date": "2014-09-30",
  "requirements": "Scope and Usage A document reference resource is used to describe a document that is made available to a healthcare system. A document is some sequence of bytes that is identifiable, establishes its own context (e.g. what subject, author etc), can be displayed to the user, and has defined update management. The document resource can be used with any document format that has a recognized mime type, and that conforms to this definition. \r\n\r\nTypically, Document Reference Resources are used in document indexing systems, such as IHE XDS (see the XDS specific profile), and are used to refer to: \r\n\r\n* CDA documents in FHIR systems\r\n* FHIR documents stored elsewhere (i.e. registry/repository following the XDS model)\r\n* PDF documents, and even digital records of faxes where sufficient information is available\r\n* Other kinds of documents, such as records of prescriptions.",

  "publisher": "Health Level Seven International (Structured Documents)",
  "contact": [
    {
      "telecom": [
        {
          "system": "other",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "other",
          "value": "http://www.hl7.org/Special/committees/structure/index.cfm"
        }
      ]
    }
  ],
  "date": "2015-10-24T07:41:03+11:00",
  "description": "Base StructureDefinition for DocumentReference Resource",
  "fhirVersion": "1.0.2",

  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "xds",
      "uri": "http://ihe.net/xds",
      "name": "XDS"
    },
    {

      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2"
    }
  ],
  "structure": [
    {
      "type": "DocumentReference",
      "publish": true,
      "element": [
        {
          "path": "DocumentReference",
          "definition": {
            "short": "A reference to a document",
            "formal": "A reference to a document.",
            "comments": "Usually, this is used for documents other than those defined by FHIR.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Resource"
              }
            ],
            "constraint": [
              {
                "key": "1",
                "name": "Location",
                "severity": "error",
                "human": "A location or a service (or both) SHALL be provided",
                "xpath": "exists(f:location) or exists(f:service)"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "Document[classCode=\"DOC\" and moodCode=\"EVN\"]"
              }
            ]

  "kind": "resource",
  "abstract": false,
  "base": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "snapshot": {
    "element": [
      {
        "path": "DocumentReference",
        "short": "A reference to a document",
        "definition": "A reference to a document .",
        "comments": "Usually, this is used for documents other than those defined by FHIR.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "DomainResource"

          }
        },
        {
          "path": "DocumentReference.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Document[classCode=\"DOC\" and moodCode=\"EVN\"]"
          },
          {
            "identity": "w5",
            "map": "infrastructure.documents"

          }
        },
        {
          "path": "DocumentReference.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ]
      },
      {
        "path": "DocumentReference.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comments": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation. Bundles always have an id, though it is usually a generated UUID.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"

          }
        },
        {
          "path": "DocumentReference.text",
          "definition": {
            "short": "Text summary of the resource, for human interpretation",
            "formal": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
            "comments": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
            "synonym": [
              "narrative",
              "html",
              "xhtml",
              "display"
            ],
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Narrative"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true
      },
      {
        "path": "DocumentReference.meta",
        "short": "Metadata about the resource",
        "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Meta"

          }
        },
        {
          "path": "DocumentReference.contained",
          "definition": {
            "short": "Contained, inline Resources",
            "formal": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
            "comments": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
            "synonym": [
              "inline resources",
              "anonymous resources",
              "contained resources"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Resource"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true
      },
      {
        "path": "DocumentReference.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.",
        "comments": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element as much as possible.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"

          }
        },
        {
          "path": "DocumentReference.masterIdentifier",
          "definition": {
            "short": "Master Version Specific Identifier",
            "formal": "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".id"
              },
              {
                "identity": "v2",
                "map": "TXA-12-Unique Document Number"
              }
            ]

        ],
        "isModifier": true,
        "isSummary": true
      },
      {
        "path": "DocumentReference.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "comments": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"

          }
        },
        {
          "path": "DocumentReference.identifier",
          "definition": {
            "short": "Other identifiers for the document",
            "formal": "Other identifiers associated with the document, including version independent, source record and workflow related identifiers.",
            "comments": "Other identifiers can also include Identifiers may be Accession Numbers, Order Numbers, Referral Request \nIdentifiers, XDS Workflow Instance Identifiers.",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Identifier"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".id / .setId"
              },
              {
                "identity": "v2",
                "map": "TXA-16-Unique Document File Name?"
              }
            ]

        ],
        "binding": {
          "strength": "required",
          "description": "A human language.",
          "valueSetUri": "http://tools.ietf.org/html/bcp47"
        }
      },
      {
        "path": "DocumentReference.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
        "comments": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
        "alias": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Narrative"

          }
        },
        {
          "path": "DocumentReference.subject",
          "definition": {
            "short": "Who|what is the subject of the document",
            "formal": "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Patient"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Group"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Device"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
              },
              {
                "identity": "v2",
                "map": "PID-3-Patient ID List (No standard way to define a Practitioner or Group subject in V2 MDM message)"
              }
            ]

        ],
        "condition": [
          "dom-1"
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"

          }
        },
        {
          "path": "DocumentReference.type",
          "definition": {
            "short": "What kind of document this is (LOINC if possible)",
            "formal": "Specifies the particular kind of document (e.g. Patient Summary, Discharge Summary, Prescription, etc.).",
            "comments": "Key metadata element describing the document, used in searching/filtering.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentType",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/doc-codes"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "./code"
              },
              {
                "identity": "v2",
                "map": "TXA-2-Document Type"
              }
            ]

        ]
      },
      {
        "path": "DocumentReference.contained",
        "short": "Contained, inline Resources",
        "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
        "comments": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
        "alias": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Resource"

          }
        },
        {
          "path": "DocumentReference.class",
          "definition": {
            "short": "Categorization of Document",
            "formal": "A categorization for the type of the document. This may be implied by or derived from the code specified in the Document Type.",
            "comments": "Helps humans to assess whether the document is of interest when viewing an index of documents.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentClass",
              "isExtensible": true,
              "conformance": "example",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/xds-typecodes"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code"
              },
              {
                "identity": "v2",
                "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code"
              }
            ]

        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"

          }
        },
        {
          "path": "DocumentReference.author",
          "definition": {
            "short": "Who and/or what authored the document",
            "formal": "Identifies who is responsible for adding the information to the document.",
            "comments": "Not necessarily who did the actual data entry (i.e. typist) it in or who was the source (informant).",
            "min": 1,
            "max": "*",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Device"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Patient"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/RelatedPerson"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]"
              },
              {
                "identity": "v2",
                "map": "TXA-9-Originator Code/Name (No standard way to indicate a Device in V2 MDM message)"
              }
            ]

        ]
      },
      {
        "path": "DocumentReference.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"

          }
        },
        {
          "path": "DocumentReference.custodian",
          "definition": {
            "short": "Org which maintains the document",
            "formal": "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.",
            "comments": "Identifies the logical organization to go to find the current version, where to report issues, etc. This is different from the physical location of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Organization"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]"
              }
            ]

        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"

          }
        },
        {
          "path": "DocumentReference.policyManager",
          "definition": {
            "short": "Manages access policies for the document",
            "formal": "A reference to a domain or server that manages policies under which the document is accessed and/or made available.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "N/A - New participation type required"
              }
            ]

        ]
      },
      {
        "path": "DocumentReference.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"

          }
        },
        {
          "path": "DocumentReference.authenticator",
          "definition": {
            "short": "Who/What authenticated the document",
            "formal": "Which person or organization authenticates that this document is valid.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Practitioner"
              },
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/Organization"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]"
              },
              {
                "identity": "v2",
                "map": "TXA-10-Assigned Document Authenticator"
              }
            ]

        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"

          }
        },
        {
          "path": "DocumentReference.created",
          "definition": {
            "short": "Document creation time",
            "formal": "When the document was created.",
            "comments": "Creation time is used for tracking, organizing versions and searching. This is the creation time of the document, not the source material on which it is based.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "dateTime"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".effectiveTime[type=\"TS\"]"
              },
              {
                "identity": "v2",
                "map": "TXA-6-Origination Date/Time"
              }

        ]
      },
      {
        "path": "DocumentReference.masterIdentifier",
        "short": "Master Version Specific Identifier",
        "definition": "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.",
        "comments": "CDA Document Id extension and root.",
        "requirements": "The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64 character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form \"oid^extension\", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.uniqueId"
          },
          {
            "identity": "v2",
            "map": "TXA-12"
          },
          {
            "identity": "rim",
            "map": ".id"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "path": "DocumentReference.identifier",
        "short": "Other identifiers for the document",
        "definition": "Other identifiers associated with the document, including version independent identifiers.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.entryUUID"
          },
          {
            "identity": "v2",
            "map": "TXA-16?"
          },
          {
            "identity": "rim",
            "map": ".id / .setId"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "path": "DocumentReference.subject",
        "short": "Who/what is the subject of the document",
        "definition": "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Device"

            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.patientId"
          },
          {
            "identity": "v2",
            "map": "PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
          },
          {
            "identity": "w5",
            "map": "who.focus"
          }
        ]
      },
      {
        "path": "DocumentReference.type",
        "short": "Kind of document (LOINC if possible)",
        "definition": "Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.",
        "comments": "Key metadata element describing the document, used in searching/filtering.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "preferred",
          "description": "Precise type of clinical document.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-doc-typecodes"
          }

        },
        {
          "path": "DocumentReference.indexed",
          "definition": {
            "short": "When this document reference created",
            "formal": "When the document reference was created.",
            "comments": "Referencing/indexing time is used for tracking, organizing versions and searching.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "instant"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".availabilityTime[type=\"TS\"]"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.type"
          },
          {
            "identity": "v2",
            "map": "TXA-2"
          },
          {
            "identity": "rim",
            "map": "./code"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "path": "DocumentReference.class",
        "short": "Categorization of document",
        "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.",
        "comments": "This is a metadata field from [XDS/MHD](http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD)).",
        "requirements": "Helps humans to assess whether the document is of interest when viewing a list of documents.",
        "alias": [
          "kind"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "High-level kind of a clinical document at a macro level.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-doc-classcodes"

          }
        },
        {
          "path": "DocumentReference.status",
          "definition": {
            "short": "current | superceded | entered in error",
            "formal": "The status of this document reference.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": true,
            "binding": {
              "name": "DocumentReferenceStatus",
              "isExtensible": false,
              "conformance": "required",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/document-reference-status"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\";\n\nfinal: .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()]);\n\namended: .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\"];\n\nwithdrawn : .completionCode=NI &&  ./statusCode[isNormalDatatype()]=\"obsolete\""
              },
              {
                "identity": "v2",
                "map": "TXA-19-Document Availability Status"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.class"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "path": "DocumentReference.author",
        "short": "Who and/or what authored the document",
        "definition": "Identifies who is responsible for adding the information to the document.",
        "comments": "Not necessarily who did the actual data entry (i.e. typist) it in or who was the source (informant).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"

            ]
          }
        },
        {
          "path": "DocumentReference.docStatus",
          "definition": {
            "short": "preliminary | final | appended | amended | entered in error",
            "formal": "The status of the underlying document.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "ReferredDocumentStatus",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/composition-status"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".statusCode"
              },
              {
                "identity": "v2",
                "map": "TXA-17-Document Completion Status"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.author"
          },
          {
            "identity": "v2",
            "map": "TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]"
          },
          {
            "identity": "w5",
            "map": "who.author"
          }
        ]
      },
      {
        "path": "DocumentReference.custodian",
        "short": "Organization which maintains the document",
        "definition": "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.",
        "comments": "Identifies the logical organization to go to find the current version, where to report issues, etc. This is different from the physical location of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"

            ]
          }
        },
        {
          "path": "DocumentReference.relatesTo",
          "definition": {
            "short": "Relationships to other documents",
            "formal": "Relationships that this document has with other document references that already exist.",
            "min": 0,
            "max": "*",
            "isModifier": true,
            "mapping": [
              {
                "identity": "rim",
                "map": ".outboundRelationship"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]"
          }
        ]
      },
      {
        "path": "DocumentReference.authenticator",
        "short": "Who/what authenticated the document",
        "definition": "Which person or organization authenticates that this document is valid.",
        "comments": "Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"

            ]
          }
        },
        {
          "path": "DocumentReference.relatesTo.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.legalAuthenticator"
          },
          {
            "identity": "v2",
            "map": "TXA-10"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]"
          },
          {
            "identity": "w5",
            "map": "who.witness"

          }
        },
        {
          "path": "DocumentReference.relatesTo.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ]
      },
      {
        "path": "DocumentReference.created",
        "short": "Document creation time",
        "definition": "When the document was created.",
        "comments": "Creation time is used for tracking, organizing versions and searching. This is the creation time of the document, not the source material on which it is based.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"

          }
        },
        {
          "path": "DocumentReference.relatesTo.code",
          "definition": {
            "short": "replaces | transforms | signs | appends",
            "formal": "The type of relationship that this document has with anther document.",
            "comments": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentRelationshipType",
              "isExtensible": false,
              "conformance": "required",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/document-relationship-type"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".outboundRelationship.typeCode"
              }
            ]

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.submissionTime"
          },
          {
            "identity": "v2",
            "map": "TXA-6"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime[type=\"TS\"]"
          },
          {
            "identity": "w5",
            "map": "when.done"
          }
        ]
      },
      {
        "path": "DocumentReference.indexed",
        "short": "When this document reference created",
        "definition": "When the document reference was created.",
        "comments": "Referencing/indexing time is used for tracking, organizing versions and searching.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "instant"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.submissionTime"
          },
          {
            "identity": "rim",
            "map": ".availabilityTime[type=\"TS\"]"
          },
          {
            "identity": "w5",
            "map": "when.recorded"
          }
        ]
      },
      {
        "path": "DocumentReference.status",
        "short": "current | superseded | entered-in-error",
        "definition": "The status of this document reference.",
        "comments": "This is the status of the DocumentReference object, which might be independent from the docStatus element.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "The status of the document reference.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/document-reference-status"

          }
        },
        {
          "path": "DocumentReference.relatesTo.target",
          "definition": {
            "short": "Target of the relationship",
            "formal": "The target document of this relationship.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "ResourceReference",
                "profile": "http://hl7.org/fhir/profiles/DocumentReference"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".target[classCode=\"DOC\", moodCode=\"EVN\"].id"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry status"
          },
          {
            "identity": "v2",
            "map": "TXA-19"
          },
          {
            "identity": "rim",
            "map": "interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\";  final: .completionCode=\"AU\" &&  ./statusCode[isNormalDatatype()]=\"complete\" and not(./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"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\""
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "path": "DocumentReference.docStatus",
        "short": "preliminary | final | appended | amended | entered-in-error",
        "definition": "The status of the underlying document.",
        "comments": "The document that is pointed to might be in various lifecycle states.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "Status of the underlying document.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/composition-status"

          }
        },
        {
          "path": "DocumentReference.description",
          "definition": {
            "short": "Human-readable description (title)",
            "formal": "Human-readable description of the source document. This is sometimes known as the \"title\".",
            "comments": "What the document is about, rather than a terse summary of the document. It is commonly the case that records do not have a title and are collectively referred to by the display name of Record code (e.g. a \"consultation\" or \"progress note\").",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".outboundRelationship[typeCode=\"SUBJ\"].target.text"
              },
              {
                "identity": "v2",
                "map": "TXA-25-Document Title"
              }
            ]

        "mapping": [
          {
            "identity": "v2",
            "map": "TXA-17"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo",
        "short": "Relationships to other documents",
        "definition": "Relationships that this document has with other document references that already exist.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.code",
        "short": "replaces | transforms | signs | appends",
        "definition": "The type of relationship that this document has with anther document.",
        "comments": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "The type of relationship between documents.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/document-relationship-type"

          }
        },
        {
          "path": "DocumentReference.confidentiality",
          "definition": {
            "short": "Sensitivity of source document",
            "formal": "A code specifying the level of confidentiality of the XDS Document.",
            "comments": "The interpretation of this field, and more generally enforcement and issues related to highly sensitive documents are beyond the scope of this resource. confidentialityCode can only be understood in the context of the policies, procedures, and value set specified by the context in which the document reference is being used.",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": true,
            "binding": {
              "name": "DocumentConfidentiality",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/v3/vs/Confidentiality"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".confidentialityCode"
              },
              {
                "identity": "v2",
                "map": "TXA-18-Document Confidentiality Status"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry Associations type"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship.typeCode"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.target",
        "short": "Target of the relationship",
        "definition": "The target document of this relationship.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/DocumentReference"

            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry Associations reference"
          },
          {
            "identity": "rim",
            "map": ".target[classCode=\"DOC\", moodCode=\"EVN\"].id"
          }
        ]
      },
      {
        "path": "DocumentReference.description",
        "short": "Human-readable description (title)",
        "definition": "Human-readable description of the source document. This is sometimes known as the \"title\".",
        "comments": "What the document is about, rather than a terse summary of the document. It is commonly the case that records do not have a title and are collectively referred to by the display name of Record code (e.g. a \"consultation\" or \"progress note\").",
        "requirements": "Helps humans to assess whether the document is of interest.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.description"
          },
          {
            "identity": "v2",
            "map": "TXA-25"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=\"SUBJ\"].target.text"
          }
        ]
      },
      {
        "path": "DocumentReference.securityLabel",
        "short": "Document security-tags",
        "definition": "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.",
        "comments": "The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce.   In the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.",
        "requirements": "Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "extensible",
          "description": "Security Labels from the Healthcare Privacy and Security Classification System.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-labels"
          }

        },
        {
          "path": "DocumentReference.primaryLanguage",
          "definition": {
            "short": "The marked primary language for the document",
            "formal": "The primary language in which the source document is written.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "Language",
              "isExtensible": false,
              "conformance": "required",
              "referenceUri": "http://tools.ietf.org/html/bcp47"
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".languageCode"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.confidentialityCode"
          },
          {
            "identity": "v2",
            "map": "TXA-18"
          },
          {
            "identity": "rim",
            "map": ".confidentialityCode"
          }
        ]
      },
      {
        "path": "DocumentReference.content",
        "short": "Document referenced",
        "definition": "The document and format referenced. There may be multiple content element repetitions, each with a different format.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.content.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.content.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.content.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "DocumentReference.content.attachment",
        "short": "Where to access the document",
        "definition": "The document or url of the document along with critical metadata to prove content has integrity.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Attachment"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.mimeType DocumentEntry.languageCode DocumentEntry.URI DocumentEntry.size DocumentEntry.hash DocumentEntry.title"
          },
          {
            "identity": "v2",
            "map": "TXA-3 for mime type"
          },
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.content.format",
        "short": "Format/content rules for the document",
        "definition": "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.",
        "comments": "Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "preferred",
          "description": "Document Format Codes.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/formatcodes"

          }
        },
        {
          "path": "DocumentReference.mimeType",
          "definition": {
            "short": "Mime type, + maybe character encoding",
            "formal": "The mime type of the source document.",
            "comments": "Note: application/hl7-v3+xml for CDA. application/binary for proprietary record formats.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "code"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "MimeType",
              "isExtensible": false,
              "conformance": "required",
              "referenceUri": "http://www.rfc-editor.org/bcp/bcp13.txt"
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".text.mediaType"
              },
              {
                "identity": "v2",
                "map": "TXA-3-Document Content Presentation"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.formatCode"
          },
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.context",
        "short": "Clinical context of document",
        "definition": "The clinical context in which the document was prepared.",
        "comments": "These values are primarily added to help with searching for interesting/relevant documents.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']"
          }
        ]
      },
      {
        "path": "DocumentReference.context.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.context.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.context.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "DocumentReference.context.encounter",
        "short": "Context of the document  content",
        "definition": "Describes the clinical encounter or type of care that the document content is associated with.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Encounter"

            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])"
          },
          {
            "identity": "w5",
            "map": "context"
          }
        ]
      },
      {
        "path": "DocumentReference.context.event",
        "short": "Main Clinical Acts Documented",
        "definition": "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.",
        "comments": "An event can further specialize the act inherent in the type, such as  where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "This list of codes represents the main clinical acts being documented.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-ActCode"
          }

        },
        {
          "path": "DocumentReference.format",
          "definition": {
            "short": "Format/content rules for the document",
            "formal": "An identifier that identifies that the format and content of the document conforms to additional rules beyond the base format indicated in the mimeType.",
            "comments": "Most often used when the mime-type is text/xml.",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.eventCodeList"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.period",
        "short": "Time of service that is being documented",
        "definition": "The time period over which the service that is described by the document was provided.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.serviceStartTime DocumentEntry.serviceStopTime"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime"
          }
        ]
      },
      {
        "path": "DocumentReference.context.facilityType",
        "short": "Kind of facility where patient was seen",
        "definition": "The kind of facility where the patient was seen.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "XDS Facility Type.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-facilitycodes"

          }
        },
        {
          "path": "DocumentReference.size",
          "definition": {
            "short": "Size of the document in bytes",
            "formal": "The size of the source document this reference refers to in bytes.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "integer"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".text.length"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.healthcareFacilityTypeCode"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.practiceSetting",
        "short": "Additional details about where the content was created (e.g. clinical specialty)",
        "definition": "This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.",
        "comments": "The value set for this content has an example binding because it is a value set decided by community policy. Other examples exist for consideration: * HITSP created the table HITSP/C80 Table 2-148 Clinical Specialty Value Set (a value set based upon SNOMED CT which is referenced by Direct (XDR and XDM for Direct Messaging Specification, Version 1), as well as Nationwide Health Information Network (NHIN).  Query for Documents, Web Service Interface Specification, V 3.0, 07/27/2011 * ELGA (Austria) (ELGA CDA Implementie-rungsleitfäden Registrierung von CDA Dokumenten für ELGA mit IHE Cross-Enterprise Document Sharing: XDS Metadaten (XDSDocumentEntry), [1.2.40.0.34.7.6.3] * XDS Connect-a-thon practiceSettingCode.",
        "requirements": "This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "Additional details about where the content was created (e.g. clinical specialty).",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-practice-codes"

          }
        },
        {
          "path": "DocumentReference.hash",
          "definition": {
            "short": "HexBinary representation of SHA1",
            "formal": "A hash of the source document to ensure that changes have not occurred.",
            "comments": "Whether the hash must be present and/or correct depends on the document handling rules defined in the context of use.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".text.integrityCheck"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.practiceSettingCode"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.sourcePatientInfo",
        "short": "Patient demographics from source",
        "definition": "The Patient Information as known when the document was published. May be a reference to a version specific, or contained.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"

            ]
          }
        },
        {
          "path": "DocumentReference.location",
          "definition": {
            "short": "Where to access the document",
            "formal": "A url at which the document can be accessed.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "uri"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".text.reference"
              },
              {
                "identity": "v2",
                "map": "(Might include V2 TXA-16-Unique Document File Name or TXA-24-Folder Assignment)"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.sourcePatientInfo DocumentEntry.sourcePatientId"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related",
        "short": "Related identifiers or resources",
        "definition": "Related identifiers or resources associated with the DocumentReference.",
        "comments": "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.referenceIdList"
          },
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.identifier",
        "short": "Identifier of related objects or events",
        "definition": "Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.",
        "comments": "Order numbers, accession numbers, XDW workflow numbers.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct] .id"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.ref",
        "short": "Related Resource",
        "definition": "Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.",
        "comments": "Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"

            ]
          }
        },
        {
          "path": "DocumentReference.service",
          "definition": {
            "short": "If access is not fully described by location",
            "formal": "A description of a service call that can be used to retrieve the document.",
            "comments": "If a document can be accessed by either a service or directly by a URL (i.e. an XDS repository with an MHD access point, or a DICOM network with a WADO portal) just provide the URL.",
            "min": 0,
            "max": "1",
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".text.reference"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct].text.reference"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "path": "DocumentReference",
        "short": "A reference to a document",
        "definition": "A reference to a document .",
        "comments": "Usually, this is used for documents other than those defined by FHIR.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "DomainResource"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Document[classCode=\"DOC\" and moodCode=\"EVN\"]"
          },
          {
            "identity": "w5",
            "map": "infrastructure.documents"
          }
        ]
      },
      {
        "path": "DocumentReference.masterIdentifier",
        "short": "Master Version Specific Identifier",
        "definition": "Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.",
        "comments": "CDA Document Id extension and root.",
        "requirements": "The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64 character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form \"oid^extension\", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.uniqueId"
          },
          {
            "identity": "v2",
            "map": "TXA-12"
          },
          {
            "identity": "rim",
            "map": ".id"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "path": "DocumentReference.identifier",
        "short": "Other identifiers for the document",
        "definition": "Other identifiers associated with the document, including version independent identifiers.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.entryUUID"
          },
          {
            "identity": "v2",
            "map": "TXA-16?"
          },
          {
            "identity": "rim",
            "map": ".id / .setId"
          },
          {
            "identity": "w5",
            "map": "id"
          }
        ]
      },
      {
        "path": "DocumentReference.subject",
        "short": "Who/what is the subject of the document",
        "definition": "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Device"

            ]
          }
        },
        {
          "path": "DocumentReference.service.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.patientId"
          },
          {
            "identity": "v2",
            "map": "PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
          },
          {
            "identity": "w5",
            "map": "who.focus"
          }
        ]
      },
      {
        "path": "DocumentReference.type",
        "short": "Kind of document (LOINC if possible)",
        "definition": "Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.",
        "comments": "Key metadata element describing the document, used in searching/filtering.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "preferred",
          "description": "Precise type of clinical document.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-doc-typecodes"

          }
        },
        {
          "path": "DocumentReference.service.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.type"
          },
          {
            "identity": "v2",
            "map": "TXA-2"
          },
          {
            "identity": "rim",
            "map": "./code"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "path": "DocumentReference.class",
        "short": "Categorization of document",
        "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.",
        "comments": "This is a metadata field from [XDS/MHD](http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD)).",
        "requirements": "Helps humans to assess whether the document is of interest when viewing a list of documents.",
        "alias": [
          "kind"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "High-level kind of a clinical document at a macro level.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-doc-classcodes"

          }
        },
        {
          "path": "DocumentReference.service.type",
          "definition": {
            "short": "Type of service (i.e. XDS.b)",
            "formal": "The type of the service that can be used to access the documents.",
            "comments": "The meaning and interpretation of the parameters depends on the service type.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentServiceType",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/documentreference-service-types"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.class"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code"
          },
          {
            "identity": "w5",
            "map": "class"
          }
        ]
      },
      {
        "path": "DocumentReference.author",
        "short": "Who and/or what authored the document",
        "definition": "Identifies who is responsible for adding the information to the document.",
        "comments": "Not necessarily who did the actual data entry (i.e. typist) it in or who was the source (informant).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"

            ]
          }
        },
        {
          "path": "DocumentReference.service.address",
          "definition": {
            "short": "Where service is located (usually a URL)",
            "formal": "Where the service end-point is located.",
            "comments": "Usually this is a URL, but for some services, the end-point is a simple network name or address that is not a valid URL.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.author"
          },
          {
            "identity": "v2",
            "map": "TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]"
          },
          {
            "identity": "w5",
            "map": "who.author"
          }
        ]
      },
      {
        "path": "DocumentReference.custodian",
        "short": "Organization which maintains the document",
        "definition": "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.",
        "comments": "Identifies the logical organization to go to find the current version, where to report issues, etc. This is different from the physical location of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"

            ]
          }
        },
        {
          "path": "DocumentReference.service.parameter",
          "definition": {
            "short": "Service call parameters",
            "formal": "A list of named parameters that is used in the service call.",
            "comments": "The interpretation of the parameters, and how to convert them into a proper service call, is dependent on the type of the service, and needs to be specified in an implementation guide somewhere.",
            "min": 0,
            "max": "*",
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]"
          }
        ]
      },
      {
        "path": "DocumentReference.authenticator",
        "short": "Who/what authenticated the document",
        "definition": "Which person or organization authenticates that this document is valid.",
        "comments": "Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"

            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.legalAuthenticator"
          },
          {
            "identity": "v2",
            "map": "TXA-10"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]"
          },
          {
            "identity": "w5",
            "map": "who.witness"
          }
        ]
      },
      {
        "path": "DocumentReference.created",
        "short": "Document creation time",
        "definition": "When the document was created.",
        "comments": "Creation time is used for tracking, organizing versions and searching. This is the creation time of the document, not the source material on which it is based.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.submissionTime"
          },
          {
            "identity": "v2",
            "map": "TXA-6"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime[type=\"TS\"]"
          },
          {
            "identity": "w5",
            "map": "when.done"
          }
        ]
      },
      {
        "path": "DocumentReference.indexed",
        "short": "When this document reference created",
        "definition": "When the document reference was created.",
        "comments": "Referencing/indexing time is used for tracking, organizing versions and searching.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "instant"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.submissionTime"
          },
          {
            "identity": "rim",
            "map": ".availabilityTime[type=\"TS\"]"
          },
          {
            "identity": "w5",
            "map": "when.recorded"
          }
        ]
      },
      {
        "path": "DocumentReference.status",
        "short": "current | superseded | entered-in-error",
        "definition": "The status of this document reference.",
        "comments": "This is the status of the DocumentReference object, which might be independent from the docStatus element.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "The status of the document reference.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/document-reference-status"

          }
        },
        {
          "path": "DocumentReference.service.parameter.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry status"
          },
          {
            "identity": "v2",
            "map": "TXA-19"
          },
          {
            "identity": "rim",
            "map": "interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\";  final: .completionCode=\"AU\" &&  ./statusCode[isNormalDatatype()]=\"complete\" and not(./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"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\""
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "path": "DocumentReference.docStatus",
        "short": "preliminary | final | appended | amended | entered-in-error",
        "definition": "The status of the underlying document.",
        "comments": "The document that is pointed to might be in various lifecycle states.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "Status of the underlying document.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/composition-status"

          }
        },
        {
          "path": "DocumentReference.service.parameter.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        "mapping": [
          {
            "identity": "v2",
            "map": "TXA-17"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          },
          {
            "identity": "w5",
            "map": "status"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo",
        "short": "Relationships to other documents",
        "definition": "Relationships that this document has with other document references that already exist.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isModifier": true,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.code",
        "short": "replaces | transforms | signs | appends",
        "definition": "The type of relationship that this document has with anther document.",
        "comments": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "required",
          "description": "The type of relationship between documents.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/document-relationship-type"

          }
        },
        {
          "path": "DocumentReference.service.parameter.name",
          "definition": {
            "short": "Parameter name in service call",
            "formal": "The name of a parameter.",
            "min": 1,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry Associations type"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship.typeCode"
          }
        ]
      },
      {
        "path": "DocumentReference.relatesTo.target",
        "short": "Target of the relationship",
        "definition": "The target document of this relationship.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/DocumentReference"

            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry Associations reference"
          },
          {
            "identity": "rim",
            "map": ".target[classCode=\"DOC\", moodCode=\"EVN\"].id"
          }
        ]
      },
      {
        "path": "DocumentReference.description",
        "short": "Human-readable description (title)",
        "definition": "Human-readable description of the source document. This is sometimes known as the \"title\".",
        "comments": "What the document is about, rather than a terse summary of the document. It is commonly the case that records do not have a title and are collectively referred to by the display name of Record code (e.g. a \"consultation\" or \"progress note\").",
        "requirements": "Helps humans to assess whether the document is of interest.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.description"
          },
          {
            "identity": "v2",
            "map": "TXA-25"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=\"SUBJ\"].target.text"
          }
        ]
      },
      {
        "path": "DocumentReference.securityLabel",
        "short": "Document security-tags",
        "definition": "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.",
        "comments": "The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce.   In the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.",
        "requirements": "Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "extensible",
          "description": "Security Labels from the Healthcare Privacy and Security Classification System.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/security-labels"
          }

        },
        {
          "path": "DocumentReference.service.parameter.value",
          "definition": {
            "short": "Parameter value for the name",
            "formal": "The value of the named parameter.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "string"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "n/a"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.confidentialityCode"
          },
          {
            "identity": "v2",
            "map": "TXA-18"
          },
          {
            "identity": "rim",
            "map": ".confidentialityCode"
          }
        ]
      },
      {
        "path": "DocumentReference.content",
        "short": "Document referenced",
        "definition": "The document and format referenced. There may be multiple content element repetitions, each with a different format.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.content.attachment",
        "short": "Where to access the document",
        "definition": "The document or url of the document along with critical metadata to prove content has integrity.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Attachment"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.mimeType DocumentEntry.languageCode DocumentEntry.URI DocumentEntry.size DocumentEntry.hash DocumentEntry.title"
          },
          {
            "identity": "v2",
            "map": "TXA-3 for mime type"
          },
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.content.format",
        "short": "Format/content rules for the document",
        "definition": "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.",
        "comments": "Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "preferred",
          "description": "Document Format Codes.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/formatcodes"

          }
        },
        {
          "path": "DocumentReference.context",
          "definition": {
            "short": "Clinical context of document",
            "formal": "The clinical context in which the document was prepared.",
            "comments": "These values are primarily added to help with searching for interesting/relevant documents.",
            "min": 0,
            "max": "1",
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.formatCode"
          },
          {
            "identity": "rim",
            "map": "document.text"
          }
        ]
      },
      {
        "path": "DocumentReference.context",
        "short": "Clinical context of document",
        "definition": "The clinical context in which the document was prepared.",
        "comments": "These values are primarily added to help with searching for interesting/relevant documents.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']"
          }
        ]
      },
      {
        "path": "DocumentReference.context.encounter",
        "short": "Context of the document  content",
        "definition": "Describes the clinical encounter or type of care that the document content is associated with.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Encounter"

            ]
          }
        },
        {
          "path": "DocumentReference.context.extension",
          "definition": {
            "short": "Additional Content defined by implementations",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])"
          },
          {
            "identity": "w5",
            "map": "context"
          }
        ]
      },
      {
        "path": "DocumentReference.context.event",
        "short": "Main Clinical Acts Documented",
        "definition": "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.",
        "comments": "An event can further specialize the act inherent in the type, such as  where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "This list of codes represents the main clinical acts being documented.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/v3-ActCode"

          }
        },
        {
          "path": "DocumentReference.context.modifierExtension",
          "definition": {
            "short": "Extensions that cannot be ignored",
            "formal": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
            "comments": "there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone.",
            "synonym": [
              "extensions",
              "user content"
            ],
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "Extension"
              }
            ],
            "isModifier": false

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.eventCodeList"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.period",
        "short": "Time of service that is being documented",
        "definition": "The time period over which the service that is described by the document was provided.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.serviceStartTime DocumentEntry.serviceStopTime"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime"
          }
        ]
      },
      {
        "path": "DocumentReference.context.facilityType",
        "short": "Kind of facility where patient was seen",
        "definition": "The kind of facility where the patient was seen.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "XDS Facility Type.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-facilitycodes"

          }
        },
        {
          "path": "DocumentReference.context.event",
          "definition": {
            "short": "Main Clinical Acts Documented",
            "formal": "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the typeCode, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.",
            "comments": "An event can further specialize the act inherent in the type, such as \nwhere it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.",
            "min": 0,
            "max": "*",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentEventType",
              "isExtensible": true,
              "conformance": "preferred",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/v3/vs/ActCode"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".code"
              }
            ]

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.healthcareFacilityTypeCode"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.practiceSetting",
        "short": "Additional details about where the content was created (e.g. clinical specialty)",
        "definition": "This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.",
        "comments": "The value set for this content has an example binding because it is a value set decided by community policy. Other examples exist for consideration: * HITSP created the table HITSP/C80 Table 2-148 Clinical Specialty Value Set (a value set based upon SNOMED CT which is referenced by Direct (XDR and XDM for Direct Messaging Specification, Version 1), as well as Nationwide Health Information Network (NHIN).  Query for Documents, Web Service Interface Specification, V 3.0, 07/27/2011 * ELGA (Austria) (ELGA CDA Implementie-rungsleitfäden Registrierung von CDA Dokumenten für ELGA mit IHE Cross-Enterprise Document Sharing: XDS Metadaten (XDSDocumentEntry), [1.2.40.0.34.7.6.3] * XDS Connect-a-thon practiceSettingCode.",
        "requirements": "This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "strength": "example",
          "description": "Additional details about where the content was created (e.g. clinical specialty).",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/c80-practice-codes"

          }
        },
        {
          "path": "DocumentReference.context.period",
          "definition": {
            "short": "Time of service that is being documented",
            "formal": "The time period over which the service that is described by the document was provided.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "Period"
              }
            ],
            "isModifier": false,
            "mapping": [
              {
                "identity": "rim",
                "map": ".effectiveTime"
              }

        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.practiceSettingCode"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
          }
        ]
      },
      {
        "path": "DocumentReference.context.sourcePatientInfo",
        "short": "Patient demographics from source",
        "definition": "The Patient Information as known when the document was published. May be a reference to a version specific, or contained.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"

            ]
          }
        },
        {
          "path": "DocumentReference.context.facilityType",
          "definition": {
            "short": "Kind of facility where patient was seen",
            "formal": "The kind of facility where the patient was seen.",
            "min": 0,
            "max": "1",
            "type": [
              {
                "code": "CodeableConcept"
              }
            ],
            "isModifier": false,
            "binding": {
              "name": "DocumentFacilityType",
              "isExtensible": true,
              "conformance": "example",
              "referenceResource": {
                "reference": "http://hl7.org/fhir/vs/xds-facilitycodes"
              }
            },
            "mapping": [
              {
                "identity": "rim",
                "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
              }

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.sourcePatientInfo DocumentEntry.sourcePatientId"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related",
        "short": "Related identifiers or resources",
        "definition": "Related identifiers or resources associated with the DocumentReference.",
        "comments": "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "xds",
            "map": "DocumentEntry.referenceIdList"
          },
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.identifier",
        "short": "Identifier of related objects or events",
        "definition": "Related identifier to this DocumentReference. If both id and ref are present they shall refer to the same thing.",
        "comments": "Order numbers, accession numbers, XDW workflow numbers.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct] .id"
          }
        ]
      },
      {
        "path": "DocumentReference.context.related.ref",
        "short": "Related Resource",
        "definition": "Related Resource to this DocumentReference. If both id and ref are present they shall refer to the same thing.",
        "comments": "Order, DiagnosticOrder,  Procedure, EligibilityRequest, etc.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"

            ]
          }
        }
      ],
      "searchParam": [
        {
          "name": "_id",
          "type": "token",
          "documentation": "The logical resource id associated with the resource (must be supported by all servers)"
        },
        {
          "name": "_language",
          "type": "token",
          "documentation": "The language of the resource"
        },
        {
          "name": "authenticator",
          "type": "reference",
          "documentation": "Who/What authenticated the document",
          "xpath": "f:DocumentReference/f:authenticator"
        },
        {
          "name": "author",
          "type": "reference",
          "documentation": "Who and/or what authored the document",
          "xpath": "f:DocumentReference/f:author"
        },
        {
          "name": "class",
          "type": "token",
          "documentation": "Categorization of Document",
          "xpath": "f:DocumentReference/f:class"
        },
        {
          "name": "confidentiality",
          "type": "token",
          "documentation": "Sensitivity of source document",
          "xpath": "f:DocumentReference/f:confidentiality"
        },
        {
          "name": "created",
          "type": "date",
          "documentation": "Document creation time",
          "xpath": "f:DocumentReference/f:created"
        },
        {
          "name": "custodian",
          "type": "reference",
          "documentation": "Org which maintains the document",
          "xpath": "f:DocumentReference/f:custodian"
        },
        {
          "name": "description",
          "type": "string",
          "documentation": "Human-readable description (title)",
          "xpath": "f:DocumentReference/f:description"
        },
        {
          "name": "event",
          "type": "token",
          "documentation": "Main Clinical Acts Documented",
          "xpath": "f:DocumentReference/f:context/f:event"
        },
        {
          "name": "facility",
          "type": "token",
          "documentation": "Kind of facility where patient was seen",
          "xpath": "f:DocumentReference/f:context/f:facilityType"
        },
        {
          "name": "format",
          "type": "token",
          "documentation": "Format/content rules for the document",
          "xpath": "f:DocumentReference/f:format"
        },
        {
          "name": "identifier",
          "type": "token",
          "documentation": "Master Version Specific Identifier"
        },
        {
          "name": "indexed",
          "type": "date",
          "documentation": "When this document reference created",
          "xpath": "f:DocumentReference/f:indexed"
        },
        {
          "name": "language",
          "type": "token",
          "documentation": "The marked primary language for the document",
          "xpath": "f:DocumentReference/f:primaryLanguage"
        },
        {
          "name": "location",
          "type": "string",
          "documentation": "Where to access the document",
          "xpath": "f:DocumentReference/f:location"
        },
        {
          "name": "period",
          "type": "date",
          "documentation": "Time of service that is being documented",
          "xpath": "f:DocumentReference/f:context/f:period"
        },
        {
          "name": "relatesto",
          "type": "reference",
          "documentation": "Target of the relationship",
          "xpath": "f:DocumentReference/f:relatesTo/f:target"
        },
        {
          "name": "relation",
          "type": "token",
          "documentation": "replaces | transforms | signs | appends",
          "xpath": "f:DocumentReference/f:relatesTo/f:code"
        },
        {
          "name": "relationship",
          "type": "composite",
          "documentation": "Combination of relation and relatesTo"
        },
        {
          "name": "size",
          "type": "number",
          "documentation": "Size of the document in bytes",
          "xpath": "f:DocumentReference/f:size"
        },
        {
          "name": "status",
          "type": "token",
          "documentation": "current | superceded | entered in error",
          "xpath": "f:DocumentReference/f:status"
        },
        {
          "name": "subject",
          "type": "reference",
          "documentation": "Who|what is the subject of the document",
          "xpath": "f:DocumentReference/f:subject"
        },
        {
          "name": "type",
          "type": "token",
          "documentation": "What kind of document this is (LOINC if possible)",
          "xpath": "f:DocumentReference/f:type"
        }
      ]
    }
  ]

        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct].text.reference"
          }
        ]
      }
    ]
  }

}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.