<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="spark1647" />
  <meta>
    <versionId value="spark1999" />
    <lastUpdated value="2015-11-18T16:38:17.059+00:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="2" />
  </extension>
  <url value="http://mais.org.ar/fhir/StructureDefinition/DocumentoAdjunto" />
  <name value="DocumentoAdjunto" />
  <status value="draft" />
  <date value="2015-09-22T20:02:49+10:00" />
  <description value="Base StructureDefinition for DocumentReference Resource" />
  <fhirVersion value="1.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/w5" />
    <name value="W5 Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2" />
  </mapping>
  <mapping>
    <identity value="xds" />
    <uri value="http://ihe.net/xds" />
    <name value="XDS" />
  </mapping>
  <kind value="resource" />
  <constrainedType value="DocumentReference" />
  <abstract value="false" />
  <base value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <differential>
    <element>
      <path value="DocumentReference" />
      <short value="A reference to a document" />
      <definition value="A reference to a document ." />
      <comments value="Usually, this is used for documents other than those defined by FHIR." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="DocumentReference" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="Document[classCode=&quot;DOC&quot; and moodCode=&quot;EVN&quot;]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="infrastructure.documents" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.masterIdentifier" />
      <short value="Master Version Specific Identifier" />
      <definition value="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 value="CDA Document Id extension and root." />
      <requirements value="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 &quot;oid^extension&quot;, 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 value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-12" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.uniqueId" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="id" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.identifier" />
      <short value="Other identifiers for the document" />
      <definition value="Other identifiers associated with the document, including version independent identifiers." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-16?" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id / .setId" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.entryUUID" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="id" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.subject" />
      <short value="Who/what is the subject of the document" />
      <definition value="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 value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="contained" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=&quot;SBJ&quot;].role[typeCode=&quot;PAT&quot;]" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.patientId" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="who.focus" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.type.coding.system" />
      <short value="Identity of the terminology system" />
      <definition value="The identification of the code system that defines the meaning of the symbol in the code." />
      <comments value="The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should de-reference to some definition that establish the system clearly and unambiguously." />
      <requirements value="Need to be unambiguous about the source of the definition of the symbol." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="www.mais.org/fhir/coding/profsolicitante" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="C*E.3" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./codeSystem" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.class" />
      <short value="Categorization of document" />
      <definition value="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 value="This is a metadata field from [XDS/MHD](http://wiki.ihe.net/index.php?title=Mobile_access_to_Health_Documents_(MHD))." />
      <requirements value="Helps humans to assess whether the document is of interest when viewing a list of documents." />
      <alias value="kind" />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=&quot;COMP].target[classCode=&quot;LIST&quot;, moodCode=&quot;EVN&quot;].code" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.class" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="class" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.author" />
      <short value="Who and/or what authored the document" />
      <definition value="Identifies who is responsible for adding the information to the document." />
      <comments value="Not necessarily who did the actual data entry (i.e. typist) it in or who was the source (informant)." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <aggregation value="referenced" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=&quot;AUT&quot;].role[classCode=&quot;ASSIGNED&quot;]" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.author" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="who.author" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.custodian" />
      <short value="Organization which maintains the document" />
      <definition value="Identifies the organization or group who is responsible for ongoing maintenance of and access to the document." />
      <comments value="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 value="0" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <profile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=&quot;RCV&quot;].role[classCode=&quot;CUST&quot;].scoper[classCode=&quot;ORG&quot; and determinerCode=&quot;INST&quot;]" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.created" />
      <short value="Document creation time" />
      <definition value="When the document was created." />
      <comments value="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 value="0" />
      <max value="0" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-6" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime[type=&quot;TS&quot;]" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.submissionTime" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="when.done" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.docStatus" />
      <short value="preliminary | final | appended | amended | entered-in-error" />
      <definition value="The status of the underlying document." />
      <comments value="The document that is pointed to might be in various lifecycle states." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-17" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="status" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.relatesTo" />
      <short value="Relationships to other documents" />
      <definition value="Relationships that this document has with other document references that already exist." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="BackboneElement" />
      </type>
      <isModifier value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.description" />
      <short value="Human-readable description (title)" />
      <definition value="Human-readable description of the source document. This is sometimes known as the &quot;title&quot;." />
      <comments value="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 &quot;consultation&quot; or &quot;progress note&quot;)." />
      <requirements value="Helps humans to assess whether the document is of interest." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-25" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=&quot;SUBJ&quot;].target.text" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.description" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.securityLabel" />
      <short value="Document security-tags" />
      <definition value="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 &quot;reference&quot; to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to." />
      <comments value="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 value="Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="TXA-18" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".confidentialityCode" />
      </mapping>
      <mapping>
        <identity value="xds" />
        <map value="DocumentEntry.confidentialityCode" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content" />
      <short value="Document referenced" />
      <definition value="The document and format referenced. There may be multiple content element repetitions, each with a different format." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="document.text" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.contentType" />
      <short value="Mime type of the content, with charset etc." />
      <definition value="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." />
      <requirements value="Processors of the data need to be able to know how to interpret the data." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <fixedCode value="xml/CDA" />
      <exampleCode value="text/plain; charset=UTF-8, image/png" />
      <isSummary value="true" />
      <binding>
        <strength value="required" />
        <description value="The mime type of an attachment. Any valid mime type is allowed." />
        <valueSetUri value="http://www.rfc-editor.org/bcp/bcp13.txt" />
      </binding>
      <mapping>
        <identity value="v2" />
        <map value="ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./mediaType, ./charset" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.language" />
      <short value="Human language of the content (BCP-47)" />
      <definition value="The human language of the content. The value can be any valid value according to BCP 47." />
      <requirements value="Users need to be able to choose between the languages in a set of attachments." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="code" />
      </type>
      <exampleCode value="en-AU" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="./language" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.data" />
      <short value="Data inline, base64ed" />
      <definition value="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." />
      <comments value="The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON." />
      <requirements value="The data needs to able to be transmitted inline." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="base64Binary" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="ED.5" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./data" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.url" />
      <short value="Uri where the data can be found" />
      <definition value="An alternative location where the data can be accessed." />
      <comments value="If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data." />
      <requirements value="The data needs to be transmitted by reference." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <exampleUri value="http://www.acme.com/logo-small.png" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="RP.1+RP.2 - if they refer to a URL (see v2.6)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="./reference/literal" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.size" />
      <short value="Number of bytes of content (if url provided)" />
      <definition value="The number of bytes of data that make up this attachment." />
      <comments value="The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference." />
      <requirements value="Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="unsignedInt" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="N/A (needs data type R3 proposal)" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.hash" />
      <short value="Hash of the data (sha-1, base64ed)" />
      <definition value="The calculated hash of the data using SHA-1. Represented using base64." />
      <requirements value="Included so that applications can verify that the contents of a location have not changed and so that a signature of the content can implicitly sign the content of an image without having to include the data in the instance or reference the url in the signature." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="base64Binary" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".integrityCheck[parent::ED/integrityCheckAlgorithm=&quot;SHA-1&quot;]" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.title" />
      <short value="Label to display in place of the data" />
      <definition value="A label or set of text to display in place of the data." />
      <requirements value="Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="string" />
      </type>
      <exampleString value="Official Corporate Logo" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="./title/data" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.content.attachment.creation" />
      <short value="Date attachment was first created" />
      <definition value="The date that the attachment was first created." />
      <requirements value="This is often tracked as an integrity issue for use of the attachment." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="N/A (needs data type R3 proposal)" />
      </mapping>
    </element>
    <element>
      <path value="DocumentReference.context" />
      <short value="Clinical context of document" />
      <definition value="The clinical context in which the document was prepared." />
      <comments value="These values are primarily added to help with searching for interesting/relevant documents." />
      <min value="0" />
      <max value="0" />
      <type>
        <code value="BackboneElement" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="outboundRelationship[typeCode=&quot;SUBJ&quot;].target[classCode&lt;'ACT']" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>